IDE.js 366 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696
  1. define(["amber/boot"
  2. //>>excludeStart("imports", pragmas.excludeImports);
  3. , "codemirror/addon/hint/show-hint", "codemirror/lib/codemirror", "codemirror/mode/smalltalk/smalltalk", "css!./resources/amber", "css!codemirror/addon/hint/show-hint", "css!codemirror/lib/codemirror", "css!codemirror/theme/ambiance", "jquery-ui"
  4. //>>excludeEnd("imports");
  5. , "amber/web/Web", "amber_core/Kernel-Objects"], function($boot
  6. //>>excludeStart("imports", pragmas.excludeImports);
  7. //>>excludeEnd("imports");
  8. ){"use strict";
  9. if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
  10. var $core=$boot.api,nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
  11. if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
  12. $core.addPackage('IDE');
  13. $core.packages["IDE"].innerEval = function (expr) { return eval(expr); };
  14. $core.packages["IDE"].imports = ["codemirror/addon/hint/show-hint", "codemirror/lib/codemirror", "codemirror/mode/smalltalk/smalltalk", "css!./resources/amber", "css!codemirror/addon/hint/show-hint", "css!codemirror/lib/codemirror", "css!codemirror/theme/ambiance", "jquery-ui"];
  15. $core.packages["IDE"].transport = {"type":"amd","amdNamespace":"amber/legacy"};
  16. $core.addClass('ClassesList', $globals.Widget, ['browser', 'ul', 'nodes'], 'IDE');
  17. $core.addMethod(
  18. $core.method({
  19. selector: "browser",
  20. protocol: 'accessing',
  21. fn: function (){
  22. var self=this;
  23. return self["@browser"];
  24. },
  25. //>>excludeStart("ide", pragmas.excludeIdeData);
  26. args: [],
  27. source: "browser\x0a\x09^ browser",
  28. referencedClasses: [],
  29. //>>excludeEnd("ide");
  30. messageSends: []
  31. }),
  32. $globals.ClassesList);
  33. $core.addMethod(
  34. $core.method({
  35. selector: "browser:",
  36. protocol: 'accessing',
  37. fn: function (aBrowser){
  38. var self=this;
  39. self["@browser"]=aBrowser;
  40. return self;
  41. },
  42. //>>excludeStart("ide", pragmas.excludeIdeData);
  43. args: ["aBrowser"],
  44. source: "browser: aBrowser\x0a\x09browser := aBrowser",
  45. referencedClasses: [],
  46. //>>excludeEnd("ide");
  47. messageSends: []
  48. }),
  49. $globals.ClassesList);
  50. $core.addMethod(
  51. $core.method({
  52. selector: "category",
  53. protocol: 'accessing',
  54. fn: function (){
  55. var self=this;
  56. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  57. return $core.withContext(function($ctx1) {
  58. //>>excludeEnd("ctx");
  59. return $recv(self._browser())._selectedPackage();
  60. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  61. }, function($ctx1) {$ctx1.fill(self,"category",{},$globals.ClassesList)});
  62. //>>excludeEnd("ctx");
  63. },
  64. //>>excludeStart("ide", pragmas.excludeIdeData);
  65. args: [],
  66. source: "category\x0a\x09^ self browser selectedPackage",
  67. referencedClasses: [],
  68. //>>excludeEnd("ide");
  69. messageSends: ["selectedPackage", "browser"]
  70. }),
  71. $globals.ClassesList);
  72. $core.addMethod(
  73. $core.method({
  74. selector: "getNodes",
  75. protocol: 'accessing',
  76. fn: function (){
  77. var self=this;
  78. var classes,children,others;
  79. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  80. return $core.withContext(function($ctx1) {
  81. //>>excludeEnd("ctx");
  82. var $1,$2;
  83. $1=self._browser();
  84. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  85. $ctx1.sendIdx["browser"]=1;
  86. //>>excludeEnd("ctx");
  87. classes=$recv($1)._classes();
  88. children=[];
  89. others=[];
  90. $recv(classes)._do_((function(each){
  91. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  92. return $core.withContext(function($ctx2) {
  93. //>>excludeEnd("ctx");
  94. $2=$recv(classes)._includes_($recv(each)._superclass());
  95. if($core.assert($2)){
  96. return $recv(others)._add_(each);
  97. } else {
  98. return $recv(children)._add_(each);
  99. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  100. $ctx2.sendIdx["add:"]=1;
  101. //>>excludeEnd("ctx");
  102. };
  103. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  104. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  105. //>>excludeEnd("ctx");
  106. }));
  107. return $recv(children)._collect_((function(each){
  108. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  109. return $core.withContext(function($ctx2) {
  110. //>>excludeEnd("ctx");
  111. return $recv($globals.ClassesListNode)._on_browser_classes_level_(each,self._browser(),others,(0));
  112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  113. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)});
  114. //>>excludeEnd("ctx");
  115. }));
  116. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  117. }, function($ctx1) {$ctx1.fill(self,"getNodes",{classes:classes,children:children,others:others},$globals.ClassesList)});
  118. //>>excludeEnd("ctx");
  119. },
  120. //>>excludeStart("ide", pragmas.excludeIdeData);
  121. args: [],
  122. source: "getNodes\x0a\x09| classes children others |\x0a\x09classes := self browser classes.\x0a\x09children := #().\x0a\x09others := #().\x0a\x09classes do: [ :each |\x0a\x09\x09(classes includes: each superclass)\x0a\x09\x09\x09ifFalse: [ children add: each ]\x0a\x09\x09\x09ifTrue: [ others add: each ]].\x0a\x09^ children collect: [ :each |\x0a\x09\x09ClassesListNode on: each browser: self browser classes: others level: 0 ]",
  123. referencedClasses: ["ClassesListNode"],
  124. //>>excludeEnd("ide");
  125. messageSends: ["classes", "browser", "do:", "ifFalse:ifTrue:", "includes:", "superclass", "add:", "collect:", "on:browser:classes:level:"]
  126. }),
  127. $globals.ClassesList);
  128. $core.addMethod(
  129. $core.method({
  130. selector: "nodes",
  131. protocol: 'accessing',
  132. fn: function (){
  133. var self=this;
  134. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  135. return $core.withContext(function($ctx1) {
  136. //>>excludeEnd("ctx");
  137. var $1,$receiver;
  138. $1=self["@nodes"];
  139. if(($receiver = $1) == null || $receiver.isNil){
  140. self["@nodes"]=self._getNodes();
  141. self["@nodes"];
  142. } else {
  143. $1;
  144. };
  145. return self["@nodes"];
  146. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  147. }, function($ctx1) {$ctx1.fill(self,"nodes",{},$globals.ClassesList)});
  148. //>>excludeEnd("ctx");
  149. },
  150. //>>excludeStart("ide", pragmas.excludeIdeData);
  151. args: [],
  152. source: "nodes\x0a\x09nodes ifNil: [ nodes := self getNodes ].\x0a\x09^ nodes",
  153. referencedClasses: [],
  154. //>>excludeEnd("ide");
  155. messageSends: ["ifNil:", "getNodes"]
  156. }),
  157. $globals.ClassesList);
  158. $core.addMethod(
  159. $core.method({
  160. selector: "renderOn:",
  161. protocol: 'rendering',
  162. fn: function (html){
  163. var self=this;
  164. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  165. return $core.withContext(function($ctx1) {
  166. //>>excludeEnd("ctx");
  167. var $1;
  168. $1=$recv(html)._ul();
  169. $recv($1)._class_("amber_column browser classes");
  170. self["@ul"]=$recv($1)._yourself();
  171. self._updateNodes();
  172. return self;
  173. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  174. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.ClassesList)});
  175. //>>excludeEnd("ctx");
  176. },
  177. //>>excludeStart("ide", pragmas.excludeIdeData);
  178. args: ["html"],
  179. source: "renderOn: html\x0a\x09ul := html ul\x0a\x09\x09class: 'amber_column browser classes';\x0a\x09\x09yourself.\x0a\x09self updateNodes",
  180. referencedClasses: [],
  181. //>>excludeEnd("ide");
  182. messageSends: ["class:", "ul", "yourself", "updateNodes"]
  183. }),
  184. $globals.ClassesList);
  185. $core.addMethod(
  186. $core.method({
  187. selector: "resetNodes",
  188. protocol: 'accessing',
  189. fn: function (){
  190. var self=this;
  191. self["@nodes"]=nil;
  192. return self;
  193. },
  194. //>>excludeStart("ide", pragmas.excludeIdeData);
  195. args: [],
  196. source: "resetNodes\x0a\x09nodes := nil",
  197. referencedClasses: [],
  198. //>>excludeEnd("ide");
  199. messageSends: []
  200. }),
  201. $globals.ClassesList);
  202. $core.addMethod(
  203. $core.method({
  204. selector: "updateNodes",
  205. protocol: 'rendering',
  206. fn: function (){
  207. var self=this;
  208. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  209. return $core.withContext(function($ctx1) {
  210. //>>excludeEnd("ctx");
  211. $recv(self["@ul"])._contents_((function(html){
  212. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  213. return $core.withContext(function($ctx2) {
  214. //>>excludeEnd("ctx");
  215. return $recv(self._nodes())._do_((function(each){
  216. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  217. return $core.withContext(function($ctx3) {
  218. //>>excludeEnd("ctx");
  219. return $recv(each)._renderOn_(html);
  220. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  221. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  222. //>>excludeEnd("ctx");
  223. }));
  224. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  225. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  226. //>>excludeEnd("ctx");
  227. }));
  228. return self;
  229. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  230. }, function($ctx1) {$ctx1.fill(self,"updateNodes",{},$globals.ClassesList)});
  231. //>>excludeEnd("ctx");
  232. },
  233. //>>excludeStart("ide", pragmas.excludeIdeData);
  234. args: [],
  235. source: "updateNodes\x0a\x09ul contents: [ :html |\x0a\x09\x09self nodes do: [ :each |\x0a\x09\x09\x09each renderOn: html ]]",
  236. referencedClasses: [],
  237. //>>excludeEnd("ide");
  238. messageSends: ["contents:", "do:", "nodes", "renderOn:"]
  239. }),
  240. $globals.ClassesList);
  241. $core.addMethod(
  242. $core.method({
  243. selector: "on:",
  244. protocol: 'instance creation',
  245. fn: function (aBrowser){
  246. var self=this;
  247. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  248. return $core.withContext(function($ctx1) {
  249. //>>excludeEnd("ctx");
  250. var $1;
  251. $1=self._new();
  252. $recv($1)._browser_(aBrowser);
  253. return $recv($1)._yourself();
  254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  255. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowser:aBrowser},$globals.ClassesList.klass)});
  256. //>>excludeEnd("ctx");
  257. },
  258. //>>excludeStart("ide", pragmas.excludeIdeData);
  259. args: ["aBrowser"],
  260. source: "on: aBrowser\x0a\x09^ self new\x0a\x09\x09browser: aBrowser;\x0a\x09\x09yourself",
  261. referencedClasses: [],
  262. //>>excludeEnd("ide");
  263. messageSends: ["browser:", "new", "yourself"]
  264. }),
  265. $globals.ClassesList.klass);
  266. $core.addClass('ClassesListNode', $globals.Widget, ['browser', 'theClass', 'level', 'nodes'], 'IDE');
  267. $core.addMethod(
  268. $core.method({
  269. selector: "browser",
  270. protocol: 'accessing',
  271. fn: function (){
  272. var self=this;
  273. return self["@browser"];
  274. },
  275. //>>excludeStart("ide", pragmas.excludeIdeData);
  276. args: [],
  277. source: "browser\x0a\x09^ browser",
  278. referencedClasses: [],
  279. //>>excludeEnd("ide");
  280. messageSends: []
  281. }),
  282. $globals.ClassesListNode);
  283. $core.addMethod(
  284. $core.method({
  285. selector: "browser:",
  286. protocol: 'accessing',
  287. fn: function (aBrowser){
  288. var self=this;
  289. self["@browser"]=aBrowser;
  290. return self;
  291. },
  292. //>>excludeStart("ide", pragmas.excludeIdeData);
  293. args: ["aBrowser"],
  294. source: "browser: aBrowser\x0a\x09browser := aBrowser",
  295. referencedClasses: [],
  296. //>>excludeEnd("ide");
  297. messageSends: []
  298. }),
  299. $globals.ClassesListNode);
  300. $core.addMethod(
  301. $core.method({
  302. selector: "getNodesFrom:",
  303. protocol: 'accessing',
  304. fn: function (aCollection){
  305. var self=this;
  306. var children,others;
  307. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  308. return $core.withContext(function($ctx1) {
  309. //>>excludeEnd("ctx");
  310. var $1;
  311. children=[];
  312. others=[];
  313. $recv(aCollection)._do_((function(each){
  314. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  315. return $core.withContext(function($ctx2) {
  316. //>>excludeEnd("ctx");
  317. $1=$recv($recv(each)._superclass()).__eq(self._theClass());
  318. if($core.assert($1)){
  319. return $recv(children)._add_(each);
  320. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  321. $ctx2.sendIdx["add:"]=1;
  322. //>>excludeEnd("ctx");
  323. } else {
  324. return $recv(others)._add_(each);
  325. };
  326. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  327. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  328. //>>excludeEnd("ctx");
  329. }));
  330. self["@nodes"]=$recv(children)._collect_((function(each){
  331. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  332. return $core.withContext(function($ctx2) {
  333. //>>excludeEnd("ctx");
  334. return $recv($globals.ClassesListNode)._on_browser_classes_level_(each,self._browser(),others,$recv(self._level()).__plus((1)));
  335. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  336. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)});
  337. //>>excludeEnd("ctx");
  338. }));
  339. return self;
  340. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  341. }, function($ctx1) {$ctx1.fill(self,"getNodesFrom:",{aCollection:aCollection,children:children,others:others},$globals.ClassesListNode)});
  342. //>>excludeEnd("ctx");
  343. },
  344. //>>excludeStart("ide", pragmas.excludeIdeData);
  345. args: ["aCollection"],
  346. source: "getNodesFrom: aCollection\x0a\x09| children others |\x0a\x09children := #().\x0a\x09others := #().\x0a\x09aCollection do: [ :each |\x0a\x09\x09(each superclass = self theClass)\x0a\x09\x09\x09ifTrue: [ children add: each ]\x0a\x09\x09\x09ifFalse: [ others add: each ]].\x0a\x09nodes:= children collect: [ :each |\x0a\x09\x09ClassesListNode on: each browser: self browser classes: others level: self level + 1 ]",
  347. referencedClasses: ["ClassesListNode"],
  348. //>>excludeEnd("ide");
  349. messageSends: ["do:", "ifTrue:ifFalse:", "=", "superclass", "theClass", "add:", "collect:", "on:browser:classes:level:", "browser", "+", "level"]
  350. }),
  351. $globals.ClassesListNode);
  352. $core.addMethod(
  353. $core.method({
  354. selector: "label",
  355. protocol: 'accessing',
  356. fn: function (){
  357. var self=this;
  358. var str;
  359. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  360. return $core.withContext(function($ctx1) {
  361. //>>excludeEnd("ctx");
  362. str=$recv($recv($globals.String)._new())._writeStream();
  363. $recv(self._level())._timesRepeat_((function(){
  364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  365. return $core.withContext(function($ctx2) {
  366. //>>excludeEnd("ctx");
  367. return $recv(str)._nextPutAll_("    ");
  368. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  369. $ctx2.sendIdx["nextPutAll:"]=1;
  370. //>>excludeEnd("ctx");
  371. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  372. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  373. //>>excludeEnd("ctx");
  374. }));
  375. $recv(str)._nextPutAll_($recv(self._theClass())._name());
  376. return $recv(str)._contents();
  377. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  378. }, function($ctx1) {$ctx1.fill(self,"label",{str:str},$globals.ClassesListNode)});
  379. //>>excludeEnd("ctx");
  380. },
  381. //>>excludeStart("ide", pragmas.excludeIdeData);
  382. args: [],
  383. source: "label\x0a\x09| str |\x0a\x09str := String new writeStream.\x0a\x09self level timesRepeat: [\x0a\x09\x09str nextPutAll: '    ' ].\x0a\x09str nextPutAll: self theClass name.\x0a\x09^ str contents",
  384. referencedClasses: ["String"],
  385. //>>excludeEnd("ide");
  386. messageSends: ["writeStream", "new", "timesRepeat:", "level", "nextPutAll:", "name", "theClass", "contents"]
  387. }),
  388. $globals.ClassesListNode);
  389. $core.addMethod(
  390. $core.method({
  391. selector: "level",
  392. protocol: 'accessing',
  393. fn: function (){
  394. var self=this;
  395. return self["@level"];
  396. },
  397. //>>excludeStart("ide", pragmas.excludeIdeData);
  398. args: [],
  399. source: "level\x0a\x09^ level",
  400. referencedClasses: [],
  401. //>>excludeEnd("ide");
  402. messageSends: []
  403. }),
  404. $globals.ClassesListNode);
  405. $core.addMethod(
  406. $core.method({
  407. selector: "level:",
  408. protocol: 'accessing',
  409. fn: function (anInteger){
  410. var self=this;
  411. self["@level"]=anInteger;
  412. return self;
  413. },
  414. //>>excludeStart("ide", pragmas.excludeIdeData);
  415. args: ["anInteger"],
  416. source: "level: anInteger\x0a\x09level := anInteger",
  417. referencedClasses: [],
  418. //>>excludeEnd("ide");
  419. messageSends: []
  420. }),
  421. $globals.ClassesListNode);
  422. $core.addMethod(
  423. $core.method({
  424. selector: "nodes",
  425. protocol: 'accessing',
  426. fn: function (){
  427. var self=this;
  428. return self["@nodes"];
  429. },
  430. //>>excludeStart("ide", pragmas.excludeIdeData);
  431. args: [],
  432. source: "nodes\x0a\x09^ nodes",
  433. referencedClasses: [],
  434. //>>excludeEnd("ide");
  435. messageSends: []
  436. }),
  437. $globals.ClassesListNode);
  438. $core.addMethod(
  439. $core.method({
  440. selector: "renderOn:",
  441. protocol: 'rendering',
  442. fn: function (html){
  443. var self=this;
  444. var li,cssClass;
  445. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  446. return $core.withContext(function($ctx1) {
  447. //>>excludeEnd("ctx");
  448. var $1,$2,$4,$5,$3;
  449. cssClass="";
  450. li=$recv($recv(html)._li())._onClick_((function(){
  451. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  452. return $core.withContext(function($ctx2) {
  453. //>>excludeEnd("ctx");
  454. $1=self._browser();
  455. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  456. $ctx2.sendIdx["browser"]=1;
  457. //>>excludeEnd("ctx");
  458. $2=self._theClass();
  459. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  460. $ctx2.sendIdx["theClass"]=1;
  461. //>>excludeEnd("ctx");
  462. return $recv($1)._selectClass_($2);
  463. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  464. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  465. //>>excludeEnd("ctx");
  466. }));
  467. $recv($recv(li)._asJQuery())._html_(self._label());
  468. $4=$recv(self._browser())._selectedClass();
  469. $5=self._theClass();
  470. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  471. $ctx1.sendIdx["theClass"]=2;
  472. //>>excludeEnd("ctx");
  473. $3=$recv($4).__eq($5);
  474. if($core.assert($3)){
  475. cssClass=$recv(cssClass).__comma(" selected");
  476. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  477. $ctx1.sendIdx[","]=1;
  478. //>>excludeEnd("ctx");
  479. cssClass;
  480. };
  481. $recv($recv(self._theClass())._comment())._ifNotEmpty_((function(){
  482. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  483. return $core.withContext(function($ctx2) {
  484. //>>excludeEnd("ctx");
  485. cssClass=$recv(cssClass).__comma(" commented");
  486. return cssClass;
  487. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  488. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  489. //>>excludeEnd("ctx");
  490. }));
  491. $recv(li)._class_(cssClass);
  492. $recv(self._nodes())._do_((function(each){
  493. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  494. return $core.withContext(function($ctx2) {
  495. //>>excludeEnd("ctx");
  496. return $recv(each)._renderOn_(html);
  497. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  498. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)});
  499. //>>excludeEnd("ctx");
  500. }));
  501. return self;
  502. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  503. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,li:li,cssClass:cssClass},$globals.ClassesListNode)});
  504. //>>excludeEnd("ctx");
  505. },
  506. //>>excludeStart("ide", pragmas.excludeIdeData);
  507. args: ["html"],
  508. source: "renderOn: html\x0a\x09| li cssClass |\x0a\x09cssClass := ''.\x0a\x09li := html li\x0a\x09\x09onClick: [ self browser selectClass: self theClass ].\x0a\x09li asJQuery html: self label.\x0a\x0a\x09self browser selectedClass = self theClass ifTrue: [\x0a\x09\x09cssClass := cssClass, ' selected' ].\x0a\x0a\x09self theClass comment ifNotEmpty: [\x0a\x09\x09cssClass := cssClass, ' commented' ].\x0a\x0a\x09li class: cssClass.\x0a\x0a\x09self nodes do: [ :each |\x0a\x09\x09each renderOn: html ]",
  509. referencedClasses: [],
  510. //>>excludeEnd("ide");
  511. messageSends: ["onClick:", "li", "selectClass:", "browser", "theClass", "html:", "asJQuery", "label", "ifTrue:", "=", "selectedClass", ",", "ifNotEmpty:", "comment", "class:", "do:", "nodes", "renderOn:"]
  512. }),
  513. $globals.ClassesListNode);
  514. $core.addMethod(
  515. $core.method({
  516. selector: "theClass",
  517. protocol: 'accessing',
  518. fn: function (){
  519. var self=this;
  520. return self["@theClass"];
  521. },
  522. //>>excludeStart("ide", pragmas.excludeIdeData);
  523. args: [],
  524. source: "theClass\x0a\x09^ theClass",
  525. referencedClasses: [],
  526. //>>excludeEnd("ide");
  527. messageSends: []
  528. }),
  529. $globals.ClassesListNode);
  530. $core.addMethod(
  531. $core.method({
  532. selector: "theClass:",
  533. protocol: 'accessing',
  534. fn: function (aClass){
  535. var self=this;
  536. self["@theClass"]=aClass;
  537. return self;
  538. },
  539. //>>excludeStart("ide", pragmas.excludeIdeData);
  540. args: ["aClass"],
  541. source: "theClass: aClass\x0a\x09theClass := aClass",
  542. referencedClasses: [],
  543. //>>excludeEnd("ide");
  544. messageSends: []
  545. }),
  546. $globals.ClassesListNode);
  547. $core.addMethod(
  548. $core.method({
  549. selector: "on:browser:classes:level:",
  550. protocol: 'instance creation',
  551. fn: function (aClass,aBrowser,aCollection,anInteger){
  552. var self=this;
  553. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  554. return $core.withContext(function($ctx1) {
  555. //>>excludeEnd("ctx");
  556. var $1;
  557. $1=self._new();
  558. $recv($1)._theClass_(aClass);
  559. $recv($1)._browser_(aBrowser);
  560. $recv($1)._level_(anInteger);
  561. $recv($1)._getNodesFrom_(aCollection);
  562. return $recv($1)._yourself();
  563. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  564. }, function($ctx1) {$ctx1.fill(self,"on:browser:classes:level:",{aClass:aClass,aBrowser:aBrowser,aCollection:aCollection,anInteger:anInteger},$globals.ClassesListNode.klass)});
  565. //>>excludeEnd("ctx");
  566. },
  567. //>>excludeStart("ide", pragmas.excludeIdeData);
  568. args: ["aClass", "aBrowser", "aCollection", "anInteger"],
  569. source: "on: aClass browser: aBrowser classes: aCollection level: anInteger\x0a\x09^ self new\x0a\x09\x09theClass: aClass;\x0a\x09\x09browser: aBrowser;\x0a\x09\x09level: anInteger;\x0a\x09\x09getNodesFrom: aCollection;\x0a\x09\x09yourself",
  570. referencedClasses: [],
  571. //>>excludeEnd("ide");
  572. messageSends: ["theClass:", "new", "browser:", "level:", "getNodesFrom:", "yourself"]
  573. }),
  574. $globals.ClassesListNode.klass);
  575. $core.addClass('DebugErrorHandler', $globals.Object, [], 'IDE');
  576. $core.addMethod(
  577. $core.method({
  578. selector: "handleError:",
  579. protocol: 'error handling',
  580. fn: function (anError){
  581. var self=this;
  582. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  583. return $core.withContext(function($ctx1) {
  584. //>>excludeEnd("ctx");
  585. var $1;
  586. $recv((function(){
  587. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  588. return $core.withContext(function($ctx2) {
  589. //>>excludeEnd("ctx");
  590. $1=$recv($globals.Debugger)._new();
  591. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  592. $ctx2.sendIdx["new"]=1;
  593. //>>excludeEnd("ctx");
  594. $recv($1)._error_(anError);
  595. return $recv($1)._open();
  596. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  597. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  598. //>>excludeEnd("ctx");
  599. }))._on_do_($globals.Error,(function(error){
  600. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  601. return $core.withContext(function($ctx2) {
  602. //>>excludeEnd("ctx");
  603. return $recv($recv($globals.ConsoleErrorHandler)._new())._handleError_(error);
  604. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  605. }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1,2)});
  606. //>>excludeEnd("ctx");
  607. }));
  608. return self;
  609. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  610. }, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},$globals.DebugErrorHandler)});
  611. //>>excludeEnd("ctx");
  612. },
  613. //>>excludeStart("ide", pragmas.excludeIdeData);
  614. args: ["anError"],
  615. source: "handleError: anError\x0a\x09[ Debugger new\x0a\x09\x09error: anError;\x0a\x09\x09open ] on: Error do: [ :error |\x0a\x09\x09\x09ConsoleErrorHandler new handleError: error ]",
  616. referencedClasses: ["Debugger", "Error", "ConsoleErrorHandler"],
  617. //>>excludeEnd("ide");
  618. messageSends: ["on:do:", "error:", "new", "open", "handleError:"]
  619. }),
  620. $globals.DebugErrorHandler);
  621. $core.addMethod(
  622. $core.method({
  623. selector: "initialize",
  624. protocol: 'initialization',
  625. fn: function (){
  626. var self=this;
  627. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  628. return $core.withContext(function($ctx1) {
  629. //>>excludeEnd("ctx");
  630. $recv($globals.ErrorHandler)._register_(self._new());
  631. return self;
  632. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  633. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.DebugErrorHandler.klass)});
  634. //>>excludeEnd("ctx");
  635. },
  636. //>>excludeStart("ide", pragmas.excludeIdeData);
  637. args: [],
  638. source: "initialize\x0a\x09ErrorHandler register: self new",
  639. referencedClasses: ["ErrorHandler"],
  640. //>>excludeEnd("ide");
  641. messageSends: ["register:", "new"]
  642. }),
  643. $globals.DebugErrorHandler.klass);
  644. $core.addClass('SourceArea', $globals.Widget, ['editor', 'div', 'receiver', 'onDoIt'], 'IDE');
  645. $core.addMethod(
  646. $core.method({
  647. selector: "clear",
  648. protocol: 'actions',
  649. fn: function (){
  650. var self=this;
  651. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  652. return $core.withContext(function($ctx1) {
  653. //>>excludeEnd("ctx");
  654. self._val_("");
  655. return self;
  656. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  657. }, function($ctx1) {$ctx1.fill(self,"clear",{},$globals.SourceArea)});
  658. //>>excludeEnd("ctx");
  659. },
  660. //>>excludeStart("ide", pragmas.excludeIdeData);
  661. args: [],
  662. source: "clear\x0a\x09self val: ''",
  663. referencedClasses: [],
  664. //>>excludeEnd("ide");
  665. messageSends: ["val:"]
  666. }),
  667. $globals.SourceArea);
  668. $core.addMethod(
  669. $core.method({
  670. selector: "currentLine",
  671. protocol: 'accessing',
  672. fn: function (){
  673. var self=this;
  674. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  675. return $core.withContext(function($ctx1) {
  676. //>>excludeEnd("ctx");
  677. return $recv(self["@editor"])._getLine_($recv($recv(self["@editor"])._getCursor())._line());
  678. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  679. }, function($ctx1) {$ctx1.fill(self,"currentLine",{},$globals.SourceArea)});
  680. //>>excludeEnd("ctx");
  681. },
  682. //>>excludeStart("ide", pragmas.excludeIdeData);
  683. args: [],
  684. source: "currentLine\x0a\x09^ editor getLine: (editor getCursor line)",
  685. referencedClasses: [],
  686. //>>excludeEnd("ide");
  687. messageSends: ["getLine:", "line", "getCursor"]
  688. }),
  689. $globals.SourceArea);
  690. $core.addMethod(
  691. $core.method({
  692. selector: "currentLineOrSelection",
  693. protocol: 'accessing',
  694. fn: function (){
  695. var self=this;
  696. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  697. return $core.withContext(function($ctx1) {
  698. //>>excludeEnd("ctx");
  699. var $1;
  700. $1=$recv(self["@editor"])._somethingSelected();
  701. if($core.assert($1)){
  702. return self._selection();
  703. } else {
  704. return self._currentLine();
  705. };
  706. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  707. }, function($ctx1) {$ctx1.fill(self,"currentLineOrSelection",{},$globals.SourceArea)});
  708. //>>excludeEnd("ctx");
  709. },
  710. //>>excludeStart("ide", pragmas.excludeIdeData);
  711. args: [],
  712. source: "currentLineOrSelection\x0a\x09^ editor somethingSelected\x0a\x09ifFalse: [ self currentLine ]\x0a\x09ifTrue: [ self selection ]",
  713. referencedClasses: [],
  714. //>>excludeEnd("ide");
  715. messageSends: ["ifFalse:ifTrue:", "somethingSelected", "currentLine", "selection"]
  716. }),
  717. $globals.SourceArea);
  718. $core.addMethod(
  719. $core.method({
  720. selector: "doIt",
  721. protocol: 'actions',
  722. fn: function (){
  723. var self=this;
  724. var result;
  725. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  726. return $core.withContext(function($ctx1) {
  727. //>>excludeEnd("ctx");
  728. var $1,$receiver;
  729. result=self._eval_(self._currentLineOrSelection());
  730. $1=self._onDoIt();
  731. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  732. $ctx1.sendIdx["onDoIt"]=1;
  733. //>>excludeEnd("ctx");
  734. if(($receiver = $1) == null || $receiver.isNil){
  735. $1;
  736. } else {
  737. $recv(self._onDoIt())._value();
  738. };
  739. return result;
  740. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  741. }, function($ctx1) {$ctx1.fill(self,"doIt",{result:result},$globals.SourceArea)});
  742. //>>excludeEnd("ctx");
  743. },
  744. //>>excludeStart("ide", pragmas.excludeIdeData);
  745. args: [],
  746. source: "doIt\x0a\x09| result |\x0a\x09result := self eval: self currentLineOrSelection.\x0a\x09self onDoIt ifNotNil: [ self onDoIt value ].\x0a\x09^ result",
  747. referencedClasses: [],
  748. //>>excludeEnd("ide");
  749. messageSends: ["eval:", "currentLineOrSelection", "ifNotNil:", "onDoIt", "value"]
  750. }),
  751. $globals.SourceArea);
  752. $core.addMethod(
  753. $core.method({
  754. selector: "editor",
  755. protocol: 'accessing',
  756. fn: function (){
  757. var self=this;
  758. return self["@editor"];
  759. },
  760. //>>excludeStart("ide", pragmas.excludeIdeData);
  761. args: [],
  762. source: "editor\x0a\x09^ editor",
  763. referencedClasses: [],
  764. //>>excludeEnd("ide");
  765. messageSends: []
  766. }),
  767. $globals.SourceArea);
  768. $core.addMethod(
  769. $core.method({
  770. selector: "eval:",
  771. protocol: 'actions',
  772. fn: function (aString){
  773. var self=this;
  774. var compiler;
  775. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  776. return $core.withContext(function($ctx1) {
  777. //>>excludeEnd("ctx");
  778. var $early={};
  779. try {
  780. compiler=$recv($globals.Compiler)._new();
  781. $recv((function(){
  782. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  783. return $core.withContext(function($ctx2) {
  784. //>>excludeEnd("ctx");
  785. return $recv(compiler)._parseExpression_(aString);
  786. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  787. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  788. //>>excludeEnd("ctx");
  789. }))._on_do_($globals.Error,(function(ex){
  790. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  791. return $core.withContext(function($ctx2) {
  792. //>>excludeEnd("ctx");
  793. throw $early=[$recv($globals.Terminal)._alert_($recv(ex)._messageText())];
  794. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  795. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,2)});
  796. //>>excludeEnd("ctx");
  797. }));
  798. return $recv(compiler)._evaluateExpression_on_(aString,self._receiver());
  799. }
  800. catch(e) {if(e===$early)return e[0]; throw e}
  801. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  802. }, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,compiler:compiler},$globals.SourceArea)});
  803. //>>excludeEnd("ctx");
  804. },
  805. //>>excludeStart("ide", pragmas.excludeIdeData);
  806. args: ["aString"],
  807. source: "eval: aString\x0a\x09| compiler |\x0a\x09compiler := Compiler new.\x0a\x09[ compiler parseExpression: aString ] on: Error do: [ :ex |\x0a\x09\x09^ Terminal alert: ex messageText ].\x0a\x09^ compiler evaluateExpression: aString on: self receiver",
  808. referencedClasses: ["Compiler", "Error", "Terminal"],
  809. //>>excludeEnd("ide");
  810. messageSends: ["new", "on:do:", "parseExpression:", "alert:", "messageText", "evaluateExpression:on:", "receiver"]
  811. }),
  812. $globals.SourceArea);
  813. $core.addMethod(
  814. $core.method({
  815. selector: "fileIn",
  816. protocol: 'actions',
  817. fn: function (){
  818. var self=this;
  819. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  820. return $core.withContext(function($ctx1) {
  821. //>>excludeEnd("ctx");
  822. $recv($recv($globals.Importer)._new())._import_($recv(self._currentLineOrSelection())._readStream());
  823. return self;
  824. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  825. }, function($ctx1) {$ctx1.fill(self,"fileIn",{},$globals.SourceArea)});
  826. //>>excludeEnd("ctx");
  827. },
  828. //>>excludeStart("ide", pragmas.excludeIdeData);
  829. args: [],
  830. source: "fileIn\x0a\x09Importer new import: self currentLineOrSelection readStream",
  831. referencedClasses: ["Importer"],
  832. //>>excludeEnd("ide");
  833. messageSends: ["import:", "new", "readStream", "currentLineOrSelection"]
  834. }),
  835. $globals.SourceArea);
  836. $core.addMethod(
  837. $core.method({
  838. selector: "focus",
  839. protocol: 'actions',
  840. fn: function (){
  841. var self=this;
  842. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  843. return $core.withContext(function($ctx1) {
  844. //>>excludeEnd("ctx");
  845. $recv(self._editor())._focus();
  846. return self;
  847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  848. }, function($ctx1) {$ctx1.fill(self,"focus",{},$globals.SourceArea)});
  849. //>>excludeEnd("ctx");
  850. },
  851. //>>excludeStart("ide", pragmas.excludeIdeData);
  852. args: [],
  853. source: "focus\x0a\x09self editor focus.",
  854. referencedClasses: [],
  855. //>>excludeEnd("ide");
  856. messageSends: ["focus", "editor"]
  857. }),
  858. $globals.SourceArea);
  859. $core.addMethod(
  860. $core.method({
  861. selector: "handleKeyDown:",
  862. protocol: 'actions',
  863. fn: function (anEvent){
  864. var self=this;
  865. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  866. return $core.withContext(function($ctx1) {
  867. //>>excludeEnd("ctx");
  868. if(anEvent.ctrlKey) {
  869. if(anEvent.keyCode === 80) { //ctrl+p
  870. self._printIt();
  871. anEvent.preventDefault();
  872. return false;
  873. }
  874. if(anEvent.keyCode === 68) { //ctrl+d
  875. self._doIt();
  876. anEvent.preventDefault();
  877. return false;
  878. }
  879. if(anEvent.keyCode === 73) { //ctrl+i
  880. self._inspectIt();
  881. anEvent.preventDefault();
  882. return false;
  883. }
  884. };
  885. return self;
  886. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  887. }, function($ctx1) {$ctx1.fill(self,"handleKeyDown:",{anEvent:anEvent},$globals.SourceArea)});
  888. //>>excludeEnd("ctx");
  889. },
  890. //>>excludeStart("ide", pragmas.excludeIdeData);
  891. args: ["anEvent"],
  892. source: "handleKeyDown: anEvent\x0a\x09<if(anEvent.ctrlKey) {\x0a\x09\x09if(anEvent.keyCode === 80) { //ctrl+p\x0a\x09\x09\x09self._printIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 68) { //ctrl+d\x0a\x09\x09\x09self._doIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 73) { //ctrl+i\x0a\x09\x09\x09self._inspectIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09}>",
  893. referencedClasses: [],
  894. //>>excludeEnd("ide");
  895. messageSends: []
  896. }),
  897. $globals.SourceArea);
  898. $core.addMethod(
  899. $core.method({
  900. selector: "inspectIt",
  901. protocol: 'actions',
  902. fn: function (){
  903. var self=this;
  904. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  905. return $core.withContext(function($ctx1) {
  906. //>>excludeEnd("ctx");
  907. $recv(self._doIt())._inspect();
  908. return self;
  909. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  910. }, function($ctx1) {$ctx1.fill(self,"inspectIt",{},$globals.SourceArea)});
  911. //>>excludeEnd("ctx");
  912. },
  913. //>>excludeStart("ide", pragmas.excludeIdeData);
  914. args: [],
  915. source: "inspectIt\x0a\x09self doIt inspect",
  916. referencedClasses: [],
  917. //>>excludeEnd("ide");
  918. messageSends: ["inspect", "doIt"]
  919. }),
  920. $globals.SourceArea);
  921. $core.addMethod(
  922. $core.method({
  923. selector: "onDoIt",
  924. protocol: 'accessing',
  925. fn: function (){
  926. var self=this;
  927. return self["@onDoIt"];
  928. },
  929. //>>excludeStart("ide", pragmas.excludeIdeData);
  930. args: [],
  931. source: "onDoIt\x0a\x09^ onDoIt",
  932. referencedClasses: [],
  933. //>>excludeEnd("ide");
  934. messageSends: []
  935. }),
  936. $globals.SourceArea);
  937. $core.addMethod(
  938. $core.method({
  939. selector: "onDoIt:",
  940. protocol: 'accessing',
  941. fn: function (aBlock){
  942. var self=this;
  943. self["@onDoIt"]=aBlock;
  944. return self;
  945. },
  946. //>>excludeStart("ide", pragmas.excludeIdeData);
  947. args: ["aBlock"],
  948. source: "onDoIt: aBlock\x0a\x09onDoIt := aBlock",
  949. referencedClasses: [],
  950. //>>excludeEnd("ide");
  951. messageSends: []
  952. }),
  953. $globals.SourceArea);
  954. $core.addMethod(
  955. $core.method({
  956. selector: "onKeyDown:",
  957. protocol: 'events',
  958. fn: function (aBlock){
  959. var self=this;
  960. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  961. return $core.withContext(function($ctx1) {
  962. //>>excludeEnd("ctx");
  963. $recv(self["@div"])._onKeyDown_(aBlock);
  964. return self;
  965. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  966. }, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{aBlock:aBlock},$globals.SourceArea)});
  967. //>>excludeEnd("ctx");
  968. },
  969. //>>excludeStart("ide", pragmas.excludeIdeData);
  970. args: ["aBlock"],
  971. source: "onKeyDown: aBlock\x0a\x09div onKeyDown: aBlock",
  972. referencedClasses: [],
  973. //>>excludeEnd("ide");
  974. messageSends: ["onKeyDown:"]
  975. }),
  976. $globals.SourceArea);
  977. $core.addMethod(
  978. $core.method({
  979. selector: "onKeyUp:",
  980. protocol: 'events',
  981. fn: function (aBlock){
  982. var self=this;
  983. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  984. return $core.withContext(function($ctx1) {
  985. //>>excludeEnd("ctx");
  986. $recv(self["@div"])._onKeyUp_(aBlock);
  987. return self;
  988. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  989. }, function($ctx1) {$ctx1.fill(self,"onKeyUp:",{aBlock:aBlock},$globals.SourceArea)});
  990. //>>excludeEnd("ctx");
  991. },
  992. //>>excludeStart("ide", pragmas.excludeIdeData);
  993. args: ["aBlock"],
  994. source: "onKeyUp: aBlock\x0a\x09div onKeyUp: aBlock",
  995. referencedClasses: [],
  996. //>>excludeEnd("ide");
  997. messageSends: ["onKeyUp:"]
  998. }),
  999. $globals.SourceArea);
  1000. $core.addMethod(
  1001. $core.method({
  1002. selector: "print:",
  1003. protocol: 'actions',
  1004. fn: function (aString){
  1005. var self=this;
  1006. var start,stop,currentLine;
  1007. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1008. return $core.withContext(function($ctx1) {
  1009. //>>excludeEnd("ctx");
  1010. var $1,$2,$4,$3,$5,$6,$7,$8,$9,$10,$12,$11;
  1011. $1=$recv(self["@editor"])._getCursor_(false);
  1012. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1013. $ctx1.sendIdx["getCursor:"]=1;
  1014. //>>excludeEnd("ctx");
  1015. currentLine=$recv($1)._line();
  1016. start=$recv($globals.HashedCollection)._new();
  1017. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1018. $ctx1.sendIdx["new"]=1;
  1019. //>>excludeEnd("ctx");
  1020. $recv(start)._at_put_("line",currentLine);
  1021. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1022. $ctx1.sendIdx["at:put:"]=1;
  1023. //>>excludeEnd("ctx");
  1024. $2=start;
  1025. $4=$recv(self["@editor"])._getCursor_(false);
  1026. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1027. $ctx1.sendIdx["getCursor:"]=2;
  1028. //>>excludeEnd("ctx");
  1029. $3=$recv($4)._ch();
  1030. $recv($2)._at_put_("ch",$3);
  1031. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1032. $ctx1.sendIdx["at:put:"]=2;
  1033. //>>excludeEnd("ctx");
  1034. $5=$recv(self["@editor"])._getSelection();
  1035. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1036. $ctx1.sendIdx["getSelection"]=1;
  1037. //>>excludeEnd("ctx");
  1038. $recv($5)._ifEmpty_((function(){
  1039. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1040. return $core.withContext(function($ctx2) {
  1041. //>>excludeEnd("ctx");
  1042. $6=start;
  1043. $7=$recv($recv(self["@editor"])._getLine_(currentLine))._size();
  1044. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1045. $ctx2.sendIdx["size"]=1;
  1046. //>>excludeEnd("ctx");
  1047. $recv($6)._at_put_("ch",$7);
  1048. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1049. $ctx2.sendIdx["at:put:"]=3;
  1050. //>>excludeEnd("ctx");
  1051. return $recv(self["@editor"])._setSelection_end_($globals.HashedCollection._newFromPairs_(["line",currentLine,"ch",(0)]),start);
  1052. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1053. $ctx2.sendIdx["setSelection:end:"]=1;
  1054. //>>excludeEnd("ctx");
  1055. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1056. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1057. //>>excludeEnd("ctx");
  1058. }));
  1059. stop=$recv($globals.HashedCollection)._new();
  1060. $recv(stop)._at_put_("line",currentLine);
  1061. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1062. $ctx1.sendIdx["at:put:"]=4;
  1063. //>>excludeEnd("ctx");
  1064. $8=stop;
  1065. $9=$recv($recv($recv(start)._at_("ch")).__plus($recv(aString)._size())).__plus((2));
  1066. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1067. $ctx1.sendIdx["+"]=1;
  1068. //>>excludeEnd("ctx");
  1069. $recv($8)._at_put_("ch",$9);
  1070. $10=self["@editor"];
  1071. $12=$recv($recv($recv(self["@editor"])._getSelection()).__comma(" ")).__comma(aString);
  1072. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1073. $ctx1.sendIdx[","]=2;
  1074. //>>excludeEnd("ctx");
  1075. $11=$recv($12).__comma(" ");
  1076. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1077. $ctx1.sendIdx[","]=1;
  1078. //>>excludeEnd("ctx");
  1079. $recv($10)._replaceSelection_($11);
  1080. $recv(self["@editor"])._setCursor_($recv(self["@editor"])._getCursor_(true));
  1081. $recv(self["@editor"])._setSelection_end_(stop,start);
  1082. return self;
  1083. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1084. }, function($ctx1) {$ctx1.fill(self,"print:",{aString:aString,start:start,stop:stop,currentLine:currentLine},$globals.SourceArea)});
  1085. //>>excludeEnd("ctx");
  1086. },
  1087. //>>excludeStart("ide", pragmas.excludeIdeData);
  1088. args: ["aString"],
  1089. source: "print: aString\x0a\x09| start stop currentLine |\x0a\x09currentLine := (editor getCursor: false) line.\x0a\x09start := HashedCollection new.\x0a\x09start at: 'line' put: currentLine.\x0a\x09start at: 'ch' put: (editor getCursor: false) ch.\x0a\x09(editor getSelection) ifEmpty: [\x0a\x09\x09\x22select current line if selection is empty\x22\x0a\x09\x09start at: 'ch' put: (editor getLine: currentLine) size.\x0a\x09\x09editor setSelection: #{'line' -> currentLine. 'ch' -> 0} end: start.\x0a\x09].\x0a\x09stop := HashedCollection new.\x0a\x09stop at: 'line' put: currentLine.\x0a\x09stop at: 'ch' put: ((start at: 'ch') + aString size + 2).\x0a\x0a\x09editor replaceSelection: (editor getSelection, ' ', aString, ' ').\x0a\x09editor setCursor: (editor getCursor: true).\x0a\x09editor setSelection: stop end: start",
  1090. referencedClasses: ["HashedCollection"],
  1091. //>>excludeEnd("ide");
  1092. messageSends: ["line", "getCursor:", "new", "at:put:", "ch", "ifEmpty:", "getSelection", "size", "getLine:", "setSelection:end:", "+", "at:", "replaceSelection:", ",", "setCursor:"]
  1093. }),
  1094. $globals.SourceArea);
  1095. $core.addMethod(
  1096. $core.method({
  1097. selector: "printIt",
  1098. protocol: 'actions',
  1099. fn: function (){
  1100. var self=this;
  1101. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1102. return $core.withContext(function($ctx1) {
  1103. //>>excludeEnd("ctx");
  1104. self._print_($recv(self._doIt())._printString());
  1105. self._focus();
  1106. return self;
  1107. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1108. }, function($ctx1) {$ctx1.fill(self,"printIt",{},$globals.SourceArea)});
  1109. //>>excludeEnd("ctx");
  1110. },
  1111. //>>excludeStart("ide", pragmas.excludeIdeData);
  1112. args: [],
  1113. source: "printIt\x0a\x09self print: self doIt printString.\x0a\x09self focus.",
  1114. referencedClasses: [],
  1115. //>>excludeEnd("ide");
  1116. messageSends: ["print:", "printString", "doIt", "focus"]
  1117. }),
  1118. $globals.SourceArea);
  1119. $core.addMethod(
  1120. $core.method({
  1121. selector: "receiver",
  1122. protocol: 'accessing',
  1123. fn: function (){
  1124. var self=this;
  1125. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1126. return $core.withContext(function($ctx1) {
  1127. //>>excludeEnd("ctx");
  1128. var $1,$receiver;
  1129. $1=self["@receiver"];
  1130. if(($receiver = $1) == null || $receiver.isNil){
  1131. return $recv($globals.DoIt)._new();
  1132. } else {
  1133. return $1;
  1134. };
  1135. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1136. }, function($ctx1) {$ctx1.fill(self,"receiver",{},$globals.SourceArea)});
  1137. //>>excludeEnd("ctx");
  1138. },
  1139. //>>excludeStart("ide", pragmas.excludeIdeData);
  1140. args: [],
  1141. source: "receiver\x0a\x09^ receiver ifNil: [ DoIt new ]",
  1142. referencedClasses: ["DoIt"],
  1143. //>>excludeEnd("ide");
  1144. messageSends: ["ifNil:", "new"]
  1145. }),
  1146. $globals.SourceArea);
  1147. $core.addMethod(
  1148. $core.method({
  1149. selector: "receiver:",
  1150. protocol: 'accessing',
  1151. fn: function (anObject){
  1152. var self=this;
  1153. self["@receiver"]=anObject;
  1154. return self;
  1155. },
  1156. //>>excludeStart("ide", pragmas.excludeIdeData);
  1157. args: ["anObject"],
  1158. source: "receiver: anObject\x0a\x09receiver := anObject",
  1159. referencedClasses: [],
  1160. //>>excludeEnd("ide");
  1161. messageSends: []
  1162. }),
  1163. $globals.SourceArea);
  1164. $core.addMethod(
  1165. $core.method({
  1166. selector: "renderOn:",
  1167. protocol: 'rendering',
  1168. fn: function (html){
  1169. var self=this;
  1170. var textarea;
  1171. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1172. return $core.withContext(function($ctx1) {
  1173. //>>excludeEnd("ctx");
  1174. self["@div"]=$recv($recv(html)._div())._class_("source");
  1175. $recv(self["@div"])._with_((function(){
  1176. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1177. return $core.withContext(function($ctx2) {
  1178. //>>excludeEnd("ctx");
  1179. textarea=$recv(html)._textarea();
  1180. return textarea;
  1181. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1182. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1183. //>>excludeEnd("ctx");
  1184. }));
  1185. self._setEditorOn_($recv(textarea)._element());
  1186. $recv(self["@div"])._onKeyDown_((function(e){
  1187. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1188. return $core.withContext(function($ctx2) {
  1189. //>>excludeEnd("ctx");
  1190. return self._handleKeyDown_(e);
  1191. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1192. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,2)});
  1193. //>>excludeEnd("ctx");
  1194. }));
  1195. return self;
  1196. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1197. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,textarea:textarea},$globals.SourceArea)});
  1198. //>>excludeEnd("ctx");
  1199. },
  1200. //>>excludeStart("ide", pragmas.excludeIdeData);
  1201. args: ["html"],
  1202. source: "renderOn: html\x0a\x09| textarea |\x0a\x09div := html div class: 'source'.\x0a\x09div with: [ textarea := html textarea ].\x0a\x09self setEditorOn: textarea element.\x0a\x09div onKeyDown: [ :e | self handleKeyDown: e ]",
  1203. referencedClasses: [],
  1204. //>>excludeEnd("ide");
  1205. messageSends: ["class:", "div", "with:", "textarea", "setEditorOn:", "element", "onKeyDown:", "handleKeyDown:"]
  1206. }),
  1207. $globals.SourceArea);
  1208. $core.addMethod(
  1209. $core.method({
  1210. selector: "selection",
  1211. protocol: 'accessing',
  1212. fn: function (){
  1213. var self=this;
  1214. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1215. return $core.withContext(function($ctx1) {
  1216. //>>excludeEnd("ctx");
  1217. return $recv(self["@editor"])._getSelection();
  1218. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1219. }, function($ctx1) {$ctx1.fill(self,"selection",{},$globals.SourceArea)});
  1220. //>>excludeEnd("ctx");
  1221. },
  1222. //>>excludeStart("ide", pragmas.excludeIdeData);
  1223. args: [],
  1224. source: "selection\x0a\x09^ editor getSelection",
  1225. referencedClasses: [],
  1226. //>>excludeEnd("ide");
  1227. messageSends: ["getSelection"]
  1228. }),
  1229. $globals.SourceArea);
  1230. $core.addMethod(
  1231. $core.method({
  1232. selector: "setEditorOn:",
  1233. protocol: 'accessing',
  1234. fn: function (aTextarea){
  1235. var self=this;
  1236. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1237. return $core.withContext(function($ctx1) {
  1238. //>>excludeEnd("ctx");
  1239. self['@editor'] = self._class()._codeMirror().fromTextArea(aTextarea, {
  1240. theme: 'ide.codeMirrorTheme'._settingValueIfAbsent_('default'),
  1241. mode: 'text/x-stsrc',
  1242. lineNumbers: true,
  1243. enterMode: 'flat',
  1244. indentWithTabs: true,
  1245. indentUnit: 4,
  1246. matchBrackets: true,
  1247. electricChars: false
  1248. });
  1249. return self;
  1250. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1251. }, function($ctx1) {$ctx1.fill(self,"setEditorOn:",{aTextarea:aTextarea},$globals.SourceArea)});
  1252. //>>excludeEnd("ctx");
  1253. },
  1254. //>>excludeStart("ide", pragmas.excludeIdeData);
  1255. args: ["aTextarea"],
  1256. source: "setEditorOn: aTextarea\x0a\x09<self['@editor'] = self._class()._codeMirror().fromTextArea(aTextarea, {\x0a\x09\x09theme: 'ide.codeMirrorTheme'._settingValueIfAbsent_('default'),\x0a\x09\x09mode: 'text/x-stsrc',\x0a\x09\x09lineNumbers: true,\x0a\x09\x09enterMode: 'flat',\x0a\x09\x09indentWithTabs: true,\x0a\x09\x09indentUnit: 4,\x0a\x09\x09matchBrackets: true,\x0a\x09\x09electricChars: false\x0a\x09})>",
  1257. referencedClasses: [],
  1258. //>>excludeEnd("ide");
  1259. messageSends: []
  1260. }),
  1261. $globals.SourceArea);
  1262. $core.addMethod(
  1263. $core.method({
  1264. selector: "val",
  1265. protocol: 'accessing',
  1266. fn: function (){
  1267. var self=this;
  1268. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1269. return $core.withContext(function($ctx1) {
  1270. //>>excludeEnd("ctx");
  1271. return $recv(self["@editor"])._getValue();
  1272. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1273. }, function($ctx1) {$ctx1.fill(self,"val",{},$globals.SourceArea)});
  1274. //>>excludeEnd("ctx");
  1275. },
  1276. //>>excludeStart("ide", pragmas.excludeIdeData);
  1277. args: [],
  1278. source: "val\x0a\x09^ editor getValue",
  1279. referencedClasses: [],
  1280. //>>excludeEnd("ide");
  1281. messageSends: ["getValue"]
  1282. }),
  1283. $globals.SourceArea);
  1284. $core.addMethod(
  1285. $core.method({
  1286. selector: "val:",
  1287. protocol: 'accessing',
  1288. fn: function (aString){
  1289. var self=this;
  1290. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1291. return $core.withContext(function($ctx1) {
  1292. //>>excludeEnd("ctx");
  1293. $recv(self["@editor"])._setValue_(aString);
  1294. return self;
  1295. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1296. }, function($ctx1) {$ctx1.fill(self,"val:",{aString:aString},$globals.SourceArea)});
  1297. //>>excludeEnd("ctx");
  1298. },
  1299. //>>excludeStart("ide", pragmas.excludeIdeData);
  1300. args: ["aString"],
  1301. source: "val: aString\x0a\x09editor setValue: aString",
  1302. referencedClasses: [],
  1303. //>>excludeEnd("ide");
  1304. messageSends: ["setValue:"]
  1305. }),
  1306. $globals.SourceArea);
  1307. $core.addMethod(
  1308. $core.method({
  1309. selector: "codeMirror",
  1310. protocol: 'accessing',
  1311. fn: function (){
  1312. var self=this;
  1313. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1314. return $core.withContext(function($ctx1) {
  1315. //>>excludeEnd("ctx");
  1316. return $recv(require)._value_("codemirror/lib/codemirror");
  1317. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1318. }, function($ctx1) {$ctx1.fill(self,"codeMirror",{},$globals.SourceArea.klass)});
  1319. //>>excludeEnd("ctx");
  1320. },
  1321. //>>excludeStart("ide", pragmas.excludeIdeData);
  1322. args: [],
  1323. source: "codeMirror\x0a\x09^ require value: 'codemirror/lib/codemirror'",
  1324. referencedClasses: [],
  1325. //>>excludeEnd("ide");
  1326. messageSends: ["value:"]
  1327. }),
  1328. $globals.SourceArea.klass);
  1329. $core.addMethod(
  1330. $core.method({
  1331. selector: "initialize",
  1332. protocol: 'initialization',
  1333. fn: function (){
  1334. var self=this;
  1335. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1336. return $core.withContext(function($ctx1) {
  1337. //>>excludeEnd("ctx");
  1338. (
  1339. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1340. $ctx1.supercall = true,
  1341. //>>excludeEnd("ctx");
  1342. ($globals.SourceArea.klass.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
  1343. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1344. $ctx1.supercall = false;
  1345. //>>excludeEnd("ctx");;
  1346. self._setupCodeMirror();
  1347. return self;
  1348. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1349. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.SourceArea.klass)});
  1350. //>>excludeEnd("ctx");
  1351. },
  1352. //>>excludeStart("ide", pragmas.excludeIdeData);
  1353. args: [],
  1354. source: "initialize\x0a\x09super initialize.\x0a\x09self setupCodeMirror",
  1355. referencedClasses: [],
  1356. //>>excludeEnd("ide");
  1357. messageSends: ["initialize", "setupCodeMirror"]
  1358. }),
  1359. $globals.SourceArea.klass);
  1360. $core.addMethod(
  1361. $core.method({
  1362. selector: "setupCodeMirror",
  1363. protocol: 'initialization',
  1364. fn: function (){
  1365. var self=this;
  1366. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1367. return $core.withContext(function($ctx1) {
  1368. //>>excludeEnd("ctx");
  1369. self._codeMirror().keyMap["default"].fallthrough = ["basic"] ;
  1370. return self;
  1371. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1372. }, function($ctx1) {$ctx1.fill(self,"setupCodeMirror",{},$globals.SourceArea.klass)});
  1373. //>>excludeEnd("ctx");
  1374. },
  1375. //>>excludeStart("ide", pragmas.excludeIdeData);
  1376. args: [],
  1377. source: "setupCodeMirror\x0a\x09< self._codeMirror().keyMap[\x22default\x22].fallthrough = [\x22basic\x22] >",
  1378. referencedClasses: [],
  1379. //>>excludeEnd("ide");
  1380. messageSends: []
  1381. }),
  1382. $globals.SourceArea.klass);
  1383. $core.addClass('TabManager', $globals.Widget, ['selectedTab', 'tabs', 'opened', 'ul', 'input'], 'IDE');
  1384. $core.addMethod(
  1385. $core.method({
  1386. selector: "addTab:",
  1387. protocol: 'adding/Removing',
  1388. fn: function (aWidget){
  1389. var self=this;
  1390. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1391. return $core.withContext(function($ctx1) {
  1392. //>>excludeEnd("ctx");
  1393. $recv(self._tabs())._add_(aWidget);
  1394. $recv(aWidget)._appendToJQuery_("#amber"._asJQuery());
  1395. $recv(aWidget)._hide();
  1396. return self;
  1397. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1398. }, function($ctx1) {$ctx1.fill(self,"addTab:",{aWidget:aWidget},$globals.TabManager)});
  1399. //>>excludeEnd("ctx");
  1400. },
  1401. //>>excludeStart("ide", pragmas.excludeIdeData);
  1402. args: ["aWidget"],
  1403. source: "addTab: aWidget\x0a\x09self tabs add: aWidget.\x0a\x09aWidget appendToJQuery: '#amber' asJQuery.\x0a\x09aWidget hide",
  1404. referencedClasses: [],
  1405. //>>excludeEnd("ide");
  1406. messageSends: ["add:", "tabs", "appendToJQuery:", "asJQuery", "hide"]
  1407. }),
  1408. $globals.TabManager);
  1409. $core.addMethod(
  1410. $core.method({
  1411. selector: "close",
  1412. protocol: 'actions',
  1413. fn: function (){
  1414. var self=this;
  1415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1416. return $core.withContext(function($ctx1) {
  1417. //>>excludeEnd("ctx");
  1418. var $1,$2,$3;
  1419. $1=self["@opened"];
  1420. if($core.assert($1)){
  1421. $2="#amber"._asJQuery();
  1422. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1423. $ctx1.sendIdx["asJQuery"]=1;
  1424. //>>excludeEnd("ctx");
  1425. $recv($2)._hide();
  1426. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1427. $ctx1.sendIdx["hide"]=1;
  1428. //>>excludeEnd("ctx");
  1429. $3=$recv(self["@ul"])._asJQuery();
  1430. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1431. $ctx1.sendIdx["asJQuery"]=2;
  1432. //>>excludeEnd("ctx");
  1433. $recv($3)._hide();
  1434. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1435. $ctx1.sendIdx["hide"]=2;
  1436. //>>excludeEnd("ctx");
  1437. $recv(self["@selectedTab"])._hide();
  1438. self._removeBodyMargin();
  1439. $recv("body"._asJQuery())._removeClass_("amberBody");
  1440. self["@opened"]=false;
  1441. self["@opened"];
  1442. };
  1443. return self;
  1444. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1445. }, function($ctx1) {$ctx1.fill(self,"close",{},$globals.TabManager)});
  1446. //>>excludeEnd("ctx");
  1447. },
  1448. //>>excludeStart("ide", pragmas.excludeIdeData);
  1449. args: [],
  1450. source: "close\x0a\x09opened ifTrue: [\x0a\x09'#amber' asJQuery hide.\x0a\x09ul asJQuery hide.\x0a\x09selectedTab hide.\x0a\x09self removeBodyMargin.\x0a\x09'body' asJQuery removeClass: 'amberBody'.\x0a\x09opened := false ]",
  1451. referencedClasses: [],
  1452. //>>excludeEnd("ide");
  1453. messageSends: ["ifTrue:", "hide", "asJQuery", "removeBodyMargin", "removeClass:"]
  1454. }),
  1455. $globals.TabManager);
  1456. $core.addMethod(
  1457. $core.method({
  1458. selector: "closeTab:",
  1459. protocol: 'actions',
  1460. fn: function (aWidget){
  1461. var self=this;
  1462. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1463. return $core.withContext(function($ctx1) {
  1464. //>>excludeEnd("ctx");
  1465. self._removeTab_(aWidget);
  1466. self._selectTab_($recv(self._tabs())._last());
  1467. $recv(aWidget)._remove();
  1468. self._update();
  1469. return self;
  1470. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1471. }, function($ctx1) {$ctx1.fill(self,"closeTab:",{aWidget:aWidget},$globals.TabManager)});
  1472. //>>excludeEnd("ctx");
  1473. },
  1474. //>>excludeStart("ide", pragmas.excludeIdeData);
  1475. args: ["aWidget"],
  1476. source: "closeTab: aWidget\x0a\x09self removeTab: aWidget.\x0a\x09self selectTab: self tabs last.\x0a\x09aWidget remove.\x0a\x09self update",
  1477. referencedClasses: [],
  1478. //>>excludeEnd("ide");
  1479. messageSends: ["removeTab:", "selectTab:", "last", "tabs", "remove", "update"]
  1480. }),
  1481. $globals.TabManager);
  1482. $core.addMethod(
  1483. $core.method({
  1484. selector: "initialize",
  1485. protocol: 'initialization',
  1486. fn: function (){
  1487. var self=this;
  1488. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1489. return $core.withContext(function($ctx1) {
  1490. //>>excludeEnd("ctx");
  1491. var $1,$2,$3,$4,$5;
  1492. (
  1493. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1494. $ctx1.supercall = true,
  1495. //>>excludeEnd("ctx");
  1496. ($globals.TabManager.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
  1497. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1498. $ctx1.supercall = false;
  1499. //>>excludeEnd("ctx");;
  1500. $recv($globals.Inspector)._register_($globals.IDEInspector);
  1501. self["@opened"]=true;
  1502. $1=(function(html){
  1503. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1504. return $core.withContext(function($ctx2) {
  1505. //>>excludeEnd("ctx");
  1506. return $recv($recv(html)._div())._id_("amber");
  1507. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1508. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  1509. //>>excludeEnd("ctx");
  1510. });
  1511. $2="body"._asJQuery();
  1512. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1513. $ctx1.sendIdx["asJQuery"]=1;
  1514. //>>excludeEnd("ctx");
  1515. $recv($1)._appendToJQuery_($2);
  1516. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1517. $ctx1.sendIdx["appendToJQuery:"]=1;
  1518. //>>excludeEnd("ctx");
  1519. $3="body"._asJQuery();
  1520. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1521. $ctx1.sendIdx["asJQuery"]=2;
  1522. //>>excludeEnd("ctx");
  1523. $recv($3)._addClass_("amberBody");
  1524. self._appendToJQuery_("#amber"._asJQuery());
  1525. self._addTab_($recv($globals.IDETranscript)._current());
  1526. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1527. $ctx1.sendIdx["addTab:"]=1;
  1528. //>>excludeEnd("ctx");
  1529. $4=$recv($globals.Workspace)._new();
  1530. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1531. $ctx1.sendIdx["new"]=1;
  1532. //>>excludeEnd("ctx");
  1533. self._addTab_($4);
  1534. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1535. $ctx1.sendIdx["addTab:"]=2;
  1536. //>>excludeEnd("ctx");
  1537. self._addTab_($recv($globals.TestRunner)._new());
  1538. self._selectTab_($recv(self._tabs())._last());
  1539. self._onResize_((function(){
  1540. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1541. return $core.withContext(function($ctx2) {
  1542. //>>excludeEnd("ctx");
  1543. self._updateBodyMargin();
  1544. $5=self._updatePosition();
  1545. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1546. $ctx2.sendIdx["updatePosition"]=1;
  1547. //>>excludeEnd("ctx");
  1548. return $5;
  1549. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1550. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1551. //>>excludeEnd("ctx");
  1552. }));
  1553. self._onWindowResize_((function(){
  1554. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1555. return $core.withContext(function($ctx2) {
  1556. //>>excludeEnd("ctx");
  1557. return self._updatePosition();
  1558. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1559. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  1560. //>>excludeEnd("ctx");
  1561. }));
  1562. return self;
  1563. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1564. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.TabManager)});
  1565. //>>excludeEnd("ctx");
  1566. },
  1567. //>>excludeStart("ide", pragmas.excludeIdeData);
  1568. args: [],
  1569. source: "initialize\x0a\x09super initialize.\x0a\x09Inspector register: IDEInspector.\x0a\x09opened := true.\x0a\x09[ :html | html div id: 'amber' ] appendToJQuery: 'body' asJQuery.\x0a\x09'body' asJQuery\x0a\x09addClass: 'amberBody'.\x0a\x09self appendToJQuery: '#amber' asJQuery.\x0a\x09self\x0a\x09addTab: IDETranscript current;\x0a\x09addTab: Workspace new;\x0a\x09addTab: TestRunner new.\x0a\x09self selectTab: self tabs last.\x0a\x09self\x0a\x09onResize: [ self updateBodyMargin; updatePosition ];\x0a\x09onWindowResize: [ self updatePosition ]",
  1570. referencedClasses: ["Inspector", "IDEInspector", "IDETranscript", "Workspace", "TestRunner"],
  1571. //>>excludeEnd("ide");
  1572. messageSends: ["initialize", "register:", "appendToJQuery:", "id:", "div", "asJQuery", "addClass:", "addTab:", "current", "new", "selectTab:", "last", "tabs", "onResize:", "updateBodyMargin", "updatePosition", "onWindowResize:"]
  1573. }),
  1574. $globals.TabManager);
  1575. $core.addMethod(
  1576. $core.method({
  1577. selector: "labelFor:",
  1578. protocol: 'accessing',
  1579. fn: function (aWidget){
  1580. var self=this;
  1581. var label,maxSize;
  1582. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1583. return $core.withContext(function($ctx1) {
  1584. //>>excludeEnd("ctx");
  1585. var $1,$4,$3,$2,$5;
  1586. maxSize=(15);
  1587. $1=$recv(aWidget)._label();
  1588. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1589. $ctx1.sendIdx["label"]=1;
  1590. //>>excludeEnd("ctx");
  1591. $4=$recv(aWidget)._label();
  1592. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1593. $ctx1.sendIdx["label"]=2;
  1594. //>>excludeEnd("ctx");
  1595. $3=$recv($4)._size();
  1596. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1597. $ctx1.sendIdx["size"]=1;
  1598. //>>excludeEnd("ctx");
  1599. $2=$recv($3)._min_(maxSize);
  1600. label=$recv($1)._copyFrom_to_((0),$2);
  1601. $5=$recv($recv($recv(aWidget)._label())._size()).__gt(maxSize);
  1602. if($core.assert($5)){
  1603. label=$recv(label).__comma("...");
  1604. label;
  1605. };
  1606. return label;
  1607. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1608. }, function($ctx1) {$ctx1.fill(self,"labelFor:",{aWidget:aWidget,label:label,maxSize:maxSize},$globals.TabManager)});
  1609. //>>excludeEnd("ctx");
  1610. },
  1611. //>>excludeStart("ide", pragmas.excludeIdeData);
  1612. args: ["aWidget"],
  1613. source: "labelFor: aWidget\x0a\x09| label maxSize |\x0a\x09maxSize := 15.\x0a\x09label := aWidget label copyFrom: 0 to: (aWidget label size min: maxSize).\x0a\x09aWidget label size > maxSize ifTrue: [\x0a\x09\x09label := label, '...' ].\x0a\x09^ label",
  1614. referencedClasses: [],
  1615. //>>excludeEnd("ide");
  1616. messageSends: ["copyFrom:to:", "label", "min:", "size", "ifTrue:", ">", ","]
  1617. }),
  1618. $globals.TabManager);
  1619. $core.addMethod(
  1620. $core.method({
  1621. selector: "newBrowserTab",
  1622. protocol: 'actions',
  1623. fn: function (){
  1624. var self=this;
  1625. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1626. return $core.withContext(function($ctx1) {
  1627. //>>excludeEnd("ctx");
  1628. $recv($globals.Browser)._open();
  1629. return self;
  1630. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1631. }, function($ctx1) {$ctx1.fill(self,"newBrowserTab",{},$globals.TabManager)});
  1632. //>>excludeEnd("ctx");
  1633. },
  1634. //>>excludeStart("ide", pragmas.excludeIdeData);
  1635. args: [],
  1636. source: "newBrowserTab\x0a\x09Browser open",
  1637. referencedClasses: ["Browser"],
  1638. //>>excludeEnd("ide");
  1639. messageSends: ["open"]
  1640. }),
  1641. $globals.TabManager);
  1642. $core.addMethod(
  1643. $core.method({
  1644. selector: "onResize:",
  1645. protocol: 'actions',
  1646. fn: function (aBlock){
  1647. var self=this;
  1648. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1649. return $core.withContext(function($ctx1) {
  1650. //>>excludeEnd("ctx");
  1651. $recv("#amber"._asJQuery())._resizable_($globals.HashedCollection._newFromPairs_(["handles","n","resize",aBlock,"minHeight",(230)]));
  1652. return self;
  1653. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1654. }, function($ctx1) {$ctx1.fill(self,"onResize:",{aBlock:aBlock},$globals.TabManager)});
  1655. //>>excludeEnd("ctx");
  1656. },
  1657. //>>excludeStart("ide", pragmas.excludeIdeData);
  1658. args: ["aBlock"],
  1659. source: "onResize: aBlock\x0a\x09'#amber' asJQuery resizable: #{\x0a\x09\x09'handles' -> 'n'.\x0a\x09\x09'resize' -> aBlock.\x0a\x09\x09'minHeight' -> 230\x0a\x09}",
  1660. referencedClasses: [],
  1661. //>>excludeEnd("ide");
  1662. messageSends: ["resizable:", "asJQuery"]
  1663. }),
  1664. $globals.TabManager);
  1665. $core.addMethod(
  1666. $core.method({
  1667. selector: "onWindowResize:",
  1668. protocol: 'actions',
  1669. fn: function (aBlock){
  1670. var self=this;
  1671. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1672. return $core.withContext(function($ctx1) {
  1673. //>>excludeEnd("ctx");
  1674. $recv($recv(window)._asJQuery())._resize_(aBlock);
  1675. return self;
  1676. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1677. }, function($ctx1) {$ctx1.fill(self,"onWindowResize:",{aBlock:aBlock},$globals.TabManager)});
  1678. //>>excludeEnd("ctx");
  1679. },
  1680. //>>excludeStart("ide", pragmas.excludeIdeData);
  1681. args: ["aBlock"],
  1682. source: "onWindowResize: aBlock\x0a\x09window asJQuery resize: aBlock",
  1683. referencedClasses: [],
  1684. //>>excludeEnd("ide");
  1685. messageSends: ["resize:", "asJQuery"]
  1686. }),
  1687. $globals.TabManager);
  1688. $core.addMethod(
  1689. $core.method({
  1690. selector: "open",
  1691. protocol: 'actions',
  1692. fn: function (){
  1693. var self=this;
  1694. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1695. return $core.withContext(function($ctx1) {
  1696. //>>excludeEnd("ctx");
  1697. var $1,$2,$3;
  1698. $1=self["@opened"];
  1699. if(!$core.assert($1)){
  1700. $2="body"._asJQuery();
  1701. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1702. $ctx1.sendIdx["asJQuery"]=1;
  1703. //>>excludeEnd("ctx");
  1704. $recv($2)._addClass_("amberBody");
  1705. $3="#amber"._asJQuery();
  1706. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1707. $ctx1.sendIdx["asJQuery"]=2;
  1708. //>>excludeEnd("ctx");
  1709. $recv($3)._show();
  1710. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1711. $ctx1.sendIdx["show"]=1;
  1712. //>>excludeEnd("ctx");
  1713. $recv($recv(self["@ul"])._asJQuery())._show();
  1714. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1715. $ctx1.sendIdx["show"]=2;
  1716. //>>excludeEnd("ctx");
  1717. self._updateBodyMargin();
  1718. $recv(self["@selectedTab"])._show();
  1719. self["@opened"]=true;
  1720. self["@opened"];
  1721. };
  1722. return self;
  1723. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1724. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.TabManager)});
  1725. //>>excludeEnd("ctx");
  1726. },
  1727. //>>excludeStart("ide", pragmas.excludeIdeData);
  1728. args: [],
  1729. source: "open\x0a\x09opened ifFalse: [\x0a\x09'body' asJQuery addClass: 'amberBody'.\x0a\x09'#amber' asJQuery show.\x0a\x09ul asJQuery show.\x0a\x09self updateBodyMargin.\x0a\x09selectedTab show.\x0a\x09opened := true ]",
  1730. referencedClasses: [],
  1731. //>>excludeEnd("ide");
  1732. messageSends: ["ifFalse:", "addClass:", "asJQuery", "show", "updateBodyMargin"]
  1733. }),
  1734. $globals.TabManager);
  1735. $core.addMethod(
  1736. $core.method({
  1737. selector: "removeBodyMargin",
  1738. protocol: 'actions',
  1739. fn: function (){
  1740. var self=this;
  1741. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1742. return $core.withContext(function($ctx1) {
  1743. //>>excludeEnd("ctx");
  1744. self._setBodyMargin_((0));
  1745. return self;
  1746. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1747. }, function($ctx1) {$ctx1.fill(self,"removeBodyMargin",{},$globals.TabManager)});
  1748. //>>excludeEnd("ctx");
  1749. },
  1750. //>>excludeStart("ide", pragmas.excludeIdeData);
  1751. args: [],
  1752. source: "removeBodyMargin\x0a\x09self setBodyMargin: 0",
  1753. referencedClasses: [],
  1754. //>>excludeEnd("ide");
  1755. messageSends: ["setBodyMargin:"]
  1756. }),
  1757. $globals.TabManager);
  1758. $core.addMethod(
  1759. $core.method({
  1760. selector: "removeTab:",
  1761. protocol: 'adding/Removing',
  1762. fn: function (aWidget){
  1763. var self=this;
  1764. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1765. return $core.withContext(function($ctx1) {
  1766. //>>excludeEnd("ctx");
  1767. $recv(self._tabs())._remove_(aWidget);
  1768. self._update();
  1769. return self;
  1770. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1771. }, function($ctx1) {$ctx1.fill(self,"removeTab:",{aWidget:aWidget},$globals.TabManager)});
  1772. //>>excludeEnd("ctx");
  1773. },
  1774. //>>excludeStart("ide", pragmas.excludeIdeData);
  1775. args: ["aWidget"],
  1776. source: "removeTab: aWidget\x0a\x09self tabs remove: aWidget.\x0a\x09self update",
  1777. referencedClasses: [],
  1778. //>>excludeEnd("ide");
  1779. messageSends: ["remove:", "tabs", "update"]
  1780. }),
  1781. $globals.TabManager);
  1782. $core.addMethod(
  1783. $core.method({
  1784. selector: "renderOn:",
  1785. protocol: 'rendering',
  1786. fn: function (html){
  1787. var self=this;
  1788. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1789. return $core.withContext(function($ctx1) {
  1790. //>>excludeEnd("ctx");
  1791. var $1;
  1792. $recv($recv(html)._div())._id_("logo");
  1793. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1794. $ctx1.sendIdx["id:"]=1;
  1795. //>>excludeEnd("ctx");
  1796. self._renderToolbarOn_(html);
  1797. $1=$recv(html)._ul();
  1798. $recv($1)._id_("amberTabs");
  1799. self["@ul"]=$recv($1)._yourself();
  1800. self._renderTabs();
  1801. return self;
  1802. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1803. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.TabManager)});
  1804. //>>excludeEnd("ctx");
  1805. },
  1806. //>>excludeStart("ide", pragmas.excludeIdeData);
  1807. args: ["html"],
  1808. source: "renderOn: html\x0a\x09html div id: 'logo'.\x0a\x09self renderToolbarOn: html.\x0a\x09ul := html ul\x0a\x09\x09id: 'amberTabs';\x0a\x09\x09yourself.\x0a\x09self renderTabs",
  1809. referencedClasses: [],
  1810. //>>excludeEnd("ide");
  1811. messageSends: ["id:", "div", "renderToolbarOn:", "ul", "yourself", "renderTabs"]
  1812. }),
  1813. $globals.TabManager);
  1814. $core.addMethod(
  1815. $core.method({
  1816. selector: "renderTabFor:on:",
  1817. protocol: 'rendering',
  1818. fn: function (aWidget,html){
  1819. var self=this;
  1820. var li;
  1821. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1822. return $core.withContext(function($ctx1) {
  1823. //>>excludeEnd("ctx");
  1824. var $1,$2,$3,$4,$6,$7,$8,$9,$5;
  1825. li=$recv(html)._li();
  1826. $1=$recv(self["@selectedTab"]).__eq(aWidget);
  1827. if($core.assert($1)){
  1828. $recv(li)._class_("selected");
  1829. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1830. $ctx1.sendIdx["class:"]=1;
  1831. //>>excludeEnd("ctx");
  1832. };
  1833. $2=li;
  1834. $recv($2)._with_((function(){
  1835. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1836. return $core.withContext(function($ctx2) {
  1837. //>>excludeEnd("ctx");
  1838. $3=$recv(html)._span();
  1839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1840. $ctx2.sendIdx["span"]=1;
  1841. //>>excludeEnd("ctx");
  1842. $recv($3)._class_("ltab");
  1843. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1844. $ctx2.sendIdx["class:"]=2;
  1845. //>>excludeEnd("ctx");
  1846. $4=$recv(html)._span();
  1847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1848. $ctx2.sendIdx["span"]=2;
  1849. //>>excludeEnd("ctx");
  1850. $recv($4)._class_("mtab");
  1851. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1852. $ctx2.sendIdx["class:"]=3;
  1853. //>>excludeEnd("ctx");
  1854. $5=$recv($4)._with_((function(){
  1855. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1856. return $core.withContext(function($ctx3) {
  1857. //>>excludeEnd("ctx");
  1858. $6=$recv(aWidget)._canBeClosed();
  1859. if($core.assert($6)){
  1860. $7=$recv(html)._span();
  1861. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1862. $ctx3.sendIdx["span"]=3;
  1863. //>>excludeEnd("ctx");
  1864. $recv($7)._class_("close");
  1865. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1866. $ctx3.sendIdx["class:"]=4;
  1867. //>>excludeEnd("ctx");
  1868. $recv($7)._with_("x");
  1869. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1870. $ctx3.sendIdx["with:"]=3;
  1871. //>>excludeEnd("ctx");
  1872. $8=$recv($7)._onClick_((function(){
  1873. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1874. return $core.withContext(function($ctx4) {
  1875. //>>excludeEnd("ctx");
  1876. return self._closeTab_(aWidget);
  1877. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1878. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  1879. //>>excludeEnd("ctx");
  1880. }));
  1881. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1882. $ctx3.sendIdx["onClick:"]=1;
  1883. //>>excludeEnd("ctx");
  1884. $8;
  1885. };
  1886. $9=$recv(html)._span();
  1887. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1888. $ctx3.sendIdx["span"]=4;
  1889. //>>excludeEnd("ctx");
  1890. return $recv($9)._with_(self._labelFor_(aWidget));
  1891. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1892. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  1893. //>>excludeEnd("ctx");
  1894. }));
  1895. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1896. $ctx2.sendIdx["with:"]=2;
  1897. //>>excludeEnd("ctx");
  1898. $5;
  1899. return $recv($recv(html)._span())._class_("rtab");
  1900. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1901. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1902. //>>excludeEnd("ctx");
  1903. }));
  1904. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1905. $ctx1.sendIdx["with:"]=1;
  1906. //>>excludeEnd("ctx");
  1907. $recv($2)._onClick_((function(){
  1908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1909. return $core.withContext(function($ctx2) {
  1910. //>>excludeEnd("ctx");
  1911. return self._selectTab_(aWidget);
  1912. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1913. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
  1914. //>>excludeEnd("ctx");
  1915. }));
  1916. return self;
  1917. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1918. }, function($ctx1) {$ctx1.fill(self,"renderTabFor:on:",{aWidget:aWidget,html:html,li:li},$globals.TabManager)});
  1919. //>>excludeEnd("ctx");
  1920. },
  1921. //>>excludeStart("ide", pragmas.excludeIdeData);
  1922. args: ["aWidget", "html"],
  1923. source: "renderTabFor: aWidget on: html\x0a\x09| li |\x0a\x09li := html li.\x0a\x09selectedTab = aWidget ifTrue: [\x0a\x09li class: 'selected' ].\x0a\x09li with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span\x0a\x09\x09\x09class: 'mtab';\x0a\x09\x09\x09with: [\x0a\x09\x09\x09\x09aWidget canBeClosed ifTrue: [\x0a\x09\x09\x09\x09\x09html span\x0a\x09\x09\x09\x09\x09\x09class: 'close';\x0a\x09\x09\x09\x09\x09\x09with: 'x';\x0a\x09\x09\x09\x09\x09onClick: [ self closeTab: aWidget ]].\x0a\x09\x09\x09html span with: (self labelFor: aWidget) ].\x0a\x09\x09html span class: 'rtab' ];\x0a\x09onClick: [ self selectTab: aWidget ]",
  1924. referencedClasses: [],
  1925. //>>excludeEnd("ide");
  1926. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "span", "canBeClosed", "onClick:", "closeTab:", "labelFor:", "selectTab:"]
  1927. }),
  1928. $globals.TabManager);
  1929. $core.addMethod(
  1930. $core.method({
  1931. selector: "renderTabs",
  1932. protocol: 'rendering',
  1933. fn: function (){
  1934. var self=this;
  1935. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1936. return $core.withContext(function($ctx1) {
  1937. //>>excludeEnd("ctx");
  1938. var $1,$2,$3;
  1939. $recv(self["@ul"])._contents_((function(html){
  1940. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1941. return $core.withContext(function($ctx2) {
  1942. //>>excludeEnd("ctx");
  1943. $recv(self._tabs())._do_((function(each){
  1944. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1945. return $core.withContext(function($ctx3) {
  1946. //>>excludeEnd("ctx");
  1947. return self._renderTabFor_on_(each,html);
  1948. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1949. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  1950. //>>excludeEnd("ctx");
  1951. }));
  1952. $1=$recv(html)._li();
  1953. $recv($1)._class_("newtab");
  1954. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1955. $ctx2.sendIdx["class:"]=1;
  1956. //>>excludeEnd("ctx");
  1957. $recv($1)._with_((function(){
  1958. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1959. return $core.withContext(function($ctx3) {
  1960. //>>excludeEnd("ctx");
  1961. $2=$recv(html)._span();
  1962. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1963. $ctx3.sendIdx["span"]=1;
  1964. //>>excludeEnd("ctx");
  1965. $recv($2)._class_("ltab");
  1966. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1967. $ctx3.sendIdx["class:"]=2;
  1968. //>>excludeEnd("ctx");
  1969. $3=$recv(html)._span();
  1970. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1971. $ctx3.sendIdx["span"]=2;
  1972. //>>excludeEnd("ctx");
  1973. $recv($3)._class_("mtab");
  1974. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1975. $ctx3.sendIdx["class:"]=3;
  1976. //>>excludeEnd("ctx");
  1977. $recv($3)._with_(" + ");
  1978. return $recv($recv(html)._span())._class_("rtab");
  1979. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1980. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  1981. //>>excludeEnd("ctx");
  1982. }));
  1983. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1984. $ctx2.sendIdx["with:"]=1;
  1985. //>>excludeEnd("ctx");
  1986. return $recv($1)._onClick_((function(){
  1987. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1988. return $core.withContext(function($ctx3) {
  1989. //>>excludeEnd("ctx");
  1990. return self._newBrowserTab();
  1991. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1992. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  1993. //>>excludeEnd("ctx");
  1994. }));
  1995. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1996. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  1997. //>>excludeEnd("ctx");
  1998. }));
  1999. return self;
  2000. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2001. }, function($ctx1) {$ctx1.fill(self,"renderTabs",{},$globals.TabManager)});
  2002. //>>excludeEnd("ctx");
  2003. },
  2004. //>>excludeStart("ide", pragmas.excludeIdeData);
  2005. args: [],
  2006. source: "renderTabs\x0a\x09ul contents: [ :html |\x0a\x09\x09self tabs do: [ :each |\x0a\x09\x09self renderTabFor: each on: html ].\x0a\x09\x09html li\x0a\x09\x09class: 'newtab';\x0a\x09\x09with: [\x0a\x09\x09\x09html span class: 'ltab'.\x0a\x09\x09\x09html span class: 'mtab'; with: ' + '.\x0a\x09\x09\x09html span class: 'rtab' ];\x0a\x09\x09onClick: [ self newBrowserTab ]]",
  2007. referencedClasses: [],
  2008. //>>excludeEnd("ide");
  2009. messageSends: ["contents:", "do:", "tabs", "renderTabFor:on:", "class:", "li", "with:", "span", "onClick:", "newBrowserTab"]
  2010. }),
  2011. $globals.TabManager);
  2012. $core.addMethod(
  2013. $core.method({
  2014. selector: "renderToolbarOn:",
  2015. protocol: 'rendering',
  2016. fn: function (html){
  2017. var self=this;
  2018. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2019. return $core.withContext(function($ctx1) {
  2020. //>>excludeEnd("ctx");
  2021. var $1,$2,$3,$4;
  2022. $1=$recv(html)._div();
  2023. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2024. $ctx1.sendIdx["div"]=1;
  2025. //>>excludeEnd("ctx");
  2026. $recv($1)._id_("amber_toolbar");
  2027. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2028. $ctx1.sendIdx["id:"]=1;
  2029. //>>excludeEnd("ctx");
  2030. $recv($1)._with_((function(){
  2031. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2032. return $core.withContext(function($ctx2) {
  2033. //>>excludeEnd("ctx");
  2034. $2=$recv(html)._input();
  2035. $recv($2)._class_("implementors");
  2036. self["@input"]=$recv($2)._yourself();
  2037. self["@input"];
  2038. $recv(self["@input"])._onKeyPress_((function(event){
  2039. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2040. return $core.withContext(function($ctx3) {
  2041. //>>excludeEnd("ctx");
  2042. $3=$recv($recv(event)._keyCode()).__eq((13));
  2043. if($core.assert($3)){
  2044. return self._search_($recv($recv(self["@input"])._asJQuery())._val());
  2045. };
  2046. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2047. }, function($ctx3) {$ctx3.fillBlock({event:event},$ctx2,2)});
  2048. //>>excludeEnd("ctx");
  2049. }));
  2050. $4=$recv(html)._div();
  2051. $recv($4)._id_("amber_close");
  2052. return $recv($4)._onClick_((function(){
  2053. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2054. return $core.withContext(function($ctx3) {
  2055. //>>excludeEnd("ctx");
  2056. return self._close();
  2057. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2058. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  2059. //>>excludeEnd("ctx");
  2060. }));
  2061. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2062. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2063. //>>excludeEnd("ctx");
  2064. }));
  2065. return self;
  2066. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2067. }, function($ctx1) {$ctx1.fill(self,"renderToolbarOn:",{html:html},$globals.TabManager)});
  2068. //>>excludeEnd("ctx");
  2069. },
  2070. //>>excludeStart("ide", pragmas.excludeIdeData);
  2071. args: ["html"],
  2072. source: "renderToolbarOn: html\x0a\x09html div\x0a\x09\x09id: 'amber_toolbar';\x0a\x09\x09with: [\x0a\x09\x09\x09input := html input\x0a\x09\x09\x09\x09class: 'implementors';\x0a\x09\x09\x09\x09yourself.\x0a\x09\x09\x09input onKeyPress: [ :event |\x0a\x09\x09\x09\x09event keyCode = 13 ifTrue: [\x0a\x09\x09\x09\x09self search: input asJQuery val ]].\x0a\x09\x09\x09html div id: 'amber_close'; onClick: [ self close ]]",
  2073. referencedClasses: [],
  2074. //>>excludeEnd("ide");
  2075. messageSends: ["id:", "div", "with:", "class:", "input", "yourself", "onKeyPress:", "ifTrue:", "=", "keyCode", "search:", "val", "asJQuery", "onClick:", "close"]
  2076. }),
  2077. $globals.TabManager);
  2078. $core.addMethod(
  2079. $core.method({
  2080. selector: "search:",
  2081. protocol: 'actions',
  2082. fn: function (aString){
  2083. var self=this;
  2084. var searchedClass;
  2085. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2086. return $core.withContext(function($ctx1) {
  2087. //>>excludeEnd("ctx");
  2088. var $1;
  2089. searchedClass=$recv($recv($globals.Smalltalk)._globals())._at_(aString);
  2090. $1=$recv(searchedClass)._isClass();
  2091. if($core.assert($1)){
  2092. $recv($globals.Browser)._openOn_(searchedClass);
  2093. } else {
  2094. $recv($globals.ReferencesBrowser)._search_(aString);
  2095. };
  2096. return self;
  2097. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2098. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString,searchedClass:searchedClass},$globals.TabManager)});
  2099. //>>excludeEnd("ctx");
  2100. },
  2101. //>>excludeStart("ide", pragmas.excludeIdeData);
  2102. args: ["aString"],
  2103. source: "search: aString\x0a\x09| searchedClass |\x0a\x09searchedClass := Smalltalk globals at: aString.\x0a\x09\x09searchedClass isClass\x0a\x09\x09\x09ifTrue: [ Browser openOn: searchedClass ]\x0a\x09\x09\x09ifFalse: [ ReferencesBrowser search: aString ]",
  2104. referencedClasses: ["Smalltalk", "Browser", "ReferencesBrowser"],
  2105. //>>excludeEnd("ide");
  2106. messageSends: ["at:", "globals", "ifTrue:ifFalse:", "isClass", "openOn:", "search:"]
  2107. }),
  2108. $globals.TabManager);
  2109. $core.addMethod(
  2110. $core.method({
  2111. selector: "selectTab:",
  2112. protocol: 'actions',
  2113. fn: function (aWidget){
  2114. var self=this;
  2115. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2116. return $core.withContext(function($ctx1) {
  2117. //>>excludeEnd("ctx");
  2118. self._open();
  2119. self["@selectedTab"]=aWidget;
  2120. $recv(self._tabs())._do_((function(each){
  2121. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2122. return $core.withContext(function($ctx2) {
  2123. //>>excludeEnd("ctx");
  2124. return $recv(each)._hide();
  2125. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2126. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  2127. //>>excludeEnd("ctx");
  2128. }));
  2129. $recv(aWidget)._show();
  2130. self._update();
  2131. return self;
  2132. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2133. }, function($ctx1) {$ctx1.fill(self,"selectTab:",{aWidget:aWidget},$globals.TabManager)});
  2134. //>>excludeEnd("ctx");
  2135. },
  2136. //>>excludeStart("ide", pragmas.excludeIdeData);
  2137. args: ["aWidget"],
  2138. source: "selectTab: aWidget\x0a\x09self open.\x0a\x09selectedTab := aWidget.\x0a\x09self tabs do: [ :each |\x0a\x09each hide ].\x0a\x09aWidget show.\x0a\x09\x0a\x09self update",
  2139. referencedClasses: [],
  2140. //>>excludeEnd("ide");
  2141. messageSends: ["open", "do:", "tabs", "hide", "show", "update"]
  2142. }),
  2143. $globals.TabManager);
  2144. $core.addMethod(
  2145. $core.method({
  2146. selector: "setBodyMargin:",
  2147. protocol: 'actions',
  2148. fn: function (anInteger){
  2149. var self=this;
  2150. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2151. return $core.withContext(function($ctx1) {
  2152. //>>excludeEnd("ctx");
  2153. $recv(".amberBody"._asJQuery())._css_put_("margin-bottom",$recv($recv(anInteger)._asString()).__comma("px"));
  2154. return self;
  2155. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2156. }, function($ctx1) {$ctx1.fill(self,"setBodyMargin:",{anInteger:anInteger},$globals.TabManager)});
  2157. //>>excludeEnd("ctx");
  2158. },
  2159. //>>excludeStart("ide", pragmas.excludeIdeData);
  2160. args: ["anInteger"],
  2161. source: "setBodyMargin: anInteger\x0a\x09'.amberBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'",
  2162. referencedClasses: [],
  2163. //>>excludeEnd("ide");
  2164. messageSends: ["css:put:", "asJQuery", ",", "asString"]
  2165. }),
  2166. $globals.TabManager);
  2167. $core.addMethod(
  2168. $core.method({
  2169. selector: "tabs",
  2170. protocol: 'accessing',
  2171. fn: function (){
  2172. var self=this;
  2173. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2174. return $core.withContext(function($ctx1) {
  2175. //>>excludeEnd("ctx");
  2176. var $1,$receiver;
  2177. $1=self["@tabs"];
  2178. if(($receiver = $1) == null || $receiver.isNil){
  2179. self["@tabs"]=$recv($globals.Array)._new();
  2180. return self["@tabs"];
  2181. } else {
  2182. return $1;
  2183. };
  2184. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2185. }, function($ctx1) {$ctx1.fill(self,"tabs",{},$globals.TabManager)});
  2186. //>>excludeEnd("ctx");
  2187. },
  2188. //>>excludeStart("ide", pragmas.excludeIdeData);
  2189. args: [],
  2190. source: "tabs\x0a\x09^ tabs ifNil: [ tabs := Array new ]",
  2191. referencedClasses: ["Array"],
  2192. //>>excludeEnd("ide");
  2193. messageSends: ["ifNil:", "new"]
  2194. }),
  2195. $globals.TabManager);
  2196. $core.addMethod(
  2197. $core.method({
  2198. selector: "update",
  2199. protocol: 'updating',
  2200. fn: function (){
  2201. var self=this;
  2202. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2203. return $core.withContext(function($ctx1) {
  2204. //>>excludeEnd("ctx");
  2205. self._renderTabs();
  2206. return self;
  2207. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2208. }, function($ctx1) {$ctx1.fill(self,"update",{},$globals.TabManager)});
  2209. //>>excludeEnd("ctx");
  2210. },
  2211. //>>excludeStart("ide", pragmas.excludeIdeData);
  2212. args: [],
  2213. source: "update\x0a\x09self renderTabs",
  2214. referencedClasses: [],
  2215. //>>excludeEnd("ide");
  2216. messageSends: ["renderTabs"]
  2217. }),
  2218. $globals.TabManager);
  2219. $core.addMethod(
  2220. $core.method({
  2221. selector: "updateBodyMargin",
  2222. protocol: 'actions',
  2223. fn: function (){
  2224. var self=this;
  2225. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2226. return $core.withContext(function($ctx1) {
  2227. //>>excludeEnd("ctx");
  2228. self._setBodyMargin_($recv("#amber"._asJQuery())._height());
  2229. return self;
  2230. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2231. }, function($ctx1) {$ctx1.fill(self,"updateBodyMargin",{},$globals.TabManager)});
  2232. //>>excludeEnd("ctx");
  2233. },
  2234. //>>excludeStart("ide", pragmas.excludeIdeData);
  2235. args: [],
  2236. source: "updateBodyMargin\x0a\x09self setBodyMargin: '#amber' asJQuery height",
  2237. referencedClasses: [],
  2238. //>>excludeEnd("ide");
  2239. messageSends: ["setBodyMargin:", "height", "asJQuery"]
  2240. }),
  2241. $globals.TabManager);
  2242. $core.addMethod(
  2243. $core.method({
  2244. selector: "updatePosition",
  2245. protocol: 'actions',
  2246. fn: function (){
  2247. var self=this;
  2248. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2249. return $core.withContext(function($ctx1) {
  2250. //>>excludeEnd("ctx");
  2251. var $1;
  2252. $1="#amber"._asJQuery();
  2253. $recv($1)._css_put_("top","");
  2254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2255. $ctx1.sendIdx["css:put:"]=1;
  2256. //>>excludeEnd("ctx");
  2257. $recv($1)._css_put_("bottom","0px");
  2258. return self;
  2259. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2260. }, function($ctx1) {$ctx1.fill(self,"updatePosition",{},$globals.TabManager)});
  2261. //>>excludeEnd("ctx");
  2262. },
  2263. //>>excludeStart("ide", pragmas.excludeIdeData);
  2264. args: [],
  2265. source: "updatePosition\x0a\x09'#amber' asJQuery\x0a\x09\x09css: 'top' put: '';\x0a\x09\x09css: 'bottom' put: '0px'",
  2266. referencedClasses: [],
  2267. //>>excludeEnd("ide");
  2268. messageSends: ["css:put:", "asJQuery"]
  2269. }),
  2270. $globals.TabManager);
  2271. $globals.TabManager.klass.iVarNames = ['current'];
  2272. $core.addMethod(
  2273. $core.method({
  2274. selector: "current",
  2275. protocol: 'instance creation',
  2276. fn: function (){
  2277. var self=this;
  2278. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2279. return $core.withContext(function($ctx1) {
  2280. //>>excludeEnd("ctx");
  2281. var $1,$receiver;
  2282. $1=self["@current"];
  2283. if(($receiver = $1) == null || $receiver.isNil){
  2284. self["@current"]=(
  2285. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2286. $ctx1.supercall = true,
  2287. //>>excludeEnd("ctx");
  2288. ($globals.TabManager.klass.superclass||$boot.nilAsClass).fn.prototype._new.apply($recv(self), []));
  2289. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2290. $ctx1.supercall = false;
  2291. //>>excludeEnd("ctx");;
  2292. return self["@current"];
  2293. } else {
  2294. return $1;
  2295. };
  2296. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2297. }, function($ctx1) {$ctx1.fill(self,"current",{},$globals.TabManager.klass)});
  2298. //>>excludeEnd("ctx");
  2299. },
  2300. //>>excludeStart("ide", pragmas.excludeIdeData);
  2301. args: [],
  2302. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  2303. referencedClasses: [],
  2304. //>>excludeEnd("ide");
  2305. messageSends: ["ifNil:", "new"]
  2306. }),
  2307. $globals.TabManager.klass);
  2308. $core.addMethod(
  2309. $core.method({
  2310. selector: "new",
  2311. protocol: 'instance creation',
  2312. fn: function (){
  2313. var self=this;
  2314. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2315. return $core.withContext(function($ctx1) {
  2316. //>>excludeEnd("ctx");
  2317. self._shouldNotImplement();
  2318. return self;
  2319. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2320. }, function($ctx1) {$ctx1.fill(self,"new",{},$globals.TabManager.klass)});
  2321. //>>excludeEnd("ctx");
  2322. },
  2323. //>>excludeStart("ide", pragmas.excludeIdeData);
  2324. args: [],
  2325. source: "new\x0a\x09self shouldNotImplement",
  2326. referencedClasses: [],
  2327. //>>excludeEnd("ide");
  2328. messageSends: ["shouldNotImplement"]
  2329. }),
  2330. $globals.TabManager.klass);
  2331. $core.addMethod(
  2332. $core.method({
  2333. selector: "toggleAmberIDE",
  2334. protocol: 'actions',
  2335. fn: function (){
  2336. var self=this;
  2337. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2338. return $core.withContext(function($ctx1) {
  2339. //>>excludeEnd("ctx");
  2340. var $3,$2,$1,$4,$5;
  2341. $3="#amber"._asJQuery();
  2342. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2343. $ctx1.sendIdx["asJQuery"]=1;
  2344. //>>excludeEnd("ctx");
  2345. $2=$recv($3)._length();
  2346. $1=$recv($2).__eq((0));
  2347. if($core.assert($1)){
  2348. $recv($globals.Browser)._open();
  2349. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2350. $ctx1.sendIdx["open"]=1;
  2351. //>>excludeEnd("ctx");
  2352. } else {
  2353. $4=$recv("#amber"._asJQuery())._is_(":visible");
  2354. if($core.assert($4)){
  2355. $5=$recv($globals.TabManager)._current();
  2356. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2357. $ctx1.sendIdx["current"]=1;
  2358. //>>excludeEnd("ctx");
  2359. $recv($5)._close();
  2360. } else {
  2361. $recv($recv($globals.TabManager)._current())._open();
  2362. };
  2363. };
  2364. return self;
  2365. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2366. }, function($ctx1) {$ctx1.fill(self,"toggleAmberIDE",{},$globals.TabManager.klass)});
  2367. //>>excludeEnd("ctx");
  2368. },
  2369. //>>excludeStart("ide", pragmas.excludeIdeData);
  2370. args: [],
  2371. source: "toggleAmberIDE\x0a\x09'#amber' asJQuery length = 0\x0a\x09\x09ifTrue: [ Browser open ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09('#amber' asJQuery is: ':visible')\x0a\x09\x09\x09\x09ifTrue: [ TabManager current close ]\x0a\x09\x09\x09\x09ifFalse: [ TabManager current open ] ]",
  2372. referencedClasses: ["Browser", "TabManager"],
  2373. //>>excludeEnd("ide");
  2374. messageSends: ["ifTrue:ifFalse:", "=", "length", "asJQuery", "open", "is:", "close", "current"]
  2375. }),
  2376. $globals.TabManager.klass);
  2377. $core.addClass('TabWidget', $globals.Widget, ['div'], 'IDE');
  2378. $core.addMethod(
  2379. $core.method({
  2380. selector: "canBeClosed",
  2381. protocol: 'testing',
  2382. fn: function (){
  2383. var self=this;
  2384. return false;
  2385. },
  2386. //>>excludeStart("ide", pragmas.excludeIdeData);
  2387. args: [],
  2388. source: "canBeClosed\x0a\x09^ false",
  2389. referencedClasses: [],
  2390. //>>excludeEnd("ide");
  2391. messageSends: []
  2392. }),
  2393. $globals.TabWidget);
  2394. $core.addMethod(
  2395. $core.method({
  2396. selector: "close",
  2397. protocol: 'actions',
  2398. fn: function (){
  2399. var self=this;
  2400. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2401. return $core.withContext(function($ctx1) {
  2402. //>>excludeEnd("ctx");
  2403. $recv($recv($globals.TabManager)._current())._closeTab_(self);
  2404. return self;
  2405. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2406. }, function($ctx1) {$ctx1.fill(self,"close",{},$globals.TabWidget)});
  2407. //>>excludeEnd("ctx");
  2408. },
  2409. //>>excludeStart("ide", pragmas.excludeIdeData);
  2410. args: [],
  2411. source: "close\x0a\x09TabManager current closeTab: self",
  2412. referencedClasses: ["TabManager"],
  2413. //>>excludeEnd("ide");
  2414. messageSends: ["closeTab:", "current"]
  2415. }),
  2416. $globals.TabWidget);
  2417. $core.addMethod(
  2418. $core.method({
  2419. selector: "hide",
  2420. protocol: 'actions',
  2421. fn: function (){
  2422. var self=this;
  2423. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2424. return $core.withContext(function($ctx1) {
  2425. //>>excludeEnd("ctx");
  2426. $recv($recv(self["@div"])._asJQuery())._hide();
  2427. return self;
  2428. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2429. }, function($ctx1) {$ctx1.fill(self,"hide",{},$globals.TabWidget)});
  2430. //>>excludeEnd("ctx");
  2431. },
  2432. //>>excludeStart("ide", pragmas.excludeIdeData);
  2433. args: [],
  2434. source: "hide\x0a\x09div asJQuery hide",
  2435. referencedClasses: [],
  2436. //>>excludeEnd("ide");
  2437. messageSends: ["hide", "asJQuery"]
  2438. }),
  2439. $globals.TabWidget);
  2440. $core.addMethod(
  2441. $core.method({
  2442. selector: "label",
  2443. protocol: 'accessing',
  2444. fn: function (){
  2445. var self=this;
  2446. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2447. return $core.withContext(function($ctx1) {
  2448. //>>excludeEnd("ctx");
  2449. self._subclassResponsibility();
  2450. return self;
  2451. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2452. }, function($ctx1) {$ctx1.fill(self,"label",{},$globals.TabWidget)});
  2453. //>>excludeEnd("ctx");
  2454. },
  2455. //>>excludeStart("ide", pragmas.excludeIdeData);
  2456. args: [],
  2457. source: "label\x0a\x09self subclassResponsibility",
  2458. referencedClasses: [],
  2459. //>>excludeEnd("ide");
  2460. messageSends: ["subclassResponsibility"]
  2461. }),
  2462. $globals.TabWidget);
  2463. $core.addMethod(
  2464. $core.method({
  2465. selector: "open",
  2466. protocol: 'actions',
  2467. fn: function (){
  2468. var self=this;
  2469. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2470. return $core.withContext(function($ctx1) {
  2471. //>>excludeEnd("ctx");
  2472. var $1;
  2473. $1=$recv($globals.TabManager)._current();
  2474. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2475. $ctx1.sendIdx["current"]=1;
  2476. //>>excludeEnd("ctx");
  2477. $recv($1)._addTab_(self);
  2478. $recv($recv($globals.TabManager)._current())._selectTab_(self);
  2479. return self;
  2480. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2481. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.TabWidget)});
  2482. //>>excludeEnd("ctx");
  2483. },
  2484. //>>excludeStart("ide", pragmas.excludeIdeData);
  2485. args: [],
  2486. source: "open\x0a\x09TabManager current addTab: self.\x0a\x09TabManager current selectTab: self",
  2487. referencedClasses: ["TabManager"],
  2488. //>>excludeEnd("ide");
  2489. messageSends: ["addTab:", "current", "selectTab:"]
  2490. }),
  2491. $globals.TabWidget);
  2492. $core.addMethod(
  2493. $core.method({
  2494. selector: "remove",
  2495. protocol: 'actions',
  2496. fn: function (){
  2497. var self=this;
  2498. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2499. return $core.withContext(function($ctx1) {
  2500. //>>excludeEnd("ctx");
  2501. $recv($recv(self["@div"])._asJQuery())._remove();
  2502. return self;
  2503. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2504. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.TabWidget)});
  2505. //>>excludeEnd("ctx");
  2506. },
  2507. //>>excludeStart("ide", pragmas.excludeIdeData);
  2508. args: [],
  2509. source: "remove\x0a\x09div asJQuery remove",
  2510. referencedClasses: [],
  2511. //>>excludeEnd("ide");
  2512. messageSends: ["remove", "asJQuery"]
  2513. }),
  2514. $globals.TabWidget);
  2515. $core.addMethod(
  2516. $core.method({
  2517. selector: "renderBoxOn:",
  2518. protocol: 'rendering',
  2519. fn: function (html){
  2520. var self=this;
  2521. return self;
  2522. },
  2523. //>>excludeStart("ide", pragmas.excludeIdeData);
  2524. args: ["html"],
  2525. source: "renderBoxOn: html",
  2526. referencedClasses: [],
  2527. //>>excludeEnd("ide");
  2528. messageSends: []
  2529. }),
  2530. $globals.TabWidget);
  2531. $core.addMethod(
  2532. $core.method({
  2533. selector: "renderButtonsOn:",
  2534. protocol: 'rendering',
  2535. fn: function (html){
  2536. var self=this;
  2537. return self;
  2538. },
  2539. //>>excludeStart("ide", pragmas.excludeIdeData);
  2540. args: ["html"],
  2541. source: "renderButtonsOn: html",
  2542. referencedClasses: [],
  2543. //>>excludeEnd("ide");
  2544. messageSends: []
  2545. }),
  2546. $globals.TabWidget);
  2547. $core.addMethod(
  2548. $core.method({
  2549. selector: "renderOn:",
  2550. protocol: 'rendering',
  2551. fn: function (html){
  2552. var self=this;
  2553. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2554. return $core.withContext(function($ctx1) {
  2555. //>>excludeEnd("ctx");
  2556. var $1;
  2557. $1=$recv(html)._div();
  2558. $recv($1)._class_("amberTool");
  2559. self["@div"]=$recv($1)._yourself();
  2560. self._renderTab();
  2561. return self;
  2562. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2563. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.TabWidget)});
  2564. //>>excludeEnd("ctx");
  2565. },
  2566. //>>excludeStart("ide", pragmas.excludeIdeData);
  2567. args: ["html"],
  2568. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'amberTool';\x0a\x09\x09yourself.\x0a\x09self renderTab",
  2569. referencedClasses: [],
  2570. //>>excludeEnd("ide");
  2571. messageSends: ["class:", "div", "yourself", "renderTab"]
  2572. }),
  2573. $globals.TabWidget);
  2574. $core.addMethod(
  2575. $core.method({
  2576. selector: "renderTab",
  2577. protocol: 'rendering',
  2578. fn: function (){
  2579. var self=this;
  2580. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2581. return $core.withContext(function($ctx1) {
  2582. //>>excludeEnd("ctx");
  2583. var $1,$2,$3;
  2584. $recv(self["@div"])._contents_((function(html){
  2585. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2586. return $core.withContext(function($ctx2) {
  2587. //>>excludeEnd("ctx");
  2588. $1=$recv(html)._div();
  2589. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2590. $ctx2.sendIdx["div"]=1;
  2591. //>>excludeEnd("ctx");
  2592. $recv($1)._class_("amber_box");
  2593. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2594. $ctx2.sendIdx["class:"]=1;
  2595. //>>excludeEnd("ctx");
  2596. $2=$recv($1)._with_((function(){
  2597. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2598. return $core.withContext(function($ctx3) {
  2599. //>>excludeEnd("ctx");
  2600. return self._renderBoxOn_(html);
  2601. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2602. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  2603. //>>excludeEnd("ctx");
  2604. }));
  2605. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2606. $ctx2.sendIdx["with:"]=1;
  2607. //>>excludeEnd("ctx");
  2608. $2;
  2609. $3=$recv(html)._div();
  2610. $recv($3)._class_("amber_buttons");
  2611. return $recv($3)._with_((function(){
  2612. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2613. return $core.withContext(function($ctx3) {
  2614. //>>excludeEnd("ctx");
  2615. return self._renderButtonsOn_(html);
  2616. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2617. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  2618. //>>excludeEnd("ctx");
  2619. }));
  2620. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2621. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  2622. //>>excludeEnd("ctx");
  2623. }));
  2624. return self;
  2625. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2626. }, function($ctx1) {$ctx1.fill(self,"renderTab",{},$globals.TabWidget)});
  2627. //>>excludeEnd("ctx");
  2628. },
  2629. //>>excludeStart("ide", pragmas.excludeIdeData);
  2630. args: [],
  2631. source: "renderTab\x0a\x09div contents: [ :html |\x0a\x09\x09html div\x0a\x09\x09class: 'amber_box';\x0a\x09\x09with: [ self renderBoxOn: html ].\x0a\x09\x09html div\x0a\x09\x09class: 'amber_buttons';\x0a\x09\x09with: [ self renderButtonsOn: html ]]",
  2632. referencedClasses: [],
  2633. //>>excludeEnd("ide");
  2634. messageSends: ["contents:", "class:", "div", "with:", "renderBoxOn:", "renderButtonsOn:"]
  2635. }),
  2636. $globals.TabWidget);
  2637. $core.addMethod(
  2638. $core.method({
  2639. selector: "show",
  2640. protocol: 'actions',
  2641. fn: function (){
  2642. var self=this;
  2643. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2644. return $core.withContext(function($ctx1) {
  2645. //>>excludeEnd("ctx");
  2646. $recv($recv(self["@div"])._asJQuery())._show();
  2647. return self;
  2648. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2649. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.TabWidget)});
  2650. //>>excludeEnd("ctx");
  2651. },
  2652. //>>excludeStart("ide", pragmas.excludeIdeData);
  2653. args: [],
  2654. source: "show\x0a\x09div asJQuery show",
  2655. referencedClasses: [],
  2656. //>>excludeEnd("ide");
  2657. messageSends: ["show", "asJQuery"]
  2658. }),
  2659. $globals.TabWidget);
  2660. $core.addMethod(
  2661. $core.method({
  2662. selector: "update",
  2663. protocol: 'rendering',
  2664. fn: function (){
  2665. var self=this;
  2666. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2667. return $core.withContext(function($ctx1) {
  2668. //>>excludeEnd("ctx");
  2669. self._renderTab();
  2670. return self;
  2671. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2672. }, function($ctx1) {$ctx1.fill(self,"update",{},$globals.TabWidget)});
  2673. //>>excludeEnd("ctx");
  2674. },
  2675. //>>excludeStart("ide", pragmas.excludeIdeData);
  2676. args: [],
  2677. source: "update\x0a\x09self renderTab",
  2678. referencedClasses: [],
  2679. //>>excludeEnd("ide");
  2680. messageSends: ["renderTab"]
  2681. }),
  2682. $globals.TabWidget);
  2683. $core.addMethod(
  2684. $core.method({
  2685. selector: "open",
  2686. protocol: 'instance creation',
  2687. fn: function (){
  2688. var self=this;
  2689. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2690. return $core.withContext(function($ctx1) {
  2691. //>>excludeEnd("ctx");
  2692. return $recv(self._new())._open();
  2693. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2694. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.TabWidget.klass)});
  2695. //>>excludeEnd("ctx");
  2696. },
  2697. //>>excludeStart("ide", pragmas.excludeIdeData);
  2698. args: [],
  2699. source: "open\x0a\x09^ self new open",
  2700. referencedClasses: [],
  2701. //>>excludeEnd("ide");
  2702. messageSends: ["open", "new"]
  2703. }),
  2704. $globals.TabWidget.klass);
  2705. $core.addClass('Browser', $globals.TabWidget, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'packagesList', 'classesList', 'protocolsList', 'methodsList', 'sourceArea', 'tabsList', 'selectedTab', 'saveButton', 'classButtons', 'methodButtons', 'unsavedChanges'], 'IDE');
  2706. $core.addMethod(
  2707. $core.method({
  2708. selector: "addInstanceVariableNamed:toClass:",
  2709. protocol: 'actions',
  2710. fn: function (aString,aClass){
  2711. var self=this;
  2712. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2713. return $core.withContext(function($ctx1) {
  2714. //>>excludeEnd("ctx");
  2715. var $1,$2,$3,$5,$4;
  2716. $1=$recv($globals.ClassBuilder)._new();
  2717. $2=$recv(aClass)._superclass();
  2718. $3=$recv(aClass)._name();
  2719. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2720. $ctx1.sendIdx["name"]=1;
  2721. //>>excludeEnd("ctx");
  2722. $5=$recv($recv(aClass)._instanceVariableNames())._copy();
  2723. $recv($5)._add_(aString);
  2724. $4=$recv($5)._yourself();
  2725. $recv($1)._addSubclassOf_named_instanceVariableNames_package_($2,$3,$4,$recv($recv(aClass)._package())._name());
  2726. return self;
  2727. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2728. }, function($ctx1) {$ctx1.fill(self,"addInstanceVariableNamed:toClass:",{aString:aString,aClass:aClass},$globals.Browser)});
  2729. //>>excludeEnd("ctx");
  2730. },
  2731. //>>excludeStart("ide", pragmas.excludeIdeData);
  2732. args: ["aString", "aClass"],
  2733. source: "addInstanceVariableNamed: aString toClass: aClass\x0a\x09ClassBuilder new\x0a\x09\x09addSubclassOf: aClass superclass\x0a\x09\x09named: aClass name\x0a\x09\x09instanceVariableNames: (aClass instanceVariableNames copy add: aString; yourself)\x0a\x09\x09package: aClass package name",
  2734. referencedClasses: ["ClassBuilder"],
  2735. //>>excludeEnd("ide");
  2736. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "new", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package"]
  2737. }),
  2738. $globals.Browser);
  2739. $core.addMethod(
  2740. $core.method({
  2741. selector: "addNewClass",
  2742. protocol: 'actions',
  2743. fn: function (){
  2744. var self=this;
  2745. var className;
  2746. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2747. return $core.withContext(function($ctx1) {
  2748. //>>excludeEnd("ctx");
  2749. var $1;
  2750. className=$recv($globals.Terminal)._prompt_("New class");
  2751. $1=$recv($recv(className)._notNil())._and_((function(){
  2752. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2753. return $core.withContext(function($ctx2) {
  2754. //>>excludeEnd("ctx");
  2755. return $recv(className)._notEmpty();
  2756. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2757. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2758. //>>excludeEnd("ctx");
  2759. }));
  2760. if($core.assert($1)){
  2761. $recv($globals.Object)._subclass_instanceVariableNames_package_(className,"",self._selectedPackage());
  2762. self._resetClassesList();
  2763. self._updateClassesList();
  2764. self._selectClass_($recv($recv($globals.Smalltalk)._globals())._at_(className));
  2765. };
  2766. return self;
  2767. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2768. }, function($ctx1) {$ctx1.fill(self,"addNewClass",{className:className},$globals.Browser)});
  2769. //>>excludeEnd("ctx");
  2770. },
  2771. //>>excludeStart("ide", pragmas.excludeIdeData);
  2772. args: [],
  2773. source: "addNewClass\x0a\x09| className |\x0a\x09className := Terminal prompt: 'New class'.\x0a\x09(className notNil and: [ className notEmpty ]) ifTrue: [\x0a\x09\x09Object subclass: className instanceVariableNames: '' package: self selectedPackage.\x0a\x09\x09\x09self\x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk globals at: className) ]",
  2774. referencedClasses: ["Terminal", "Object", "Smalltalk"],
  2775. //>>excludeEnd("ide");
  2776. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "subclass:instanceVariableNames:package:", "selectedPackage", "resetClassesList", "updateClassesList", "selectClass:", "at:", "globals"]
  2777. }),
  2778. $globals.Browser);
  2779. $core.addMethod(
  2780. $core.method({
  2781. selector: "addNewProtocol",
  2782. protocol: 'actions',
  2783. fn: function (){
  2784. var self=this;
  2785. var newProtocol;
  2786. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2787. return $core.withContext(function($ctx1) {
  2788. //>>excludeEnd("ctx");
  2789. var $1;
  2790. newProtocol=$recv($globals.Terminal)._prompt_("New method protocol");
  2791. $1=$recv($recv(newProtocol)._notNil())._and_((function(){
  2792. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2793. return $core.withContext(function($ctx2) {
  2794. //>>excludeEnd("ctx");
  2795. return $recv(newProtocol)._notEmpty();
  2796. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2797. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2798. //>>excludeEnd("ctx");
  2799. }));
  2800. if($core.assert($1)){
  2801. $recv(self["@selectedMethod"])._protocol_(newProtocol);
  2802. self._setMethodProtocol_(newProtocol);
  2803. };
  2804. return self;
  2805. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2806. }, function($ctx1) {$ctx1.fill(self,"addNewProtocol",{newProtocol:newProtocol},$globals.Browser)});
  2807. //>>excludeEnd("ctx");
  2808. },
  2809. //>>excludeStart("ide", pragmas.excludeIdeData);
  2810. args: [],
  2811. source: "addNewProtocol\x0a\x09| newProtocol |\x0a\x09\x0a\x09newProtocol := Terminal prompt: 'New method protocol'.\x0a\x09\x0a\x09(newProtocol notNil and: [ newProtocol notEmpty ]) ifTrue: [\x0a\x09\x09selectedMethod protocol: newProtocol.\x0a\x09\x09self setMethodProtocol: newProtocol ]",
  2812. referencedClasses: ["Terminal"],
  2813. //>>excludeEnd("ide");
  2814. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "protocol:", "setMethodProtocol:"]
  2815. }),
  2816. $globals.Browser);
  2817. $core.addMethod(
  2818. $core.method({
  2819. selector: "canBeClosed",
  2820. protocol: 'testing',
  2821. fn: function (){
  2822. var self=this;
  2823. return true;
  2824. },
  2825. //>>excludeStart("ide", pragmas.excludeIdeData);
  2826. args: [],
  2827. source: "canBeClosed\x0a\x09^ true",
  2828. referencedClasses: [],
  2829. //>>excludeEnd("ide");
  2830. messageSends: []
  2831. }),
  2832. $globals.Browser);
  2833. $core.addMethod(
  2834. $core.method({
  2835. selector: "cancelChanges",
  2836. protocol: 'actions',
  2837. fn: function (){
  2838. var self=this;
  2839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2840. return $core.withContext(function($ctx1) {
  2841. //>>excludeEnd("ctx");
  2842. var $1;
  2843. $1=self["@unsavedChanges"];
  2844. if($core.assert($1)){
  2845. return $recv($globals.Terminal)._confirm_("Cancel changes?");
  2846. } else {
  2847. return true;
  2848. };
  2849. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2850. }, function($ctx1) {$ctx1.fill(self,"cancelChanges",{},$globals.Browser)});
  2851. //>>excludeEnd("ctx");
  2852. },
  2853. //>>excludeStart("ide", pragmas.excludeIdeData);
  2854. args: [],
  2855. source: "cancelChanges\x0a\x09^ unsavedChanges\x0a\x09ifTrue: [ Terminal confirm: 'Cancel changes?' ]\x0a\x09ifFalse: [ true ]",
  2856. referencedClasses: ["Terminal"],
  2857. //>>excludeEnd("ide");
  2858. messageSends: ["ifTrue:ifFalse:", "confirm:"]
  2859. }),
  2860. $globals.Browser);
  2861. $core.addMethod(
  2862. $core.method({
  2863. selector: "classCommentSource",
  2864. protocol: 'accessing',
  2865. fn: function (){
  2866. var self=this;
  2867. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2868. return $core.withContext(function($ctx1) {
  2869. //>>excludeEnd("ctx");
  2870. return $recv(self["@selectedClass"])._comment();
  2871. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2872. }, function($ctx1) {$ctx1.fill(self,"classCommentSource",{},$globals.Browser)});
  2873. //>>excludeEnd("ctx");
  2874. },
  2875. //>>excludeStart("ide", pragmas.excludeIdeData);
  2876. args: [],
  2877. source: "classCommentSource\x0a\x09^ selectedClass comment",
  2878. referencedClasses: [],
  2879. //>>excludeEnd("ide");
  2880. messageSends: ["comment"]
  2881. }),
  2882. $globals.Browser);
  2883. $core.addMethod(
  2884. $core.method({
  2885. selector: "classDeclarationSource",
  2886. protocol: 'accessing',
  2887. fn: function (){
  2888. var self=this;
  2889. var stream;
  2890. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2891. return $core.withContext(function($ctx1) {
  2892. //>>excludeEnd("ctx");
  2893. var $1,$2,$4,$5,$3,$6,$7,$8,$receiver;
  2894. stream=""._writeStream();
  2895. $1=self["@selectedClass"];
  2896. if(($receiver = $1) == null || $receiver.isNil){
  2897. return self._classDeclarationTemplate();
  2898. } else {
  2899. $1;
  2900. };
  2901. $2=stream;
  2902. $recv($2)._nextPutAll_($recv($recv(self["@selectedClass"])._superclass())._asString());
  2903. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2904. $ctx1.sendIdx["nextPutAll:"]=1;
  2905. //>>excludeEnd("ctx");
  2906. $recv($2)._nextPutAll_(" subclass: #");
  2907. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2908. $ctx1.sendIdx["nextPutAll:"]=2;
  2909. //>>excludeEnd("ctx");
  2910. $recv($2)._nextPutAll_($recv(self["@selectedClass"])._name());
  2911. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2912. $ctx1.sendIdx["nextPutAll:"]=3;
  2913. //>>excludeEnd("ctx");
  2914. $4=$recv($globals.String)._lf();
  2915. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2916. $ctx1.sendIdx["lf"]=1;
  2917. //>>excludeEnd("ctx");
  2918. $5=$recv($globals.String)._tab();
  2919. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2920. $ctx1.sendIdx["tab"]=1;
  2921. //>>excludeEnd("ctx");
  2922. $3=$recv($4).__comma($5);
  2923. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2924. $ctx1.sendIdx[","]=1;
  2925. //>>excludeEnd("ctx");
  2926. $recv($2)._nextPutAll_($3);
  2927. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2928. $ctx1.sendIdx["nextPutAll:"]=4;
  2929. //>>excludeEnd("ctx");
  2930. $6=$recv($2)._nextPutAll_("instanceVariableNames: '");
  2931. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2932. $ctx1.sendIdx["nextPutAll:"]=5;
  2933. //>>excludeEnd("ctx");
  2934. $recv($recv(self["@selectedClass"])._instanceVariableNames())._do_separatedBy_((function(each){
  2935. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2936. return $core.withContext(function($ctx2) {
  2937. //>>excludeEnd("ctx");
  2938. return $recv(stream)._nextPutAll_(each);
  2939. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2940. $ctx2.sendIdx["nextPutAll:"]=6;
  2941. //>>excludeEnd("ctx");
  2942. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2943. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  2944. //>>excludeEnd("ctx");
  2945. }),(function(){
  2946. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2947. return $core.withContext(function($ctx2) {
  2948. //>>excludeEnd("ctx");
  2949. return $recv(stream)._nextPutAll_(" ");
  2950. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2951. $ctx2.sendIdx["nextPutAll:"]=7;
  2952. //>>excludeEnd("ctx");
  2953. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2954. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  2955. //>>excludeEnd("ctx");
  2956. }));
  2957. $7=stream;
  2958. $8=$recv("'".__comma($recv($globals.String)._lf())).__comma($recv($globals.String)._tab());
  2959. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2960. $ctx1.sendIdx[","]=2;
  2961. //>>excludeEnd("ctx");
  2962. $recv($7)._nextPutAll_($8);
  2963. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2964. $ctx1.sendIdx["nextPutAll:"]=8;
  2965. //>>excludeEnd("ctx");
  2966. $recv($7)._nextPutAll_("package: '");
  2967. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2968. $ctx1.sendIdx["nextPutAll:"]=9;
  2969. //>>excludeEnd("ctx");
  2970. $recv($7)._nextPutAll_($recv(self["@selectedClass"])._category());
  2971. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2972. $ctx1.sendIdx["nextPutAll:"]=10;
  2973. //>>excludeEnd("ctx");
  2974. $recv($7)._nextPutAll_("'");
  2975. return $recv(stream)._contents();
  2976. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2977. }, function($ctx1) {$ctx1.fill(self,"classDeclarationSource",{stream:stream},$globals.Browser)});
  2978. //>>excludeEnd("ctx");
  2979. },
  2980. //>>excludeStart("ide", pragmas.excludeIdeData);
  2981. args: [],
  2982. source: "classDeclarationSource\x0a\x09| stream |\x0a\x09stream := '' writeStream.\x0a\x09selectedClass ifNil: [ ^ self classDeclarationTemplate ].\x0a\x09stream\x0a\x09\x09nextPutAll: selectedClass superclass asString;\x0a\x09\x09nextPutAll: ' subclass: #';\x0a\x09\x09nextPutAll: selectedClass name;\x0a\x09\x09nextPutAll: String lf, String tab;\x0a\x09\x09nextPutAll: 'instanceVariableNames: '''.\x0a\x09selectedClass instanceVariableNames\x0a\x09\x09do: [ :each | stream nextPutAll: each ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ' ' ].\x0a\x09stream\x0a\x09\x09nextPutAll: '''', String lf, String tab;\x0a\x09\x09nextPutAll: 'package: ''';\x0a\x09\x09nextPutAll: selectedClass category;\x0a\x09\x09nextPutAll: ''''.\x0a\x09^ stream contents",
  2983. referencedClasses: ["String"],
  2984. //>>excludeEnd("ide");
  2985. messageSends: ["writeStream", "ifNil:", "classDeclarationTemplate", "nextPutAll:", "asString", "superclass", "name", ",", "lf", "tab", "do:separatedBy:", "instanceVariableNames", "category", "contents"]
  2986. }),
  2987. $globals.Browser);
  2988. $core.addMethod(
  2989. $core.method({
  2990. selector: "classDeclarationTemplate",
  2991. protocol: 'accessing',
  2992. fn: function (){
  2993. var self=this;
  2994. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2995. return $core.withContext(function($ctx1) {
  2996. //>>excludeEnd("ctx");
  2997. var $1;
  2998. $1=$recv("Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''\x0a\x09package: '".__comma(self._selectedPackage())).__comma("'");
  2999. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3000. $ctx1.sendIdx[","]=1;
  3001. //>>excludeEnd("ctx");
  3002. return $1;
  3003. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3004. }, function($ctx1) {$ctx1.fill(self,"classDeclarationTemplate",{},$globals.Browser)});
  3005. //>>excludeEnd("ctx");
  3006. },
  3007. //>>excludeStart("ide", pragmas.excludeIdeData);
  3008. args: [],
  3009. source: "classDeclarationTemplate\x0a\x09^ 'Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''''\x0a\x09package: ''', self selectedPackage, ''''",
  3010. referencedClasses: [],
  3011. //>>excludeEnd("ide");
  3012. messageSends: [",", "selectedPackage"]
  3013. }),
  3014. $globals.Browser);
  3015. $core.addMethod(
  3016. $core.method({
  3017. selector: "classes",
  3018. protocol: 'accessing',
  3019. fn: function (){
  3020. var self=this;
  3021. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3022. return $core.withContext(function($ctx1) {
  3023. //>>excludeEnd("ctx");
  3024. var $1;
  3025. return $recv($recv($recv($recv($globals.Smalltalk)._classes())._select_((function(each){
  3026. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3027. return $core.withContext(function($ctx2) {
  3028. //>>excludeEnd("ctx");
  3029. return $recv($recv(each)._category()).__eq(self["@selectedPackage"]);
  3030. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3031. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  3032. //>>excludeEnd("ctx");
  3033. })))._sort_((function(a,b){
  3034. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3035. return $core.withContext(function($ctx2) {
  3036. //>>excludeEnd("ctx");
  3037. $1=$recv(a)._name();
  3038. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3039. $ctx2.sendIdx["name"]=1;
  3040. //>>excludeEnd("ctx");
  3041. return $recv($1).__lt($recv(b)._name());
  3042. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3043. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)});
  3044. //>>excludeEnd("ctx");
  3045. })))._asSet();
  3046. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3047. }, function($ctx1) {$ctx1.fill(self,"classes",{},$globals.Browser)});
  3048. //>>excludeEnd("ctx");
  3049. },
  3050. //>>excludeStart("ide", pragmas.excludeIdeData);
  3051. args: [],
  3052. source: "classes\x0a\x09^ ((Smalltalk classes\x0a\x09select: [ :each | each category = selectedPackage ])\x0a\x09sort: [ :a :b | a name < b name ]) asSet",
  3053. referencedClasses: ["Smalltalk"],
  3054. //>>excludeEnd("ide");
  3055. messageSends: ["asSet", "sort:", "select:", "classes", "=", "category", "<", "name"]
  3056. }),
  3057. $globals.Browser);
  3058. $core.addMethod(
  3059. $core.method({
  3060. selector: "commitPackage",
  3061. protocol: 'actions',
  3062. fn: function (){
  3063. var self=this;
  3064. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3065. return $core.withContext(function($ctx1) {
  3066. //>>excludeEnd("ctx");
  3067. var $1,$receiver;
  3068. $1=self["@selectedPackage"];
  3069. if(($receiver = $1) == null || $receiver.isNil){
  3070. $1;
  3071. } else {
  3072. $recv($recv($globals.Package)._named_(self["@selectedPackage"]))._commit();
  3073. };
  3074. return self;
  3075. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3076. }, function($ctx1) {$ctx1.fill(self,"commitPackage",{},$globals.Browser)});
  3077. //>>excludeEnd("ctx");
  3078. },
  3079. //>>excludeStart("ide", pragmas.excludeIdeData);
  3080. args: [],
  3081. source: "commitPackage\x0a\x09selectedPackage ifNotNil: [\x0a\x09\x09(Package named: selectedPackage) commit ]",
  3082. referencedClasses: ["Package"],
  3083. //>>excludeEnd("ide");
  3084. messageSends: ["ifNotNil:", "commit", "named:"]
  3085. }),
  3086. $globals.Browser);
  3087. $core.addMethod(
  3088. $core.method({
  3089. selector: "compile",
  3090. protocol: 'actions',
  3091. fn: function (){
  3092. var self=this;
  3093. var currentEditLine;
  3094. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3095. return $core.withContext(function($ctx1) {
  3096. //>>excludeEnd("ctx");
  3097. var $1,$2,$3,$5,$4,$receiver;
  3098. self._disableSaveButton();
  3099. $1=$recv(self["@sourceArea"])._editor();
  3100. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3101. $ctx1.sendIdx["editor"]=1;
  3102. //>>excludeEnd("ctx");
  3103. currentEditLine=$recv($1)._getCursor();
  3104. $2=$recv(self["@selectedTab"]).__eq("comment");
  3105. if($core.assert($2)){
  3106. $3=self["@selectedClass"];
  3107. if(($receiver = $3) == null || $receiver.isNil){
  3108. $3;
  3109. } else {
  3110. self._compileClassComment();
  3111. };
  3112. } else {
  3113. $5=$recv(self["@selectedProtocol"])._notNil();
  3114. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3115. $ctx1.sendIdx["notNil"]=1;
  3116. //>>excludeEnd("ctx");
  3117. $4=$recv($5)._or_((function(){
  3118. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3119. return $core.withContext(function($ctx2) {
  3120. //>>excludeEnd("ctx");
  3121. return $recv(self["@selectedMethod"])._notNil();
  3122. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3123. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  3124. //>>excludeEnd("ctx");
  3125. }));
  3126. if($core.assert($4)){
  3127. self._compileMethodDefinition();
  3128. } else {
  3129. self._compileDefinition();
  3130. };
  3131. };
  3132. $recv($recv(self["@sourceArea"])._editor())._setCursor_(currentEditLine);
  3133. return self;
  3134. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3135. }, function($ctx1) {$ctx1.fill(self,"compile",{currentEditLine:currentEditLine},$globals.Browser)});
  3136. //>>excludeEnd("ctx");
  3137. },
  3138. //>>excludeStart("ide", pragmas.excludeIdeData);
  3139. args: [],
  3140. source: "compile\x0a\x09| currentEditLine |\x0a\x09self disableSaveButton.\x0a\x09currentEditLine := sourceArea editor getCursor.\x0a\x09selectedTab = #comment\x0a\x09ifTrue: [\x0a\x09\x09\x09selectedClass ifNotNil: [\x0a\x09\x09\x09\x09self compileClassComment ]]\x0a\x09ifFalse: [\x0a\x09\x09\x09(selectedProtocol notNil or: [ selectedMethod notNil ])\x0a\x09\x09\x09\x09ifFalse: [ self compileDefinition ]\x0a\x09\x09\x09\x09ifTrue: [ self compileMethodDefinition ]].\x0a\x09sourceArea editor setCursor: currentEditLine.",
  3141. referencedClasses: [],
  3142. //>>excludeEnd("ide");
  3143. messageSends: ["disableSaveButton", "getCursor", "editor", "ifTrue:ifFalse:", "=", "ifNotNil:", "compileClassComment", "ifFalse:ifTrue:", "or:", "notNil", "compileDefinition", "compileMethodDefinition", "setCursor:"]
  3144. }),
  3145. $globals.Browser);
  3146. $core.addMethod(
  3147. $core.method({
  3148. selector: "compileClassComment",
  3149. protocol: 'actions',
  3150. fn: function (){
  3151. var self=this;
  3152. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3153. return $core.withContext(function($ctx1) {
  3154. //>>excludeEnd("ctx");
  3155. $recv(self["@selectedClass"])._comment_($recv(self["@sourceArea"])._val());
  3156. return self;
  3157. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3158. }, function($ctx1) {$ctx1.fill(self,"compileClassComment",{},$globals.Browser)});
  3159. //>>excludeEnd("ctx");
  3160. },
  3161. //>>excludeStart("ide", pragmas.excludeIdeData);
  3162. args: [],
  3163. source: "compileClassComment\x0a\x09selectedClass comment: sourceArea val",
  3164. referencedClasses: [],
  3165. //>>excludeEnd("ide");
  3166. messageSends: ["comment:", "val"]
  3167. }),
  3168. $globals.Browser);
  3169. $core.addMethod(
  3170. $core.method({
  3171. selector: "compileDefinition",
  3172. protocol: 'actions',
  3173. fn: function (){
  3174. var self=this;
  3175. var newClass;
  3176. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3177. return $core.withContext(function($ctx1) {
  3178. //>>excludeEnd("ctx");
  3179. newClass=$recv($recv($globals.Compiler)._new())._evaluateExpression_($recv(self["@sourceArea"])._val());
  3180. self._resetClassesList();
  3181. self._updateCategoriesList();
  3182. self._updateClassesList();
  3183. self._selectClass_(newClass);
  3184. return self;
  3185. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3186. }, function($ctx1) {$ctx1.fill(self,"compileDefinition",{newClass:newClass},$globals.Browser)});
  3187. //>>excludeEnd("ctx");
  3188. },
  3189. //>>excludeStart("ide", pragmas.excludeIdeData);
  3190. args: [],
  3191. source: "compileDefinition\x0a\x09| newClass |\x0a\x09newClass := Compiler new evaluateExpression: sourceArea val.\x0a\x09self\x0a\x09resetClassesList;\x0a\x09updateCategoriesList;\x0a\x09updateClassesList.\x0a\x09self selectClass: newClass",
  3192. referencedClasses: ["Compiler"],
  3193. //>>excludeEnd("ide");
  3194. messageSends: ["evaluateExpression:", "new", "val", "resetClassesList", "updateCategoriesList", "updateClassesList", "selectClass:"]
  3195. }),
  3196. $globals.Browser);
  3197. $core.addMethod(
  3198. $core.method({
  3199. selector: "compileMethodDefinition",
  3200. protocol: 'actions',
  3201. fn: function (){
  3202. var self=this;
  3203. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3204. return $core.withContext(function($ctx1) {
  3205. //>>excludeEnd("ctx");
  3206. var $1;
  3207. $1=$recv(self["@selectedTab"]).__eq("instance");
  3208. if($core.assert($1)){
  3209. self._compileMethodDefinitionFor_(self["@selectedClass"]);
  3210. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3211. $ctx1.sendIdx["compileMethodDefinitionFor:"]=1;
  3212. //>>excludeEnd("ctx");
  3213. } else {
  3214. self._compileMethodDefinitionFor_($recv(self["@selectedClass"])._class());
  3215. };
  3216. return self;
  3217. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3218. }, function($ctx1) {$ctx1.fill(self,"compileMethodDefinition",{},$globals.Browser)});
  3219. //>>excludeEnd("ctx");
  3220. },
  3221. //>>excludeStart("ide", pragmas.excludeIdeData);
  3222. args: [],
  3223. source: "compileMethodDefinition\x0a\x09selectedTab = #instance\x0a\x09ifTrue: [ self compileMethodDefinitionFor: selectedClass ]\x0a\x09ifFalse: [ self compileMethodDefinitionFor: selectedClass class ]",
  3224. referencedClasses: [],
  3225. //>>excludeEnd("ide");
  3226. messageSends: ["ifTrue:ifFalse:", "=", "compileMethodDefinitionFor:", "class"]
  3227. }),
  3228. $globals.Browser);
  3229. $core.addMethod(
  3230. $core.method({
  3231. selector: "compileMethodDefinitionFor:",
  3232. protocol: 'actions',
  3233. fn: function (aClass){
  3234. var self=this;
  3235. var compiler,package_,method,compiledSource,source,node;
  3236. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3237. return $core.withContext(function($ctx1) {
  3238. //>>excludeEnd("ctx");
  3239. var $1,$2,$5,$4,$3,$6,$8,$7,$receiver;
  3240. var $early={};
  3241. try {
  3242. source=$recv(self["@sourceArea"])._val();
  3243. $1=self["@selectedProtocol"];
  3244. if(($receiver = $1) == null || $receiver.isNil){
  3245. self["@selectedProtocol"]=$recv(self["@selectedMethod"])._protocol();
  3246. self["@selectedProtocol"];
  3247. } else {
  3248. $1;
  3249. };
  3250. compiler=$recv($globals.Compiler)._new();
  3251. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3252. $ctx1.sendIdx["new"]=1;
  3253. //>>excludeEnd("ctx");
  3254. $recv(compiler)._source_(source);
  3255. node=$recv(compiler)._parse_(source);
  3256. $2=$recv(node)._isParseFailure();
  3257. if($core.assert($2)){
  3258. $5="PARSE ERROR: ".__comma($recv(node)._reason());
  3259. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3260. $ctx1.sendIdx[","]=3;
  3261. //>>excludeEnd("ctx");
  3262. $4=$recv($5).__comma(", position: ");
  3263. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3264. $ctx1.sendIdx[","]=2;
  3265. //>>excludeEnd("ctx");
  3266. $3=$recv($4).__comma($recv($recv(node)._position())._asString());
  3267. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3268. $ctx1.sendIdx[","]=1;
  3269. //>>excludeEnd("ctx");
  3270. return $recv($globals.Terminal)._alert_($3);
  3271. };
  3272. package_=$recv(aClass)._packageOfProtocol_(self["@selectedProtocol"]);
  3273. compiledSource=$recv(compiler)._compileNode_forClass_package_(node,aClass,package_);
  3274. method=$recv(compiler)._eval_forPackage_(compiledSource,package_);
  3275. $recv($recv(compiler)._unknownVariables())._do_((function(each){
  3276. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3277. return $core.withContext(function($ctx2) {
  3278. //>>excludeEnd("ctx");
  3279. $6=$recv($globals.Smalltalk)._existsJsGlobal_(each);
  3280. if(!$core.assert($6)){
  3281. $8=$recv("Declare '".__comma(each)).__comma("' as instance variable?");
  3282. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3283. $ctx2.sendIdx[","]=4;
  3284. //>>excludeEnd("ctx");
  3285. $7=$recv($globals.Terminal)._confirm_($8);
  3286. if($core.assert($7)){
  3287. self._addInstanceVariableNamed_toClass_(each,aClass);
  3288. throw $early=[self._compileMethodDefinitionFor_(aClass)];
  3289. };
  3290. };
  3291. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3292. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)});
  3293. //>>excludeEnd("ctx");
  3294. }));
  3295. $recv($recv($globals.ClassBuilder)._new())._installMethod_forClass_protocol_(method,aClass,self["@selectedProtocol"]);
  3296. self._updateMethodsList();
  3297. self._selectMethod_(method);
  3298. return self;
  3299. }
  3300. catch(e) {if(e===$early)return e[0]; throw e}
  3301. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3302. }, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,package_:package_,method:method,compiledSource:compiledSource,source:source,node:node},$globals.Browser)});
  3303. //>>excludeEnd("ctx");
  3304. },
  3305. //>>excludeStart("ide", pragmas.excludeIdeData);
  3306. args: ["aClass"],
  3307. source: "compileMethodDefinitionFor: aClass\x0a\x09| compiler package method compiledSource source node |\x0a\x09source := sourceArea val.\x0a\x09selectedProtocol ifNil: [ selectedProtocol := selectedMethod protocol ].\x0a\x09compiler := Compiler new.\x0a\x09compiler source: source.\x0a\x09node := compiler parse: source.\x0a\x09node isParseFailure ifTrue: [\x0a\x09^ Terminal alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString ].\x0a\x09package := aClass packageOfProtocol: selectedProtocol.\x0a\x09compiledSource := compiler compileNode: node forClass: aClass package: package.\x0a\x09method := compiler eval: compiledSource forPackage: package.\x0a\x09compiler unknownVariables do: [ :each |\x0a\x09\x09\x22Do not try to redeclare javascript's objects\x22\x0a\x09\x09(Smalltalk existsJsGlobal: each) ifFalse: [\x0a\x09\x09(Terminal confirm: 'Declare ''', each, ''' as instance variable?') ifTrue: [\x0a\x09\x09\x09self addInstanceVariableNamed: each toClass: aClass.\x0a\x09\x09\x09^ self compileMethodDefinitionFor: aClass ]] ].\x0a\x09ClassBuilder new installMethod: method forClass: aClass protocol: selectedProtocol.\x0a\x09self updateMethodsList.\x0a\x09self selectMethod: method",
  3308. referencedClasses: ["Compiler", "Terminal", "Smalltalk", "ClassBuilder"],
  3309. //>>excludeEnd("ide");
  3310. messageSends: ["val", "ifNil:", "protocol", "new", "source:", "parse:", "ifTrue:", "isParseFailure", "alert:", ",", "reason", "asString", "position", "packageOfProtocol:", "compileNode:forClass:package:", "eval:forPackage:", "do:", "unknownVariables", "ifFalse:", "existsJsGlobal:", "confirm:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "installMethod:forClass:protocol:", "updateMethodsList", "selectMethod:"]
  3311. }),
  3312. $globals.Browser);
  3313. $core.addMethod(
  3314. $core.method({
  3315. selector: "copyClass",
  3316. protocol: 'actions',
  3317. fn: function (){
  3318. var self=this;
  3319. var className;
  3320. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3321. return $core.withContext(function($ctx1) {
  3322. //>>excludeEnd("ctx");
  3323. var $1;
  3324. className=$recv($globals.Terminal)._prompt_("Copy class");
  3325. $1=$recv($recv(className)._notNil())._and_((function(){
  3326. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3327. return $core.withContext(function($ctx2) {
  3328. //>>excludeEnd("ctx");
  3329. return $recv(className)._notEmpty();
  3330. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3331. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3332. //>>excludeEnd("ctx");
  3333. }));
  3334. if($core.assert($1)){
  3335. $recv($recv($globals.ClassBuilder)._new())._copyClass_named_(self._selectedClass(),className);
  3336. self._resetClassesList();
  3337. self._updateClassesList();
  3338. self._selectClass_($recv($recv($globals.Smalltalk)._globals())._at_(className));
  3339. };
  3340. return self;
  3341. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3342. }, function($ctx1) {$ctx1.fill(self,"copyClass",{className:className},$globals.Browser)});
  3343. //>>excludeEnd("ctx");
  3344. },
  3345. //>>excludeStart("ide", pragmas.excludeIdeData);
  3346. args: [],
  3347. source: "copyClass\x0a\x09| className |\x0a\x09className := Terminal prompt: 'Copy class'.\x0a\x09(className notNil and: [ className notEmpty ]) ifTrue: [\x0a\x09\x09ClassBuilder new copyClass: self selectedClass named: className.\x0a\x09\x09\x09self\x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk globals at: className) ]",
  3348. referencedClasses: ["Terminal", "ClassBuilder", "Smalltalk"],
  3349. //>>excludeEnd("ide");
  3350. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "copyClass:named:", "new", "selectedClass", "resetClassesList", "updateClassesList", "selectClass:", "at:", "globals"]
  3351. }),
  3352. $globals.Browser);
  3353. $core.addMethod(
  3354. $core.method({
  3355. selector: "declarationSource",
  3356. protocol: 'accessing',
  3357. fn: function (){
  3358. var self=this;
  3359. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3360. return $core.withContext(function($ctx1) {
  3361. //>>excludeEnd("ctx");
  3362. var $1;
  3363. $1=$recv(self["@selectedTab"]).__eq("instance");
  3364. if($core.assert($1)){
  3365. return self._classDeclarationSource();
  3366. } else {
  3367. return self._metaclassDeclarationSource();
  3368. };
  3369. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3370. }, function($ctx1) {$ctx1.fill(self,"declarationSource",{},$globals.Browser)});
  3371. //>>excludeEnd("ctx");
  3372. },
  3373. //>>excludeStart("ide", pragmas.excludeIdeData);
  3374. args: [],
  3375. source: "declarationSource\x0a\x09^ selectedTab = #instance\x0a\x09ifTrue: [ self classDeclarationSource ]\x0a\x09ifFalse: [ self metaclassDeclarationSource ]",
  3376. referencedClasses: [],
  3377. //>>excludeEnd("ide");
  3378. messageSends: ["ifTrue:ifFalse:", "=", "classDeclarationSource", "metaclassDeclarationSource"]
  3379. }),
  3380. $globals.Browser);
  3381. $core.addMethod(
  3382. $core.method({
  3383. selector: "disableSaveButton",
  3384. protocol: 'actions',
  3385. fn: function (){
  3386. var self=this;
  3387. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3388. return $core.withContext(function($ctx1) {
  3389. //>>excludeEnd("ctx");
  3390. var $1,$receiver;
  3391. $1=self["@saveButton"];
  3392. if(($receiver = $1) == null || $receiver.isNil){
  3393. $1;
  3394. } else {
  3395. $recv(self["@saveButton"])._at_put_("disabled",true);
  3396. };
  3397. self["@unsavedChanges"]=false;
  3398. return self;
  3399. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3400. }, function($ctx1) {$ctx1.fill(self,"disableSaveButton",{},$globals.Browser)});
  3401. //>>excludeEnd("ctx");
  3402. },
  3403. //>>excludeStart("ide", pragmas.excludeIdeData);
  3404. args: [],
  3405. source: "disableSaveButton\x0a\x09saveButton ifNotNil: [\x0a\x09saveButton at: 'disabled' put: true ].\x0a\x09unsavedChanges := false",
  3406. referencedClasses: [],
  3407. //>>excludeEnd("ide");
  3408. messageSends: ["ifNotNil:", "at:put:"]
  3409. }),
  3410. $globals.Browser);
  3411. $core.addMethod(
  3412. $core.method({
  3413. selector: "dummyMethodSource",
  3414. protocol: 'accessing',
  3415. fn: function (){
  3416. var self=this;
  3417. return "messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements";
  3418. },
  3419. //>>excludeStart("ide", pragmas.excludeIdeData);
  3420. args: [],
  3421. source: "dummyMethodSource\x0a\x09^ 'messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements'",
  3422. referencedClasses: [],
  3423. //>>excludeEnd("ide");
  3424. messageSends: []
  3425. }),
  3426. $globals.Browser);
  3427. $core.addMethod(
  3428. $core.method({
  3429. selector: "handleSourceAreaKeyDown:",
  3430. protocol: 'actions',
  3431. fn: function (anEvent){
  3432. var self=this;
  3433. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3434. return $core.withContext(function($ctx1) {
  3435. //>>excludeEnd("ctx");
  3436. if(anEvent.ctrlKey) {
  3437. if(anEvent.keyCode === 83) { //ctrl+s
  3438. self._compile();
  3439. anEvent.preventDefault();
  3440. return false;
  3441. }
  3442. }
  3443. ;
  3444. return self;
  3445. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3446. }, function($ctx1) {$ctx1.fill(self,"handleSourceAreaKeyDown:",{anEvent:anEvent},$globals.Browser)});
  3447. //>>excludeEnd("ctx");
  3448. },
  3449. //>>excludeStart("ide", pragmas.excludeIdeData);
  3450. args: ["anEvent"],
  3451. source: "handleSourceAreaKeyDown: anEvent\x0a\x09<if(anEvent.ctrlKey) {\x0a\x09\x09if(anEvent.keyCode === 83) { //ctrl+s\x0a\x09\x09\x09self._compile();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09}\x0a\x09>",
  3452. referencedClasses: [],
  3453. //>>excludeEnd("ide");
  3454. messageSends: []
  3455. }),
  3456. $globals.Browser);
  3457. $core.addMethod(
  3458. $core.method({
  3459. selector: "hideClassButtons",
  3460. protocol: 'actions',
  3461. fn: function (){
  3462. var self=this;
  3463. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3464. return $core.withContext(function($ctx1) {
  3465. //>>excludeEnd("ctx");
  3466. $recv($recv(self["@classButtons"])._asJQuery())._hide();
  3467. return self;
  3468. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3469. }, function($ctx1) {$ctx1.fill(self,"hideClassButtons",{},$globals.Browser)});
  3470. //>>excludeEnd("ctx");
  3471. },
  3472. //>>excludeStart("ide", pragmas.excludeIdeData);
  3473. args: [],
  3474. source: "hideClassButtons\x0a\x09classButtons asJQuery hide",
  3475. referencedClasses: [],
  3476. //>>excludeEnd("ide");
  3477. messageSends: ["hide", "asJQuery"]
  3478. }),
  3479. $globals.Browser);
  3480. $core.addMethod(
  3481. $core.method({
  3482. selector: "hideMethodButtons",
  3483. protocol: 'actions',
  3484. fn: function (){
  3485. var self=this;
  3486. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3487. return $core.withContext(function($ctx1) {
  3488. //>>excludeEnd("ctx");
  3489. $recv($recv(self["@methodButtons"])._asJQuery())._hide();
  3490. return self;
  3491. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3492. }, function($ctx1) {$ctx1.fill(self,"hideMethodButtons",{},$globals.Browser)});
  3493. //>>excludeEnd("ctx");
  3494. },
  3495. //>>excludeStart("ide", pragmas.excludeIdeData);
  3496. args: [],
  3497. source: "hideMethodButtons\x0a\x09methodButtons asJQuery hide",
  3498. referencedClasses: [],
  3499. //>>excludeEnd("ide");
  3500. messageSends: ["hide", "asJQuery"]
  3501. }),
  3502. $globals.Browser);
  3503. $core.addMethod(
  3504. $core.method({
  3505. selector: "initialize",
  3506. protocol: 'initialization',
  3507. fn: function (){
  3508. var self=this;
  3509. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3510. return $core.withContext(function($ctx1) {
  3511. //>>excludeEnd("ctx");
  3512. (
  3513. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3514. $ctx1.supercall = true,
  3515. //>>excludeEnd("ctx");
  3516. ($globals.Browser.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
  3517. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3518. $ctx1.supercall = false;
  3519. //>>excludeEnd("ctx");;
  3520. self["@selectedTab"]="instance";
  3521. self["@selectedPackage"]=$recv(self._packages())._first();
  3522. self["@unsavedChanges"]=false;
  3523. return self;
  3524. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3525. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.Browser)});
  3526. //>>excludeEnd("ctx");
  3527. },
  3528. //>>excludeStart("ide", pragmas.excludeIdeData);
  3529. args: [],
  3530. source: "initialize\x0a\x09super initialize.\x0a\x09selectedTab := #instance.\x0a\x09selectedPackage := self packages first.\x0a\x09unsavedChanges := false",
  3531. referencedClasses: [],
  3532. //>>excludeEnd("ide");
  3533. messageSends: ["initialize", "first", "packages"]
  3534. }),
  3535. $globals.Browser);
  3536. $core.addMethod(
  3537. $core.method({
  3538. selector: "label",
  3539. protocol: 'accessing',
  3540. fn: function (){
  3541. var self=this;
  3542. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3543. return $core.withContext(function($ctx1) {
  3544. //>>excludeEnd("ctx");
  3545. var $1,$receiver;
  3546. $1=self["@selectedClass"];
  3547. if(($receiver = $1) == null || $receiver.isNil){
  3548. return "Browser (nil)";
  3549. } else {
  3550. return "Browser: ".__comma($recv(self["@selectedClass"])._name());
  3551. };
  3552. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3553. }, function($ctx1) {$ctx1.fill(self,"label",{},$globals.Browser)});
  3554. //>>excludeEnd("ctx");
  3555. },
  3556. //>>excludeStart("ide", pragmas.excludeIdeData);
  3557. args: [],
  3558. source: "label\x0a\x09^ selectedClass\x0a\x09ifNil: [ 'Browser (nil)' ]\x0a\x09ifNotNil: [ 'Browser: ', selectedClass name ]",
  3559. referencedClasses: [],
  3560. //>>excludeEnd("ide");
  3561. messageSends: ["ifNil:ifNotNil:", ",", "name"]
  3562. }),
  3563. $globals.Browser);
  3564. $core.addMethod(
  3565. $core.method({
  3566. selector: "metaclassDeclarationSource",
  3567. protocol: 'accessing',
  3568. fn: function (){
  3569. var self=this;
  3570. var stream;
  3571. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3572. return $core.withContext(function($ctx1) {
  3573. //>>excludeEnd("ctx");
  3574. var $1,$2,$3,$receiver;
  3575. stream=""._writeStream();
  3576. $1=self["@selectedClass"];
  3577. if(($receiver = $1) == null || $receiver.isNil){
  3578. $1;
  3579. } else {
  3580. $2=stream;
  3581. $recv($2)._nextPutAll_($recv(self["@selectedClass"])._asString());
  3582. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3583. $ctx1.sendIdx["nextPutAll:"]=1;
  3584. //>>excludeEnd("ctx");
  3585. $recv($2)._nextPutAll_(" class ");
  3586. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3587. $ctx1.sendIdx["nextPutAll:"]=2;
  3588. //>>excludeEnd("ctx");
  3589. $3=$recv($2)._nextPutAll_("instanceVariableNames: '");
  3590. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3591. $ctx1.sendIdx["nextPutAll:"]=3;
  3592. //>>excludeEnd("ctx");
  3593. $3;
  3594. $recv($recv($recv(self["@selectedClass"])._class())._instanceVariableNames())._do_separatedBy_((function(each){
  3595. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3596. return $core.withContext(function($ctx2) {
  3597. //>>excludeEnd("ctx");
  3598. return $recv(stream)._nextPutAll_(each);
  3599. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3600. $ctx2.sendIdx["nextPutAll:"]=4;
  3601. //>>excludeEnd("ctx");
  3602. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3603. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  3604. //>>excludeEnd("ctx");
  3605. }),(function(){
  3606. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3607. return $core.withContext(function($ctx2) {
  3608. //>>excludeEnd("ctx");
  3609. return $recv(stream)._nextPutAll_(" ");
  3610. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3611. $ctx2.sendIdx["nextPutAll:"]=5;
  3612. //>>excludeEnd("ctx");
  3613. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3614. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  3615. //>>excludeEnd("ctx");
  3616. }));
  3617. $recv(stream)._nextPutAll_("'");
  3618. };
  3619. return $recv(stream)._contents();
  3620. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3621. }, function($ctx1) {$ctx1.fill(self,"metaclassDeclarationSource",{stream:stream},$globals.Browser)});
  3622. //>>excludeEnd("ctx");
  3623. },
  3624. //>>excludeStart("ide", pragmas.excludeIdeData);
  3625. args: [],
  3626. source: "metaclassDeclarationSource\x0a\x09| stream |\x0a\x09stream := '' writeStream.\x0a\x09selectedClass ifNotNil: [\x0a\x09stream\x0a\x09\x09nextPutAll: selectedClass asString;\x0a\x09\x09nextPutAll: ' class ';\x0a\x09\x09nextPutAll: 'instanceVariableNames: '''.\x0a\x09selectedClass class instanceVariableNames\x0a\x09\x09do: [ :each | stream nextPutAll: each ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ' ' ].\x0a\x09stream nextPutAll: '''' ].\x0a\x09^ stream contents",
  3627. referencedClasses: [],
  3628. //>>excludeEnd("ide");
  3629. messageSends: ["writeStream", "ifNotNil:", "nextPutAll:", "asString", "do:separatedBy:", "instanceVariableNames", "class", "contents"]
  3630. }),
  3631. $globals.Browser);
  3632. $core.addMethod(
  3633. $core.method({
  3634. selector: "methodSource",
  3635. protocol: 'accessing',
  3636. fn: function (){
  3637. var self=this;
  3638. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3639. return $core.withContext(function($ctx1) {
  3640. //>>excludeEnd("ctx");
  3641. var $1,$receiver;
  3642. $1=self["@selectedMethod"];
  3643. if(($receiver = $1) == null || $receiver.isNil){
  3644. return self._dummyMethodSource();
  3645. } else {
  3646. return $recv(self["@selectedMethod"])._source();
  3647. };
  3648. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3649. }, function($ctx1) {$ctx1.fill(self,"methodSource",{},$globals.Browser)});
  3650. //>>excludeEnd("ctx");
  3651. },
  3652. //>>excludeStart("ide", pragmas.excludeIdeData);
  3653. args: [],
  3654. source: "methodSource\x0a\x09^ selectedMethod\x0a\x09ifNil: [ self dummyMethodSource ]\x0a\x09ifNotNil: [ selectedMethod source ]",
  3655. referencedClasses: [],
  3656. //>>excludeEnd("ide");
  3657. messageSends: ["ifNil:ifNotNil:", "dummyMethodSource", "source"]
  3658. }),
  3659. $globals.Browser);
  3660. $core.addMethod(
  3661. $core.method({
  3662. selector: "methods",
  3663. protocol: 'accessing',
  3664. fn: function (){
  3665. var self=this;
  3666. var klass;
  3667. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3668. return $core.withContext(function($ctx1) {
  3669. //>>excludeEnd("ctx");
  3670. var $1,$2,$3,$5,$6,$4,$7,$receiver;
  3671. $1=$recv(self["@selectedTab"]).__eq("comment");
  3672. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3673. $ctx1.sendIdx["="]=1;
  3674. //>>excludeEnd("ctx");
  3675. if($core.assert($1)){
  3676. return [];
  3677. };
  3678. $2=self["@selectedClass"];
  3679. if(($receiver = $2) == null || $receiver.isNil){
  3680. $2;
  3681. } else {
  3682. $3=$recv(self["@selectedTab"]).__eq("instance");
  3683. if($core.assert($3)){
  3684. klass=self["@selectedClass"];
  3685. } else {
  3686. klass=$recv(self["@selectedClass"])._class();
  3687. };
  3688. klass;
  3689. };
  3690. $5=self["@selectedProtocol"];
  3691. if(($receiver = $5) == null || $receiver.isNil){
  3692. $6=klass;
  3693. if(($receiver = $6) == null || $receiver.isNil){
  3694. $4=[];
  3695. } else {
  3696. $4=$recv($recv(klass)._methodDictionary())._values();
  3697. };
  3698. } else {
  3699. $4=$recv(klass)._methodsInProtocol_(self["@selectedProtocol"]);
  3700. };
  3701. return $recv($4)._sort_((function(a,b){
  3702. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3703. return $core.withContext(function($ctx2) {
  3704. //>>excludeEnd("ctx");
  3705. $7=$recv(a)._selector();
  3706. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3707. $ctx2.sendIdx["selector"]=1;
  3708. //>>excludeEnd("ctx");
  3709. return $recv($7).__lt($recv(b)._selector());
  3710. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3711. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,9)});
  3712. //>>excludeEnd("ctx");
  3713. }));
  3714. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3715. }, function($ctx1) {$ctx1.fill(self,"methods",{klass:klass},$globals.Browser)});
  3716. //>>excludeEnd("ctx");
  3717. },
  3718. //>>excludeStart("ide", pragmas.excludeIdeData);
  3719. args: [],
  3720. source: "methods\x0a\x09| klass |\x0a\x09selectedTab = #comment ifTrue: [ ^ #() ].\x0a\x09selectedClass ifNotNil: [\x0a\x09klass := selectedTab = #instance\x0a\x09\x09ifTrue: [ selectedClass ]\x0a\x09\x09ifFalse: [ selectedClass class ]].\x0a\x09^ (selectedProtocol\x0a\x09ifNil: [\x0a\x09\x09klass\x0a\x09\x09ifNil: [ #() ]\x0a\x09\x09ifNotNil: [ klass methodDictionary values ]]\x0a\x09ifNotNil: [\x0a\x09\x09klass methodsInProtocol: selectedProtocol ]) \x0a\x09\x09\x09\x09sort: [ :a :b | a selector < b selector ]",
  3721. referencedClasses: [],
  3722. //>>excludeEnd("ide");
  3723. messageSends: ["ifTrue:", "=", "ifNotNil:", "ifTrue:ifFalse:", "class", "sort:", "ifNil:ifNotNil:", "values", "methodDictionary", "methodsInProtocol:", "<", "selector"]
  3724. }),
  3725. $globals.Browser);
  3726. $core.addMethod(
  3727. $core.method({
  3728. selector: "packages",
  3729. protocol: 'accessing',
  3730. fn: function (){
  3731. var self=this;
  3732. var packages;
  3733. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3734. return $core.withContext(function($ctx1) {
  3735. //>>excludeEnd("ctx");
  3736. var $2,$3,$1;
  3737. packages=$recv($globals.Array)._new();
  3738. $recv($recv($globals.Smalltalk)._classes())._do_((function(each){
  3739. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3740. return $core.withContext(function($ctx2) {
  3741. //>>excludeEnd("ctx");
  3742. $2=packages;
  3743. $3=$recv(each)._category();
  3744. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3745. $ctx2.sendIdx["category"]=1;
  3746. //>>excludeEnd("ctx");
  3747. $1=$recv($2)._includes_($3);
  3748. if(!$core.assert($1)){
  3749. return $recv(packages)._add_($recv(each)._category());
  3750. };
  3751. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3752. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  3753. //>>excludeEnd("ctx");
  3754. }));
  3755. return $recv(packages)._sort();
  3756. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3757. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},$globals.Browser)});
  3758. //>>excludeEnd("ctx");
  3759. },
  3760. //>>excludeStart("ide", pragmas.excludeIdeData);
  3761. args: [],
  3762. source: "packages\x0a\x09| packages |\x0a\x09packages := Array new.\x0a\x09Smalltalk classes do: [ :each |\x0a\x09(packages includes: each category) ifFalse: [\x0a\x09\x09packages add: each category ]].\x0a\x09^ packages sort",
  3763. referencedClasses: ["Array", "Smalltalk"],
  3764. //>>excludeEnd("ide");
  3765. messageSends: ["new", "do:", "classes", "ifFalse:", "includes:", "category", "add:", "sort"]
  3766. }),
  3767. $globals.Browser);
  3768. $core.addMethod(
  3769. $core.method({
  3770. selector: "protocols",
  3771. protocol: 'accessing',
  3772. fn: function (){
  3773. var self=this;
  3774. var klass;
  3775. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3776. return $core.withContext(function($ctx1) {
  3777. //>>excludeEnd("ctx");
  3778. var $1,$2,$3,$receiver;
  3779. var $early={};
  3780. try {
  3781. $1=self["@selectedClass"];
  3782. if(($receiver = $1) == null || $receiver.isNil){
  3783. $1;
  3784. } else {
  3785. $2=$recv(self["@selectedTab"]).__eq("comment");
  3786. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3787. $ctx1.sendIdx["="]=1;
  3788. //>>excludeEnd("ctx");
  3789. if($core.assert($2)){
  3790. return [];
  3791. };
  3792. $3=$recv(self["@selectedTab"]).__eq("instance");
  3793. if($core.assert($3)){
  3794. klass=self["@selectedClass"];
  3795. } else {
  3796. klass=$recv(self["@selectedClass"])._class();
  3797. };
  3798. klass;
  3799. $recv($recv(klass)._methodDictionary())._ifEmpty_((function(){
  3800. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3801. return $core.withContext(function($ctx2) {
  3802. //>>excludeEnd("ctx");
  3803. throw $early=[$recv($globals.Array)._with_("not yet classified")];
  3804. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3805. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)});
  3806. //>>excludeEnd("ctx");
  3807. }));
  3808. return $recv(klass)._protocols();
  3809. };
  3810. return $recv($globals.Array)._new();
  3811. }
  3812. catch(e) {if(e===$early)return e[0]; throw e}
  3813. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3814. }, function($ctx1) {$ctx1.fill(self,"protocols",{klass:klass},$globals.Browser)});
  3815. //>>excludeEnd("ctx");
  3816. },
  3817. //>>excludeStart("ide", pragmas.excludeIdeData);
  3818. args: [],
  3819. source: "protocols\x0a\x09| klass |\x0a\x09selectedClass ifNotNil: [\x0a\x09selectedTab = #comment ifTrue: [ ^ #() ].\x0a\x09klass := selectedTab = #instance\x0a\x09\x09ifTrue: [ selectedClass ]\x0a\x09\x09ifFalse: [ selectedClass class ].\x0a\x09klass methodDictionary ifEmpty: [\x0a\x09\x09^ Array with: 'not yet classified' ].\x0a\x09^ klass protocols ].\x0a\x09^ Array new",
  3820. referencedClasses: ["Array"],
  3821. //>>excludeEnd("ide");
  3822. messageSends: ["ifNotNil:", "ifTrue:", "=", "ifTrue:ifFalse:", "class", "ifEmpty:", "methodDictionary", "with:", "protocols", "new"]
  3823. }),
  3824. $globals.Browser);
  3825. $core.addMethod(
  3826. $core.method({
  3827. selector: "removeClass",
  3828. protocol: 'actions',
  3829. fn: function (){
  3830. var self=this;
  3831. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3832. return $core.withContext(function($ctx1) {
  3833. //>>excludeEnd("ctx");
  3834. var $2,$1;
  3835. $2=$recv("Do you really want to remove ".__comma($recv(self["@selectedClass"])._name())).__comma("?");
  3836. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3837. $ctx1.sendIdx[","]=1;
  3838. //>>excludeEnd("ctx");
  3839. $1=$recv($globals.Terminal)._confirm_($2);
  3840. if($core.assert($1)){
  3841. $recv($globals.Smalltalk)._removeClass_(self["@selectedClass"]);
  3842. self._resetClassesList();
  3843. self._selectClass_(nil);
  3844. };
  3845. return self;
  3846. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3847. }, function($ctx1) {$ctx1.fill(self,"removeClass",{},$globals.Browser)});
  3848. //>>excludeEnd("ctx");
  3849. },
  3850. //>>excludeStart("ide", pragmas.excludeIdeData);
  3851. args: [],
  3852. source: "removeClass\x0a\x09(Terminal confirm: 'Do you really want to remove ', selectedClass name, '?')\x0a\x09ifTrue: [\x0a\x09\x09Smalltalk removeClass: selectedClass.\x0a\x09\x09self resetClassesList.\x0a\x09\x09self selectClass: nil ]",
  3853. referencedClasses: ["Terminal", "Smalltalk"],
  3854. //>>excludeEnd("ide");
  3855. messageSends: ["ifTrue:", "confirm:", ",", "name", "removeClass:", "resetClassesList", "selectClass:"]
  3856. }),
  3857. $globals.Browser);
  3858. $core.addMethod(
  3859. $core.method({
  3860. selector: "removeMethod",
  3861. protocol: 'actions',
  3862. fn: function (){
  3863. var self=this;
  3864. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3865. return $core.withContext(function($ctx1) {
  3866. //>>excludeEnd("ctx");
  3867. var $1,$3,$2,$4;
  3868. $1=self._cancelChanges();
  3869. if($core.assert($1)){
  3870. $3=$recv("Do you really want to remove #".__comma($recv(self["@selectedMethod"])._selector())).__comma("?");
  3871. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3872. $ctx1.sendIdx[","]=1;
  3873. //>>excludeEnd("ctx");
  3874. $2=$recv($globals.Terminal)._confirm_($3);
  3875. if($core.assert($2)){
  3876. $4=$recv(self["@selectedTab"]).__eq("instance");
  3877. if($core.assert($4)){
  3878. $recv(self["@selectedClass"])._removeCompiledMethod_(self["@selectedMethod"]);
  3879. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3880. $ctx1.sendIdx["removeCompiledMethod:"]=1;
  3881. //>>excludeEnd("ctx");
  3882. } else {
  3883. $recv($recv(self["@selectedClass"])._class())._removeCompiledMethod_(self["@selectedMethod"]);
  3884. };
  3885. self._selectMethod_(nil);
  3886. };
  3887. };
  3888. return self;
  3889. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3890. }, function($ctx1) {$ctx1.fill(self,"removeMethod",{},$globals.Browser)});
  3891. //>>excludeEnd("ctx");
  3892. },
  3893. //>>excludeStart("ide", pragmas.excludeIdeData);
  3894. args: [],
  3895. source: "removeMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09(Terminal confirm: 'Do you really want to remove #', selectedMethod selector, '?')\x0a\x09\x09ifTrue: [\x0a\x09\x09selectedTab = #instance\x0a\x09\x09\x09ifTrue: [ selectedClass removeCompiledMethod: selectedMethod ]\x0a\x09\x09\x09ifFalse: [ selectedClass class removeCompiledMethod: selectedMethod ].\x0a\x09\x09self selectMethod: nil ]]",
  3896. referencedClasses: ["Terminal"],
  3897. //>>excludeEnd("ide");
  3898. messageSends: ["ifTrue:", "cancelChanges", "confirm:", ",", "selector", "ifTrue:ifFalse:", "=", "removeCompiledMethod:", "class", "selectMethod:"]
  3899. }),
  3900. $globals.Browser);
  3901. $core.addMethod(
  3902. $core.method({
  3903. selector: "removePackage",
  3904. protocol: 'actions',
  3905. fn: function (){
  3906. var self=this;
  3907. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3908. return $core.withContext(function($ctx1) {
  3909. //>>excludeEnd("ctx");
  3910. var $2,$1;
  3911. $2=$recv("Do you really want to remove the whole package ".__comma(self["@selectedPackage"])).__comma(" with all its classes?");
  3912. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3913. $ctx1.sendIdx[","]=1;
  3914. //>>excludeEnd("ctx");
  3915. $1=$recv($globals.Terminal)._confirm_($2);
  3916. if($core.assert($1)){
  3917. $recv($globals.Smalltalk)._removePackage_(self["@selectedPackage"]);
  3918. self._updateCategoriesList();
  3919. };
  3920. return self;
  3921. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3922. }, function($ctx1) {$ctx1.fill(self,"removePackage",{},$globals.Browser)});
  3923. //>>excludeEnd("ctx");
  3924. },
  3925. //>>excludeStart("ide", pragmas.excludeIdeData);
  3926. args: [],
  3927. source: "removePackage\x0a\x0a\x09(Terminal confirm: 'Do you really want to remove the whole package ', selectedPackage, ' with all its classes?')\x0a\x09ifTrue: [\x0a\x09\x09Smalltalk removePackage: selectedPackage.\x0a\x09\x09self updateCategoriesList ]",
  3928. referencedClasses: ["Terminal", "Smalltalk"],
  3929. //>>excludeEnd("ide");
  3930. messageSends: ["ifTrue:", "confirm:", ",", "removePackage:", "updateCategoriesList"]
  3931. }),
  3932. $globals.Browser);
  3933. $core.addMethod(
  3934. $core.method({
  3935. selector: "renameClass",
  3936. protocol: 'actions',
  3937. fn: function (){
  3938. var self=this;
  3939. var newName;
  3940. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3941. return $core.withContext(function($ctx1) {
  3942. //>>excludeEnd("ctx");
  3943. var $1;
  3944. newName=$recv($globals.Terminal)._prompt_("Rename class ".__comma($recv(self["@selectedClass"])._name()));
  3945. $1=$recv($recv(newName)._notNil())._and_((function(){
  3946. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3947. return $core.withContext(function($ctx2) {
  3948. //>>excludeEnd("ctx");
  3949. return $recv(newName)._notEmpty();
  3950. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3951. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3952. //>>excludeEnd("ctx");
  3953. }));
  3954. if($core.assert($1)){
  3955. $recv(self["@selectedClass"])._rename_(newName);
  3956. self._updateClassesList();
  3957. self._updateSourceAndButtons();
  3958. };
  3959. return self;
  3960. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3961. }, function($ctx1) {$ctx1.fill(self,"renameClass",{newName:newName},$globals.Browser)});
  3962. //>>excludeEnd("ctx");
  3963. },
  3964. //>>excludeStart("ide", pragmas.excludeIdeData);
  3965. args: [],
  3966. source: "renameClass\x0a\x09| newName |\x0a\x09newName := Terminal prompt: 'Rename class ', selectedClass name.\x0a\x09(newName notNil and: [ newName notEmpty ]) ifTrue: [\x0a\x09selectedClass rename: newName.\x0a\x09self\x0a\x09\x09updateClassesList;\x0a\x09\x09updateSourceAndButtons ]",
  3967. referencedClasses: ["Terminal"],
  3968. //>>excludeEnd("ide");
  3969. messageSends: ["prompt:", ",", "name", "ifTrue:", "and:", "notNil", "notEmpty", "rename:", "updateClassesList", "updateSourceAndButtons"]
  3970. }),
  3971. $globals.Browser);
  3972. $core.addMethod(
  3973. $core.method({
  3974. selector: "renamePackage",
  3975. protocol: 'actions',
  3976. fn: function (){
  3977. var self=this;
  3978. var newName;
  3979. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3980. return $core.withContext(function($ctx1) {
  3981. //>>excludeEnd("ctx");
  3982. var $1,$receiver;
  3983. newName=$recv($globals.Terminal)._prompt_("Rename package ".__comma(self["@selectedPackage"]));
  3984. $1=newName;
  3985. if(($receiver = $1) == null || $receiver.isNil){
  3986. $1;
  3987. } else {
  3988. $recv(newName)._ifNotEmpty_((function(){
  3989. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3990. return $core.withContext(function($ctx2) {
  3991. //>>excludeEnd("ctx");
  3992. $recv($globals.Smalltalk)._renamePackage_to_(self["@selectedPackage"],newName);
  3993. return self._updateCategoriesList();
  3994. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3995. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  3996. //>>excludeEnd("ctx");
  3997. }));
  3998. };
  3999. return self;
  4000. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4001. }, function($ctx1) {$ctx1.fill(self,"renamePackage",{newName:newName},$globals.Browser)});
  4002. //>>excludeEnd("ctx");
  4003. },
  4004. //>>excludeStart("ide", pragmas.excludeIdeData);
  4005. args: [],
  4006. source: "renamePackage\x0a\x0a\x09| newName |\x0a\x09newName := Terminal prompt: 'Rename package ', selectedPackage.\x0a\x09newName ifNotNil: [ newName ifNotEmpty: [\x0a\x09Smalltalk renamePackage: selectedPackage to: newName.\x0a\x09self updateCategoriesList ]]",
  4007. referencedClasses: ["Terminal", "Smalltalk"],
  4008. //>>excludeEnd("ide");
  4009. messageSends: ["prompt:", ",", "ifNotNil:", "ifNotEmpty:", "renamePackage:to:", "updateCategoriesList"]
  4010. }),
  4011. $globals.Browser);
  4012. $core.addMethod(
  4013. $core.method({
  4014. selector: "renderBottomPanelOn:",
  4015. protocol: 'rendering',
  4016. fn: function (html){
  4017. var self=this;
  4018. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4019. return $core.withContext(function($ctx1) {
  4020. //>>excludeEnd("ctx");
  4021. var $1;
  4022. $1=$recv(html)._div();
  4023. $recv($1)._class_("amber_sourceCode");
  4024. $recv($1)._with_((function(){
  4025. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4026. return $core.withContext(function($ctx2) {
  4027. //>>excludeEnd("ctx");
  4028. self["@sourceArea"]=$recv($globals.SourceArea)._new();
  4029. self["@sourceArea"];
  4030. $recv(self["@sourceArea"])._renderOn_(html);
  4031. $recv(self["@sourceArea"])._onKeyDown_((function(e){
  4032. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4033. return $core.withContext(function($ctx3) {
  4034. //>>excludeEnd("ctx");
  4035. return self._handleSourceAreaKeyDown_(e);
  4036. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4037. }, function($ctx3) {$ctx3.fillBlock({e:e},$ctx2,2)});
  4038. //>>excludeEnd("ctx");
  4039. }));
  4040. return $recv(self["@sourceArea"])._onKeyUp_((function(){
  4041. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4042. return $core.withContext(function($ctx3) {
  4043. //>>excludeEnd("ctx");
  4044. return self._updateStatus();
  4045. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4046. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  4047. //>>excludeEnd("ctx");
  4048. }));
  4049. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4050. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4051. //>>excludeEnd("ctx");
  4052. }));
  4053. return self;
  4054. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4055. }, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},$globals.Browser)});
  4056. //>>excludeEnd("ctx");
  4057. },
  4058. //>>excludeStart("ide", pragmas.excludeIdeData);
  4059. args: ["html"],
  4060. source: "renderBottomPanelOn: html\x0a\x09html div\x0a\x09class: 'amber_sourceCode';\x0a\x09with: [\x0a\x09\x09sourceArea := SourceArea new.\x0a\x09\x09sourceArea renderOn: html.\x0a\x09\x09\x09sourceArea onKeyDown: [ :e |\x0a\x09\x09\x09\x09self handleSourceAreaKeyDown: e ].\x0a\x09\x09sourceArea onKeyUp: [ self updateStatus ]]",
  4061. referencedClasses: ["SourceArea"],
  4062. //>>excludeEnd("ide");
  4063. messageSends: ["class:", "div", "with:", "new", "renderOn:", "onKeyDown:", "handleSourceAreaKeyDown:", "onKeyUp:", "updateStatus"]
  4064. }),
  4065. $globals.Browser);
  4066. $core.addMethod(
  4067. $core.method({
  4068. selector: "renderBoxOn:",
  4069. protocol: 'rendering',
  4070. fn: function (html){
  4071. var self=this;
  4072. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4073. return $core.withContext(function($ctx1) {
  4074. //>>excludeEnd("ctx");
  4075. self._renderTopPanelOn_(html);
  4076. self._renderTabsOn_(html);
  4077. self._renderBottomPanelOn_(html);
  4078. return self;
  4079. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4080. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.Browser)});
  4081. //>>excludeEnd("ctx");
  4082. },
  4083. //>>excludeStart("ide", pragmas.excludeIdeData);
  4084. args: ["html"],
  4085. source: "renderBoxOn: html\x0a\x09self\x0a\x09renderTopPanelOn: html;\x0a\x09renderTabsOn: html;\x0a\x09renderBottomPanelOn: html",
  4086. referencedClasses: [],
  4087. //>>excludeEnd("ide");
  4088. messageSends: ["renderTopPanelOn:", "renderTabsOn:", "renderBottomPanelOn:"]
  4089. }),
  4090. $globals.Browser);
  4091. $core.addMethod(
  4092. $core.method({
  4093. selector: "renderButtonsOn:",
  4094. protocol: 'rendering',
  4095. fn: function (html){
  4096. var self=this;
  4097. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4098. return $core.withContext(function($ctx1) {
  4099. //>>excludeEnd("ctx");
  4100. var $1,$2,$3,$5,$6,$7,$8,$9,$4;
  4101. self["@saveButton"]=$recv(html)._button();
  4102. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4103. $ctx1.sendIdx["button"]=1;
  4104. //>>excludeEnd("ctx");
  4105. $1=self["@saveButton"];
  4106. $recv($1)._with_("Save");
  4107. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4108. $ctx1.sendIdx["with:"]=1;
  4109. //>>excludeEnd("ctx");
  4110. $2=$recv($1)._onClick_((function(){
  4111. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4112. return $core.withContext(function($ctx2) {
  4113. //>>excludeEnd("ctx");
  4114. return self._compile();
  4115. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4116. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4117. //>>excludeEnd("ctx");
  4118. }));
  4119. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4120. $ctx1.sendIdx["onClick:"]=1;
  4121. //>>excludeEnd("ctx");
  4122. self["@methodButtons"]=$recv(html)._span();
  4123. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4124. $ctx1.sendIdx["span"]=1;
  4125. //>>excludeEnd("ctx");
  4126. self["@classButtons"]=$recv(html)._span();
  4127. $3=$recv(html)._div();
  4128. $recv($3)._class_("right");
  4129. $4=$recv($3)._with_((function(){
  4130. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4131. return $core.withContext(function($ctx2) {
  4132. //>>excludeEnd("ctx");
  4133. $5=$recv(html)._button();
  4134. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4135. $ctx2.sendIdx["button"]=2;
  4136. //>>excludeEnd("ctx");
  4137. $recv($5)._with_("DoIt");
  4138. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4139. $ctx2.sendIdx["with:"]=3;
  4140. //>>excludeEnd("ctx");
  4141. $6=$recv($5)._onClick_((function(){
  4142. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4143. return $core.withContext(function($ctx3) {
  4144. //>>excludeEnd("ctx");
  4145. return $recv(self["@sourceArea"])._doIt();
  4146. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4147. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  4148. //>>excludeEnd("ctx");
  4149. }));
  4150. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4151. $ctx2.sendIdx["onClick:"]=2;
  4152. //>>excludeEnd("ctx");
  4153. $6;
  4154. $7=$recv(html)._button();
  4155. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4156. $ctx2.sendIdx["button"]=3;
  4157. //>>excludeEnd("ctx");
  4158. $recv($7)._with_("PrintIt");
  4159. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4160. $ctx2.sendIdx["with:"]=4;
  4161. //>>excludeEnd("ctx");
  4162. $8=$recv($7)._onClick_((function(){
  4163. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4164. return $core.withContext(function($ctx3) {
  4165. //>>excludeEnd("ctx");
  4166. return $recv(self["@sourceArea"])._printIt();
  4167. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4168. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  4169. //>>excludeEnd("ctx");
  4170. }));
  4171. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4172. $ctx2.sendIdx["onClick:"]=3;
  4173. //>>excludeEnd("ctx");
  4174. $8;
  4175. $9=$recv(html)._button();
  4176. $recv($9)._with_("InspectIt");
  4177. return $recv($9)._onClick_((function(){
  4178. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4179. return $core.withContext(function($ctx3) {
  4180. //>>excludeEnd("ctx");
  4181. return $recv(self["@sourceArea"])._inspectIt();
  4182. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4183. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
  4184. //>>excludeEnd("ctx");
  4185. }));
  4186. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4187. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  4188. //>>excludeEnd("ctx");
  4189. }));
  4190. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4191. $ctx1.sendIdx["with:"]=2;
  4192. //>>excludeEnd("ctx");
  4193. self._updateSourceAndButtons();
  4194. return self;
  4195. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4196. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.Browser)});
  4197. //>>excludeEnd("ctx");
  4198. },
  4199. //>>excludeStart("ide", pragmas.excludeIdeData);
  4200. args: ["html"],
  4201. source: "renderButtonsOn: html\x0a\x09saveButton := html button.\x0a\x09saveButton\x0a\x09with: 'Save';\x0a\x09onClick: [ self compile ].\x0a\x09methodButtons := html span.\x0a\x09classButtons := html span.\x0a\x09html div\x0a\x09class: 'right';\x0a\x09with: [\x0a\x09\x09html button\x0a\x09\x09\x09with: 'DoIt';\x0a\x09\x09\x09onClick: [ sourceArea doIt ].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'PrintIt';\x0a\x09\x09\x09onClick: [ sourceArea printIt ].\x0a\x09\x09html button with: 'InspectIt';\x0a\x09\x09\x09onClick: [ sourceArea inspectIt ]].\x0a\x09self updateSourceAndButtons",
  4202. referencedClasses: [],
  4203. //>>excludeEnd("ide");
  4204. messageSends: ["button", "with:", "onClick:", "compile", "span", "class:", "div", "doIt", "printIt", "inspectIt", "updateSourceAndButtons"]
  4205. }),
  4206. $globals.Browser);
  4207. $core.addMethod(
  4208. $core.method({
  4209. selector: "renderTabsOn:",
  4210. protocol: 'rendering',
  4211. fn: function (html){
  4212. var self=this;
  4213. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4214. return $core.withContext(function($ctx1) {
  4215. //>>excludeEnd("ctx");
  4216. self["@tabsList"]=$recv($recv(html)._ul())._class_("amber_tabs amber_browser");
  4217. self._updateTabsList();
  4218. return self;
  4219. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4220. }, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},$globals.Browser)});
  4221. //>>excludeEnd("ctx");
  4222. },
  4223. //>>excludeStart("ide", pragmas.excludeIdeData);
  4224. args: ["html"],
  4225. source: "renderTabsOn: html\x0a\x09tabsList := html ul class: 'amber_tabs amber_browser'.\x0a\x09self updateTabsList.",
  4226. referencedClasses: [],
  4227. //>>excludeEnd("ide");
  4228. messageSends: ["class:", "ul", "updateTabsList"]
  4229. }),
  4230. $globals.Browser);
  4231. $core.addMethod(
  4232. $core.method({
  4233. selector: "renderTopPanelOn:",
  4234. protocol: 'rendering',
  4235. fn: function (html){
  4236. var self=this;
  4237. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4238. return $core.withContext(function($ctx1) {
  4239. //>>excludeEnd("ctx");
  4240. var $1,$3,$4,$6,$7,$8,$9,$10,$5,$11,$2;
  4241. $1=$recv(html)._div();
  4242. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4243. $ctx1.sendIdx["div"]=1;
  4244. //>>excludeEnd("ctx");
  4245. $recv($1)._class_("top");
  4246. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4247. $ctx1.sendIdx["class:"]=1;
  4248. //>>excludeEnd("ctx");
  4249. $2=$recv($1)._with_((function(){
  4250. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4251. return $core.withContext(function($ctx2) {
  4252. //>>excludeEnd("ctx");
  4253. $3=$recv(html)._ul();
  4254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4255. $ctx2.sendIdx["ul"]=1;
  4256. //>>excludeEnd("ctx");
  4257. self["@packagesList"]=$recv($3)._class_("amber_column browser packages");
  4258. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4259. $ctx2.sendIdx["class:"]=2;
  4260. //>>excludeEnd("ctx");
  4261. self["@packagesList"];
  4262. $4=$recv(html)._div();
  4263. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4264. $ctx2.sendIdx["div"]=2;
  4265. //>>excludeEnd("ctx");
  4266. $recv($4)._class_("amber_packagesButtons");
  4267. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4268. $ctx2.sendIdx["class:"]=3;
  4269. //>>excludeEnd("ctx");
  4270. $5=$recv($4)._with_((function(){
  4271. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4272. return $core.withContext(function($ctx3) {
  4273. //>>excludeEnd("ctx");
  4274. $6=$recv(html)._button();
  4275. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4276. $ctx3.sendIdx["button"]=1;
  4277. //>>excludeEnd("ctx");
  4278. $recv($6)._title_("Commit classes in this package to disk");
  4279. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4280. $ctx3.sendIdx["title:"]=1;
  4281. //>>excludeEnd("ctx");
  4282. $recv($6)._onClick_((function(){
  4283. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4284. return $core.withContext(function($ctx4) {
  4285. //>>excludeEnd("ctx");
  4286. return self._commitPackage();
  4287. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4288. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  4289. //>>excludeEnd("ctx");
  4290. }));
  4291. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4292. $ctx3.sendIdx["onClick:"]=1;
  4293. //>>excludeEnd("ctx");
  4294. $7=$recv($6)._with_("Commit");
  4295. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4296. $ctx3.sendIdx["with:"]=3;
  4297. //>>excludeEnd("ctx");
  4298. $7;
  4299. $8=$recv(html)._button();
  4300. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4301. $ctx3.sendIdx["button"]=2;
  4302. //>>excludeEnd("ctx");
  4303. $recv($8)._title_("Rename package");
  4304. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4305. $ctx3.sendIdx["title:"]=2;
  4306. //>>excludeEnd("ctx");
  4307. $recv($8)._onClick_((function(){
  4308. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4309. return $core.withContext(function($ctx4) {
  4310. //>>excludeEnd("ctx");
  4311. return self._renamePackage();
  4312. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4313. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  4314. //>>excludeEnd("ctx");
  4315. }));
  4316. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4317. $ctx3.sendIdx["onClick:"]=2;
  4318. //>>excludeEnd("ctx");
  4319. $9=$recv($8)._with_("Rename");
  4320. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4321. $ctx3.sendIdx["with:"]=4;
  4322. //>>excludeEnd("ctx");
  4323. $9;
  4324. $10=$recv(html)._button();
  4325. $recv($10)._title_("Remove this package from the system");
  4326. $recv($10)._onClick_((function(){
  4327. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4328. return $core.withContext(function($ctx4) {
  4329. //>>excludeEnd("ctx");
  4330. return self._removePackage();
  4331. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4332. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  4333. //>>excludeEnd("ctx");
  4334. }));
  4335. return $recv($10)._with_("Remove");
  4336. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4337. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  4338. //>>excludeEnd("ctx");
  4339. }));
  4340. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4341. $ctx2.sendIdx["with:"]=2;
  4342. //>>excludeEnd("ctx");
  4343. $5;
  4344. self["@classesList"]=$recv($globals.ClassesList)._on_(self);
  4345. self["@classesList"];
  4346. $recv(self["@classesList"])._renderOn_(html);
  4347. $11=$recv(html)._ul();
  4348. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4349. $ctx2.sendIdx["ul"]=2;
  4350. //>>excludeEnd("ctx");
  4351. self["@protocolsList"]=$recv($11)._class_("amber_column browser protocols");
  4352. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4353. $ctx2.sendIdx["class:"]=4;
  4354. //>>excludeEnd("ctx");
  4355. self["@protocolsList"];
  4356. self["@methodsList"]=$recv($recv(html)._ul())._class_("amber_column browser methods");
  4357. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4358. $ctx2.sendIdx["class:"]=5;
  4359. //>>excludeEnd("ctx");
  4360. self["@methodsList"];
  4361. self._updateCategoriesList();
  4362. self._updateClassesList();
  4363. self._updateProtocolsList();
  4364. self._updateMethodsList();
  4365. return $recv($recv(html)._div())._class_("amber_clear");
  4366. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4367. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4368. //>>excludeEnd("ctx");
  4369. }));
  4370. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4371. $ctx1.sendIdx["with:"]=1;
  4372. //>>excludeEnd("ctx");
  4373. return self;
  4374. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4375. }, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},$globals.Browser)});
  4376. //>>excludeEnd("ctx");
  4377. },
  4378. //>>excludeStart("ide", pragmas.excludeIdeData);
  4379. args: ["html"],
  4380. source: "renderTopPanelOn: html\x0a\x09html div\x0a\x09\x09class: 'top';\x0a\x09\x09with: [\x0a\x09\x09\x09packagesList := html ul class: 'amber_column browser packages'.\x0a\x09\x09\x09\x09html div class: 'amber_packagesButtons'; with: [\x0a\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09title: 'Commit classes in this package to disk';\x0a\x09\x09\x09\x09\x09onClick: [ self commitPackage ];\x0a\x09\x09\x09\x09\x09with: 'Commit'.\x0a\x09\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09title: 'Rename package';\x0a\x09\x09\x09\x09\x09onClick: [ self renamePackage ];\x0a\x09\x09\x09\x09\x09with: 'Rename'.\x0a\x09\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09title: 'Remove this package from the system';\x0a\x09\x09\x09\x09\x09onClick: [ self removePackage ];\x0a\x09\x09\x09\x09\x09with: 'Remove' ].\x0a\x09\x09\x09classesList := ClassesList on: self.\x0a\x09\x09\x09classesList renderOn: html.\x0a\x09\x09\x09protocolsList := html ul class: 'amber_column browser protocols'.\x0a\x09\x09\x09methodsList := html ul class: 'amber_column browser methods'.\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09updateCategoriesList;\x0a\x09\x09\x09\x09updateClassesList;\x0a\x09\x09\x09\x09updateProtocolsList;\x0a\x09\x09\x09\x09updateMethodsList.\x0a\x09\x09\x09html div class: 'amber_clear' ]",
  4381. referencedClasses: ["ClassesList"],
  4382. //>>excludeEnd("ide");
  4383. messageSends: ["class:", "div", "with:", "ul", "title:", "button", "onClick:", "commitPackage", "renamePackage", "removePackage", "on:", "renderOn:", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList"]
  4384. }),
  4385. $globals.Browser);
  4386. $core.addMethod(
  4387. $core.method({
  4388. selector: "resetClassesList",
  4389. protocol: 'updating',
  4390. fn: function (){
  4391. var self=this;
  4392. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4393. return $core.withContext(function($ctx1) {
  4394. //>>excludeEnd("ctx");
  4395. $recv(self["@classesList"])._resetNodes();
  4396. return self;
  4397. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4398. }, function($ctx1) {$ctx1.fill(self,"resetClassesList",{},$globals.Browser)});
  4399. //>>excludeEnd("ctx");
  4400. },
  4401. //>>excludeStart("ide", pragmas.excludeIdeData);
  4402. args: [],
  4403. source: "resetClassesList\x0a\x09classesList resetNodes",
  4404. referencedClasses: [],
  4405. //>>excludeEnd("ide");
  4406. messageSends: ["resetNodes"]
  4407. }),
  4408. $globals.Browser);
  4409. $core.addMethod(
  4410. $core.method({
  4411. selector: "search:",
  4412. protocol: 'actions',
  4413. fn: function (aString){
  4414. var self=this;
  4415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4416. return $core.withContext(function($ctx1) {
  4417. //>>excludeEnd("ctx");
  4418. var $1,$2;
  4419. $1=self._cancelChanges();
  4420. if($core.assert($1)){
  4421. var searchedClass;
  4422. searchedClass=$recv($recv($globals.Smalltalk)._globals())._at_(aString);
  4423. searchedClass;
  4424. $2=$recv(searchedClass)._isClass();
  4425. if($core.assert($2)){
  4426. $recv(self._class())._openOn_(searchedClass);
  4427. } else {
  4428. self._searchReferencesOf_(aString);
  4429. };
  4430. };
  4431. return self;
  4432. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4433. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},$globals.Browser)});
  4434. //>>excludeEnd("ctx");
  4435. },
  4436. //>>excludeStart("ide", pragmas.excludeIdeData);
  4437. args: ["aString"],
  4438. source: "search: aString\x0a\x09self cancelChanges ifTrue: [ | searchedClass |\x0a\x09\x09searchedClass := Smalltalk globals at: aString.\x0a\x09\x09searchedClass isClass\x0a\x09\x09\x09ifTrue: [ self class openOn: searchedClass ]\x0a\x09\x09\x09ifFalse: [ self searchReferencesOf: aString ]]",
  4439. referencedClasses: ["Smalltalk"],
  4440. //>>excludeEnd("ide");
  4441. messageSends: ["ifTrue:", "cancelChanges", "at:", "globals", "ifTrue:ifFalse:", "isClass", "openOn:", "class", "searchReferencesOf:"]
  4442. }),
  4443. $globals.Browser);
  4444. $core.addMethod(
  4445. $core.method({
  4446. selector: "searchClassReferences",
  4447. protocol: 'actions',
  4448. fn: function (){
  4449. var self=this;
  4450. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4451. return $core.withContext(function($ctx1) {
  4452. //>>excludeEnd("ctx");
  4453. $recv($globals.ReferencesBrowser)._search_($recv(self["@selectedClass"])._name());
  4454. return self;
  4455. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4456. }, function($ctx1) {$ctx1.fill(self,"searchClassReferences",{},$globals.Browser)});
  4457. //>>excludeEnd("ctx");
  4458. },
  4459. //>>excludeStart("ide", pragmas.excludeIdeData);
  4460. args: [],
  4461. source: "searchClassReferences\x0a\x09ReferencesBrowser search: selectedClass name",
  4462. referencedClasses: ["ReferencesBrowser"],
  4463. //>>excludeEnd("ide");
  4464. messageSends: ["search:", "name"]
  4465. }),
  4466. $globals.Browser);
  4467. $core.addMethod(
  4468. $core.method({
  4469. selector: "searchReferencesOf:",
  4470. protocol: 'actions',
  4471. fn: function (aString){
  4472. var self=this;
  4473. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4474. return $core.withContext(function($ctx1) {
  4475. //>>excludeEnd("ctx");
  4476. $recv($globals.ReferencesBrowser)._search_(aString);
  4477. return self;
  4478. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4479. }, function($ctx1) {$ctx1.fill(self,"searchReferencesOf:",{aString:aString},$globals.Browser)});
  4480. //>>excludeEnd("ctx");
  4481. },
  4482. //>>excludeStart("ide", pragmas.excludeIdeData);
  4483. args: ["aString"],
  4484. source: "searchReferencesOf: aString\x0a\x09ReferencesBrowser search: aString",
  4485. referencedClasses: ["ReferencesBrowser"],
  4486. //>>excludeEnd("ide");
  4487. messageSends: ["search:"]
  4488. }),
  4489. $globals.Browser);
  4490. $core.addMethod(
  4491. $core.method({
  4492. selector: "selectCategory:",
  4493. protocol: 'actions',
  4494. fn: function (aCategory){
  4495. var self=this;
  4496. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4497. return $core.withContext(function($ctx1) {
  4498. //>>excludeEnd("ctx");
  4499. var $1;
  4500. $1=self._cancelChanges();
  4501. if($core.assert($1)){
  4502. self["@selectedPackage"]=aCategory;
  4503. self["@selectedPackage"];
  4504. self["@selectedMethod"]=nil;
  4505. self["@selectedProtocol"]=self["@selectedMethod"];
  4506. self["@selectedClass"]=self["@selectedProtocol"];
  4507. self["@selectedClass"];
  4508. self._resetClassesList();
  4509. self._updateCategoriesList();
  4510. self._updateClassesList();
  4511. self._updateProtocolsList();
  4512. self._updateMethodsList();
  4513. self._updateSourceAndButtons();
  4514. };
  4515. return self;
  4516. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4517. }, function($ctx1) {$ctx1.fill(self,"selectCategory:",{aCategory:aCategory},$globals.Browser)});
  4518. //>>excludeEnd("ctx");
  4519. },
  4520. //>>excludeStart("ide", pragmas.excludeIdeData);
  4521. args: ["aCategory"],
  4522. source: "selectCategory: aCategory\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedPackage := aCategory.\x0a\x09selectedClass := selectedProtocol := selectedMethod := nil.\x0a\x09self resetClassesList.\x0a\x09self\x0a\x09\x09updateCategoriesList;\x0a\x09\x09updateClassesList;\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  4523. referencedClasses: [],
  4524. //>>excludeEnd("ide");
  4525. messageSends: ["ifTrue:", "cancelChanges", "resetClassesList", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"]
  4526. }),
  4527. $globals.Browser);
  4528. $core.addMethod(
  4529. $core.method({
  4530. selector: "selectClass:",
  4531. protocol: 'actions',
  4532. fn: function (aClass){
  4533. var self=this;
  4534. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4535. return $core.withContext(function($ctx1) {
  4536. //>>excludeEnd("ctx");
  4537. var $1;
  4538. $1=self._cancelChanges();
  4539. if($core.assert($1)){
  4540. self["@selectedClass"]=aClass;
  4541. self["@selectedClass"];
  4542. self["@selectedMethod"]=nil;
  4543. self["@selectedProtocol"]=self["@selectedMethod"];
  4544. self["@selectedProtocol"];
  4545. self._updateClassesList();
  4546. self._updateProtocolsList();
  4547. self._updateMethodsList();
  4548. self._updateSourceAndButtons();
  4549. };
  4550. return self;
  4551. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4552. }, function($ctx1) {$ctx1.fill(self,"selectClass:",{aClass:aClass},$globals.Browser)});
  4553. //>>excludeEnd("ctx");
  4554. },
  4555. //>>excludeStart("ide", pragmas.excludeIdeData);
  4556. args: ["aClass"],
  4557. source: "selectClass: aClass\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedClass := aClass.\x0a\x09selectedProtocol := selectedMethod := nil.\x0a\x09self\x0a\x09\x09updateClassesList;\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  4558. referencedClasses: [],
  4559. //>>excludeEnd("ide");
  4560. messageSends: ["ifTrue:", "cancelChanges", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"]
  4561. }),
  4562. $globals.Browser);
  4563. $core.addMethod(
  4564. $core.method({
  4565. selector: "selectMethod:",
  4566. protocol: 'actions',
  4567. fn: function (aMethod){
  4568. var self=this;
  4569. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4570. return $core.withContext(function($ctx1) {
  4571. //>>excludeEnd("ctx");
  4572. var $1;
  4573. $1=self._cancelChanges();
  4574. if($core.assert($1)){
  4575. self["@selectedMethod"]=aMethod;
  4576. self["@selectedMethod"];
  4577. self._updateProtocolsList();
  4578. self._updateMethodsList();
  4579. self._updateSourceAndButtons();
  4580. };
  4581. return self;
  4582. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4583. }, function($ctx1) {$ctx1.fill(self,"selectMethod:",{aMethod:aMethod},$globals.Browser)});
  4584. //>>excludeEnd("ctx");
  4585. },
  4586. //>>excludeStart("ide", pragmas.excludeIdeData);
  4587. args: ["aMethod"],
  4588. source: "selectMethod: aMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedMethod := aMethod.\x0a\x09self\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  4589. referencedClasses: [],
  4590. //>>excludeEnd("ide");
  4591. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"]
  4592. }),
  4593. $globals.Browser);
  4594. $core.addMethod(
  4595. $core.method({
  4596. selector: "selectProtocol:",
  4597. protocol: 'actions',
  4598. fn: function (aString){
  4599. var self=this;
  4600. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4601. return $core.withContext(function($ctx1) {
  4602. //>>excludeEnd("ctx");
  4603. var $1;
  4604. $1=self._cancelChanges();
  4605. if($core.assert($1)){
  4606. self["@selectedProtocol"]=aString;
  4607. self["@selectedProtocol"];
  4608. self["@selectedMethod"]=nil;
  4609. self["@selectedMethod"];
  4610. self._updateProtocolsList();
  4611. self._updateMethodsList();
  4612. self._updateSourceAndButtons();
  4613. };
  4614. return self;
  4615. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4616. }, function($ctx1) {$ctx1.fill(self,"selectProtocol:",{aString:aString},$globals.Browser)});
  4617. //>>excludeEnd("ctx");
  4618. },
  4619. //>>excludeStart("ide", pragmas.excludeIdeData);
  4620. args: ["aString"],
  4621. source: "selectProtocol: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedProtocol := aString.\x0a\x09selectedMethod := nil.\x0a\x09self\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  4622. referencedClasses: [],
  4623. //>>excludeEnd("ide");
  4624. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"]
  4625. }),
  4626. $globals.Browser);
  4627. $core.addMethod(
  4628. $core.method({
  4629. selector: "selectTab:",
  4630. protocol: 'actions',
  4631. fn: function (aString){
  4632. var self=this;
  4633. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4634. return $core.withContext(function($ctx1) {
  4635. //>>excludeEnd("ctx");
  4636. var $1;
  4637. $1=self._cancelChanges();
  4638. if($core.assert($1)){
  4639. self["@selectedTab"]=aString;
  4640. self["@selectedTab"];
  4641. self._selectProtocol_(nil);
  4642. self._updateTabsList();
  4643. };
  4644. return self;
  4645. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4646. }, function($ctx1) {$ctx1.fill(self,"selectTab:",{aString:aString},$globals.Browser)});
  4647. //>>excludeEnd("ctx");
  4648. },
  4649. //>>excludeStart("ide", pragmas.excludeIdeData);
  4650. args: ["aString"],
  4651. source: "selectTab: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedTab := aString.\x0a\x09self selectProtocol: nil.\x0a\x09self updateTabsList ]",
  4652. referencedClasses: [],
  4653. //>>excludeEnd("ide");
  4654. messageSends: ["ifTrue:", "cancelChanges", "selectProtocol:", "updateTabsList"]
  4655. }),
  4656. $globals.Browser);
  4657. $core.addMethod(
  4658. $core.method({
  4659. selector: "selectedClass",
  4660. protocol: 'accessing',
  4661. fn: function (){
  4662. var self=this;
  4663. return self["@selectedClass"];
  4664. },
  4665. //>>excludeStart("ide", pragmas.excludeIdeData);
  4666. args: [],
  4667. source: "selectedClass\x0a\x09^ selectedClass",
  4668. referencedClasses: [],
  4669. //>>excludeEnd("ide");
  4670. messageSends: []
  4671. }),
  4672. $globals.Browser);
  4673. $core.addMethod(
  4674. $core.method({
  4675. selector: "selectedPackage",
  4676. protocol: 'accessing',
  4677. fn: function (){
  4678. var self=this;
  4679. return self["@selectedPackage"];
  4680. },
  4681. //>>excludeStart("ide", pragmas.excludeIdeData);
  4682. args: [],
  4683. source: "selectedPackage\x0a\x09^ selectedPackage",
  4684. referencedClasses: [],
  4685. //>>excludeEnd("ide");
  4686. messageSends: []
  4687. }),
  4688. $globals.Browser);
  4689. $core.addMethod(
  4690. $core.method({
  4691. selector: "setMethodProtocol:",
  4692. protocol: 'actions',
  4693. fn: function (aString){
  4694. var self=this;
  4695. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4696. return $core.withContext(function($ctx1) {
  4697. //>>excludeEnd("ctx");
  4698. var $1,$2;
  4699. $1=self._cancelChanges();
  4700. if($core.assert($1)){
  4701. $2=$recv(self._protocols())._includes_(aString);
  4702. if($core.assert($2)){
  4703. $recv(self["@selectedMethod"])._protocol_(aString);
  4704. self["@selectedProtocol"]=aString;
  4705. self["@selectedProtocol"];
  4706. self["@selectedMethod"]=self["@selectedMethod"];
  4707. self["@selectedMethod"];
  4708. self._updateProtocolsList();
  4709. self._updateMethodsList();
  4710. self._updateSourceAndButtons();
  4711. } else {
  4712. self._addNewProtocol();
  4713. };
  4714. };
  4715. return self;
  4716. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4717. }, function($ctx1) {$ctx1.fill(self,"setMethodProtocol:",{aString:aString},$globals.Browser)});
  4718. //>>excludeEnd("ctx");
  4719. },
  4720. //>>excludeStart("ide", pragmas.excludeIdeData);
  4721. args: ["aString"],
  4722. source: "setMethodProtocol: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09(self protocols includes: aString)\x0a\x09\x09ifFalse: [ self addNewProtocol ]\x0a\x09\x09ifTrue: [\x0a\x09\x09selectedMethod protocol: aString.\x0a\x09\x09selectedProtocol := aString.\x0a\x09\x09selectedMethod := selectedMethod.\x0a\x09\x09self\x0a\x09\x09\x09updateProtocolsList;\x0a\x09\x09\x09updateMethodsList;\x0a\x09\x09\x09updateSourceAndButtons ]]",
  4723. referencedClasses: [],
  4724. //>>excludeEnd("ide");
  4725. messageSends: ["ifTrue:", "cancelChanges", "ifFalse:ifTrue:", "includes:", "protocols", "addNewProtocol", "protocol:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"]
  4726. }),
  4727. $globals.Browser);
  4728. $core.addMethod(
  4729. $core.method({
  4730. selector: "showClassButtons",
  4731. protocol: 'actions',
  4732. fn: function (){
  4733. var self=this;
  4734. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4735. return $core.withContext(function($ctx1) {
  4736. //>>excludeEnd("ctx");
  4737. $recv($recv(self["@classButtons"])._asJQuery())._show();
  4738. return self;
  4739. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4740. }, function($ctx1) {$ctx1.fill(self,"showClassButtons",{},$globals.Browser)});
  4741. //>>excludeEnd("ctx");
  4742. },
  4743. //>>excludeStart("ide", pragmas.excludeIdeData);
  4744. args: [],
  4745. source: "showClassButtons\x0a\x09classButtons asJQuery show",
  4746. referencedClasses: [],
  4747. //>>excludeEnd("ide");
  4748. messageSends: ["show", "asJQuery"]
  4749. }),
  4750. $globals.Browser);
  4751. $core.addMethod(
  4752. $core.method({
  4753. selector: "showMethodButtons",
  4754. protocol: 'actions',
  4755. fn: function (){
  4756. var self=this;
  4757. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4758. return $core.withContext(function($ctx1) {
  4759. //>>excludeEnd("ctx");
  4760. $recv($recv(self["@methodButtons"])._asJQuery())._show();
  4761. return self;
  4762. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4763. }, function($ctx1) {$ctx1.fill(self,"showMethodButtons",{},$globals.Browser)});
  4764. //>>excludeEnd("ctx");
  4765. },
  4766. //>>excludeStart("ide", pragmas.excludeIdeData);
  4767. args: [],
  4768. source: "showMethodButtons\x0a\x09methodButtons asJQuery show",
  4769. referencedClasses: [],
  4770. //>>excludeEnd("ide");
  4771. messageSends: ["show", "asJQuery"]
  4772. }),
  4773. $globals.Browser);
  4774. $core.addMethod(
  4775. $core.method({
  4776. selector: "source",
  4777. protocol: 'accessing',
  4778. fn: function (){
  4779. var self=this;
  4780. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4781. return $core.withContext(function($ctx1) {
  4782. //>>excludeEnd("ctx");
  4783. var $1,$3,$2,$4,$receiver;
  4784. $1=$recv(self["@selectedTab"]).__eq("comment");
  4785. if(!$core.assert($1)){
  4786. $3=$recv(self["@selectedProtocol"])._notNil();
  4787. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4788. $ctx1.sendIdx["notNil"]=1;
  4789. //>>excludeEnd("ctx");
  4790. $2=$recv($3)._or_((function(){
  4791. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4792. return $core.withContext(function($ctx2) {
  4793. //>>excludeEnd("ctx");
  4794. return $recv(self["@selectedMethod"])._notNil();
  4795. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4796. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  4797. //>>excludeEnd("ctx");
  4798. }));
  4799. return $recv($2)._ifFalse_ifTrue_((function(){
  4800. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4801. return $core.withContext(function($ctx2) {
  4802. //>>excludeEnd("ctx");
  4803. return self._declarationSource();
  4804. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4805. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  4806. //>>excludeEnd("ctx");
  4807. }),(function(){
  4808. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4809. return $core.withContext(function($ctx2) {
  4810. //>>excludeEnd("ctx");
  4811. return self._methodSource();
  4812. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4813. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  4814. //>>excludeEnd("ctx");
  4815. }));
  4816. };
  4817. $4=self["@selectedClass"];
  4818. if(($receiver = $4) == null || $receiver.isNil){
  4819. return "";
  4820. } else {
  4821. return self._classCommentSource();
  4822. };
  4823. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4824. }, function($ctx1) {$ctx1.fill(self,"source",{},$globals.Browser)});
  4825. //>>excludeEnd("ctx");
  4826. },
  4827. //>>excludeStart("ide", pragmas.excludeIdeData);
  4828. args: [],
  4829. source: "source\x0a\x09selectedTab = #comment ifFalse: [\x0a\x09^ (selectedProtocol notNil or: [ selectedMethod notNil ])\x0a\x09\x09ifFalse: [ self declarationSource ]\x0a\x09\x09ifTrue: [ self methodSource ]].\x0a\x09^ selectedClass\x0a\x09ifNil: [ '' ]\x0a\x09ifNotNil: [ self classCommentSource ]",
  4830. referencedClasses: [],
  4831. //>>excludeEnd("ide");
  4832. messageSends: ["ifFalse:", "=", "ifFalse:ifTrue:", "or:", "notNil", "declarationSource", "methodSource", "ifNil:ifNotNil:", "classCommentSource"]
  4833. }),
  4834. $globals.Browser);
  4835. $core.addMethod(
  4836. $core.method({
  4837. selector: "updateCategoriesList",
  4838. protocol: 'updating',
  4839. fn: function (){
  4840. var self=this;
  4841. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4842. return $core.withContext(function($ctx1) {
  4843. //>>excludeEnd("ctx");
  4844. var $1,$2;
  4845. $recv(self["@packagesList"])._contents_((function(html){
  4846. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4847. return $core.withContext(function($ctx2) {
  4848. //>>excludeEnd("ctx");
  4849. return $recv(self._packages())._do_((function(each){
  4850. var li,label;
  4851. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4852. return $core.withContext(function($ctx3) {
  4853. //>>excludeEnd("ctx");
  4854. label=$recv(each)._ifEmpty_((function(){
  4855. return "Unclassified";
  4856. }));
  4857. label;
  4858. li=$recv(html)._li();
  4859. li;
  4860. $1=$recv(self["@selectedPackage"]).__eq(each);
  4861. if($core.assert($1)){
  4862. $recv(li)._class_("selected");
  4863. };
  4864. $2=li;
  4865. $recv($2)._with_(label);
  4866. return $recv($2)._onClick_((function(){
  4867. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4868. return $core.withContext(function($ctx4) {
  4869. //>>excludeEnd("ctx");
  4870. return self._selectCategory_(each);
  4871. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4872. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  4873. //>>excludeEnd("ctx");
  4874. }));
  4875. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4876. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li,label:label},$ctx2,2)});
  4877. //>>excludeEnd("ctx");
  4878. }));
  4879. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4880. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  4881. //>>excludeEnd("ctx");
  4882. }));
  4883. return self;
  4884. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4885. }, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},$globals.Browser)});
  4886. //>>excludeEnd("ctx");
  4887. },
  4888. //>>excludeStart("ide", pragmas.excludeIdeData);
  4889. args: [],
  4890. source: "updateCategoriesList\x0a\x09packagesList contents: [ :html |\x0a\x09self packages do: [ :each || li label |\x0a\x09\x09label := each ifEmpty: [ 'Unclassified' ].\x0a\x09\x09li := html li.\x0a\x09\x09selectedPackage = each ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09with: label;\x0a\x09\x09onClick: [ self selectCategory: each ]] ]",
  4891. referencedClasses: [],
  4892. //>>excludeEnd("ide");
  4893. messageSends: ["contents:", "do:", "packages", "ifEmpty:", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectCategory:"]
  4894. }),
  4895. $globals.Browser);
  4896. $core.addMethod(
  4897. $core.method({
  4898. selector: "updateClassesList",
  4899. protocol: 'updating',
  4900. fn: function (){
  4901. var self=this;
  4902. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4903. return $core.withContext(function($ctx1) {
  4904. //>>excludeEnd("ctx");
  4905. $recv($recv($globals.TabManager)._current())._update();
  4906. $recv(self["@classesList"])._updateNodes();
  4907. return self;
  4908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4909. }, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},$globals.Browser)});
  4910. //>>excludeEnd("ctx");
  4911. },
  4912. //>>excludeStart("ide", pragmas.excludeIdeData);
  4913. args: [],
  4914. source: "updateClassesList\x0a\x09TabManager current update.\x0a\x09classesList updateNodes",
  4915. referencedClasses: ["TabManager"],
  4916. //>>excludeEnd("ide");
  4917. messageSends: ["update", "current", "updateNodes"]
  4918. }),
  4919. $globals.Browser);
  4920. $core.addMethod(
  4921. $core.method({
  4922. selector: "updateMethodsList",
  4923. protocol: 'updating',
  4924. fn: function (){
  4925. var self=this;
  4926. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4927. return $core.withContext(function($ctx1) {
  4928. //>>excludeEnd("ctx");
  4929. var $1,$2;
  4930. $recv(self["@methodsList"])._contents_((function(html){
  4931. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4932. return $core.withContext(function($ctx2) {
  4933. //>>excludeEnd("ctx");
  4934. return $recv(self._methods())._do_((function(each){
  4935. var li;
  4936. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4937. return $core.withContext(function($ctx3) {
  4938. //>>excludeEnd("ctx");
  4939. li=$recv(html)._li();
  4940. li;
  4941. $1=$recv(self["@selectedMethod"]).__eq(each);
  4942. if($core.assert($1)){
  4943. $recv(li)._class_("selected");
  4944. };
  4945. $2=li;
  4946. $recv($2)._with_($recv(each)._selector());
  4947. return $recv($2)._onClick_((function(){
  4948. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4949. return $core.withContext(function($ctx4) {
  4950. //>>excludeEnd("ctx");
  4951. return self._selectMethod_(each);
  4952. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4953. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  4954. //>>excludeEnd("ctx");
  4955. }));
  4956. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4957. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)});
  4958. //>>excludeEnd("ctx");
  4959. }));
  4960. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4961. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  4962. //>>excludeEnd("ctx");
  4963. }));
  4964. return self;
  4965. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4966. }, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},$globals.Browser)});
  4967. //>>excludeEnd("ctx");
  4968. },
  4969. //>>excludeStart("ide", pragmas.excludeIdeData);
  4970. args: [],
  4971. source: "updateMethodsList\x0a\x09methodsList contents: [ :html |\x0a\x09self methods do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09selectedMethod = each ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09with: each selector;\x0a\x09\x09onClick: [ self selectMethod: each ]] ]",
  4972. referencedClasses: [],
  4973. //>>excludeEnd("ide");
  4974. messageSends: ["contents:", "do:", "methods", "li", "ifTrue:", "=", "class:", "with:", "selector", "onClick:", "selectMethod:"]
  4975. }),
  4976. $globals.Browser);
  4977. $core.addMethod(
  4978. $core.method({
  4979. selector: "updateProtocolsList",
  4980. protocol: 'updating',
  4981. fn: function (){
  4982. var self=this;
  4983. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4984. return $core.withContext(function($ctx1) {
  4985. //>>excludeEnd("ctx");
  4986. var $1,$2;
  4987. $recv(self["@protocolsList"])._contents_((function(html){
  4988. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4989. return $core.withContext(function($ctx2) {
  4990. //>>excludeEnd("ctx");
  4991. return $recv(self._protocols())._do_((function(each){
  4992. var li;
  4993. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4994. return $core.withContext(function($ctx3) {
  4995. //>>excludeEnd("ctx");
  4996. li=$recv(html)._li();
  4997. li;
  4998. $1=$recv(self["@selectedProtocol"]).__eq(each);
  4999. if($core.assert($1)){
  5000. $recv(li)._class_("selected");
  5001. };
  5002. $2=li;
  5003. $recv($2)._with_(each);
  5004. return $recv($2)._onClick_((function(){
  5005. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5006. return $core.withContext(function($ctx4) {
  5007. //>>excludeEnd("ctx");
  5008. return self._selectProtocol_(each);
  5009. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5010. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  5011. //>>excludeEnd("ctx");
  5012. }));
  5013. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5014. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)});
  5015. //>>excludeEnd("ctx");
  5016. }));
  5017. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5018. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  5019. //>>excludeEnd("ctx");
  5020. }));
  5021. return self;
  5022. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5023. }, function($ctx1) {$ctx1.fill(self,"updateProtocolsList",{},$globals.Browser)});
  5024. //>>excludeEnd("ctx");
  5025. },
  5026. //>>excludeStart("ide", pragmas.excludeIdeData);
  5027. args: [],
  5028. source: "updateProtocolsList\x0a\x09protocolsList contents: [ :html |\x0a\x09self protocols do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09selectedProtocol = each ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09with: each;\x0a\x09\x09onClick: [ self selectProtocol: each ]] ]",
  5029. referencedClasses: [],
  5030. //>>excludeEnd("ide");
  5031. messageSends: ["contents:", "do:", "protocols", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectProtocol:"]
  5032. }),
  5033. $globals.Browser);
  5034. $core.addMethod(
  5035. $core.method({
  5036. selector: "updateSourceAndButtons",
  5037. protocol: 'updating',
  5038. fn: function (){
  5039. var self=this;
  5040. var currentProtocol;
  5041. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5042. return $core.withContext(function($ctx1) {
  5043. //>>excludeEnd("ctx");
  5044. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$14,$13,$16,$17,$18,$19,$21,$20,$22,$23,$15,$24,$25,$27,$28,$29,$26,$30,$31;
  5045. self._disableSaveButton();
  5046. $recv(self["@classButtons"])._contents_((function(html){
  5047. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5048. return $core.withContext(function($ctx2) {
  5049. //>>excludeEnd("ctx");
  5050. $1=$recv(html)._button();
  5051. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5052. $ctx2.sendIdx["button"]=1;
  5053. //>>excludeEnd("ctx");
  5054. $recv($1)._title_("Create a new class");
  5055. $recv($1)._onClick_((function(){
  5056. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5057. return $core.withContext(function($ctx3) {
  5058. //>>excludeEnd("ctx");
  5059. return self._addNewClass();
  5060. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5061. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  5062. //>>excludeEnd("ctx");
  5063. }));
  5064. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5065. $ctx2.sendIdx["onClick:"]=1;
  5066. //>>excludeEnd("ctx");
  5067. $2=$recv($1)._with_("New class");
  5068. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5069. $ctx2.sendIdx["with:"]=1;
  5070. //>>excludeEnd("ctx");
  5071. $2;
  5072. $3=$recv(html)._button();
  5073. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5074. $ctx2.sendIdx["button"]=2;
  5075. //>>excludeEnd("ctx");
  5076. $recv($3)._with_("Rename class");
  5077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5078. $ctx2.sendIdx["with:"]=2;
  5079. //>>excludeEnd("ctx");
  5080. $4=$recv($3)._onClick_((function(){
  5081. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5082. return $core.withContext(function($ctx3) {
  5083. //>>excludeEnd("ctx");
  5084. return self._renameClass();
  5085. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5086. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  5087. //>>excludeEnd("ctx");
  5088. }));
  5089. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5090. $ctx2.sendIdx["onClick:"]=2;
  5091. //>>excludeEnd("ctx");
  5092. $4;
  5093. $5=$recv(html)._button();
  5094. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5095. $ctx2.sendIdx["button"]=3;
  5096. //>>excludeEnd("ctx");
  5097. $recv($5)._with_("Copy class");
  5098. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5099. $ctx2.sendIdx["with:"]=3;
  5100. //>>excludeEnd("ctx");
  5101. $6=$recv($5)._onClick_((function(){
  5102. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5103. return $core.withContext(function($ctx3) {
  5104. //>>excludeEnd("ctx");
  5105. return self._copyClass();
  5106. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5107. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  5108. //>>excludeEnd("ctx");
  5109. }));
  5110. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5111. $ctx2.sendIdx["onClick:"]=3;
  5112. //>>excludeEnd("ctx");
  5113. $6;
  5114. $7=$recv(html)._button();
  5115. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5116. $ctx2.sendIdx["button"]=4;
  5117. //>>excludeEnd("ctx");
  5118. $recv($7)._with_("Remove class");
  5119. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5120. $ctx2.sendIdx["with:"]=4;
  5121. //>>excludeEnd("ctx");
  5122. $8=$recv($7)._onClick_((function(){
  5123. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5124. return $core.withContext(function($ctx3) {
  5125. //>>excludeEnd("ctx");
  5126. return self._removeClass();
  5127. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5128. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
  5129. //>>excludeEnd("ctx");
  5130. }));
  5131. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5132. $ctx2.sendIdx["onClick:"]=4;
  5133. //>>excludeEnd("ctx");
  5134. $8;
  5135. $9=$recv(html)._button();
  5136. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5137. $ctx2.sendIdx["button"]=5;
  5138. //>>excludeEnd("ctx");
  5139. $recv($9)._with_("References");
  5140. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5141. $ctx2.sendIdx["with:"]=5;
  5142. //>>excludeEnd("ctx");
  5143. $10=$recv($9)._onClick_((function(){
  5144. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5145. return $core.withContext(function($ctx3) {
  5146. //>>excludeEnd("ctx");
  5147. return self._searchClassReferences();
  5148. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5149. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,6)});
  5150. //>>excludeEnd("ctx");
  5151. }));
  5152. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5153. $ctx2.sendIdx["onClick:"]=5;
  5154. //>>excludeEnd("ctx");
  5155. return $10;
  5156. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5157. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  5158. //>>excludeEnd("ctx");
  5159. }));
  5160. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5161. $ctx1.sendIdx["contents:"]=1;
  5162. //>>excludeEnd("ctx");
  5163. $recv(self["@methodButtons"])._contents_((function(html){
  5164. var protocolSelect,referencesSelect;
  5165. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5166. return $core.withContext(function($ctx2) {
  5167. //>>excludeEnd("ctx");
  5168. $11=$recv(html)._button();
  5169. $recv($11)._with_("Remove method");
  5170. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5171. $ctx2.sendIdx["with:"]=6;
  5172. //>>excludeEnd("ctx");
  5173. $recv($11)._onClick_((function(){
  5174. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5175. return $core.withContext(function($ctx3) {
  5176. //>>excludeEnd("ctx");
  5177. return self._removeMethod();
  5178. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5179. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,8)});
  5180. //>>excludeEnd("ctx");
  5181. }));
  5182. protocolSelect=$recv(html)._select();
  5183. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5184. $ctx2.sendIdx["select"]=1;
  5185. //>>excludeEnd("ctx");
  5186. protocolSelect;
  5187. $12=protocolSelect;
  5188. $recv($12)._onChange_((function(){
  5189. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5190. return $core.withContext(function($ctx3) {
  5191. //>>excludeEnd("ctx");
  5192. $14=$recv(protocolSelect)._asJQuery();
  5193. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5194. $ctx3.sendIdx["asJQuery"]=1;
  5195. //>>excludeEnd("ctx");
  5196. $13=$recv($14)._val();
  5197. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5198. $ctx3.sendIdx["val"]=1;
  5199. //>>excludeEnd("ctx");
  5200. return self._setMethodProtocol_($13);
  5201. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5202. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)});
  5203. //>>excludeEnd("ctx");
  5204. }));
  5205. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5206. $ctx2.sendIdx["onChange:"]=1;
  5207. //>>excludeEnd("ctx");
  5208. $15=$recv($12)._with_((function(){
  5209. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5210. return $core.withContext(function($ctx3) {
  5211. //>>excludeEnd("ctx");
  5212. $16=$recv(html)._option();
  5213. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5214. $ctx3.sendIdx["option"]=1;
  5215. //>>excludeEnd("ctx");
  5216. $recv($16)._with_("Method protocol");
  5217. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5218. $ctx3.sendIdx["with:"]=8;
  5219. //>>excludeEnd("ctx");
  5220. $17=$recv($16)._at_put_("disabled","disabled");
  5221. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5222. $ctx3.sendIdx["at:put:"]=1;
  5223. //>>excludeEnd("ctx");
  5224. $17;
  5225. $18=$recv(html)._option();
  5226. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5227. $ctx3.sendIdx["option"]=2;
  5228. //>>excludeEnd("ctx");
  5229. $recv($18)._class_("important");
  5230. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5231. $ctx3.sendIdx["class:"]=1;
  5232. //>>excludeEnd("ctx");
  5233. $19=$recv($18)._with_("New...");
  5234. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5235. $ctx3.sendIdx["with:"]=9;
  5236. //>>excludeEnd("ctx");
  5237. $19;
  5238. currentProtocol=self["@selectedProtocol"];
  5239. currentProtocol;
  5240. $21=$recv(currentProtocol)._isNil();
  5241. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5242. $ctx3.sendIdx["isNil"]=1;
  5243. //>>excludeEnd("ctx");
  5244. $20=$recv($21)._and_((function(){
  5245. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5246. return $core.withContext(function($ctx4) {
  5247. //>>excludeEnd("ctx");
  5248. return $recv(self["@selectedMethod"])._notNil();
  5249. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5250. $ctx4.sendIdx["notNil"]=1;
  5251. //>>excludeEnd("ctx");
  5252. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5253. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,11)});
  5254. //>>excludeEnd("ctx");
  5255. }));
  5256. if($core.assert($20)){
  5257. currentProtocol=$recv(self["@selectedMethod"])._category();
  5258. currentProtocol;
  5259. };
  5260. return $recv(self._protocols())._do_((function(each){
  5261. var option;
  5262. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5263. return $core.withContext(function($ctx4) {
  5264. //>>excludeEnd("ctx");
  5265. $22=$recv(html)._option();
  5266. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5267. $ctx4.sendIdx["option"]=3;
  5268. //>>excludeEnd("ctx");
  5269. option=$recv($22)._with_(each);
  5270. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5271. $ctx4.sendIdx["with:"]=10;
  5272. //>>excludeEnd("ctx");
  5273. option;
  5274. $23=$recv(currentProtocol).__eq(each);
  5275. if($core.assert($23)){
  5276. return $recv(option)._at_put_("selected","selected");
  5277. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5278. $ctx4.sendIdx["at:put:"]=2;
  5279. //>>excludeEnd("ctx");
  5280. };
  5281. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5282. }, function($ctx4) {$ctx4.fillBlock({each:each,option:option},$ctx3,13)});
  5283. //>>excludeEnd("ctx");
  5284. }));
  5285. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5286. $ctx3.sendIdx["do:"]=1;
  5287. //>>excludeEnd("ctx");
  5288. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5289. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,10)});
  5290. //>>excludeEnd("ctx");
  5291. }));
  5292. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5293. $ctx2.sendIdx["with:"]=7;
  5294. //>>excludeEnd("ctx");
  5295. $15;
  5296. $24=$recv(self["@selectedMethod"])._isNil();
  5297. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5298. $ctx2.sendIdx["isNil"]=2;
  5299. //>>excludeEnd("ctx");
  5300. if(!$core.assert($24)){
  5301. referencesSelect=$recv(html)._select();
  5302. referencesSelect;
  5303. $25=referencesSelect;
  5304. $recv($25)._onChange_((function(){
  5305. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5306. return $core.withContext(function($ctx3) {
  5307. //>>excludeEnd("ctx");
  5308. return self._searchReferencesOf_($recv($recv(referencesSelect)._asJQuery())._val());
  5309. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5310. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,16)});
  5311. //>>excludeEnd("ctx");
  5312. }));
  5313. $26=$recv($25)._with_((function(){
  5314. var option;
  5315. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5316. return $core.withContext(function($ctx3) {
  5317. //>>excludeEnd("ctx");
  5318. $27=$recv(html)._option();
  5319. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5320. $ctx3.sendIdx["option"]=4;
  5321. //>>excludeEnd("ctx");
  5322. $recv($27)._with_("References");
  5323. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5324. $ctx3.sendIdx["with:"]=12;
  5325. //>>excludeEnd("ctx");
  5326. $recv($27)._at_put_("disabled","disabled");
  5327. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5328. $ctx3.sendIdx["at:put:"]=3;
  5329. //>>excludeEnd("ctx");
  5330. $recv($27)._at_put_("selected","selected");
  5331. $28=$recv(html)._option();
  5332. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5333. $ctx3.sendIdx["option"]=5;
  5334. //>>excludeEnd("ctx");
  5335. $recv($28)._class_("important");
  5336. $29=$recv($28)._with_($recv(self["@selectedMethod"])._selector());
  5337. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5338. $ctx3.sendIdx["with:"]=13;
  5339. //>>excludeEnd("ctx");
  5340. $29;
  5341. return $recv($recv($recv(self["@selectedMethod"])._messageSends())._sorted())._do_((function(each){
  5342. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5343. return $core.withContext(function($ctx4) {
  5344. //>>excludeEnd("ctx");
  5345. return $recv($recv(html)._option())._with_(each);
  5346. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5347. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,18)});
  5348. //>>excludeEnd("ctx");
  5349. }));
  5350. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5351. }, function($ctx3) {$ctx3.fillBlock({option:option},$ctx2,17)});
  5352. //>>excludeEnd("ctx");
  5353. }));
  5354. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5355. $ctx2.sendIdx["with:"]=11;
  5356. //>>excludeEnd("ctx");
  5357. return $26;
  5358. };
  5359. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5360. }, function($ctx2) {$ctx2.fillBlock({html:html,protocolSelect:protocolSelect,referencesSelect:referencesSelect},$ctx1,7)});
  5361. //>>excludeEnd("ctx");
  5362. }));
  5363. $30=$recv(self["@selectedMethod"])._isNil();
  5364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5365. $ctx1.sendIdx["isNil"]=3;
  5366. //>>excludeEnd("ctx");
  5367. if($core.assert($30)){
  5368. self._hideMethodButtons();
  5369. $31=$recv($recv(self["@selectedClass"])._isNil())._or_((function(){
  5370. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5371. return $core.withContext(function($ctx2) {
  5372. //>>excludeEnd("ctx");
  5373. return $recv(self["@selectedProtocol"])._notNil();
  5374. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5375. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,20)});
  5376. //>>excludeEnd("ctx");
  5377. }));
  5378. if($core.assert($31)){
  5379. self._hideClassButtons();
  5380. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5381. $ctx1.sendIdx["hideClassButtons"]=1;
  5382. //>>excludeEnd("ctx");
  5383. } else {
  5384. self._showClassButtons();
  5385. };
  5386. } else {
  5387. self._hideClassButtons();
  5388. self._showMethodButtons();
  5389. };
  5390. $recv(self["@sourceArea"])._val_(self._source());
  5391. return self;
  5392. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5393. }, function($ctx1) {$ctx1.fill(self,"updateSourceAndButtons",{currentProtocol:currentProtocol},$globals.Browser)});
  5394. //>>excludeEnd("ctx");
  5395. },
  5396. //>>excludeStart("ide", pragmas.excludeIdeData);
  5397. args: [],
  5398. source: "updateSourceAndButtons\x0a\x09| currentProtocol |\x0a\x0a\x09self disableSaveButton.\x0a\x09classButtons contents: [ :html |\x0a\x09\x09html button\x0a\x09\x09\x09title: 'Create a new class';\x0a\x09\x09\x09onClick: [ self addNewClass ];\x0a\x09\x09\x09with: 'New class'.\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Rename class';\x0a\x09\x09\x09onClick: [ self renameClass ].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Copy class';\x0a\x09\x09\x09onClick: [ self copyClass ].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Remove class';\x0a\x09\x09\x09onClick: [ self removeClass ].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'References';\x0a\x09\x09\x09onClick: [ self searchClassReferences ]].\x0a\x09methodButtons contents: [ :html | | protocolSelect referencesSelect |\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Remove method';\x0a\x09\x09\x09onClick: [ self removeMethod ].\x0a\x09\x09protocolSelect := html select.\x0a\x09\x09\x09\x09protocolSelect\x0a\x09\x09\x09onChange: [ self setMethodProtocol: protocolSelect asJQuery val ];\x0a\x09\x09\x09with: [\x0a\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09with: 'Method protocol';\x0a\x09\x09\x09\x09\x09at: 'disabled' put: 'disabled'.\x0a\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09class: 'important';\x0a\x09\x09\x09\x09\x09with: 'New...'.\x0a\x09\x09\x09\x09currentProtocol := selectedProtocol.\x0a\x09\x09\x09\x09(currentProtocol isNil and: [ selectedMethod notNil ])\x0a\x09\x09\x09\x09\x09ifTrue: [ currentProtocol := selectedMethod category ].\x0a\x09\x09\x09\x09self protocols do: [ :each | | option |\x0a\x09\x09\x09\x09\x09option := html option with: each.\x0a\x09\x09\x09\x09\x09currentProtocol = each ifTrue: [ option at: 'selected' put: 'selected' ] ] ].\x0a\x09\x09selectedMethod isNil ifFalse: [\x0a\x09\x09\x09referencesSelect := html select.\x0a\x09\x09\x09\x09\x09\x09referencesSelect\x0a\x09\x09\x09\x09onChange: [ self searchReferencesOf: referencesSelect asJQuery val ];\x0a\x09\x09\x09\x09with: [ |option|\x0a\x09\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09\x09with: 'References';\x0a\x09\x09\x09\x09\x09\x09at: 'disabled' put: 'disabled';\x0a\x09\x09\x09\x09\x09\x09at: 'selected' put: 'selected'.\x0a\x09\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09\x09class: 'important';\x0a\x09\x09\x09\x09\x09\x09with: selectedMethod selector.\x0a\x09\x09\x09\x09\x09selectedMethod messageSends sorted do: [ :each |\x0a\x09\x09\x09\x09\x09\x09html option with: each ]] ]].\x0a\x09selectedMethod isNil\x0a\x09\x09ifTrue: [\x0a\x09\x09\x09self hideMethodButtons.\x0a\x09\x09\x09\x09(selectedClass isNil or: [ selectedProtocol notNil ])\x0a\x09\x09\x09\x09\x09ifTrue: [ self hideClassButtons ]\x0a\x09\x09\x09\x09\x09ifFalse: [ self showClassButtons ]]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09self hideClassButtons.\x0a\x09\x09\x09self showMethodButtons ].\x0a\x09sourceArea val: self source",
  5399. referencedClasses: [],
  5400. //>>excludeEnd("ide");
  5401. messageSends: ["disableSaveButton", "contents:", "title:", "button", "onClick:", "addNewClass", "with:", "renameClass", "copyClass", "removeClass", "searchClassReferences", "removeMethod", "select", "onChange:", "setMethodProtocol:", "val", "asJQuery", "option", "at:put:", "class:", "ifTrue:", "and:", "isNil", "notNil", "category", "do:", "protocols", "=", "ifFalse:", "searchReferencesOf:", "selector", "sorted", "messageSends", "ifTrue:ifFalse:", "hideMethodButtons", "or:", "hideClassButtons", "showClassButtons", "showMethodButtons", "val:", "source"]
  5402. }),
  5403. $globals.Browser);
  5404. $core.addMethod(
  5405. $core.method({
  5406. selector: "updateStatus",
  5407. protocol: 'updating',
  5408. fn: function (){
  5409. var self=this;
  5410. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5411. return $core.withContext(function($ctx1) {
  5412. //>>excludeEnd("ctx");
  5413. var $1,$2,$3,$receiver;
  5414. $1=$recv($recv(self["@sourceArea"])._val()).__eq(self._source());
  5415. if($core.assert($1)){
  5416. $2=self["@saveButton"];
  5417. if(($receiver = $2) == null || $receiver.isNil){
  5418. $2;
  5419. } else {
  5420. $recv(self["@saveButton"])._at_put_("disabled",true);
  5421. };
  5422. self["@unsavedChanges"]=false;
  5423. self["@unsavedChanges"];
  5424. } else {
  5425. $3=self["@saveButton"];
  5426. if(($receiver = $3) == null || $receiver.isNil){
  5427. $3;
  5428. } else {
  5429. $recv(self["@saveButton"])._removeAt_("disabled");
  5430. };
  5431. self["@unsavedChanges"]=true;
  5432. self["@unsavedChanges"];
  5433. };
  5434. return self;
  5435. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5436. }, function($ctx1) {$ctx1.fill(self,"updateStatus",{},$globals.Browser)});
  5437. //>>excludeEnd("ctx");
  5438. },
  5439. //>>excludeStart("ide", pragmas.excludeIdeData);
  5440. args: [],
  5441. source: "updateStatus\x0a\x09sourceArea val = self source\x0a\x09\x09ifTrue: [\x0a\x09\x09\x09saveButton ifNotNil: [\x0a\x09\x09\x09\x09saveButton at: 'disabled' put: true ].\x0a\x09\x09\x09\x09unsavedChanges := false ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09saveButton ifNotNil: [\x0a\x09\x09\x09\x09saveButton removeAt: 'disabled' ].\x0a\x09\x09\x09unsavedChanges := true ]",
  5442. referencedClasses: [],
  5443. //>>excludeEnd("ide");
  5444. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"]
  5445. }),
  5446. $globals.Browser);
  5447. $core.addMethod(
  5448. $core.method({
  5449. selector: "updateTabsList",
  5450. protocol: 'updating',
  5451. fn: function (){
  5452. var self=this;
  5453. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5454. return $core.withContext(function($ctx1) {
  5455. //>>excludeEnd("ctx");
  5456. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18;
  5457. $recv(self["@tabsList"])._contents_((function(html){
  5458. var li;
  5459. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5460. return $core.withContext(function($ctx2) {
  5461. //>>excludeEnd("ctx");
  5462. li=$recv(html)._li();
  5463. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5464. $ctx2.sendIdx["li"]=1;
  5465. //>>excludeEnd("ctx");
  5466. li;
  5467. $1=$recv(self["@selectedTab"]).__eq("instance");
  5468. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5469. $ctx2.sendIdx["="]=1;
  5470. //>>excludeEnd("ctx");
  5471. if($core.assert($1)){
  5472. $recv(li)._class_("selected");
  5473. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5474. $ctx2.sendIdx["class:"]=1;
  5475. //>>excludeEnd("ctx");
  5476. };
  5477. $2=li;
  5478. $recv($2)._with_((function(){
  5479. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5480. return $core.withContext(function($ctx3) {
  5481. //>>excludeEnd("ctx");
  5482. $3=$recv(html)._span();
  5483. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5484. $ctx3.sendIdx["span"]=1;
  5485. //>>excludeEnd("ctx");
  5486. $recv($3)._class_("ltab");
  5487. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5488. $ctx3.sendIdx["class:"]=2;
  5489. //>>excludeEnd("ctx");
  5490. $4=$recv(html)._span();
  5491. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5492. $ctx3.sendIdx["span"]=2;
  5493. //>>excludeEnd("ctx");
  5494. $recv($4)._class_("mtab");
  5495. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5496. $ctx3.sendIdx["class:"]=3;
  5497. //>>excludeEnd("ctx");
  5498. $5=$recv($4)._with_("Instance");
  5499. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5500. $ctx3.sendIdx["with:"]=2;
  5501. //>>excludeEnd("ctx");
  5502. $5;
  5503. $6=$recv(html)._span();
  5504. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5505. $ctx3.sendIdx["span"]=3;
  5506. //>>excludeEnd("ctx");
  5507. return $recv($6)._class_("rtab");
  5508. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5509. $ctx3.sendIdx["class:"]=4;
  5510. //>>excludeEnd("ctx");
  5511. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5512. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  5513. //>>excludeEnd("ctx");
  5514. }));
  5515. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5516. $ctx2.sendIdx["with:"]=1;
  5517. //>>excludeEnd("ctx");
  5518. $7=$recv($2)._onClick_((function(){
  5519. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5520. return $core.withContext(function($ctx3) {
  5521. //>>excludeEnd("ctx");
  5522. return self._selectTab_("instance");
  5523. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5524. $ctx3.sendIdx["selectTab:"]=1;
  5525. //>>excludeEnd("ctx");
  5526. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5527. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  5528. //>>excludeEnd("ctx");
  5529. }));
  5530. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5531. $ctx2.sendIdx["onClick:"]=1;
  5532. //>>excludeEnd("ctx");
  5533. $7;
  5534. li=$recv(html)._li();
  5535. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5536. $ctx2.sendIdx["li"]=2;
  5537. //>>excludeEnd("ctx");
  5538. li;
  5539. $8=$recv(self["@selectedTab"]).__eq("class");
  5540. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5541. $ctx2.sendIdx["="]=2;
  5542. //>>excludeEnd("ctx");
  5543. if($core.assert($8)){
  5544. $recv(li)._class_("selected");
  5545. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5546. $ctx2.sendIdx["class:"]=5;
  5547. //>>excludeEnd("ctx");
  5548. };
  5549. $9=li;
  5550. $recv($9)._with_((function(){
  5551. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5552. return $core.withContext(function($ctx3) {
  5553. //>>excludeEnd("ctx");
  5554. $10=$recv(html)._span();
  5555. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5556. $ctx3.sendIdx["span"]=4;
  5557. //>>excludeEnd("ctx");
  5558. $recv($10)._class_("ltab");
  5559. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5560. $ctx3.sendIdx["class:"]=6;
  5561. //>>excludeEnd("ctx");
  5562. $11=$recv(html)._span();
  5563. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5564. $ctx3.sendIdx["span"]=5;
  5565. //>>excludeEnd("ctx");
  5566. $recv($11)._class_("mtab");
  5567. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5568. $ctx3.sendIdx["class:"]=7;
  5569. //>>excludeEnd("ctx");
  5570. $12=$recv($11)._with_("Class");
  5571. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5572. $ctx3.sendIdx["with:"]=4;
  5573. //>>excludeEnd("ctx");
  5574. $12;
  5575. $13=$recv(html)._span();
  5576. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5577. $ctx3.sendIdx["span"]=6;
  5578. //>>excludeEnd("ctx");
  5579. return $recv($13)._class_("rtab");
  5580. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5581. $ctx3.sendIdx["class:"]=8;
  5582. //>>excludeEnd("ctx");
  5583. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5584. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,6)});
  5585. //>>excludeEnd("ctx");
  5586. }));
  5587. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5588. $ctx2.sendIdx["with:"]=3;
  5589. //>>excludeEnd("ctx");
  5590. $14=$recv($9)._onClick_((function(){
  5591. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5592. return $core.withContext(function($ctx3) {
  5593. //>>excludeEnd("ctx");
  5594. return self._selectTab_("class");
  5595. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5596. $ctx3.sendIdx["selectTab:"]=2;
  5597. //>>excludeEnd("ctx");
  5598. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5599. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)});
  5600. //>>excludeEnd("ctx");
  5601. }));
  5602. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5603. $ctx2.sendIdx["onClick:"]=2;
  5604. //>>excludeEnd("ctx");
  5605. $14;
  5606. li=$recv(html)._li();
  5607. li;
  5608. $15=$recv(self["@selectedTab"]).__eq("comment");
  5609. if($core.assert($15)){
  5610. $recv(li)._class_("selected");
  5611. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5612. $ctx2.sendIdx["class:"]=9;
  5613. //>>excludeEnd("ctx");
  5614. };
  5615. $16=li;
  5616. $recv($16)._with_((function(){
  5617. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5618. return $core.withContext(function($ctx3) {
  5619. //>>excludeEnd("ctx");
  5620. $17=$recv(html)._span();
  5621. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5622. $ctx3.sendIdx["span"]=7;
  5623. //>>excludeEnd("ctx");
  5624. $recv($17)._class_("ltab");
  5625. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5626. $ctx3.sendIdx["class:"]=10;
  5627. //>>excludeEnd("ctx");
  5628. $18=$recv(html)._span();
  5629. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5630. $ctx3.sendIdx["span"]=8;
  5631. //>>excludeEnd("ctx");
  5632. $recv($18)._class_("mtab");
  5633. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5634. $ctx3.sendIdx["class:"]=11;
  5635. //>>excludeEnd("ctx");
  5636. $recv($18)._with_("Comment");
  5637. return $recv($recv(html)._span())._class_("rtab");
  5638. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5639. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)});
  5640. //>>excludeEnd("ctx");
  5641. }));
  5642. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5643. $ctx2.sendIdx["with:"]=5;
  5644. //>>excludeEnd("ctx");
  5645. return $recv($16)._onClick_((function(){
  5646. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5647. return $core.withContext(function($ctx3) {
  5648. //>>excludeEnd("ctx");
  5649. return self._selectTab_("comment");
  5650. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5651. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,10)});
  5652. //>>excludeEnd("ctx");
  5653. }));
  5654. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5655. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1,1)});
  5656. //>>excludeEnd("ctx");
  5657. }));
  5658. return self;
  5659. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5660. }, function($ctx1) {$ctx1.fill(self,"updateTabsList",{},$globals.Browser)});
  5661. //>>excludeEnd("ctx");
  5662. },
  5663. //>>excludeStart("ide", pragmas.excludeIdeData);
  5664. args: [],
  5665. source: "updateTabsList\x0a\x09tabsList contents: [ :html || li |\x0a\x09li := html li.\x0a\x09selectedTab = #instance ifTrue: [ li class: 'selected' ].\x0a\x09li\x0a\x09\x09with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span class: 'mtab'; with: 'Instance'.\x0a\x09\x09html span class: 'rtab' ];\x0a\x09\x09onClick: [ self selectTab: #instance ].\x0a\x09li := html li.\x0a\x09selectedTab = #class ifTrue: [ li class: 'selected' ].\x0a\x09li\x0a\x09\x09with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span class: 'mtab'; with: 'Class'.\x0a\x09\x09html span class: 'rtab' ];\x0a\x09\x09onClick: [ self selectTab: #class ].\x0a\x09li := html li.\x0a\x09selectedTab = #comment ifTrue: [ li class: 'selected' ].\x0a\x09li\x0a\x09\x09with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span class: 'mtab'; with: 'Comment'.\x0a\x09\x09html span class: 'rtab' ];\x0a\x09\x09onClick: [ self selectTab: #comment ]]",
  5666. referencedClasses: [],
  5667. //>>excludeEnd("ide");
  5668. messageSends: ["contents:", "li", "ifTrue:", "=", "class:", "with:", "span", "onClick:", "selectTab:"]
  5669. }),
  5670. $globals.Browser);
  5671. $core.addMethod(
  5672. $core.method({
  5673. selector: "open",
  5674. protocol: 'convenience',
  5675. fn: function (){
  5676. var self=this;
  5677. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5678. return $core.withContext(function($ctx1) {
  5679. //>>excludeEnd("ctx");
  5680. $recv(self._new())._open();
  5681. return self;
  5682. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5683. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.Browser.klass)});
  5684. //>>excludeEnd("ctx");
  5685. },
  5686. //>>excludeStart("ide", pragmas.excludeIdeData);
  5687. args: [],
  5688. source: "open\x0a\x09self new open",
  5689. referencedClasses: [],
  5690. //>>excludeEnd("ide");
  5691. messageSends: ["open", "new"]
  5692. }),
  5693. $globals.Browser.klass);
  5694. $core.addMethod(
  5695. $core.method({
  5696. selector: "openOn:",
  5697. protocol: 'convenience',
  5698. fn: function (aClass){
  5699. var self=this;
  5700. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5701. return $core.withContext(function($ctx1) {
  5702. //>>excludeEnd("ctx");
  5703. var $1;
  5704. $1=self._new();
  5705. $recv($1)._open();
  5706. $recv($1)._selectCategory_($recv(aClass)._category());
  5707. return $recv($1)._selectClass_(aClass);
  5708. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5709. }, function($ctx1) {$ctx1.fill(self,"openOn:",{aClass:aClass},$globals.Browser.klass)});
  5710. //>>excludeEnd("ctx");
  5711. },
  5712. //>>excludeStart("ide", pragmas.excludeIdeData);
  5713. args: ["aClass"],
  5714. source: "openOn: aClass\x0a\x09^ self new\x0a\x09open;\x0a\x09selectCategory: aClass category;\x0a\x09selectClass: aClass",
  5715. referencedClasses: [],
  5716. //>>excludeEnd("ide");
  5717. messageSends: ["open", "new", "selectCategory:", "category", "selectClass:"]
  5718. }),
  5719. $globals.Browser.klass);
  5720. $core.addClass('Debugger', $globals.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  5721. $core.addMethod(
  5722. $core.method({
  5723. selector: "allVariables",
  5724. protocol: 'accessing',
  5725. fn: function (){
  5726. var self=this;
  5727. var all;
  5728. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5729. return $core.withContext(function($ctx1) {
  5730. //>>excludeEnd("ctx");
  5731. var $3,$2,$1;
  5732. all=$recv($globals.Dictionary)._new();
  5733. $3=self._receiver();
  5734. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5735. $ctx1.sendIdx["receiver"]=1;
  5736. //>>excludeEnd("ctx");
  5737. $2=$recv($3)._class();
  5738. $1=$recv($2)._allInstanceVariableNames();
  5739. $recv($1)._do_((function(each){
  5740. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5741. return $core.withContext(function($ctx2) {
  5742. //>>excludeEnd("ctx");
  5743. return $recv(all)._at_put_(each,$recv(self._receiver())._instVarAt_(each));
  5744. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5745. $ctx2.sendIdx["at:put:"]=1;
  5746. //>>excludeEnd("ctx");
  5747. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5748. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  5749. //>>excludeEnd("ctx");
  5750. }));
  5751. $recv($recv(self["@selectedContext"])._locals())._keysAndValuesDo_((function(key,value){
  5752. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5753. return $core.withContext(function($ctx2) {
  5754. //>>excludeEnd("ctx");
  5755. return $recv(all)._at_put_(key,value);
  5756. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5757. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,2)});
  5758. //>>excludeEnd("ctx");
  5759. }));
  5760. return all;
  5761. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5762. }, function($ctx1) {$ctx1.fill(self,"allVariables",{all:all},$globals.Debugger)});
  5763. //>>excludeEnd("ctx");
  5764. },
  5765. //>>excludeStart("ide", pragmas.excludeIdeData);
  5766. args: [],
  5767. source: "allVariables\x0a\x09| all |\x0a\x09all := Dictionary new.\x0a\x0a\x09self receiver class allInstanceVariableNames do: [ :each |\x0a\x09\x09all at: each put: (self receiver instVarAt: each) ].\x0a\x09\x0a\x09selectedContext locals keysAndValuesDo: [ :key :value |\x0a\x09\x09all at: key put: value ].\x0a\x09\x0a\x09^ all",
  5768. referencedClasses: ["Dictionary"],
  5769. //>>excludeEnd("ide");
  5770. messageSends: ["new", "do:", "allInstanceVariableNames", "class", "receiver", "at:put:", "instVarAt:", "keysAndValuesDo:", "locals"]
  5771. }),
  5772. $globals.Debugger);
  5773. $core.addMethod(
  5774. $core.method({
  5775. selector: "canBeClosed",
  5776. protocol: 'testing',
  5777. fn: function (){
  5778. var self=this;
  5779. return true;
  5780. },
  5781. //>>excludeStart("ide", pragmas.excludeIdeData);
  5782. args: [],
  5783. source: "canBeClosed\x0a\x09^ true",
  5784. referencedClasses: [],
  5785. //>>excludeEnd("ide");
  5786. messageSends: []
  5787. }),
  5788. $globals.Debugger);
  5789. $core.addMethod(
  5790. $core.method({
  5791. selector: "error",
  5792. protocol: 'accessing',
  5793. fn: function (){
  5794. var self=this;
  5795. return self["@error"];
  5796. },
  5797. //>>excludeStart("ide", pragmas.excludeIdeData);
  5798. args: [],
  5799. source: "error\x0a\x09^ error",
  5800. referencedClasses: [],
  5801. //>>excludeEnd("ide");
  5802. messageSends: []
  5803. }),
  5804. $globals.Debugger);
  5805. $core.addMethod(
  5806. $core.method({
  5807. selector: "error:",
  5808. protocol: 'accessing',
  5809. fn: function (anError){
  5810. var self=this;
  5811. self["@error"]=anError;
  5812. return self;
  5813. },
  5814. //>>excludeStart("ide", pragmas.excludeIdeData);
  5815. args: ["anError"],
  5816. source: "error: anError\x0a\x09error := anError",
  5817. referencedClasses: [],
  5818. //>>excludeEnd("ide");
  5819. messageSends: []
  5820. }),
  5821. $globals.Debugger);
  5822. $core.addMethod(
  5823. $core.method({
  5824. selector: "initialize",
  5825. protocol: 'initialization',
  5826. fn: function (){
  5827. var self=this;
  5828. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5829. return $core.withContext(function($ctx1) {
  5830. //>>excludeEnd("ctx");
  5831. (
  5832. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5833. $ctx1.supercall = true,
  5834. //>>excludeEnd("ctx");
  5835. ($globals.Debugger.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
  5836. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5837. $ctx1.supercall = false;
  5838. //>>excludeEnd("ctx");;
  5839. $recv(self["@unsavedChanges"]).__eq(false);
  5840. return self;
  5841. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5842. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.Debugger)});
  5843. //>>excludeEnd("ctx");
  5844. },
  5845. //>>excludeStart("ide", pragmas.excludeIdeData);
  5846. args: [],
  5847. source: "initialize\x0a\x09super initialize.\x0a\x09unsavedChanges = false",
  5848. referencedClasses: [],
  5849. //>>excludeEnd("ide");
  5850. messageSends: ["initialize", "="]
  5851. }),
  5852. $globals.Debugger);
  5853. $core.addMethod(
  5854. $core.method({
  5855. selector: "inspectSelectedVariable",
  5856. protocol: 'actions',
  5857. fn: function (){
  5858. var self=this;
  5859. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5860. return $core.withContext(function($ctx1) {
  5861. //>>excludeEnd("ctx");
  5862. $recv(self["@selectedVariable"])._inspect();
  5863. return self;
  5864. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5865. }, function($ctx1) {$ctx1.fill(self,"inspectSelectedVariable",{},$globals.Debugger)});
  5866. //>>excludeEnd("ctx");
  5867. },
  5868. //>>excludeStart("ide", pragmas.excludeIdeData);
  5869. args: [],
  5870. source: "inspectSelectedVariable\x0a\x09selectedVariable inspect",
  5871. referencedClasses: [],
  5872. //>>excludeEnd("ide");
  5873. messageSends: ["inspect"]
  5874. }),
  5875. $globals.Debugger);
  5876. $core.addMethod(
  5877. $core.method({
  5878. selector: "label",
  5879. protocol: 'accessing',
  5880. fn: function (){
  5881. var self=this;
  5882. return "[ Debugger ]";
  5883. },
  5884. //>>excludeStart("ide", pragmas.excludeIdeData);
  5885. args: [],
  5886. source: "label\x0a\x09^ '[ Debugger ]'",
  5887. referencedClasses: [],
  5888. //>>excludeEnd("ide");
  5889. messageSends: []
  5890. }),
  5891. $globals.Debugger);
  5892. $core.addMethod(
  5893. $core.method({
  5894. selector: "method",
  5895. protocol: 'accessing',
  5896. fn: function (){
  5897. var self=this;
  5898. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5899. return $core.withContext(function($ctx1) {
  5900. //>>excludeEnd("ctx");
  5901. return $recv(self["@selectedContext"])._method();
  5902. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5903. }, function($ctx1) {$ctx1.fill(self,"method",{},$globals.Debugger)});
  5904. //>>excludeEnd("ctx");
  5905. },
  5906. //>>excludeStart("ide", pragmas.excludeIdeData);
  5907. args: [],
  5908. source: "method\x0a\x09^ selectedContext method",
  5909. referencedClasses: [],
  5910. //>>excludeEnd("ide");
  5911. messageSends: ["method"]
  5912. }),
  5913. $globals.Debugger);
  5914. $core.addMethod(
  5915. $core.method({
  5916. selector: "proceed",
  5917. protocol: 'actions',
  5918. fn: function (){
  5919. var self=this;
  5920. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5921. return $core.withContext(function($ctx1) {
  5922. //>>excludeEnd("ctx");
  5923. self._close();
  5924. $recv($recv(self["@selectedContext"])._receiver())._perform_withArguments_($recv(self["@selectedContext"])._selector(),$recv(self["@selectedContext"])._locals());
  5925. return self;
  5926. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5927. }, function($ctx1) {$ctx1.fill(self,"proceed",{},$globals.Debugger)});
  5928. //>>excludeEnd("ctx");
  5929. },
  5930. //>>excludeStart("ide", pragmas.excludeIdeData);
  5931. args: [],
  5932. source: "proceed\x0a\x09self close.\x0a\x09selectedContext receiver perform: selectedContext selector withArguments: selectedContext locals",
  5933. referencedClasses: [],
  5934. //>>excludeEnd("ide");
  5935. messageSends: ["close", "perform:withArguments:", "receiver", "selector", "locals"]
  5936. }),
  5937. $globals.Debugger);
  5938. $core.addMethod(
  5939. $core.method({
  5940. selector: "receiver",
  5941. protocol: 'accessing',
  5942. fn: function (){
  5943. var self=this;
  5944. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5945. return $core.withContext(function($ctx1) {
  5946. //>>excludeEnd("ctx");
  5947. return $recv(self["@selectedContext"])._receiver();
  5948. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5949. }, function($ctx1) {$ctx1.fill(self,"receiver",{},$globals.Debugger)});
  5950. //>>excludeEnd("ctx");
  5951. },
  5952. //>>excludeStart("ide", pragmas.excludeIdeData);
  5953. args: [],
  5954. source: "receiver\x0a\x09^ selectedContext receiver",
  5955. referencedClasses: [],
  5956. //>>excludeEnd("ide");
  5957. messageSends: ["receiver"]
  5958. }),
  5959. $globals.Debugger);
  5960. $core.addMethod(
  5961. $core.method({
  5962. selector: "renderBottomPanelOn:",
  5963. protocol: 'rendering',
  5964. fn: function (html){
  5965. var self=this;
  5966. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5967. return $core.withContext(function($ctx1) {
  5968. //>>excludeEnd("ctx");
  5969. var $1;
  5970. $1=$recv(html)._div();
  5971. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5972. $ctx1.sendIdx["div"]=1;
  5973. //>>excludeEnd("ctx");
  5974. $recv($1)._class_("amber_sourceCode debugger");
  5975. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5976. $ctx1.sendIdx["class:"]=1;
  5977. //>>excludeEnd("ctx");
  5978. $recv($1)._with_((function(){
  5979. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5980. return $core.withContext(function($ctx2) {
  5981. //>>excludeEnd("ctx");
  5982. self["@sourceArea"]=$recv($globals.SourceArea)._new();
  5983. self["@sourceArea"];
  5984. return $recv(self["@sourceArea"])._renderOn_(html);
  5985. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5986. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  5987. //>>excludeEnd("ctx");
  5988. }));
  5989. self["@ul2"]=$recv($recv(html)._ul())._class_("amber_column debugger variables");
  5990. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5991. $ctx1.sendIdx["class:"]=2;
  5992. //>>excludeEnd("ctx");
  5993. self["@inspector"]=$recv($recv(html)._div())._class_("amber_column debugger inspector");
  5994. $recv(self["@sourceArea"])._onKeyUp_((function(){
  5995. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5996. return $core.withContext(function($ctx2) {
  5997. //>>excludeEnd("ctx");
  5998. return self._updateStatus();
  5999. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6000. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  6001. //>>excludeEnd("ctx");
  6002. }));
  6003. return self;
  6004. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6005. }, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},$globals.Debugger)});
  6006. //>>excludeEnd("ctx");
  6007. },
  6008. //>>excludeStart("ide", pragmas.excludeIdeData);
  6009. args: ["html"],
  6010. source: "renderBottomPanelOn: html\x0a\x09html div\x0a\x09\x09class: 'amber_sourceCode debugger';\x0a\x09\x09with: [\x0a\x09\x09\x09sourceArea := SourceArea new.\x0a\x09\x09\x09sourceArea renderOn: html ].\x0a\x09ul2 := html ul class: 'amber_column debugger variables'.\x0a\x09inspector := html div class: 'amber_column debugger inspector'.\x0a\x09sourceArea\x0a\x09\x09onKeyUp: [ self updateStatus ]",
  6011. referencedClasses: ["SourceArea"],
  6012. //>>excludeEnd("ide");
  6013. messageSends: ["class:", "div", "with:", "new", "renderOn:", "ul", "onKeyUp:", "updateStatus"]
  6014. }),
  6015. $globals.Debugger);
  6016. $core.addMethod(
  6017. $core.method({
  6018. selector: "renderBoxOn:",
  6019. protocol: 'rendering',
  6020. fn: function (html){
  6021. var self=this;
  6022. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6023. return $core.withContext(function($ctx1) {
  6024. //>>excludeEnd("ctx");
  6025. self._renderTopPanelOn_(html);
  6026. self._renderBottomPanelOn_(html);
  6027. return self;
  6028. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6029. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.Debugger)});
  6030. //>>excludeEnd("ctx");
  6031. },
  6032. //>>excludeStart("ide", pragmas.excludeIdeData);
  6033. args: ["html"],
  6034. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
  6035. referencedClasses: [],
  6036. //>>excludeEnd("ide");
  6037. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"]
  6038. }),
  6039. $globals.Debugger);
  6040. $core.addMethod(
  6041. $core.method({
  6042. selector: "renderButtonsOn:",
  6043. protocol: 'rendering',
  6044. fn: function (html){
  6045. var self=this;
  6046. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6047. return $core.withContext(function($ctx1) {
  6048. //>>excludeEnd("ctx");
  6049. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13;
  6050. $1=$recv(html)._button();
  6051. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6052. $ctx1.sendIdx["button"]=1;
  6053. //>>excludeEnd("ctx");
  6054. $recv($1)._with_("Save");
  6055. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6056. $ctx1.sendIdx["with:"]=1;
  6057. //>>excludeEnd("ctx");
  6058. $2=$recv($1)._onClick_((function(){
  6059. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6060. return $core.withContext(function($ctx2) {
  6061. //>>excludeEnd("ctx");
  6062. return self._save();
  6063. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6064. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6065. //>>excludeEnd("ctx");
  6066. }));
  6067. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6068. $ctx1.sendIdx["onClick:"]=1;
  6069. //>>excludeEnd("ctx");
  6070. self["@saveButton"]=$2;
  6071. $3=$recv(html)._button();
  6072. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6073. $ctx1.sendIdx["button"]=2;
  6074. //>>excludeEnd("ctx");
  6075. $recv($3)._with_("DoIt");
  6076. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6077. $ctx1.sendIdx["with:"]=2;
  6078. //>>excludeEnd("ctx");
  6079. $4=$recv($3)._onClick_((function(){
  6080. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6081. return $core.withContext(function($ctx2) {
  6082. //>>excludeEnd("ctx");
  6083. return $recv(self["@sourceArea"])._doIt();
  6084. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6085. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  6086. //>>excludeEnd("ctx");
  6087. }));
  6088. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6089. $ctx1.sendIdx["onClick:"]=2;
  6090. //>>excludeEnd("ctx");
  6091. $5=$recv(html)._button();
  6092. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6093. $ctx1.sendIdx["button"]=3;
  6094. //>>excludeEnd("ctx");
  6095. $recv($5)._with_("PrintIt");
  6096. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6097. $ctx1.sendIdx["with:"]=3;
  6098. //>>excludeEnd("ctx");
  6099. $6=$recv($5)._onClick_((function(){
  6100. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6101. return $core.withContext(function($ctx2) {
  6102. //>>excludeEnd("ctx");
  6103. return $recv(self["@sourceArea"])._printIt();
  6104. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6105. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  6106. //>>excludeEnd("ctx");
  6107. }));
  6108. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6109. $ctx1.sendIdx["onClick:"]=3;
  6110. //>>excludeEnd("ctx");
  6111. $7=$recv(html)._button();
  6112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6113. $ctx1.sendIdx["button"]=4;
  6114. //>>excludeEnd("ctx");
  6115. $recv($7)._with_("InspectIt");
  6116. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6117. $ctx1.sendIdx["with:"]=4;
  6118. //>>excludeEnd("ctx");
  6119. $8=$recv($7)._onClick_((function(){
  6120. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6121. return $core.withContext(function($ctx2) {
  6122. //>>excludeEnd("ctx");
  6123. return $recv(self["@sourceArea"])._inspectIt();
  6124. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6125. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  6126. //>>excludeEnd("ctx");
  6127. }));
  6128. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6129. $ctx1.sendIdx["onClick:"]=4;
  6130. //>>excludeEnd("ctx");
  6131. $9=$recv(html)._button();
  6132. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6133. $ctx1.sendIdx["button"]=5;
  6134. //>>excludeEnd("ctx");
  6135. $recv($9)._with_("Proceed");
  6136. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6137. $ctx1.sendIdx["with:"]=5;
  6138. //>>excludeEnd("ctx");
  6139. $10=$recv($9)._onClick_((function(){
  6140. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6141. return $core.withContext(function($ctx2) {
  6142. //>>excludeEnd("ctx");
  6143. return self._proceed();
  6144. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6145. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)});
  6146. //>>excludeEnd("ctx");
  6147. }));
  6148. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6149. $ctx1.sendIdx["onClick:"]=5;
  6150. //>>excludeEnd("ctx");
  6151. $11=$recv(html)._button();
  6152. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6153. $ctx1.sendIdx["button"]=6;
  6154. //>>excludeEnd("ctx");
  6155. $recv($11)._with_("Abandon");
  6156. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6157. $ctx1.sendIdx["with:"]=6;
  6158. //>>excludeEnd("ctx");
  6159. $12=$recv($11)._onClick_((function(){
  6160. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6161. return $core.withContext(function($ctx2) {
  6162. //>>excludeEnd("ctx");
  6163. return self._close();
  6164. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6165. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
  6166. //>>excludeEnd("ctx");
  6167. }));
  6168. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6169. $ctx1.sendIdx["onClick:"]=6;
  6170. //>>excludeEnd("ctx");
  6171. $13=$recv(html)._button();
  6172. $recv($13)._class_("amber_button debugger inspect");
  6173. $recv($13)._with_("Inspect");
  6174. self["@inspectButton"]=$recv($13)._onClick_((function(){
  6175. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6176. return $core.withContext(function($ctx2) {
  6177. //>>excludeEnd("ctx");
  6178. return self._inspectSelectedVariable();
  6179. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6180. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,7)});
  6181. //>>excludeEnd("ctx");
  6182. }));
  6183. self._updateSourceArea();
  6184. self._updateStatus();
  6185. self._updateVariablesList();
  6186. self._updateInspector();
  6187. return self;
  6188. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6189. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.Debugger)});
  6190. //>>excludeEnd("ctx");
  6191. },
  6192. //>>excludeStart("ide", pragmas.excludeIdeData);
  6193. args: ["html"],
  6194. source: "renderButtonsOn: html\x0a\x09saveButton := html button\x0a\x09\x09with: 'Save';\x0a\x09\x09onClick: [ self save ].\x0a\x09html button\x0a\x09\x09with: 'DoIt';\x0a\x09\x09onClick: [ sourceArea doIt ].\x0a\x09html button\x0a\x09\x09with: 'PrintIt';\x0a\x09\x09onClick: [ sourceArea printIt ].\x0a\x09html button\x0a\x09\x09with: 'InspectIt';\x0a\x09\x09onClick: [ sourceArea inspectIt ].\x0a\x09html button\x0a\x09\x09with: 'Proceed';\x0a\x09\x09onClick: [ self proceed ].\x0a\x09html button\x0a\x09\x09with: 'Abandon';\x0a\x09\x09onClick: [ self close ].\x0a\x09inspectButton := html button\x0a\x09\x09class: 'amber_button debugger inspect';\x0a\x09\x09with: 'Inspect';\x0a\x09\x09onClick: [ self inspectSelectedVariable ].\x0a\x09self\x0a\x09\x09updateSourceArea;\x0a\x09\x09updateStatus;\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateInspector",
  6195. referencedClasses: [],
  6196. //>>excludeEnd("ide");
  6197. messageSends: ["with:", "button", "onClick:", "save", "doIt", "printIt", "inspectIt", "proceed", "close", "class:", "inspectSelectedVariable", "updateSourceArea", "updateStatus", "updateVariablesList", "updateInspector"]
  6198. }),
  6199. $globals.Debugger);
  6200. $core.addMethod(
  6201. $core.method({
  6202. selector: "renderContext:on:",
  6203. protocol: 'rendering',
  6204. fn: function (aContext,html){
  6205. var self=this;
  6206. var li;
  6207. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6208. return $core.withContext(function($ctx1) {
  6209. //>>excludeEnd("ctx");
  6210. var $1,$2,$3,$receiver;
  6211. li=$recv(html)._li();
  6212. $1=$recv(self["@selectedContext"]).__eq(aContext);
  6213. if($core.assert($1)){
  6214. $recv(li)._class_("selected");
  6215. };
  6216. $2=li;
  6217. $recv($2)._with_($recv(aContext)._asString());
  6218. $recv($2)._onClick_((function(){
  6219. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6220. return $core.withContext(function($ctx2) {
  6221. //>>excludeEnd("ctx");
  6222. return self._selectContext_(aContext);
  6223. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6224. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  6225. //>>excludeEnd("ctx");
  6226. }));
  6227. $3=$recv(aContext)._outerContext();
  6228. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6229. $ctx1.sendIdx["outerContext"]=1;
  6230. //>>excludeEnd("ctx");
  6231. if(($receiver = $3) == null || $receiver.isNil){
  6232. $3;
  6233. } else {
  6234. self._renderContext_on_($recv(aContext)._outerContext(),html);
  6235. };
  6236. return self;
  6237. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6238. }, function($ctx1) {$ctx1.fill(self,"renderContext:on:",{aContext:aContext,html:html,li:li},$globals.Debugger)});
  6239. //>>excludeEnd("ctx");
  6240. },
  6241. //>>excludeStart("ide", pragmas.excludeIdeData);
  6242. args: ["aContext", "html"],
  6243. source: "renderContext: aContext on: html\x0a\x09| li |\x0a\x09li := html li.\x0a\x09selectedContext = aContext ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09li\x0a\x09\x09with: aContext asString;\x0a\x09\x09onClick: [ self selectContext: aContext ].\x0a\x09aContext outerContext ifNotNil: [ self renderContext: aContext outerContext on: html ]",
  6244. referencedClasses: [],
  6245. //>>excludeEnd("ide");
  6246. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "asString", "onClick:", "selectContext:", "ifNotNil:", "outerContext", "renderContext:on:"]
  6247. }),
  6248. $globals.Debugger);
  6249. $core.addMethod(
  6250. $core.method({
  6251. selector: "renderTopPanelOn:",
  6252. protocol: 'rendering',
  6253. fn: function (html){
  6254. var self=this;
  6255. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6256. return $core.withContext(function($ctx1) {
  6257. //>>excludeEnd("ctx");
  6258. var $1,$2,$4,$7,$6,$5,$8,$3;
  6259. $1=self._error();
  6260. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6261. $ctx1.sendIdx["error"]=1;
  6262. //>>excludeEnd("ctx");
  6263. self["@selectedContext"]=$recv($1)._context();
  6264. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6265. $ctx1.sendIdx["context"]=1;
  6266. //>>excludeEnd("ctx");
  6267. $2=$recv(html)._div();
  6268. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6269. $ctx1.sendIdx["div"]=1;
  6270. //>>excludeEnd("ctx");
  6271. $recv($2)._class_("top");
  6272. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6273. $ctx1.sendIdx["class:"]=1;
  6274. //>>excludeEnd("ctx");
  6275. $3=$recv($2)._with_((function(){
  6276. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6277. return $core.withContext(function($ctx2) {
  6278. //>>excludeEnd("ctx");
  6279. $4=$recv(html)._div();
  6280. $recv($4)._class_("label");
  6281. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6282. $ctx2.sendIdx["class:"]=2;
  6283. //>>excludeEnd("ctx");
  6284. $7=self._error();
  6285. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6286. $ctx2.sendIdx["error"]=2;
  6287. //>>excludeEnd("ctx");
  6288. $6=$recv($7)._messageText();
  6289. $5=$recv($4)._with_($6);
  6290. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6291. $ctx2.sendIdx["with:"]=2;
  6292. //>>excludeEnd("ctx");
  6293. $5;
  6294. $8=$recv(html)._ul();
  6295. $recv($8)._class_("amber_column debugger contexts");
  6296. self["@ul"]=$recv($8)._with_((function(){
  6297. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6298. return $core.withContext(function($ctx3) {
  6299. //>>excludeEnd("ctx");
  6300. return self._renderContext_on_($recv(self._error())._context(),html);
  6301. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6302. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  6303. //>>excludeEnd("ctx");
  6304. }));
  6305. return self["@ul"];
  6306. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6307. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6308. //>>excludeEnd("ctx");
  6309. }));
  6310. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6311. $ctx1.sendIdx["with:"]=1;
  6312. //>>excludeEnd("ctx");
  6313. return self;
  6314. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6315. }, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},$globals.Debugger)});
  6316. //>>excludeEnd("ctx");
  6317. },
  6318. //>>excludeStart("ide", pragmas.excludeIdeData);
  6319. args: ["html"],
  6320. source: "renderTopPanelOn: html\x0a\x09selectedContext := self error context.\x0a\x09html div\x0a\x09\x09class: 'top';\x0a\x09\x09with: [\x0a\x09\x09\x09html div\x0a\x09\x09\x09\x09class: 'label';\x0a\x09\x09\x09\x09with: self error messageText.\x0a\x09\x09\x09ul := html ul\x0a\x09\x09\x09\x09class: 'amber_column debugger contexts';\x0a\x09\x09\x09\x09with: [ self renderContext: self error context on: html ]]",
  6321. referencedClasses: [],
  6322. //>>excludeEnd("ide");
  6323. messageSends: ["context", "error", "class:", "div", "with:", "messageText", "ul", "renderContext:on:"]
  6324. }),
  6325. $globals.Debugger);
  6326. $core.addMethod(
  6327. $core.method({
  6328. selector: "save",
  6329. protocol: 'actions',
  6330. fn: function (){
  6331. var self=this;
  6332. var protocol;
  6333. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6334. return $core.withContext(function($ctx1) {
  6335. //>>excludeEnd("ctx");
  6336. var $4,$3,$2,$1;
  6337. $4=$recv(self["@selectedContext"])._receiver();
  6338. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6339. $ctx1.sendIdx["receiver"]=1;
  6340. //>>excludeEnd("ctx");
  6341. $3=$recv($4)._class();
  6342. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6343. $ctx1.sendIdx["class"]=1;
  6344. //>>excludeEnd("ctx");
  6345. $2=$recv($3)._methodDictionary();
  6346. $1=$recv($2)._at_($recv(self["@selectedContext"])._selector());
  6347. protocol=$recv($1)._category();
  6348. $recv($recv($recv(self["@selectedContext"])._receiver())._class())._compile_protocol_($recv(self["@sourceArea"])._val(),protocol);
  6349. self._updateStatus();
  6350. return self;
  6351. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6352. }, function($ctx1) {$ctx1.fill(self,"save",{protocol:protocol},$globals.Debugger)});
  6353. //>>excludeEnd("ctx");
  6354. },
  6355. //>>excludeStart("ide", pragmas.excludeIdeData);
  6356. args: [],
  6357. source: "save\x0a\x09| protocol |\x0a\x09protocol := (selectedContext receiver class methodDictionary at: selectedContext selector) category.\x0a\x09selectedContext receiver class compile: sourceArea val protocol: protocol.\x0a\x09self updateStatus",
  6358. referencedClasses: [],
  6359. //>>excludeEnd("ide");
  6360. messageSends: ["category", "at:", "methodDictionary", "class", "receiver", "selector", "compile:protocol:", "val", "updateStatus"]
  6361. }),
  6362. $globals.Debugger);
  6363. $core.addMethod(
  6364. $core.method({
  6365. selector: "selectContext:",
  6366. protocol: 'actions',
  6367. fn: function (aContext){
  6368. var self=this;
  6369. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6370. return $core.withContext(function($ctx1) {
  6371. //>>excludeEnd("ctx");
  6372. self["@selectedContext"]=aContext;
  6373. self["@selectedVariable"]=nil;
  6374. self["@selectedVariableName"]=nil;
  6375. self._updateContextsList();
  6376. self._updateSourceArea();
  6377. self._updateInspector();
  6378. self._updateVariablesList();
  6379. self._updateStatus();
  6380. return self;
  6381. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6382. }, function($ctx1) {$ctx1.fill(self,"selectContext:",{aContext:aContext},$globals.Debugger)});
  6383. //>>excludeEnd("ctx");
  6384. },
  6385. //>>excludeStart("ide", pragmas.excludeIdeData);
  6386. args: ["aContext"],
  6387. source: "selectContext: aContext\x0a\x09selectedContext := aContext.\x0a\x09selectedVariable := nil.\x0a\x09selectedVariableName := nil.\x0a\x09self\x0a\x09\x09updateContextsList;\x0a\x09\x09updateSourceArea;\x0a\x09\x09updateInspector;\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateStatus",
  6388. referencedClasses: [],
  6389. //>>excludeEnd("ide");
  6390. messageSends: ["updateContextsList", "updateSourceArea", "updateInspector", "updateVariablesList", "updateStatus"]
  6391. }),
  6392. $globals.Debugger);
  6393. $core.addMethod(
  6394. $core.method({
  6395. selector: "selectVariable:named:",
  6396. protocol: 'actions',
  6397. fn: function (anObject,aString){
  6398. var self=this;
  6399. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6400. return $core.withContext(function($ctx1) {
  6401. //>>excludeEnd("ctx");
  6402. self["@selectedVariable"]=anObject;
  6403. self["@selectedVariableName"]=aString;
  6404. $recv(self["@inspector"])._contents_((function(html){
  6405. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6406. return $core.withContext(function($ctx2) {
  6407. //>>excludeEnd("ctx");
  6408. return $recv(html)._with_($recv(anObject)._printString());
  6409. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6410. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  6411. //>>excludeEnd("ctx");
  6412. }));
  6413. self._updateVariablesList();
  6414. return self;
  6415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6416. }, function($ctx1) {$ctx1.fill(self,"selectVariable:named:",{anObject:anObject,aString:aString},$globals.Debugger)});
  6417. //>>excludeEnd("ctx");
  6418. },
  6419. //>>excludeStart("ide", pragmas.excludeIdeData);
  6420. args: ["anObject", "aString"],
  6421. source: "selectVariable: anObject named: aString\x0a\x09\x0a\x09selectedVariable := anObject.\x0a\x09selectedVariableName := aString.\x0a\x09inspector contents: [ :html | html with: anObject printString ].\x0a\x09self updateVariablesList",
  6422. referencedClasses: [],
  6423. //>>excludeEnd("ide");
  6424. messageSends: ["contents:", "with:", "printString", "updateVariablesList"]
  6425. }),
  6426. $globals.Debugger);
  6427. $core.addMethod(
  6428. $core.method({
  6429. selector: "source",
  6430. protocol: 'accessing',
  6431. fn: function (){
  6432. var self=this;
  6433. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6434. return $core.withContext(function($ctx1) {
  6435. //>>excludeEnd("ctx");
  6436. var $1,$receiver;
  6437. $1=self._method();
  6438. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6439. $ctx1.sendIdx["method"]=1;
  6440. //>>excludeEnd("ctx");
  6441. if(($receiver = $1) == null || $receiver.isNil){
  6442. return "Method doesn't exist!";
  6443. } else {
  6444. return $recv(self._method())._source();
  6445. };
  6446. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6447. }, function($ctx1) {$ctx1.fill(self,"source",{},$globals.Debugger)});
  6448. //>>excludeEnd("ctx");
  6449. },
  6450. //>>excludeStart("ide", pragmas.excludeIdeData);
  6451. args: [],
  6452. source: "source\x0a\x09^ self method\x0a\x09\x09ifNil: [ 'Method doesn''t exist!' ]\x0a\x09\x09ifNotNil: [ self method source ]",
  6453. referencedClasses: [],
  6454. //>>excludeEnd("ide");
  6455. messageSends: ["ifNil:ifNotNil:", "method", "source"]
  6456. }),
  6457. $globals.Debugger);
  6458. $core.addMethod(
  6459. $core.method({
  6460. selector: "updateContextsList",
  6461. protocol: 'updating',
  6462. fn: function (){
  6463. var self=this;
  6464. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6465. return $core.withContext(function($ctx1) {
  6466. //>>excludeEnd("ctx");
  6467. $recv(self["@ul"])._contents_((function(html){
  6468. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6469. return $core.withContext(function($ctx2) {
  6470. //>>excludeEnd("ctx");
  6471. return self._renderContext_on_($recv(self._error())._context(),html);
  6472. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6473. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  6474. //>>excludeEnd("ctx");
  6475. }));
  6476. return self;
  6477. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6478. }, function($ctx1) {$ctx1.fill(self,"updateContextsList",{},$globals.Debugger)});
  6479. //>>excludeEnd("ctx");
  6480. },
  6481. //>>excludeStart("ide", pragmas.excludeIdeData);
  6482. args: [],
  6483. source: "updateContextsList\x0a\x09ul contents: [ :html |\x0a\x09\x09self renderContext: self error context on: html ]",
  6484. referencedClasses: [],
  6485. //>>excludeEnd("ide");
  6486. messageSends: ["contents:", "renderContext:on:", "context", "error"]
  6487. }),
  6488. $globals.Debugger);
  6489. $core.addMethod(
  6490. $core.method({
  6491. selector: "updateInspector",
  6492. protocol: 'updating',
  6493. fn: function (){
  6494. var self=this;
  6495. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6496. return $core.withContext(function($ctx1) {
  6497. //>>excludeEnd("ctx");
  6498. $recv(self["@inspector"])._contents_((function(html){
  6499. }));
  6500. return self;
  6501. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6502. }, function($ctx1) {$ctx1.fill(self,"updateInspector",{},$globals.Debugger)});
  6503. //>>excludeEnd("ctx");
  6504. },
  6505. //>>excludeStart("ide", pragmas.excludeIdeData);
  6506. args: [],
  6507. source: "updateInspector\x0a\x09inspector contents: [ :html | ]",
  6508. referencedClasses: [],
  6509. //>>excludeEnd("ide");
  6510. messageSends: ["contents:"]
  6511. }),
  6512. $globals.Debugger);
  6513. $core.addMethod(
  6514. $core.method({
  6515. selector: "updateSourceArea",
  6516. protocol: 'updating',
  6517. fn: function (){
  6518. var self=this;
  6519. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6520. return $core.withContext(function($ctx1) {
  6521. //>>excludeEnd("ctx");
  6522. $recv(self["@sourceArea"])._val_(self._source());
  6523. return self;
  6524. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6525. }, function($ctx1) {$ctx1.fill(self,"updateSourceArea",{},$globals.Debugger)});
  6526. //>>excludeEnd("ctx");
  6527. },
  6528. //>>excludeStart("ide", pragmas.excludeIdeData);
  6529. args: [],
  6530. source: "updateSourceArea\x0a\x09sourceArea val: self source",
  6531. referencedClasses: [],
  6532. //>>excludeEnd("ide");
  6533. messageSends: ["val:", "source"]
  6534. }),
  6535. $globals.Debugger);
  6536. $core.addMethod(
  6537. $core.method({
  6538. selector: "updateStatus",
  6539. protocol: 'updating',
  6540. fn: function (){
  6541. var self=this;
  6542. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6543. return $core.withContext(function($ctx1) {
  6544. //>>excludeEnd("ctx");
  6545. var $1,$2,$3,$receiver;
  6546. $1=$recv($recv(self["@sourceArea"])._val()).__eq(self._source());
  6547. if($core.assert($1)){
  6548. $2=self["@saveButton"];
  6549. if(($receiver = $2) == null || $receiver.isNil){
  6550. $2;
  6551. } else {
  6552. $recv(self["@saveButton"])._at_put_("disabled",true);
  6553. };
  6554. self["@unsavedChanges"]=false;
  6555. self["@unsavedChanges"];
  6556. } else {
  6557. $3=self["@saveButton"];
  6558. if(($receiver = $3) == null || $receiver.isNil){
  6559. $3;
  6560. } else {
  6561. $recv(self["@saveButton"])._removeAt_("disabled");
  6562. };
  6563. self["@unsavedChanges"]=true;
  6564. self["@unsavedChanges"];
  6565. };
  6566. return self;
  6567. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6568. }, function($ctx1) {$ctx1.fill(self,"updateStatus",{},$globals.Debugger)});
  6569. //>>excludeEnd("ctx");
  6570. },
  6571. //>>excludeStart("ide", pragmas.excludeIdeData);
  6572. args: [],
  6573. source: "updateStatus\x0a\x09sourceArea val = self source\x0a\x09\x09ifTrue: [\x0a\x09\x09\x09saveButton ifNotNil: [\x0a\x09\x09\x09\x09saveButton at: 'disabled' put: true ].\x0a\x09\x09\x09unsavedChanges := false ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09saveButton ifNotNil: [\x0a\x09\x09\x09\x09saveButton removeAt: 'disabled' ].\x0a\x09\x09\x09unsavedChanges := true ]",
  6574. referencedClasses: [],
  6575. //>>excludeEnd("ide");
  6576. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"]
  6577. }),
  6578. $globals.Debugger);
  6579. $core.addMethod(
  6580. $core.method({
  6581. selector: "updateVariablesList",
  6582. protocol: 'updating',
  6583. fn: function (){
  6584. var self=this;
  6585. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6586. return $core.withContext(function($ctx1) {
  6587. //>>excludeEnd("ctx");
  6588. var $1,$2,$3,$4,$5,$6,$receiver;
  6589. $recv(self["@ul2"])._contents_((function(html){
  6590. var li;
  6591. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6592. return $core.withContext(function($ctx2) {
  6593. //>>excludeEnd("ctx");
  6594. $1=$recv(html)._li();
  6595. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6596. $ctx2.sendIdx["li"]=1;
  6597. //>>excludeEnd("ctx");
  6598. $recv($1)._with_("self");
  6599. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6600. $ctx2.sendIdx["with:"]=1;
  6601. //>>excludeEnd("ctx");
  6602. $2=$recv($1)._onClick_((function(){
  6603. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6604. return $core.withContext(function($ctx3) {
  6605. //>>excludeEnd("ctx");
  6606. return self._selectVariable_named_(self._receiver(),"self");
  6607. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6608. $ctx3.sendIdx["selectVariable:named:"]=1;
  6609. //>>excludeEnd("ctx");
  6610. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6611. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  6612. //>>excludeEnd("ctx");
  6613. }));
  6614. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6615. $ctx2.sendIdx["onClick:"]=1;
  6616. //>>excludeEnd("ctx");
  6617. li=$2;
  6618. li;
  6619. $3=$recv(self["@selectedVariableName"]).__eq("self");
  6620. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6621. $ctx2.sendIdx["="]=1;
  6622. //>>excludeEnd("ctx");
  6623. if($core.assert($3)){
  6624. $recv(li)._class_("selected");
  6625. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6626. $ctx2.sendIdx["class:"]=1;
  6627. //>>excludeEnd("ctx");
  6628. };
  6629. return $recv(self._allVariables())._keysAndValuesDo_((function(key,value){
  6630. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6631. return $core.withContext(function($ctx3) {
  6632. //>>excludeEnd("ctx");
  6633. $4=$recv(html)._li();
  6634. $recv($4)._with_(key);
  6635. li=$recv($4)._onClick_((function(){
  6636. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6637. return $core.withContext(function($ctx4) {
  6638. //>>excludeEnd("ctx");
  6639. return self._selectVariable_named_(value,key);
  6640. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6641. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  6642. //>>excludeEnd("ctx");
  6643. }));
  6644. li;
  6645. $5=$recv(self["@selectedVariableName"]).__eq(key);
  6646. if($core.assert($5)){
  6647. return $recv(li)._class_("selected");
  6648. };
  6649. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6650. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx2,4)});
  6651. //>>excludeEnd("ctx");
  6652. }));
  6653. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6654. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1,1)});
  6655. //>>excludeEnd("ctx");
  6656. }));
  6657. $6=self["@selectedVariable"];
  6658. if(($receiver = $6) == null || $receiver.isNil){
  6659. $recv(self["@inspectButton"])._at_put_("disabled",true);
  6660. } else {
  6661. $recv(self["@inspectButton"])._removeAt_("disabled");
  6662. };
  6663. return self;
  6664. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6665. }, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},$globals.Debugger)});
  6666. //>>excludeEnd("ctx");
  6667. },
  6668. //>>excludeStart("ide", pragmas.excludeIdeData);
  6669. args: [],
  6670. source: "updateVariablesList\x0a\x09ul2 contents: [ :html | | li |\x0a\x09\x09li := html li\x0a\x09\x09\x09with: 'self';\x0a\x09\x09\x09onClick: [ self selectVariable: self receiver named: 'self' ].\x0a\x09\x09\x09\x09selectedVariableName = 'self' ifTrue: [ li class: 'selected' ].\x0a\x09\x09\x0a\x09\x09self allVariables keysAndValuesDo: [ :key :value |\x0a\x09\x09\x09\x09\x09\x09li := html li\x0a\x09\x09\x09\x09\x09\x09\x09with: key;\x0a\x09\x09\x09\x09\x09\x09\x09onClick: [ self selectVariable: value named: key ].\x0a\x09\x09\x09\x09\x09\x09selectedVariableName = key ifTrue: [\x0a\x09\x09\x09\x09\x09\x09\x09li class: 'selected' ] ] ].\x0a\x09\x09\x09\x09\x09\x09\x09\x0a\x09selectedVariable\x0a\x09\x09ifNil: [ inspectButton at: 'disabled' put: true ]\x0a\x09\x09ifNotNil: [ inspectButton removeAt: 'disabled' ]",
  6671. referencedClasses: [],
  6672. //>>excludeEnd("ide");
  6673. messageSends: ["contents:", "with:", "li", "onClick:", "selectVariable:named:", "receiver", "ifTrue:", "=", "class:", "keysAndValuesDo:", "allVariables", "ifNil:ifNotNil:", "at:put:", "removeAt:"]
  6674. }),
  6675. $globals.Debugger);
  6676. $core.addClass('IDEInspector', $globals.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  6677. $core.addMethod(
  6678. $core.method({
  6679. selector: "canBeClosed",
  6680. protocol: 'testing',
  6681. fn: function (){
  6682. var self=this;
  6683. return true;
  6684. },
  6685. //>>excludeStart("ide", pragmas.excludeIdeData);
  6686. args: [],
  6687. source: "canBeClosed\x0a\x09^ true",
  6688. referencedClasses: [],
  6689. //>>excludeEnd("ide");
  6690. messageSends: []
  6691. }),
  6692. $globals.IDEInspector);
  6693. $core.addMethod(
  6694. $core.method({
  6695. selector: "dive",
  6696. protocol: 'actions',
  6697. fn: function (){
  6698. var self=this;
  6699. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6700. return $core.withContext(function($ctx1) {
  6701. //>>excludeEnd("ctx");
  6702. $recv($recv(self._variables())._at_(self._selectedVariable()))._inspect();
  6703. return self;
  6704. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6705. }, function($ctx1) {$ctx1.fill(self,"dive",{},$globals.IDEInspector)});
  6706. //>>excludeEnd("ctx");
  6707. },
  6708. //>>excludeStart("ide", pragmas.excludeIdeData);
  6709. args: [],
  6710. source: "dive\x0a\x09(self variables at: self selectedVariable) inspect",
  6711. referencedClasses: [],
  6712. //>>excludeEnd("ide");
  6713. messageSends: ["inspect", "at:", "variables", "selectedVariable"]
  6714. }),
  6715. $globals.IDEInspector);
  6716. $core.addMethod(
  6717. $core.method({
  6718. selector: "inspect:",
  6719. protocol: 'actions',
  6720. fn: function (anObject){
  6721. var self=this;
  6722. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6723. return $core.withContext(function($ctx1) {
  6724. //>>excludeEnd("ctx");
  6725. self["@object"]=anObject;
  6726. self["@variables"]=[];
  6727. $recv(self["@object"])._inspectOn_(self);
  6728. return self;
  6729. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6730. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},$globals.IDEInspector)});
  6731. //>>excludeEnd("ctx");
  6732. },
  6733. //>>excludeStart("ide", pragmas.excludeIdeData);
  6734. args: ["anObject"],
  6735. source: "inspect: anObject\x0a\x09object := anObject.\x0a\x09variables := #().\x0a\x09object inspectOn: self",
  6736. referencedClasses: [],
  6737. //>>excludeEnd("ide");
  6738. messageSends: ["inspectOn:"]
  6739. }),
  6740. $globals.IDEInspector);
  6741. $core.addMethod(
  6742. $core.method({
  6743. selector: "label",
  6744. protocol: 'accessing',
  6745. fn: function (){
  6746. var self=this;
  6747. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6748. return $core.withContext(function($ctx1) {
  6749. //>>excludeEnd("ctx");
  6750. var $1,$receiver;
  6751. $1=self["@label"];
  6752. if(($receiver = $1) == null || $receiver.isNil){
  6753. return "Inspector (nil)";
  6754. } else {
  6755. return $1;
  6756. };
  6757. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6758. }, function($ctx1) {$ctx1.fill(self,"label",{},$globals.IDEInspector)});
  6759. //>>excludeEnd("ctx");
  6760. },
  6761. //>>excludeStart("ide", pragmas.excludeIdeData);
  6762. args: [],
  6763. source: "label\x0a\x09^ label ifNil: [ 'Inspector (nil)' ]",
  6764. referencedClasses: [],
  6765. //>>excludeEnd("ide");
  6766. messageSends: ["ifNil:"]
  6767. }),
  6768. $globals.IDEInspector);
  6769. $core.addMethod(
  6770. $core.method({
  6771. selector: "refresh",
  6772. protocol: 'actions',
  6773. fn: function (){
  6774. var self=this;
  6775. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6776. return $core.withContext(function($ctx1) {
  6777. //>>excludeEnd("ctx");
  6778. self._inspect_(self["@object"]);
  6779. self._updateVariablesList();
  6780. self._updateValueTextarea();
  6781. return self;
  6782. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6783. }, function($ctx1) {$ctx1.fill(self,"refresh",{},$globals.IDEInspector)});
  6784. //>>excludeEnd("ctx");
  6785. },
  6786. //>>excludeStart("ide", pragmas.excludeIdeData);
  6787. args: [],
  6788. source: "refresh\x0a\x09self\x0a\x09\x09inspect: object;\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea",
  6789. referencedClasses: [],
  6790. //>>excludeEnd("ide");
  6791. messageSends: ["inspect:", "updateVariablesList", "updateValueTextarea"]
  6792. }),
  6793. $globals.IDEInspector);
  6794. $core.addMethod(
  6795. $core.method({
  6796. selector: "renderBottomPanelOn:",
  6797. protocol: 'rendering',
  6798. fn: function (html){
  6799. var self=this;
  6800. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6801. return $core.withContext(function($ctx1) {
  6802. //>>excludeEnd("ctx");
  6803. var $1,$2;
  6804. $1=$recv(html)._div();
  6805. $recv($1)._class_("amber_sourceCode");
  6806. $recv($1)._with_((function(){
  6807. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6808. return $core.withContext(function($ctx2) {
  6809. //>>excludeEnd("ctx");
  6810. $2=$recv($globals.SourceArea)._new();
  6811. $recv($2)._receiver_(self["@object"]);
  6812. $recv($2)._onDoIt_((function(){
  6813. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6814. return $core.withContext(function($ctx3) {
  6815. //>>excludeEnd("ctx");
  6816. return self._refresh();
  6817. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6818. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  6819. //>>excludeEnd("ctx");
  6820. }));
  6821. self["@sourceArea"]=$recv($2)._yourself();
  6822. self["@sourceArea"];
  6823. return $recv(self["@sourceArea"])._renderOn_(html);
  6824. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6825. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6826. //>>excludeEnd("ctx");
  6827. }));
  6828. return self;
  6829. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6830. }, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},$globals.IDEInspector)});
  6831. //>>excludeEnd("ctx");
  6832. },
  6833. //>>excludeStart("ide", pragmas.excludeIdeData);
  6834. args: ["html"],
  6835. source: "renderBottomPanelOn: html\x0a\x09html div\x0a\x09class: 'amber_sourceCode';\x0a\x09with: [\x0a\x09\x09sourceArea := SourceArea new\x0a\x09\x09receiver: object;\x0a\x09\x09onDoIt: [ self refresh ];\x0a\x09\x09yourself.\x0a\x09\x09\x09sourceArea renderOn: html ]",
  6836. referencedClasses: ["SourceArea"],
  6837. //>>excludeEnd("ide");
  6838. messageSends: ["class:", "div", "with:", "receiver:", "new", "onDoIt:", "refresh", "yourself", "renderOn:"]
  6839. }),
  6840. $globals.IDEInspector);
  6841. $core.addMethod(
  6842. $core.method({
  6843. selector: "renderBoxOn:",
  6844. protocol: 'rendering',
  6845. fn: function (html){
  6846. var self=this;
  6847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6848. return $core.withContext(function($ctx1) {
  6849. //>>excludeEnd("ctx");
  6850. self._renderTopPanelOn_(html);
  6851. self._renderBottomPanelOn_(html);
  6852. return self;
  6853. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6854. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.IDEInspector)});
  6855. //>>excludeEnd("ctx");
  6856. },
  6857. //>>excludeStart("ide", pragmas.excludeIdeData);
  6858. args: ["html"],
  6859. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
  6860. referencedClasses: [],
  6861. //>>excludeEnd("ide");
  6862. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"]
  6863. }),
  6864. $globals.IDEInspector);
  6865. $core.addMethod(
  6866. $core.method({
  6867. selector: "renderButtonsOn:",
  6868. protocol: 'rendering',
  6869. fn: function (html){
  6870. var self=this;
  6871. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6872. return $core.withContext(function($ctx1) {
  6873. //>>excludeEnd("ctx");
  6874. var $1,$3,$2,$4,$6,$5,$7;
  6875. $1=$recv(html)._button();
  6876. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6877. $ctx1.sendIdx["button"]=1;
  6878. //>>excludeEnd("ctx");
  6879. $recv($1)._with_("DoIt");
  6880. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6881. $ctx1.sendIdx["with:"]=1;
  6882. //>>excludeEnd("ctx");
  6883. $2=$recv($1)._onClick_((function(){
  6884. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6885. return $core.withContext(function($ctx2) {
  6886. //>>excludeEnd("ctx");
  6887. $3=self._sourceArea();
  6888. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6889. $ctx2.sendIdx["sourceArea"]=1;
  6890. //>>excludeEnd("ctx");
  6891. return $recv($3)._doIt();
  6892. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6893. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6894. //>>excludeEnd("ctx");
  6895. }));
  6896. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6897. $ctx1.sendIdx["onClick:"]=1;
  6898. //>>excludeEnd("ctx");
  6899. $4=$recv(html)._button();
  6900. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6901. $ctx1.sendIdx["button"]=2;
  6902. //>>excludeEnd("ctx");
  6903. $recv($4)._with_("PrintIt");
  6904. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6905. $ctx1.sendIdx["with:"]=2;
  6906. //>>excludeEnd("ctx");
  6907. $5=$recv($4)._onClick_((function(){
  6908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6909. return $core.withContext(function($ctx2) {
  6910. //>>excludeEnd("ctx");
  6911. $6=self._sourceArea();
  6912. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6913. $ctx2.sendIdx["sourceArea"]=2;
  6914. //>>excludeEnd("ctx");
  6915. return $recv($6)._printIt();
  6916. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6917. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  6918. //>>excludeEnd("ctx");
  6919. }));
  6920. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6921. $ctx1.sendIdx["onClick:"]=2;
  6922. //>>excludeEnd("ctx");
  6923. $7=$recv(html)._button();
  6924. $recv($7)._with_("InspectIt");
  6925. $recv($7)._onClick_((function(){
  6926. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6927. return $core.withContext(function($ctx2) {
  6928. //>>excludeEnd("ctx");
  6929. return $recv(self._sourceArea())._inspectIt();
  6930. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6931. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  6932. //>>excludeEnd("ctx");
  6933. }));
  6934. self._updateButtons();
  6935. return self;
  6936. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6937. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.IDEInspector)});
  6938. //>>excludeEnd("ctx");
  6939. },
  6940. //>>excludeStart("ide", pragmas.excludeIdeData);
  6941. args: ["html"],
  6942. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09\x09with: 'DoIt';\x0a\x09\x09onClick: [ self sourceArea doIt ].\x0a\x09html button\x0a\x09\x09with: 'PrintIt';\x0a\x09\x09onClick: [ self sourceArea printIt ].\x0a\x09html button\x0a\x09\x09with: 'InspectIt';\x0a\x09\x09onClick: [ self sourceArea inspectIt ].\x0a\x09self updateButtons",
  6943. referencedClasses: [],
  6944. //>>excludeEnd("ide");
  6945. messageSends: ["with:", "button", "onClick:", "doIt", "sourceArea", "printIt", "inspectIt", "updateButtons"]
  6946. }),
  6947. $globals.IDEInspector);
  6948. $core.addMethod(
  6949. $core.method({
  6950. selector: "renderTopPanelOn:",
  6951. protocol: 'rendering',
  6952. fn: function (html){
  6953. var self=this;
  6954. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6955. return $core.withContext(function($ctx1) {
  6956. //>>excludeEnd("ctx");
  6957. var $1,$3,$4,$6,$7,$8,$5,$2;
  6958. $1=$recv(html)._div();
  6959. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6960. $ctx1.sendIdx["div"]=1;
  6961. //>>excludeEnd("ctx");
  6962. $recv($1)._class_("top");
  6963. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6964. $ctx1.sendIdx["class:"]=1;
  6965. //>>excludeEnd("ctx");
  6966. $2=$recv($1)._with_((function(){
  6967. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6968. return $core.withContext(function($ctx2) {
  6969. //>>excludeEnd("ctx");
  6970. self["@variablesList"]=$recv($recv(html)._ul())._class_("amber_column variables");
  6971. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6972. $ctx2.sendIdx["class:"]=2;
  6973. //>>excludeEnd("ctx");
  6974. self["@variablesList"];
  6975. $3=$recv(html)._textarea();
  6976. $recv($3)._class_("amber_column value");
  6977. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6978. $ctx2.sendIdx["class:"]=3;
  6979. //>>excludeEnd("ctx");
  6980. $recv($3)._at_put_("readonly","readonly");
  6981. self["@valueTextarea"]=$recv($3)._yourself();
  6982. self["@valueTextarea"];
  6983. $4=$recv(html)._div();
  6984. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6985. $ctx2.sendIdx["div"]=2;
  6986. //>>excludeEnd("ctx");
  6987. $recv($4)._class_("amber_tabs inspector");
  6988. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6989. $ctx2.sendIdx["class:"]=4;
  6990. //>>excludeEnd("ctx");
  6991. $5=$recv($4)._with_((function(){
  6992. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6993. return $core.withContext(function($ctx3) {
  6994. //>>excludeEnd("ctx");
  6995. $6=$recv(html)._button();
  6996. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6997. $ctx3.sendIdx["button"]=1;
  6998. //>>excludeEnd("ctx");
  6999. $recv($6)._class_("amber_button inspector refresh");
  7000. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7001. $ctx3.sendIdx["class:"]=5;
  7002. //>>excludeEnd("ctx");
  7003. $recv($6)._with_("Refresh");
  7004. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7005. $ctx3.sendIdx["with:"]=3;
  7006. //>>excludeEnd("ctx");
  7007. $7=$recv($6)._onClick_((function(){
  7008. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7009. return $core.withContext(function($ctx4) {
  7010. //>>excludeEnd("ctx");
  7011. return self._refresh();
  7012. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7013. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  7014. //>>excludeEnd("ctx");
  7015. }));
  7016. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7017. $ctx3.sendIdx["onClick:"]=1;
  7018. //>>excludeEnd("ctx");
  7019. $7;
  7020. $8=$recv(html)._button();
  7021. $recv($8)._class_("amber_button inspector dive");
  7022. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7023. $ctx3.sendIdx["class:"]=6;
  7024. //>>excludeEnd("ctx");
  7025. $recv($8)._with_("Dive");
  7026. self["@diveButton"]=$recv($8)._onClick_((function(){
  7027. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7028. return $core.withContext(function($ctx4) {
  7029. //>>excludeEnd("ctx");
  7030. return self._dive();
  7031. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7032. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  7033. //>>excludeEnd("ctx");
  7034. }));
  7035. return self["@diveButton"];
  7036. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7037. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  7038. //>>excludeEnd("ctx");
  7039. }));
  7040. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7041. $ctx2.sendIdx["with:"]=2;
  7042. //>>excludeEnd("ctx");
  7043. $5;
  7044. return $recv($recv(html)._div())._class_("amber_clear");
  7045. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7046. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  7047. //>>excludeEnd("ctx");
  7048. }));
  7049. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7050. $ctx1.sendIdx["with:"]=1;
  7051. //>>excludeEnd("ctx");
  7052. self._updateVariablesList();
  7053. self._updateValueTextarea();
  7054. return self;
  7055. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7056. }, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},$globals.IDEInspector)});
  7057. //>>excludeEnd("ctx");
  7058. },
  7059. //>>excludeStart("ide", pragmas.excludeIdeData);
  7060. args: ["html"],
  7061. source: "renderTopPanelOn: html\x0a\x09html div\x0a\x09\x09class: 'top';\x0a\x09\x09with: [\x0a\x09\x09\x09variablesList := html ul class: 'amber_column variables'.\x0a\x09\x09\x09valueTextarea := html textarea class: 'amber_column value'; at: 'readonly' put: 'readonly'; yourself.\x0a\x09\x09\x09html div class: 'amber_tabs inspector'; with: [\x0a\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09class: 'amber_button inspector refresh';\x0a\x09\x09\x09\x09\x09with: 'Refresh';\x0a\x09\x09\x09\x09\x09onClick: [ self refresh ].\x0a\x09\x09\x09\x09diveButton := html button\x0a\x09\x09\x09\x09\x09class: 'amber_button inspector dive';\x0a\x09\x09\x09\x09\x09with: 'Dive';\x0a\x09\x09\x09\x09\x09onClick: [ self dive ]].\x0a\x09\x09\x09html div class: 'amber_clear' ].\x0a\x09self\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea.",
  7062. referencedClasses: [],
  7063. //>>excludeEnd("ide");
  7064. messageSends: ["class:", "div", "with:", "ul", "textarea", "at:put:", "yourself", "button", "onClick:", "refresh", "dive", "updateVariablesList", "updateValueTextarea"]
  7065. }),
  7066. $globals.IDEInspector);
  7067. $core.addMethod(
  7068. $core.method({
  7069. selector: "selectVariable:",
  7070. protocol: 'updating',
  7071. fn: function (aString){
  7072. var self=this;
  7073. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7074. return $core.withContext(function($ctx1) {
  7075. //>>excludeEnd("ctx");
  7076. self._selectedVariable_(aString);
  7077. self._updateVariablesList();
  7078. self._updateValueTextarea();
  7079. self._updateButtons();
  7080. return self;
  7081. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7082. }, function($ctx1) {$ctx1.fill(self,"selectVariable:",{aString:aString},$globals.IDEInspector)});
  7083. //>>excludeEnd("ctx");
  7084. },
  7085. //>>excludeStart("ide", pragmas.excludeIdeData);
  7086. args: ["aString"],
  7087. source: "selectVariable: aString\x0a\x09self selectedVariable: aString.\x0a\x09self\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea;\x0a\x09\x09updateButtons",
  7088. referencedClasses: [],
  7089. //>>excludeEnd("ide");
  7090. messageSends: ["selectedVariable:", "updateVariablesList", "updateValueTextarea", "updateButtons"]
  7091. }),
  7092. $globals.IDEInspector);
  7093. $core.addMethod(
  7094. $core.method({
  7095. selector: "selectedVariable",
  7096. protocol: 'accessing',
  7097. fn: function (){
  7098. var self=this;
  7099. return self["@selectedVariable"];
  7100. },
  7101. //>>excludeStart("ide", pragmas.excludeIdeData);
  7102. args: [],
  7103. source: "selectedVariable\x0a\x09^ selectedVariable",
  7104. referencedClasses: [],
  7105. //>>excludeEnd("ide");
  7106. messageSends: []
  7107. }),
  7108. $globals.IDEInspector);
  7109. $core.addMethod(
  7110. $core.method({
  7111. selector: "selectedVariable:",
  7112. protocol: 'accessing',
  7113. fn: function (aString){
  7114. var self=this;
  7115. self["@selectedVariable"]=aString;
  7116. return self;
  7117. },
  7118. //>>excludeStart("ide", pragmas.excludeIdeData);
  7119. args: ["aString"],
  7120. source: "selectedVariable: aString\x0a\x09selectedVariable := aString",
  7121. referencedClasses: [],
  7122. //>>excludeEnd("ide");
  7123. messageSends: []
  7124. }),
  7125. $globals.IDEInspector);
  7126. $core.addMethod(
  7127. $core.method({
  7128. selector: "setLabel:",
  7129. protocol: 'accessing',
  7130. fn: function (aString){
  7131. var self=this;
  7132. self["@label"]=aString;
  7133. return self;
  7134. },
  7135. //>>excludeStart("ide", pragmas.excludeIdeData);
  7136. args: ["aString"],
  7137. source: "setLabel: aString\x0a\x09label := aString",
  7138. referencedClasses: [],
  7139. //>>excludeEnd("ide");
  7140. messageSends: []
  7141. }),
  7142. $globals.IDEInspector);
  7143. $core.addMethod(
  7144. $core.method({
  7145. selector: "setVariables:",
  7146. protocol: 'accessing',
  7147. fn: function (aCollection){
  7148. var self=this;
  7149. self["@variables"]=aCollection;
  7150. return self;
  7151. },
  7152. //>>excludeStart("ide", pragmas.excludeIdeData);
  7153. args: ["aCollection"],
  7154. source: "setVariables: aCollection\x0a\x09variables := aCollection",
  7155. referencedClasses: [],
  7156. //>>excludeEnd("ide");
  7157. messageSends: []
  7158. }),
  7159. $globals.IDEInspector);
  7160. $core.addMethod(
  7161. $core.method({
  7162. selector: "sourceArea",
  7163. protocol: 'accessing',
  7164. fn: function (){
  7165. var self=this;
  7166. return self["@sourceArea"];
  7167. },
  7168. //>>excludeStart("ide", pragmas.excludeIdeData);
  7169. args: [],
  7170. source: "sourceArea\x0a\x09^ sourceArea",
  7171. referencedClasses: [],
  7172. //>>excludeEnd("ide");
  7173. messageSends: []
  7174. }),
  7175. $globals.IDEInspector);
  7176. $core.addMethod(
  7177. $core.method({
  7178. selector: "updateButtons",
  7179. protocol: 'updating',
  7180. fn: function (){
  7181. var self=this;
  7182. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7183. return $core.withContext(function($ctx1) {
  7184. //>>excludeEnd("ctx");
  7185. var $3,$2,$1;
  7186. $3=self._selectedVariable();
  7187. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7188. $ctx1.sendIdx["selectedVariable"]=1;
  7189. //>>excludeEnd("ctx");
  7190. $2=$recv($3)._notNil();
  7191. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7192. $ctx1.sendIdx["notNil"]=1;
  7193. //>>excludeEnd("ctx");
  7194. $1=$recv($2)._and_((function(){
  7195. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7196. return $core.withContext(function($ctx2) {
  7197. //>>excludeEnd("ctx");
  7198. return $recv($recv(self._variables())._at_(self._selectedVariable()))._notNil();
  7199. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7200. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  7201. //>>excludeEnd("ctx");
  7202. }));
  7203. if($core.assert($1)){
  7204. $recv(self["@diveButton"])._removeAt_("disabled");
  7205. } else {
  7206. $recv(self["@diveButton"])._at_put_("disabled",true);
  7207. };
  7208. return self;
  7209. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7210. }, function($ctx1) {$ctx1.fill(self,"updateButtons",{},$globals.IDEInspector)});
  7211. //>>excludeEnd("ctx");
  7212. },
  7213. //>>excludeStart("ide", pragmas.excludeIdeData);
  7214. args: [],
  7215. source: "updateButtons\x0a\x09(self selectedVariable notNil and: [ (self variables at: self selectedVariable) notNil ])\x0a\x09\x09ifFalse: [ diveButton at: 'disabled' put: true ]\x0a\x09\x09ifTrue: [ diveButton removeAt: 'disabled' ]",
  7216. referencedClasses: [],
  7217. //>>excludeEnd("ide");
  7218. messageSends: ["ifFalse:ifTrue:", "and:", "notNil", "selectedVariable", "at:", "variables", "at:put:", "removeAt:"]
  7219. }),
  7220. $globals.IDEInspector);
  7221. $core.addMethod(
  7222. $core.method({
  7223. selector: "updateValueTextarea",
  7224. protocol: 'updating',
  7225. fn: function (){
  7226. var self=this;
  7227. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7228. return $core.withContext(function($ctx1) {
  7229. //>>excludeEnd("ctx");
  7230. var $1,$4,$3,$2;
  7231. $1=$recv(self["@valueTextarea"])._asJQuery();
  7232. $4=self._selectedVariable();
  7233. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7234. $ctx1.sendIdx["selectedVariable"]=1;
  7235. //>>excludeEnd("ctx");
  7236. $3=$recv($4)._isNil();
  7237. if($core.assert($3)){
  7238. $2="";
  7239. } else {
  7240. $2=$recv($recv(self._variables())._at_(self._selectedVariable()))._printString();
  7241. };
  7242. $recv($1)._val_($2);
  7243. return self;
  7244. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7245. }, function($ctx1) {$ctx1.fill(self,"updateValueTextarea",{},$globals.IDEInspector)});
  7246. //>>excludeEnd("ctx");
  7247. },
  7248. //>>excludeStart("ide", pragmas.excludeIdeData);
  7249. args: [],
  7250. source: "updateValueTextarea\x0a\x09valueTextarea asJQuery val: (self selectedVariable isNil\x0a\x09\x09ifTrue: [ '' ]\x0a\x09\x09ifFalse: [ (self variables at: self selectedVariable) printString ])",
  7251. referencedClasses: [],
  7252. //>>excludeEnd("ide");
  7253. messageSends: ["val:", "asJQuery", "ifTrue:ifFalse:", "isNil", "selectedVariable", "printString", "at:", "variables"]
  7254. }),
  7255. $globals.IDEInspector);
  7256. $core.addMethod(
  7257. $core.method({
  7258. selector: "updateVariablesList",
  7259. protocol: 'updating',
  7260. fn: function (){
  7261. var self=this;
  7262. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7263. return $core.withContext(function($ctx1) {
  7264. //>>excludeEnd("ctx");
  7265. var $1,$2;
  7266. $recv(self["@variablesList"])._contents_((function(html){
  7267. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7268. return $core.withContext(function($ctx2) {
  7269. //>>excludeEnd("ctx");
  7270. return $recv(self._variables())._keysDo_((function(each){
  7271. var li;
  7272. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7273. return $core.withContext(function($ctx3) {
  7274. //>>excludeEnd("ctx");
  7275. li=$recv(html)._li();
  7276. li;
  7277. $1=li;
  7278. $recv($1)._with_(each);
  7279. $recv($1)._onClick_((function(){
  7280. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7281. return $core.withContext(function($ctx4) {
  7282. //>>excludeEnd("ctx");
  7283. return self._selectVariable_(each);
  7284. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7285. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  7286. //>>excludeEnd("ctx");
  7287. }));
  7288. $2=$recv(self._selectedVariable()).__eq(each);
  7289. if($core.assert($2)){
  7290. return $recv(li)._class_("selected");
  7291. };
  7292. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7293. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)});
  7294. //>>excludeEnd("ctx");
  7295. }));
  7296. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7297. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  7298. //>>excludeEnd("ctx");
  7299. }));
  7300. return self;
  7301. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7302. }, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},$globals.IDEInspector)});
  7303. //>>excludeEnd("ctx");
  7304. },
  7305. //>>excludeStart("ide", pragmas.excludeIdeData);
  7306. args: [],
  7307. source: "updateVariablesList\x0a\x09variablesList contents: [ :html |\x0a\x09\x09self variables keysDo: [ :each || li |\x0a\x09\x09\x09li := html li.\x0a\x09\x09\x09li\x0a\x09\x09\x09\x09with: each;\x0a\x09\x09\x09\x09onClick: [ self selectVariable: each ].\x0a\x09\x09\x09self selectedVariable = each ifTrue: [\x0a\x09\x09\x09\x09li class: 'selected' ]] ]",
  7308. referencedClasses: [],
  7309. //>>excludeEnd("ide");
  7310. messageSends: ["contents:", "keysDo:", "variables", "li", "with:", "onClick:", "selectVariable:", "ifTrue:", "=", "selectedVariable", "class:"]
  7311. }),
  7312. $globals.IDEInspector);
  7313. $core.addMethod(
  7314. $core.method({
  7315. selector: "variables",
  7316. protocol: 'accessing',
  7317. fn: function (){
  7318. var self=this;
  7319. return self["@variables"];
  7320. },
  7321. //>>excludeStart("ide", pragmas.excludeIdeData);
  7322. args: [],
  7323. source: "variables\x0a\x09^ variables",
  7324. referencedClasses: [],
  7325. //>>excludeEnd("ide");
  7326. messageSends: []
  7327. }),
  7328. $globals.IDEInspector);
  7329. $core.addMethod(
  7330. $core.method({
  7331. selector: "inspect:",
  7332. protocol: 'instance creation',
  7333. fn: function (anObject){
  7334. var self=this;
  7335. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7336. return $core.withContext(function($ctx1) {
  7337. //>>excludeEnd("ctx");
  7338. var $1;
  7339. $1=self._new();
  7340. $recv($1)._inspect_(anObject);
  7341. $recv($1)._open();
  7342. return $recv($1)._yourself();
  7343. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7344. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},$globals.IDEInspector.klass)});
  7345. //>>excludeEnd("ctx");
  7346. },
  7347. //>>excludeStart("ide", pragmas.excludeIdeData);
  7348. args: ["anObject"],
  7349. source: "inspect: anObject\x0a\x09^ self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09open;\x0a\x09\x09yourself",
  7350. referencedClasses: [],
  7351. //>>excludeEnd("ide");
  7352. messageSends: ["inspect:", "new", "open", "yourself"]
  7353. }),
  7354. $globals.IDEInspector.klass);
  7355. $core.addMethod(
  7356. $core.method({
  7357. selector: "on:",
  7358. protocol: 'instance creation',
  7359. fn: function (anObject){
  7360. var self=this;
  7361. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7362. return $core.withContext(function($ctx1) {
  7363. //>>excludeEnd("ctx");
  7364. var $1;
  7365. $1=self._new();
  7366. $recv($1)._inspect_(anObject);
  7367. return $recv($1)._yourself();
  7368. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7369. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},$globals.IDEInspector.klass)});
  7370. //>>excludeEnd("ctx");
  7371. },
  7372. //>>excludeStart("ide", pragmas.excludeIdeData);
  7373. args: ["anObject"],
  7374. source: "on: anObject\x0a\x09^ self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09yourself",
  7375. referencedClasses: [],
  7376. //>>excludeEnd("ide");
  7377. messageSends: ["inspect:", "new", "yourself"]
  7378. }),
  7379. $globals.IDEInspector.klass);
  7380. $core.addClass('IDETranscript', $globals.TabWidget, ['textarea'], 'IDE');
  7381. $core.addMethod(
  7382. $core.method({
  7383. selector: "clear",
  7384. protocol: 'actions',
  7385. fn: function (){
  7386. var self=this;
  7387. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7388. return $core.withContext(function($ctx1) {
  7389. //>>excludeEnd("ctx");
  7390. $recv($recv(self["@textarea"])._asJQuery())._val_("");
  7391. return self;
  7392. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7393. }, function($ctx1) {$ctx1.fill(self,"clear",{},$globals.IDETranscript)});
  7394. //>>excludeEnd("ctx");
  7395. },
  7396. //>>excludeStart("ide", pragmas.excludeIdeData);
  7397. args: [],
  7398. source: "clear\x0a\x09textarea asJQuery val: ''",
  7399. referencedClasses: [],
  7400. //>>excludeEnd("ide");
  7401. messageSends: ["val:", "asJQuery"]
  7402. }),
  7403. $globals.IDETranscript);
  7404. $core.addMethod(
  7405. $core.method({
  7406. selector: "cr",
  7407. protocol: 'actions',
  7408. fn: function (){
  7409. var self=this;
  7410. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7411. return $core.withContext(function($ctx1) {
  7412. //>>excludeEnd("ctx");
  7413. var $1;
  7414. $1=$recv(self["@textarea"])._asJQuery();
  7415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7416. $ctx1.sendIdx["asJQuery"]=1;
  7417. //>>excludeEnd("ctx");
  7418. $recv($1)._val_($recv($recv($recv(self["@textarea"])._asJQuery())._val()).__comma($recv($globals.String)._cr()));
  7419. return self;
  7420. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7421. }, function($ctx1) {$ctx1.fill(self,"cr",{},$globals.IDETranscript)});
  7422. //>>excludeEnd("ctx");
  7423. },
  7424. //>>excludeStart("ide", pragmas.excludeIdeData);
  7425. args: [],
  7426. source: "cr\x0a\x09textarea asJQuery val: textarea asJQuery val, String cr.",
  7427. referencedClasses: ["String"],
  7428. //>>excludeEnd("ide");
  7429. messageSends: ["val:", "asJQuery", ",", "val", "cr"]
  7430. }),
  7431. $globals.IDETranscript);
  7432. $core.addMethod(
  7433. $core.method({
  7434. selector: "label",
  7435. protocol: 'accessing',
  7436. fn: function (){
  7437. var self=this;
  7438. return "Transcript";
  7439. },
  7440. //>>excludeStart("ide", pragmas.excludeIdeData);
  7441. args: [],
  7442. source: "label\x0a\x09^ 'Transcript'",
  7443. referencedClasses: [],
  7444. //>>excludeEnd("ide");
  7445. messageSends: []
  7446. }),
  7447. $globals.IDETranscript);
  7448. $core.addMethod(
  7449. $core.method({
  7450. selector: "open",
  7451. protocol: 'actions',
  7452. fn: function (){
  7453. var self=this;
  7454. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7455. return $core.withContext(function($ctx1) {
  7456. //>>excludeEnd("ctx");
  7457. var $1;
  7458. $1=$recv($globals.TabManager)._current();
  7459. $recv($1)._open();
  7460. $recv($1)._selectTab_(self);
  7461. return self;
  7462. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7463. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.IDETranscript)});
  7464. //>>excludeEnd("ctx");
  7465. },
  7466. //>>excludeStart("ide", pragmas.excludeIdeData);
  7467. args: [],
  7468. source: "open\x0a\x09TabManager current\x0a\x09open;\x0a\x09selectTab: self",
  7469. referencedClasses: ["TabManager"],
  7470. //>>excludeEnd("ide");
  7471. messageSends: ["open", "current", "selectTab:"]
  7472. }),
  7473. $globals.IDETranscript);
  7474. $core.addMethod(
  7475. $core.method({
  7476. selector: "renderBoxOn:",
  7477. protocol: 'rendering',
  7478. fn: function (html){
  7479. var self=this;
  7480. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7481. return $core.withContext(function($ctx1) {
  7482. //>>excludeEnd("ctx");
  7483. var $1;
  7484. self["@textarea"]=$recv(html)._textarea();
  7485. $1=self["@textarea"];
  7486. $recv($1)._class_("amber_transcript");
  7487. $recv($1)._at_put_("spellcheck","false");
  7488. return self;
  7489. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7490. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.IDETranscript)});
  7491. //>>excludeEnd("ctx");
  7492. },
  7493. //>>excludeStart("ide", pragmas.excludeIdeData);
  7494. args: ["html"],
  7495. source: "renderBoxOn: html\x0a\x09textarea := html textarea.\x0a\x09textarea\x0a\x09class: 'amber_transcript';\x0a\x09at: 'spellcheck' put: 'false'",
  7496. referencedClasses: [],
  7497. //>>excludeEnd("ide");
  7498. messageSends: ["textarea", "class:", "at:put:"]
  7499. }),
  7500. $globals.IDETranscript);
  7501. $core.addMethod(
  7502. $core.method({
  7503. selector: "renderButtonsOn:",
  7504. protocol: 'rendering',
  7505. fn: function (html){
  7506. var self=this;
  7507. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7508. return $core.withContext(function($ctx1) {
  7509. //>>excludeEnd("ctx");
  7510. var $1;
  7511. $1=$recv(html)._button();
  7512. $recv($1)._with_("Clear transcript");
  7513. $recv($1)._onClick_((function(){
  7514. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7515. return $core.withContext(function($ctx2) {
  7516. //>>excludeEnd("ctx");
  7517. return self._clear();
  7518. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7519. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  7520. //>>excludeEnd("ctx");
  7521. }));
  7522. return self;
  7523. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7524. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.IDETranscript)});
  7525. //>>excludeEnd("ctx");
  7526. },
  7527. //>>excludeStart("ide", pragmas.excludeIdeData);
  7528. args: ["html"],
  7529. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Clear transcript';\x0a\x09onClick: [ self clear ]",
  7530. referencedClasses: [],
  7531. //>>excludeEnd("ide");
  7532. messageSends: ["with:", "button", "onClick:", "clear"]
  7533. }),
  7534. $globals.IDETranscript);
  7535. $core.addMethod(
  7536. $core.method({
  7537. selector: "show:",
  7538. protocol: 'actions',
  7539. fn: function (anObject){
  7540. var self=this;
  7541. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7542. return $core.withContext(function($ctx1) {
  7543. //>>excludeEnd("ctx");
  7544. var $1,$2,$receiver;
  7545. $1=self["@textarea"];
  7546. if(($receiver = $1) == null || $receiver.isNil){
  7547. self._open();
  7548. } else {
  7549. $1;
  7550. };
  7551. $2=$recv(self["@textarea"])._asJQuery();
  7552. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7553. $ctx1.sendIdx["asJQuery"]=1;
  7554. //>>excludeEnd("ctx");
  7555. $recv($2)._val_($recv($recv($recv(self["@textarea"])._asJQuery())._val()).__comma($recv(anObject)._asString()));
  7556. return self;
  7557. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7558. }, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},$globals.IDETranscript)});
  7559. //>>excludeEnd("ctx");
  7560. },
  7561. //>>excludeStart("ide", pragmas.excludeIdeData);
  7562. args: ["anObject"],
  7563. source: "show: anObject\x0a\x09textarea ifNil: [ self open ].\x0a\x09textarea asJQuery val: textarea asJQuery val, anObject asString.",
  7564. referencedClasses: [],
  7565. //>>excludeEnd("ide");
  7566. messageSends: ["ifNil:", "open", "val:", "asJQuery", ",", "val", "asString"]
  7567. }),
  7568. $globals.IDETranscript);
  7569. $globals.IDETranscript.klass.iVarNames = ['current'];
  7570. $core.addMethod(
  7571. $core.method({
  7572. selector: "current",
  7573. protocol: 'instance creation',
  7574. fn: function (){
  7575. var self=this;
  7576. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7577. return $core.withContext(function($ctx1) {
  7578. //>>excludeEnd("ctx");
  7579. var $1,$receiver;
  7580. $1=self["@current"];
  7581. if(($receiver = $1) == null || $receiver.isNil){
  7582. self["@current"]=(
  7583. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7584. $ctx1.supercall = true,
  7585. //>>excludeEnd("ctx");
  7586. ($globals.IDETranscript.klass.superclass||$boot.nilAsClass).fn.prototype._new.apply($recv(self), []));
  7587. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7588. $ctx1.supercall = false;
  7589. //>>excludeEnd("ctx");;
  7590. return self["@current"];
  7591. } else {
  7592. return $1;
  7593. };
  7594. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7595. }, function($ctx1) {$ctx1.fill(self,"current",{},$globals.IDETranscript.klass)});
  7596. //>>excludeEnd("ctx");
  7597. },
  7598. //>>excludeStart("ide", pragmas.excludeIdeData);
  7599. args: [],
  7600. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  7601. referencedClasses: [],
  7602. //>>excludeEnd("ide");
  7603. messageSends: ["ifNil:", "new"]
  7604. }),
  7605. $globals.IDETranscript.klass);
  7606. $core.addMethod(
  7607. $core.method({
  7608. selector: "initialize",
  7609. protocol: 'initialization',
  7610. fn: function (){
  7611. var self=this;
  7612. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7613. return $core.withContext(function($ctx1) {
  7614. //>>excludeEnd("ctx");
  7615. $recv($globals.Transcript)._register_(self._current());
  7616. return self;
  7617. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7618. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.IDETranscript.klass)});
  7619. //>>excludeEnd("ctx");
  7620. },
  7621. //>>excludeStart("ide", pragmas.excludeIdeData);
  7622. args: [],
  7623. source: "initialize\x0a\x09Transcript register: self current",
  7624. referencedClasses: ["Transcript"],
  7625. //>>excludeEnd("ide");
  7626. messageSends: ["register:", "current"]
  7627. }),
  7628. $globals.IDETranscript.klass);
  7629. $core.addMethod(
  7630. $core.method({
  7631. selector: "new",
  7632. protocol: 'instance creation',
  7633. fn: function (){
  7634. var self=this;
  7635. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7636. return $core.withContext(function($ctx1) {
  7637. //>>excludeEnd("ctx");
  7638. self._shouldNotImplement();
  7639. return self;
  7640. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7641. }, function($ctx1) {$ctx1.fill(self,"new",{},$globals.IDETranscript.klass)});
  7642. //>>excludeEnd("ctx");
  7643. },
  7644. //>>excludeStart("ide", pragmas.excludeIdeData);
  7645. args: [],
  7646. source: "new\x0a\x09self shouldNotImplement",
  7647. referencedClasses: [],
  7648. //>>excludeEnd("ide");
  7649. messageSends: ["shouldNotImplement"]
  7650. }),
  7651. $globals.IDETranscript.klass);
  7652. $core.addMethod(
  7653. $core.method({
  7654. selector: "open",
  7655. protocol: 'instance creation',
  7656. fn: function (){
  7657. var self=this;
  7658. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7659. return $core.withContext(function($ctx1) {
  7660. //>>excludeEnd("ctx");
  7661. var $1;
  7662. $1=$recv($globals.TabManager)._current();
  7663. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7664. $ctx1.sendIdx["current"]=1;
  7665. //>>excludeEnd("ctx");
  7666. $recv($1)._open();
  7667. $recv($1)._selectTab_(self._current());
  7668. return self;
  7669. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7670. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.IDETranscript.klass)});
  7671. //>>excludeEnd("ctx");
  7672. },
  7673. //>>excludeStart("ide", pragmas.excludeIdeData);
  7674. args: [],
  7675. source: "open\x0a\x09TabManager current\x0a\x09\x09open;\x0a\x09\x09selectTab: self current",
  7676. referencedClasses: ["TabManager"],
  7677. //>>excludeEnd("ide");
  7678. messageSends: ["open", "current", "selectTab:"]
  7679. }),
  7680. $globals.IDETranscript.klass);
  7681. $core.addClass('ProgressBar', $globals.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  7682. $core.addMethod(
  7683. $core.method({
  7684. selector: "percent",
  7685. protocol: 'accessing',
  7686. fn: function (){
  7687. var self=this;
  7688. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7689. return $core.withContext(function($ctx1) {
  7690. //>>excludeEnd("ctx");
  7691. var $1,$receiver;
  7692. $1=self["@percent"];
  7693. if(($receiver = $1) == null || $receiver.isNil){
  7694. return (0);
  7695. } else {
  7696. return $1;
  7697. };
  7698. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7699. }, function($ctx1) {$ctx1.fill(self,"percent",{},$globals.ProgressBar)});
  7700. //>>excludeEnd("ctx");
  7701. },
  7702. //>>excludeStart("ide", pragmas.excludeIdeData);
  7703. args: [],
  7704. source: "percent\x0a\x09^ percent ifNil: [ 0 ]",
  7705. referencedClasses: [],
  7706. //>>excludeEnd("ide");
  7707. messageSends: ["ifNil:"]
  7708. }),
  7709. $globals.ProgressBar);
  7710. $core.addMethod(
  7711. $core.method({
  7712. selector: "percent:",
  7713. protocol: 'accessing',
  7714. fn: function (aNumber){
  7715. var self=this;
  7716. self["@percent"]=aNumber;
  7717. return self;
  7718. },
  7719. //>>excludeStart("ide", pragmas.excludeIdeData);
  7720. args: ["aNumber"],
  7721. source: "percent: aNumber\x0a\x09percent := aNumber",
  7722. referencedClasses: [],
  7723. //>>excludeEnd("ide");
  7724. messageSends: []
  7725. }),
  7726. $globals.ProgressBar);
  7727. $core.addMethod(
  7728. $core.method({
  7729. selector: "renderOn:",
  7730. protocol: 'rendering',
  7731. fn: function (html){
  7732. var self=this;
  7733. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7734. return $core.withContext(function($ctx1) {
  7735. //>>excludeEnd("ctx");
  7736. var $1;
  7737. $1=$recv(html)._div();
  7738. $recv($1)._class_("progress_bar");
  7739. self["@div"]=$recv($1)._yourself();
  7740. self._renderProgressBar();
  7741. return self;
  7742. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7743. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.ProgressBar)});
  7744. //>>excludeEnd("ctx");
  7745. },
  7746. //>>excludeStart("ide", pragmas.excludeIdeData);
  7747. args: ["html"],
  7748. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'progress_bar';\x0a\x09\x09yourself.\x0a\x09self renderProgressBar",
  7749. referencedClasses: [],
  7750. //>>excludeEnd("ide");
  7751. messageSends: ["class:", "div", "yourself", "renderProgressBar"]
  7752. }),
  7753. $globals.ProgressBar);
  7754. $core.addMethod(
  7755. $core.method({
  7756. selector: "renderProgressBar",
  7757. protocol: 'rendering',
  7758. fn: function (){
  7759. var self=this;
  7760. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7761. return $core.withContext(function($ctx1) {
  7762. //>>excludeEnd("ctx");
  7763. var $1,$2;
  7764. $recv(self["@div"])._contents_((function(html){
  7765. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7766. return $core.withContext(function($ctx2) {
  7767. //>>excludeEnd("ctx");
  7768. $1=$recv(html)._div();
  7769. $recv($1)._class_("progress");
  7770. $2=$recv("width:".__comma($recv(self._percent())._asString())).__comma("%");
  7771. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7772. $ctx2.sendIdx[","]=1;
  7773. //>>excludeEnd("ctx");
  7774. return $recv($1)._style_($2);
  7775. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7776. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  7777. //>>excludeEnd("ctx");
  7778. }));
  7779. return self;
  7780. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7781. }, function($ctx1) {$ctx1.fill(self,"renderProgressBar",{},$globals.ProgressBar)});
  7782. //>>excludeEnd("ctx");
  7783. },
  7784. //>>excludeStart("ide", pragmas.excludeIdeData);
  7785. args: [],
  7786. source: "renderProgressBar\x0a\x09div contents: [ :html |\x0a\x09\x09html div\x0a\x09\x09\x09class: 'progress';\x0a\x09\x09\x09style: 'width:', self percent asString, '%' ]",
  7787. referencedClasses: [],
  7788. //>>excludeEnd("ide");
  7789. messageSends: ["contents:", "class:", "div", "style:", ",", "asString", "percent"]
  7790. }),
  7791. $globals.ProgressBar);
  7792. $core.addMethod(
  7793. $core.method({
  7794. selector: "updatePercent:",
  7795. protocol: 'updating',
  7796. fn: function (aNumber){
  7797. var self=this;
  7798. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7799. return $core.withContext(function($ctx1) {
  7800. //>>excludeEnd("ctx");
  7801. self._percent_(aNumber);
  7802. self._renderProgressBar();
  7803. return self;
  7804. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7805. }, function($ctx1) {$ctx1.fill(self,"updatePercent:",{aNumber:aNumber},$globals.ProgressBar)});
  7806. //>>excludeEnd("ctx");
  7807. },
  7808. //>>excludeStart("ide", pragmas.excludeIdeData);
  7809. args: ["aNumber"],
  7810. source: "updatePercent: aNumber\x0a\x09self percent: aNumber.\x0a\x09self renderProgressBar",
  7811. referencedClasses: [],
  7812. //>>excludeEnd("ide");
  7813. messageSends: ["percent:", "renderProgressBar"]
  7814. }),
  7815. $globals.ProgressBar);
  7816. $core.addClass('ReferencesBrowser', $globals.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  7817. $core.addMethod(
  7818. $core.method({
  7819. selector: "canBeClosed",
  7820. protocol: 'testing',
  7821. fn: function (){
  7822. var self=this;
  7823. return true;
  7824. },
  7825. //>>excludeStart("ide", pragmas.excludeIdeData);
  7826. args: [],
  7827. source: "canBeClosed\x0a\x09^ true",
  7828. referencedClasses: [],
  7829. //>>excludeEnd("ide");
  7830. messageSends: []
  7831. }),
  7832. $globals.ReferencesBrowser);
  7833. $core.addMethod(
  7834. $core.method({
  7835. selector: "classesAndMetaclasses",
  7836. protocol: 'accessing',
  7837. fn: function (){
  7838. var self=this;
  7839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7840. return $core.withContext(function($ctx1) {
  7841. //>>excludeEnd("ctx");
  7842. var $1;
  7843. $1=$recv($globals.Smalltalk)._classes();
  7844. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7845. $ctx1.sendIdx["classes"]=1;
  7846. //>>excludeEnd("ctx");
  7847. return $recv($1).__comma($recv($recv($globals.Smalltalk)._classes())._collect_((function(each){
  7848. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7849. return $core.withContext(function($ctx2) {
  7850. //>>excludeEnd("ctx");
  7851. return $recv(each)._class();
  7852. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7853. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  7854. //>>excludeEnd("ctx");
  7855. })));
  7856. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7857. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},$globals.ReferencesBrowser)});
  7858. //>>excludeEnd("ctx");
  7859. },
  7860. //>>excludeStart("ide", pragmas.excludeIdeData);
  7861. args: [],
  7862. source: "classesAndMetaclasses\x0a\x09^ Smalltalk classes, (Smalltalk classes collect: [ :each | each class ])",
  7863. referencedClasses: ["Smalltalk"],
  7864. //>>excludeEnd("ide");
  7865. messageSends: [",", "classes", "collect:", "class"]
  7866. }),
  7867. $globals.ReferencesBrowser);
  7868. $core.addMethod(
  7869. $core.method({
  7870. selector: "implementors",
  7871. protocol: 'accessing',
  7872. fn: function (){
  7873. var self=this;
  7874. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7875. return $core.withContext(function($ctx1) {
  7876. //>>excludeEnd("ctx");
  7877. var $1,$receiver;
  7878. $1=self["@implementors"];
  7879. if(($receiver = $1) == null || $receiver.isNil){
  7880. self["@implementors"]=$recv($globals.Array)._new();
  7881. return self["@implementors"];
  7882. } else {
  7883. return $1;
  7884. };
  7885. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7886. }, function($ctx1) {$ctx1.fill(self,"implementors",{},$globals.ReferencesBrowser)});
  7887. //>>excludeEnd("ctx");
  7888. },
  7889. //>>excludeStart("ide", pragmas.excludeIdeData);
  7890. args: [],
  7891. source: "implementors\x0a\x09^ implementors ifNil: [ implementors := Array new ]",
  7892. referencedClasses: ["Array"],
  7893. //>>excludeEnd("ide");
  7894. messageSends: ["ifNil:", "new"]
  7895. }),
  7896. $globals.ReferencesBrowser);
  7897. $core.addMethod(
  7898. $core.method({
  7899. selector: "initialize",
  7900. protocol: 'initialization',
  7901. fn: function (){
  7902. var self=this;
  7903. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7904. return $core.withContext(function($ctx1) {
  7905. //>>excludeEnd("ctx");
  7906. (
  7907. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7908. $ctx1.supercall = true,
  7909. //>>excludeEnd("ctx");
  7910. ($globals.ReferencesBrowser.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
  7911. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7912. $ctx1.supercall = false;
  7913. //>>excludeEnd("ctx");;
  7914. self["@selector"]="";
  7915. return self;
  7916. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7917. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.ReferencesBrowser)});
  7918. //>>excludeEnd("ctx");
  7919. },
  7920. //>>excludeStart("ide", pragmas.excludeIdeData);
  7921. args: [],
  7922. source: "initialize\x0a\x09super initialize.\x0a\x09selector := ''",
  7923. referencedClasses: [],
  7924. //>>excludeEnd("ide");
  7925. messageSends: ["initialize"]
  7926. }),
  7927. $globals.ReferencesBrowser);
  7928. $core.addMethod(
  7929. $core.method({
  7930. selector: "label",
  7931. protocol: 'accessing',
  7932. fn: function (){
  7933. var self=this;
  7934. return "[ References ]";
  7935. },
  7936. //>>excludeStart("ide", pragmas.excludeIdeData);
  7937. args: [],
  7938. source: "label\x0a\x09^ '[ References ]'",
  7939. referencedClasses: [],
  7940. //>>excludeEnd("ide");
  7941. messageSends: []
  7942. }),
  7943. $globals.ReferencesBrowser);
  7944. $core.addMethod(
  7945. $core.method({
  7946. selector: "matches",
  7947. protocol: 'accessing',
  7948. fn: function (){
  7949. var self=this;
  7950. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7951. return $core.withContext(function($ctx1) {
  7952. //>>excludeEnd("ctx");
  7953. var $1,$receiver;
  7954. $1=self["@matches"];
  7955. if(($receiver = $1) == null || $receiver.isNil){
  7956. self["@matches"]=$recv($globals.Array)._new();
  7957. return self["@matches"];
  7958. } else {
  7959. return $1;
  7960. };
  7961. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7962. }, function($ctx1) {$ctx1.fill(self,"matches",{},$globals.ReferencesBrowser)});
  7963. //>>excludeEnd("ctx");
  7964. },
  7965. //>>excludeStart("ide", pragmas.excludeIdeData);
  7966. args: [],
  7967. source: "matches\x0a\x09^ matches ifNil: [ matches := Array new ]",
  7968. referencedClasses: ["Array"],
  7969. //>>excludeEnd("ide");
  7970. messageSends: ["ifNil:", "new"]
  7971. }),
  7972. $globals.ReferencesBrowser);
  7973. $core.addMethod(
  7974. $core.method({
  7975. selector: "openBrowserOn:",
  7976. protocol: 'actions',
  7977. fn: function (aMethod){
  7978. var self=this;
  7979. var browser;
  7980. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7981. return $core.withContext(function($ctx1) {
  7982. //>>excludeEnd("ctx");
  7983. var $3,$2,$4,$1,$5,$6;
  7984. $3=$recv(aMethod)._methodClass();
  7985. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7986. $ctx1.sendIdx["methodClass"]=1;
  7987. //>>excludeEnd("ctx");
  7988. $2=$recv($3)._isMetaclass();
  7989. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7990. $ctx1.sendIdx["isMetaclass"]=1;
  7991. //>>excludeEnd("ctx");
  7992. if($core.assert($2)){
  7993. $4=$recv(aMethod)._methodClass();
  7994. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7995. $ctx1.sendIdx["methodClass"]=2;
  7996. //>>excludeEnd("ctx");
  7997. $1=$recv($4)._instanceClass();
  7998. } else {
  7999. $1=$recv(aMethod)._methodClass();
  8000. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8001. $ctx1.sendIdx["methodClass"]=3;
  8002. //>>excludeEnd("ctx");
  8003. };
  8004. browser=$recv($globals.Browser)._openOn_($1);
  8005. $5=$recv($recv(aMethod)._methodClass())._isMetaclass();
  8006. if($core.assert($5)){
  8007. $recv(browser)._selectTab_("class");
  8008. };
  8009. $6=browser;
  8010. $recv($6)._selectProtocol_($recv(aMethod)._category());
  8011. $recv($6)._selectMethod_(aMethod);
  8012. return self;
  8013. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8014. }, function($ctx1) {$ctx1.fill(self,"openBrowserOn:",{aMethod:aMethod,browser:browser},$globals.ReferencesBrowser)});
  8015. //>>excludeEnd("ctx");
  8016. },
  8017. //>>excludeStart("ide", pragmas.excludeIdeData);
  8018. args: ["aMethod"],
  8019. source: "openBrowserOn: aMethod\x0a\x09| browser |\x0a\x09browser := Browser openOn: (aMethod methodClass isMetaclass\x0a\x09\x09ifTrue: [ aMethod methodClass instanceClass ] ifFalse: [ aMethod methodClass ]).\x0a\x09aMethod methodClass isMetaclass ifTrue: [ browser selectTab: #class ].\x0a\x09browser\x0a\x09\x09selectProtocol: aMethod category;\x0a\x09\x09selectMethod: aMethod",
  8020. referencedClasses: ["Browser"],
  8021. //>>excludeEnd("ide");
  8022. messageSends: ["openOn:", "ifTrue:ifFalse:", "isMetaclass", "methodClass", "instanceClass", "ifTrue:", "selectTab:", "selectProtocol:", "category", "selectMethod:"]
  8023. }),
  8024. $globals.ReferencesBrowser);
  8025. $core.addMethod(
  8026. $core.method({
  8027. selector: "referencedClasses",
  8028. protocol: 'accessing',
  8029. fn: function (){
  8030. var self=this;
  8031. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8032. return $core.withContext(function($ctx1) {
  8033. //>>excludeEnd("ctx");
  8034. var $1,$receiver;
  8035. $1=self["@referencedClasses"];
  8036. if(($receiver = $1) == null || $receiver.isNil){
  8037. self["@referencedClasses"]=$recv($globals.Array)._new();
  8038. return self["@referencedClasses"];
  8039. } else {
  8040. return $1;
  8041. };
  8042. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8043. }, function($ctx1) {$ctx1.fill(self,"referencedClasses",{},$globals.ReferencesBrowser)});
  8044. //>>excludeEnd("ctx");
  8045. },
  8046. //>>excludeStart("ide", pragmas.excludeIdeData);
  8047. args: [],
  8048. source: "referencedClasses\x0a\x09^ referencedClasses ifNil: [ referencedClasses := Array new ]",
  8049. referencedClasses: ["Array"],
  8050. //>>excludeEnd("ide");
  8051. messageSends: ["ifNil:", "new"]
  8052. }),
  8053. $globals.ReferencesBrowser);
  8054. $core.addMethod(
  8055. $core.method({
  8056. selector: "renderBoxOn:",
  8057. protocol: 'rendering',
  8058. fn: function (html){
  8059. var self=this;
  8060. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8061. return $core.withContext(function($ctx1) {
  8062. //>>excludeEnd("ctx");
  8063. self._renderInputOn_(html);
  8064. self._renderImplementorsOn_(html);
  8065. self._renderSendersOn_(html);
  8066. self._renderReferencedClassesOn_(html);
  8067. self._renderMatchesOn_(html);
  8068. return self;
  8069. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8070. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.ReferencesBrowser)});
  8071. //>>excludeEnd("ctx");
  8072. },
  8073. //>>excludeStart("ide", pragmas.excludeIdeData);
  8074. args: ["html"],
  8075. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderInputOn: html;\x0a\x09\x09renderImplementorsOn: html;\x0a\x09\x09renderSendersOn: html;\x0a\x09\x09renderReferencedClassesOn: html;\x0a\x09\x09renderMatchesOn: html",
  8076. referencedClasses: [],
  8077. //>>excludeEnd("ide");
  8078. messageSends: ["renderInputOn:", "renderImplementorsOn:", "renderSendersOn:", "renderReferencedClassesOn:", "renderMatchesOn:"]
  8079. }),
  8080. $globals.ReferencesBrowser);
  8081. $core.addMethod(
  8082. $core.method({
  8083. selector: "renderImplementorsOn:",
  8084. protocol: 'rendering',
  8085. fn: function (html){
  8086. var self=this;
  8087. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8088. return $core.withContext(function($ctx1) {
  8089. //>>excludeEnd("ctx");
  8090. self["@implementorsList"]=$recv($recv(html)._ul())._class_("amber_column implementors");
  8091. self._updateImplementorsList();
  8092. return self;
  8093. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8094. }, function($ctx1) {$ctx1.fill(self,"renderImplementorsOn:",{html:html},$globals.ReferencesBrowser)});
  8095. //>>excludeEnd("ctx");
  8096. },
  8097. //>>excludeStart("ide", pragmas.excludeIdeData);
  8098. args: ["html"],
  8099. source: "renderImplementorsOn: html\x0a\x09implementorsList := html ul class: 'amber_column implementors'.\x0a\x09self updateImplementorsList",
  8100. referencedClasses: [],
  8101. //>>excludeEnd("ide");
  8102. messageSends: ["class:", "ul", "updateImplementorsList"]
  8103. }),
  8104. $globals.ReferencesBrowser);
  8105. $core.addMethod(
  8106. $core.method({
  8107. selector: "renderInputOn:",
  8108. protocol: 'rendering',
  8109. fn: function (html){
  8110. var self=this;
  8111. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8112. return $core.withContext(function($ctx1) {
  8113. //>>excludeEnd("ctx");
  8114. var $1;
  8115. $1=$recv(html)._input();
  8116. $recv($1)._class_("implementors");
  8117. self["@input"]=$recv($1)._yourself();
  8118. $recv($recv(self["@input"])._asJQuery())._val_(self["@selector"]);
  8119. self._setInputEvents();
  8120. return self;
  8121. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8122. }, function($ctx1) {$ctx1.fill(self,"renderInputOn:",{html:html},$globals.ReferencesBrowser)});
  8123. //>>excludeEnd("ctx");
  8124. },
  8125. //>>excludeStart("ide", pragmas.excludeIdeData);
  8126. args: ["html"],
  8127. source: "renderInputOn: html\x0a\x09input := html input\x0a\x09\x09class: 'implementors';\x0a\x09\x09yourself.\x0a\x09input asJQuery val: selector.\x0a\x09self setInputEvents",
  8128. referencedClasses: [],
  8129. //>>excludeEnd("ide");
  8130. messageSends: ["class:", "input", "yourself", "val:", "asJQuery", "setInputEvents"]
  8131. }),
  8132. $globals.ReferencesBrowser);
  8133. $core.addMethod(
  8134. $core.method({
  8135. selector: "renderMatchesOn:",
  8136. protocol: 'rendering',
  8137. fn: function (html){
  8138. var self=this;
  8139. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8140. return $core.withContext(function($ctx1) {
  8141. //>>excludeEnd("ctx");
  8142. self["@matchesList"]=$recv($recv(html)._ul())._class_("amber_column matches");
  8143. self._updateMatchesList();
  8144. return self;
  8145. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8146. }, function($ctx1) {$ctx1.fill(self,"renderMatchesOn:",{html:html},$globals.ReferencesBrowser)});
  8147. //>>excludeEnd("ctx");
  8148. },
  8149. //>>excludeStart("ide", pragmas.excludeIdeData);
  8150. args: ["html"],
  8151. source: "renderMatchesOn: html\x0a\x09matchesList := html ul class: 'amber_column matches'.\x0a\x09self updateMatchesList",
  8152. referencedClasses: [],
  8153. //>>excludeEnd("ide");
  8154. messageSends: ["class:", "ul", "updateMatchesList"]
  8155. }),
  8156. $globals.ReferencesBrowser);
  8157. $core.addMethod(
  8158. $core.method({
  8159. selector: "renderReferencedClassesOn:",
  8160. protocol: 'rendering',
  8161. fn: function (html){
  8162. var self=this;
  8163. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8164. return $core.withContext(function($ctx1) {
  8165. //>>excludeEnd("ctx");
  8166. self["@referencedClassesList"]=$recv($recv(html)._ul())._class_("amber_column referenced_classes");
  8167. self._updateReferencedClassesList();
  8168. return self;
  8169. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8170. }, function($ctx1) {$ctx1.fill(self,"renderReferencedClassesOn:",{html:html},$globals.ReferencesBrowser)});
  8171. //>>excludeEnd("ctx");
  8172. },
  8173. //>>excludeStart("ide", pragmas.excludeIdeData);
  8174. args: ["html"],
  8175. source: "renderReferencedClassesOn: html\x0a\x09referencedClassesList := html ul class: 'amber_column referenced_classes'.\x0a\x09self updateReferencedClassesList",
  8176. referencedClasses: [],
  8177. //>>excludeEnd("ide");
  8178. messageSends: ["class:", "ul", "updateReferencedClassesList"]
  8179. }),
  8180. $globals.ReferencesBrowser);
  8181. $core.addMethod(
  8182. $core.method({
  8183. selector: "renderSendersOn:",
  8184. protocol: 'rendering',
  8185. fn: function (html){
  8186. var self=this;
  8187. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8188. return $core.withContext(function($ctx1) {
  8189. //>>excludeEnd("ctx");
  8190. self["@sendersList"]=$recv($recv(html)._ul())._class_("amber_column senders");
  8191. self._updateSendersList();
  8192. return self;
  8193. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8194. }, function($ctx1) {$ctx1.fill(self,"renderSendersOn:",{html:html},$globals.ReferencesBrowser)});
  8195. //>>excludeEnd("ctx");
  8196. },
  8197. //>>excludeStart("ide", pragmas.excludeIdeData);
  8198. args: ["html"],
  8199. source: "renderSendersOn: html\x0a\x09sendersList := html ul class: 'amber_column senders'.\x0a\x09self updateSendersList",
  8200. referencedClasses: [],
  8201. //>>excludeEnd("ide");
  8202. messageSends: ["class:", "ul", "updateSendersList"]
  8203. }),
  8204. $globals.ReferencesBrowser);
  8205. $core.addMethod(
  8206. $core.method({
  8207. selector: "search:",
  8208. protocol: 'actions',
  8209. fn: function (aString){
  8210. var self=this;
  8211. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8212. return $core.withContext(function($ctx1) {
  8213. //>>excludeEnd("ctx");
  8214. self._searchReferencesFor_(aString);
  8215. self._updateImplementorsList();
  8216. self._updateSendersList();
  8217. self._updateReferencedClassesList();
  8218. self._updateMatchesList();
  8219. return self;
  8220. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8221. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},$globals.ReferencesBrowser)});
  8222. //>>excludeEnd("ctx");
  8223. },
  8224. //>>excludeStart("ide", pragmas.excludeIdeData);
  8225. args: ["aString"],
  8226. source: "search: aString\x0a\x09self\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09updateImplementorsList;\x0a\x09\x09updateSendersList;\x0a\x09\x09updateReferencedClassesList;\x0a\x09\x09updateMatchesList",
  8227. referencedClasses: [],
  8228. //>>excludeEnd("ide");
  8229. messageSends: ["searchReferencesFor:", "updateImplementorsList", "updateSendersList", "updateReferencedClassesList", "updateMatchesList"]
  8230. }),
  8231. $globals.ReferencesBrowser);
  8232. $core.addMethod(
  8233. $core.method({
  8234. selector: "searchMethodSource",
  8235. protocol: 'actions',
  8236. fn: function (){
  8237. var self=this;
  8238. var regex;
  8239. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8240. return $core.withContext(function($ctx1) {
  8241. //>>excludeEnd("ctx");
  8242. var $1;
  8243. regex=$recv(self["@selector"])._allButFirst();
  8244. $recv(self._classesAndMetaclasses())._do_((function(each){
  8245. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8246. return $core.withContext(function($ctx2) {
  8247. //>>excludeEnd("ctx");
  8248. return $recv($recv(each)._methodDictionary())._valuesDo_((function(value){
  8249. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8250. return $core.withContext(function($ctx3) {
  8251. //>>excludeEnd("ctx");
  8252. $1=$recv($recv(value)._source())._match_(regex);
  8253. if($core.assert($1)){
  8254. return $recv(self._matches())._add_(value);
  8255. };
  8256. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8257. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx2,2)});
  8258. //>>excludeEnd("ctx");
  8259. }));
  8260. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8261. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  8262. //>>excludeEnd("ctx");
  8263. }));
  8264. return self;
  8265. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8266. }, function($ctx1) {$ctx1.fill(self,"searchMethodSource",{regex:regex},$globals.ReferencesBrowser)});
  8267. //>>excludeEnd("ctx");
  8268. },
  8269. //>>excludeStart("ide", pragmas.excludeIdeData);
  8270. args: [],
  8271. source: "searchMethodSource\x0a\x09| regex |\x0a\x09regex := selector allButFirst.\x0a\x09self classesAndMetaclasses do: [ :each |\x0a\x09\x09each methodDictionary valuesDo: [ :value |\x0a\x09\x09\x09(value source match: regex) ifTrue: [\x0a\x09\x09\x09\x09self matches add: value ]] ]",
  8272. referencedClasses: [],
  8273. //>>excludeEnd("ide");
  8274. messageSends: ["allButFirst", "do:", "classesAndMetaclasses", "valuesDo:", "methodDictionary", "ifTrue:", "match:", "source", "add:", "matches"]
  8275. }),
  8276. $globals.ReferencesBrowser);
  8277. $core.addMethod(
  8278. $core.method({
  8279. selector: "searchReferencedClasses",
  8280. protocol: 'actions',
  8281. fn: function (){
  8282. var self=this;
  8283. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8284. return $core.withContext(function($ctx1) {
  8285. //>>excludeEnd("ctx");
  8286. var $2,$1;
  8287. $recv(self._classesAndMetaclasses())._do_((function(each){
  8288. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8289. return $core.withContext(function($ctx2) {
  8290. //>>excludeEnd("ctx");
  8291. return $recv($recv(each)._methodDictionary())._valuesDo_((function(value){
  8292. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8293. return $core.withContext(function($ctx3) {
  8294. //>>excludeEnd("ctx");
  8295. $2=$recv(value)._referencedClasses();
  8296. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8297. $ctx3.sendIdx["referencedClasses"]=1;
  8298. //>>excludeEnd("ctx");
  8299. $1=$recv($2)._includes_(self["@selector"]);
  8300. if($core.assert($1)){
  8301. return $recv(self._referencedClasses())._add_(value);
  8302. };
  8303. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8304. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx2,2)});
  8305. //>>excludeEnd("ctx");
  8306. }));
  8307. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8308. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  8309. //>>excludeEnd("ctx");
  8310. }));
  8311. return self;
  8312. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8313. }, function($ctx1) {$ctx1.fill(self,"searchReferencedClasses",{},$globals.ReferencesBrowser)});
  8314. //>>excludeEnd("ctx");
  8315. },
  8316. //>>excludeStart("ide", pragmas.excludeIdeData);
  8317. args: [],
  8318. source: "searchReferencedClasses\x0a\x09self classesAndMetaclasses do: [ :each |\x0a\x09\x09each methodDictionary valuesDo: [ :value |\x0a\x09\x09\x09(value referencedClasses includes: selector) ifTrue: [\x0a\x09\x09\x09\x09self referencedClasses add: value ]] ]",
  8319. referencedClasses: [],
  8320. //>>excludeEnd("ide");
  8321. messageSends: ["do:", "classesAndMetaclasses", "valuesDo:", "methodDictionary", "ifTrue:", "includes:", "referencedClasses", "add:"]
  8322. }),
  8323. $globals.ReferencesBrowser);
  8324. $core.addMethod(
  8325. $core.method({
  8326. selector: "searchReferencesFor:",
  8327. protocol: 'actions',
  8328. fn: function (aString){
  8329. var self=this;
  8330. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8331. return $core.withContext(function($ctx1) {
  8332. //>>excludeEnd("ctx");
  8333. var $1;
  8334. self["@selector"]=aString;
  8335. self["@implementors"]=$recv($globals.Array)._new();
  8336. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8337. $ctx1.sendIdx["new"]=1;
  8338. //>>excludeEnd("ctx");
  8339. self["@senders"]=$recv($globals.Array)._new();
  8340. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8341. $ctx1.sendIdx["new"]=2;
  8342. //>>excludeEnd("ctx");
  8343. self["@referencedClasses"]=$recv($globals.Array)._new();
  8344. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8345. $ctx1.sendIdx["new"]=3;
  8346. //>>excludeEnd("ctx");
  8347. self["@matches"]=$recv($globals.Array)._new();
  8348. self._searchMethodSource();
  8349. $1=$recv(self["@selector"])._match_("^[A-Z]");
  8350. if($core.assert($1)){
  8351. self._searchReferencedClasses();
  8352. } else {
  8353. self._searchSelectorReferences();
  8354. };
  8355. return self;
  8356. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8357. }, function($ctx1) {$ctx1.fill(self,"searchReferencesFor:",{aString:aString},$globals.ReferencesBrowser)});
  8358. //>>excludeEnd("ctx");
  8359. },
  8360. //>>excludeStart("ide", pragmas.excludeIdeData);
  8361. args: ["aString"],
  8362. source: "searchReferencesFor: aString\x0a\x09selector := aString.\x0a\x09implementors := Array new.\x0a\x09senders := Array new.\x0a\x09referencedClasses := Array new.\x0a\x09matches := Array new.\x0a\x09self searchMethodSource.\x0a\x09(selector match: '^[A-Z]')\x0a\x09\x09ifFalse: [ self searchSelectorReferences ]\x0a\x09\x09ifTrue: [ self searchReferencedClasses ]",
  8363. referencedClasses: ["Array"],
  8364. //>>excludeEnd("ide");
  8365. messageSends: ["new", "searchMethodSource", "ifFalse:ifTrue:", "match:", "searchSelectorReferences", "searchReferencedClasses"]
  8366. }),
  8367. $globals.ReferencesBrowser);
  8368. $core.addMethod(
  8369. $core.method({
  8370. selector: "searchSelectorReferences",
  8371. protocol: 'actions',
  8372. fn: function (){
  8373. var self=this;
  8374. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8375. return $core.withContext(function($ctx1) {
  8376. //>>excludeEnd("ctx");
  8377. var $1,$2;
  8378. $recv(self._classesAndMetaclasses())._do_((function(each){
  8379. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8380. return $core.withContext(function($ctx2) {
  8381. //>>excludeEnd("ctx");
  8382. return $recv($recv(each)._methodDictionary())._keysAndValuesDo_((function(key,value){
  8383. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8384. return $core.withContext(function($ctx3) {
  8385. //>>excludeEnd("ctx");
  8386. $1=$recv(key).__eq(self["@selector"]);
  8387. if($core.assert($1)){
  8388. $recv(self._implementors())._add_(value);
  8389. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8390. $ctx3.sendIdx["add:"]=1;
  8391. //>>excludeEnd("ctx");
  8392. };
  8393. $2=$recv($recv(value)._messageSends())._includes_(self["@selector"]);
  8394. if($core.assert($2)){
  8395. return $recv(self._senders())._add_(value);
  8396. };
  8397. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8398. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx2,2)});
  8399. //>>excludeEnd("ctx");
  8400. }));
  8401. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8402. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  8403. //>>excludeEnd("ctx");
  8404. }));
  8405. return self;
  8406. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8407. }, function($ctx1) {$ctx1.fill(self,"searchSelectorReferences",{},$globals.ReferencesBrowser)});
  8408. //>>excludeEnd("ctx");
  8409. },
  8410. //>>excludeStart("ide", pragmas.excludeIdeData);
  8411. args: [],
  8412. source: "searchSelectorReferences\x0a\x09self classesAndMetaclasses do: [ :each |\x0a\x09\x09each methodDictionary keysAndValuesDo: [ :key :value |\x0a\x09\x09\x09key = selector ifTrue: [ self implementors add: value ].\x0a\x09\x09\x09(value messageSends includes: selector) ifTrue: [\x0a\x09\x09\x09\x09self senders add: value ]] ]",
  8413. referencedClasses: [],
  8414. //>>excludeEnd("ide");
  8415. messageSends: ["do:", "classesAndMetaclasses", "keysAndValuesDo:", "methodDictionary", "ifTrue:", "=", "add:", "implementors", "includes:", "messageSends", "senders"]
  8416. }),
  8417. $globals.ReferencesBrowser);
  8418. $core.addMethod(
  8419. $core.method({
  8420. selector: "selector",
  8421. protocol: 'accessing',
  8422. fn: function (){
  8423. var self=this;
  8424. return self["@selector"];
  8425. },
  8426. //>>excludeStart("ide", pragmas.excludeIdeData);
  8427. args: [],
  8428. source: "selector\x0a\x09^ selector",
  8429. referencedClasses: [],
  8430. //>>excludeEnd("ide");
  8431. messageSends: []
  8432. }),
  8433. $globals.ReferencesBrowser);
  8434. $core.addMethod(
  8435. $core.method({
  8436. selector: "senders",
  8437. protocol: 'accessing',
  8438. fn: function (){
  8439. var self=this;
  8440. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8441. return $core.withContext(function($ctx1) {
  8442. //>>excludeEnd("ctx");
  8443. var $1,$receiver;
  8444. $1=self["@senders"];
  8445. if(($receiver = $1) == null || $receiver.isNil){
  8446. self["@senders"]=$recv($globals.Array)._new();
  8447. return self["@senders"];
  8448. } else {
  8449. return $1;
  8450. };
  8451. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8452. }, function($ctx1) {$ctx1.fill(self,"senders",{},$globals.ReferencesBrowser)});
  8453. //>>excludeEnd("ctx");
  8454. },
  8455. //>>excludeStart("ide", pragmas.excludeIdeData);
  8456. args: [],
  8457. source: "senders\x0a\x09^ senders ifNil: [ senders := Array new ]",
  8458. referencedClasses: ["Array"],
  8459. //>>excludeEnd("ide");
  8460. messageSends: ["ifNil:", "new"]
  8461. }),
  8462. $globals.ReferencesBrowser);
  8463. $core.addMethod(
  8464. $core.method({
  8465. selector: "setInputEvents",
  8466. protocol: 'private',
  8467. fn: function (){
  8468. var self=this;
  8469. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8470. return $core.withContext(function($ctx1) {
  8471. //>>excludeEnd("ctx");
  8472. var $1,$2,$receiver;
  8473. $1=self["@input"];
  8474. $recv($1)._onKeyUp_((function(){
  8475. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8476. return $core.withContext(function($ctx2) {
  8477. //>>excludeEnd("ctx");
  8478. self["@timer"]=$recv((function(){
  8479. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8480. return $core.withContext(function($ctx3) {
  8481. //>>excludeEnd("ctx");
  8482. return self._search_($recv($recv(self["@input"])._asJQuery())._val());
  8483. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8484. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  8485. //>>excludeEnd("ctx");
  8486. }))._valueWithTimeout_((100));
  8487. return self["@timer"];
  8488. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8489. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  8490. //>>excludeEnd("ctx");
  8491. }));
  8492. $recv($1)._onKeyDown_((function(){
  8493. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8494. return $core.withContext(function($ctx2) {
  8495. //>>excludeEnd("ctx");
  8496. $2=self["@timer"];
  8497. if(($receiver = $2) == null || $receiver.isNil){
  8498. return $2;
  8499. } else {
  8500. return $recv(self["@timer"])._clearTimeout();
  8501. };
  8502. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8503. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  8504. //>>excludeEnd("ctx");
  8505. }));
  8506. return self;
  8507. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8508. }, function($ctx1) {$ctx1.fill(self,"setInputEvents",{},$globals.ReferencesBrowser)});
  8509. //>>excludeEnd("ctx");
  8510. },
  8511. //>>excludeStart("ide", pragmas.excludeIdeData);
  8512. args: [],
  8513. source: "setInputEvents\x0a\x09input\x0a\x09\x09onKeyUp: [ timer := [ self search: input asJQuery val ] valueWithTimeout: 100 ];\x0a\x09\x09onKeyDown: [ timer ifNotNil: [ timer clearTimeout ]]",
  8514. referencedClasses: [],
  8515. //>>excludeEnd("ide");
  8516. messageSends: ["onKeyUp:", "valueWithTimeout:", "search:", "val", "asJQuery", "onKeyDown:", "ifNotNil:", "clearTimeout"]
  8517. }),
  8518. $globals.ReferencesBrowser);
  8519. $core.addMethod(
  8520. $core.method({
  8521. selector: "updateImplementorsList",
  8522. protocol: 'updating',
  8523. fn: function (){
  8524. var self=this;
  8525. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8526. return $core.withContext(function($ctx1) {
  8527. //>>excludeEnd("ctx");
  8528. var $1,$6,$5,$4,$3,$2,$7,$8;
  8529. $recv(self["@implementorsList"])._contents_((function(html){
  8530. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8531. return $core.withContext(function($ctx2) {
  8532. //>>excludeEnd("ctx");
  8533. $1=$recv(html)._li();
  8534. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8535. $ctx2.sendIdx["li"]=1;
  8536. //>>excludeEnd("ctx");
  8537. $recv($1)._class_("column_label");
  8538. $6=self._implementors();
  8539. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8540. $ctx2.sendIdx["implementors"]=1;
  8541. //>>excludeEnd("ctx");
  8542. $5=$recv($6)._size();
  8543. $4=$recv($5)._asString();
  8544. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8545. $ctx2.sendIdx["asString"]=1;
  8546. //>>excludeEnd("ctx");
  8547. $3="Implementors (".__comma($4);
  8548. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8549. $ctx2.sendIdx[","]=2;
  8550. //>>excludeEnd("ctx");
  8551. $2=$recv($3).__comma(")");
  8552. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8553. $ctx2.sendIdx[","]=1;
  8554. //>>excludeEnd("ctx");
  8555. $recv($1)._with_($2);
  8556. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8557. $ctx2.sendIdx["with:"]=1;
  8558. //>>excludeEnd("ctx");
  8559. $recv($1)._style_("font-weight: bold");
  8560. return $recv(self._implementors())._do_((function(each){
  8561. var li;
  8562. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8563. return $core.withContext(function($ctx3) {
  8564. //>>excludeEnd("ctx");
  8565. li=$recv(html)._li();
  8566. li;
  8567. $7=li;
  8568. $8=$recv($recv($recv($recv(each)._methodClass())._asString()).__comma(" >> ")).__comma(self._selector());
  8569. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8570. $ctx3.sendIdx[","]=3;
  8571. //>>excludeEnd("ctx");
  8572. $recv($7)._with_($8);
  8573. return $recv($7)._onClick_((function(){
  8574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8575. return $core.withContext(function($ctx4) {
  8576. //>>excludeEnd("ctx");
  8577. return self._openBrowserOn_(each);
  8578. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8579. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  8580. //>>excludeEnd("ctx");
  8581. }));
  8582. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8583. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)});
  8584. //>>excludeEnd("ctx");
  8585. }));
  8586. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8587. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  8588. //>>excludeEnd("ctx");
  8589. }));
  8590. return self;
  8591. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8592. }, function($ctx1) {$ctx1.fill(self,"updateImplementorsList",{},$globals.ReferencesBrowser)});
  8593. //>>excludeEnd("ctx");
  8594. },
  8595. //>>excludeStart("ide", pragmas.excludeIdeData);
  8596. args: [],
  8597. source: "updateImplementorsList\x0a\x09implementorsList contents: [ :html |\x0a\x09html li\x0a\x09\x09class: 'column_label';\x0a\x09\x09with: 'Implementors (', self implementors size asString, ')';\x0a\x09\x09style: 'font-weight: bold'.\x0a\x09self implementors do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09li\x0a\x09\x09with: (each methodClass asString, ' >> ', self selector);\x0a\x09\x09onClick: [ self openBrowserOn: each ]] ]",
  8598. referencedClasses: [],
  8599. //>>excludeEnd("ide");
  8600. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "implementors", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"]
  8601. }),
  8602. $globals.ReferencesBrowser);
  8603. $core.addMethod(
  8604. $core.method({
  8605. selector: "updateMatchesList",
  8606. protocol: 'updating',
  8607. fn: function (){
  8608. var self=this;
  8609. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8610. return $core.withContext(function($ctx1) {
  8611. //>>excludeEnd("ctx");
  8612. var $1,$6,$5,$4,$3,$2,$7,$8;
  8613. $recv(self["@matchesList"])._contents_((function(html){
  8614. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8615. return $core.withContext(function($ctx2) {
  8616. //>>excludeEnd("ctx");
  8617. $1=$recv(html)._li();
  8618. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8619. $ctx2.sendIdx["li"]=1;
  8620. //>>excludeEnd("ctx");
  8621. $recv($1)._class_("column_label");
  8622. $6=self._matches();
  8623. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8624. $ctx2.sendIdx["matches"]=1;
  8625. //>>excludeEnd("ctx");
  8626. $5=$recv($6)._size();
  8627. $4=$recv($5)._asString();
  8628. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8629. $ctx2.sendIdx["asString"]=1;
  8630. //>>excludeEnd("ctx");
  8631. $3="Regex matches (".__comma($4);
  8632. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8633. $ctx2.sendIdx[","]=2;
  8634. //>>excludeEnd("ctx");
  8635. $2=$recv($3).__comma(")");
  8636. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8637. $ctx2.sendIdx[","]=1;
  8638. //>>excludeEnd("ctx");
  8639. $recv($1)._with_($2);
  8640. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8641. $ctx2.sendIdx["with:"]=1;
  8642. //>>excludeEnd("ctx");
  8643. $recv($1)._style_("font-weight: bold");
  8644. return $recv(self._matches())._do_((function(each){
  8645. var li;
  8646. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8647. return $core.withContext(function($ctx3) {
  8648. //>>excludeEnd("ctx");
  8649. li=$recv(html)._li();
  8650. li;
  8651. $7=li;
  8652. $8=$recv($recv($recv($recv(each)._methodClass())._asString()).__comma(" >> ")).__comma($recv(each)._selector());
  8653. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8654. $ctx3.sendIdx[","]=3;
  8655. //>>excludeEnd("ctx");
  8656. $recv($7)._with_($8);
  8657. return $recv($7)._onClick_((function(){
  8658. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8659. return $core.withContext(function($ctx4) {
  8660. //>>excludeEnd("ctx");
  8661. return self._openBrowserOn_(each);
  8662. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8663. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  8664. //>>excludeEnd("ctx");
  8665. }));
  8666. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8667. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)});
  8668. //>>excludeEnd("ctx");
  8669. }));
  8670. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8671. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  8672. //>>excludeEnd("ctx");
  8673. }));
  8674. return self;
  8675. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8676. }, function($ctx1) {$ctx1.fill(self,"updateMatchesList",{},$globals.ReferencesBrowser)});
  8677. //>>excludeEnd("ctx");
  8678. },
  8679. //>>excludeStart("ide", pragmas.excludeIdeData);
  8680. args: [],
  8681. source: "updateMatchesList\x0a\x09matchesList contents: [ :html |\x0a\x09html li\x0a\x09\x09class: 'column_label';\x0a\x09\x09with: 'Regex matches (', self matches size asString, ')';\x0a\x09\x09style: 'font-weight: bold'.\x0a\x09self matches do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09li\x0a\x09\x09with: (each methodClass asString, ' >> ', each selector);\x0a\x09\x09onClick: [ self openBrowserOn: each ]] ]",
  8682. referencedClasses: [],
  8683. //>>excludeEnd("ide");
  8684. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "matches", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"]
  8685. }),
  8686. $globals.ReferencesBrowser);
  8687. $core.addMethod(
  8688. $core.method({
  8689. selector: "updateReferencedClassesList",
  8690. protocol: 'updating',
  8691. fn: function (){
  8692. var self=this;
  8693. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8694. return $core.withContext(function($ctx1) {
  8695. //>>excludeEnd("ctx");
  8696. var $1,$6,$5,$4,$3,$2,$7,$8;
  8697. $recv(self["@referencedClassesList"])._contents_((function(html){
  8698. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8699. return $core.withContext(function($ctx2) {
  8700. //>>excludeEnd("ctx");
  8701. $1=$recv(html)._li();
  8702. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8703. $ctx2.sendIdx["li"]=1;
  8704. //>>excludeEnd("ctx");
  8705. $recv($1)._class_("column_label");
  8706. $6=self._referencedClasses();
  8707. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8708. $ctx2.sendIdx["referencedClasses"]=1;
  8709. //>>excludeEnd("ctx");
  8710. $5=$recv($6)._size();
  8711. $4=$recv($5)._asString();
  8712. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8713. $ctx2.sendIdx["asString"]=1;
  8714. //>>excludeEnd("ctx");
  8715. $3="Class references (".__comma($4);
  8716. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8717. $ctx2.sendIdx[","]=2;
  8718. //>>excludeEnd("ctx");
  8719. $2=$recv($3).__comma(")");
  8720. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8721. $ctx2.sendIdx[","]=1;
  8722. //>>excludeEnd("ctx");
  8723. $recv($1)._with_($2);
  8724. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8725. $ctx2.sendIdx["with:"]=1;
  8726. //>>excludeEnd("ctx");
  8727. $recv($1)._style_("font-weight: bold");
  8728. return $recv(self._referencedClasses())._do_((function(each){
  8729. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8730. return $core.withContext(function($ctx3) {
  8731. //>>excludeEnd("ctx");
  8732. $7=$recv(html)._li();
  8733. $8=$recv($recv($recv($recv(each)._methodClass())._asString()).__comma(" >> ")).__comma($recv(each)._selector());
  8734. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8735. $ctx3.sendIdx[","]=3;
  8736. //>>excludeEnd("ctx");
  8737. $recv($7)._with_($8);
  8738. return $recv($7)._onClick_((function(){
  8739. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8740. return $core.withContext(function($ctx4) {
  8741. //>>excludeEnd("ctx");
  8742. return self._openBrowserOn_(each);
  8743. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8744. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  8745. //>>excludeEnd("ctx");
  8746. }));
  8747. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8748. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  8749. //>>excludeEnd("ctx");
  8750. }));
  8751. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8752. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  8753. //>>excludeEnd("ctx");
  8754. }));
  8755. return self;
  8756. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8757. }, function($ctx1) {$ctx1.fill(self,"updateReferencedClassesList",{},$globals.ReferencesBrowser)});
  8758. //>>excludeEnd("ctx");
  8759. },
  8760. //>>excludeStart("ide", pragmas.excludeIdeData);
  8761. args: [],
  8762. source: "updateReferencedClassesList\x0a\x09referencedClassesList contents: [ :html |\x0a\x09html li\x0a\x09\x09class: 'column_label';\x0a\x09\x09with: 'Class references (', self referencedClasses size asString, ')';\x0a\x09\x09style: 'font-weight: bold'.\x0a\x09self referencedClasses do: [ :each |\x0a\x09\x09html li\x0a\x09\x09\x09with: (each methodClass asString, ' >> ', each selector);\x0a\x09\x09\x09onClick: [ self openBrowserOn: each ]] ]",
  8763. referencedClasses: [],
  8764. //>>excludeEnd("ide");
  8765. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "referencedClasses", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"]
  8766. }),
  8767. $globals.ReferencesBrowser);
  8768. $core.addMethod(
  8769. $core.method({
  8770. selector: "updateSendersList",
  8771. protocol: 'updating',
  8772. fn: function (){
  8773. var self=this;
  8774. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8775. return $core.withContext(function($ctx1) {
  8776. //>>excludeEnd("ctx");
  8777. var $1,$6,$5,$4,$3,$2,$7,$8;
  8778. $recv(self["@sendersList"])._contents_((function(html){
  8779. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8780. return $core.withContext(function($ctx2) {
  8781. //>>excludeEnd("ctx");
  8782. $1=$recv(html)._li();
  8783. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8784. $ctx2.sendIdx["li"]=1;
  8785. //>>excludeEnd("ctx");
  8786. $recv($1)._class_("column_label");
  8787. $6=self._senders();
  8788. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8789. $ctx2.sendIdx["senders"]=1;
  8790. //>>excludeEnd("ctx");
  8791. $5=$recv($6)._size();
  8792. $4=$recv($5)._asString();
  8793. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8794. $ctx2.sendIdx["asString"]=1;
  8795. //>>excludeEnd("ctx");
  8796. $3="Senders (".__comma($4);
  8797. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8798. $ctx2.sendIdx[","]=2;
  8799. //>>excludeEnd("ctx");
  8800. $2=$recv($3).__comma(")");
  8801. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8802. $ctx2.sendIdx[","]=1;
  8803. //>>excludeEnd("ctx");
  8804. $recv($1)._with_($2);
  8805. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8806. $ctx2.sendIdx["with:"]=1;
  8807. //>>excludeEnd("ctx");
  8808. $recv($1)._style_("font-weight: bold");
  8809. return $recv(self._senders())._do_((function(each){
  8810. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8811. return $core.withContext(function($ctx3) {
  8812. //>>excludeEnd("ctx");
  8813. $7=$recv(html)._li();
  8814. $8=$recv($recv($recv($recv(each)._methodClass())._asString()).__comma(" >> ")).__comma($recv(each)._selector());
  8815. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8816. $ctx3.sendIdx[","]=3;
  8817. //>>excludeEnd("ctx");
  8818. $recv($7)._with_($8);
  8819. return $recv($7)._onClick_((function(){
  8820. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8821. return $core.withContext(function($ctx4) {
  8822. //>>excludeEnd("ctx");
  8823. return self._openBrowserOn_(each);
  8824. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8825. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  8826. //>>excludeEnd("ctx");
  8827. }));
  8828. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8829. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  8830. //>>excludeEnd("ctx");
  8831. }));
  8832. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8833. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  8834. //>>excludeEnd("ctx");
  8835. }));
  8836. return self;
  8837. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8838. }, function($ctx1) {$ctx1.fill(self,"updateSendersList",{},$globals.ReferencesBrowser)});
  8839. //>>excludeEnd("ctx");
  8840. },
  8841. //>>excludeStart("ide", pragmas.excludeIdeData);
  8842. args: [],
  8843. source: "updateSendersList\x0a\x09sendersList contents: [ :html |\x0a\x09html li\x0a\x09\x09class: 'column_label';\x0a\x09\x09with: 'Senders (', self senders size asString, ')';\x0a\x09\x09style: 'font-weight: bold'.\x0a\x09self senders do: [ :each |\x0a\x09\x09html li\x0a\x09\x09\x09with: (each methodClass asString, ' >> ', each selector);\x0a\x09\x09\x09onClick: [ self openBrowserOn: each ]] ]",
  8844. referencedClasses: [],
  8845. //>>excludeEnd("ide");
  8846. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "senders", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"]
  8847. }),
  8848. $globals.ReferencesBrowser);
  8849. $core.addMethod(
  8850. $core.method({
  8851. selector: "search:",
  8852. protocol: 'instance creation',
  8853. fn: function (aString){
  8854. var self=this;
  8855. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8856. return $core.withContext(function($ctx1) {
  8857. //>>excludeEnd("ctx");
  8858. var $1;
  8859. $1=self._new();
  8860. $recv($1)._searchReferencesFor_(aString);
  8861. return $recv($1)._open();
  8862. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8863. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},$globals.ReferencesBrowser.klass)});
  8864. //>>excludeEnd("ctx");
  8865. },
  8866. //>>excludeStart("ide", pragmas.excludeIdeData);
  8867. args: ["aString"],
  8868. source: "search: aString\x0a\x09^ self new\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09open",
  8869. referencedClasses: [],
  8870. //>>excludeEnd("ide");
  8871. messageSends: ["searchReferencesFor:", "new", "open"]
  8872. }),
  8873. $globals.ReferencesBrowser.klass);
  8874. $core.addClass('TestRunner', $globals.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  8875. $core.addMethod(
  8876. $core.method({
  8877. selector: "allClasses",
  8878. protocol: 'accessing',
  8879. fn: function (){
  8880. var self=this;
  8881. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8882. return $core.withContext(function($ctx1) {
  8883. //>>excludeEnd("ctx");
  8884. return $recv($recv($globals.TestCase)._allSubclasses())._select_((function(each){
  8885. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8886. return $core.withContext(function($ctx2) {
  8887. //>>excludeEnd("ctx");
  8888. return $recv($recv(each)._isAbstract())._not();
  8889. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8890. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  8891. //>>excludeEnd("ctx");
  8892. }));
  8893. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8894. }, function($ctx1) {$ctx1.fill(self,"allClasses",{},$globals.TestRunner)});
  8895. //>>excludeEnd("ctx");
  8896. },
  8897. //>>excludeStart("ide", pragmas.excludeIdeData);
  8898. args: [],
  8899. source: "allClasses\x0a\x09^ TestCase allSubclasses select: [ :each | each isAbstract not ]",
  8900. referencedClasses: ["TestCase"],
  8901. //>>excludeEnd("ide");
  8902. messageSends: ["select:", "allSubclasses", "not", "isAbstract"]
  8903. }),
  8904. $globals.TestRunner);
  8905. $core.addMethod(
  8906. $core.method({
  8907. selector: "classes",
  8908. protocol: 'accessing',
  8909. fn: function (){
  8910. var self=this;
  8911. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8912. return $core.withContext(function($ctx1) {
  8913. //>>excludeEnd("ctx");
  8914. var $1;
  8915. return $recv($recv(self._allClasses())._select_((function(each){
  8916. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8917. return $core.withContext(function($ctx2) {
  8918. //>>excludeEnd("ctx");
  8919. return $recv(self._selectedCategories())._includes_($recv(each)._category());
  8920. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8921. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  8922. //>>excludeEnd("ctx");
  8923. })))._sort_((function(a,b){
  8924. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8925. return $core.withContext(function($ctx2) {
  8926. //>>excludeEnd("ctx");
  8927. $1=$recv(a)._name();
  8928. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8929. $ctx2.sendIdx["name"]=1;
  8930. //>>excludeEnd("ctx");
  8931. return $recv($1).__gt($recv(b)._name());
  8932. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8933. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)});
  8934. //>>excludeEnd("ctx");
  8935. }));
  8936. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8937. }, function($ctx1) {$ctx1.fill(self,"classes",{},$globals.TestRunner)});
  8938. //>>excludeEnd("ctx");
  8939. },
  8940. //>>excludeStart("ide", pragmas.excludeIdeData);
  8941. args: [],
  8942. source: "classes\x0a\x09^ (self allClasses\x0a\x09select: [ :each | self selectedCategories includes: each category ])\x0a\x09sort: [ :a :b | a name > b name ]",
  8943. referencedClasses: [],
  8944. //>>excludeEnd("ide");
  8945. messageSends: ["sort:", "select:", "allClasses", "includes:", "selectedCategories", "category", ">", "name"]
  8946. }),
  8947. $globals.TestRunner);
  8948. $core.addMethod(
  8949. $core.method({
  8950. selector: "initialize",
  8951. protocol: 'initialization',
  8952. fn: function (){
  8953. var self=this;
  8954. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8955. return $core.withContext(function($ctx1) {
  8956. //>>excludeEnd("ctx");
  8957. (
  8958. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8959. $ctx1.supercall = true,
  8960. //>>excludeEnd("ctx");
  8961. ($globals.TestRunner.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
  8962. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8963. $ctx1.supercall = false;
  8964. //>>excludeEnd("ctx");;
  8965. self["@result"]=$recv($globals.TestResult)._new();
  8966. return self;
  8967. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8968. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.TestRunner)});
  8969. //>>excludeEnd("ctx");
  8970. },
  8971. //>>excludeStart("ide", pragmas.excludeIdeData);
  8972. args: [],
  8973. source: "initialize\x0a\x09super initialize.\x0a\x09result := TestResult new",
  8974. referencedClasses: ["TestResult"],
  8975. //>>excludeEnd("ide");
  8976. messageSends: ["initialize", "new"]
  8977. }),
  8978. $globals.TestRunner);
  8979. $core.addMethod(
  8980. $core.method({
  8981. selector: "isSelectedCategory:",
  8982. protocol: 'testing',
  8983. fn: function (aCategory){
  8984. var self=this;
  8985. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8986. return $core.withContext(function($ctx1) {
  8987. //>>excludeEnd("ctx");
  8988. return $recv(self._selectedCategories())._includes_(aCategory);
  8989. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8990. }, function($ctx1) {$ctx1.fill(self,"isSelectedCategory:",{aCategory:aCategory},$globals.TestRunner)});
  8991. //>>excludeEnd("ctx");
  8992. },
  8993. //>>excludeStart("ide", pragmas.excludeIdeData);
  8994. args: ["aCategory"],
  8995. source: "isSelectedCategory: aCategory\x0a\x09^ (self selectedCategories includes: aCategory)",
  8996. referencedClasses: [],
  8997. //>>excludeEnd("ide");
  8998. messageSends: ["includes:", "selectedCategories"]
  8999. }),
  9000. $globals.TestRunner);
  9001. $core.addMethod(
  9002. $core.method({
  9003. selector: "isSelectedClass:",
  9004. protocol: 'testing',
  9005. fn: function (aClass){
  9006. var self=this;
  9007. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9008. return $core.withContext(function($ctx1) {
  9009. //>>excludeEnd("ctx");
  9010. return $recv(self._selectedClasses())._includes_(aClass);
  9011. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9012. }, function($ctx1) {$ctx1.fill(self,"isSelectedClass:",{aClass:aClass},$globals.TestRunner)});
  9013. //>>excludeEnd("ctx");
  9014. },
  9015. //>>excludeStart("ide", pragmas.excludeIdeData);
  9016. args: ["aClass"],
  9017. source: "isSelectedClass: aClass\x0a\x09^ (self selectedClasses includes: aClass)",
  9018. referencedClasses: [],
  9019. //>>excludeEnd("ide");
  9020. messageSends: ["includes:", "selectedClasses"]
  9021. }),
  9022. $globals.TestRunner);
  9023. $core.addMethod(
  9024. $core.method({
  9025. selector: "label",
  9026. protocol: 'accessing',
  9027. fn: function (){
  9028. var self=this;
  9029. return "SUnit";
  9030. },
  9031. //>>excludeStart("ide", pragmas.excludeIdeData);
  9032. args: [],
  9033. source: "label\x0a\x09^ 'SUnit'",
  9034. referencedClasses: [],
  9035. //>>excludeEnd("ide");
  9036. messageSends: []
  9037. }),
  9038. $globals.TestRunner);
  9039. $core.addMethod(
  9040. $core.method({
  9041. selector: "packages",
  9042. protocol: 'accessing',
  9043. fn: function (){
  9044. var self=this;
  9045. var packages;
  9046. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9047. return $core.withContext(function($ctx1) {
  9048. //>>excludeEnd("ctx");
  9049. var $2,$3,$1;
  9050. packages=$recv($globals.Array)._new();
  9051. $recv(self._allClasses())._do_((function(each){
  9052. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9053. return $core.withContext(function($ctx2) {
  9054. //>>excludeEnd("ctx");
  9055. $2=packages;
  9056. $3=$recv(each)._category();
  9057. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9058. $ctx2.sendIdx["category"]=1;
  9059. //>>excludeEnd("ctx");
  9060. $1=$recv($2)._includes_($3);
  9061. if(!$core.assert($1)){
  9062. return $recv(packages)._add_($recv(each)._category());
  9063. };
  9064. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9065. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9066. //>>excludeEnd("ctx");
  9067. }));
  9068. return $recv(packages)._sort();
  9069. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9070. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},$globals.TestRunner)});
  9071. //>>excludeEnd("ctx");
  9072. },
  9073. //>>excludeStart("ide", pragmas.excludeIdeData);
  9074. args: [],
  9075. source: "packages\x0a\x09| packages |\x0a\x09packages := Array new.\x0a\x09self allClasses do: [ :each |\x0a\x09(packages includes: each category) ifFalse: [\x0a\x09\x09packages add: each category ]].\x0a\x09^ packages sort",
  9076. referencedClasses: ["Array"],
  9077. //>>excludeEnd("ide");
  9078. messageSends: ["new", "do:", "allClasses", "ifFalse:", "includes:", "category", "add:", "sort"]
  9079. }),
  9080. $globals.TestRunner);
  9081. $core.addMethod(
  9082. $core.method({
  9083. selector: "performFailure:",
  9084. protocol: 'actions',
  9085. fn: function (aTestCase){
  9086. var self=this;
  9087. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9088. return $core.withContext(function($ctx1) {
  9089. //>>excludeEnd("ctx");
  9090. $recv(aTestCase)._runCase();
  9091. return self;
  9092. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9093. }, function($ctx1) {$ctx1.fill(self,"performFailure:",{aTestCase:aTestCase},$globals.TestRunner)});
  9094. //>>excludeEnd("ctx");
  9095. },
  9096. //>>excludeStart("ide", pragmas.excludeIdeData);
  9097. args: ["aTestCase"],
  9098. source: "performFailure: aTestCase\x0a\x09aTestCase runCase",
  9099. referencedClasses: [],
  9100. //>>excludeEnd("ide");
  9101. messageSends: ["runCase"]
  9102. }),
  9103. $globals.TestRunner);
  9104. $core.addMethod(
  9105. $core.method({
  9106. selector: "printErrors",
  9107. protocol: 'printing',
  9108. fn: function (){
  9109. var self=this;
  9110. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9111. return $core.withContext(function($ctx1) {
  9112. //>>excludeEnd("ctx");
  9113. return $recv($recv($recv($recv(self._result())._errors())._size())._asString()).__comma(" errors, ");
  9114. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9115. }, function($ctx1) {$ctx1.fill(self,"printErrors",{},$globals.TestRunner)});
  9116. //>>excludeEnd("ctx");
  9117. },
  9118. //>>excludeStart("ide", pragmas.excludeIdeData);
  9119. args: [],
  9120. source: "printErrors\x0a\x09^ self result errors size asString , ' errors, '",
  9121. referencedClasses: [],
  9122. //>>excludeEnd("ide");
  9123. messageSends: [",", "asString", "size", "errors", "result"]
  9124. }),
  9125. $globals.TestRunner);
  9126. $core.addMethod(
  9127. $core.method({
  9128. selector: "printFailures",
  9129. protocol: 'printing',
  9130. fn: function (){
  9131. var self=this;
  9132. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9133. return $core.withContext(function($ctx1) {
  9134. //>>excludeEnd("ctx");
  9135. return $recv($recv($recv($recv(self._result())._failures())._size())._asString()).__comma(" failures");
  9136. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9137. }, function($ctx1) {$ctx1.fill(self,"printFailures",{},$globals.TestRunner)});
  9138. //>>excludeEnd("ctx");
  9139. },
  9140. //>>excludeStart("ide", pragmas.excludeIdeData);
  9141. args: [],
  9142. source: "printFailures\x0a\x09^ self result failures size asString, ' failures'",
  9143. referencedClasses: [],
  9144. //>>excludeEnd("ide");
  9145. messageSends: [",", "asString", "size", "failures", "result"]
  9146. }),
  9147. $globals.TestRunner);
  9148. $core.addMethod(
  9149. $core.method({
  9150. selector: "printPasses",
  9151. protocol: 'printing',
  9152. fn: function (){
  9153. var self=this;
  9154. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9155. return $core.withContext(function($ctx1) {
  9156. //>>excludeEnd("ctx");
  9157. var $5,$4,$8,$7,$6,$3,$2,$1;
  9158. $5=self._result();
  9159. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9160. $ctx1.sendIdx["result"]=1;
  9161. //>>excludeEnd("ctx");
  9162. $4=$recv($5)._runs();
  9163. $8=self._result();
  9164. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9165. $ctx1.sendIdx["result"]=2;
  9166. //>>excludeEnd("ctx");
  9167. $7=$recv($8)._errors();
  9168. $6=$recv($7)._size();
  9169. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9170. $ctx1.sendIdx["size"]=1;
  9171. //>>excludeEnd("ctx");
  9172. $3=$recv($4).__minus($6);
  9173. $2=$recv($3).__minus($recv($recv(self._result())._failures())._size());
  9174. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9175. $ctx1.sendIdx["-"]=1;
  9176. //>>excludeEnd("ctx");
  9177. $1=$recv($2)._asString();
  9178. return $recv($1).__comma(" passes, ");
  9179. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9180. }, function($ctx1) {$ctx1.fill(self,"printPasses",{},$globals.TestRunner)});
  9181. //>>excludeEnd("ctx");
  9182. },
  9183. //>>excludeStart("ide", pragmas.excludeIdeData);
  9184. args: [],
  9185. source: "printPasses\x0a\x09^ (self result runs - self result errors size - self result failures size) asString , ' passes, '",
  9186. referencedClasses: [],
  9187. //>>excludeEnd("ide");
  9188. messageSends: [",", "asString", "-", "runs", "result", "size", "errors", "failures"]
  9189. }),
  9190. $globals.TestRunner);
  9191. $core.addMethod(
  9192. $core.method({
  9193. selector: "printTotal",
  9194. protocol: 'printing',
  9195. fn: function (){
  9196. var self=this;
  9197. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9198. return $core.withContext(function($ctx1) {
  9199. //>>excludeEnd("ctx");
  9200. return $recv($recv($recv(self._result())._total())._asString()).__comma(" runs, ");
  9201. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9202. }, function($ctx1) {$ctx1.fill(self,"printTotal",{},$globals.TestRunner)});
  9203. //>>excludeEnd("ctx");
  9204. },
  9205. //>>excludeStart("ide", pragmas.excludeIdeData);
  9206. args: [],
  9207. source: "printTotal\x0a\x09^ self result total asString, ' runs, '",
  9208. referencedClasses: [],
  9209. //>>excludeEnd("ide");
  9210. messageSends: [",", "asString", "total", "result"]
  9211. }),
  9212. $globals.TestRunner);
  9213. $core.addMethod(
  9214. $core.method({
  9215. selector: "progressBar",
  9216. protocol: 'accessing',
  9217. fn: function (){
  9218. var self=this;
  9219. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9220. return $core.withContext(function($ctx1) {
  9221. //>>excludeEnd("ctx");
  9222. var $1,$receiver;
  9223. $1=self["@progressBar"];
  9224. if(($receiver = $1) == null || $receiver.isNil){
  9225. self["@progressBar"]=$recv($globals.ProgressBar)._new();
  9226. return self["@progressBar"];
  9227. } else {
  9228. return $1;
  9229. };
  9230. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9231. }, function($ctx1) {$ctx1.fill(self,"progressBar",{},$globals.TestRunner)});
  9232. //>>excludeEnd("ctx");
  9233. },
  9234. //>>excludeStart("ide", pragmas.excludeIdeData);
  9235. args: [],
  9236. source: "progressBar\x0a\x09^ progressBar ifNil: [ progressBar := ProgressBar new ]",
  9237. referencedClasses: ["ProgressBar"],
  9238. //>>excludeEnd("ide");
  9239. messageSends: ["ifNil:", "new"]
  9240. }),
  9241. $globals.TestRunner);
  9242. $core.addMethod(
  9243. $core.method({
  9244. selector: "renderBoxOn:",
  9245. protocol: 'rendering',
  9246. fn: function (html){
  9247. var self=this;
  9248. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9249. return $core.withContext(function($ctx1) {
  9250. //>>excludeEnd("ctx");
  9251. self._renderCategoriesOn_(html);
  9252. self._renderClassesOn_(html);
  9253. self._renderResultsOn_(html);
  9254. return self;
  9255. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9256. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.TestRunner)});
  9257. //>>excludeEnd("ctx");
  9258. },
  9259. //>>excludeStart("ide", pragmas.excludeIdeData);
  9260. args: ["html"],
  9261. source: "renderBoxOn: html\x0a\x09self\x0a\x09renderCategoriesOn: html;\x0a\x09renderClassesOn: html;\x0a\x09renderResultsOn: html",
  9262. referencedClasses: [],
  9263. //>>excludeEnd("ide");
  9264. messageSends: ["renderCategoriesOn:", "renderClassesOn:", "renderResultsOn:"]
  9265. }),
  9266. $globals.TestRunner);
  9267. $core.addMethod(
  9268. $core.method({
  9269. selector: "renderButtonsOn:",
  9270. protocol: 'rendering',
  9271. fn: function (html){
  9272. var self=this;
  9273. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9274. return $core.withContext(function($ctx1) {
  9275. //>>excludeEnd("ctx");
  9276. var $1;
  9277. $1=$recv(html)._button();
  9278. $recv($1)._with_("Run selected");
  9279. $recv($1)._onClick_((function(){
  9280. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9281. return $core.withContext(function($ctx2) {
  9282. //>>excludeEnd("ctx");
  9283. return self._run_(self._testCases());
  9284. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9285. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9286. //>>excludeEnd("ctx");
  9287. }));
  9288. return self;
  9289. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9290. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.TestRunner)});
  9291. //>>excludeEnd("ctx");
  9292. },
  9293. //>>excludeStart("ide", pragmas.excludeIdeData);
  9294. args: ["html"],
  9295. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Run selected';\x0a\x09onClick: [ self run: self testCases ]",
  9296. referencedClasses: [],
  9297. //>>excludeEnd("ide");
  9298. messageSends: ["with:", "button", "onClick:", "run:", "testCases"]
  9299. }),
  9300. $globals.TestRunner);
  9301. $core.addMethod(
  9302. $core.method({
  9303. selector: "renderCategoriesOn:",
  9304. protocol: 'rendering',
  9305. fn: function (html){
  9306. var self=this;
  9307. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9308. return $core.withContext(function($ctx1) {
  9309. //>>excludeEnd("ctx");
  9310. self["@packagesList"]=$recv($recv(html)._ul())._class_("amber_column sunit packages");
  9311. self._updateCategoriesList();
  9312. return self;
  9313. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9314. }, function($ctx1) {$ctx1.fill(self,"renderCategoriesOn:",{html:html},$globals.TestRunner)});
  9315. //>>excludeEnd("ctx");
  9316. },
  9317. //>>excludeStart("ide", pragmas.excludeIdeData);
  9318. args: ["html"],
  9319. source: "renderCategoriesOn: html\x0a\x09packagesList := html ul class: 'amber_column sunit packages'.\x0a\x09self updateCategoriesList",
  9320. referencedClasses: [],
  9321. //>>excludeEnd("ide");
  9322. messageSends: ["class:", "ul", "updateCategoriesList"]
  9323. }),
  9324. $globals.TestRunner);
  9325. $core.addMethod(
  9326. $core.method({
  9327. selector: "renderClassesOn:",
  9328. protocol: 'rendering',
  9329. fn: function (html){
  9330. var self=this;
  9331. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9332. return $core.withContext(function($ctx1) {
  9333. //>>excludeEnd("ctx");
  9334. self["@classesList"]=$recv($recv(html)._ul())._class_("amber_column sunit classes");
  9335. self._updateClassesList();
  9336. return self;
  9337. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9338. }, function($ctx1) {$ctx1.fill(self,"renderClassesOn:",{html:html},$globals.TestRunner)});
  9339. //>>excludeEnd("ctx");
  9340. },
  9341. //>>excludeStart("ide", pragmas.excludeIdeData);
  9342. args: ["html"],
  9343. source: "renderClassesOn: html\x0a\x09classesList := html ul class: 'amber_column sunit classes'.\x0a\x09self updateClassesList",
  9344. referencedClasses: [],
  9345. //>>excludeEnd("ide");
  9346. messageSends: ["class:", "ul", "updateClassesList"]
  9347. }),
  9348. $globals.TestRunner);
  9349. $core.addMethod(
  9350. $core.method({
  9351. selector: "renderErrorsOn:",
  9352. protocol: 'rendering',
  9353. fn: function (html){
  9354. var self=this;
  9355. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9356. return $core.withContext(function($ctx1) {
  9357. //>>excludeEnd("ctx");
  9358. var $1,$2;
  9359. $recv($recv(self._result())._errors())._do_((function(each){
  9360. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9361. return $core.withContext(function($ctx2) {
  9362. //>>excludeEnd("ctx");
  9363. $1=$recv(html)._li();
  9364. $recv($1)._class_("errors");
  9365. $2=$recv($recv($recv($recv(each)._class())._name()).__comma(" >> ")).__comma($recv(each)._selector());
  9366. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9367. $ctx2.sendIdx[","]=1;
  9368. //>>excludeEnd("ctx");
  9369. $recv($1)._with_($2);
  9370. return $recv($1)._onClick_((function(){
  9371. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9372. return $core.withContext(function($ctx3) {
  9373. //>>excludeEnd("ctx");
  9374. return self._performFailure_(each);
  9375. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9376. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9377. //>>excludeEnd("ctx");
  9378. }));
  9379. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9380. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9381. //>>excludeEnd("ctx");
  9382. }));
  9383. return self;
  9384. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9385. }, function($ctx1) {$ctx1.fill(self,"renderErrorsOn:",{html:html},$globals.TestRunner)});
  9386. //>>excludeEnd("ctx");
  9387. },
  9388. //>>excludeStart("ide", pragmas.excludeIdeData);
  9389. args: ["html"],
  9390. source: "renderErrorsOn: html\x0a\x09self result errors do: [ :each |\x0a\x09\x09html li\x0a\x09\x09\x09class: 'errors';\x0a\x09\x09\x09with: each class name, ' >> ', each selector;\x0a\x09\x09\x09\x09\x09\x09onClick: [ self performFailure: each ]]",
  9391. referencedClasses: [],
  9392. //>>excludeEnd("ide");
  9393. messageSends: ["do:", "errors", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"]
  9394. }),
  9395. $globals.TestRunner);
  9396. $core.addMethod(
  9397. $core.method({
  9398. selector: "renderFailuresOn:",
  9399. protocol: 'rendering',
  9400. fn: function (html){
  9401. var self=this;
  9402. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9403. return $core.withContext(function($ctx1) {
  9404. //>>excludeEnd("ctx");
  9405. var $1,$2;
  9406. $recv($recv(self._result())._failures())._do_((function(each){
  9407. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9408. return $core.withContext(function($ctx2) {
  9409. //>>excludeEnd("ctx");
  9410. $1=$recv(html)._li();
  9411. $recv($1)._class_("failures");
  9412. $2=$recv($recv($recv($recv(each)._class())._name()).__comma(" >> ")).__comma($recv(each)._selector());
  9413. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9414. $ctx2.sendIdx[","]=1;
  9415. //>>excludeEnd("ctx");
  9416. $recv($1)._with_($2);
  9417. return $recv($1)._onClick_((function(){
  9418. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9419. return $core.withContext(function($ctx3) {
  9420. //>>excludeEnd("ctx");
  9421. return self._performFailure_(each);
  9422. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9423. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9424. //>>excludeEnd("ctx");
  9425. }));
  9426. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9427. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9428. //>>excludeEnd("ctx");
  9429. }));
  9430. return self;
  9431. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9432. }, function($ctx1) {$ctx1.fill(self,"renderFailuresOn:",{html:html},$globals.TestRunner)});
  9433. //>>excludeEnd("ctx");
  9434. },
  9435. //>>excludeStart("ide", pragmas.excludeIdeData);
  9436. args: ["html"],
  9437. source: "renderFailuresOn: html\x0a\x09self result failures do: [ :each |\x0a\x09\x09html li\x0a\x09\x09\x09class: 'failures';\x0a\x09\x09\x09with: each class name, ' >> ', each selector;\x0a\x09\x09\x09\x09\x09\x09onClick: [ self performFailure: each ]]",
  9438. referencedClasses: [],
  9439. //>>excludeEnd("ide");
  9440. messageSends: ["do:", "failures", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"]
  9441. }),
  9442. $globals.TestRunner);
  9443. $core.addMethod(
  9444. $core.method({
  9445. selector: "renderResultsOn:",
  9446. protocol: 'rendering',
  9447. fn: function (html){
  9448. var self=this;
  9449. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9450. return $core.withContext(function($ctx1) {
  9451. //>>excludeEnd("ctx");
  9452. self["@statusDiv"]=$recv(html)._div();
  9453. $recv(html)._with_(self._progressBar());
  9454. self["@methodsList"]=$recv($recv(html)._ul())._class_("amber_column sunit results");
  9455. self._updateMethodsList();
  9456. self._updateStatusDiv();
  9457. return self;
  9458. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9459. }, function($ctx1) {$ctx1.fill(self,"renderResultsOn:",{html:html},$globals.TestRunner)});
  9460. //>>excludeEnd("ctx");
  9461. },
  9462. //>>excludeStart("ide", pragmas.excludeIdeData);
  9463. args: ["html"],
  9464. source: "renderResultsOn: html\x0a\x09statusDiv := html div.\x0a\x09html with: self progressBar.\x0a\x09methodsList := html ul class: 'amber_column sunit results'.\x0a\x09self updateMethodsList.\x0a\x09self updateStatusDiv",
  9465. referencedClasses: [],
  9466. //>>excludeEnd("ide");
  9467. messageSends: ["div", "with:", "progressBar", "class:", "ul", "updateMethodsList", "updateStatusDiv"]
  9468. }),
  9469. $globals.TestRunner);
  9470. $core.addMethod(
  9471. $core.method({
  9472. selector: "result",
  9473. protocol: 'accessing',
  9474. fn: function (){
  9475. var self=this;
  9476. return self["@result"];
  9477. },
  9478. //>>excludeStart("ide", pragmas.excludeIdeData);
  9479. args: [],
  9480. source: "result\x0a\x09^ result",
  9481. referencedClasses: [],
  9482. //>>excludeEnd("ide");
  9483. messageSends: []
  9484. }),
  9485. $globals.TestRunner);
  9486. $core.addMethod(
  9487. $core.method({
  9488. selector: "run:",
  9489. protocol: 'actions',
  9490. fn: function (aCollection){
  9491. var self=this;
  9492. var worker;
  9493. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9494. return $core.withContext(function($ctx1) {
  9495. //>>excludeEnd("ctx");
  9496. var $1;
  9497. worker=$recv($globals.TestSuiteRunner)._on_(aCollection);
  9498. self["@result"]=$recv(worker)._result();
  9499. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9500. $ctx1.sendIdx["result"]=1;
  9501. //>>excludeEnd("ctx");
  9502. $recv($recv(worker)._announcer())._on_do_($globals.ResultAnnouncement,(function(ann){
  9503. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9504. return $core.withContext(function($ctx2) {
  9505. //>>excludeEnd("ctx");
  9506. $1=$recv($recv(ann)._result()).__eq_eq(self["@result"]);
  9507. if($core.assert($1)){
  9508. $recv(self._progressBar())._updatePercent_($recv($recv($recv(self["@result"])._runs()).__slash($recv(self["@result"])._total())).__star((100)));
  9509. self._updateStatusDiv();
  9510. return self._updateMethodsList();
  9511. };
  9512. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9513. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,1)});
  9514. //>>excludeEnd("ctx");
  9515. }));
  9516. $recv(worker)._run();
  9517. return self;
  9518. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9519. }, function($ctx1) {$ctx1.fill(self,"run:",{aCollection:aCollection,worker:worker},$globals.TestRunner)});
  9520. //>>excludeEnd("ctx");
  9521. },
  9522. //>>excludeStart("ide", pragmas.excludeIdeData);
  9523. args: ["aCollection"],
  9524. source: "run: aCollection\x0a| worker |\x0a\x09worker := TestSuiteRunner on: aCollection.\x0a\x09result := worker result.\x0a\x09worker announcer on: ResultAnnouncement do: [ :ann |\x0a\x09\x09ann result == result ifTrue: [\x0a\x09\x09\x09self progressBar updatePercent: result runs / result total * 100.\x0a\x09\x09\x09self updateStatusDiv.\x0a\x09\x09\x09self updateMethodsList\x0a\x09\x09]\x0a\x09].\x0a\x09worker run",
  9525. referencedClasses: ["TestSuiteRunner", "ResultAnnouncement"],
  9526. //>>excludeEnd("ide");
  9527. messageSends: ["on:", "result", "on:do:", "announcer", "ifTrue:", "==", "updatePercent:", "progressBar", "*", "/", "runs", "total", "updateStatusDiv", "updateMethodsList", "run"]
  9528. }),
  9529. $globals.TestRunner);
  9530. $core.addMethod(
  9531. $core.method({
  9532. selector: "selectAllCategories",
  9533. protocol: 'actions',
  9534. fn: function (){
  9535. var self=this;
  9536. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9537. return $core.withContext(function($ctx1) {
  9538. //>>excludeEnd("ctx");
  9539. var $1;
  9540. $recv(self._packages())._do_((function(each){
  9541. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9542. return $core.withContext(function($ctx2) {
  9543. //>>excludeEnd("ctx");
  9544. $1=$recv(self["@selectedCategories"])._includes_(each);
  9545. if(!$core.assert($1)){
  9546. return $recv(self._selectedCategories())._add_(each);
  9547. };
  9548. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9549. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9550. //>>excludeEnd("ctx");
  9551. }));
  9552. self._updateCategoriesList();
  9553. self._updateClassesList();
  9554. return self;
  9555. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9556. }, function($ctx1) {$ctx1.fill(self,"selectAllCategories",{},$globals.TestRunner)});
  9557. //>>excludeEnd("ctx");
  9558. },
  9559. //>>excludeStart("ide", pragmas.excludeIdeData);
  9560. args: [],
  9561. source: "selectAllCategories\x0a\x09self packages do: [ :each |\x0a\x09\x09(selectedCategories includes: each) ifFalse: [\x0a\x09\x09\x09self selectedCategories add: each ]].\x0a\x09self\x0a\x09\x09updateCategoriesList;\x0a\x09\x09updateClassesList",
  9562. referencedClasses: [],
  9563. //>>excludeEnd("ide");
  9564. messageSends: ["do:", "packages", "ifFalse:", "includes:", "add:", "selectedCategories", "updateCategoriesList", "updateClassesList"]
  9565. }),
  9566. $globals.TestRunner);
  9567. $core.addMethod(
  9568. $core.method({
  9569. selector: "selectAllClasses",
  9570. protocol: 'actions',
  9571. fn: function (){
  9572. var self=this;
  9573. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9574. return $core.withContext(function($ctx1) {
  9575. //>>excludeEnd("ctx");
  9576. var $1;
  9577. $recv(self._classes())._do_((function(each){
  9578. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9579. return $core.withContext(function($ctx2) {
  9580. //>>excludeEnd("ctx");
  9581. $1=$recv(self["@selectedClasses"])._includes_(each);
  9582. if(!$core.assert($1)){
  9583. return $recv(self._selectedClasses())._add_(each);
  9584. };
  9585. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9586. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9587. //>>excludeEnd("ctx");
  9588. }));
  9589. self._updateCategoriesList();
  9590. self._updateClassesList();
  9591. return self;
  9592. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9593. }, function($ctx1) {$ctx1.fill(self,"selectAllClasses",{},$globals.TestRunner)});
  9594. //>>excludeEnd("ctx");
  9595. },
  9596. //>>excludeStart("ide", pragmas.excludeIdeData);
  9597. args: [],
  9598. source: "selectAllClasses\x0a\x09self classes do: [ :each |\x0a\x09\x09(selectedClasses includes: each) ifFalse: [\x0a\x09\x09\x09self selectedClasses add: each ]].\x0a\x09self\x0a\x09\x09updateCategoriesList;\x0a\x09\x09updateClassesList",
  9599. referencedClasses: [],
  9600. //>>excludeEnd("ide");
  9601. messageSends: ["do:", "classes", "ifFalse:", "includes:", "add:", "selectedClasses", "updateCategoriesList", "updateClassesList"]
  9602. }),
  9603. $globals.TestRunner);
  9604. $core.addMethod(
  9605. $core.method({
  9606. selector: "selectedCategories",
  9607. protocol: 'accessing',
  9608. fn: function (){
  9609. var self=this;
  9610. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9611. return $core.withContext(function($ctx1) {
  9612. //>>excludeEnd("ctx");
  9613. var $1,$receiver;
  9614. $1=self["@selectedCategories"];
  9615. if(($receiver = $1) == null || $receiver.isNil){
  9616. self["@selectedCategories"]=$recv($globals.Array)._new();
  9617. return self["@selectedCategories"];
  9618. } else {
  9619. return $1;
  9620. };
  9621. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9622. }, function($ctx1) {$ctx1.fill(self,"selectedCategories",{},$globals.TestRunner)});
  9623. //>>excludeEnd("ctx");
  9624. },
  9625. //>>excludeStart("ide", pragmas.excludeIdeData);
  9626. args: [],
  9627. source: "selectedCategories\x0a\x09^ selectedCategories ifNil: [ selectedCategories := Array new ]",
  9628. referencedClasses: ["Array"],
  9629. //>>excludeEnd("ide");
  9630. messageSends: ["ifNil:", "new"]
  9631. }),
  9632. $globals.TestRunner);
  9633. $core.addMethod(
  9634. $core.method({
  9635. selector: "selectedClasses",
  9636. protocol: 'accessing',
  9637. fn: function (){
  9638. var self=this;
  9639. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9640. return $core.withContext(function($ctx1) {
  9641. //>>excludeEnd("ctx");
  9642. var $1,$receiver;
  9643. $1=self["@selectedClasses"];
  9644. if(($receiver = $1) == null || $receiver.isNil){
  9645. self["@selectedClasses"]=$recv($globals.Array)._new();
  9646. return self["@selectedClasses"];
  9647. } else {
  9648. return $1;
  9649. };
  9650. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9651. }, function($ctx1) {$ctx1.fill(self,"selectedClasses",{},$globals.TestRunner)});
  9652. //>>excludeEnd("ctx");
  9653. },
  9654. //>>excludeStart("ide", pragmas.excludeIdeData);
  9655. args: [],
  9656. source: "selectedClasses\x0a\x09^ selectedClasses ifNil: [ selectedClasses := Array new ]",
  9657. referencedClasses: ["Array"],
  9658. //>>excludeEnd("ide");
  9659. messageSends: ["ifNil:", "new"]
  9660. }),
  9661. $globals.TestRunner);
  9662. $core.addMethod(
  9663. $core.method({
  9664. selector: "statusInfo",
  9665. protocol: 'accessing',
  9666. fn: function (){
  9667. var self=this;
  9668. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9669. return $core.withContext(function($ctx1) {
  9670. //>>excludeEnd("ctx");
  9671. var $2,$1;
  9672. $2=$recv($recv(self._printTotal()).__comma(self._printPasses())).__comma(self._printErrors());
  9673. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9674. $ctx1.sendIdx[","]=2;
  9675. //>>excludeEnd("ctx");
  9676. $1=$recv($2).__comma(self._printFailures());
  9677. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9678. $ctx1.sendIdx[","]=1;
  9679. //>>excludeEnd("ctx");
  9680. return $1;
  9681. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9682. }, function($ctx1) {$ctx1.fill(self,"statusInfo",{},$globals.TestRunner)});
  9683. //>>excludeEnd("ctx");
  9684. },
  9685. //>>excludeStart("ide", pragmas.excludeIdeData);
  9686. args: [],
  9687. source: "statusInfo\x0a\x09^ self printTotal, self printPasses, self printErrors, self printFailures",
  9688. referencedClasses: [],
  9689. //>>excludeEnd("ide");
  9690. messageSends: [",", "printTotal", "printPasses", "printErrors", "printFailures"]
  9691. }),
  9692. $globals.TestRunner);
  9693. $core.addMethod(
  9694. $core.method({
  9695. selector: "testCases",
  9696. protocol: 'accessing',
  9697. fn: function (){
  9698. var self=this;
  9699. var testCases;
  9700. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9701. return $core.withContext(function($ctx1) {
  9702. //>>excludeEnd("ctx");
  9703. testCases=[];
  9704. $recv($recv(self._selectedClasses())._select_((function(each){
  9705. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9706. return $core.withContext(function($ctx2) {
  9707. //>>excludeEnd("ctx");
  9708. return $recv(self._selectedCategories())._includes_($recv(each)._category());
  9709. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9710. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9711. //>>excludeEnd("ctx");
  9712. })))._do_((function(each){
  9713. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9714. return $core.withContext(function($ctx2) {
  9715. //>>excludeEnd("ctx");
  9716. return $recv(testCases)._addAll_($recv(each)._buildSuite());
  9717. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9718. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  9719. //>>excludeEnd("ctx");
  9720. }));
  9721. return testCases;
  9722. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9723. }, function($ctx1) {$ctx1.fill(self,"testCases",{testCases:testCases},$globals.TestRunner)});
  9724. //>>excludeEnd("ctx");
  9725. },
  9726. //>>excludeStart("ide", pragmas.excludeIdeData);
  9727. args: [],
  9728. source: "testCases\x0a\x09| testCases |\x0a\x09testCases := #().\x0a\x09(self selectedClasses\x0a\x09\x09select: [ :each | self selectedCategories includes: each category ])\x0a\x09\x09do: [ :each | testCases addAll: each buildSuite ].\x0a\x09^ testCases",
  9729. referencedClasses: [],
  9730. //>>excludeEnd("ide");
  9731. messageSends: ["do:", "select:", "selectedClasses", "includes:", "selectedCategories", "category", "addAll:", "buildSuite"]
  9732. }),
  9733. $globals.TestRunner);
  9734. $core.addMethod(
  9735. $core.method({
  9736. selector: "toggleCategory:",
  9737. protocol: 'actions',
  9738. fn: function (aCategory){
  9739. var self=this;
  9740. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9741. return $core.withContext(function($ctx1) {
  9742. //>>excludeEnd("ctx");
  9743. var $1;
  9744. $1=self._isSelectedCategory_(aCategory);
  9745. if($core.assert($1)){
  9746. $recv(self["@selectedCategories"])._remove_(aCategory);
  9747. } else {
  9748. $recv(self["@selectedCategories"])._add_(aCategory);
  9749. };
  9750. self._updateCategoriesList();
  9751. self._updateClassesList();
  9752. return self;
  9753. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9754. }, function($ctx1) {$ctx1.fill(self,"toggleCategory:",{aCategory:aCategory},$globals.TestRunner)});
  9755. //>>excludeEnd("ctx");
  9756. },
  9757. //>>excludeStart("ide", pragmas.excludeIdeData);
  9758. args: ["aCategory"],
  9759. source: "toggleCategory: aCategory\x0a\x09(self isSelectedCategory: aCategory)\x0a\x09\x09ifFalse: [ selectedCategories add: aCategory ]\x0a\x09\x09ifTrue: [ selectedCategories remove: aCategory ].\x0a\x09self\x0a\x09\x09updateCategoriesList;\x0a\x09\x09updateClassesList",
  9760. referencedClasses: [],
  9761. //>>excludeEnd("ide");
  9762. messageSends: ["ifFalse:ifTrue:", "isSelectedCategory:", "add:", "remove:", "updateCategoriesList", "updateClassesList"]
  9763. }),
  9764. $globals.TestRunner);
  9765. $core.addMethod(
  9766. $core.method({
  9767. selector: "toggleClass:",
  9768. protocol: 'actions',
  9769. fn: function (aClass){
  9770. var self=this;
  9771. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9772. return $core.withContext(function($ctx1) {
  9773. //>>excludeEnd("ctx");
  9774. var $1;
  9775. $1=self._isSelectedClass_(aClass);
  9776. if($core.assert($1)){
  9777. $recv(self["@selectedClasses"])._remove_(aClass);
  9778. } else {
  9779. $recv(self["@selectedClasses"])._add_(aClass);
  9780. };
  9781. self._updateClassesList();
  9782. return self;
  9783. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9784. }, function($ctx1) {$ctx1.fill(self,"toggleClass:",{aClass:aClass},$globals.TestRunner)});
  9785. //>>excludeEnd("ctx");
  9786. },
  9787. //>>excludeStart("ide", pragmas.excludeIdeData);
  9788. args: ["aClass"],
  9789. source: "toggleClass: aClass\x0a\x09(self isSelectedClass: aClass)\x0a\x09\x09ifFalse: [ selectedClasses add: aClass ]\x0a\x09\x09ifTrue: [ selectedClasses remove: aClass ].\x0a\x09self\x0a\x09\x09updateClassesList",
  9790. referencedClasses: [],
  9791. //>>excludeEnd("ide");
  9792. messageSends: ["ifFalse:ifTrue:", "isSelectedClass:", "add:", "remove:", "updateClassesList"]
  9793. }),
  9794. $globals.TestRunner);
  9795. $core.addMethod(
  9796. $core.method({
  9797. selector: "updateCategoriesList",
  9798. protocol: 'updating',
  9799. fn: function (){
  9800. var self=this;
  9801. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9802. return $core.withContext(function($ctx1) {
  9803. //>>excludeEnd("ctx");
  9804. var $1,$2,$3,$4;
  9805. $recv(self["@packagesList"])._contents_((function(html){
  9806. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9807. return $core.withContext(function($ctx2) {
  9808. //>>excludeEnd("ctx");
  9809. $1=$recv(html)._li();
  9810. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9811. $ctx2.sendIdx["li"]=1;
  9812. //>>excludeEnd("ctx");
  9813. $recv($1)._class_("all");
  9814. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9815. $ctx2.sendIdx["class:"]=1;
  9816. //>>excludeEnd("ctx");
  9817. $recv($1)._with_("All");
  9818. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9819. $ctx2.sendIdx["with:"]=1;
  9820. //>>excludeEnd("ctx");
  9821. $2=$recv($1)._onClick_((function(){
  9822. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9823. return $core.withContext(function($ctx3) {
  9824. //>>excludeEnd("ctx");
  9825. return self._selectAllCategories();
  9826. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9827. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9828. //>>excludeEnd("ctx");
  9829. }));
  9830. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9831. $ctx2.sendIdx["onClick:"]=1;
  9832. //>>excludeEnd("ctx");
  9833. $2;
  9834. return $recv(self._packages())._do_((function(each){
  9835. var li;
  9836. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9837. return $core.withContext(function($ctx3) {
  9838. //>>excludeEnd("ctx");
  9839. li=$recv(html)._li();
  9840. li;
  9841. $3=$recv(self._selectedCategories())._includes_(each);
  9842. if($core.assert($3)){
  9843. $recv(li)._class_("selected");
  9844. };
  9845. $4=li;
  9846. $recv($4)._with_(each);
  9847. return $recv($4)._onClick_((function(){
  9848. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9849. return $core.withContext(function($ctx4) {
  9850. //>>excludeEnd("ctx");
  9851. return self._toggleCategory_(each);
  9852. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9853. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  9854. //>>excludeEnd("ctx");
  9855. }));
  9856. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9857. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,3)});
  9858. //>>excludeEnd("ctx");
  9859. }));
  9860. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9861. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  9862. //>>excludeEnd("ctx");
  9863. }));
  9864. return self;
  9865. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9866. }, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},$globals.TestRunner)});
  9867. //>>excludeEnd("ctx");
  9868. },
  9869. //>>excludeStart("ide", pragmas.excludeIdeData);
  9870. args: [],
  9871. source: "updateCategoriesList\x0a\x09packagesList contents: [ :html |\x0a\x09\x09html li\x0a\x09\x09class: 'all';\x0a\x09\x09with: 'All';\x0a\x09\x09onClick: [ self selectAllCategories ].\x0a\x09self packages do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09(self selectedCategories includes: each) ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09with: each;\x0a\x09\x09onClick: [ self toggleCategory: each ]] ]",
  9872. referencedClasses: [],
  9873. //>>excludeEnd("ide");
  9874. messageSends: ["contents:", "class:", "li", "with:", "onClick:", "selectAllCategories", "do:", "packages", "ifTrue:", "includes:", "selectedCategories", "toggleCategory:"]
  9875. }),
  9876. $globals.TestRunner);
  9877. $core.addMethod(
  9878. $core.method({
  9879. selector: "updateClassesList",
  9880. protocol: 'updating',
  9881. fn: function (){
  9882. var self=this;
  9883. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9884. return $core.withContext(function($ctx1) {
  9885. //>>excludeEnd("ctx");
  9886. var $1,$2,$3,$4;
  9887. $recv(self["@classesList"])._contents_((function(html){
  9888. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9889. return $core.withContext(function($ctx2) {
  9890. //>>excludeEnd("ctx");
  9891. $recv(self._selectedCategories())._ifNotEmpty_((function(){
  9892. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9893. return $core.withContext(function($ctx3) {
  9894. //>>excludeEnd("ctx");
  9895. $1=$recv(html)._li();
  9896. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9897. $ctx3.sendIdx["li"]=1;
  9898. //>>excludeEnd("ctx");
  9899. $recv($1)._class_("all");
  9900. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9901. $ctx3.sendIdx["class:"]=1;
  9902. //>>excludeEnd("ctx");
  9903. $recv($1)._with_("All");
  9904. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9905. $ctx3.sendIdx["with:"]=1;
  9906. //>>excludeEnd("ctx");
  9907. $2=$recv($1)._onClick_((function(){
  9908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9909. return $core.withContext(function($ctx4) {
  9910. //>>excludeEnd("ctx");
  9911. return self._selectAllClasses();
  9912. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9913. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  9914. //>>excludeEnd("ctx");
  9915. }));
  9916. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9917. $ctx3.sendIdx["onClick:"]=1;
  9918. //>>excludeEnd("ctx");
  9919. return $2;
  9920. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9921. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9922. //>>excludeEnd("ctx");
  9923. }));
  9924. return $recv(self._classes())._do_((function(each){
  9925. var li;
  9926. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9927. return $core.withContext(function($ctx3) {
  9928. //>>excludeEnd("ctx");
  9929. li=$recv(html)._li();
  9930. li;
  9931. $3=$recv(self._selectedClasses())._includes_(each);
  9932. if($core.assert($3)){
  9933. $recv(li)._class_("selected");
  9934. };
  9935. $4=li;
  9936. $recv($4)._with_($recv(each)._name());
  9937. return $recv($4)._onClick_((function(){
  9938. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9939. return $core.withContext(function($ctx4) {
  9940. //>>excludeEnd("ctx");
  9941. return self._toggleClass_(each);
  9942. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9943. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)});
  9944. //>>excludeEnd("ctx");
  9945. }));
  9946. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9947. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,4)});
  9948. //>>excludeEnd("ctx");
  9949. }));
  9950. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9951. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  9952. //>>excludeEnd("ctx");
  9953. }));
  9954. return self;
  9955. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9956. }, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},$globals.TestRunner)});
  9957. //>>excludeEnd("ctx");
  9958. },
  9959. //>>excludeStart("ide", pragmas.excludeIdeData);
  9960. args: [],
  9961. source: "updateClassesList\x0a\x09classesList contents: [ :html |\x0a\x09self selectedCategories ifNotEmpty: [\x0a\x09\x09html li\x0a\x09\x09\x09class: 'all';\x0a\x09\x09\x09with: 'All';\x0a\x09\x09\x09onClick: [ self selectAllClasses ]].\x0a\x09self classes do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09(self selectedClasses includes: each) ifTrue: [\x0a\x09\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09\x09with: each name;\x0a\x09\x09\x09onClick: [ self toggleClass: each ]] ]",
  9962. referencedClasses: [],
  9963. //>>excludeEnd("ide");
  9964. messageSends: ["contents:", "ifNotEmpty:", "selectedCategories", "class:", "li", "with:", "onClick:", "selectAllClasses", "do:", "classes", "ifTrue:", "includes:", "selectedClasses", "name", "toggleClass:"]
  9965. }),
  9966. $globals.TestRunner);
  9967. $core.addMethod(
  9968. $core.method({
  9969. selector: "updateMethodsList",
  9970. protocol: 'updating',
  9971. fn: function (){
  9972. var self=this;
  9973. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9974. return $core.withContext(function($ctx1) {
  9975. //>>excludeEnd("ctx");
  9976. $recv(self["@methodsList"])._contents_((function(html){
  9977. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9978. return $core.withContext(function($ctx2) {
  9979. //>>excludeEnd("ctx");
  9980. self._renderErrorsOn_(html);
  9981. return self._renderFailuresOn_(html);
  9982. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9983. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  9984. //>>excludeEnd("ctx");
  9985. }));
  9986. return self;
  9987. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9988. }, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},$globals.TestRunner)});
  9989. //>>excludeEnd("ctx");
  9990. },
  9991. //>>excludeStart("ide", pragmas.excludeIdeData);
  9992. args: [],
  9993. source: "updateMethodsList\x0a\x09methodsList contents: [ :html |\x0a\x09\x09self renderErrorsOn: html.\x0a\x09\x09\x09\x09self renderFailuresOn: html ]",
  9994. referencedClasses: [],
  9995. //>>excludeEnd("ide");
  9996. messageSends: ["contents:", "renderErrorsOn:", "renderFailuresOn:"]
  9997. }),
  9998. $globals.TestRunner);
  9999. $core.addMethod(
  10000. $core.method({
  10001. selector: "updateStatusDiv",
  10002. protocol: 'updating',
  10003. fn: function (){
  10004. var self=this;
  10005. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10006. return $core.withContext(function($ctx1) {
  10007. //>>excludeEnd("ctx");
  10008. $recv(self["@statusDiv"])._class_("sunit status ".__comma($recv(self["@result"])._status()));
  10009. $recv(self["@statusDiv"])._contents_((function(html){
  10010. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10011. return $core.withContext(function($ctx2) {
  10012. //>>excludeEnd("ctx");
  10013. return $recv($recv(html)._span())._with_(self._statusInfo());
  10014. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10015. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  10016. //>>excludeEnd("ctx");
  10017. }));
  10018. return self;
  10019. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10020. }, function($ctx1) {$ctx1.fill(self,"updateStatusDiv",{},$globals.TestRunner)});
  10021. //>>excludeEnd("ctx");
  10022. },
  10023. //>>excludeStart("ide", pragmas.excludeIdeData);
  10024. args: [],
  10025. source: "updateStatusDiv\x0a\x09statusDiv class: 'sunit status ', result status.\x0a\x09statusDiv contents: [ :html |\x0a\x09\x09html span with: self statusInfo ]",
  10026. referencedClasses: [],
  10027. //>>excludeEnd("ide");
  10028. messageSends: ["class:", ",", "status", "contents:", "with:", "span", "statusInfo"]
  10029. }),
  10030. $globals.TestRunner);
  10031. $core.addClass('Workspace', $globals.TabWidget, ['sourceArea'], 'IDE');
  10032. $core.addMethod(
  10033. $core.method({
  10034. selector: "clearWorkspace",
  10035. protocol: 'actions',
  10036. fn: function (){
  10037. var self=this;
  10038. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10039. return $core.withContext(function($ctx1) {
  10040. //>>excludeEnd("ctx");
  10041. $recv(self["@sourceArea"])._clear();
  10042. return self;
  10043. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10044. }, function($ctx1) {$ctx1.fill(self,"clearWorkspace",{},$globals.Workspace)});
  10045. //>>excludeEnd("ctx");
  10046. },
  10047. //>>excludeStart("ide", pragmas.excludeIdeData);
  10048. args: [],
  10049. source: "clearWorkspace\x0a\x09sourceArea clear",
  10050. referencedClasses: [],
  10051. //>>excludeEnd("ide");
  10052. messageSends: ["clear"]
  10053. }),
  10054. $globals.Workspace);
  10055. $core.addMethod(
  10056. $core.method({
  10057. selector: "doIt",
  10058. protocol: 'actions',
  10059. fn: function (){
  10060. var self=this;
  10061. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10062. return $core.withContext(function($ctx1) {
  10063. //>>excludeEnd("ctx");
  10064. $recv(self["@sourceArea"])._doIt();
  10065. return self;
  10066. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10067. }, function($ctx1) {$ctx1.fill(self,"doIt",{},$globals.Workspace)});
  10068. //>>excludeEnd("ctx");
  10069. },
  10070. //>>excludeStart("ide", pragmas.excludeIdeData);
  10071. args: [],
  10072. source: "doIt\x0a\x09sourceArea doIt",
  10073. referencedClasses: [],
  10074. //>>excludeEnd("ide");
  10075. messageSends: ["doIt"]
  10076. }),
  10077. $globals.Workspace);
  10078. $core.addMethod(
  10079. $core.method({
  10080. selector: "fileIn",
  10081. protocol: 'actions',
  10082. fn: function (){
  10083. var self=this;
  10084. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10085. return $core.withContext(function($ctx1) {
  10086. //>>excludeEnd("ctx");
  10087. $recv(self["@sourceArea"])._fileIn();
  10088. return self;
  10089. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10090. }, function($ctx1) {$ctx1.fill(self,"fileIn",{},$globals.Workspace)});
  10091. //>>excludeEnd("ctx");
  10092. },
  10093. //>>excludeStart("ide", pragmas.excludeIdeData);
  10094. args: [],
  10095. source: "fileIn\x0a\x09sourceArea fileIn",
  10096. referencedClasses: [],
  10097. //>>excludeEnd("ide");
  10098. messageSends: ["fileIn"]
  10099. }),
  10100. $globals.Workspace);
  10101. $core.addMethod(
  10102. $core.method({
  10103. selector: "inspectIt",
  10104. protocol: 'actions',
  10105. fn: function (){
  10106. var self=this;
  10107. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10108. return $core.withContext(function($ctx1) {
  10109. //>>excludeEnd("ctx");
  10110. $recv(self["@sourceArea"])._inspectIt();
  10111. return self;
  10112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10113. }, function($ctx1) {$ctx1.fill(self,"inspectIt",{},$globals.Workspace)});
  10114. //>>excludeEnd("ctx");
  10115. },
  10116. //>>excludeStart("ide", pragmas.excludeIdeData);
  10117. args: [],
  10118. source: "inspectIt\x0a\x09sourceArea inspectIt",
  10119. referencedClasses: [],
  10120. //>>excludeEnd("ide");
  10121. messageSends: ["inspectIt"]
  10122. }),
  10123. $globals.Workspace);
  10124. $core.addMethod(
  10125. $core.method({
  10126. selector: "label",
  10127. protocol: 'accessing',
  10128. fn: function (){
  10129. var self=this;
  10130. return "Workspace";
  10131. },
  10132. //>>excludeStart("ide", pragmas.excludeIdeData);
  10133. args: [],
  10134. source: "label\x0a\x09^ 'Workspace'",
  10135. referencedClasses: [],
  10136. //>>excludeEnd("ide");
  10137. messageSends: []
  10138. }),
  10139. $globals.Workspace);
  10140. $core.addMethod(
  10141. $core.method({
  10142. selector: "printIt",
  10143. protocol: 'actions',
  10144. fn: function (){
  10145. var self=this;
  10146. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10147. return $core.withContext(function($ctx1) {
  10148. //>>excludeEnd("ctx");
  10149. $recv(self["@sourceArea"])._printIt();
  10150. return self;
  10151. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10152. }, function($ctx1) {$ctx1.fill(self,"printIt",{},$globals.Workspace)});
  10153. //>>excludeEnd("ctx");
  10154. },
  10155. //>>excludeStart("ide", pragmas.excludeIdeData);
  10156. args: [],
  10157. source: "printIt\x0a\x09sourceArea printIt",
  10158. referencedClasses: [],
  10159. //>>excludeEnd("ide");
  10160. messageSends: ["printIt"]
  10161. }),
  10162. $globals.Workspace);
  10163. $core.addMethod(
  10164. $core.method({
  10165. selector: "renderBoxOn:",
  10166. protocol: 'rendering',
  10167. fn: function (html){
  10168. var self=this;
  10169. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10170. return $core.withContext(function($ctx1) {
  10171. //>>excludeEnd("ctx");
  10172. self["@sourceArea"]=$recv($globals.SourceArea)._new();
  10173. $recv(self["@sourceArea"])._renderOn_(html);
  10174. return self;
  10175. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10176. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.Workspace)});
  10177. //>>excludeEnd("ctx");
  10178. },
  10179. //>>excludeStart("ide", pragmas.excludeIdeData);
  10180. args: ["html"],
  10181. source: "renderBoxOn: html\x0a\x09sourceArea := SourceArea new.\x0a\x09sourceArea renderOn: html",
  10182. referencedClasses: ["SourceArea"],
  10183. //>>excludeEnd("ide");
  10184. messageSends: ["new", "renderOn:"]
  10185. }),
  10186. $globals.Workspace);
  10187. $core.addMethod(
  10188. $core.method({
  10189. selector: "renderButtonsOn:",
  10190. protocol: 'rendering',
  10191. fn: function (html){
  10192. var self=this;
  10193. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10194. return $core.withContext(function($ctx1) {
  10195. //>>excludeEnd("ctx");
  10196. var $1,$2,$3,$4,$5,$6,$7,$8,$9;
  10197. $1=$recv(html)._button();
  10198. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10199. $ctx1.sendIdx["button"]=1;
  10200. //>>excludeEnd("ctx");
  10201. $recv($1)._with_("DoIt");
  10202. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10203. $ctx1.sendIdx["with:"]=1;
  10204. //>>excludeEnd("ctx");
  10205. $recv($1)._title_("ctrl+d");
  10206. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10207. $ctx1.sendIdx["title:"]=1;
  10208. //>>excludeEnd("ctx");
  10209. $2=$recv($1)._onClick_((function(){
  10210. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10211. return $core.withContext(function($ctx2) {
  10212. //>>excludeEnd("ctx");
  10213. return self._doIt();
  10214. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10215. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  10216. //>>excludeEnd("ctx");
  10217. }));
  10218. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10219. $ctx1.sendIdx["onClick:"]=1;
  10220. //>>excludeEnd("ctx");
  10221. $3=$recv(html)._button();
  10222. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10223. $ctx1.sendIdx["button"]=2;
  10224. //>>excludeEnd("ctx");
  10225. $recv($3)._with_("PrintIt");
  10226. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10227. $ctx1.sendIdx["with:"]=2;
  10228. //>>excludeEnd("ctx");
  10229. $recv($3)._title_("ctrl+p");
  10230. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10231. $ctx1.sendIdx["title:"]=2;
  10232. //>>excludeEnd("ctx");
  10233. $4=$recv($3)._onClick_((function(){
  10234. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10235. return $core.withContext(function($ctx2) {
  10236. //>>excludeEnd("ctx");
  10237. return self._printIt();
  10238. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10239. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  10240. //>>excludeEnd("ctx");
  10241. }));
  10242. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10243. $ctx1.sendIdx["onClick:"]=2;
  10244. //>>excludeEnd("ctx");
  10245. $5=$recv(html)._button();
  10246. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10247. $ctx1.sendIdx["button"]=3;
  10248. //>>excludeEnd("ctx");
  10249. $recv($5)._with_("InspectIt");
  10250. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10251. $ctx1.sendIdx["with:"]=3;
  10252. //>>excludeEnd("ctx");
  10253. $recv($5)._title_("ctrl+i");
  10254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10255. $ctx1.sendIdx["title:"]=3;
  10256. //>>excludeEnd("ctx");
  10257. $6=$recv($5)._onClick_((function(){
  10258. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10259. return $core.withContext(function($ctx2) {
  10260. //>>excludeEnd("ctx");
  10261. return self._inspectIt();
  10262. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10263. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  10264. //>>excludeEnd("ctx");
  10265. }));
  10266. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10267. $ctx1.sendIdx["onClick:"]=3;
  10268. //>>excludeEnd("ctx");
  10269. $7=$recv(html)._button();
  10270. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10271. $ctx1.sendIdx["button"]=4;
  10272. //>>excludeEnd("ctx");
  10273. $recv($7)._with_("FileIn");
  10274. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10275. $ctx1.sendIdx["with:"]=4;
  10276. //>>excludeEnd("ctx");
  10277. $recv($7)._title_("ctrl+f");
  10278. $8=$recv($7)._onClick_((function(){
  10279. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10280. return $core.withContext(function($ctx2) {
  10281. //>>excludeEnd("ctx");
  10282. return self._fileIn();
  10283. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10284. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  10285. //>>excludeEnd("ctx");
  10286. }));
  10287. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10288. $ctx1.sendIdx["onClick:"]=4;
  10289. //>>excludeEnd("ctx");
  10290. $9=$recv(html)._button();
  10291. $recv($9)._with_("Clear workspace");
  10292. $recv($9)._onClick_((function(){
  10293. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10294. return $core.withContext(function($ctx2) {
  10295. //>>excludeEnd("ctx");
  10296. return self._clearWorkspace();
  10297. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10298. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)});
  10299. //>>excludeEnd("ctx");
  10300. }));
  10301. return self;
  10302. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10303. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.Workspace)});
  10304. //>>excludeEnd("ctx");
  10305. },
  10306. //>>excludeStart("ide", pragmas.excludeIdeData);
  10307. args: ["html"],
  10308. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'DoIt';\x0a\x09title: 'ctrl+d';\x0a\x09onClick: [ self doIt ].\x0a\x09html button\x0a\x09with: 'PrintIt';\x0a\x09title: 'ctrl+p';\x0a\x09onClick: [ self printIt ].\x0a\x09html button\x0a\x09with: 'InspectIt';\x0a\x09title: 'ctrl+i';\x0a\x09onClick: [ self inspectIt ].\x0a\x09html button\x0a\x09with: 'FileIn';\x0a\x09title: 'ctrl+f';\x0a\x09onClick: [ self fileIn ].\x0a\x09html button\x0a\x09with: 'Clear workspace';\x0a\x09onClick: [ self clearWorkspace ]",
  10309. referencedClasses: [],
  10310. //>>excludeEnd("ide");
  10311. messageSends: ["with:", "button", "title:", "onClick:", "doIt", "printIt", "inspectIt", "fileIn", "clearWorkspace"]
  10312. }),
  10313. $globals.Workspace);
  10314. $core.addMethod(
  10315. $core.method({
  10316. selector: "show",
  10317. protocol: 'actions',
  10318. fn: function (){
  10319. var self=this;
  10320. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10321. return $core.withContext(function($ctx1) {
  10322. //>>excludeEnd("ctx");
  10323. (
  10324. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10325. $ctx1.supercall = true,
  10326. //>>excludeEnd("ctx");
  10327. ($globals.Workspace.superclass||$boot.nilAsClass).fn.prototype._show.apply($recv(self), []));
  10328. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10329. $ctx1.supercall = false;
  10330. //>>excludeEnd("ctx");;
  10331. $recv(self["@sourceArea"])._focus();
  10332. return self;
  10333. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10334. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.Workspace)});
  10335. //>>excludeEnd("ctx");
  10336. },
  10337. //>>excludeStart("ide", pragmas.excludeIdeData);
  10338. args: [],
  10339. source: "show\x0a\x09super show.\x0a\x09sourceArea focus.",
  10340. referencedClasses: [],
  10341. //>>excludeEnd("ide");
  10342. messageSends: ["show", "focus"]
  10343. }),
  10344. $globals.Workspace);
  10345. });