1
0

IDE.js 267 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430
  1. define("amber_core/IDE", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_vm/globals", "amber_core/Canvas", "amber_core/Kernel-Objects", "amber_core/Kernel-Collections", "amber_core/Kernel-Methods"], function(smalltalk,nil,_st, globals){
  2. smalltalk.addPackage('IDE');
  3. smalltalk.packages["IDE"].transport = {"type":"amd","amdNamespace":"amber_core"};
  4. smalltalk.addClass('ClassesList', globals.Widget, ['browser', 'ul', 'nodes'], 'IDE');
  5. smalltalk.addMethod(
  6. smalltalk.method({
  7. selector: "browser",
  8. protocol: 'accessing',
  9. fn: function (){
  10. var self=this;
  11. var $1;
  12. $1=self["@browser"];
  13. return $1;
  14. },
  15. args: [],
  16. source: "browser\x0a\x09^ browser",
  17. messageSends: [],
  18. referencedClasses: []
  19. }),
  20. globals.ClassesList);
  21. smalltalk.addMethod(
  22. smalltalk.method({
  23. selector: "browser:",
  24. protocol: 'accessing',
  25. fn: function (aBrowser){
  26. var self=this;
  27. self["@browser"]=aBrowser;
  28. return self},
  29. args: ["aBrowser"],
  30. source: "browser: aBrowser\x0a\x09browser := aBrowser",
  31. messageSends: [],
  32. referencedClasses: []
  33. }),
  34. globals.ClassesList);
  35. smalltalk.addMethod(
  36. smalltalk.method({
  37. selector: "category",
  38. protocol: 'accessing',
  39. fn: function (){
  40. var self=this;
  41. return smalltalk.withContext(function($ctx1) {
  42. var $1;
  43. $1=_st(self._browser())._selectedPackage();
  44. return $1;
  45. }, function($ctx1) {$ctx1.fill(self,"category",{},globals.ClassesList)})},
  46. args: [],
  47. source: "category\x0a\x09^ self browser selectedPackage",
  48. messageSends: ["selectedPackage", "browser"],
  49. referencedClasses: []
  50. }),
  51. globals.ClassesList);
  52. smalltalk.addMethod(
  53. smalltalk.method({
  54. selector: "getNodes",
  55. protocol: 'accessing',
  56. fn: function (){
  57. var self=this;
  58. var classes,children,others;
  59. function $ClassesListNode(){return globals.ClassesListNode||(typeof ClassesListNode=="undefined"?nil:ClassesListNode)}
  60. return smalltalk.withContext(function($ctx1) {
  61. var $1,$2,$3;
  62. $1=self._browser();
  63. $ctx1.sendIdx["browser"]=1;
  64. classes=_st($1)._classes();
  65. children=[];
  66. others=[];
  67. _st(classes)._do_((function(each){
  68. return smalltalk.withContext(function($ctx2) {
  69. $2=_st(classes)._includes_(_st(each)._superclass());
  70. if(smalltalk.assert($2)){
  71. return _st(others)._add_(each);
  72. } else {
  73. return _st(children)._add_(each);
  74. $ctx2.sendIdx["add:"]=1;
  75. };
  76. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  77. $3=_st(children)._collect_((function(each){
  78. return smalltalk.withContext(function($ctx2) {
  79. return _st($ClassesListNode())._on_browser_classes_level_(each,self._browser(),others,(0));
  80. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
  81. return $3;
  82. }, function($ctx1) {$ctx1.fill(self,"getNodes",{classes:classes,children:children,others:others},globals.ClassesList)})},
  83. args: [],
  84. 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 ]",
  85. messageSends: ["classes", "browser", "do:", "ifFalse:ifTrue:", "includes:", "superclass", "add:", "collect:", "on:browser:classes:level:"],
  86. referencedClasses: ["ClassesListNode"]
  87. }),
  88. globals.ClassesList);
  89. smalltalk.addMethod(
  90. smalltalk.method({
  91. selector: "nodes",
  92. protocol: 'accessing',
  93. fn: function (){
  94. var self=this;
  95. return smalltalk.withContext(function($ctx1) {
  96. var $1,$2;
  97. $1=self["@nodes"];
  98. if(($receiver = $1) == nil || $receiver == null){
  99. self["@nodes"]=self._getNodes();
  100. self["@nodes"];
  101. } else {
  102. $1;
  103. };
  104. $2=self["@nodes"];
  105. return $2;
  106. }, function($ctx1) {$ctx1.fill(self,"nodes",{},globals.ClassesList)})},
  107. args: [],
  108. source: "nodes\x0a\x09nodes ifNil: [ nodes := self getNodes ].\x0a\x09^ nodes",
  109. messageSends: ["ifNil:", "getNodes"],
  110. referencedClasses: []
  111. }),
  112. globals.ClassesList);
  113. smalltalk.addMethod(
  114. smalltalk.method({
  115. selector: "renderOn:",
  116. protocol: 'rendering',
  117. fn: function (html){
  118. var self=this;
  119. return smalltalk.withContext(function($ctx1) {
  120. var $1,$2;
  121. $1=_st(html)._ul();
  122. _st($1)._class_("amber_column browser classes");
  123. $2=_st($1)._yourself();
  124. self["@ul"]=$2;
  125. self._updateNodes();
  126. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},globals.ClassesList)})},
  127. args: ["html"],
  128. source: "renderOn: html\x0a\x09ul := html ul\x0a\x09\x09class: 'amber_column browser classes';\x0a\x09\x09yourself.\x0a\x09self updateNodes",
  129. messageSends: ["class:", "ul", "yourself", "updateNodes"],
  130. referencedClasses: []
  131. }),
  132. globals.ClassesList);
  133. smalltalk.addMethod(
  134. smalltalk.method({
  135. selector: "resetNodes",
  136. protocol: 'accessing',
  137. fn: function (){
  138. var self=this;
  139. self["@nodes"]=nil;
  140. return self},
  141. args: [],
  142. source: "resetNodes\x0a\x09nodes := nil",
  143. messageSends: [],
  144. referencedClasses: []
  145. }),
  146. globals.ClassesList);
  147. smalltalk.addMethod(
  148. smalltalk.method({
  149. selector: "updateNodes",
  150. protocol: 'rendering',
  151. fn: function (){
  152. var self=this;
  153. return smalltalk.withContext(function($ctx1) {
  154. _st(self["@ul"])._contents_((function(html){
  155. return smalltalk.withContext(function($ctx2) {
  156. return _st(self._nodes())._do_((function(each){
  157. return smalltalk.withContext(function($ctx3) {
  158. return _st(each)._renderOn_(html);
  159. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  160. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  161. return self}, function($ctx1) {$ctx1.fill(self,"updateNodes",{},globals.ClassesList)})},
  162. args: [],
  163. source: "updateNodes\x0a\x09ul contents: [ :html |\x0a\x09\x09self nodes do: [ :each |\x0a\x09\x09\x09each renderOn: html ]]",
  164. messageSends: ["contents:", "do:", "nodes", "renderOn:"],
  165. referencedClasses: []
  166. }),
  167. globals.ClassesList);
  168. smalltalk.addMethod(
  169. smalltalk.method({
  170. selector: "on:",
  171. protocol: 'instance creation',
  172. fn: function (aBrowser){
  173. var self=this;
  174. return smalltalk.withContext(function($ctx1) {
  175. var $2,$3,$1;
  176. $2=self._new();
  177. _st($2)._browser_(aBrowser);
  178. $3=_st($2)._yourself();
  179. $1=$3;
  180. return $1;
  181. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowser:aBrowser},globals.ClassesList.klass)})},
  182. args: ["aBrowser"],
  183. source: "on: aBrowser\x0a\x09^ self new\x0a\x09\x09browser: aBrowser;\x0a\x09\x09yourself",
  184. messageSends: ["browser:", "new", "yourself"],
  185. referencedClasses: []
  186. }),
  187. globals.ClassesList.klass);
  188. smalltalk.addClass('ClassesListNode', globals.Widget, ['browser', 'theClass', 'level', 'nodes'], 'IDE');
  189. smalltalk.addMethod(
  190. smalltalk.method({
  191. selector: "browser",
  192. protocol: 'accessing',
  193. fn: function (){
  194. var self=this;
  195. var $1;
  196. $1=self["@browser"];
  197. return $1;
  198. },
  199. args: [],
  200. source: "browser\x0a\x09^ browser",
  201. messageSends: [],
  202. referencedClasses: []
  203. }),
  204. globals.ClassesListNode);
  205. smalltalk.addMethod(
  206. smalltalk.method({
  207. selector: "browser:",
  208. protocol: 'accessing',
  209. fn: function (aBrowser){
  210. var self=this;
  211. self["@browser"]=aBrowser;
  212. return self},
  213. args: ["aBrowser"],
  214. source: "browser: aBrowser\x0a\x09browser := aBrowser",
  215. messageSends: [],
  216. referencedClasses: []
  217. }),
  218. globals.ClassesListNode);
  219. smalltalk.addMethod(
  220. smalltalk.method({
  221. selector: "getNodesFrom:",
  222. protocol: 'accessing',
  223. fn: function (aCollection){
  224. var self=this;
  225. var children,others;
  226. function $ClassesListNode(){return globals.ClassesListNode||(typeof ClassesListNode=="undefined"?nil:ClassesListNode)}
  227. return smalltalk.withContext(function($ctx1) {
  228. var $1;
  229. children=[];
  230. others=[];
  231. _st(aCollection)._do_((function(each){
  232. return smalltalk.withContext(function($ctx2) {
  233. $1=_st(_st(each)._superclass()).__eq(self._theClass());
  234. if(smalltalk.assert($1)){
  235. return _st(children)._add_(each);
  236. $ctx2.sendIdx["add:"]=1;
  237. } else {
  238. return _st(others)._add_(each);
  239. };
  240. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  241. self["@nodes"]=_st(children)._collect_((function(each){
  242. return smalltalk.withContext(function($ctx2) {
  243. return _st($ClassesListNode())._on_browser_classes_level_(each,self._browser(),others,_st(self._level()).__plus((1)));
  244. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
  245. return self}, function($ctx1) {$ctx1.fill(self,"getNodesFrom:",{aCollection:aCollection,children:children,others:others},globals.ClassesListNode)})},
  246. args: ["aCollection"],
  247. 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 ]",
  248. messageSends: ["do:", "ifTrue:ifFalse:", "=", "superclass", "theClass", "add:", "collect:", "on:browser:classes:level:", "browser", "+", "level"],
  249. referencedClasses: ["ClassesListNode"]
  250. }),
  251. globals.ClassesListNode);
  252. smalltalk.addMethod(
  253. smalltalk.method({
  254. selector: "label",
  255. protocol: 'accessing',
  256. fn: function (){
  257. var self=this;
  258. var str;
  259. function $String(){return globals.String||(typeof String=="undefined"?nil:String)}
  260. return smalltalk.withContext(function($ctx1) {
  261. var $1;
  262. str=_st(_st($String())._new())._writeStream();
  263. _st(self._level())._timesRepeat_((function(){
  264. return smalltalk.withContext(function($ctx2) {
  265. return _st(str)._nextPutAll_("    ");
  266. $ctx2.sendIdx["nextPutAll:"]=1;
  267. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  268. _st(str)._nextPutAll_(_st(self._theClass())._name());
  269. $1=_st(str)._contents();
  270. return $1;
  271. }, function($ctx1) {$ctx1.fill(self,"label",{str:str},globals.ClassesListNode)})},
  272. args: [],
  273. 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",
  274. messageSends: ["writeStream", "new", "timesRepeat:", "level", "nextPutAll:", "name", "theClass", "contents"],
  275. referencedClasses: ["String"]
  276. }),
  277. globals.ClassesListNode);
  278. smalltalk.addMethod(
  279. smalltalk.method({
  280. selector: "level",
  281. protocol: 'accessing',
  282. fn: function (){
  283. var self=this;
  284. var $1;
  285. $1=self["@level"];
  286. return $1;
  287. },
  288. args: [],
  289. source: "level\x0a\x09^ level",
  290. messageSends: [],
  291. referencedClasses: []
  292. }),
  293. globals.ClassesListNode);
  294. smalltalk.addMethod(
  295. smalltalk.method({
  296. selector: "level:",
  297. protocol: 'accessing',
  298. fn: function (anInteger){
  299. var self=this;
  300. self["@level"]=anInteger;
  301. return self},
  302. args: ["anInteger"],
  303. source: "level: anInteger\x0a\x09level := anInteger",
  304. messageSends: [],
  305. referencedClasses: []
  306. }),
  307. globals.ClassesListNode);
  308. smalltalk.addMethod(
  309. smalltalk.method({
  310. selector: "nodes",
  311. protocol: 'accessing',
  312. fn: function (){
  313. var self=this;
  314. var $1;
  315. $1=self["@nodes"];
  316. return $1;
  317. },
  318. args: [],
  319. source: "nodes\x0a\x09^ nodes",
  320. messageSends: [],
  321. referencedClasses: []
  322. }),
  323. globals.ClassesListNode);
  324. smalltalk.addMethod(
  325. smalltalk.method({
  326. selector: "renderOn:",
  327. protocol: 'rendering',
  328. fn: function (html){
  329. var self=this;
  330. var li,cssClass;
  331. return smalltalk.withContext(function($ctx1) {
  332. var $1,$2,$4,$5,$3,$6;
  333. cssClass="";
  334. li=_st(_st(html)._li())._onClick_((function(){
  335. return smalltalk.withContext(function($ctx2) {
  336. $1=self._browser();
  337. $ctx2.sendIdx["browser"]=1;
  338. $2=self._theClass();
  339. $ctx2.sendIdx["theClass"]=1;
  340. return _st($1)._selectClass_($2);
  341. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  342. _st(_st(li)._asJQuery())._html_(self._label());
  343. $4=_st(self._browser())._selectedClass();
  344. $5=self._theClass();
  345. $ctx1.sendIdx["theClass"]=2;
  346. $3=_st($4).__eq($5);
  347. if(smalltalk.assert($3)){
  348. cssClass=_st(cssClass).__comma(" selected");
  349. $ctx1.sendIdx[","]=1;
  350. cssClass;
  351. };
  352. $6=_st(_st(self._theClass())._comment())._isEmpty();
  353. if(! smalltalk.assert($6)){
  354. cssClass=_st(cssClass).__comma(" commented");
  355. cssClass;
  356. };
  357. _st(li)._class_(cssClass);
  358. _st(self._nodes())._do_((function(each){
  359. return smalltalk.withContext(function($ctx2) {
  360. return _st(each)._renderOn_(html);
  361. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
  362. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,li:li,cssClass:cssClass},globals.ClassesListNode)})},
  363. args: ["html"],
  364. 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 isEmpty ifFalse: [\x0a\x09\x09cssClass := cssClass, ' commented' ].\x0a\x0a\x09li class: cssClass.\x0a\x0a\x09self nodes do: [ :each |\x0a\x09\x09each renderOn: html ]",
  365. messageSends: ["onClick:", "li", "selectClass:", "browser", "theClass", "html:", "asJQuery", "label", "ifTrue:", "=", "selectedClass", ",", "ifFalse:", "isEmpty", "comment", "class:", "do:", "nodes", "renderOn:"],
  366. referencedClasses: []
  367. }),
  368. globals.ClassesListNode);
  369. smalltalk.addMethod(
  370. smalltalk.method({
  371. selector: "theClass",
  372. protocol: 'accessing',
  373. fn: function (){
  374. var self=this;
  375. var $1;
  376. $1=self["@theClass"];
  377. return $1;
  378. },
  379. args: [],
  380. source: "theClass\x0a\x09^ theClass",
  381. messageSends: [],
  382. referencedClasses: []
  383. }),
  384. globals.ClassesListNode);
  385. smalltalk.addMethod(
  386. smalltalk.method({
  387. selector: "theClass:",
  388. protocol: 'accessing',
  389. fn: function (aClass){
  390. var self=this;
  391. self["@theClass"]=aClass;
  392. return self},
  393. args: ["aClass"],
  394. source: "theClass: aClass\x0a\x09theClass := aClass",
  395. messageSends: [],
  396. referencedClasses: []
  397. }),
  398. globals.ClassesListNode);
  399. smalltalk.addMethod(
  400. smalltalk.method({
  401. selector: "on:browser:classes:level:",
  402. protocol: 'instance creation',
  403. fn: function (aClass,aBrowser,aCollection,anInteger){
  404. var self=this;
  405. return smalltalk.withContext(function($ctx1) {
  406. var $2,$3,$1;
  407. $2=self._new();
  408. _st($2)._theClass_(aClass);
  409. _st($2)._browser_(aBrowser);
  410. _st($2)._level_(anInteger);
  411. _st($2)._getNodesFrom_(aCollection);
  412. $3=_st($2)._yourself();
  413. $1=$3;
  414. return $1;
  415. }, function($ctx1) {$ctx1.fill(self,"on:browser:classes:level:",{aClass:aClass,aBrowser:aBrowser,aCollection:aCollection,anInteger:anInteger},globals.ClassesListNode.klass)})},
  416. args: ["aClass", "aBrowser", "aCollection", "anInteger"],
  417. 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",
  418. messageSends: ["theClass:", "new", "browser:", "level:", "getNodesFrom:", "yourself"],
  419. referencedClasses: []
  420. }),
  421. globals.ClassesListNode.klass);
  422. smalltalk.addClass('DebugErrorHandler', globals.Object, [], 'IDE');
  423. smalltalk.addMethod(
  424. smalltalk.method({
  425. selector: "handleError:",
  426. protocol: 'error handling',
  427. fn: function (anError){
  428. var self=this;
  429. function $Debugger(){return globals.Debugger||(typeof Debugger=="undefined"?nil:Debugger)}
  430. function $Error(){return globals.Error||(typeof Error=="undefined"?nil:Error)}
  431. function $ErrorHandler(){return globals.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  432. return smalltalk.withContext(function($ctx1) {
  433. var $1,$2;
  434. _st((function(){
  435. return smalltalk.withContext(function($ctx2) {
  436. $1=_st($Debugger())._new();
  437. $ctx2.sendIdx["new"]=1;
  438. _st($1)._error_(anError);
  439. $2=_st($1)._open();
  440. return $2;
  441. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._on_do_($Error(),(function(error){
  442. return smalltalk.withContext(function($ctx2) {
  443. return _st(_st($ErrorHandler())._new())._handleError_(error);
  444. }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1,2)})}));
  445. return self}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},globals.DebugErrorHandler)})},
  446. args: ["anError"],
  447. source: "handleError: anError\x0a\x09[ Debugger new\x0a\x09\x09error: anError;\x0a\x09\x09open ] on: Error do: [ :error |\x0a\x09\x09\x09ErrorHandler new handleError: error ]",
  448. messageSends: ["on:do:", "error:", "new", "open", "handleError:"],
  449. referencedClasses: ["Debugger", "Error", "ErrorHandler"]
  450. }),
  451. globals.DebugErrorHandler);
  452. smalltalk.addMethod(
  453. smalltalk.method({
  454. selector: "initialize",
  455. protocol: 'initialization',
  456. fn: function (){
  457. var self=this;
  458. function $ErrorHandler(){return globals.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  459. return smalltalk.withContext(function($ctx1) {
  460. _st($ErrorHandler())._register_(self._new());
  461. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.DebugErrorHandler.klass)})},
  462. args: [],
  463. source: "initialize\x0a\x09ErrorHandler register: self new",
  464. messageSends: ["register:", "new"],
  465. referencedClasses: ["ErrorHandler"]
  466. }),
  467. globals.DebugErrorHandler.klass);
  468. smalltalk.addClass('SourceArea', globals.Widget, ['editor', 'div', 'receiver', 'onDoIt'], 'IDE');
  469. smalltalk.addMethod(
  470. smalltalk.method({
  471. selector: "clear",
  472. protocol: 'actions',
  473. fn: function (){
  474. var self=this;
  475. return smalltalk.withContext(function($ctx1) {
  476. self._val_("");
  477. return self}, function($ctx1) {$ctx1.fill(self,"clear",{},globals.SourceArea)})},
  478. args: [],
  479. source: "clear\x0a\x09self val: ''",
  480. messageSends: ["val:"],
  481. referencedClasses: []
  482. }),
  483. globals.SourceArea);
  484. smalltalk.addMethod(
  485. smalltalk.method({
  486. selector: "currentLine",
  487. protocol: 'accessing',
  488. fn: function (){
  489. var self=this;
  490. return smalltalk.withContext(function($ctx1) {
  491. var $1;
  492. $1=_st(self["@editor"])._getLine_(_st(_st(self["@editor"])._getCursor())._line());
  493. return $1;
  494. }, function($ctx1) {$ctx1.fill(self,"currentLine",{},globals.SourceArea)})},
  495. args: [],
  496. source: "currentLine\x0a\x09^ editor getLine: (editor getCursor line)",
  497. messageSends: ["getLine:", "line", "getCursor"],
  498. referencedClasses: []
  499. }),
  500. globals.SourceArea);
  501. smalltalk.addMethod(
  502. smalltalk.method({
  503. selector: "currentLineOrSelection",
  504. protocol: 'accessing',
  505. fn: function (){
  506. var self=this;
  507. return smalltalk.withContext(function($ctx1) {
  508. var $2,$1;
  509. $2=_st(self["@editor"])._somethingSelected();
  510. if(smalltalk.assert($2)){
  511. $1=self._selection();
  512. } else {
  513. $1=self._currentLine();
  514. };
  515. return $1;
  516. }, function($ctx1) {$ctx1.fill(self,"currentLineOrSelection",{},globals.SourceArea)})},
  517. args: [],
  518. source: "currentLineOrSelection\x0a\x09^ editor somethingSelected\x0a\x09ifFalse: [ self currentLine ]\x0a\x09ifTrue: [ self selection ]",
  519. messageSends: ["ifFalse:ifTrue:", "somethingSelected", "currentLine", "selection"],
  520. referencedClasses: []
  521. }),
  522. globals.SourceArea);
  523. smalltalk.addMethod(
  524. smalltalk.method({
  525. selector: "doIt",
  526. protocol: 'actions',
  527. fn: function (){
  528. var self=this;
  529. var result;
  530. return smalltalk.withContext(function($ctx1) {
  531. var $1,$2;
  532. result=self._eval_(self._currentLineOrSelection());
  533. $1=self._onDoIt();
  534. $ctx1.sendIdx["onDoIt"]=1;
  535. if(($receiver = $1) == nil || $receiver == null){
  536. $1;
  537. } else {
  538. _st(self._onDoIt())._value();
  539. };
  540. $2=result;
  541. return $2;
  542. }, function($ctx1) {$ctx1.fill(self,"doIt",{result:result},globals.SourceArea)})},
  543. args: [],
  544. source: "doIt\x0a\x09| result |\x0a\x09result := self eval: self currentLineOrSelection.\x0a\x09self onDoIt ifNotNil: [ self onDoIt value ].\x0a\x09^ result",
  545. messageSends: ["eval:", "currentLineOrSelection", "ifNotNil:", "onDoIt", "value"],
  546. referencedClasses: []
  547. }),
  548. globals.SourceArea);
  549. smalltalk.addMethod(
  550. smalltalk.method({
  551. selector: "editor",
  552. protocol: 'accessing',
  553. fn: function (){
  554. var self=this;
  555. var $1;
  556. $1=self["@editor"];
  557. return $1;
  558. },
  559. args: [],
  560. source: "editor\x0a\x09^ editor",
  561. messageSends: [],
  562. referencedClasses: []
  563. }),
  564. globals.SourceArea);
  565. smalltalk.addMethod(
  566. smalltalk.method({
  567. selector: "eval:",
  568. protocol: 'actions',
  569. fn: function (aString){
  570. var self=this;
  571. var compiler;
  572. function $Compiler(){return globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  573. function $Error(){return globals.Error||(typeof Error=="undefined"?nil:Error)}
  574. return smalltalk.withContext(function($ctx1) {
  575. var $1,$2;
  576. var $early={};
  577. try {
  578. compiler=_st($Compiler())._new();
  579. _st((function(){
  580. return smalltalk.withContext(function($ctx2) {
  581. return _st(compiler)._parseExpression_(aString);
  582. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._on_do_($Error(),(function(ex){
  583. return smalltalk.withContext(function($ctx2) {
  584. $1=self._alert_(_st(ex)._messageText());
  585. throw $early=[$1];
  586. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,2)})}));
  587. $2=_st(compiler)._evaluateExpression_on_(aString,self._receiver());
  588. return $2;
  589. }
  590. catch(e) {if(e===$early)return e[0]; throw e}
  591. }, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,compiler:compiler},globals.SourceArea)})},
  592. args: ["aString"],
  593. source: "eval: aString\x0a\x09| compiler |\x0a\x09compiler := Compiler new.\x0a\x09[ compiler parseExpression: aString ] on: Error do: [ :ex |\x0a\x09\x09^ self alert: ex messageText ].\x0a\x09^ compiler evaluateExpression: aString on: self receiver",
  594. messageSends: ["new", "on:do:", "parseExpression:", "alert:", "messageText", "evaluateExpression:on:", "receiver"],
  595. referencedClasses: ["Compiler", "Error"]
  596. }),
  597. globals.SourceArea);
  598. smalltalk.addMethod(
  599. smalltalk.method({
  600. selector: "fileIn",
  601. protocol: 'actions',
  602. fn: function (){
  603. var self=this;
  604. function $Importer(){return globals.Importer||(typeof Importer=="undefined"?nil:Importer)}
  605. return smalltalk.withContext(function($ctx1) {
  606. _st(_st($Importer())._new())._import_(_st(self._currentLineOrSelection())._readStream());
  607. return self}, function($ctx1) {$ctx1.fill(self,"fileIn",{},globals.SourceArea)})},
  608. args: [],
  609. source: "fileIn\x0a\x09Importer new import: self currentLineOrSelection readStream",
  610. messageSends: ["import:", "new", "readStream", "currentLineOrSelection"],
  611. referencedClasses: ["Importer"]
  612. }),
  613. globals.SourceArea);
  614. smalltalk.addMethod(
  615. smalltalk.method({
  616. selector: "focus",
  617. protocol: 'actions',
  618. fn: function (){
  619. var self=this;
  620. return smalltalk.withContext(function($ctx1) {
  621. _st(self._editor())._focus();
  622. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},globals.SourceArea)})},
  623. args: [],
  624. source: "focus\x0a\x09self editor focus.",
  625. messageSends: ["focus", "editor"],
  626. referencedClasses: []
  627. }),
  628. globals.SourceArea);
  629. smalltalk.addMethod(
  630. smalltalk.method({
  631. selector: "handleKeyDown:",
  632. protocol: 'actions',
  633. fn: function (anEvent){
  634. var self=this;
  635. if(anEvent.ctrlKey) {
  636. if(anEvent.keyCode === 80) { //ctrl+p
  637. self._printIt();
  638. anEvent.preventDefault();
  639. return false;
  640. }
  641. if(anEvent.keyCode === 68) { //ctrl+d
  642. self._doIt();
  643. anEvent.preventDefault();
  644. return false;
  645. }
  646. if(anEvent.keyCode === 73) { //ctrl+i
  647. self._inspectIt();
  648. anEvent.preventDefault();
  649. return false;
  650. }
  651. };
  652. return self},
  653. args: ["anEvent"],
  654. 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}>",
  655. messageSends: [],
  656. referencedClasses: []
  657. }),
  658. globals.SourceArea);
  659. smalltalk.addMethod(
  660. smalltalk.method({
  661. selector: "inspectIt",
  662. protocol: 'actions',
  663. fn: function (){
  664. var self=this;
  665. return smalltalk.withContext(function($ctx1) {
  666. _st(self._doIt())._inspect();
  667. return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{},globals.SourceArea)})},
  668. args: [],
  669. source: "inspectIt\x0a\x09self doIt inspect",
  670. messageSends: ["inspect", "doIt"],
  671. referencedClasses: []
  672. }),
  673. globals.SourceArea);
  674. smalltalk.addMethod(
  675. smalltalk.method({
  676. selector: "onDoIt",
  677. protocol: 'accessing',
  678. fn: function (){
  679. var self=this;
  680. var $1;
  681. $1=self["@onDoIt"];
  682. return $1;
  683. },
  684. args: [],
  685. source: "onDoIt\x0a\x09^ onDoIt",
  686. messageSends: [],
  687. referencedClasses: []
  688. }),
  689. globals.SourceArea);
  690. smalltalk.addMethod(
  691. smalltalk.method({
  692. selector: "onDoIt:",
  693. protocol: 'accessing',
  694. fn: function (aBlock){
  695. var self=this;
  696. self["@onDoIt"]=aBlock;
  697. return self},
  698. args: ["aBlock"],
  699. source: "onDoIt: aBlock\x0a\x09onDoIt := aBlock",
  700. messageSends: [],
  701. referencedClasses: []
  702. }),
  703. globals.SourceArea);
  704. smalltalk.addMethod(
  705. smalltalk.method({
  706. selector: "onKeyDown:",
  707. protocol: 'events',
  708. fn: function (aBlock){
  709. var self=this;
  710. return smalltalk.withContext(function($ctx1) {
  711. _st(self["@div"])._onKeyDown_(aBlock);
  712. return self}, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{aBlock:aBlock},globals.SourceArea)})},
  713. args: ["aBlock"],
  714. source: "onKeyDown: aBlock\x0a\x09div onKeyDown: aBlock",
  715. messageSends: ["onKeyDown:"],
  716. referencedClasses: []
  717. }),
  718. globals.SourceArea);
  719. smalltalk.addMethod(
  720. smalltalk.method({
  721. selector: "onKeyUp:",
  722. protocol: 'events',
  723. fn: function (aBlock){
  724. var self=this;
  725. return smalltalk.withContext(function($ctx1) {
  726. _st(self["@div"])._onKeyUp_(aBlock);
  727. return self}, function($ctx1) {$ctx1.fill(self,"onKeyUp:",{aBlock:aBlock},globals.SourceArea)})},
  728. args: ["aBlock"],
  729. source: "onKeyUp: aBlock\x0a\x09div onKeyUp: aBlock",
  730. messageSends: ["onKeyUp:"],
  731. referencedClasses: []
  732. }),
  733. globals.SourceArea);
  734. smalltalk.addMethod(
  735. smalltalk.method({
  736. selector: "print:",
  737. protocol: 'actions',
  738. fn: function (aString){
  739. var self=this;
  740. var start,stop,currentLine;
  741. function $HashedCollection(){return globals.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  742. return smalltalk.withContext(function($ctx1) {
  743. var $1,$2,$4,$3,$5,$6,$7,$8,$10,$9,$11,$12,$13,$15,$14;
  744. $1=_st(self["@editor"])._getCursor_(false);
  745. $ctx1.sendIdx["getCursor:"]=1;
  746. currentLine=_st($1)._line();
  747. start=_st($HashedCollection())._new();
  748. $ctx1.sendIdx["new"]=1;
  749. _st(start)._at_put_("line",currentLine);
  750. $ctx1.sendIdx["at:put:"]=1;
  751. $2=start;
  752. $4=_st(self["@editor"])._getCursor_(false);
  753. $ctx1.sendIdx["getCursor:"]=2;
  754. $3=_st($4)._ch();
  755. _st($2)._at_put_("ch",$3);
  756. $ctx1.sendIdx["at:put:"]=2;
  757. $5=_st(self["@editor"])._getSelection();
  758. $ctx1.sendIdx["getSelection"]=1;
  759. _st($5)._ifEmpty_((function(){
  760. return smalltalk.withContext(function($ctx2) {
  761. $6=start;
  762. $7=_st(_st(self["@editor"])._getLine_(currentLine))._size();
  763. $ctx2.sendIdx["size"]=1;
  764. _st($6)._at_put_("ch",$7);
  765. $ctx2.sendIdx["at:put:"]=3;
  766. $8=self["@editor"];
  767. $10="line".__minus_gt(currentLine);
  768. $ctx2.sendIdx["->"]=1;
  769. $9=globals.HashedCollection._from_([$10,"ch".__minus_gt((0))]);
  770. return _st($8)._setSelection_end_($9,start);
  771. $ctx2.sendIdx["setSelection:end:"]=1;
  772. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  773. stop=_st($HashedCollection())._new();
  774. _st(stop)._at_put_("line",currentLine);
  775. $ctx1.sendIdx["at:put:"]=4;
  776. $11=stop;
  777. $12=_st(_st(_st(start)._at_("ch")).__plus(_st(aString)._size())).__plus((2));
  778. $ctx1.sendIdx["+"]=1;
  779. _st($11)._at_put_("ch",$12);
  780. $13=self["@editor"];
  781. $15=_st(_st(_st(self["@editor"])._getSelection()).__comma(" ")).__comma(aString);
  782. $ctx1.sendIdx[","]=2;
  783. $14=_st($15).__comma(" ");
  784. $ctx1.sendIdx[","]=1;
  785. _st($13)._replaceSelection_($14);
  786. _st(self["@editor"])._setCursor_(_st(self["@editor"])._getCursor_(true));
  787. _st(self["@editor"])._setSelection_end_(stop,start);
  788. return self}, function($ctx1) {$ctx1.fill(self,"print:",{aString:aString,start:start,stop:stop,currentLine:currentLine},globals.SourceArea)})},
  789. args: ["aString"],
  790. 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",
  791. messageSends: ["line", "getCursor:", "new", "at:put:", "ch", "ifEmpty:", "getSelection", "size", "getLine:", "setSelection:end:", "->", "+", "at:", "replaceSelection:", ",", "setCursor:"],
  792. referencedClasses: ["HashedCollection"]
  793. }),
  794. globals.SourceArea);
  795. smalltalk.addMethod(
  796. smalltalk.method({
  797. selector: "printIt",
  798. protocol: 'actions',
  799. fn: function (){
  800. var self=this;
  801. return smalltalk.withContext(function($ctx1) {
  802. self._print_(_st(self._doIt())._printString());
  803. self._focus();
  804. return self}, function($ctx1) {$ctx1.fill(self,"printIt",{},globals.SourceArea)})},
  805. args: [],
  806. source: "printIt\x0a\x09self print: self doIt printString.\x0a\x09self focus.",
  807. messageSends: ["print:", "printString", "doIt", "focus"],
  808. referencedClasses: []
  809. }),
  810. globals.SourceArea);
  811. smalltalk.addMethod(
  812. smalltalk.method({
  813. selector: "receiver",
  814. protocol: 'accessing',
  815. fn: function (){
  816. var self=this;
  817. function $DoIt(){return globals.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
  818. return smalltalk.withContext(function($ctx1) {
  819. var $2,$1;
  820. $2=self["@receiver"];
  821. if(($receiver = $2) == nil || $receiver == null){
  822. $1=_st($DoIt())._new();
  823. } else {
  824. $1=$2;
  825. };
  826. return $1;
  827. }, function($ctx1) {$ctx1.fill(self,"receiver",{},globals.SourceArea)})},
  828. args: [],
  829. source: "receiver\x0a\x09^ receiver ifNil: [ DoIt new ]",
  830. messageSends: ["ifNil:", "new"],
  831. referencedClasses: ["DoIt"]
  832. }),
  833. globals.SourceArea);
  834. smalltalk.addMethod(
  835. smalltalk.method({
  836. selector: "receiver:",
  837. protocol: 'accessing',
  838. fn: function (anObject){
  839. var self=this;
  840. self["@receiver"]=anObject;
  841. return self},
  842. args: ["anObject"],
  843. source: "receiver: anObject\x0a\x09receiver := anObject",
  844. messageSends: [],
  845. referencedClasses: []
  846. }),
  847. globals.SourceArea);
  848. smalltalk.addMethod(
  849. smalltalk.method({
  850. selector: "renderOn:",
  851. protocol: 'rendering',
  852. fn: function (html){
  853. var self=this;
  854. var textarea;
  855. return smalltalk.withContext(function($ctx1) {
  856. self["@div"]=_st(_st(html)._div())._class_("source");
  857. _st(self["@div"])._with_((function(){
  858. return smalltalk.withContext(function($ctx2) {
  859. textarea=_st(html)._textarea();
  860. return textarea;
  861. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  862. self._setEditorOn_(_st(textarea)._element());
  863. _st(self["@div"])._onKeyDown_((function(e){
  864. return smalltalk.withContext(function($ctx2) {
  865. return self._handleKeyDown_(e);
  866. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,2)})}));
  867. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,textarea:textarea},globals.SourceArea)})},
  868. args: ["html"],
  869. 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 ]",
  870. messageSends: ["class:", "div", "with:", "textarea", "setEditorOn:", "element", "onKeyDown:", "handleKeyDown:"],
  871. referencedClasses: []
  872. }),
  873. globals.SourceArea);
  874. smalltalk.addMethod(
  875. smalltalk.method({
  876. selector: "selection",
  877. protocol: 'accessing',
  878. fn: function (){
  879. var self=this;
  880. return smalltalk.withContext(function($ctx1) {
  881. var $1;
  882. $1=_st(self["@editor"])._getSelection();
  883. return $1;
  884. }, function($ctx1) {$ctx1.fill(self,"selection",{},globals.SourceArea)})},
  885. args: [],
  886. source: "selection\x0a\x09^ editor getSelection",
  887. messageSends: ["getSelection"],
  888. referencedClasses: []
  889. }),
  890. globals.SourceArea);
  891. smalltalk.addMethod(
  892. smalltalk.method({
  893. selector: "setEditorOn:",
  894. protocol: 'accessing',
  895. fn: function (aTextarea){
  896. var self=this;
  897. self['@editor'] = CodeMirror.fromTextArea(aTextarea, {
  898. theme: 'default',
  899. mode: 'text/x-stsrc',
  900. lineNumbers: true,
  901. enterMode: 'flat',
  902. indentWithTabs: true,
  903. indentUnit: 4,
  904. matchBrackets: true,
  905. electricChars: false
  906. });
  907. return self},
  908. args: ["aTextarea"],
  909. source: "setEditorOn: aTextarea\x0a\x09<self['@editor'] = CodeMirror.fromTextArea(aTextarea, {\x0a\x09\x09theme: '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})>",
  910. messageSends: [],
  911. referencedClasses: []
  912. }),
  913. globals.SourceArea);
  914. smalltalk.addMethod(
  915. smalltalk.method({
  916. selector: "val",
  917. protocol: 'accessing',
  918. fn: function (){
  919. var self=this;
  920. return smalltalk.withContext(function($ctx1) {
  921. var $1;
  922. $1=_st(self["@editor"])._getValue();
  923. return $1;
  924. }, function($ctx1) {$ctx1.fill(self,"val",{},globals.SourceArea)})},
  925. args: [],
  926. source: "val\x0a\x09^ editor getValue",
  927. messageSends: ["getValue"],
  928. referencedClasses: []
  929. }),
  930. globals.SourceArea);
  931. smalltalk.addMethod(
  932. smalltalk.method({
  933. selector: "val:",
  934. protocol: 'accessing',
  935. fn: function (aString){
  936. var self=this;
  937. return smalltalk.withContext(function($ctx1) {
  938. _st(self["@editor"])._setValue_(aString);
  939. return self}, function($ctx1) {$ctx1.fill(self,"val:",{aString:aString},globals.SourceArea)})},
  940. args: ["aString"],
  941. source: "val: aString\x0a\x09editor setValue: aString",
  942. messageSends: ["setValue:"],
  943. referencedClasses: []
  944. }),
  945. globals.SourceArea);
  946. smalltalk.addMethod(
  947. smalltalk.method({
  948. selector: "initialize",
  949. protocol: 'initialization',
  950. fn: function (){
  951. var self=this;
  952. return smalltalk.withContext(function($ctx1) {
  953. globals.SourceArea.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
  954. self._setupCodeMirror();
  955. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.SourceArea.klass)})},
  956. args: [],
  957. source: "initialize\x0a\x09super initialize.\x0a\x09self setupCodeMirror",
  958. messageSends: ["initialize", "setupCodeMirror"],
  959. referencedClasses: []
  960. }),
  961. globals.SourceArea.klass);
  962. smalltalk.addMethod(
  963. smalltalk.method({
  964. selector: "setupCodeMirror",
  965. protocol: 'initialization',
  966. fn: function (){
  967. var self=this;
  968. CodeMirror.keyMap["default"].fallthrough = ["basic"] ;
  969. return self},
  970. args: [],
  971. source: "setupCodeMirror\x0a\x09< CodeMirror.keyMap[\x22default\x22].fallthrough = [\x22basic\x22] >",
  972. messageSends: [],
  973. referencedClasses: []
  974. }),
  975. globals.SourceArea.klass);
  976. smalltalk.addClass('TabManager', globals.Widget, ['selectedTab', 'tabs', 'opened', 'ul', 'input'], 'IDE');
  977. smalltalk.addMethod(
  978. smalltalk.method({
  979. selector: "addTab:",
  980. protocol: 'adding/Removing',
  981. fn: function (aWidget){
  982. var self=this;
  983. return smalltalk.withContext(function($ctx1) {
  984. _st(self._tabs())._add_(aWidget);
  985. _st(aWidget)._appendToJQuery_("#amber"._asJQuery());
  986. _st(aWidget)._hide();
  987. return self}, function($ctx1) {$ctx1.fill(self,"addTab:",{aWidget:aWidget},globals.TabManager)})},
  988. args: ["aWidget"],
  989. source: "addTab: aWidget\x0a\x09self tabs add: aWidget.\x0a\x09aWidget appendToJQuery: '#amber' asJQuery.\x0a\x09aWidget hide",
  990. messageSends: ["add:", "tabs", "appendToJQuery:", "asJQuery", "hide"],
  991. referencedClasses: []
  992. }),
  993. globals.TabManager);
  994. smalltalk.addMethod(
  995. smalltalk.method({
  996. selector: "close",
  997. protocol: 'actions',
  998. fn: function (){
  999. var self=this;
  1000. return smalltalk.withContext(function($ctx1) {
  1001. var $1,$2,$3;
  1002. $1=self["@opened"];
  1003. if(smalltalk.assert($1)){
  1004. $2="#amber"._asJQuery();
  1005. $ctx1.sendIdx["asJQuery"]=1;
  1006. _st($2)._hide();
  1007. $ctx1.sendIdx["hide"]=1;
  1008. $3=_st(self["@ul"])._asJQuery();
  1009. $ctx1.sendIdx["asJQuery"]=2;
  1010. _st($3)._hide();
  1011. $ctx1.sendIdx["hide"]=2;
  1012. _st(self["@selectedTab"])._hide();
  1013. self._removeBodyMargin();
  1014. _st("body"._asJQuery())._removeClass_("amberBody");
  1015. self["@opened"]=false;
  1016. self["@opened"];
  1017. };
  1018. return self}, function($ctx1) {$ctx1.fill(self,"close",{},globals.TabManager)})},
  1019. args: [],
  1020. 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 ]",
  1021. messageSends: ["ifTrue:", "hide", "asJQuery", "removeBodyMargin", "removeClass:"],
  1022. referencedClasses: []
  1023. }),
  1024. globals.TabManager);
  1025. smalltalk.addMethod(
  1026. smalltalk.method({
  1027. selector: "closeTab:",
  1028. protocol: 'actions',
  1029. fn: function (aWidget){
  1030. var self=this;
  1031. return smalltalk.withContext(function($ctx1) {
  1032. self._removeTab_(aWidget);
  1033. self._selectTab_(_st(self._tabs())._last());
  1034. _st(aWidget)._remove();
  1035. self._update();
  1036. return self}, function($ctx1) {$ctx1.fill(self,"closeTab:",{aWidget:aWidget},globals.TabManager)})},
  1037. args: ["aWidget"],
  1038. source: "closeTab: aWidget\x0a\x09self removeTab: aWidget.\x0a\x09self selectTab: self tabs last.\x0a\x09aWidget remove.\x0a\x09self update",
  1039. messageSends: ["removeTab:", "selectTab:", "last", "tabs", "remove", "update"],
  1040. referencedClasses: []
  1041. }),
  1042. globals.TabManager);
  1043. smalltalk.addMethod(
  1044. smalltalk.method({
  1045. selector: "initialize",
  1046. protocol: 'initialization',
  1047. fn: function (){
  1048. var self=this;
  1049. function $Inspector(){return globals.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
  1050. function $IDEInspector(){return globals.IDEInspector||(typeof IDEInspector=="undefined"?nil:IDEInspector)}
  1051. function $IDETranscript(){return globals.IDETranscript||(typeof IDETranscript=="undefined"?nil:IDETranscript)}
  1052. function $Workspace(){return globals.Workspace||(typeof Workspace=="undefined"?nil:Workspace)}
  1053. function $TestRunner(){return globals.TestRunner||(typeof TestRunner=="undefined"?nil:TestRunner)}
  1054. return smalltalk.withContext(function($ctx1) {
  1055. var $1,$2,$3,$4,$5,$6,$7;
  1056. globals.TabManager.superclass.fn.prototype._initialize.apply(_st(self), []);
  1057. _st($Inspector())._register_($IDEInspector());
  1058. self["@opened"]=true;
  1059. $1=(function(html){
  1060. return smalltalk.withContext(function($ctx2) {
  1061. return _st(_st(html)._div())._id_("amber");
  1062. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})});
  1063. $2="body"._asJQuery();
  1064. $ctx1.sendIdx["asJQuery"]=1;
  1065. _st($1)._appendToJQuery_($2);
  1066. $ctx1.sendIdx["appendToJQuery:"]=1;
  1067. $3="body"._asJQuery();
  1068. $ctx1.sendIdx["asJQuery"]=2;
  1069. _st($3)._addClass_("amberBody");
  1070. self._appendToJQuery_("#amber"._asJQuery());
  1071. self._addTab_(_st($IDETranscript())._current());
  1072. $ctx1.sendIdx["addTab:"]=1;
  1073. $4=_st($Workspace())._new();
  1074. $ctx1.sendIdx["new"]=1;
  1075. self._addTab_($4);
  1076. $ctx1.sendIdx["addTab:"]=2;
  1077. $5=self._addTab_(_st($TestRunner())._new());
  1078. self._selectTab_(_st(self._tabs())._last());
  1079. self._onResize_((function(){
  1080. return smalltalk.withContext(function($ctx2) {
  1081. self._updateBodyMargin();
  1082. $6=self._updatePosition();
  1083. $ctx2.sendIdx["updatePosition"]=1;
  1084. return $6;
  1085. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  1086. $7=self._onWindowResize_((function(){
  1087. return smalltalk.withContext(function($ctx2) {
  1088. return self._updatePosition();
  1089. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  1090. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.TabManager)})},
  1091. args: [],
  1092. 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 ]",
  1093. messageSends: ["initialize", "register:", "appendToJQuery:", "id:", "div", "asJQuery", "addClass:", "addTab:", "current", "new", "selectTab:", "last", "tabs", "onResize:", "updateBodyMargin", "updatePosition", "onWindowResize:"],
  1094. referencedClasses: ["Inspector", "IDEInspector", "IDETranscript", "Workspace", "TestRunner"]
  1095. }),
  1096. globals.TabManager);
  1097. smalltalk.addMethod(
  1098. smalltalk.method({
  1099. selector: "labelFor:",
  1100. protocol: 'accessing',
  1101. fn: function (aWidget){
  1102. var self=this;
  1103. var label,maxSize;
  1104. return smalltalk.withContext(function($ctx1) {
  1105. var $1,$4,$3,$2,$5,$6;
  1106. maxSize=(15);
  1107. $1=_st(aWidget)._label();
  1108. $ctx1.sendIdx["label"]=1;
  1109. $4=_st(aWidget)._label();
  1110. $ctx1.sendIdx["label"]=2;
  1111. $3=_st($4)._size();
  1112. $ctx1.sendIdx["size"]=1;
  1113. $2=_st($3)._min_(maxSize);
  1114. label=_st($1)._copyFrom_to_((0),$2);
  1115. $5=_st(_st(_st(aWidget)._label())._size()).__gt(maxSize);
  1116. if(smalltalk.assert($5)){
  1117. label=_st(label).__comma("...");
  1118. label;
  1119. };
  1120. $6=label;
  1121. return $6;
  1122. }, function($ctx1) {$ctx1.fill(self,"labelFor:",{aWidget:aWidget,label:label,maxSize:maxSize},globals.TabManager)})},
  1123. args: ["aWidget"],
  1124. 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",
  1125. messageSends: ["copyFrom:to:", "label", "min:", "size", "ifTrue:", ">", ","],
  1126. referencedClasses: []
  1127. }),
  1128. globals.TabManager);
  1129. smalltalk.addMethod(
  1130. smalltalk.method({
  1131. selector: "newBrowserTab",
  1132. protocol: 'actions',
  1133. fn: function (){
  1134. var self=this;
  1135. function $Browser(){return globals.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1136. return smalltalk.withContext(function($ctx1) {
  1137. _st($Browser())._open();
  1138. return self}, function($ctx1) {$ctx1.fill(self,"newBrowserTab",{},globals.TabManager)})},
  1139. args: [],
  1140. source: "newBrowserTab\x0a\x09Browser open",
  1141. messageSends: ["open"],
  1142. referencedClasses: ["Browser"]
  1143. }),
  1144. globals.TabManager);
  1145. smalltalk.addMethod(
  1146. smalltalk.method({
  1147. selector: "onResize:",
  1148. protocol: 'actions',
  1149. fn: function (aBlock){
  1150. var self=this;
  1151. return smalltalk.withContext(function($ctx1) {
  1152. var $1,$3,$4,$2;
  1153. $1="#amber"._asJQuery();
  1154. $3="handles".__minus_gt("n");
  1155. $ctx1.sendIdx["->"]=1;
  1156. $4="resize".__minus_gt(aBlock);
  1157. $ctx1.sendIdx["->"]=2;
  1158. $2=globals.HashedCollection._from_([$3,$4,"minHeight".__minus_gt((230))]);
  1159. _st($1)._resizable_($2);
  1160. return self}, function($ctx1) {$ctx1.fill(self,"onResize:",{aBlock:aBlock},globals.TabManager)})},
  1161. args: ["aBlock"],
  1162. 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}",
  1163. messageSends: ["resizable:", "asJQuery", "->"],
  1164. referencedClasses: []
  1165. }),
  1166. globals.TabManager);
  1167. smalltalk.addMethod(
  1168. smalltalk.method({
  1169. selector: "onWindowResize:",
  1170. protocol: 'actions',
  1171. fn: function (aBlock){
  1172. var self=this;
  1173. return smalltalk.withContext(function($ctx1) {
  1174. _st(_st(window)._asJQuery())._resize_(aBlock);
  1175. return self}, function($ctx1) {$ctx1.fill(self,"onWindowResize:",{aBlock:aBlock},globals.TabManager)})},
  1176. args: ["aBlock"],
  1177. source: "onWindowResize: aBlock\x0a\x09window asJQuery resize: aBlock",
  1178. messageSends: ["resize:", "asJQuery"],
  1179. referencedClasses: []
  1180. }),
  1181. globals.TabManager);
  1182. smalltalk.addMethod(
  1183. smalltalk.method({
  1184. selector: "open",
  1185. protocol: 'actions',
  1186. fn: function (){
  1187. var self=this;
  1188. return smalltalk.withContext(function($ctx1) {
  1189. var $1,$2,$3;
  1190. $1=self["@opened"];
  1191. if(! smalltalk.assert($1)){
  1192. $2="body"._asJQuery();
  1193. $ctx1.sendIdx["asJQuery"]=1;
  1194. _st($2)._addClass_("amberBody");
  1195. $3="#amber"._asJQuery();
  1196. $ctx1.sendIdx["asJQuery"]=2;
  1197. _st($3)._show();
  1198. $ctx1.sendIdx["show"]=1;
  1199. _st(_st(self["@ul"])._asJQuery())._show();
  1200. $ctx1.sendIdx["show"]=2;
  1201. self._updateBodyMargin();
  1202. _st(self["@selectedTab"])._show();
  1203. self["@opened"]=true;
  1204. self["@opened"];
  1205. };
  1206. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.TabManager)})},
  1207. args: [],
  1208. 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 ]",
  1209. messageSends: ["ifFalse:", "addClass:", "asJQuery", "show", "updateBodyMargin"],
  1210. referencedClasses: []
  1211. }),
  1212. globals.TabManager);
  1213. smalltalk.addMethod(
  1214. smalltalk.method({
  1215. selector: "removeBodyMargin",
  1216. protocol: 'actions',
  1217. fn: function (){
  1218. var self=this;
  1219. return smalltalk.withContext(function($ctx1) {
  1220. self._setBodyMargin_((0));
  1221. return self}, function($ctx1) {$ctx1.fill(self,"removeBodyMargin",{},globals.TabManager)})},
  1222. args: [],
  1223. source: "removeBodyMargin\x0a\x09self setBodyMargin: 0",
  1224. messageSends: ["setBodyMargin:"],
  1225. referencedClasses: []
  1226. }),
  1227. globals.TabManager);
  1228. smalltalk.addMethod(
  1229. smalltalk.method({
  1230. selector: "removeTab:",
  1231. protocol: 'adding/Removing',
  1232. fn: function (aWidget){
  1233. var self=this;
  1234. return smalltalk.withContext(function($ctx1) {
  1235. _st(self._tabs())._remove_(aWidget);
  1236. self._update();
  1237. return self}, function($ctx1) {$ctx1.fill(self,"removeTab:",{aWidget:aWidget},globals.TabManager)})},
  1238. args: ["aWidget"],
  1239. source: "removeTab: aWidget\x0a\x09self tabs remove: aWidget.\x0a\x09self update",
  1240. messageSends: ["remove:", "tabs", "update"],
  1241. referencedClasses: []
  1242. }),
  1243. globals.TabManager);
  1244. smalltalk.addMethod(
  1245. smalltalk.method({
  1246. selector: "renderOn:",
  1247. protocol: 'rendering',
  1248. fn: function (html){
  1249. var self=this;
  1250. return smalltalk.withContext(function($ctx1) {
  1251. var $1,$2;
  1252. _st(_st(html)._div())._id_("logo");
  1253. $ctx1.sendIdx["id:"]=1;
  1254. self._renderToolbarOn_(html);
  1255. $1=_st(html)._ul();
  1256. _st($1)._id_("amberTabs");
  1257. $2=_st($1)._yourself();
  1258. self["@ul"]=$2;
  1259. self._renderTabs();
  1260. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},globals.TabManager)})},
  1261. args: ["html"],
  1262. 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",
  1263. messageSends: ["id:", "div", "renderToolbarOn:", "ul", "yourself", "renderTabs"],
  1264. referencedClasses: []
  1265. }),
  1266. globals.TabManager);
  1267. smalltalk.addMethod(
  1268. smalltalk.method({
  1269. selector: "renderTabFor:on:",
  1270. protocol: 'rendering',
  1271. fn: function (aWidget,html){
  1272. var self=this;
  1273. var li;
  1274. return smalltalk.withContext(function($ctx1) {
  1275. var $1,$2,$3,$4,$6,$7,$8,$9,$5,$10;
  1276. li=_st(html)._li();
  1277. $1=_st(self["@selectedTab"]).__eq(aWidget);
  1278. if(smalltalk.assert($1)){
  1279. _st(li)._class_("selected");
  1280. $ctx1.sendIdx["class:"]=1;
  1281. };
  1282. $2=li;
  1283. _st($2)._with_((function(){
  1284. return smalltalk.withContext(function($ctx2) {
  1285. $3=_st(html)._span();
  1286. $ctx2.sendIdx["span"]=1;
  1287. _st($3)._class_("ltab");
  1288. $ctx2.sendIdx["class:"]=2;
  1289. $4=_st(html)._span();
  1290. $ctx2.sendIdx["span"]=2;
  1291. _st($4)._class_("mtab");
  1292. $ctx2.sendIdx["class:"]=3;
  1293. $5=_st($4)._with_((function(){
  1294. return smalltalk.withContext(function($ctx3) {
  1295. $6=_st(aWidget)._canBeClosed();
  1296. if(smalltalk.assert($6)){
  1297. $7=_st(html)._span();
  1298. $ctx3.sendIdx["span"]=3;
  1299. _st($7)._class_("close");
  1300. $ctx3.sendIdx["class:"]=4;
  1301. _st($7)._with_("x");
  1302. $ctx3.sendIdx["with:"]=3;
  1303. $8=_st($7)._onClick_((function(){
  1304. return smalltalk.withContext(function($ctx4) {
  1305. return self._closeTab_(aWidget);
  1306. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  1307. $ctx3.sendIdx["onClick:"]=1;
  1308. $8;
  1309. };
  1310. $9=_st(html)._span();
  1311. $ctx3.sendIdx["span"]=4;
  1312. return _st($9)._with_(self._labelFor_(aWidget));
  1313. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1314. $ctx2.sendIdx["with:"]=2;
  1315. $5;
  1316. return _st(_st(html)._span())._class_("rtab");
  1317. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  1318. $ctx1.sendIdx["with:"]=1;
  1319. $10=_st($2)._onClick_((function(){
  1320. return smalltalk.withContext(function($ctx2) {
  1321. return self._selectTab_(aWidget);
  1322. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)})}));
  1323. return self}, function($ctx1) {$ctx1.fill(self,"renderTabFor:on:",{aWidget:aWidget,html:html,li:li},globals.TabManager)})},
  1324. args: ["aWidget", "html"],
  1325. 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 ]",
  1326. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "span", "canBeClosed", "onClick:", "closeTab:", "labelFor:", "selectTab:"],
  1327. referencedClasses: []
  1328. }),
  1329. globals.TabManager);
  1330. smalltalk.addMethod(
  1331. smalltalk.method({
  1332. selector: "renderTabs",
  1333. protocol: 'rendering',
  1334. fn: function (){
  1335. var self=this;
  1336. return smalltalk.withContext(function($ctx1) {
  1337. var $1,$2,$3,$4,$5;
  1338. _st(self["@ul"])._contents_((function(html){
  1339. return smalltalk.withContext(function($ctx2) {
  1340. _st(self._tabs())._do_((function(each){
  1341. return smalltalk.withContext(function($ctx3) {
  1342. return self._renderTabFor_on_(each,html);
  1343. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  1344. $1=_st(html)._li();
  1345. _st($1)._class_("newtab");
  1346. $ctx2.sendIdx["class:"]=1;
  1347. _st($1)._with_((function(){
  1348. return smalltalk.withContext(function($ctx3) {
  1349. $2=_st(html)._span();
  1350. $ctx3.sendIdx["span"]=1;
  1351. _st($2)._class_("ltab");
  1352. $ctx3.sendIdx["class:"]=2;
  1353. $3=_st(html)._span();
  1354. $ctx3.sendIdx["span"]=2;
  1355. _st($3)._class_("mtab");
  1356. $ctx3.sendIdx["class:"]=3;
  1357. $4=_st($3)._with_(" + ");
  1358. $4;
  1359. return _st(_st(html)._span())._class_("rtab");
  1360. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1361. $ctx2.sendIdx["with:"]=1;
  1362. $5=_st($1)._onClick_((function(){
  1363. return smalltalk.withContext(function($ctx3) {
  1364. return self._newBrowserTab();
  1365. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  1366. return $5;
  1367. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  1368. return self}, function($ctx1) {$ctx1.fill(self,"renderTabs",{},globals.TabManager)})},
  1369. args: [],
  1370. 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 ]]",
  1371. messageSends: ["contents:", "do:", "tabs", "renderTabFor:on:", "class:", "li", "with:", "span", "onClick:", "newBrowserTab"],
  1372. referencedClasses: []
  1373. }),
  1374. globals.TabManager);
  1375. smalltalk.addMethod(
  1376. smalltalk.method({
  1377. selector: "renderToolbarOn:",
  1378. protocol: 'rendering',
  1379. fn: function (html){
  1380. var self=this;
  1381. return smalltalk.withContext(function($ctx1) {
  1382. var $1,$3,$4,$5,$6,$7,$2;
  1383. $1=_st(html)._div();
  1384. $ctx1.sendIdx["div"]=1;
  1385. _st($1)._id_("amber_toolbar");
  1386. $ctx1.sendIdx["id:"]=1;
  1387. $2=_st($1)._with_((function(){
  1388. return smalltalk.withContext(function($ctx2) {
  1389. $3=_st(html)._input();
  1390. _st($3)._class_("implementors");
  1391. $4=_st($3)._yourself();
  1392. self["@input"]=$4;
  1393. self["@input"];
  1394. _st(self["@input"])._onKeyPress_((function(event){
  1395. return smalltalk.withContext(function($ctx3) {
  1396. $5=_st(_st(event)._keyCode()).__eq((13));
  1397. if(smalltalk.assert($5)){
  1398. return self._search_(_st(_st(self["@input"])._asJQuery())._val());
  1399. };
  1400. }, function($ctx3) {$ctx3.fillBlock({event:event},$ctx2,2)})}));
  1401. $6=_st(html)._div();
  1402. _st($6)._id_("amber_close");
  1403. $7=_st($6)._onClick_((function(){
  1404. return smalltalk.withContext(function($ctx3) {
  1405. return self._close();
  1406. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  1407. return $7;
  1408. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1409. return self}, function($ctx1) {$ctx1.fill(self,"renderToolbarOn:",{html:html},globals.TabManager)})},
  1410. args: ["html"],
  1411. 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 ]]",
  1412. messageSends: ["id:", "div", "with:", "class:", "input", "yourself", "onKeyPress:", "ifTrue:", "=", "keyCode", "search:", "val", "asJQuery", "onClick:", "close"],
  1413. referencedClasses: []
  1414. }),
  1415. globals.TabManager);
  1416. smalltalk.addMethod(
  1417. smalltalk.method({
  1418. selector: "search:",
  1419. protocol: 'actions',
  1420. fn: function (aString){
  1421. var self=this;
  1422. var searchedClass;
  1423. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1424. function $Browser(){return globals.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1425. function $ReferencesBrowser(){return globals.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  1426. return smalltalk.withContext(function($ctx1) {
  1427. var $1;
  1428. searchedClass=_st(_st($Smalltalk())._globals())._at_(aString);
  1429. $1=_st(searchedClass)._isClass();
  1430. if(smalltalk.assert($1)){
  1431. _st($Browser())._openOn_(searchedClass);
  1432. } else {
  1433. _st($ReferencesBrowser())._search_(aString);
  1434. };
  1435. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString,searchedClass:searchedClass},globals.TabManager)})},
  1436. args: ["aString"],
  1437. 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 ]",
  1438. messageSends: ["at:", "globals", "ifTrue:ifFalse:", "isClass", "openOn:", "search:"],
  1439. referencedClasses: ["Smalltalk", "Browser", "ReferencesBrowser"]
  1440. }),
  1441. globals.TabManager);
  1442. smalltalk.addMethod(
  1443. smalltalk.method({
  1444. selector: "selectTab:",
  1445. protocol: 'actions',
  1446. fn: function (aWidget){
  1447. var self=this;
  1448. return smalltalk.withContext(function($ctx1) {
  1449. self._open();
  1450. self["@selectedTab"]=aWidget;
  1451. _st(self._tabs())._do_((function(each){
  1452. return smalltalk.withContext(function($ctx2) {
  1453. return _st(each)._hide();
  1454. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  1455. _st(aWidget)._show();
  1456. self._update();
  1457. return self}, function($ctx1) {$ctx1.fill(self,"selectTab:",{aWidget:aWidget},globals.TabManager)})},
  1458. args: ["aWidget"],
  1459. 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",
  1460. messageSends: ["open", "do:", "tabs", "hide", "show", "update"],
  1461. referencedClasses: []
  1462. }),
  1463. globals.TabManager);
  1464. smalltalk.addMethod(
  1465. smalltalk.method({
  1466. selector: "setBodyMargin:",
  1467. protocol: 'actions',
  1468. fn: function (anInteger){
  1469. var self=this;
  1470. return smalltalk.withContext(function($ctx1) {
  1471. _st(".amberBody"._asJQuery())._css_put_("margin-bottom",_st(_st(anInteger)._asString()).__comma("px"));
  1472. return self}, function($ctx1) {$ctx1.fill(self,"setBodyMargin:",{anInteger:anInteger},globals.TabManager)})},
  1473. args: ["anInteger"],
  1474. source: "setBodyMargin: anInteger\x0a\x09'.amberBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'",
  1475. messageSends: ["css:put:", "asJQuery", ",", "asString"],
  1476. referencedClasses: []
  1477. }),
  1478. globals.TabManager);
  1479. smalltalk.addMethod(
  1480. smalltalk.method({
  1481. selector: "tabs",
  1482. protocol: 'accessing',
  1483. fn: function (){
  1484. var self=this;
  1485. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  1486. return smalltalk.withContext(function($ctx1) {
  1487. var $2,$1;
  1488. $2=self["@tabs"];
  1489. if(($receiver = $2) == nil || $receiver == null){
  1490. self["@tabs"]=_st($Array())._new();
  1491. $1=self["@tabs"];
  1492. } else {
  1493. $1=$2;
  1494. };
  1495. return $1;
  1496. }, function($ctx1) {$ctx1.fill(self,"tabs",{},globals.TabManager)})},
  1497. args: [],
  1498. source: "tabs\x0a\x09^ tabs ifNil: [ tabs := Array new ]",
  1499. messageSends: ["ifNil:", "new"],
  1500. referencedClasses: ["Array"]
  1501. }),
  1502. globals.TabManager);
  1503. smalltalk.addMethod(
  1504. smalltalk.method({
  1505. selector: "update",
  1506. protocol: 'updating',
  1507. fn: function (){
  1508. var self=this;
  1509. return smalltalk.withContext(function($ctx1) {
  1510. self._renderTabs();
  1511. return self}, function($ctx1) {$ctx1.fill(self,"update",{},globals.TabManager)})},
  1512. args: [],
  1513. source: "update\x0a\x09self renderTabs",
  1514. messageSends: ["renderTabs"],
  1515. referencedClasses: []
  1516. }),
  1517. globals.TabManager);
  1518. smalltalk.addMethod(
  1519. smalltalk.method({
  1520. selector: "updateBodyMargin",
  1521. protocol: 'actions',
  1522. fn: function (){
  1523. var self=this;
  1524. return smalltalk.withContext(function($ctx1) {
  1525. self._setBodyMargin_(_st("#amber"._asJQuery())._height());
  1526. return self}, function($ctx1) {$ctx1.fill(self,"updateBodyMargin",{},globals.TabManager)})},
  1527. args: [],
  1528. source: "updateBodyMargin\x0a\x09self setBodyMargin: '#amber' asJQuery height",
  1529. messageSends: ["setBodyMargin:", "height", "asJQuery"],
  1530. referencedClasses: []
  1531. }),
  1532. globals.TabManager);
  1533. smalltalk.addMethod(
  1534. smalltalk.method({
  1535. selector: "updatePosition",
  1536. protocol: 'actions',
  1537. fn: function (){
  1538. var self=this;
  1539. return smalltalk.withContext(function($ctx1) {
  1540. var $1,$2;
  1541. $1="#amber"._asJQuery();
  1542. _st($1)._css_put_("top","");
  1543. $ctx1.sendIdx["css:put:"]=1;
  1544. $2=_st($1)._css_put_("bottom","0px");
  1545. return self}, function($ctx1) {$ctx1.fill(self,"updatePosition",{},globals.TabManager)})},
  1546. args: [],
  1547. source: "updatePosition\x0a\x09'#amber' asJQuery\x0a\x09\x09css: 'top' put: '';\x0a\x09\x09css: 'bottom' put: '0px'",
  1548. messageSends: ["css:put:", "asJQuery"],
  1549. referencedClasses: []
  1550. }),
  1551. globals.TabManager);
  1552. globals.TabManager.klass.iVarNames = ['current'];
  1553. smalltalk.addMethod(
  1554. smalltalk.method({
  1555. selector: "current",
  1556. protocol: 'instance creation',
  1557. fn: function (){
  1558. var self=this;
  1559. return smalltalk.withContext(function($ctx1) {
  1560. var $2,$1;
  1561. $2=self["@current"];
  1562. if(($receiver = $2) == nil || $receiver == null){
  1563. self["@current"]=globals.TabManager.klass.superclass.fn.prototype._new.apply(_st(self), []);
  1564. $1=self["@current"];
  1565. } else {
  1566. $1=$2;
  1567. };
  1568. return $1;
  1569. }, function($ctx1) {$ctx1.fill(self,"current",{},globals.TabManager.klass)})},
  1570. args: [],
  1571. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  1572. messageSends: ["ifNil:", "new"],
  1573. referencedClasses: []
  1574. }),
  1575. globals.TabManager.klass);
  1576. smalltalk.addMethod(
  1577. smalltalk.method({
  1578. selector: "new",
  1579. protocol: 'instance creation',
  1580. fn: function (){
  1581. var self=this;
  1582. return smalltalk.withContext(function($ctx1) {
  1583. self._shouldNotImplement();
  1584. return self}, function($ctx1) {$ctx1.fill(self,"new",{},globals.TabManager.klass)})},
  1585. args: [],
  1586. source: "new\x0a\x09self shouldNotImplement",
  1587. messageSends: ["shouldNotImplement"],
  1588. referencedClasses: []
  1589. }),
  1590. globals.TabManager.klass);
  1591. smalltalk.addMethod(
  1592. smalltalk.method({
  1593. selector: "toggleAmberIDE",
  1594. protocol: 'actions',
  1595. fn: function (){
  1596. var self=this;
  1597. function $Browser(){return globals.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1598. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1599. return smalltalk.withContext(function($ctx1) {
  1600. var $3,$2,$1,$4,$5;
  1601. $3="#amber"._asJQuery();
  1602. $ctx1.sendIdx["asJQuery"]=1;
  1603. $2=_st($3)._length();
  1604. $1=_st($2).__eq((0));
  1605. if(smalltalk.assert($1)){
  1606. _st($Browser())._open();
  1607. $ctx1.sendIdx["open"]=1;
  1608. } else {
  1609. $4=_st("#amber"._asJQuery())._is_(":visible");
  1610. if(smalltalk.assert($4)){
  1611. $5=_st($TabManager())._current();
  1612. $ctx1.sendIdx["current"]=1;
  1613. _st($5)._close();
  1614. } else {
  1615. _st(_st($TabManager())._current())._open();
  1616. };
  1617. };
  1618. return self}, function($ctx1) {$ctx1.fill(self,"toggleAmberIDE",{},globals.TabManager.klass)})},
  1619. args: [],
  1620. 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 ] ]",
  1621. messageSends: ["ifTrue:ifFalse:", "=", "length", "asJQuery", "open", "is:", "close", "current"],
  1622. referencedClasses: ["Browser", "TabManager"]
  1623. }),
  1624. globals.TabManager.klass);
  1625. smalltalk.addClass('TabWidget', globals.Widget, ['div'], 'IDE');
  1626. smalltalk.addMethod(
  1627. smalltalk.method({
  1628. selector: "canBeClosed",
  1629. protocol: 'testing',
  1630. fn: function (){
  1631. var self=this;
  1632. return false;
  1633. },
  1634. args: [],
  1635. source: "canBeClosed\x0a\x09^ false",
  1636. messageSends: [],
  1637. referencedClasses: []
  1638. }),
  1639. globals.TabWidget);
  1640. smalltalk.addMethod(
  1641. smalltalk.method({
  1642. selector: "close",
  1643. protocol: 'actions',
  1644. fn: function (){
  1645. var self=this;
  1646. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1647. return smalltalk.withContext(function($ctx1) {
  1648. _st(_st($TabManager())._current())._closeTab_(self);
  1649. return self}, function($ctx1) {$ctx1.fill(self,"close",{},globals.TabWidget)})},
  1650. args: [],
  1651. source: "close\x0a\x09TabManager current closeTab: self",
  1652. messageSends: ["closeTab:", "current"],
  1653. referencedClasses: ["TabManager"]
  1654. }),
  1655. globals.TabWidget);
  1656. smalltalk.addMethod(
  1657. smalltalk.method({
  1658. selector: "hide",
  1659. protocol: 'actions',
  1660. fn: function (){
  1661. var self=this;
  1662. return smalltalk.withContext(function($ctx1) {
  1663. _st(_st(self["@div"])._asJQuery())._hide();
  1664. return self}, function($ctx1) {$ctx1.fill(self,"hide",{},globals.TabWidget)})},
  1665. args: [],
  1666. source: "hide\x0a\x09div asJQuery hide",
  1667. messageSends: ["hide", "asJQuery"],
  1668. referencedClasses: []
  1669. }),
  1670. globals.TabWidget);
  1671. smalltalk.addMethod(
  1672. smalltalk.method({
  1673. selector: "label",
  1674. protocol: 'accessing',
  1675. fn: function (){
  1676. var self=this;
  1677. return smalltalk.withContext(function($ctx1) {
  1678. self._subclassResponsibility();
  1679. return self}, function($ctx1) {$ctx1.fill(self,"label",{},globals.TabWidget)})},
  1680. args: [],
  1681. source: "label\x0a\x09self subclassResponsibility",
  1682. messageSends: ["subclassResponsibility"],
  1683. referencedClasses: []
  1684. }),
  1685. globals.TabWidget);
  1686. smalltalk.addMethod(
  1687. smalltalk.method({
  1688. selector: "open",
  1689. protocol: 'actions',
  1690. fn: function (){
  1691. var self=this;
  1692. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1693. return smalltalk.withContext(function($ctx1) {
  1694. var $1;
  1695. $1=_st($TabManager())._current();
  1696. $ctx1.sendIdx["current"]=1;
  1697. _st($1)._addTab_(self);
  1698. _st(_st($TabManager())._current())._selectTab_(self);
  1699. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.TabWidget)})},
  1700. args: [],
  1701. source: "open\x0a\x09TabManager current addTab: self.\x0a\x09TabManager current selectTab: self",
  1702. messageSends: ["addTab:", "current", "selectTab:"],
  1703. referencedClasses: ["TabManager"]
  1704. }),
  1705. globals.TabWidget);
  1706. smalltalk.addMethod(
  1707. smalltalk.method({
  1708. selector: "remove",
  1709. protocol: 'actions',
  1710. fn: function (){
  1711. var self=this;
  1712. return smalltalk.withContext(function($ctx1) {
  1713. _st(_st(self["@div"])._asJQuery())._remove();
  1714. return self}, function($ctx1) {$ctx1.fill(self,"remove",{},globals.TabWidget)})},
  1715. args: [],
  1716. source: "remove\x0a\x09div asJQuery remove",
  1717. messageSends: ["remove", "asJQuery"],
  1718. referencedClasses: []
  1719. }),
  1720. globals.TabWidget);
  1721. smalltalk.addMethod(
  1722. smalltalk.method({
  1723. selector: "renderBoxOn:",
  1724. protocol: 'rendering',
  1725. fn: function (html){
  1726. var self=this;
  1727. return self},
  1728. args: ["html"],
  1729. source: "renderBoxOn: html",
  1730. messageSends: [],
  1731. referencedClasses: []
  1732. }),
  1733. globals.TabWidget);
  1734. smalltalk.addMethod(
  1735. smalltalk.method({
  1736. selector: "renderButtonsOn:",
  1737. protocol: 'rendering',
  1738. fn: function (html){
  1739. var self=this;
  1740. return self},
  1741. args: ["html"],
  1742. source: "renderButtonsOn: html",
  1743. messageSends: [],
  1744. referencedClasses: []
  1745. }),
  1746. globals.TabWidget);
  1747. smalltalk.addMethod(
  1748. smalltalk.method({
  1749. selector: "renderOn:",
  1750. protocol: 'rendering',
  1751. fn: function (html){
  1752. var self=this;
  1753. return smalltalk.withContext(function($ctx1) {
  1754. var $1,$2;
  1755. $1=_st(html)._div();
  1756. _st($1)._class_("amberTool");
  1757. $2=_st($1)._yourself();
  1758. self["@div"]=$2;
  1759. self._renderTab();
  1760. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},globals.TabWidget)})},
  1761. args: ["html"],
  1762. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'amberTool';\x0a\x09\x09yourself.\x0a\x09self renderTab",
  1763. messageSends: ["class:", "div", "yourself", "renderTab"],
  1764. referencedClasses: []
  1765. }),
  1766. globals.TabWidget);
  1767. smalltalk.addMethod(
  1768. smalltalk.method({
  1769. selector: "renderTab",
  1770. protocol: 'rendering',
  1771. fn: function (){
  1772. var self=this;
  1773. return smalltalk.withContext(function($ctx1) {
  1774. var $1,$2,$3,$4;
  1775. _st(self["@div"])._contents_((function(html){
  1776. return smalltalk.withContext(function($ctx2) {
  1777. $1=_st(html)._div();
  1778. $ctx2.sendIdx["div"]=1;
  1779. _st($1)._class_("amber_box");
  1780. $ctx2.sendIdx["class:"]=1;
  1781. $2=_st($1)._with_((function(){
  1782. return smalltalk.withContext(function($ctx3) {
  1783. return self._renderBoxOn_(html);
  1784. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  1785. $ctx2.sendIdx["with:"]=1;
  1786. $2;
  1787. $3=_st(html)._div();
  1788. _st($3)._class_("amber_buttons");
  1789. $4=_st($3)._with_((function(){
  1790. return smalltalk.withContext(function($ctx3) {
  1791. return self._renderButtonsOn_(html);
  1792. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1793. return $4;
  1794. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  1795. return self}, function($ctx1) {$ctx1.fill(self,"renderTab",{},globals.TabWidget)})},
  1796. args: [],
  1797. 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 ]]",
  1798. messageSends: ["contents:", "class:", "div", "with:", "renderBoxOn:", "renderButtonsOn:"],
  1799. referencedClasses: []
  1800. }),
  1801. globals.TabWidget);
  1802. smalltalk.addMethod(
  1803. smalltalk.method({
  1804. selector: "show",
  1805. protocol: 'actions',
  1806. fn: function (){
  1807. var self=this;
  1808. return smalltalk.withContext(function($ctx1) {
  1809. _st(_st(self["@div"])._asJQuery())._show();
  1810. return self}, function($ctx1) {$ctx1.fill(self,"show",{},globals.TabWidget)})},
  1811. args: [],
  1812. source: "show\x0a\x09div asJQuery show",
  1813. messageSends: ["show", "asJQuery"],
  1814. referencedClasses: []
  1815. }),
  1816. globals.TabWidget);
  1817. smalltalk.addMethod(
  1818. smalltalk.method({
  1819. selector: "update",
  1820. protocol: 'rendering',
  1821. fn: function (){
  1822. var self=this;
  1823. return smalltalk.withContext(function($ctx1) {
  1824. self._renderTab();
  1825. return self}, function($ctx1) {$ctx1.fill(self,"update",{},globals.TabWidget)})},
  1826. args: [],
  1827. source: "update\x0a\x09self renderTab",
  1828. messageSends: ["renderTab"],
  1829. referencedClasses: []
  1830. }),
  1831. globals.TabWidget);
  1832. smalltalk.addMethod(
  1833. smalltalk.method({
  1834. selector: "open",
  1835. protocol: 'instance creation',
  1836. fn: function (){
  1837. var self=this;
  1838. return smalltalk.withContext(function($ctx1) {
  1839. var $1;
  1840. $1=_st(self._new())._open();
  1841. return $1;
  1842. }, function($ctx1) {$ctx1.fill(self,"open",{},globals.TabWidget.klass)})},
  1843. args: [],
  1844. source: "open\x0a\x09^ self new open",
  1845. messageSends: ["open", "new"],
  1846. referencedClasses: []
  1847. }),
  1848. globals.TabWidget.klass);
  1849. smalltalk.addClass('Browser', globals.TabWidget, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'packagesList', 'classesList', 'protocolsList', 'methodsList', 'sourceArea', 'tabsList', 'selectedTab', 'saveButton', 'classButtons', 'methodButtons', 'unsavedChanges'], 'IDE');
  1850. smalltalk.addMethod(
  1851. smalltalk.method({
  1852. selector: "addInstanceVariableNamed:toClass:",
  1853. protocol: 'actions',
  1854. fn: function (aString,aClass){
  1855. var self=this;
  1856. function $ClassBuilder(){return globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1857. return smalltalk.withContext(function($ctx1) {
  1858. var $1,$2,$3,$4,$5;
  1859. $1=_st($ClassBuilder())._new();
  1860. $2=_st(aClass)._superclass();
  1861. $3=_st(aClass)._name();
  1862. $ctx1.sendIdx["name"]=1;
  1863. $4=_st(_st(aClass)._instanceVariableNames())._copy();
  1864. _st($4)._add_(aString);
  1865. $5=_st($4)._yourself();
  1866. _st($1)._addSubclassOf_named_instanceVariableNames_package_($2,$3,$5,_st(_st(aClass)._package())._name());
  1867. return self}, function($ctx1) {$ctx1.fill(self,"addInstanceVariableNamed:toClass:",{aString:aString,aClass:aClass},globals.Browser)})},
  1868. args: ["aString", "aClass"],
  1869. 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",
  1870. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "new", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package"],
  1871. referencedClasses: ["ClassBuilder"]
  1872. }),
  1873. globals.Browser);
  1874. smalltalk.addMethod(
  1875. smalltalk.method({
  1876. selector: "addNewClass",
  1877. protocol: 'actions',
  1878. fn: function (){
  1879. var self=this;
  1880. var className;
  1881. function $Object(){return globals.Object||(typeof Object=="undefined"?nil:Object)}
  1882. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1883. return smalltalk.withContext(function($ctx1) {
  1884. var $1,$2;
  1885. className=self._prompt_("New class");
  1886. $1=_st(_st(className)._notNil())._and_((function(){
  1887. return smalltalk.withContext(function($ctx2) {
  1888. return _st(className)._notEmpty();
  1889. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1890. if(smalltalk.assert($1)){
  1891. _st($Object())._subclass_instanceVariableNames_package_(className,"",self._selectedPackage());
  1892. self._resetClassesList();
  1893. $2=self._updateClassesList();
  1894. $2;
  1895. self._selectClass_(_st(_st($Smalltalk())._globals())._at_(className));
  1896. };
  1897. return self}, function($ctx1) {$ctx1.fill(self,"addNewClass",{className:className},globals.Browser)})},
  1898. args: [],
  1899. source: "addNewClass\x0a\x09| className |\x0a\x09className := self 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) ]",
  1900. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "subclass:instanceVariableNames:package:", "selectedPackage", "resetClassesList", "updateClassesList", "selectClass:", "at:", "globals"],
  1901. referencedClasses: ["Object", "Smalltalk"]
  1902. }),
  1903. globals.Browser);
  1904. smalltalk.addMethod(
  1905. smalltalk.method({
  1906. selector: "addNewProtocol",
  1907. protocol: 'actions',
  1908. fn: function (){
  1909. var self=this;
  1910. var newProtocol;
  1911. return smalltalk.withContext(function($ctx1) {
  1912. var $1;
  1913. newProtocol=self._prompt_("New method protocol");
  1914. $1=_st(_st(newProtocol)._notNil())._and_((function(){
  1915. return smalltalk.withContext(function($ctx2) {
  1916. return _st(newProtocol)._notEmpty();
  1917. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1918. if(smalltalk.assert($1)){
  1919. _st(self["@selectedMethod"])._protocol_(newProtocol);
  1920. self._setMethodProtocol_(newProtocol);
  1921. };
  1922. return self}, function($ctx1) {$ctx1.fill(self,"addNewProtocol",{newProtocol:newProtocol},globals.Browser)})},
  1923. args: [],
  1924. source: "addNewProtocol\x0a\x09| newProtocol |\x0a\x09\x0a\x09newProtocol := self prompt: 'New method protocol'.\x0a\x09\x0a\x09(newProtocol notNil and: [ newProtocol notEmpty ]) ifTrue: [\x0a\x09\x09selectedMethod protocol: newProtocol.\x0a\x09\x09self setMethodProtocol: newProtocol ]",
  1925. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "protocol:", "setMethodProtocol:"],
  1926. referencedClasses: []
  1927. }),
  1928. globals.Browser);
  1929. smalltalk.addMethod(
  1930. smalltalk.method({
  1931. selector: "canBeClosed",
  1932. protocol: 'testing',
  1933. fn: function (){
  1934. var self=this;
  1935. return true;
  1936. },
  1937. args: [],
  1938. source: "canBeClosed\x0a\x09^ true",
  1939. messageSends: [],
  1940. referencedClasses: []
  1941. }),
  1942. globals.Browser);
  1943. smalltalk.addMethod(
  1944. smalltalk.method({
  1945. selector: "cancelChanges",
  1946. protocol: 'actions',
  1947. fn: function (){
  1948. var self=this;
  1949. return smalltalk.withContext(function($ctx1) {
  1950. var $2,$1;
  1951. $2=self["@unsavedChanges"];
  1952. if(smalltalk.assert($2)){
  1953. $1=self._confirm_("Cancel changes?");
  1954. } else {
  1955. $1=true;
  1956. };
  1957. return $1;
  1958. }, function($ctx1) {$ctx1.fill(self,"cancelChanges",{},globals.Browser)})},
  1959. args: [],
  1960. source: "cancelChanges\x0a\x09^ unsavedChanges\x0a\x09ifTrue: [ self confirm: 'Cancel changes?' ]\x0a\x09ifFalse: [ true ]",
  1961. messageSends: ["ifTrue:ifFalse:", "confirm:"],
  1962. referencedClasses: []
  1963. }),
  1964. globals.Browser);
  1965. smalltalk.addMethod(
  1966. smalltalk.method({
  1967. selector: "classCommentSource",
  1968. protocol: 'accessing',
  1969. fn: function (){
  1970. var self=this;
  1971. return smalltalk.withContext(function($ctx1) {
  1972. var $1;
  1973. $1=_st(self["@selectedClass"])._comment();
  1974. return $1;
  1975. }, function($ctx1) {$ctx1.fill(self,"classCommentSource",{},globals.Browser)})},
  1976. args: [],
  1977. source: "classCommentSource\x0a\x09^ selectedClass comment",
  1978. messageSends: ["comment"],
  1979. referencedClasses: []
  1980. }),
  1981. globals.Browser);
  1982. smalltalk.addMethod(
  1983. smalltalk.method({
  1984. selector: "classDeclarationSource",
  1985. protocol: 'accessing',
  1986. fn: function (){
  1987. var self=this;
  1988. var stream;
  1989. function $String(){return globals.String||(typeof String=="undefined"?nil:String)}
  1990. return smalltalk.withContext(function($ctx1) {
  1991. var $1,$2,$3,$4,$6,$7,$5,$8,$9,$10,$11,$12,$13;
  1992. stream=""._writeStream();
  1993. $1=self["@selectedClass"];
  1994. if(($receiver = $1) == nil || $receiver == null){
  1995. $2=self._classDeclarationTemplate();
  1996. return $2;
  1997. } else {
  1998. $1;
  1999. };
  2000. $3=stream;
  2001. _st($3)._nextPutAll_(_st(_st(self["@selectedClass"])._superclass())._asString());
  2002. $ctx1.sendIdx["nextPutAll:"]=1;
  2003. _st($3)._nextPutAll_(" subclass: #");
  2004. $ctx1.sendIdx["nextPutAll:"]=2;
  2005. _st($3)._nextPutAll_(_st(self["@selectedClass"])._name());
  2006. $ctx1.sendIdx["nextPutAll:"]=3;
  2007. $4=$3;
  2008. $6=_st($String())._lf();
  2009. $ctx1.sendIdx["lf"]=1;
  2010. $7=_st($String())._tab();
  2011. $ctx1.sendIdx["tab"]=1;
  2012. $5=_st($6).__comma($7);
  2013. $ctx1.sendIdx[","]=1;
  2014. _st($4)._nextPutAll_($5);
  2015. $ctx1.sendIdx["nextPutAll:"]=4;
  2016. $8=_st($3)._nextPutAll_("instanceVariableNames: '");
  2017. $ctx1.sendIdx["nextPutAll:"]=5;
  2018. _st(_st(self["@selectedClass"])._instanceVariableNames())._do_separatedBy_((function(each){
  2019. return smalltalk.withContext(function($ctx2) {
  2020. return _st(stream)._nextPutAll_(each);
  2021. $ctx2.sendIdx["nextPutAll:"]=6;
  2022. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
  2023. return smalltalk.withContext(function($ctx2) {
  2024. return _st(stream)._nextPutAll_(" ");
  2025. $ctx2.sendIdx["nextPutAll:"]=7;
  2026. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  2027. $9=stream;
  2028. $10=$9;
  2029. $11=_st("'".__comma(_st($String())._lf())).__comma(_st($String())._tab());
  2030. $ctx1.sendIdx[","]=2;
  2031. _st($10)._nextPutAll_($11);
  2032. $ctx1.sendIdx["nextPutAll:"]=8;
  2033. _st($9)._nextPutAll_("package: '");
  2034. $ctx1.sendIdx["nextPutAll:"]=9;
  2035. _st($9)._nextPutAll_(_st(self["@selectedClass"])._category());
  2036. $ctx1.sendIdx["nextPutAll:"]=10;
  2037. $12=_st($9)._nextPutAll_("'");
  2038. $13=_st(stream)._contents();
  2039. return $13;
  2040. }, function($ctx1) {$ctx1.fill(self,"classDeclarationSource",{stream:stream},globals.Browser)})},
  2041. args: [],
  2042. 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",
  2043. messageSends: ["writeStream", "ifNil:", "classDeclarationTemplate", "nextPutAll:", "asString", "superclass", "name", ",", "lf", "tab", "do:separatedBy:", "instanceVariableNames", "category", "contents"],
  2044. referencedClasses: ["String"]
  2045. }),
  2046. globals.Browser);
  2047. smalltalk.addMethod(
  2048. smalltalk.method({
  2049. selector: "classDeclarationTemplate",
  2050. protocol: 'accessing',
  2051. fn: function (){
  2052. var self=this;
  2053. return smalltalk.withContext(function($ctx1) {
  2054. var $1;
  2055. $1=_st("Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''\x0a\x09package: '".__comma(self._selectedPackage())).__comma("'");
  2056. $ctx1.sendIdx[","]=1;
  2057. return $1;
  2058. }, function($ctx1) {$ctx1.fill(self,"classDeclarationTemplate",{},globals.Browser)})},
  2059. args: [],
  2060. source: "classDeclarationTemplate\x0a\x09^ 'Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''''\x0a\x09package: ''', self selectedPackage, ''''",
  2061. messageSends: [",", "selectedPackage"],
  2062. referencedClasses: []
  2063. }),
  2064. globals.Browser);
  2065. smalltalk.addMethod(
  2066. smalltalk.method({
  2067. selector: "classes",
  2068. protocol: 'accessing',
  2069. fn: function (){
  2070. var self=this;
  2071. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2072. return smalltalk.withContext(function($ctx1) {
  2073. var $2,$1;
  2074. $1=_st(_st(_st(_st($Smalltalk())._classes())._select_((function(each){
  2075. return smalltalk.withContext(function($ctx2) {
  2076. return _st(_st(each)._category()).__eq(self["@selectedPackage"]);
  2077. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._sort_((function(a,b){
  2078. return smalltalk.withContext(function($ctx2) {
  2079. $2=_st(a)._name();
  2080. $ctx2.sendIdx["name"]=1;
  2081. return _st($2).__lt(_st(b)._name());
  2082. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)})})))._asSet();
  2083. return $1;
  2084. }, function($ctx1) {$ctx1.fill(self,"classes",{},globals.Browser)})},
  2085. args: [],
  2086. source: "classes\x0a\x09^ ((Smalltalk classes\x0a\x09select: [ :each | each category = selectedPackage ])\x0a\x09sort: [ :a :b | a name < b name ]) asSet",
  2087. messageSends: ["asSet", "sort:", "select:", "classes", "=", "category", "<", "name"],
  2088. referencedClasses: ["Smalltalk"]
  2089. }),
  2090. globals.Browser);
  2091. smalltalk.addMethod(
  2092. smalltalk.method({
  2093. selector: "commitPackage",
  2094. protocol: 'actions',
  2095. fn: function (){
  2096. var self=this;
  2097. function $Package(){return globals.Package||(typeof Package=="undefined"?nil:Package)}
  2098. return smalltalk.withContext(function($ctx1) {
  2099. var $1;
  2100. $1=self["@selectedPackage"];
  2101. if(($receiver = $1) == nil || $receiver == null){
  2102. $1;
  2103. } else {
  2104. _st(_st($Package())._named_(self["@selectedPackage"]))._commit();
  2105. };
  2106. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage",{},globals.Browser)})},
  2107. args: [],
  2108. source: "commitPackage\x0a\x09selectedPackage ifNotNil: [\x0a\x09\x09(Package named: selectedPackage) commit ]",
  2109. messageSends: ["ifNotNil:", "commit", "named:"],
  2110. referencedClasses: ["Package"]
  2111. }),
  2112. globals.Browser);
  2113. smalltalk.addMethod(
  2114. smalltalk.method({
  2115. selector: "compile",
  2116. protocol: 'actions',
  2117. fn: function (){
  2118. var self=this;
  2119. var currentEditLine;
  2120. return smalltalk.withContext(function($ctx1) {
  2121. var $1,$2,$3,$5,$4;
  2122. self._disableSaveButton();
  2123. $1=_st(self["@sourceArea"])._editor();
  2124. $ctx1.sendIdx["editor"]=1;
  2125. currentEditLine=_st($1)._getCursor();
  2126. $2=_st(self["@selectedTab"]).__eq("comment");
  2127. if(smalltalk.assert($2)){
  2128. $3=self["@selectedClass"];
  2129. if(($receiver = $3) == nil || $receiver == null){
  2130. $3;
  2131. } else {
  2132. self._compileClassComment();
  2133. };
  2134. } else {
  2135. $5=_st(self["@selectedProtocol"])._notNil();
  2136. $ctx1.sendIdx["notNil"]=1;
  2137. $4=_st($5)._or_((function(){
  2138. return smalltalk.withContext(function($ctx2) {
  2139. return _st(self["@selectedMethod"])._notNil();
  2140. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  2141. if(smalltalk.assert($4)){
  2142. self._compileMethodDefinition();
  2143. } else {
  2144. self._compileDefinition();
  2145. };
  2146. };
  2147. _st(_st(self["@sourceArea"])._editor())._setCursor_(currentEditLine);
  2148. return self}, function($ctx1) {$ctx1.fill(self,"compile",{currentEditLine:currentEditLine},globals.Browser)})},
  2149. args: [],
  2150. 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.",
  2151. messageSends: ["disableSaveButton", "getCursor", "editor", "ifTrue:ifFalse:", "=", "ifNotNil:", "compileClassComment", "ifFalse:ifTrue:", "or:", "notNil", "compileDefinition", "compileMethodDefinition", "setCursor:"],
  2152. referencedClasses: []
  2153. }),
  2154. globals.Browser);
  2155. smalltalk.addMethod(
  2156. smalltalk.method({
  2157. selector: "compileClassComment",
  2158. protocol: 'actions',
  2159. fn: function (){
  2160. var self=this;
  2161. return smalltalk.withContext(function($ctx1) {
  2162. _st(self["@selectedClass"])._comment_(_st(self["@sourceArea"])._val());
  2163. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment",{},globals.Browser)})},
  2164. args: [],
  2165. source: "compileClassComment\x0a\x09selectedClass comment: sourceArea val",
  2166. messageSends: ["comment:", "val"],
  2167. referencedClasses: []
  2168. }),
  2169. globals.Browser);
  2170. smalltalk.addMethod(
  2171. smalltalk.method({
  2172. selector: "compileDefinition",
  2173. protocol: 'actions',
  2174. fn: function (){
  2175. var self=this;
  2176. var newClass;
  2177. function $Compiler(){return globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  2178. return smalltalk.withContext(function($ctx1) {
  2179. var $1;
  2180. newClass=_st(_st($Compiler())._new())._evaluateExpression_(_st(self["@sourceArea"])._val());
  2181. self._resetClassesList();
  2182. self._updateCategoriesList();
  2183. $1=self._updateClassesList();
  2184. self._selectClass_(newClass);
  2185. return self}, function($ctx1) {$ctx1.fill(self,"compileDefinition",{newClass:newClass},globals.Browser)})},
  2186. args: [],
  2187. source: "compileDefinition\x0a\x09| newClass |\x0a\x09newClass := Compiler new evaluateExpression: sourceArea val.\x0a\x09self\x0a\x09resetClassesList;\x0a\x09updateCategoriesList;\x0a\x09updateClassesList.\x0a\x09self selectClass: newClass",
  2188. messageSends: ["evaluateExpression:", "new", "val", "resetClassesList", "updateCategoriesList", "updateClassesList", "selectClass:"],
  2189. referencedClasses: ["Compiler"]
  2190. }),
  2191. globals.Browser);
  2192. smalltalk.addMethod(
  2193. smalltalk.method({
  2194. selector: "compileMethodDefinition",
  2195. protocol: 'actions',
  2196. fn: function (){
  2197. var self=this;
  2198. return smalltalk.withContext(function($ctx1) {
  2199. var $1;
  2200. $1=_st(self["@selectedTab"]).__eq("instance");
  2201. if(smalltalk.assert($1)){
  2202. self._compileMethodDefinitionFor_(self["@selectedClass"]);
  2203. $ctx1.sendIdx["compileMethodDefinitionFor:"]=1;
  2204. } else {
  2205. self._compileMethodDefinitionFor_(_st(self["@selectedClass"])._class());
  2206. };
  2207. return self}, function($ctx1) {$ctx1.fill(self,"compileMethodDefinition",{},globals.Browser)})},
  2208. args: [],
  2209. source: "compileMethodDefinition\x0a\x09selectedTab = #instance\x0a\x09ifTrue: [ self compileMethodDefinitionFor: selectedClass ]\x0a\x09ifFalse: [ self compileMethodDefinitionFor: selectedClass class ]",
  2210. messageSends: ["ifTrue:ifFalse:", "=", "compileMethodDefinitionFor:", "class"],
  2211. referencedClasses: []
  2212. }),
  2213. globals.Browser);
  2214. smalltalk.addMethod(
  2215. smalltalk.method({
  2216. selector: "compileMethodDefinitionFor:",
  2217. protocol: 'actions',
  2218. fn: function (aClass){
  2219. var self=this;
  2220. var compiler,method,source,node;
  2221. function $Compiler(){return globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  2222. function $PlatformInterface(){return globals.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
  2223. function $ClassBuilder(){return globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2224. return smalltalk.withContext(function($ctx1) {
  2225. var $1,$2,$6,$5,$4,$3,$7,$9,$8,$10;
  2226. var $early={};
  2227. try {
  2228. source=_st(self["@sourceArea"])._val();
  2229. $1=self["@selectedProtocol"];
  2230. if(($receiver = $1) == nil || $receiver == null){
  2231. self["@selectedProtocol"]=_st(self["@selectedMethod"])._protocol();
  2232. self["@selectedProtocol"];
  2233. } else {
  2234. $1;
  2235. };
  2236. compiler=_st($Compiler())._new();
  2237. $ctx1.sendIdx["new"]=1;
  2238. _st(compiler)._source_(source);
  2239. node=_st(compiler)._parse_(source);
  2240. $2=_st(node)._isParseFailure();
  2241. if(smalltalk.assert($2)){
  2242. $6="PARSE ERROR: ".__comma(_st(node)._reason());
  2243. $ctx1.sendIdx[","]=3;
  2244. $5=_st($6).__comma(", position: ");
  2245. $ctx1.sendIdx[","]=2;
  2246. $4=_st($5).__comma(_st(_st(node)._position())._asString());
  2247. $ctx1.sendIdx[","]=1;
  2248. $3=self._alert_($4);
  2249. return $3;
  2250. };
  2251. _st(compiler)._currentClass_(aClass);
  2252. method=_st(compiler)._eval_(_st(compiler)._compileNode_(node));
  2253. _st(_st(compiler)._unknownVariables())._do_((function(each){
  2254. return smalltalk.withContext(function($ctx2) {
  2255. $7=_st($PlatformInterface())._existsGlobal_(each);
  2256. if(! smalltalk.assert($7)){
  2257. $9=_st("Declare '".__comma(each)).__comma("' as instance variable?");
  2258. $ctx2.sendIdx[","]=4;
  2259. $8=self._confirm_($9);
  2260. if(smalltalk.assert($8)){
  2261. self._addInstanceVariableNamed_toClass_(each,aClass);
  2262. $10=self._compileMethodDefinitionFor_(aClass);
  2263. throw $early=[$10];
  2264. };
  2265. };
  2266. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
  2267. _st(_st($ClassBuilder())._new())._installMethod_forClass_protocol_(method,aClass,self["@selectedProtocol"]);
  2268. self._updateMethodsList();
  2269. self._selectMethod_(method);
  2270. return self}
  2271. catch(e) {if(e===$early)return e[0]; throw e}
  2272. }, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,method:method,source:source,node:node},globals.Browser)})},
  2273. args: ["aClass"],
  2274. source: "compileMethodDefinitionFor: aClass\x0a\x09| compiler method 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^ self alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString ].\x0a\x09compiler currentClass: aClass.\x0a\x09method := compiler eval: (compiler compileNode: node).\x0a\x09compiler unknownVariables do: [ :each |\x0a\x09\x09\x22Do not try to redeclare javascript's objects\x22\x0a\x09\x09(PlatformInterface existsGlobal: each) ifFalse: [\x0a\x09\x09(self 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",
  2275. messageSends: ["val", "ifNil:", "protocol", "new", "source:", "parse:", "ifTrue:", "isParseFailure", "alert:", ",", "reason", "asString", "position", "currentClass:", "eval:", "compileNode:", "do:", "unknownVariables", "ifFalse:", "existsGlobal:", "confirm:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "installMethod:forClass:protocol:", "updateMethodsList", "selectMethod:"],
  2276. referencedClasses: ["Compiler", "PlatformInterface", "ClassBuilder"]
  2277. }),
  2278. globals.Browser);
  2279. smalltalk.addMethod(
  2280. smalltalk.method({
  2281. selector: "copyClass",
  2282. protocol: 'actions',
  2283. fn: function (){
  2284. var self=this;
  2285. var className;
  2286. function $ClassBuilder(){return globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2287. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2288. return smalltalk.withContext(function($ctx1) {
  2289. var $1,$2;
  2290. className=self._prompt_("Copy class");
  2291. $1=_st(_st(className)._notNil())._and_((function(){
  2292. return smalltalk.withContext(function($ctx2) {
  2293. return _st(className)._notEmpty();
  2294. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2295. if(smalltalk.assert($1)){
  2296. _st(_st($ClassBuilder())._new())._copyClass_named_(self._selectedClass(),className);
  2297. self._resetClassesList();
  2298. $2=self._updateClassesList();
  2299. $2;
  2300. self._selectClass_(_st(_st($Smalltalk())._globals())._at_(className));
  2301. };
  2302. return self}, function($ctx1) {$ctx1.fill(self,"copyClass",{className:className},globals.Browser)})},
  2303. args: [],
  2304. source: "copyClass\x0a\x09| className |\x0a\x09className := self 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) ]",
  2305. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "copyClass:named:", "new", "selectedClass", "resetClassesList", "updateClassesList", "selectClass:", "at:", "globals"],
  2306. referencedClasses: ["ClassBuilder", "Smalltalk"]
  2307. }),
  2308. globals.Browser);
  2309. smalltalk.addMethod(
  2310. smalltalk.method({
  2311. selector: "declarationSource",
  2312. protocol: 'accessing',
  2313. fn: function (){
  2314. var self=this;
  2315. return smalltalk.withContext(function($ctx1) {
  2316. var $2,$1;
  2317. $2=_st(self["@selectedTab"]).__eq("instance");
  2318. if(smalltalk.assert($2)){
  2319. $1=self._classDeclarationSource();
  2320. } else {
  2321. $1=self._metaclassDeclarationSource();
  2322. };
  2323. return $1;
  2324. }, function($ctx1) {$ctx1.fill(self,"declarationSource",{},globals.Browser)})},
  2325. args: [],
  2326. source: "declarationSource\x0a\x09^ selectedTab = #instance\x0a\x09ifTrue: [ self classDeclarationSource ]\x0a\x09ifFalse: [ self metaclassDeclarationSource ]",
  2327. messageSends: ["ifTrue:ifFalse:", "=", "classDeclarationSource", "metaclassDeclarationSource"],
  2328. referencedClasses: []
  2329. }),
  2330. globals.Browser);
  2331. smalltalk.addMethod(
  2332. smalltalk.method({
  2333. selector: "disableSaveButton",
  2334. protocol: 'actions',
  2335. fn: function (){
  2336. var self=this;
  2337. return smalltalk.withContext(function($ctx1) {
  2338. var $1;
  2339. $1=self["@saveButton"];
  2340. if(($receiver = $1) == nil || $receiver == null){
  2341. $1;
  2342. } else {
  2343. _st(self["@saveButton"])._at_put_("disabled",true);
  2344. };
  2345. self["@unsavedChanges"]=false;
  2346. return self}, function($ctx1) {$ctx1.fill(self,"disableSaveButton",{},globals.Browser)})},
  2347. args: [],
  2348. source: "disableSaveButton\x0a\x09saveButton ifNotNil: [\x0a\x09saveButton at: 'disabled' put: true ].\x0a\x09unsavedChanges := false",
  2349. messageSends: ["ifNotNil:", "at:put:"],
  2350. referencedClasses: []
  2351. }),
  2352. globals.Browser);
  2353. smalltalk.addMethod(
  2354. smalltalk.method({
  2355. selector: "dummyMethodSource",
  2356. protocol: 'accessing',
  2357. fn: function (){
  2358. var self=this;
  2359. return "messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements";
  2360. },
  2361. args: [],
  2362. source: "dummyMethodSource\x0a\x09^ 'messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements'",
  2363. messageSends: [],
  2364. referencedClasses: []
  2365. }),
  2366. globals.Browser);
  2367. smalltalk.addMethod(
  2368. smalltalk.method({
  2369. selector: "handleSourceAreaKeyDown:",
  2370. protocol: 'actions',
  2371. fn: function (anEvent){
  2372. var self=this;
  2373. if(anEvent.ctrlKey) {
  2374. if(anEvent.keyCode === 83) { //ctrl+s
  2375. self._compile();
  2376. anEvent.preventDefault();
  2377. return false;
  2378. }
  2379. }
  2380. ;
  2381. return self},
  2382. args: ["anEvent"],
  2383. 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>",
  2384. messageSends: [],
  2385. referencedClasses: []
  2386. }),
  2387. globals.Browser);
  2388. smalltalk.addMethod(
  2389. smalltalk.method({
  2390. selector: "hideClassButtons",
  2391. protocol: 'actions',
  2392. fn: function (){
  2393. var self=this;
  2394. return smalltalk.withContext(function($ctx1) {
  2395. _st(_st(self["@classButtons"])._asJQuery())._hide();
  2396. return self}, function($ctx1) {$ctx1.fill(self,"hideClassButtons",{},globals.Browser)})},
  2397. args: [],
  2398. source: "hideClassButtons\x0a\x09classButtons asJQuery hide",
  2399. messageSends: ["hide", "asJQuery"],
  2400. referencedClasses: []
  2401. }),
  2402. globals.Browser);
  2403. smalltalk.addMethod(
  2404. smalltalk.method({
  2405. selector: "hideMethodButtons",
  2406. protocol: 'actions',
  2407. fn: function (){
  2408. var self=this;
  2409. return smalltalk.withContext(function($ctx1) {
  2410. _st(_st(self["@methodButtons"])._asJQuery())._hide();
  2411. return self}, function($ctx1) {$ctx1.fill(self,"hideMethodButtons",{},globals.Browser)})},
  2412. args: [],
  2413. source: "hideMethodButtons\x0a\x09methodButtons asJQuery hide",
  2414. messageSends: ["hide", "asJQuery"],
  2415. referencedClasses: []
  2416. }),
  2417. globals.Browser);
  2418. smalltalk.addMethod(
  2419. smalltalk.method({
  2420. selector: "initialize",
  2421. protocol: 'initialization',
  2422. fn: function (){
  2423. var self=this;
  2424. return smalltalk.withContext(function($ctx1) {
  2425. globals.Browser.superclass.fn.prototype._initialize.apply(_st(self), []);
  2426. self["@selectedTab"]="instance";
  2427. self["@selectedPackage"]=_st(self._packages())._first();
  2428. self["@unsavedChanges"]=false;
  2429. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.Browser)})},
  2430. args: [],
  2431. source: "initialize\x0a\x09super initialize.\x0a\x09selectedTab := #instance.\x0a\x09selectedPackage := self packages first.\x0a\x09unsavedChanges := false",
  2432. messageSends: ["initialize", "first", "packages"],
  2433. referencedClasses: []
  2434. }),
  2435. globals.Browser);
  2436. smalltalk.addMethod(
  2437. smalltalk.method({
  2438. selector: "label",
  2439. protocol: 'accessing',
  2440. fn: function (){
  2441. var self=this;
  2442. return smalltalk.withContext(function($ctx1) {
  2443. var $2,$1;
  2444. $2=self["@selectedClass"];
  2445. if(($receiver = $2) == nil || $receiver == null){
  2446. $1="Browser (nil)";
  2447. } else {
  2448. $1="Browser: ".__comma(_st(self["@selectedClass"])._name());
  2449. };
  2450. return $1;
  2451. }, function($ctx1) {$ctx1.fill(self,"label",{},globals.Browser)})},
  2452. args: [],
  2453. source: "label\x0a\x09^ selectedClass\x0a\x09ifNil: [ 'Browser (nil)' ]\x0a\x09ifNotNil: [ 'Browser: ', selectedClass name ]",
  2454. messageSends: ["ifNil:ifNotNil:", ",", "name"],
  2455. referencedClasses: []
  2456. }),
  2457. globals.Browser);
  2458. smalltalk.addMethod(
  2459. smalltalk.method({
  2460. selector: "metaclassDeclarationSource",
  2461. protocol: 'accessing',
  2462. fn: function (){
  2463. var self=this;
  2464. var stream;
  2465. return smalltalk.withContext(function($ctx1) {
  2466. var $1,$2,$3,$4;
  2467. stream=""._writeStream();
  2468. $1=self["@selectedClass"];
  2469. if(($receiver = $1) == nil || $receiver == null){
  2470. $1;
  2471. } else {
  2472. $2=stream;
  2473. _st($2)._nextPutAll_(_st(self["@selectedClass"])._asString());
  2474. $ctx1.sendIdx["nextPutAll:"]=1;
  2475. _st($2)._nextPutAll_(" class ");
  2476. $ctx1.sendIdx["nextPutAll:"]=2;
  2477. $3=_st($2)._nextPutAll_("instanceVariableNames: '");
  2478. $ctx1.sendIdx["nextPutAll:"]=3;
  2479. $3;
  2480. _st(_st(_st(self["@selectedClass"])._class())._instanceVariableNames())._do_separatedBy_((function(each){
  2481. return smalltalk.withContext(function($ctx2) {
  2482. return _st(stream)._nextPutAll_(each);
  2483. $ctx2.sendIdx["nextPutAll:"]=4;
  2484. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
  2485. return smalltalk.withContext(function($ctx2) {
  2486. return _st(stream)._nextPutAll_(" ");
  2487. $ctx2.sendIdx["nextPutAll:"]=5;
  2488. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  2489. _st(stream)._nextPutAll_("'");
  2490. };
  2491. $4=_st(stream)._contents();
  2492. return $4;
  2493. }, function($ctx1) {$ctx1.fill(self,"metaclassDeclarationSource",{stream:stream},globals.Browser)})},
  2494. args: [],
  2495. 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",
  2496. messageSends: ["writeStream", "ifNotNil:", "nextPutAll:", "asString", "do:separatedBy:", "instanceVariableNames", "class", "contents"],
  2497. referencedClasses: []
  2498. }),
  2499. globals.Browser);
  2500. smalltalk.addMethod(
  2501. smalltalk.method({
  2502. selector: "methodSource",
  2503. protocol: 'accessing',
  2504. fn: function (){
  2505. var self=this;
  2506. return smalltalk.withContext(function($ctx1) {
  2507. var $2,$1;
  2508. $2=self["@selectedMethod"];
  2509. if(($receiver = $2) == nil || $receiver == null){
  2510. $1=self._dummyMethodSource();
  2511. } else {
  2512. $1=_st(self["@selectedMethod"])._source();
  2513. };
  2514. return $1;
  2515. }, function($ctx1) {$ctx1.fill(self,"methodSource",{},globals.Browser)})},
  2516. args: [],
  2517. source: "methodSource\x0a\x09^ selectedMethod\x0a\x09ifNil: [ self dummyMethodSource ]\x0a\x09ifNotNil: [ selectedMethod source ]",
  2518. messageSends: ["ifNil:ifNotNil:", "dummyMethodSource", "source"],
  2519. referencedClasses: []
  2520. }),
  2521. globals.Browser);
  2522. smalltalk.addMethod(
  2523. smalltalk.method({
  2524. selector: "methods",
  2525. protocol: 'accessing',
  2526. fn: function (){
  2527. var self=this;
  2528. var klass;
  2529. return smalltalk.withContext(function($ctx1) {
  2530. var $1,$2,$3,$4,$7,$8,$6,$9,$5;
  2531. $1=_st(self["@selectedTab"]).__eq("comment");
  2532. $ctx1.sendIdx["="]=1;
  2533. if(smalltalk.assert($1)){
  2534. $2=[];
  2535. return $2;
  2536. };
  2537. $3=self["@selectedClass"];
  2538. if(($receiver = $3) == nil || $receiver == null){
  2539. $3;
  2540. } else {
  2541. $4=_st(self["@selectedTab"]).__eq("instance");
  2542. if(smalltalk.assert($4)){
  2543. klass=self["@selectedClass"];
  2544. } else {
  2545. klass=_st(self["@selectedClass"])._class();
  2546. };
  2547. klass;
  2548. };
  2549. $7=self["@selectedProtocol"];
  2550. if(($receiver = $7) == nil || $receiver == null){
  2551. $8=klass;
  2552. if(($receiver = $8) == nil || $receiver == null){
  2553. $6=[];
  2554. } else {
  2555. $6=_st(_st(klass)._methodDictionary())._values();
  2556. };
  2557. } else {
  2558. $6=_st(klass)._methodsInProtocol_(self["@selectedProtocol"]);
  2559. };
  2560. $5=_st($6)._sort_((function(a,b){
  2561. return smalltalk.withContext(function($ctx2) {
  2562. $9=_st(a)._selector();
  2563. $ctx2.sendIdx["selector"]=1;
  2564. return _st($9).__lt(_st(b)._selector());
  2565. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,9)})}));
  2566. return $5;
  2567. }, function($ctx1) {$ctx1.fill(self,"methods",{klass:klass},globals.Browser)})},
  2568. args: [],
  2569. 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 ]",
  2570. messageSends: ["ifTrue:", "=", "ifNotNil:", "ifTrue:ifFalse:", "class", "sort:", "ifNil:ifNotNil:", "values", "methodDictionary", "methodsInProtocol:", "<", "selector"],
  2571. referencedClasses: []
  2572. }),
  2573. globals.Browser);
  2574. smalltalk.addMethod(
  2575. smalltalk.method({
  2576. selector: "packages",
  2577. protocol: 'accessing',
  2578. fn: function (){
  2579. var self=this;
  2580. var packages;
  2581. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  2582. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2583. return smalltalk.withContext(function($ctx1) {
  2584. var $2,$3,$1,$4;
  2585. packages=_st($Array())._new();
  2586. _st(_st($Smalltalk())._classes())._do_((function(each){
  2587. return smalltalk.withContext(function($ctx2) {
  2588. $2=packages;
  2589. $3=_st(each)._category();
  2590. $ctx2.sendIdx["category"]=1;
  2591. $1=_st($2)._includes_($3);
  2592. if(! smalltalk.assert($1)){
  2593. return _st(packages)._add_(_st(each)._category());
  2594. };
  2595. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  2596. $4=_st(packages)._sort();
  2597. return $4;
  2598. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},globals.Browser)})},
  2599. args: [],
  2600. 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",
  2601. messageSends: ["new", "do:", "classes", "ifFalse:", "includes:", "category", "add:", "sort"],
  2602. referencedClasses: ["Array", "Smalltalk"]
  2603. }),
  2604. globals.Browser);
  2605. smalltalk.addMethod(
  2606. smalltalk.method({
  2607. selector: "protocols",
  2608. protocol: 'accessing',
  2609. fn: function (){
  2610. var self=this;
  2611. var klass;
  2612. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  2613. return smalltalk.withContext(function($ctx1) {
  2614. var $1,$2,$3,$4,$5,$6,$7,$8;
  2615. $1=self["@selectedClass"];
  2616. if(($receiver = $1) == nil || $receiver == null){
  2617. $1;
  2618. } else {
  2619. $2=_st(self["@selectedTab"]).__eq("comment");
  2620. $ctx1.sendIdx["="]=1;
  2621. if(smalltalk.assert($2)){
  2622. $3=[];
  2623. return $3;
  2624. };
  2625. $4=_st(self["@selectedTab"]).__eq("instance");
  2626. if(smalltalk.assert($4)){
  2627. klass=self["@selectedClass"];
  2628. } else {
  2629. klass=_st(self["@selectedClass"])._class();
  2630. };
  2631. klass;
  2632. $5=_st(_st(klass)._methodDictionary())._isEmpty();
  2633. if(smalltalk.assert($5)){
  2634. $6=_st($Array())._with_("not yet classified");
  2635. return $6;
  2636. };
  2637. $7=_st(klass)._protocols();
  2638. return $7;
  2639. };
  2640. $8=_st($Array())._new();
  2641. return $8;
  2642. }, function($ctx1) {$ctx1.fill(self,"protocols",{klass:klass},globals.Browser)})},
  2643. args: [],
  2644. 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 isEmpty ifTrue: [\x0a\x09\x09^ Array with: 'not yet classified' ].\x0a\x09^ klass protocols ].\x0a\x09^ Array new",
  2645. messageSends: ["ifNotNil:", "ifTrue:", "=", "ifTrue:ifFalse:", "class", "isEmpty", "methodDictionary", "with:", "protocols", "new"],
  2646. referencedClasses: ["Array"]
  2647. }),
  2648. globals.Browser);
  2649. smalltalk.addMethod(
  2650. smalltalk.method({
  2651. selector: "removeClass",
  2652. protocol: 'actions',
  2653. fn: function (){
  2654. var self=this;
  2655. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2656. return smalltalk.withContext(function($ctx1) {
  2657. var $2,$1;
  2658. $2=_st("Do you really want to remove ".__comma(_st(self["@selectedClass"])._name())).__comma("?");
  2659. $ctx1.sendIdx[","]=1;
  2660. $1=self._confirm_($2);
  2661. if(smalltalk.assert($1)){
  2662. _st($Smalltalk())._removeClass_(self["@selectedClass"]);
  2663. self._resetClassesList();
  2664. self._selectClass_(nil);
  2665. };
  2666. return self}, function($ctx1) {$ctx1.fill(self,"removeClass",{},globals.Browser)})},
  2667. args: [],
  2668. source: "removeClass\x0a\x09(self 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 ]",
  2669. messageSends: ["ifTrue:", "confirm:", ",", "name", "removeClass:", "resetClassesList", "selectClass:"],
  2670. referencedClasses: ["Smalltalk"]
  2671. }),
  2672. globals.Browser);
  2673. smalltalk.addMethod(
  2674. smalltalk.method({
  2675. selector: "removeMethod",
  2676. protocol: 'actions',
  2677. fn: function (){
  2678. var self=this;
  2679. return smalltalk.withContext(function($ctx1) {
  2680. var $1,$3,$2,$4;
  2681. $1=self._cancelChanges();
  2682. if(smalltalk.assert($1)){
  2683. $3=_st("Do you really want to remove #".__comma(_st(self["@selectedMethod"])._selector())).__comma("?");
  2684. $ctx1.sendIdx[","]=1;
  2685. $2=self._confirm_($3);
  2686. if(smalltalk.assert($2)){
  2687. $4=_st(self["@selectedTab"]).__eq("instance");
  2688. if(smalltalk.assert($4)){
  2689. _st(self["@selectedClass"])._removeCompiledMethod_(self["@selectedMethod"]);
  2690. $ctx1.sendIdx["removeCompiledMethod:"]=1;
  2691. } else {
  2692. _st(_st(self["@selectedClass"])._class())._removeCompiledMethod_(self["@selectedMethod"]);
  2693. };
  2694. self._selectMethod_(nil);
  2695. };
  2696. };
  2697. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod",{},globals.Browser)})},
  2698. args: [],
  2699. source: "removeMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09(self 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 ]]",
  2700. messageSends: ["ifTrue:", "cancelChanges", "confirm:", ",", "selector", "ifTrue:ifFalse:", "=", "removeCompiledMethod:", "class", "selectMethod:"],
  2701. referencedClasses: []
  2702. }),
  2703. globals.Browser);
  2704. smalltalk.addMethod(
  2705. smalltalk.method({
  2706. selector: "removePackage",
  2707. protocol: 'actions',
  2708. fn: function (){
  2709. var self=this;
  2710. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2711. return smalltalk.withContext(function($ctx1) {
  2712. var $2,$1;
  2713. $2=_st("Do you really want to remove the whole package ".__comma(self["@selectedPackage"])).__comma(" with all its classes?");
  2714. $ctx1.sendIdx[","]=1;
  2715. $1=self._confirm_($2);
  2716. if(smalltalk.assert($1)){
  2717. _st($Smalltalk())._removePackage_(self["@selectedPackage"]);
  2718. self._updateCategoriesList();
  2719. };
  2720. return self}, function($ctx1) {$ctx1.fill(self,"removePackage",{},globals.Browser)})},
  2721. args: [],
  2722. source: "removePackage\x0a\x0a\x09(self 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 ]",
  2723. messageSends: ["ifTrue:", "confirm:", ",", "removePackage:", "updateCategoriesList"],
  2724. referencedClasses: ["Smalltalk"]
  2725. }),
  2726. globals.Browser);
  2727. smalltalk.addMethod(
  2728. smalltalk.method({
  2729. selector: "renameClass",
  2730. protocol: 'actions',
  2731. fn: function (){
  2732. var self=this;
  2733. var newName;
  2734. return smalltalk.withContext(function($ctx1) {
  2735. var $1,$2;
  2736. newName=self._prompt_("Rename class ".__comma(_st(self["@selectedClass"])._name()));
  2737. $1=_st(_st(newName)._notNil())._and_((function(){
  2738. return smalltalk.withContext(function($ctx2) {
  2739. return _st(newName)._notEmpty();
  2740. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2741. if(smalltalk.assert($1)){
  2742. _st(self["@selectedClass"])._rename_(newName);
  2743. self._updateClassesList();
  2744. $2=self._updateSourceAndButtons();
  2745. $2;
  2746. };
  2747. return self}, function($ctx1) {$ctx1.fill(self,"renameClass",{newName:newName},globals.Browser)})},
  2748. args: [],
  2749. source: "renameClass\x0a\x09| newName |\x0a\x09newName := self 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 ]",
  2750. messageSends: ["prompt:", ",", "name", "ifTrue:", "and:", "notNil", "notEmpty", "rename:", "updateClassesList", "updateSourceAndButtons"],
  2751. referencedClasses: []
  2752. }),
  2753. globals.Browser);
  2754. smalltalk.addMethod(
  2755. smalltalk.method({
  2756. selector: "renamePackage",
  2757. protocol: 'actions',
  2758. fn: function (){
  2759. var self=this;
  2760. var newName;
  2761. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2762. return smalltalk.withContext(function($ctx1) {
  2763. var $1,$2;
  2764. newName=self._prompt_("Rename package ".__comma(self["@selectedPackage"]));
  2765. $1=newName;
  2766. if(($receiver = $1) == nil || $receiver == null){
  2767. $1;
  2768. } else {
  2769. $2=_st(newName)._notEmpty();
  2770. if(smalltalk.assert($2)){
  2771. _st($Smalltalk())._renamePackage_to_(self["@selectedPackage"],newName);
  2772. self._updateCategoriesList();
  2773. };
  2774. };
  2775. return self}, function($ctx1) {$ctx1.fill(self,"renamePackage",{newName:newName},globals.Browser)})},
  2776. args: [],
  2777. source: "renamePackage\x0a\x0a\x09| newName |\x0a\x09newName := self prompt: 'Rename package ', selectedPackage.\x0a\x09newName ifNotNil: [\x0a\x09newName notEmpty ifTrue: [\x0a\x09Smalltalk renamePackage: selectedPackage to: newName.\x0a\x09self updateCategoriesList ]]",
  2778. messageSends: ["prompt:", ",", "ifNotNil:", "ifTrue:", "notEmpty", "renamePackage:to:", "updateCategoriesList"],
  2779. referencedClasses: ["Smalltalk"]
  2780. }),
  2781. globals.Browser);
  2782. smalltalk.addMethod(
  2783. smalltalk.method({
  2784. selector: "renderBottomPanelOn:",
  2785. protocol: 'rendering',
  2786. fn: function (html){
  2787. var self=this;
  2788. function $SourceArea(){return globals.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  2789. return smalltalk.withContext(function($ctx1) {
  2790. var $1,$2;
  2791. $1=_st(html)._div();
  2792. _st($1)._class_("amber_sourceCode");
  2793. $2=_st($1)._with_((function(){
  2794. return smalltalk.withContext(function($ctx2) {
  2795. self["@sourceArea"]=_st($SourceArea())._new();
  2796. self["@sourceArea"];
  2797. _st(self["@sourceArea"])._renderOn_(html);
  2798. _st(self["@sourceArea"])._onKeyDown_((function(e){
  2799. return smalltalk.withContext(function($ctx3) {
  2800. return self._handleSourceAreaKeyDown_(e);
  2801. }, function($ctx3) {$ctx3.fillBlock({e:e},$ctx2,2)})}));
  2802. return _st(self["@sourceArea"])._onKeyUp_((function(){
  2803. return smalltalk.withContext(function($ctx3) {
  2804. return self._updateStatus();
  2805. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  2806. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2807. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},globals.Browser)})},
  2808. args: ["html"],
  2809. 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 ]]",
  2810. messageSends: ["class:", "div", "with:", "new", "renderOn:", "onKeyDown:", "handleSourceAreaKeyDown:", "onKeyUp:", "updateStatus"],
  2811. referencedClasses: ["SourceArea"]
  2812. }),
  2813. globals.Browser);
  2814. smalltalk.addMethod(
  2815. smalltalk.method({
  2816. selector: "renderBoxOn:",
  2817. protocol: 'rendering',
  2818. fn: function (html){
  2819. var self=this;
  2820. return smalltalk.withContext(function($ctx1) {
  2821. var $1;
  2822. self._renderTopPanelOn_(html);
  2823. self._renderTabsOn_(html);
  2824. $1=self._renderBottomPanelOn_(html);
  2825. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.Browser)})},
  2826. args: ["html"],
  2827. source: "renderBoxOn: html\x0a\x09self\x0a\x09renderTopPanelOn: html;\x0a\x09renderTabsOn: html;\x0a\x09renderBottomPanelOn: html",
  2828. messageSends: ["renderTopPanelOn:", "renderTabsOn:", "renderBottomPanelOn:"],
  2829. referencedClasses: []
  2830. }),
  2831. globals.Browser);
  2832. smalltalk.addMethod(
  2833. smalltalk.method({
  2834. selector: "renderButtonsOn:",
  2835. protocol: 'rendering',
  2836. fn: function (html){
  2837. var self=this;
  2838. return smalltalk.withContext(function($ctx1) {
  2839. var $1,$2,$3,$5,$6,$7,$8,$9,$10,$4;
  2840. self["@saveButton"]=_st(html)._button();
  2841. $ctx1.sendIdx["button"]=1;
  2842. $1=self["@saveButton"];
  2843. _st($1)._with_("Save");
  2844. $ctx1.sendIdx["with:"]=1;
  2845. $2=_st($1)._onClick_((function(){
  2846. return smalltalk.withContext(function($ctx2) {
  2847. return self._compile();
  2848. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2849. $ctx1.sendIdx["onClick:"]=1;
  2850. self["@methodButtons"]=_st(html)._span();
  2851. $ctx1.sendIdx["span"]=1;
  2852. self["@classButtons"]=_st(html)._span();
  2853. $3=_st(html)._div();
  2854. _st($3)._class_("right");
  2855. $4=_st($3)._with_((function(){
  2856. return smalltalk.withContext(function($ctx2) {
  2857. $5=_st(html)._button();
  2858. $ctx2.sendIdx["button"]=2;
  2859. _st($5)._with_("DoIt");
  2860. $ctx2.sendIdx["with:"]=3;
  2861. $6=_st($5)._onClick_((function(){
  2862. return smalltalk.withContext(function($ctx3) {
  2863. return _st(self["@sourceArea"])._doIt();
  2864. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  2865. $ctx2.sendIdx["onClick:"]=2;
  2866. $6;
  2867. $7=_st(html)._button();
  2868. $ctx2.sendIdx["button"]=3;
  2869. _st($7)._with_("PrintIt");
  2870. $ctx2.sendIdx["with:"]=4;
  2871. $8=_st($7)._onClick_((function(){
  2872. return smalltalk.withContext(function($ctx3) {
  2873. return _st(self["@sourceArea"])._printIt();
  2874. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  2875. $ctx2.sendIdx["onClick:"]=3;
  2876. $8;
  2877. $9=_st(html)._button();
  2878. _st($9)._with_("InspectIt");
  2879. $10=_st($9)._onClick_((function(){
  2880. return smalltalk.withContext(function($ctx3) {
  2881. return _st(self["@sourceArea"])._inspectIt();
  2882. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
  2883. return $10;
  2884. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  2885. $ctx1.sendIdx["with:"]=2;
  2886. self._updateSourceAndButtons();
  2887. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.Browser)})},
  2888. args: ["html"],
  2889. 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",
  2890. messageSends: ["button", "with:", "onClick:", "compile", "span", "class:", "div", "doIt", "printIt", "inspectIt", "updateSourceAndButtons"],
  2891. referencedClasses: []
  2892. }),
  2893. globals.Browser);
  2894. smalltalk.addMethod(
  2895. smalltalk.method({
  2896. selector: "renderTabsOn:",
  2897. protocol: 'rendering',
  2898. fn: function (html){
  2899. var self=this;
  2900. return smalltalk.withContext(function($ctx1) {
  2901. self["@tabsList"]=_st(_st(html)._ul())._class_("amber_tabs amber_browser");
  2902. self._updateTabsList();
  2903. return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},globals.Browser)})},
  2904. args: ["html"],
  2905. source: "renderTabsOn: html\x0a\x09tabsList := html ul class: 'amber_tabs amber_browser'.\x0a\x09self updateTabsList.",
  2906. messageSends: ["class:", "ul", "updateTabsList"],
  2907. referencedClasses: []
  2908. }),
  2909. globals.Browser);
  2910. smalltalk.addMethod(
  2911. smalltalk.method({
  2912. selector: "renderTopPanelOn:",
  2913. protocol: 'rendering',
  2914. fn: function (html){
  2915. var self=this;
  2916. function $ClassesList(){return globals.ClassesList||(typeof ClassesList=="undefined"?nil:ClassesList)}
  2917. return smalltalk.withContext(function($ctx1) {
  2918. var $1,$3,$4,$6,$7,$8,$9,$10,$11,$5,$12,$13,$2;
  2919. $1=_st(html)._div();
  2920. $ctx1.sendIdx["div"]=1;
  2921. _st($1)._class_("top");
  2922. $ctx1.sendIdx["class:"]=1;
  2923. $2=_st($1)._with_((function(){
  2924. return smalltalk.withContext(function($ctx2) {
  2925. $3=_st(html)._ul();
  2926. $ctx2.sendIdx["ul"]=1;
  2927. self["@packagesList"]=_st($3)._class_("amber_column browser packages");
  2928. $ctx2.sendIdx["class:"]=2;
  2929. self["@packagesList"];
  2930. $4=_st(html)._div();
  2931. $ctx2.sendIdx["div"]=2;
  2932. _st($4)._class_("amber_packagesButtons");
  2933. $ctx2.sendIdx["class:"]=3;
  2934. $5=_st($4)._with_((function(){
  2935. return smalltalk.withContext(function($ctx3) {
  2936. $6=_st(html)._button();
  2937. $ctx3.sendIdx["button"]=1;
  2938. _st($6)._title_("Commit classes in this package to disk");
  2939. $ctx3.sendIdx["title:"]=1;
  2940. _st($6)._onClick_((function(){
  2941. return smalltalk.withContext(function($ctx4) {
  2942. return self._commitPackage();
  2943. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  2944. $ctx3.sendIdx["onClick:"]=1;
  2945. $7=_st($6)._with_("Commit");
  2946. $ctx3.sendIdx["with:"]=3;
  2947. $7;
  2948. $8=_st(html)._button();
  2949. $ctx3.sendIdx["button"]=2;
  2950. _st($8)._title_("Rename package");
  2951. $ctx3.sendIdx["title:"]=2;
  2952. _st($8)._onClick_((function(){
  2953. return smalltalk.withContext(function($ctx4) {
  2954. return self._renamePackage();
  2955. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  2956. $ctx3.sendIdx["onClick:"]=2;
  2957. $9=_st($8)._with_("Rename");
  2958. $ctx3.sendIdx["with:"]=4;
  2959. $9;
  2960. $10=_st(html)._button();
  2961. _st($10)._title_("Remove this package from the system");
  2962. _st($10)._onClick_((function(){
  2963. return smalltalk.withContext(function($ctx4) {
  2964. return self._removePackage();
  2965. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  2966. $11=_st($10)._with_("Remove");
  2967. return $11;
  2968. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  2969. $ctx2.sendIdx["with:"]=2;
  2970. $5;
  2971. self["@classesList"]=_st($ClassesList())._on_(self);
  2972. self["@classesList"];
  2973. _st(self["@classesList"])._renderOn_(html);
  2974. $12=_st(html)._ul();
  2975. $ctx2.sendIdx["ul"]=2;
  2976. self["@protocolsList"]=_st($12)._class_("amber_column browser protocols");
  2977. $ctx2.sendIdx["class:"]=4;
  2978. self["@protocolsList"];
  2979. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column browser methods");
  2980. $ctx2.sendIdx["class:"]=5;
  2981. self["@methodsList"];
  2982. self._updateCategoriesList();
  2983. self._updateClassesList();
  2984. self._updateProtocolsList();
  2985. $13=self._updateMethodsList();
  2986. $13;
  2987. return _st(_st(html)._div())._class_("amber_clear");
  2988. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2989. $ctx1.sendIdx["with:"]=1;
  2990. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},globals.Browser)})},
  2991. args: ["html"],
  2992. 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' ]",
  2993. messageSends: ["class:", "div", "with:", "ul", "title:", "button", "onClick:", "commitPackage", "renamePackage", "removePackage", "on:", "renderOn:", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList"],
  2994. referencedClasses: ["ClassesList"]
  2995. }),
  2996. globals.Browser);
  2997. smalltalk.addMethod(
  2998. smalltalk.method({
  2999. selector: "resetClassesList",
  3000. protocol: 'updating',
  3001. fn: function (){
  3002. var self=this;
  3003. return smalltalk.withContext(function($ctx1) {
  3004. _st(self["@classesList"])._resetNodes();
  3005. return self}, function($ctx1) {$ctx1.fill(self,"resetClassesList",{},globals.Browser)})},
  3006. args: [],
  3007. source: "resetClassesList\x0a\x09classesList resetNodes",
  3008. messageSends: ["resetNodes"],
  3009. referencedClasses: []
  3010. }),
  3011. globals.Browser);
  3012. smalltalk.addMethod(
  3013. smalltalk.method({
  3014. selector: "search:",
  3015. protocol: 'actions',
  3016. fn: function (aString){
  3017. var self=this;
  3018. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  3019. return smalltalk.withContext(function($ctx1) {
  3020. var $1,$2;
  3021. $1=self._cancelChanges();
  3022. if(smalltalk.assert($1)){
  3023. var searchedClass;
  3024. searchedClass=_st(_st($Smalltalk())._globals())._at_(aString);
  3025. searchedClass;
  3026. $2=_st(searchedClass)._isClass();
  3027. if(smalltalk.assert($2)){
  3028. _st(self._class())._openOn_(searchedClass);
  3029. } else {
  3030. self._searchReferencesOf_(aString);
  3031. };
  3032. };
  3033. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},globals.Browser)})},
  3034. args: ["aString"],
  3035. 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 ]]",
  3036. messageSends: ["ifTrue:", "cancelChanges", "at:", "globals", "ifTrue:ifFalse:", "isClass", "openOn:", "class", "searchReferencesOf:"],
  3037. referencedClasses: ["Smalltalk"]
  3038. }),
  3039. globals.Browser);
  3040. smalltalk.addMethod(
  3041. smalltalk.method({
  3042. selector: "searchClassReferences",
  3043. protocol: 'actions',
  3044. fn: function (){
  3045. var self=this;
  3046. function $ReferencesBrowser(){return globals.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  3047. return smalltalk.withContext(function($ctx1) {
  3048. _st($ReferencesBrowser())._search_(_st(self["@selectedClass"])._name());
  3049. return self}, function($ctx1) {$ctx1.fill(self,"searchClassReferences",{},globals.Browser)})},
  3050. args: [],
  3051. source: "searchClassReferences\x0a\x09ReferencesBrowser search: selectedClass name",
  3052. messageSends: ["search:", "name"],
  3053. referencedClasses: ["ReferencesBrowser"]
  3054. }),
  3055. globals.Browser);
  3056. smalltalk.addMethod(
  3057. smalltalk.method({
  3058. selector: "searchReferencesOf:",
  3059. protocol: 'actions',
  3060. fn: function (aString){
  3061. var self=this;
  3062. function $ReferencesBrowser(){return globals.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  3063. return smalltalk.withContext(function($ctx1) {
  3064. _st($ReferencesBrowser())._search_(aString);
  3065. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesOf:",{aString:aString},globals.Browser)})},
  3066. args: ["aString"],
  3067. source: "searchReferencesOf: aString\x0a\x09ReferencesBrowser search: aString",
  3068. messageSends: ["search:"],
  3069. referencedClasses: ["ReferencesBrowser"]
  3070. }),
  3071. globals.Browser);
  3072. smalltalk.addMethod(
  3073. smalltalk.method({
  3074. selector: "selectCategory:",
  3075. protocol: 'actions',
  3076. fn: function (aCategory){
  3077. var self=this;
  3078. return smalltalk.withContext(function($ctx1) {
  3079. var $1,$2;
  3080. $1=self._cancelChanges();
  3081. if(smalltalk.assert($1)){
  3082. self["@selectedPackage"]=aCategory;
  3083. self["@selectedPackage"];
  3084. self["@selectedMethod"]=nil;
  3085. self["@selectedProtocol"]=self["@selectedMethod"];
  3086. self["@selectedClass"]=self["@selectedProtocol"];
  3087. self["@selectedClass"];
  3088. self._resetClassesList();
  3089. self._updateCategoriesList();
  3090. self._updateClassesList();
  3091. self._updateProtocolsList();
  3092. self._updateMethodsList();
  3093. $2=self._updateSourceAndButtons();
  3094. $2;
  3095. };
  3096. return self}, function($ctx1) {$ctx1.fill(self,"selectCategory:",{aCategory:aCategory},globals.Browser)})},
  3097. args: ["aCategory"],
  3098. 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 ]",
  3099. messageSends: ["ifTrue:", "cancelChanges", "resetClassesList", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3100. referencedClasses: []
  3101. }),
  3102. globals.Browser);
  3103. smalltalk.addMethod(
  3104. smalltalk.method({
  3105. selector: "selectClass:",
  3106. protocol: 'actions',
  3107. fn: function (aClass){
  3108. var self=this;
  3109. return smalltalk.withContext(function($ctx1) {
  3110. var $1,$2;
  3111. $1=self._cancelChanges();
  3112. if(smalltalk.assert($1)){
  3113. self["@selectedClass"]=aClass;
  3114. self["@selectedClass"];
  3115. self["@selectedMethod"]=nil;
  3116. self["@selectedProtocol"]=self["@selectedMethod"];
  3117. self["@selectedProtocol"];
  3118. self._updateClassesList();
  3119. self._updateProtocolsList();
  3120. self._updateMethodsList();
  3121. $2=self._updateSourceAndButtons();
  3122. $2;
  3123. };
  3124. return self}, function($ctx1) {$ctx1.fill(self,"selectClass:",{aClass:aClass},globals.Browser)})},
  3125. args: ["aClass"],
  3126. 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 ]",
  3127. messageSends: ["ifTrue:", "cancelChanges", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3128. referencedClasses: []
  3129. }),
  3130. globals.Browser);
  3131. smalltalk.addMethod(
  3132. smalltalk.method({
  3133. selector: "selectMethod:",
  3134. protocol: 'actions',
  3135. fn: function (aMethod){
  3136. var self=this;
  3137. return smalltalk.withContext(function($ctx1) {
  3138. var $1,$2;
  3139. $1=self._cancelChanges();
  3140. if(smalltalk.assert($1)){
  3141. self["@selectedMethod"]=aMethod;
  3142. self["@selectedMethod"];
  3143. self._updateProtocolsList();
  3144. self._updateMethodsList();
  3145. $2=self._updateSourceAndButtons();
  3146. $2;
  3147. };
  3148. return self}, function($ctx1) {$ctx1.fill(self,"selectMethod:",{aMethod:aMethod},globals.Browser)})},
  3149. args: ["aMethod"],
  3150. source: "selectMethod: aMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedMethod := aMethod.\x0a\x09self\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  3151. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3152. referencedClasses: []
  3153. }),
  3154. globals.Browser);
  3155. smalltalk.addMethod(
  3156. smalltalk.method({
  3157. selector: "selectProtocol:",
  3158. protocol: 'actions',
  3159. fn: function (aString){
  3160. var self=this;
  3161. return smalltalk.withContext(function($ctx1) {
  3162. var $1,$2;
  3163. $1=self._cancelChanges();
  3164. if(smalltalk.assert($1)){
  3165. self["@selectedProtocol"]=aString;
  3166. self["@selectedProtocol"];
  3167. self["@selectedMethod"]=nil;
  3168. self["@selectedMethod"];
  3169. self._updateProtocolsList();
  3170. self._updateMethodsList();
  3171. $2=self._updateSourceAndButtons();
  3172. $2;
  3173. };
  3174. return self}, function($ctx1) {$ctx1.fill(self,"selectProtocol:",{aString:aString},globals.Browser)})},
  3175. args: ["aString"],
  3176. source: "selectProtocol: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedProtocol := aString.\x0a\x09selectedMethod := nil.\x0a\x09self\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  3177. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3178. referencedClasses: []
  3179. }),
  3180. globals.Browser);
  3181. smalltalk.addMethod(
  3182. smalltalk.method({
  3183. selector: "selectTab:",
  3184. protocol: 'actions',
  3185. fn: function (aString){
  3186. var self=this;
  3187. return smalltalk.withContext(function($ctx1) {
  3188. var $1;
  3189. $1=self._cancelChanges();
  3190. if(smalltalk.assert($1)){
  3191. self["@selectedTab"]=aString;
  3192. self["@selectedTab"];
  3193. self._selectProtocol_(nil);
  3194. self._updateTabsList();
  3195. };
  3196. return self}, function($ctx1) {$ctx1.fill(self,"selectTab:",{aString:aString},globals.Browser)})},
  3197. args: ["aString"],
  3198. source: "selectTab: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedTab := aString.\x0a\x09self selectProtocol: nil.\x0a\x09self updateTabsList ]",
  3199. messageSends: ["ifTrue:", "cancelChanges", "selectProtocol:", "updateTabsList"],
  3200. referencedClasses: []
  3201. }),
  3202. globals.Browser);
  3203. smalltalk.addMethod(
  3204. smalltalk.method({
  3205. selector: "selectedClass",
  3206. protocol: 'accessing',
  3207. fn: function (){
  3208. var self=this;
  3209. var $1;
  3210. $1=self["@selectedClass"];
  3211. return $1;
  3212. },
  3213. args: [],
  3214. source: "selectedClass\x0a\x09^ selectedClass",
  3215. messageSends: [],
  3216. referencedClasses: []
  3217. }),
  3218. globals.Browser);
  3219. smalltalk.addMethod(
  3220. smalltalk.method({
  3221. selector: "selectedPackage",
  3222. protocol: 'accessing',
  3223. fn: function (){
  3224. var self=this;
  3225. var $1;
  3226. $1=self["@selectedPackage"];
  3227. return $1;
  3228. },
  3229. args: [],
  3230. source: "selectedPackage\x0a\x09^ selectedPackage",
  3231. messageSends: [],
  3232. referencedClasses: []
  3233. }),
  3234. globals.Browser);
  3235. smalltalk.addMethod(
  3236. smalltalk.method({
  3237. selector: "setMethodProtocol:",
  3238. protocol: 'actions',
  3239. fn: function (aString){
  3240. var self=this;
  3241. return smalltalk.withContext(function($ctx1) {
  3242. var $1,$2,$3;
  3243. $1=self._cancelChanges();
  3244. if(smalltalk.assert($1)){
  3245. $2=_st(self._protocols())._includes_(aString);
  3246. if(smalltalk.assert($2)){
  3247. _st(self["@selectedMethod"])._protocol_(aString);
  3248. self["@selectedProtocol"]=aString;
  3249. self["@selectedProtocol"];
  3250. self["@selectedMethod"]=self["@selectedMethod"];
  3251. self["@selectedMethod"];
  3252. self._updateProtocolsList();
  3253. self._updateMethodsList();
  3254. $3=self._updateSourceAndButtons();
  3255. $3;
  3256. } else {
  3257. self._addNewProtocol();
  3258. };
  3259. };
  3260. return self}, function($ctx1) {$ctx1.fill(self,"setMethodProtocol:",{aString:aString},globals.Browser)})},
  3261. args: ["aString"],
  3262. 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 ]]",
  3263. messageSends: ["ifTrue:", "cancelChanges", "ifFalse:ifTrue:", "includes:", "protocols", "addNewProtocol", "protocol:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3264. referencedClasses: []
  3265. }),
  3266. globals.Browser);
  3267. smalltalk.addMethod(
  3268. smalltalk.method({
  3269. selector: "showClassButtons",
  3270. protocol: 'actions',
  3271. fn: function (){
  3272. var self=this;
  3273. return smalltalk.withContext(function($ctx1) {
  3274. _st(_st(self["@classButtons"])._asJQuery())._show();
  3275. return self}, function($ctx1) {$ctx1.fill(self,"showClassButtons",{},globals.Browser)})},
  3276. args: [],
  3277. source: "showClassButtons\x0a\x09classButtons asJQuery show",
  3278. messageSends: ["show", "asJQuery"],
  3279. referencedClasses: []
  3280. }),
  3281. globals.Browser);
  3282. smalltalk.addMethod(
  3283. smalltalk.method({
  3284. selector: "showMethodButtons",
  3285. protocol: 'actions',
  3286. fn: function (){
  3287. var self=this;
  3288. return smalltalk.withContext(function($ctx1) {
  3289. _st(_st(self["@methodButtons"])._asJQuery())._show();
  3290. return self}, function($ctx1) {$ctx1.fill(self,"showMethodButtons",{},globals.Browser)})},
  3291. args: [],
  3292. source: "showMethodButtons\x0a\x09methodButtons asJQuery show",
  3293. messageSends: ["show", "asJQuery"],
  3294. referencedClasses: []
  3295. }),
  3296. globals.Browser);
  3297. smalltalk.addMethod(
  3298. smalltalk.method({
  3299. selector: "source",
  3300. protocol: 'accessing',
  3301. fn: function (){
  3302. var self=this;
  3303. return smalltalk.withContext(function($ctx1) {
  3304. var $1,$4,$3,$2,$6,$5;
  3305. $1=_st(self["@selectedTab"]).__eq("comment");
  3306. if(! smalltalk.assert($1)){
  3307. $4=_st(self["@selectedProtocol"])._notNil();
  3308. $ctx1.sendIdx["notNil"]=1;
  3309. $3=_st($4)._or_((function(){
  3310. return smalltalk.withContext(function($ctx2) {
  3311. return _st(self["@selectedMethod"])._notNil();
  3312. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  3313. if(smalltalk.assert($3)){
  3314. $2=self._methodSource();
  3315. } else {
  3316. $2=self._declarationSource();
  3317. };
  3318. return $2;
  3319. };
  3320. $6=self["@selectedClass"];
  3321. if(($receiver = $6) == nil || $receiver == null){
  3322. $5="";
  3323. } else {
  3324. $5=self._classCommentSource();
  3325. };
  3326. return $5;
  3327. }, function($ctx1) {$ctx1.fill(self,"source",{},globals.Browser)})},
  3328. args: [],
  3329. 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 ]",
  3330. messageSends: ["ifFalse:", "=", "ifFalse:ifTrue:", "or:", "notNil", "declarationSource", "methodSource", "ifNil:ifNotNil:", "classCommentSource"],
  3331. referencedClasses: []
  3332. }),
  3333. globals.Browser);
  3334. smalltalk.addMethod(
  3335. smalltalk.method({
  3336. selector: "updateCategoriesList",
  3337. protocol: 'updating',
  3338. fn: function (){
  3339. var self=this;
  3340. return smalltalk.withContext(function($ctx1) {
  3341. var $1,$2,$3,$4;
  3342. _st(self["@packagesList"])._contents_((function(html){
  3343. return smalltalk.withContext(function($ctx2) {
  3344. return _st(self._packages())._do_((function(each){
  3345. var li,label;
  3346. return smalltalk.withContext(function($ctx3) {
  3347. $1=_st(each)._isEmpty();
  3348. if(smalltalk.assert($1)){
  3349. label="Unclassified";
  3350. label;
  3351. } else {
  3352. label=each;
  3353. label;
  3354. };
  3355. li=_st(html)._li();
  3356. li;
  3357. $2=_st(self["@selectedPackage"]).__eq(each);
  3358. if(smalltalk.assert($2)){
  3359. _st(li)._class_("selected");
  3360. };
  3361. $3=li;
  3362. _st($3)._with_(label);
  3363. $4=_st($3)._onClick_((function(){
  3364. return smalltalk.withContext(function($ctx4) {
  3365. return self._selectCategory_(each);
  3366. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)})}));
  3367. return $4;
  3368. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li,label:label},$ctx2,2)})}));
  3369. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3370. return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},globals.Browser)})},
  3371. args: [],
  3372. source: "updateCategoriesList\x0a\x09packagesList contents: [ :html |\x0a\x09self packages do: [ :each || li label |\x0a\x09\x09each isEmpty\x0a\x09\x09ifTrue: [ label := 'Unclassified' ]\x0a\x09\x09ifFalse: [ label := each ].\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 ]] ]",
  3373. messageSends: ["contents:", "do:", "packages", "ifTrue:ifFalse:", "isEmpty", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectCategory:"],
  3374. referencedClasses: []
  3375. }),
  3376. globals.Browser);
  3377. smalltalk.addMethod(
  3378. smalltalk.method({
  3379. selector: "updateClassesList",
  3380. protocol: 'updating',
  3381. fn: function (){
  3382. var self=this;
  3383. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  3384. return smalltalk.withContext(function($ctx1) {
  3385. _st(_st($TabManager())._current())._update();
  3386. _st(self["@classesList"])._updateNodes();
  3387. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},globals.Browser)})},
  3388. args: [],
  3389. source: "updateClassesList\x0a\x09TabManager current update.\x0a\x09classesList updateNodes",
  3390. messageSends: ["update", "current", "updateNodes"],
  3391. referencedClasses: ["TabManager"]
  3392. }),
  3393. globals.Browser);
  3394. smalltalk.addMethod(
  3395. smalltalk.method({
  3396. selector: "updateMethodsList",
  3397. protocol: 'updating',
  3398. fn: function (){
  3399. var self=this;
  3400. return smalltalk.withContext(function($ctx1) {
  3401. var $1,$2,$3;
  3402. _st(self["@methodsList"])._contents_((function(html){
  3403. return smalltalk.withContext(function($ctx2) {
  3404. return _st(self._methods())._do_((function(each){
  3405. var li;
  3406. return smalltalk.withContext(function($ctx3) {
  3407. li=_st(html)._li();
  3408. li;
  3409. $1=_st(self["@selectedMethod"]).__eq(each);
  3410. if(smalltalk.assert($1)){
  3411. _st(li)._class_("selected");
  3412. };
  3413. $2=li;
  3414. _st($2)._with_(_st(each)._selector());
  3415. $3=_st($2)._onClick_((function(){
  3416. return smalltalk.withContext(function($ctx4) {
  3417. return self._selectMethod_(each);
  3418. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  3419. return $3;
  3420. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  3421. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3422. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},globals.Browser)})},
  3423. args: [],
  3424. 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 ]] ]",
  3425. messageSends: ["contents:", "do:", "methods", "li", "ifTrue:", "=", "class:", "with:", "selector", "onClick:", "selectMethod:"],
  3426. referencedClasses: []
  3427. }),
  3428. globals.Browser);
  3429. smalltalk.addMethod(
  3430. smalltalk.method({
  3431. selector: "updateProtocolsList",
  3432. protocol: 'updating',
  3433. fn: function (){
  3434. var self=this;
  3435. return smalltalk.withContext(function($ctx1) {
  3436. var $1,$2,$3;
  3437. _st(self["@protocolsList"])._contents_((function(html){
  3438. return smalltalk.withContext(function($ctx2) {
  3439. return _st(self._protocols())._do_((function(each){
  3440. var li;
  3441. return smalltalk.withContext(function($ctx3) {
  3442. li=_st(html)._li();
  3443. li;
  3444. $1=_st(self["@selectedProtocol"]).__eq(each);
  3445. if(smalltalk.assert($1)){
  3446. _st(li)._class_("selected");
  3447. };
  3448. $2=li;
  3449. _st($2)._with_(each);
  3450. $3=_st($2)._onClick_((function(){
  3451. return smalltalk.withContext(function($ctx4) {
  3452. return self._selectProtocol_(each);
  3453. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  3454. return $3;
  3455. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  3456. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3457. return self}, function($ctx1) {$ctx1.fill(self,"updateProtocolsList",{},globals.Browser)})},
  3458. args: [],
  3459. 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 ]] ]",
  3460. messageSends: ["contents:", "do:", "protocols", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectProtocol:"],
  3461. referencedClasses: []
  3462. }),
  3463. globals.Browser);
  3464. smalltalk.addMethod(
  3465. smalltalk.method({
  3466. selector: "updateSourceAndButtons",
  3467. protocol: 'updating',
  3468. fn: function (){
  3469. var self=this;
  3470. var currentProtocol;
  3471. return smalltalk.withContext(function($ctx1) {
  3472. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$15,$14,$17,$18,$19,$20,$22,$21,$23,$24,$16,$25,$26,$28,$29,$30,$31,$27,$32,$33;
  3473. self._disableSaveButton();
  3474. _st(self["@classButtons"])._contents_((function(html){
  3475. return smalltalk.withContext(function($ctx2) {
  3476. $1=_st(html)._button();
  3477. $ctx2.sendIdx["button"]=1;
  3478. _st($1)._title_("Create a new class");
  3479. _st($1)._onClick_((function(){
  3480. return smalltalk.withContext(function($ctx3) {
  3481. return self._addNewClass();
  3482. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  3483. $ctx2.sendIdx["onClick:"]=1;
  3484. $2=_st($1)._with_("New class");
  3485. $ctx2.sendIdx["with:"]=1;
  3486. $2;
  3487. $3=_st(html)._button();
  3488. $ctx2.sendIdx["button"]=2;
  3489. _st($3)._with_("Rename class");
  3490. $ctx2.sendIdx["with:"]=2;
  3491. $4=_st($3)._onClick_((function(){
  3492. return smalltalk.withContext(function($ctx3) {
  3493. return self._renameClass();
  3494. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  3495. $ctx2.sendIdx["onClick:"]=2;
  3496. $4;
  3497. $5=_st(html)._button();
  3498. $ctx2.sendIdx["button"]=3;
  3499. _st($5)._with_("Copy class");
  3500. $ctx2.sendIdx["with:"]=3;
  3501. $6=_st($5)._onClick_((function(){
  3502. return smalltalk.withContext(function($ctx3) {
  3503. return self._copyClass();
  3504. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  3505. $ctx2.sendIdx["onClick:"]=3;
  3506. $6;
  3507. $7=_st(html)._button();
  3508. $ctx2.sendIdx["button"]=4;
  3509. _st($7)._with_("Remove class");
  3510. $ctx2.sendIdx["with:"]=4;
  3511. $8=_st($7)._onClick_((function(){
  3512. return smalltalk.withContext(function($ctx3) {
  3513. return self._removeClass();
  3514. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
  3515. $ctx2.sendIdx["onClick:"]=4;
  3516. $8;
  3517. $9=_st(html)._button();
  3518. $ctx2.sendIdx["button"]=5;
  3519. _st($9)._with_("References");
  3520. $ctx2.sendIdx["with:"]=5;
  3521. $10=_st($9)._onClick_((function(){
  3522. return smalltalk.withContext(function($ctx3) {
  3523. return self._searchClassReferences();
  3524. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,6)})}));
  3525. $ctx2.sendIdx["onClick:"]=5;
  3526. return $10;
  3527. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3528. $ctx1.sendIdx["contents:"]=1;
  3529. _st(self["@methodButtons"])._contents_((function(html){
  3530. var protocolSelect,referencesSelect;
  3531. return smalltalk.withContext(function($ctx2) {
  3532. $11=_st(html)._button();
  3533. _st($11)._with_("Remove method");
  3534. $ctx2.sendIdx["with:"]=6;
  3535. $12=_st($11)._onClick_((function(){
  3536. return smalltalk.withContext(function($ctx3) {
  3537. return self._removeMethod();
  3538. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,8)})}));
  3539. $12;
  3540. protocolSelect=_st(html)._select();
  3541. $ctx2.sendIdx["select"]=1;
  3542. protocolSelect;
  3543. $13=protocolSelect;
  3544. _st($13)._onChange_((function(){
  3545. return smalltalk.withContext(function($ctx3) {
  3546. $15=_st(protocolSelect)._asJQuery();
  3547. $ctx3.sendIdx["asJQuery"]=1;
  3548. $14=_st($15)._val();
  3549. $ctx3.sendIdx["val"]=1;
  3550. return self._setMethodProtocol_($14);
  3551. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)})}));
  3552. $ctx2.sendIdx["onChange:"]=1;
  3553. $16=_st($13)._with_((function(){
  3554. return smalltalk.withContext(function($ctx3) {
  3555. $17=_st(html)._option();
  3556. $ctx3.sendIdx["option"]=1;
  3557. _st($17)._with_("Method protocol");
  3558. $ctx3.sendIdx["with:"]=8;
  3559. $18=_st($17)._at_put_("disabled","disabled");
  3560. $ctx3.sendIdx["at:put:"]=1;
  3561. $18;
  3562. $19=_st(html)._option();
  3563. $ctx3.sendIdx["option"]=2;
  3564. _st($19)._class_("important");
  3565. $ctx3.sendIdx["class:"]=1;
  3566. $20=_st($19)._with_("New...");
  3567. $ctx3.sendIdx["with:"]=9;
  3568. $20;
  3569. currentProtocol=self["@selectedProtocol"];
  3570. currentProtocol;
  3571. $22=_st(currentProtocol)._isNil();
  3572. $ctx3.sendIdx["isNil"]=1;
  3573. $21=_st($22)._and_((function(){
  3574. return smalltalk.withContext(function($ctx4) {
  3575. return _st(self["@selectedMethod"])._notNil();
  3576. $ctx4.sendIdx["notNil"]=1;
  3577. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,11)})}));
  3578. if(smalltalk.assert($21)){
  3579. currentProtocol=_st(self["@selectedMethod"])._category();
  3580. currentProtocol;
  3581. };
  3582. return _st(self._protocols())._do_((function(each){
  3583. var option;
  3584. return smalltalk.withContext(function($ctx4) {
  3585. $23=_st(html)._option();
  3586. $ctx4.sendIdx["option"]=3;
  3587. option=_st($23)._with_(each);
  3588. $ctx4.sendIdx["with:"]=10;
  3589. option;
  3590. $24=_st(currentProtocol).__eq(each);
  3591. if(smalltalk.assert($24)){
  3592. return _st(option)._at_put_("selected","selected");
  3593. $ctx4.sendIdx["at:put:"]=2;
  3594. };
  3595. }, function($ctx4) {$ctx4.fillBlock({each:each,option:option},$ctx3,13)})}));
  3596. $ctx3.sendIdx["do:"]=1;
  3597. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,10)})}));
  3598. $ctx2.sendIdx["with:"]=7;
  3599. $16;
  3600. $25=_st(self["@selectedMethod"])._isNil();
  3601. $ctx2.sendIdx["isNil"]=2;
  3602. if(! smalltalk.assert($25)){
  3603. referencesSelect=_st(html)._select();
  3604. referencesSelect;
  3605. $26=referencesSelect;
  3606. _st($26)._onChange_((function(){
  3607. return smalltalk.withContext(function($ctx3) {
  3608. return self._searchReferencesOf_(_st(_st(referencesSelect)._asJQuery())._val());
  3609. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,16)})}));
  3610. $27=_st($26)._with_((function(){
  3611. var option;
  3612. return smalltalk.withContext(function($ctx3) {
  3613. $28=_st(html)._option();
  3614. $ctx3.sendIdx["option"]=4;
  3615. _st($28)._with_("References");
  3616. $ctx3.sendIdx["with:"]=12;
  3617. _st($28)._at_put_("disabled","disabled");
  3618. $ctx3.sendIdx["at:put:"]=3;
  3619. $29=_st($28)._at_put_("selected","selected");
  3620. $29;
  3621. $30=_st(html)._option();
  3622. $ctx3.sendIdx["option"]=5;
  3623. _st($30)._class_("important");
  3624. $31=_st($30)._with_(_st(self["@selectedMethod"])._selector());
  3625. $ctx3.sendIdx["with:"]=13;
  3626. $31;
  3627. return _st(_st(_st(self["@selectedMethod"])._messageSends())._sorted())._do_((function(each){
  3628. return smalltalk.withContext(function($ctx4) {
  3629. return _st(_st(html)._option())._with_(each);
  3630. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,18)})}));
  3631. }, function($ctx3) {$ctx3.fillBlock({option:option},$ctx2,17)})}));
  3632. $ctx2.sendIdx["with:"]=11;
  3633. return $27;
  3634. };
  3635. }, function($ctx2) {$ctx2.fillBlock({html:html,protocolSelect:protocolSelect,referencesSelect:referencesSelect},$ctx1,7)})}));
  3636. $32=_st(self["@selectedMethod"])._isNil();
  3637. $ctx1.sendIdx["isNil"]=3;
  3638. if(smalltalk.assert($32)){
  3639. self._hideMethodButtons();
  3640. $33=_st(_st(self["@selectedClass"])._isNil())._or_((function(){
  3641. return smalltalk.withContext(function($ctx2) {
  3642. return _st(self["@selectedProtocol"])._notNil();
  3643. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,20)})}));
  3644. if(smalltalk.assert($33)){
  3645. self._hideClassButtons();
  3646. $ctx1.sendIdx["hideClassButtons"]=1;
  3647. } else {
  3648. self._showClassButtons();
  3649. };
  3650. } else {
  3651. self._hideClassButtons();
  3652. self._showMethodButtons();
  3653. };
  3654. _st(self["@sourceArea"])._val_(self._source());
  3655. return self}, function($ctx1) {$ctx1.fill(self,"updateSourceAndButtons",{currentProtocol:currentProtocol},globals.Browser)})},
  3656. args: [],
  3657. 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",
  3658. 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"],
  3659. referencedClasses: []
  3660. }),
  3661. globals.Browser);
  3662. smalltalk.addMethod(
  3663. smalltalk.method({
  3664. selector: "updateStatus",
  3665. protocol: 'updating',
  3666. fn: function (){
  3667. var self=this;
  3668. return smalltalk.withContext(function($ctx1) {
  3669. var $1,$2,$3;
  3670. $1=_st(_st(self["@sourceArea"])._val()).__eq(self._source());
  3671. if(smalltalk.assert($1)){
  3672. $2=self["@saveButton"];
  3673. if(($receiver = $2) == nil || $receiver == null){
  3674. $2;
  3675. } else {
  3676. _st(self["@saveButton"])._at_put_("disabled",true);
  3677. };
  3678. self["@unsavedChanges"]=false;
  3679. self["@unsavedChanges"];
  3680. } else {
  3681. $3=self["@saveButton"];
  3682. if(($receiver = $3) == nil || $receiver == null){
  3683. $3;
  3684. } else {
  3685. _st(self["@saveButton"])._removeAt_("disabled");
  3686. };
  3687. self["@unsavedChanges"]=true;
  3688. self["@unsavedChanges"];
  3689. };
  3690. return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{},globals.Browser)})},
  3691. args: [],
  3692. 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 ]",
  3693. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"],
  3694. referencedClasses: []
  3695. }),
  3696. globals.Browser);
  3697. smalltalk.addMethod(
  3698. smalltalk.method({
  3699. selector: "updateTabsList",
  3700. protocol: 'updating',
  3701. fn: function (){
  3702. var self=this;
  3703. return smalltalk.withContext(function($ctx1) {
  3704. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20;
  3705. _st(self["@tabsList"])._contents_((function(html){
  3706. var li;
  3707. return smalltalk.withContext(function($ctx2) {
  3708. li=_st(html)._li();
  3709. $ctx2.sendIdx["li"]=1;
  3710. li;
  3711. $1=_st(self["@selectedTab"]).__eq("instance");
  3712. $ctx2.sendIdx["="]=1;
  3713. if(smalltalk.assert($1)){
  3714. _st(li)._class_("selected");
  3715. $ctx2.sendIdx["class:"]=1;
  3716. };
  3717. $2=li;
  3718. _st($2)._with_((function(){
  3719. return smalltalk.withContext(function($ctx3) {
  3720. $3=_st(html)._span();
  3721. $ctx3.sendIdx["span"]=1;
  3722. _st($3)._class_("ltab");
  3723. $ctx3.sendIdx["class:"]=2;
  3724. $4=_st(html)._span();
  3725. $ctx3.sendIdx["span"]=2;
  3726. _st($4)._class_("mtab");
  3727. $ctx3.sendIdx["class:"]=3;
  3728. $5=_st($4)._with_("Instance");
  3729. $ctx3.sendIdx["with:"]=2;
  3730. $5;
  3731. $6=_st(html)._span();
  3732. $ctx3.sendIdx["span"]=3;
  3733. return _st($6)._class_("rtab");
  3734. $ctx3.sendIdx["class:"]=4;
  3735. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  3736. $ctx2.sendIdx["with:"]=1;
  3737. $7=_st($2)._onClick_((function(){
  3738. return smalltalk.withContext(function($ctx3) {
  3739. return self._selectTab_("instance");
  3740. $ctx3.sendIdx["selectTab:"]=1;
  3741. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  3742. $ctx2.sendIdx["onClick:"]=1;
  3743. $7;
  3744. li=_st(html)._li();
  3745. $ctx2.sendIdx["li"]=2;
  3746. li;
  3747. $8=_st(self["@selectedTab"]).__eq("class");
  3748. $ctx2.sendIdx["="]=2;
  3749. if(smalltalk.assert($8)){
  3750. _st(li)._class_("selected");
  3751. $ctx2.sendIdx["class:"]=5;
  3752. };
  3753. $9=li;
  3754. _st($9)._with_((function(){
  3755. return smalltalk.withContext(function($ctx3) {
  3756. $10=_st(html)._span();
  3757. $ctx3.sendIdx["span"]=4;
  3758. _st($10)._class_("ltab");
  3759. $ctx3.sendIdx["class:"]=6;
  3760. $11=_st(html)._span();
  3761. $ctx3.sendIdx["span"]=5;
  3762. _st($11)._class_("mtab");
  3763. $ctx3.sendIdx["class:"]=7;
  3764. $12=_st($11)._with_("Class");
  3765. $ctx3.sendIdx["with:"]=4;
  3766. $12;
  3767. $13=_st(html)._span();
  3768. $ctx3.sendIdx["span"]=6;
  3769. return _st($13)._class_("rtab");
  3770. $ctx3.sendIdx["class:"]=8;
  3771. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,6)})}));
  3772. $ctx2.sendIdx["with:"]=3;
  3773. $14=_st($9)._onClick_((function(){
  3774. return smalltalk.withContext(function($ctx3) {
  3775. return self._selectTab_("class");
  3776. $ctx3.sendIdx["selectTab:"]=2;
  3777. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)})}));
  3778. $ctx2.sendIdx["onClick:"]=2;
  3779. $14;
  3780. li=_st(html)._li();
  3781. li;
  3782. $15=_st(self["@selectedTab"]).__eq("comment");
  3783. if(smalltalk.assert($15)){
  3784. _st(li)._class_("selected");
  3785. $ctx2.sendIdx["class:"]=9;
  3786. };
  3787. $16=li;
  3788. _st($16)._with_((function(){
  3789. return smalltalk.withContext(function($ctx3) {
  3790. $17=_st(html)._span();
  3791. $ctx3.sendIdx["span"]=7;
  3792. _st($17)._class_("ltab");
  3793. $ctx3.sendIdx["class:"]=10;
  3794. $18=_st(html)._span();
  3795. $ctx3.sendIdx["span"]=8;
  3796. _st($18)._class_("mtab");
  3797. $ctx3.sendIdx["class:"]=11;
  3798. $19=_st($18)._with_("Comment");
  3799. $19;
  3800. return _st(_st(html)._span())._class_("rtab");
  3801. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)})}));
  3802. $ctx2.sendIdx["with:"]=5;
  3803. $20=_st($16)._onClick_((function(){
  3804. return smalltalk.withContext(function($ctx3) {
  3805. return self._selectTab_("comment");
  3806. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,10)})}));
  3807. return $20;
  3808. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1,1)})}));
  3809. return self}, function($ctx1) {$ctx1.fill(self,"updateTabsList",{},globals.Browser)})},
  3810. args: [],
  3811. 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 ]]",
  3812. messageSends: ["contents:", "li", "ifTrue:", "=", "class:", "with:", "span", "onClick:", "selectTab:"],
  3813. referencedClasses: []
  3814. }),
  3815. globals.Browser);
  3816. smalltalk.addMethod(
  3817. smalltalk.method({
  3818. selector: "open",
  3819. protocol: 'convenience',
  3820. fn: function (){
  3821. var self=this;
  3822. return smalltalk.withContext(function($ctx1) {
  3823. _st(self._new())._open();
  3824. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.Browser.klass)})},
  3825. args: [],
  3826. source: "open\x0a\x09self new open",
  3827. messageSends: ["open", "new"],
  3828. referencedClasses: []
  3829. }),
  3830. globals.Browser.klass);
  3831. smalltalk.addMethod(
  3832. smalltalk.method({
  3833. selector: "openOn:",
  3834. protocol: 'convenience',
  3835. fn: function (aClass){
  3836. var self=this;
  3837. return smalltalk.withContext(function($ctx1) {
  3838. var $2,$3,$1;
  3839. $2=self._new();
  3840. _st($2)._open();
  3841. _st($2)._selectCategory_(_st(aClass)._category());
  3842. $3=_st($2)._selectClass_(aClass);
  3843. $1=$3;
  3844. return $1;
  3845. }, function($ctx1) {$ctx1.fill(self,"openOn:",{aClass:aClass},globals.Browser.klass)})},
  3846. args: ["aClass"],
  3847. source: "openOn: aClass\x0a\x09^ self new\x0a\x09open;\x0a\x09selectCategory: aClass category;\x0a\x09selectClass: aClass",
  3848. messageSends: ["open", "new", "selectCategory:", "category", "selectClass:"],
  3849. referencedClasses: []
  3850. }),
  3851. globals.Browser.klass);
  3852. smalltalk.addClass('Debugger', globals.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  3853. smalltalk.addMethod(
  3854. smalltalk.method({
  3855. selector: "allVariables",
  3856. protocol: 'accessing',
  3857. fn: function (){
  3858. var self=this;
  3859. var all;
  3860. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  3861. return smalltalk.withContext(function($ctx1) {
  3862. var $3,$2,$1,$4;
  3863. all=_st($Dictionary())._new();
  3864. $3=self._receiver();
  3865. $ctx1.sendIdx["receiver"]=1;
  3866. $2=_st($3)._class();
  3867. $1=_st($2)._allInstanceVariableNames();
  3868. _st($1)._do_((function(each){
  3869. return smalltalk.withContext(function($ctx2) {
  3870. return _st(all)._at_put_(each,_st(self._receiver())._instVarAt_(each));
  3871. $ctx2.sendIdx["at:put:"]=1;
  3872. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  3873. _st(_st(self["@selectedContext"])._locals())._keysAndValuesDo_((function(key,value){
  3874. return smalltalk.withContext(function($ctx2) {
  3875. return _st(all)._at_put_(key,value);
  3876. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,2)})}));
  3877. $4=all;
  3878. return $4;
  3879. }, function($ctx1) {$ctx1.fill(self,"allVariables",{all:all},globals.Debugger)})},
  3880. args: [],
  3881. 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",
  3882. messageSends: ["new", "do:", "allInstanceVariableNames", "class", "receiver", "at:put:", "instVarAt:", "keysAndValuesDo:", "locals"],
  3883. referencedClasses: ["Dictionary"]
  3884. }),
  3885. globals.Debugger);
  3886. smalltalk.addMethod(
  3887. smalltalk.method({
  3888. selector: "canBeClosed",
  3889. protocol: 'testing',
  3890. fn: function (){
  3891. var self=this;
  3892. return true;
  3893. },
  3894. args: [],
  3895. source: "canBeClosed\x0a\x09^ true",
  3896. messageSends: [],
  3897. referencedClasses: []
  3898. }),
  3899. globals.Debugger);
  3900. smalltalk.addMethod(
  3901. smalltalk.method({
  3902. selector: "error",
  3903. protocol: 'accessing',
  3904. fn: function (){
  3905. var self=this;
  3906. var $1;
  3907. $1=self["@error"];
  3908. return $1;
  3909. },
  3910. args: [],
  3911. source: "error\x0a\x09^ error",
  3912. messageSends: [],
  3913. referencedClasses: []
  3914. }),
  3915. globals.Debugger);
  3916. smalltalk.addMethod(
  3917. smalltalk.method({
  3918. selector: "error:",
  3919. protocol: 'accessing',
  3920. fn: function (anError){
  3921. var self=this;
  3922. self["@error"]=anError;
  3923. return self},
  3924. args: ["anError"],
  3925. source: "error: anError\x0a\x09error := anError",
  3926. messageSends: [],
  3927. referencedClasses: []
  3928. }),
  3929. globals.Debugger);
  3930. smalltalk.addMethod(
  3931. smalltalk.method({
  3932. selector: "initialize",
  3933. protocol: 'initialization',
  3934. fn: function (){
  3935. var self=this;
  3936. return smalltalk.withContext(function($ctx1) {
  3937. globals.Debugger.superclass.fn.prototype._initialize.apply(_st(self), []);
  3938. _st(self["@unsavedChanges"]).__eq(false);
  3939. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.Debugger)})},
  3940. args: [],
  3941. source: "initialize\x0a\x09super initialize.\x0a\x09unsavedChanges = false",
  3942. messageSends: ["initialize", "="],
  3943. referencedClasses: []
  3944. }),
  3945. globals.Debugger);
  3946. smalltalk.addMethod(
  3947. smalltalk.method({
  3948. selector: "inspectSelectedVariable",
  3949. protocol: 'actions',
  3950. fn: function (){
  3951. var self=this;
  3952. return smalltalk.withContext(function($ctx1) {
  3953. _st(self["@selectedVariable"])._inspect();
  3954. return self}, function($ctx1) {$ctx1.fill(self,"inspectSelectedVariable",{},globals.Debugger)})},
  3955. args: [],
  3956. source: "inspectSelectedVariable\x0a\x09selectedVariable inspect",
  3957. messageSends: ["inspect"],
  3958. referencedClasses: []
  3959. }),
  3960. globals.Debugger);
  3961. smalltalk.addMethod(
  3962. smalltalk.method({
  3963. selector: "label",
  3964. protocol: 'accessing',
  3965. fn: function (){
  3966. var self=this;
  3967. return "[ Debugger ]";
  3968. },
  3969. args: [],
  3970. source: "label\x0a\x09^ '[ Debugger ]'",
  3971. messageSends: [],
  3972. referencedClasses: []
  3973. }),
  3974. globals.Debugger);
  3975. smalltalk.addMethod(
  3976. smalltalk.method({
  3977. selector: "method",
  3978. protocol: 'accessing',
  3979. fn: function (){
  3980. var self=this;
  3981. return smalltalk.withContext(function($ctx1) {
  3982. var $1;
  3983. $1=_st(self["@selectedContext"])._method();
  3984. return $1;
  3985. }, function($ctx1) {$ctx1.fill(self,"method",{},globals.Debugger)})},
  3986. args: [],
  3987. source: "method\x0a\x09^ selectedContext method",
  3988. messageSends: ["method"],
  3989. referencedClasses: []
  3990. }),
  3991. globals.Debugger);
  3992. smalltalk.addMethod(
  3993. smalltalk.method({
  3994. selector: "proceed",
  3995. protocol: 'actions',
  3996. fn: function (){
  3997. var self=this;
  3998. return smalltalk.withContext(function($ctx1) {
  3999. self._close();
  4000. _st(_st(self["@selectedContext"])._receiver())._perform_withArguments_(_st(self["@selectedContext"])._selector(),_st(self["@selectedContext"])._temps());
  4001. return self}, function($ctx1) {$ctx1.fill(self,"proceed",{},globals.Debugger)})},
  4002. args: [],
  4003. source: "proceed\x0a\x09self close.\x0a\x09selectedContext receiver perform: selectedContext selector withArguments: selectedContext temps",
  4004. messageSends: ["close", "perform:withArguments:", "receiver", "selector", "temps"],
  4005. referencedClasses: []
  4006. }),
  4007. globals.Debugger);
  4008. smalltalk.addMethod(
  4009. smalltalk.method({
  4010. selector: "receiver",
  4011. protocol: 'accessing',
  4012. fn: function (){
  4013. var self=this;
  4014. return smalltalk.withContext(function($ctx1) {
  4015. var $1;
  4016. $1=_st(self["@selectedContext"])._receiver();
  4017. return $1;
  4018. }, function($ctx1) {$ctx1.fill(self,"receiver",{},globals.Debugger)})},
  4019. args: [],
  4020. source: "receiver\x0a\x09^ selectedContext receiver",
  4021. messageSends: ["receiver"],
  4022. referencedClasses: []
  4023. }),
  4024. globals.Debugger);
  4025. smalltalk.addMethod(
  4026. smalltalk.method({
  4027. selector: "renderBottomPanelOn:",
  4028. protocol: 'rendering',
  4029. fn: function (html){
  4030. var self=this;
  4031. function $SourceArea(){return globals.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  4032. return smalltalk.withContext(function($ctx1) {
  4033. var $1,$2;
  4034. $1=_st(html)._div();
  4035. $ctx1.sendIdx["div"]=1;
  4036. _st($1)._class_("amber_sourceCode debugger");
  4037. $ctx1.sendIdx["class:"]=1;
  4038. $2=_st($1)._with_((function(){
  4039. return smalltalk.withContext(function($ctx2) {
  4040. self["@sourceArea"]=_st($SourceArea())._new();
  4041. self["@sourceArea"];
  4042. return _st(self["@sourceArea"])._renderOn_(html);
  4043. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4044. self["@ul2"]=_st(_st(html)._ul())._class_("amber_column debugger variables");
  4045. $ctx1.sendIdx["class:"]=2;
  4046. self["@inspector"]=_st(_st(html)._div())._class_("amber_column debugger inspector");
  4047. _st(self["@sourceArea"])._onKeyUp_((function(){
  4048. return smalltalk.withContext(function($ctx2) {
  4049. return self._updateStatus();
  4050. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4051. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},globals.Debugger)})},
  4052. args: ["html"],
  4053. 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 ]",
  4054. messageSends: ["class:", "div", "with:", "new", "renderOn:", "ul", "onKeyUp:", "updateStatus"],
  4055. referencedClasses: ["SourceArea"]
  4056. }),
  4057. globals.Debugger);
  4058. smalltalk.addMethod(
  4059. smalltalk.method({
  4060. selector: "renderBoxOn:",
  4061. protocol: 'rendering',
  4062. fn: function (html){
  4063. var self=this;
  4064. return smalltalk.withContext(function($ctx1) {
  4065. var $1;
  4066. self._renderTopPanelOn_(html);
  4067. $1=self._renderBottomPanelOn_(html);
  4068. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.Debugger)})},
  4069. args: ["html"],
  4070. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
  4071. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"],
  4072. referencedClasses: []
  4073. }),
  4074. globals.Debugger);
  4075. smalltalk.addMethod(
  4076. smalltalk.method({
  4077. selector: "renderButtonsOn:",
  4078. protocol: 'rendering',
  4079. fn: function (html){
  4080. var self=this;
  4081. return smalltalk.withContext(function($ctx1) {
  4082. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15;
  4083. $1=_st(html)._button();
  4084. $ctx1.sendIdx["button"]=1;
  4085. _st($1)._with_("Save");
  4086. $ctx1.sendIdx["with:"]=1;
  4087. $2=_st($1)._onClick_((function(){
  4088. return smalltalk.withContext(function($ctx2) {
  4089. return self._save();
  4090. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4091. $ctx1.sendIdx["onClick:"]=1;
  4092. self["@saveButton"]=$2;
  4093. $3=_st(html)._button();
  4094. $ctx1.sendIdx["button"]=2;
  4095. _st($3)._with_("DoIt");
  4096. $ctx1.sendIdx["with:"]=2;
  4097. $4=_st($3)._onClick_((function(){
  4098. return smalltalk.withContext(function($ctx2) {
  4099. return _st(self["@sourceArea"])._doIt();
  4100. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4101. $ctx1.sendIdx["onClick:"]=2;
  4102. $5=_st(html)._button();
  4103. $ctx1.sendIdx["button"]=3;
  4104. _st($5)._with_("PrintIt");
  4105. $ctx1.sendIdx["with:"]=3;
  4106. $6=_st($5)._onClick_((function(){
  4107. return smalltalk.withContext(function($ctx2) {
  4108. return _st(self["@sourceArea"])._printIt();
  4109. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  4110. $ctx1.sendIdx["onClick:"]=3;
  4111. $7=_st(html)._button();
  4112. $ctx1.sendIdx["button"]=4;
  4113. _st($7)._with_("InspectIt");
  4114. $ctx1.sendIdx["with:"]=4;
  4115. $8=_st($7)._onClick_((function(){
  4116. return smalltalk.withContext(function($ctx2) {
  4117. return _st(self["@sourceArea"])._inspectIt();
  4118. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  4119. $ctx1.sendIdx["onClick:"]=4;
  4120. $9=_st(html)._button();
  4121. $ctx1.sendIdx["button"]=5;
  4122. _st($9)._with_("Proceed");
  4123. $ctx1.sendIdx["with:"]=5;
  4124. $10=_st($9)._onClick_((function(){
  4125. return smalltalk.withContext(function($ctx2) {
  4126. return self._proceed();
  4127. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
  4128. $ctx1.sendIdx["onClick:"]=5;
  4129. $11=_st(html)._button();
  4130. $ctx1.sendIdx["button"]=6;
  4131. _st($11)._with_("Abandon");
  4132. $ctx1.sendIdx["with:"]=6;
  4133. $12=_st($11)._onClick_((function(){
  4134. return smalltalk.withContext(function($ctx2) {
  4135. return self._close();
  4136. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)})}));
  4137. $ctx1.sendIdx["onClick:"]=6;
  4138. $13=_st(html)._button();
  4139. _st($13)._class_("amber_button debugger inspect");
  4140. _st($13)._with_("Inspect");
  4141. $14=_st($13)._onClick_((function(){
  4142. return smalltalk.withContext(function($ctx2) {
  4143. return self._inspectSelectedVariable();
  4144. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,7)})}));
  4145. self["@inspectButton"]=$14;
  4146. self._updateSourceArea();
  4147. self._updateStatus();
  4148. self._updateVariablesList();
  4149. $15=self._updateInspector();
  4150. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.Debugger)})},
  4151. args: ["html"],
  4152. 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",
  4153. messageSends: ["with:", "button", "onClick:", "save", "doIt", "printIt", "inspectIt", "proceed", "close", "class:", "inspectSelectedVariable", "updateSourceArea", "updateStatus", "updateVariablesList", "updateInspector"],
  4154. referencedClasses: []
  4155. }),
  4156. globals.Debugger);
  4157. smalltalk.addMethod(
  4158. smalltalk.method({
  4159. selector: "renderContext:on:",
  4160. protocol: 'rendering',
  4161. fn: function (aContext,html){
  4162. var self=this;
  4163. var li;
  4164. return smalltalk.withContext(function($ctx1) {
  4165. var $1,$2,$3,$4;
  4166. li=_st(html)._li();
  4167. $1=_st(self["@selectedContext"]).__eq(aContext);
  4168. if(smalltalk.assert($1)){
  4169. _st(li)._class_("selected");
  4170. };
  4171. $2=li;
  4172. _st($2)._with_(_st(aContext)._asString());
  4173. $3=_st($2)._onClick_((function(){
  4174. return smalltalk.withContext(function($ctx2) {
  4175. return self._selectContext_(aContext);
  4176. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4177. $4=_st(aContext)._outerContext();
  4178. $ctx1.sendIdx["outerContext"]=1;
  4179. if(($receiver = $4) == nil || $receiver == null){
  4180. $4;
  4181. } else {
  4182. self._renderContext_on_(_st(aContext)._outerContext(),html);
  4183. };
  4184. return self}, function($ctx1) {$ctx1.fill(self,"renderContext:on:",{aContext:aContext,html:html,li:li},globals.Debugger)})},
  4185. args: ["aContext", "html"],
  4186. 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 ]",
  4187. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "asString", "onClick:", "selectContext:", "ifNotNil:", "outerContext", "renderContext:on:"],
  4188. referencedClasses: []
  4189. }),
  4190. globals.Debugger);
  4191. smalltalk.addMethod(
  4192. smalltalk.method({
  4193. selector: "renderTopPanelOn:",
  4194. protocol: 'rendering',
  4195. fn: function (html){
  4196. var self=this;
  4197. return smalltalk.withContext(function($ctx1) {
  4198. var $1,$2,$4,$6,$8,$7,$5,$9,$10,$3;
  4199. $1=self._error();
  4200. $ctx1.sendIdx["error"]=1;
  4201. self["@selectedContext"]=_st($1)._context();
  4202. $ctx1.sendIdx["context"]=1;
  4203. $2=_st(html)._div();
  4204. $ctx1.sendIdx["div"]=1;
  4205. _st($2)._class_("top");
  4206. $ctx1.sendIdx["class:"]=1;
  4207. $3=_st($2)._with_((function(){
  4208. return smalltalk.withContext(function($ctx2) {
  4209. $4=_st(html)._div();
  4210. _st($4)._class_("label");
  4211. $ctx2.sendIdx["class:"]=2;
  4212. $6=$4;
  4213. $8=self._error();
  4214. $ctx2.sendIdx["error"]=2;
  4215. $7=_st($8)._messageText();
  4216. $5=_st($6)._with_($7);
  4217. $ctx2.sendIdx["with:"]=2;
  4218. $5;
  4219. $9=_st(html)._ul();
  4220. _st($9)._class_("amber_column debugger contexts");
  4221. $10=_st($9)._with_((function(){
  4222. return smalltalk.withContext(function($ctx3) {
  4223. return self._renderContext_on_(_st(self._error())._context(),html);
  4224. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4225. self["@ul"]=$10;
  4226. return self["@ul"];
  4227. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4228. $ctx1.sendIdx["with:"]=1;
  4229. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},globals.Debugger)})},
  4230. args: ["html"],
  4231. 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 ]]",
  4232. messageSends: ["context", "error", "class:", "div", "with:", "messageText", "ul", "renderContext:on:"],
  4233. referencedClasses: []
  4234. }),
  4235. globals.Debugger);
  4236. smalltalk.addMethod(
  4237. smalltalk.method({
  4238. selector: "save",
  4239. protocol: 'actions',
  4240. fn: function (){
  4241. var self=this;
  4242. var protocol;
  4243. return smalltalk.withContext(function($ctx1) {
  4244. var $4,$3,$2,$1;
  4245. $4=_st(self["@selectedContext"])._receiver();
  4246. $ctx1.sendIdx["receiver"]=1;
  4247. $3=_st($4)._class();
  4248. $ctx1.sendIdx["class"]=1;
  4249. $2=_st($3)._methodDictionary();
  4250. $1=_st($2)._at_(_st(self["@selectedContext"])._selector());
  4251. protocol=_st($1)._category();
  4252. _st(_st(_st(self["@selectedContext"])._receiver())._class())._compile_category_(_st(self["@sourceArea"])._val(),protocol);
  4253. self._updateStatus();
  4254. return self}, function($ctx1) {$ctx1.fill(self,"save",{protocol:protocol},globals.Debugger)})},
  4255. args: [],
  4256. source: "save\x0a\x09| protocol |\x0a\x09protocol := (selectedContext receiver class methodDictionary at: selectedContext selector) category.\x0a\x09selectedContext receiver class compile: sourceArea val category: protocol.\x0a\x09self updateStatus",
  4257. messageSends: ["category", "at:", "methodDictionary", "class", "receiver", "selector", "compile:category:", "val", "updateStatus"],
  4258. referencedClasses: []
  4259. }),
  4260. globals.Debugger);
  4261. smalltalk.addMethod(
  4262. smalltalk.method({
  4263. selector: "selectContext:",
  4264. protocol: 'actions',
  4265. fn: function (aContext){
  4266. var self=this;
  4267. return smalltalk.withContext(function($ctx1) {
  4268. var $1;
  4269. self["@selectedContext"]=aContext;
  4270. self["@selectedVariable"]=nil;
  4271. self["@selectedVariableName"]=nil;
  4272. self._updateContextsList();
  4273. self._updateSourceArea();
  4274. self._updateInspector();
  4275. self._updateVariablesList();
  4276. $1=self._updateStatus();
  4277. return self}, function($ctx1) {$ctx1.fill(self,"selectContext:",{aContext:aContext},globals.Debugger)})},
  4278. args: ["aContext"],
  4279. 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",
  4280. messageSends: ["updateContextsList", "updateSourceArea", "updateInspector", "updateVariablesList", "updateStatus"],
  4281. referencedClasses: []
  4282. }),
  4283. globals.Debugger);
  4284. smalltalk.addMethod(
  4285. smalltalk.method({
  4286. selector: "selectVariable:named:",
  4287. protocol: 'actions',
  4288. fn: function (anObject,aString){
  4289. var self=this;
  4290. return smalltalk.withContext(function($ctx1) {
  4291. self["@selectedVariable"]=anObject;
  4292. self["@selectedVariableName"]=aString;
  4293. _st(self["@inspector"])._contents_((function(html){
  4294. return smalltalk.withContext(function($ctx2) {
  4295. return _st(html)._with_(_st(anObject)._printString());
  4296. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4297. self._updateVariablesList();
  4298. return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:named:",{anObject:anObject,aString:aString},globals.Debugger)})},
  4299. args: ["anObject", "aString"],
  4300. source: "selectVariable: anObject named: aString\x0a\x09\x0a\x09selectedVariable := anObject.\x0a\x09selectedVariableName := aString.\x0a\x09inspector contents: [ :html | html with: anObject printString ].\x0a\x09self updateVariablesList",
  4301. messageSends: ["contents:", "with:", "printString", "updateVariablesList"],
  4302. referencedClasses: []
  4303. }),
  4304. globals.Debugger);
  4305. smalltalk.addMethod(
  4306. smalltalk.method({
  4307. selector: "source",
  4308. protocol: 'accessing',
  4309. fn: function (){
  4310. var self=this;
  4311. return smalltalk.withContext(function($ctx1) {
  4312. var $2,$1;
  4313. $2=self._method();
  4314. $ctx1.sendIdx["method"]=1;
  4315. if(($receiver = $2) == nil || $receiver == null){
  4316. $1="Method doesn't exist!";
  4317. } else {
  4318. $1=_st(self._method())._source();
  4319. };
  4320. return $1;
  4321. }, function($ctx1) {$ctx1.fill(self,"source",{},globals.Debugger)})},
  4322. args: [],
  4323. source: "source\x0a\x09^ self method\x0a\x09\x09ifNil: [ 'Method doesn''t exist!' ]\x0a\x09\x09ifNotNil: [ self method source ]",
  4324. messageSends: ["ifNil:ifNotNil:", "method", "source"],
  4325. referencedClasses: []
  4326. }),
  4327. globals.Debugger);
  4328. smalltalk.addMethod(
  4329. smalltalk.method({
  4330. selector: "updateContextsList",
  4331. protocol: 'updating',
  4332. fn: function (){
  4333. var self=this;
  4334. return smalltalk.withContext(function($ctx1) {
  4335. _st(self["@ul"])._contents_((function(html){
  4336. return smalltalk.withContext(function($ctx2) {
  4337. return self._renderContext_on_(_st(self._error())._context(),html);
  4338. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4339. return self}, function($ctx1) {$ctx1.fill(self,"updateContextsList",{},globals.Debugger)})},
  4340. args: [],
  4341. source: "updateContextsList\x0a\x09ul contents: [ :html |\x0a\x09\x09self renderContext: self error context on: html ]",
  4342. messageSends: ["contents:", "renderContext:on:", "context", "error"],
  4343. referencedClasses: []
  4344. }),
  4345. globals.Debugger);
  4346. smalltalk.addMethod(
  4347. smalltalk.method({
  4348. selector: "updateInspector",
  4349. protocol: 'updating',
  4350. fn: function (){
  4351. var self=this;
  4352. return smalltalk.withContext(function($ctx1) {
  4353. _st(self["@inspector"])._contents_((function(html){
  4354. return smalltalk.withContext(function($ctx2) {
  4355. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4356. return self}, function($ctx1) {$ctx1.fill(self,"updateInspector",{},globals.Debugger)})},
  4357. args: [],
  4358. source: "updateInspector\x0a\x09inspector contents: [ :html | ]",
  4359. messageSends: ["contents:"],
  4360. referencedClasses: []
  4361. }),
  4362. globals.Debugger);
  4363. smalltalk.addMethod(
  4364. smalltalk.method({
  4365. selector: "updateSourceArea",
  4366. protocol: 'updating',
  4367. fn: function (){
  4368. var self=this;
  4369. return smalltalk.withContext(function($ctx1) {
  4370. _st(self["@sourceArea"])._val_(self._source());
  4371. return self}, function($ctx1) {$ctx1.fill(self,"updateSourceArea",{},globals.Debugger)})},
  4372. args: [],
  4373. source: "updateSourceArea\x0a\x09sourceArea val: self source",
  4374. messageSends: ["val:", "source"],
  4375. referencedClasses: []
  4376. }),
  4377. globals.Debugger);
  4378. smalltalk.addMethod(
  4379. smalltalk.method({
  4380. selector: "updateStatus",
  4381. protocol: 'updating',
  4382. fn: function (){
  4383. var self=this;
  4384. return smalltalk.withContext(function($ctx1) {
  4385. var $1,$2,$3;
  4386. $1=_st(_st(self["@sourceArea"])._val()).__eq(self._source());
  4387. if(smalltalk.assert($1)){
  4388. $2=self["@saveButton"];
  4389. if(($receiver = $2) == nil || $receiver == null){
  4390. $2;
  4391. } else {
  4392. _st(self["@saveButton"])._at_put_("disabled",true);
  4393. };
  4394. self["@unsavedChanges"]=false;
  4395. self["@unsavedChanges"];
  4396. } else {
  4397. $3=self["@saveButton"];
  4398. if(($receiver = $3) == nil || $receiver == null){
  4399. $3;
  4400. } else {
  4401. _st(self["@saveButton"])._removeAt_("disabled");
  4402. };
  4403. self["@unsavedChanges"]=true;
  4404. self["@unsavedChanges"];
  4405. };
  4406. return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{},globals.Debugger)})},
  4407. args: [],
  4408. 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 ]",
  4409. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"],
  4410. referencedClasses: []
  4411. }),
  4412. globals.Debugger);
  4413. smalltalk.addMethod(
  4414. smalltalk.method({
  4415. selector: "updateVariablesList",
  4416. protocol: 'updating',
  4417. fn: function (){
  4418. var self=this;
  4419. return smalltalk.withContext(function($ctx1) {
  4420. var $1,$2,$3,$4,$5,$6,$7;
  4421. _st(self["@ul2"])._contents_((function(html){
  4422. var li;
  4423. return smalltalk.withContext(function($ctx2) {
  4424. $1=_st(html)._li();
  4425. $ctx2.sendIdx["li"]=1;
  4426. _st($1)._with_("self");
  4427. $ctx2.sendIdx["with:"]=1;
  4428. $2=_st($1)._onClick_((function(){
  4429. return smalltalk.withContext(function($ctx3) {
  4430. return self._selectVariable_named_(self._receiver(),"self");
  4431. $ctx3.sendIdx["selectVariable:named:"]=1;
  4432. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4433. $ctx2.sendIdx["onClick:"]=1;
  4434. li=$2;
  4435. li;
  4436. $3=_st(self["@selectedVariableName"]).__eq("self");
  4437. $ctx2.sendIdx["="]=1;
  4438. if(smalltalk.assert($3)){
  4439. _st(li)._class_("selected");
  4440. $ctx2.sendIdx["class:"]=1;
  4441. };
  4442. return _st(self._allVariables())._keysAndValuesDo_((function(key,value){
  4443. return smalltalk.withContext(function($ctx3) {
  4444. $4=_st(html)._li();
  4445. _st($4)._with_(key);
  4446. $5=_st($4)._onClick_((function(){
  4447. return smalltalk.withContext(function($ctx4) {
  4448. return self._selectVariable_named_(value,key);
  4449. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  4450. li=$5;
  4451. li;
  4452. $6=_st(self["@selectedVariableName"]).__eq(key);
  4453. if(smalltalk.assert($6)){
  4454. return _st(li)._class_("selected");
  4455. };
  4456. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx2,4)})}));
  4457. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1,1)})}));
  4458. $7=self["@selectedVariable"];
  4459. if(($receiver = $7) == nil || $receiver == null){
  4460. _st(self["@inspectButton"])._at_put_("disabled",true);
  4461. } else {
  4462. _st(self["@inspectButton"])._removeAt_("disabled");
  4463. };
  4464. return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},globals.Debugger)})},
  4465. args: [],
  4466. 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' ]",
  4467. messageSends: ["contents:", "with:", "li", "onClick:", "selectVariable:named:", "receiver", "ifTrue:", "=", "class:", "keysAndValuesDo:", "allVariables", "ifNil:ifNotNil:", "at:put:", "removeAt:"],
  4468. referencedClasses: []
  4469. }),
  4470. globals.Debugger);
  4471. smalltalk.addClass('IDEInspector', globals.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  4472. smalltalk.addMethod(
  4473. smalltalk.method({
  4474. selector: "canBeClosed",
  4475. protocol: 'testing',
  4476. fn: function (){
  4477. var self=this;
  4478. return true;
  4479. },
  4480. args: [],
  4481. source: "canBeClosed\x0a\x09^ true",
  4482. messageSends: [],
  4483. referencedClasses: []
  4484. }),
  4485. globals.IDEInspector);
  4486. smalltalk.addMethod(
  4487. smalltalk.method({
  4488. selector: "dive",
  4489. protocol: 'actions',
  4490. fn: function (){
  4491. var self=this;
  4492. return smalltalk.withContext(function($ctx1) {
  4493. _st(_st(self._variables())._at_(self._selectedVariable()))._inspect();
  4494. return self}, function($ctx1) {$ctx1.fill(self,"dive",{},globals.IDEInspector)})},
  4495. args: [],
  4496. source: "dive\x0a\x09(self variables at: self selectedVariable) inspect",
  4497. messageSends: ["inspect", "at:", "variables", "selectedVariable"],
  4498. referencedClasses: []
  4499. }),
  4500. globals.IDEInspector);
  4501. smalltalk.addMethod(
  4502. smalltalk.method({
  4503. selector: "inspect:",
  4504. protocol: 'actions',
  4505. fn: function (anObject){
  4506. var self=this;
  4507. return smalltalk.withContext(function($ctx1) {
  4508. self["@object"]=anObject;
  4509. self["@variables"]=[];
  4510. _st(self["@object"])._inspectOn_(self);
  4511. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},globals.IDEInspector)})},
  4512. args: ["anObject"],
  4513. source: "inspect: anObject\x0a\x09object := anObject.\x0a\x09variables := #().\x0a\x09object inspectOn: self",
  4514. messageSends: ["inspectOn:"],
  4515. referencedClasses: []
  4516. }),
  4517. globals.IDEInspector);
  4518. smalltalk.addMethod(
  4519. smalltalk.method({
  4520. selector: "label",
  4521. protocol: 'accessing',
  4522. fn: function (){
  4523. var self=this;
  4524. return smalltalk.withContext(function($ctx1) {
  4525. var $2,$1;
  4526. $2=self["@label"];
  4527. if(($receiver = $2) == nil || $receiver == null){
  4528. $1="Inspector (nil)";
  4529. } else {
  4530. $1=$2;
  4531. };
  4532. return $1;
  4533. }, function($ctx1) {$ctx1.fill(self,"label",{},globals.IDEInspector)})},
  4534. args: [],
  4535. source: "label\x0a\x09^ label ifNil: [ 'Inspector (nil)' ]",
  4536. messageSends: ["ifNil:"],
  4537. referencedClasses: []
  4538. }),
  4539. globals.IDEInspector);
  4540. smalltalk.addMethod(
  4541. smalltalk.method({
  4542. selector: "refresh",
  4543. protocol: 'actions',
  4544. fn: function (){
  4545. var self=this;
  4546. return smalltalk.withContext(function($ctx1) {
  4547. var $1;
  4548. self._inspect_(self["@object"]);
  4549. self._updateVariablesList();
  4550. $1=self._updateValueTextarea();
  4551. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},globals.IDEInspector)})},
  4552. args: [],
  4553. source: "refresh\x0a\x09self\x0a\x09\x09inspect: object;\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea",
  4554. messageSends: ["inspect:", "updateVariablesList", "updateValueTextarea"],
  4555. referencedClasses: []
  4556. }),
  4557. globals.IDEInspector);
  4558. smalltalk.addMethod(
  4559. smalltalk.method({
  4560. selector: "renderBottomPanelOn:",
  4561. protocol: 'rendering',
  4562. fn: function (html){
  4563. var self=this;
  4564. function $SourceArea(){return globals.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  4565. return smalltalk.withContext(function($ctx1) {
  4566. var $1,$3,$4,$2;
  4567. $1=_st(html)._div();
  4568. _st($1)._class_("amber_sourceCode");
  4569. $2=_st($1)._with_((function(){
  4570. return smalltalk.withContext(function($ctx2) {
  4571. $3=_st($SourceArea())._new();
  4572. _st($3)._receiver_(self["@object"]);
  4573. _st($3)._onDoIt_((function(){
  4574. return smalltalk.withContext(function($ctx3) {
  4575. return self._refresh();
  4576. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4577. $4=_st($3)._yourself();
  4578. self["@sourceArea"]=$4;
  4579. self["@sourceArea"];
  4580. return _st(self["@sourceArea"])._renderOn_(html);
  4581. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4582. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},globals.IDEInspector)})},
  4583. args: ["html"],
  4584. 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 ]",
  4585. messageSends: ["class:", "div", "with:", "receiver:", "new", "onDoIt:", "refresh", "yourself", "renderOn:"],
  4586. referencedClasses: ["SourceArea"]
  4587. }),
  4588. globals.IDEInspector);
  4589. smalltalk.addMethod(
  4590. smalltalk.method({
  4591. selector: "renderBoxOn:",
  4592. protocol: 'rendering',
  4593. fn: function (html){
  4594. var self=this;
  4595. return smalltalk.withContext(function($ctx1) {
  4596. var $1;
  4597. self._renderTopPanelOn_(html);
  4598. $1=self._renderBottomPanelOn_(html);
  4599. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.IDEInspector)})},
  4600. args: ["html"],
  4601. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
  4602. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"],
  4603. referencedClasses: []
  4604. }),
  4605. globals.IDEInspector);
  4606. smalltalk.addMethod(
  4607. smalltalk.method({
  4608. selector: "renderButtonsOn:",
  4609. protocol: 'rendering',
  4610. fn: function (html){
  4611. var self=this;
  4612. return smalltalk.withContext(function($ctx1) {
  4613. var $1,$3,$2,$4,$6,$5,$7,$8;
  4614. $1=_st(html)._button();
  4615. $ctx1.sendIdx["button"]=1;
  4616. _st($1)._with_("DoIt");
  4617. $ctx1.sendIdx["with:"]=1;
  4618. $2=_st($1)._onClick_((function(){
  4619. return smalltalk.withContext(function($ctx2) {
  4620. $3=self._sourceArea();
  4621. $ctx2.sendIdx["sourceArea"]=1;
  4622. return _st($3)._doIt();
  4623. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4624. $ctx1.sendIdx["onClick:"]=1;
  4625. $4=_st(html)._button();
  4626. $ctx1.sendIdx["button"]=2;
  4627. _st($4)._with_("PrintIt");
  4628. $ctx1.sendIdx["with:"]=2;
  4629. $5=_st($4)._onClick_((function(){
  4630. return smalltalk.withContext(function($ctx2) {
  4631. $6=self._sourceArea();
  4632. $ctx2.sendIdx["sourceArea"]=2;
  4633. return _st($6)._printIt();
  4634. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4635. $ctx1.sendIdx["onClick:"]=2;
  4636. $7=_st(html)._button();
  4637. _st($7)._with_("InspectIt");
  4638. $8=_st($7)._onClick_((function(){
  4639. return smalltalk.withContext(function($ctx2) {
  4640. return _st(self._sourceArea())._inspectIt();
  4641. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  4642. self._updateButtons();
  4643. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.IDEInspector)})},
  4644. args: ["html"],
  4645. 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",
  4646. messageSends: ["with:", "button", "onClick:", "doIt", "sourceArea", "printIt", "inspectIt", "updateButtons"],
  4647. referencedClasses: []
  4648. }),
  4649. globals.IDEInspector);
  4650. smalltalk.addMethod(
  4651. smalltalk.method({
  4652. selector: "renderTopPanelOn:",
  4653. protocol: 'rendering',
  4654. fn: function (html){
  4655. var self=this;
  4656. return smalltalk.withContext(function($ctx1) {
  4657. var $1,$3,$4,$5,$7,$8,$9,$10,$6,$2,$11;
  4658. $1=_st(html)._div();
  4659. $ctx1.sendIdx["div"]=1;
  4660. _st($1)._class_("top");
  4661. $ctx1.sendIdx["class:"]=1;
  4662. $2=_st($1)._with_((function(){
  4663. return smalltalk.withContext(function($ctx2) {
  4664. self["@variablesList"]=_st(_st(html)._ul())._class_("amber_column variables");
  4665. $ctx2.sendIdx["class:"]=2;
  4666. self["@variablesList"];
  4667. $3=_st(html)._textarea();
  4668. _st($3)._class_("amber_column value");
  4669. $ctx2.sendIdx["class:"]=3;
  4670. _st($3)._at_put_("readonly","readonly");
  4671. $4=_st($3)._yourself();
  4672. self["@valueTextarea"]=$4;
  4673. self["@valueTextarea"];
  4674. $5=_st(html)._div();
  4675. $ctx2.sendIdx["div"]=2;
  4676. _st($5)._class_("amber_tabs inspector");
  4677. $ctx2.sendIdx["class:"]=4;
  4678. $6=_st($5)._with_((function(){
  4679. return smalltalk.withContext(function($ctx3) {
  4680. $7=_st(html)._button();
  4681. $ctx3.sendIdx["button"]=1;
  4682. _st($7)._class_("amber_button inspector refresh");
  4683. $ctx3.sendIdx["class:"]=5;
  4684. _st($7)._with_("Refresh");
  4685. $ctx3.sendIdx["with:"]=3;
  4686. $8=_st($7)._onClick_((function(){
  4687. return smalltalk.withContext(function($ctx4) {
  4688. return self._refresh();
  4689. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  4690. $ctx3.sendIdx["onClick:"]=1;
  4691. $8;
  4692. $9=_st(html)._button();
  4693. _st($9)._class_("amber_button inspector dive");
  4694. $ctx3.sendIdx["class:"]=6;
  4695. _st($9)._with_("Dive");
  4696. $10=_st($9)._onClick_((function(){
  4697. return smalltalk.withContext(function($ctx4) {
  4698. return self._dive();
  4699. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  4700. self["@diveButton"]=$10;
  4701. return self["@diveButton"];
  4702. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4703. $ctx2.sendIdx["with:"]=2;
  4704. $6;
  4705. return _st(_st(html)._div())._class_("amber_clear");
  4706. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4707. $ctx1.sendIdx["with:"]=1;
  4708. self._updateVariablesList();
  4709. $11=self._updateValueTextarea();
  4710. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},globals.IDEInspector)})},
  4711. args: ["html"],
  4712. 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.",
  4713. messageSends: ["class:", "div", "with:", "ul", "textarea", "at:put:", "yourself", "button", "onClick:", "refresh", "dive", "updateVariablesList", "updateValueTextarea"],
  4714. referencedClasses: []
  4715. }),
  4716. globals.IDEInspector);
  4717. smalltalk.addMethod(
  4718. smalltalk.method({
  4719. selector: "selectVariable:",
  4720. protocol: 'updating',
  4721. fn: function (aString){
  4722. var self=this;
  4723. return smalltalk.withContext(function($ctx1) {
  4724. var $1;
  4725. self._selectedVariable_(aString);
  4726. self._updateVariablesList();
  4727. self._updateValueTextarea();
  4728. $1=self._updateButtons();
  4729. return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:",{aString:aString},globals.IDEInspector)})},
  4730. args: ["aString"],
  4731. source: "selectVariable: aString\x0a\x09self selectedVariable: aString.\x0a\x09self\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea;\x0a\x09\x09updateButtons",
  4732. messageSends: ["selectedVariable:", "updateVariablesList", "updateValueTextarea", "updateButtons"],
  4733. referencedClasses: []
  4734. }),
  4735. globals.IDEInspector);
  4736. smalltalk.addMethod(
  4737. smalltalk.method({
  4738. selector: "selectedVariable",
  4739. protocol: 'accessing',
  4740. fn: function (){
  4741. var self=this;
  4742. var $1;
  4743. $1=self["@selectedVariable"];
  4744. return $1;
  4745. },
  4746. args: [],
  4747. source: "selectedVariable\x0a\x09^ selectedVariable",
  4748. messageSends: [],
  4749. referencedClasses: []
  4750. }),
  4751. globals.IDEInspector);
  4752. smalltalk.addMethod(
  4753. smalltalk.method({
  4754. selector: "selectedVariable:",
  4755. protocol: 'accessing',
  4756. fn: function (aString){
  4757. var self=this;
  4758. self["@selectedVariable"]=aString;
  4759. return self},
  4760. args: ["aString"],
  4761. source: "selectedVariable: aString\x0a\x09selectedVariable := aString",
  4762. messageSends: [],
  4763. referencedClasses: []
  4764. }),
  4765. globals.IDEInspector);
  4766. smalltalk.addMethod(
  4767. smalltalk.method({
  4768. selector: "setLabel:",
  4769. protocol: 'accessing',
  4770. fn: function (aString){
  4771. var self=this;
  4772. self["@label"]=aString;
  4773. return self},
  4774. args: ["aString"],
  4775. source: "setLabel: aString\x0a\x09label := aString",
  4776. messageSends: [],
  4777. referencedClasses: []
  4778. }),
  4779. globals.IDEInspector);
  4780. smalltalk.addMethod(
  4781. smalltalk.method({
  4782. selector: "setVariables:",
  4783. protocol: 'accessing',
  4784. fn: function (aCollection){
  4785. var self=this;
  4786. self["@variables"]=aCollection;
  4787. return self},
  4788. args: ["aCollection"],
  4789. source: "setVariables: aCollection\x0a\x09variables := aCollection",
  4790. messageSends: [],
  4791. referencedClasses: []
  4792. }),
  4793. globals.IDEInspector);
  4794. smalltalk.addMethod(
  4795. smalltalk.method({
  4796. selector: "sourceArea",
  4797. protocol: 'accessing',
  4798. fn: function (){
  4799. var self=this;
  4800. var $1;
  4801. $1=self["@sourceArea"];
  4802. return $1;
  4803. },
  4804. args: [],
  4805. source: "sourceArea\x0a\x09^ sourceArea",
  4806. messageSends: [],
  4807. referencedClasses: []
  4808. }),
  4809. globals.IDEInspector);
  4810. smalltalk.addMethod(
  4811. smalltalk.method({
  4812. selector: "updateButtons",
  4813. protocol: 'updating',
  4814. fn: function (){
  4815. var self=this;
  4816. return smalltalk.withContext(function($ctx1) {
  4817. var $3,$2,$1;
  4818. $3=self._selectedVariable();
  4819. $ctx1.sendIdx["selectedVariable"]=1;
  4820. $2=_st($3)._notNil();
  4821. $ctx1.sendIdx["notNil"]=1;
  4822. $1=_st($2)._and_((function(){
  4823. return smalltalk.withContext(function($ctx2) {
  4824. return _st(_st(self._variables())._at_(self._selectedVariable()))._notNil();
  4825. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4826. if(smalltalk.assert($1)){
  4827. _st(self["@diveButton"])._removeAt_("disabled");
  4828. } else {
  4829. _st(self["@diveButton"])._at_put_("disabled",true);
  4830. };
  4831. return self}, function($ctx1) {$ctx1.fill(self,"updateButtons",{},globals.IDEInspector)})},
  4832. args: [],
  4833. 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' ]",
  4834. messageSends: ["ifFalse:ifTrue:", "and:", "notNil", "selectedVariable", "at:", "variables", "at:put:", "removeAt:"],
  4835. referencedClasses: []
  4836. }),
  4837. globals.IDEInspector);
  4838. smalltalk.addMethod(
  4839. smalltalk.method({
  4840. selector: "updateValueTextarea",
  4841. protocol: 'updating',
  4842. fn: function (){
  4843. var self=this;
  4844. return smalltalk.withContext(function($ctx1) {
  4845. var $1,$4,$3,$2;
  4846. $1=_st(self["@valueTextarea"])._asJQuery();
  4847. $4=self._selectedVariable();
  4848. $ctx1.sendIdx["selectedVariable"]=1;
  4849. $3=_st($4)._isNil();
  4850. if(smalltalk.assert($3)){
  4851. $2="";
  4852. } else {
  4853. $2=_st(_st(self._variables())._at_(self._selectedVariable()))._printString();
  4854. };
  4855. _st($1)._val_($2);
  4856. return self}, function($ctx1) {$ctx1.fill(self,"updateValueTextarea",{},globals.IDEInspector)})},
  4857. args: [],
  4858. source: "updateValueTextarea\x0a\x09valueTextarea asJQuery val: (self selectedVariable isNil\x0a\x09\x09ifTrue: [ '' ]\x0a\x09\x09ifFalse: [ (self variables at: self selectedVariable) printString ])",
  4859. messageSends: ["val:", "asJQuery", "ifTrue:ifFalse:", "isNil", "selectedVariable", "printString", "at:", "variables"],
  4860. referencedClasses: []
  4861. }),
  4862. globals.IDEInspector);
  4863. smalltalk.addMethod(
  4864. smalltalk.method({
  4865. selector: "updateVariablesList",
  4866. protocol: 'updating',
  4867. fn: function (){
  4868. var self=this;
  4869. return smalltalk.withContext(function($ctx1) {
  4870. var $1,$2,$3;
  4871. _st(self["@variablesList"])._contents_((function(html){
  4872. return smalltalk.withContext(function($ctx2) {
  4873. return _st(self._variables())._keysDo_((function(each){
  4874. var li;
  4875. return smalltalk.withContext(function($ctx3) {
  4876. li=_st(html)._li();
  4877. li;
  4878. $1=li;
  4879. _st($1)._with_(each);
  4880. $2=_st($1)._onClick_((function(){
  4881. return smalltalk.withContext(function($ctx4) {
  4882. return self._selectVariable_(each);
  4883. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  4884. $2;
  4885. $3=_st(self._selectedVariable()).__eq(each);
  4886. if(smalltalk.assert($3)){
  4887. return _st(li)._class_("selected");
  4888. };
  4889. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  4890. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4891. return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},globals.IDEInspector)})},
  4892. args: [],
  4893. 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' ]] ]",
  4894. messageSends: ["contents:", "keysDo:", "variables", "li", "with:", "onClick:", "selectVariable:", "ifTrue:", "=", "selectedVariable", "class:"],
  4895. referencedClasses: []
  4896. }),
  4897. globals.IDEInspector);
  4898. smalltalk.addMethod(
  4899. smalltalk.method({
  4900. selector: "variables",
  4901. protocol: 'accessing',
  4902. fn: function (){
  4903. var self=this;
  4904. var $1;
  4905. $1=self["@variables"];
  4906. return $1;
  4907. },
  4908. args: [],
  4909. source: "variables\x0a\x09^ variables",
  4910. messageSends: [],
  4911. referencedClasses: []
  4912. }),
  4913. globals.IDEInspector);
  4914. smalltalk.addMethod(
  4915. smalltalk.method({
  4916. selector: "inspect:",
  4917. protocol: 'instance creation',
  4918. fn: function (anObject){
  4919. var self=this;
  4920. return smalltalk.withContext(function($ctx1) {
  4921. var $2,$3,$1;
  4922. $2=self._new();
  4923. _st($2)._inspect_(anObject);
  4924. _st($2)._open();
  4925. $3=_st($2)._yourself();
  4926. $1=$3;
  4927. return $1;
  4928. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},globals.IDEInspector.klass)})},
  4929. args: ["anObject"],
  4930. source: "inspect: anObject\x0a\x09^ self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09open;\x0a\x09\x09yourself",
  4931. messageSends: ["inspect:", "new", "open", "yourself"],
  4932. referencedClasses: []
  4933. }),
  4934. globals.IDEInspector.klass);
  4935. smalltalk.addMethod(
  4936. smalltalk.method({
  4937. selector: "on:",
  4938. protocol: 'instance creation',
  4939. fn: function (anObject){
  4940. var self=this;
  4941. return smalltalk.withContext(function($ctx1) {
  4942. var $2,$3,$1;
  4943. $2=self._new();
  4944. _st($2)._inspect_(anObject);
  4945. $3=_st($2)._yourself();
  4946. $1=$3;
  4947. return $1;
  4948. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},globals.IDEInspector.klass)})},
  4949. args: ["anObject"],
  4950. source: "on: anObject\x0a\x09^ self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09yourself",
  4951. messageSends: ["inspect:", "new", "yourself"],
  4952. referencedClasses: []
  4953. }),
  4954. globals.IDEInspector.klass);
  4955. smalltalk.addClass('IDETranscript', globals.TabWidget, ['textarea'], 'IDE');
  4956. smalltalk.addMethod(
  4957. smalltalk.method({
  4958. selector: "clear",
  4959. protocol: 'actions',
  4960. fn: function (){
  4961. var self=this;
  4962. return smalltalk.withContext(function($ctx1) {
  4963. _st(_st(self["@textarea"])._asJQuery())._val_("");
  4964. return self}, function($ctx1) {$ctx1.fill(self,"clear",{},globals.IDETranscript)})},
  4965. args: [],
  4966. source: "clear\x0a\x09textarea asJQuery val: ''",
  4967. messageSends: ["val:", "asJQuery"],
  4968. referencedClasses: []
  4969. }),
  4970. globals.IDETranscript);
  4971. smalltalk.addMethod(
  4972. smalltalk.method({
  4973. selector: "cr",
  4974. protocol: 'actions',
  4975. fn: function (){
  4976. var self=this;
  4977. function $String(){return globals.String||(typeof String=="undefined"?nil:String)}
  4978. return smalltalk.withContext(function($ctx1) {
  4979. var $1;
  4980. $1=_st(self["@textarea"])._asJQuery();
  4981. $ctx1.sendIdx["asJQuery"]=1;
  4982. _st($1)._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st($String())._cr()));
  4983. return self}, function($ctx1) {$ctx1.fill(self,"cr",{},globals.IDETranscript)})},
  4984. args: [],
  4985. source: "cr\x0a\x09textarea asJQuery val: textarea asJQuery val, String cr.",
  4986. messageSends: ["val:", "asJQuery", ",", "val", "cr"],
  4987. referencedClasses: ["String"]
  4988. }),
  4989. globals.IDETranscript);
  4990. smalltalk.addMethod(
  4991. smalltalk.method({
  4992. selector: "label",
  4993. protocol: 'accessing',
  4994. fn: function (){
  4995. var self=this;
  4996. return "Transcript";
  4997. },
  4998. args: [],
  4999. source: "label\x0a\x09^ 'Transcript'",
  5000. messageSends: [],
  5001. referencedClasses: []
  5002. }),
  5003. globals.IDETranscript);
  5004. smalltalk.addMethod(
  5005. smalltalk.method({
  5006. selector: "open",
  5007. protocol: 'actions',
  5008. fn: function (){
  5009. var self=this;
  5010. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  5011. return smalltalk.withContext(function($ctx1) {
  5012. var $1,$2;
  5013. $1=_st($TabManager())._current();
  5014. _st($1)._open();
  5015. $2=_st($1)._selectTab_(self);
  5016. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.IDETranscript)})},
  5017. args: [],
  5018. source: "open\x0a\x09TabManager current\x0a\x09open;\x0a\x09selectTab: self",
  5019. messageSends: ["open", "current", "selectTab:"],
  5020. referencedClasses: ["TabManager"]
  5021. }),
  5022. globals.IDETranscript);
  5023. smalltalk.addMethod(
  5024. smalltalk.method({
  5025. selector: "renderBoxOn:",
  5026. protocol: 'rendering',
  5027. fn: function (html){
  5028. var self=this;
  5029. return smalltalk.withContext(function($ctx1) {
  5030. var $1,$2;
  5031. self["@textarea"]=_st(html)._textarea();
  5032. $1=self["@textarea"];
  5033. _st($1)._class_("amber_transcript");
  5034. $2=_st($1)._at_put_("spellcheck","false");
  5035. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.IDETranscript)})},
  5036. args: ["html"],
  5037. source: "renderBoxOn: html\x0a\x09textarea := html textarea.\x0a\x09textarea\x0a\x09class: 'amber_transcript';\x0a\x09at: 'spellcheck' put: 'false'",
  5038. messageSends: ["textarea", "class:", "at:put:"],
  5039. referencedClasses: []
  5040. }),
  5041. globals.IDETranscript);
  5042. smalltalk.addMethod(
  5043. smalltalk.method({
  5044. selector: "renderButtonsOn:",
  5045. protocol: 'rendering',
  5046. fn: function (html){
  5047. var self=this;
  5048. return smalltalk.withContext(function($ctx1) {
  5049. var $1,$2;
  5050. $1=_st(html)._button();
  5051. _st($1)._with_("Clear transcript");
  5052. $2=_st($1)._onClick_((function(){
  5053. return smalltalk.withContext(function($ctx2) {
  5054. return self._clear();
  5055. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  5056. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.IDETranscript)})},
  5057. args: ["html"],
  5058. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Clear transcript';\x0a\x09onClick: [ self clear ]",
  5059. messageSends: ["with:", "button", "onClick:", "clear"],
  5060. referencedClasses: []
  5061. }),
  5062. globals.IDETranscript);
  5063. smalltalk.addMethod(
  5064. smalltalk.method({
  5065. selector: "show:",
  5066. protocol: 'actions',
  5067. fn: function (anObject){
  5068. var self=this;
  5069. return smalltalk.withContext(function($ctx1) {
  5070. var $1,$2;
  5071. $1=self["@textarea"];
  5072. if(($receiver = $1) == nil || $receiver == null){
  5073. self._open();
  5074. } else {
  5075. $1;
  5076. };
  5077. $2=_st(self["@textarea"])._asJQuery();
  5078. $ctx1.sendIdx["asJQuery"]=1;
  5079. _st($2)._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st(anObject)._asString()));
  5080. return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},globals.IDETranscript)})},
  5081. args: ["anObject"],
  5082. source: "show: anObject\x0a\x09textarea ifNil: [ self open ].\x0a\x09textarea asJQuery val: textarea asJQuery val, anObject asString.",
  5083. messageSends: ["ifNil:", "open", "val:", "asJQuery", ",", "val", "asString"],
  5084. referencedClasses: []
  5085. }),
  5086. globals.IDETranscript);
  5087. globals.IDETranscript.klass.iVarNames = ['current'];
  5088. smalltalk.addMethod(
  5089. smalltalk.method({
  5090. selector: "current",
  5091. protocol: 'instance creation',
  5092. fn: function (){
  5093. var self=this;
  5094. return smalltalk.withContext(function($ctx1) {
  5095. var $2,$1;
  5096. $2=self["@current"];
  5097. if(($receiver = $2) == nil || $receiver == null){
  5098. self["@current"]=globals.IDETranscript.klass.superclass.fn.prototype._new.apply(_st(self), []);
  5099. $1=self["@current"];
  5100. } else {
  5101. $1=$2;
  5102. };
  5103. return $1;
  5104. }, function($ctx1) {$ctx1.fill(self,"current",{},globals.IDETranscript.klass)})},
  5105. args: [],
  5106. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  5107. messageSends: ["ifNil:", "new"],
  5108. referencedClasses: []
  5109. }),
  5110. globals.IDETranscript.klass);
  5111. smalltalk.addMethod(
  5112. smalltalk.method({
  5113. selector: "initialize",
  5114. protocol: 'initialization',
  5115. fn: function (){
  5116. var self=this;
  5117. function $Transcript(){return globals.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
  5118. return smalltalk.withContext(function($ctx1) {
  5119. _st($Transcript())._register_(self._current());
  5120. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.IDETranscript.klass)})},
  5121. args: [],
  5122. source: "initialize\x0a\x09Transcript register: self current",
  5123. messageSends: ["register:", "current"],
  5124. referencedClasses: ["Transcript"]
  5125. }),
  5126. globals.IDETranscript.klass);
  5127. smalltalk.addMethod(
  5128. smalltalk.method({
  5129. selector: "new",
  5130. protocol: 'instance creation',
  5131. fn: function (){
  5132. var self=this;
  5133. return smalltalk.withContext(function($ctx1) {
  5134. self._shouldNotImplement();
  5135. return self}, function($ctx1) {$ctx1.fill(self,"new",{},globals.IDETranscript.klass)})},
  5136. args: [],
  5137. source: "new\x0a\x09self shouldNotImplement",
  5138. messageSends: ["shouldNotImplement"],
  5139. referencedClasses: []
  5140. }),
  5141. globals.IDETranscript.klass);
  5142. smalltalk.addMethod(
  5143. smalltalk.method({
  5144. selector: "open",
  5145. protocol: 'instance creation',
  5146. fn: function (){
  5147. var self=this;
  5148. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  5149. return smalltalk.withContext(function($ctx1) {
  5150. var $1,$2;
  5151. $1=_st($TabManager())._current();
  5152. $ctx1.sendIdx["current"]=1;
  5153. _st($1)._open();
  5154. $2=_st($1)._selectTab_(self._current());
  5155. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.IDETranscript.klass)})},
  5156. args: [],
  5157. source: "open\x0a\x09TabManager current\x0a\x09\x09open;\x0a\x09\x09selectTab: self current",
  5158. messageSends: ["open", "current", "selectTab:"],
  5159. referencedClasses: ["TabManager"]
  5160. }),
  5161. globals.IDETranscript.klass);
  5162. smalltalk.addClass('ProgressBar', globals.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  5163. smalltalk.addMethod(
  5164. smalltalk.method({
  5165. selector: "percent",
  5166. protocol: 'accessing',
  5167. fn: function (){
  5168. var self=this;
  5169. return smalltalk.withContext(function($ctx1) {
  5170. var $2,$1;
  5171. $2=self["@percent"];
  5172. if(($receiver = $2) == nil || $receiver == null){
  5173. $1=(0);
  5174. } else {
  5175. $1=$2;
  5176. };
  5177. return $1;
  5178. }, function($ctx1) {$ctx1.fill(self,"percent",{},globals.ProgressBar)})},
  5179. args: [],
  5180. source: "percent\x0a\x09^ percent ifNil: [ 0 ]",
  5181. messageSends: ["ifNil:"],
  5182. referencedClasses: []
  5183. }),
  5184. globals.ProgressBar);
  5185. smalltalk.addMethod(
  5186. smalltalk.method({
  5187. selector: "percent:",
  5188. protocol: 'accessing',
  5189. fn: function (aNumber){
  5190. var self=this;
  5191. self["@percent"]=aNumber;
  5192. return self},
  5193. args: ["aNumber"],
  5194. source: "percent: aNumber\x0a\x09percent := aNumber",
  5195. messageSends: [],
  5196. referencedClasses: []
  5197. }),
  5198. globals.ProgressBar);
  5199. smalltalk.addMethod(
  5200. smalltalk.method({
  5201. selector: "renderOn:",
  5202. protocol: 'rendering',
  5203. fn: function (html){
  5204. var self=this;
  5205. return smalltalk.withContext(function($ctx1) {
  5206. var $1,$2;
  5207. $1=_st(html)._div();
  5208. _st($1)._class_("progress_bar");
  5209. $2=_st($1)._yourself();
  5210. self["@div"]=$2;
  5211. self._renderProgressBar();
  5212. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},globals.ProgressBar)})},
  5213. args: ["html"],
  5214. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'progress_bar';\x0a\x09\x09yourself.\x0a\x09self renderProgressBar",
  5215. messageSends: ["class:", "div", "yourself", "renderProgressBar"],
  5216. referencedClasses: []
  5217. }),
  5218. globals.ProgressBar);
  5219. smalltalk.addMethod(
  5220. smalltalk.method({
  5221. selector: "renderProgressBar",
  5222. protocol: 'rendering',
  5223. fn: function (){
  5224. var self=this;
  5225. return smalltalk.withContext(function($ctx1) {
  5226. var $1,$3,$4,$2;
  5227. _st(self["@div"])._contents_((function(html){
  5228. return smalltalk.withContext(function($ctx2) {
  5229. $1=_st(html)._div();
  5230. _st($1)._class_("progress");
  5231. $3=$1;
  5232. $4=_st("width:".__comma(_st(self._percent())._asString())).__comma("%");
  5233. $ctx2.sendIdx[","]=1;
  5234. $2=_st($3)._style_($4);
  5235. return $2;
  5236. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5237. return self}, function($ctx1) {$ctx1.fill(self,"renderProgressBar",{},globals.ProgressBar)})},
  5238. args: [],
  5239. source: "renderProgressBar\x0a\x09div contents: [ :html |\x0a\x09\x09html div\x0a\x09\x09\x09class: 'progress';\x0a\x09\x09\x09style: 'width:', self percent asString, '%' ]",
  5240. messageSends: ["contents:", "class:", "div", "style:", ",", "asString", "percent"],
  5241. referencedClasses: []
  5242. }),
  5243. globals.ProgressBar);
  5244. smalltalk.addMethod(
  5245. smalltalk.method({
  5246. selector: "updatePercent:",
  5247. protocol: 'updating',
  5248. fn: function (aNumber){
  5249. var self=this;
  5250. return smalltalk.withContext(function($ctx1) {
  5251. self._percent_(aNumber);
  5252. self._renderProgressBar();
  5253. return self}, function($ctx1) {$ctx1.fill(self,"updatePercent:",{aNumber:aNumber},globals.ProgressBar)})},
  5254. args: ["aNumber"],
  5255. source: "updatePercent: aNumber\x0a\x09self percent: aNumber.\x0a\x09self renderProgressBar",
  5256. messageSends: ["percent:", "renderProgressBar"],
  5257. referencedClasses: []
  5258. }),
  5259. globals.ProgressBar);
  5260. smalltalk.addClass('ReferencesBrowser', globals.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  5261. smalltalk.addMethod(
  5262. smalltalk.method({
  5263. selector: "canBeClosed",
  5264. protocol: 'testing',
  5265. fn: function (){
  5266. var self=this;
  5267. return true;
  5268. },
  5269. args: [],
  5270. source: "canBeClosed\x0a\x09^ true",
  5271. messageSends: [],
  5272. referencedClasses: []
  5273. }),
  5274. globals.ReferencesBrowser);
  5275. smalltalk.addMethod(
  5276. smalltalk.method({
  5277. selector: "classesAndMetaclasses",
  5278. protocol: 'accessing',
  5279. fn: function (){
  5280. var self=this;
  5281. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  5282. return smalltalk.withContext(function($ctx1) {
  5283. var $2,$1;
  5284. $2=_st($Smalltalk())._classes();
  5285. $ctx1.sendIdx["classes"]=1;
  5286. $1=_st($2).__comma(_st(_st($Smalltalk())._classes())._collect_((function(each){
  5287. return smalltalk.withContext(function($ctx2) {
  5288. return _st(each)._class();
  5289. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})));
  5290. return $1;
  5291. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},globals.ReferencesBrowser)})},
  5292. args: [],
  5293. source: "classesAndMetaclasses\x0a\x09^ Smalltalk classes, (Smalltalk classes collect: [ :each | each class ])",
  5294. messageSends: [",", "classes", "collect:", "class"],
  5295. referencedClasses: ["Smalltalk"]
  5296. }),
  5297. globals.ReferencesBrowser);
  5298. smalltalk.addMethod(
  5299. smalltalk.method({
  5300. selector: "implementors",
  5301. protocol: 'accessing',
  5302. fn: function (){
  5303. var self=this;
  5304. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  5305. return smalltalk.withContext(function($ctx1) {
  5306. var $2,$1;
  5307. $2=self["@implementors"];
  5308. if(($receiver = $2) == nil || $receiver == null){
  5309. self["@implementors"]=_st($Array())._new();
  5310. $1=self["@implementors"];
  5311. } else {
  5312. $1=$2;
  5313. };
  5314. return $1;
  5315. }, function($ctx1) {$ctx1.fill(self,"implementors",{},globals.ReferencesBrowser)})},
  5316. args: [],
  5317. source: "implementors\x0a\x09^ implementors ifNil: [ implementors := Array new ]",
  5318. messageSends: ["ifNil:", "new"],
  5319. referencedClasses: ["Array"]
  5320. }),
  5321. globals.ReferencesBrowser);
  5322. smalltalk.addMethod(
  5323. smalltalk.method({
  5324. selector: "initialize",
  5325. protocol: 'initialization',
  5326. fn: function (){
  5327. var self=this;
  5328. return smalltalk.withContext(function($ctx1) {
  5329. globals.ReferencesBrowser.superclass.fn.prototype._initialize.apply(_st(self), []);
  5330. self["@selector"]="";
  5331. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.ReferencesBrowser)})},
  5332. args: [],
  5333. source: "initialize\x0a\x09super initialize.\x0a\x09selector := ''",
  5334. messageSends: ["initialize"],
  5335. referencedClasses: []
  5336. }),
  5337. globals.ReferencesBrowser);
  5338. smalltalk.addMethod(
  5339. smalltalk.method({
  5340. selector: "label",
  5341. protocol: 'accessing',
  5342. fn: function (){
  5343. var self=this;
  5344. return "[ References ]";
  5345. },
  5346. args: [],
  5347. source: "label\x0a\x09^ '[ References ]'",
  5348. messageSends: [],
  5349. referencedClasses: []
  5350. }),
  5351. globals.ReferencesBrowser);
  5352. smalltalk.addMethod(
  5353. smalltalk.method({
  5354. selector: "matches",
  5355. protocol: 'accessing',
  5356. fn: function (){
  5357. var self=this;
  5358. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  5359. return smalltalk.withContext(function($ctx1) {
  5360. var $2,$1;
  5361. $2=self["@matches"];
  5362. if(($receiver = $2) == nil || $receiver == null){
  5363. self["@matches"]=_st($Array())._new();
  5364. $1=self["@matches"];
  5365. } else {
  5366. $1=$2;
  5367. };
  5368. return $1;
  5369. }, function($ctx1) {$ctx1.fill(self,"matches",{},globals.ReferencesBrowser)})},
  5370. args: [],
  5371. source: "matches\x0a\x09^ matches ifNil: [ matches := Array new ]",
  5372. messageSends: ["ifNil:", "new"],
  5373. referencedClasses: ["Array"]
  5374. }),
  5375. globals.ReferencesBrowser);
  5376. smalltalk.addMethod(
  5377. smalltalk.method({
  5378. selector: "openBrowserOn:",
  5379. protocol: 'actions',
  5380. fn: function (aMethod){
  5381. var self=this;
  5382. var browser;
  5383. function $Browser(){return globals.Browser||(typeof Browser=="undefined"?nil:Browser)}
  5384. return smalltalk.withContext(function($ctx1) {
  5385. var $3,$2,$4,$1,$5,$6,$7;
  5386. $3=_st(aMethod)._methodClass();
  5387. $ctx1.sendIdx["methodClass"]=1;
  5388. $2=_st($3)._isMetaclass();
  5389. $ctx1.sendIdx["isMetaclass"]=1;
  5390. if(smalltalk.assert($2)){
  5391. $4=_st(aMethod)._methodClass();
  5392. $ctx1.sendIdx["methodClass"]=2;
  5393. $1=_st($4)._instanceClass();
  5394. } else {
  5395. $1=_st(aMethod)._methodClass();
  5396. $ctx1.sendIdx["methodClass"]=3;
  5397. };
  5398. browser=_st($Browser())._openOn_($1);
  5399. $5=_st(_st(aMethod)._methodClass())._isMetaclass();
  5400. if(smalltalk.assert($5)){
  5401. _st(browser)._selectTab_("class");
  5402. };
  5403. $6=browser;
  5404. _st($6)._selectProtocol_(_st(aMethod)._category());
  5405. $7=_st($6)._selectMethod_(aMethod);
  5406. return self}, function($ctx1) {$ctx1.fill(self,"openBrowserOn:",{aMethod:aMethod,browser:browser},globals.ReferencesBrowser)})},
  5407. args: ["aMethod"],
  5408. 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",
  5409. messageSends: ["openOn:", "ifTrue:ifFalse:", "isMetaclass", "methodClass", "instanceClass", "ifTrue:", "selectTab:", "selectProtocol:", "category", "selectMethod:"],
  5410. referencedClasses: ["Browser"]
  5411. }),
  5412. globals.ReferencesBrowser);
  5413. smalltalk.addMethod(
  5414. smalltalk.method({
  5415. selector: "referencedClasses",
  5416. protocol: 'accessing',
  5417. fn: function (){
  5418. var self=this;
  5419. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  5420. return smalltalk.withContext(function($ctx1) {
  5421. var $2,$1;
  5422. $2=self["@referencedClasses"];
  5423. if(($receiver = $2) == nil || $receiver == null){
  5424. self["@referencedClasses"]=_st($Array())._new();
  5425. $1=self["@referencedClasses"];
  5426. } else {
  5427. $1=$2;
  5428. };
  5429. return $1;
  5430. }, function($ctx1) {$ctx1.fill(self,"referencedClasses",{},globals.ReferencesBrowser)})},
  5431. args: [],
  5432. source: "referencedClasses\x0a\x09^ referencedClasses ifNil: [ referencedClasses := Array new ]",
  5433. messageSends: ["ifNil:", "new"],
  5434. referencedClasses: ["Array"]
  5435. }),
  5436. globals.ReferencesBrowser);
  5437. smalltalk.addMethod(
  5438. smalltalk.method({
  5439. selector: "renderBoxOn:",
  5440. protocol: 'rendering',
  5441. fn: function (html){
  5442. var self=this;
  5443. return smalltalk.withContext(function($ctx1) {
  5444. var $1;
  5445. self._renderInputOn_(html);
  5446. self._renderImplementorsOn_(html);
  5447. self._renderSendersOn_(html);
  5448. self._renderReferencedClassesOn_(html);
  5449. $1=self._renderMatchesOn_(html);
  5450. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.ReferencesBrowser)})},
  5451. args: ["html"],
  5452. 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",
  5453. messageSends: ["renderInputOn:", "renderImplementorsOn:", "renderSendersOn:", "renderReferencedClassesOn:", "renderMatchesOn:"],
  5454. referencedClasses: []
  5455. }),
  5456. globals.ReferencesBrowser);
  5457. smalltalk.addMethod(
  5458. smalltalk.method({
  5459. selector: "renderImplementorsOn:",
  5460. protocol: 'rendering',
  5461. fn: function (html){
  5462. var self=this;
  5463. return smalltalk.withContext(function($ctx1) {
  5464. self["@implementorsList"]=_st(_st(html)._ul())._class_("amber_column implementors");
  5465. self._updateImplementorsList();
  5466. return self}, function($ctx1) {$ctx1.fill(self,"renderImplementorsOn:",{html:html},globals.ReferencesBrowser)})},
  5467. args: ["html"],
  5468. source: "renderImplementorsOn: html\x0a\x09implementorsList := html ul class: 'amber_column implementors'.\x0a\x09self updateImplementorsList",
  5469. messageSends: ["class:", "ul", "updateImplementorsList"],
  5470. referencedClasses: []
  5471. }),
  5472. globals.ReferencesBrowser);
  5473. smalltalk.addMethod(
  5474. smalltalk.method({
  5475. selector: "renderInputOn:",
  5476. protocol: 'rendering',
  5477. fn: function (html){
  5478. var self=this;
  5479. return smalltalk.withContext(function($ctx1) {
  5480. var $1,$2;
  5481. $1=_st(html)._input();
  5482. _st($1)._class_("implementors");
  5483. $2=_st($1)._yourself();
  5484. self["@input"]=$2;
  5485. _st(_st(self["@input"])._asJQuery())._val_(self["@selector"]);
  5486. self._setInputEvents();
  5487. return self}, function($ctx1) {$ctx1.fill(self,"renderInputOn:",{html:html},globals.ReferencesBrowser)})},
  5488. args: ["html"],
  5489. source: "renderInputOn: html\x0a\x09input := html input\x0a\x09\x09class: 'implementors';\x0a\x09\x09yourself.\x0a\x09input asJQuery val: selector.\x0a\x09self setInputEvents",
  5490. messageSends: ["class:", "input", "yourself", "val:", "asJQuery", "setInputEvents"],
  5491. referencedClasses: []
  5492. }),
  5493. globals.ReferencesBrowser);
  5494. smalltalk.addMethod(
  5495. smalltalk.method({
  5496. selector: "renderMatchesOn:",
  5497. protocol: 'rendering',
  5498. fn: function (html){
  5499. var self=this;
  5500. return smalltalk.withContext(function($ctx1) {
  5501. self["@matchesList"]=_st(_st(html)._ul())._class_("amber_column matches");
  5502. self._updateMatchesList();
  5503. return self}, function($ctx1) {$ctx1.fill(self,"renderMatchesOn:",{html:html},globals.ReferencesBrowser)})},
  5504. args: ["html"],
  5505. source: "renderMatchesOn: html\x0a\x09matchesList := html ul class: 'amber_column matches'.\x0a\x09self updateMatchesList",
  5506. messageSends: ["class:", "ul", "updateMatchesList"],
  5507. referencedClasses: []
  5508. }),
  5509. globals.ReferencesBrowser);
  5510. smalltalk.addMethod(
  5511. smalltalk.method({
  5512. selector: "renderReferencedClassesOn:",
  5513. protocol: 'rendering',
  5514. fn: function (html){
  5515. var self=this;
  5516. return smalltalk.withContext(function($ctx1) {
  5517. self["@referencedClassesList"]=_st(_st(html)._ul())._class_("amber_column referenced_classes");
  5518. self._updateReferencedClassesList();
  5519. return self}, function($ctx1) {$ctx1.fill(self,"renderReferencedClassesOn:",{html:html},globals.ReferencesBrowser)})},
  5520. args: ["html"],
  5521. source: "renderReferencedClassesOn: html\x0a\x09referencedClassesList := html ul class: 'amber_column referenced_classes'.\x0a\x09self updateReferencedClassesList",
  5522. messageSends: ["class:", "ul", "updateReferencedClassesList"],
  5523. referencedClasses: []
  5524. }),
  5525. globals.ReferencesBrowser);
  5526. smalltalk.addMethod(
  5527. smalltalk.method({
  5528. selector: "renderSendersOn:",
  5529. protocol: 'rendering',
  5530. fn: function (html){
  5531. var self=this;
  5532. return smalltalk.withContext(function($ctx1) {
  5533. self["@sendersList"]=_st(_st(html)._ul())._class_("amber_column senders");
  5534. self._updateSendersList();
  5535. return self}, function($ctx1) {$ctx1.fill(self,"renderSendersOn:",{html:html},globals.ReferencesBrowser)})},
  5536. args: ["html"],
  5537. source: "renderSendersOn: html\x0a\x09sendersList := html ul class: 'amber_column senders'.\x0a\x09self updateSendersList",
  5538. messageSends: ["class:", "ul", "updateSendersList"],
  5539. referencedClasses: []
  5540. }),
  5541. globals.ReferencesBrowser);
  5542. smalltalk.addMethod(
  5543. smalltalk.method({
  5544. selector: "search:",
  5545. protocol: 'actions',
  5546. fn: function (aString){
  5547. var self=this;
  5548. return smalltalk.withContext(function($ctx1) {
  5549. var $1;
  5550. self._searchReferencesFor_(aString);
  5551. self._updateImplementorsList();
  5552. self._updateSendersList();
  5553. self._updateReferencedClassesList();
  5554. $1=self._updateMatchesList();
  5555. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},globals.ReferencesBrowser)})},
  5556. args: ["aString"],
  5557. source: "search: aString\x0a\x09self\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09updateImplementorsList;\x0a\x09\x09updateSendersList;\x0a\x09\x09updateReferencedClassesList;\x0a\x09\x09updateMatchesList",
  5558. messageSends: ["searchReferencesFor:", "updateImplementorsList", "updateSendersList", "updateReferencedClassesList", "updateMatchesList"],
  5559. referencedClasses: []
  5560. }),
  5561. globals.ReferencesBrowser);
  5562. smalltalk.addMethod(
  5563. smalltalk.method({
  5564. selector: "searchMethodSource",
  5565. protocol: 'actions',
  5566. fn: function (){
  5567. var self=this;
  5568. var regex;
  5569. return smalltalk.withContext(function($ctx1) {
  5570. var $1;
  5571. regex=_st(self["@selector"])._allButFirst();
  5572. _st(self._classesAndMetaclasses())._do_((function(each){
  5573. return smalltalk.withContext(function($ctx2) {
  5574. return _st(_st(each)._methodDictionary())._valuesDo_((function(value){
  5575. return smalltalk.withContext(function($ctx3) {
  5576. $1=_st(_st(value)._source())._match_(regex);
  5577. if(smalltalk.assert($1)){
  5578. return _st(self._matches())._add_(value);
  5579. };
  5580. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx2,2)})}));
  5581. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5582. return self}, function($ctx1) {$ctx1.fill(self,"searchMethodSource",{regex:regex},globals.ReferencesBrowser)})},
  5583. args: [],
  5584. 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 ]] ]",
  5585. messageSends: ["allButFirst", "do:", "classesAndMetaclasses", "valuesDo:", "methodDictionary", "ifTrue:", "match:", "source", "add:", "matches"],
  5586. referencedClasses: []
  5587. }),
  5588. globals.ReferencesBrowser);
  5589. smalltalk.addMethod(
  5590. smalltalk.method({
  5591. selector: "searchReferencedClasses",
  5592. protocol: 'actions',
  5593. fn: function (){
  5594. var self=this;
  5595. return smalltalk.withContext(function($ctx1) {
  5596. var $2,$1;
  5597. _st(self._classesAndMetaclasses())._do_((function(each){
  5598. return smalltalk.withContext(function($ctx2) {
  5599. return _st(_st(each)._methodDictionary())._valuesDo_((function(value){
  5600. return smalltalk.withContext(function($ctx3) {
  5601. $2=_st(value)._referencedClasses();
  5602. $ctx3.sendIdx["referencedClasses"]=1;
  5603. $1=_st($2)._includes_(self["@selector"]);
  5604. if(smalltalk.assert($1)){
  5605. return _st(self._referencedClasses())._add_(value);
  5606. };
  5607. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx2,2)})}));
  5608. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5609. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencedClasses",{},globals.ReferencesBrowser)})},
  5610. args: [],
  5611. 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 ]] ]",
  5612. messageSends: ["do:", "classesAndMetaclasses", "valuesDo:", "methodDictionary", "ifTrue:", "includes:", "referencedClasses", "add:"],
  5613. referencedClasses: []
  5614. }),
  5615. globals.ReferencesBrowser);
  5616. smalltalk.addMethod(
  5617. smalltalk.method({
  5618. selector: "searchReferencesFor:",
  5619. protocol: 'actions',
  5620. fn: function (aString){
  5621. var self=this;
  5622. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  5623. return smalltalk.withContext(function($ctx1) {
  5624. var $1;
  5625. self["@selector"]=aString;
  5626. self["@implementors"]=_st($Array())._new();
  5627. $ctx1.sendIdx["new"]=1;
  5628. self["@senders"]=_st($Array())._new();
  5629. $ctx1.sendIdx["new"]=2;
  5630. self["@referencedClasses"]=_st($Array())._new();
  5631. $ctx1.sendIdx["new"]=3;
  5632. self["@matches"]=_st($Array())._new();
  5633. self._searchMethodSource();
  5634. $1=_st(self["@selector"])._match_("^[A-Z]");
  5635. if(smalltalk.assert($1)){
  5636. self._searchReferencedClasses();
  5637. } else {
  5638. self._searchSelectorReferences();
  5639. };
  5640. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesFor:",{aString:aString},globals.ReferencesBrowser)})},
  5641. args: ["aString"],
  5642. 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 ]",
  5643. messageSends: ["new", "searchMethodSource", "ifFalse:ifTrue:", "match:", "searchSelectorReferences", "searchReferencedClasses"],
  5644. referencedClasses: ["Array"]
  5645. }),
  5646. globals.ReferencesBrowser);
  5647. smalltalk.addMethod(
  5648. smalltalk.method({
  5649. selector: "searchSelectorReferences",
  5650. protocol: 'actions',
  5651. fn: function (){
  5652. var self=this;
  5653. return smalltalk.withContext(function($ctx1) {
  5654. var $1,$2;
  5655. _st(self._classesAndMetaclasses())._do_((function(each){
  5656. return smalltalk.withContext(function($ctx2) {
  5657. return _st(_st(each)._methodDictionary())._keysAndValuesDo_((function(key,value){
  5658. return smalltalk.withContext(function($ctx3) {
  5659. $1=_st(key).__eq(self["@selector"]);
  5660. if(smalltalk.assert($1)){
  5661. _st(self._implementors())._add_(value);
  5662. $ctx3.sendIdx["add:"]=1;
  5663. };
  5664. $2=_st(_st(value)._messageSends())._includes_(self["@selector"]);
  5665. if(smalltalk.assert($2)){
  5666. return _st(self._senders())._add_(value);
  5667. };
  5668. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx2,2)})}));
  5669. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5670. return self}, function($ctx1) {$ctx1.fill(self,"searchSelectorReferences",{},globals.ReferencesBrowser)})},
  5671. args: [],
  5672. 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 ]] ]",
  5673. messageSends: ["do:", "classesAndMetaclasses", "keysAndValuesDo:", "methodDictionary", "ifTrue:", "=", "add:", "implementors", "includes:", "messageSends", "senders"],
  5674. referencedClasses: []
  5675. }),
  5676. globals.ReferencesBrowser);
  5677. smalltalk.addMethod(
  5678. smalltalk.method({
  5679. selector: "selector",
  5680. protocol: 'accessing',
  5681. fn: function (){
  5682. var self=this;
  5683. var $1;
  5684. $1=self["@selector"];
  5685. return $1;
  5686. },
  5687. args: [],
  5688. source: "selector\x0a\x09^ selector",
  5689. messageSends: [],
  5690. referencedClasses: []
  5691. }),
  5692. globals.ReferencesBrowser);
  5693. smalltalk.addMethod(
  5694. smalltalk.method({
  5695. selector: "senders",
  5696. protocol: 'accessing',
  5697. fn: function (){
  5698. var self=this;
  5699. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  5700. return smalltalk.withContext(function($ctx1) {
  5701. var $2,$1;
  5702. $2=self["@senders"];
  5703. if(($receiver = $2) == nil || $receiver == null){
  5704. self["@senders"]=_st($Array())._new();
  5705. $1=self["@senders"];
  5706. } else {
  5707. $1=$2;
  5708. };
  5709. return $1;
  5710. }, function($ctx1) {$ctx1.fill(self,"senders",{},globals.ReferencesBrowser)})},
  5711. args: [],
  5712. source: "senders\x0a\x09^ senders ifNil: [ senders := Array new ]",
  5713. messageSends: ["ifNil:", "new"],
  5714. referencedClasses: ["Array"]
  5715. }),
  5716. globals.ReferencesBrowser);
  5717. smalltalk.addMethod(
  5718. smalltalk.method({
  5719. selector: "setInputEvents",
  5720. protocol: 'private',
  5721. fn: function (){
  5722. var self=this;
  5723. return smalltalk.withContext(function($ctx1) {
  5724. var $1,$3,$2;
  5725. $1=self["@input"];
  5726. _st($1)._onKeyUp_((function(){
  5727. return smalltalk.withContext(function($ctx2) {
  5728. self["@timer"]=_st((function(){
  5729. return smalltalk.withContext(function($ctx3) {
  5730. return self._search_(_st(_st(self["@input"])._asJQuery())._val());
  5731. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}))._valueWithTimeout_((100));
  5732. return self["@timer"];
  5733. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  5734. $2=_st($1)._onKeyDown_((function(){
  5735. return smalltalk.withContext(function($ctx2) {
  5736. $3=self["@timer"];
  5737. if(($receiver = $3) == nil || $receiver == null){
  5738. return $3;
  5739. } else {
  5740. return _st(self["@timer"])._clearTimeout();
  5741. };
  5742. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  5743. return self}, function($ctx1) {$ctx1.fill(self,"setInputEvents",{},globals.ReferencesBrowser)})},
  5744. args: [],
  5745. source: "setInputEvents\x0a\x09input\x0a\x09\x09onKeyUp: [ timer := [ self search: input asJQuery val ] valueWithTimeout: 100 ];\x0a\x09\x09onKeyDown: [ timer ifNotNil: [ timer clearTimeout ]]",
  5746. messageSends: ["onKeyUp:", "valueWithTimeout:", "search:", "val", "asJQuery", "onKeyDown:", "ifNotNil:", "clearTimeout"],
  5747. referencedClasses: []
  5748. }),
  5749. globals.ReferencesBrowser);
  5750. smalltalk.addMethod(
  5751. smalltalk.method({
  5752. selector: "updateImplementorsList",
  5753. protocol: 'updating',
  5754. fn: function (){
  5755. var self=this;
  5756. return smalltalk.withContext(function($ctx1) {
  5757. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5758. _st(self["@implementorsList"])._contents_((function(html){
  5759. return smalltalk.withContext(function($ctx2) {
  5760. $1=_st(html)._li();
  5761. $ctx2.sendIdx["li"]=1;
  5762. _st($1)._class_("column_label");
  5763. $2=$1;
  5764. $7=self._implementors();
  5765. $ctx2.sendIdx["implementors"]=1;
  5766. $6=_st($7)._size();
  5767. $5=_st($6)._asString();
  5768. $ctx2.sendIdx["asString"]=1;
  5769. $4="Implementors (".__comma($5);
  5770. $ctx2.sendIdx[","]=2;
  5771. $3=_st($4).__comma(")");
  5772. $ctx2.sendIdx[","]=1;
  5773. _st($2)._with_($3);
  5774. $ctx2.sendIdx["with:"]=1;
  5775. $8=_st($1)._style_("font-weight: bold");
  5776. $8;
  5777. return _st(self._implementors())._do_((function(each){
  5778. var li;
  5779. return smalltalk.withContext(function($ctx3) {
  5780. li=_st(html)._li();
  5781. li;
  5782. $9=li;
  5783. $10=$9;
  5784. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(self._selector());
  5785. $ctx3.sendIdx[","]=3;
  5786. _st($10)._with_($11);
  5787. $12=_st($9)._onClick_((function(){
  5788. return smalltalk.withContext(function($ctx4) {
  5789. return self._openBrowserOn_(each);
  5790. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5791. return $12;
  5792. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  5793. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5794. return self}, function($ctx1) {$ctx1.fill(self,"updateImplementorsList",{},globals.ReferencesBrowser)})},
  5795. args: [],
  5796. 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 ]] ]",
  5797. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "implementors", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5798. referencedClasses: []
  5799. }),
  5800. globals.ReferencesBrowser);
  5801. smalltalk.addMethod(
  5802. smalltalk.method({
  5803. selector: "updateMatchesList",
  5804. protocol: 'updating',
  5805. fn: function (){
  5806. var self=this;
  5807. return smalltalk.withContext(function($ctx1) {
  5808. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5809. _st(self["@matchesList"])._contents_((function(html){
  5810. return smalltalk.withContext(function($ctx2) {
  5811. $1=_st(html)._li();
  5812. $ctx2.sendIdx["li"]=1;
  5813. _st($1)._class_("column_label");
  5814. $2=$1;
  5815. $7=self._matches();
  5816. $ctx2.sendIdx["matches"]=1;
  5817. $6=_st($7)._size();
  5818. $5=_st($6)._asString();
  5819. $ctx2.sendIdx["asString"]=1;
  5820. $4="Regex matches (".__comma($5);
  5821. $ctx2.sendIdx[","]=2;
  5822. $3=_st($4).__comma(")");
  5823. $ctx2.sendIdx[","]=1;
  5824. _st($2)._with_($3);
  5825. $ctx2.sendIdx["with:"]=1;
  5826. $8=_st($1)._style_("font-weight: bold");
  5827. $8;
  5828. return _st(self._matches())._do_((function(each){
  5829. var li;
  5830. return smalltalk.withContext(function($ctx3) {
  5831. li=_st(html)._li();
  5832. li;
  5833. $9=li;
  5834. $10=$9;
  5835. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector());
  5836. $ctx3.sendIdx[","]=3;
  5837. _st($10)._with_($11);
  5838. $12=_st($9)._onClick_((function(){
  5839. return smalltalk.withContext(function($ctx4) {
  5840. return self._openBrowserOn_(each);
  5841. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5842. return $12;
  5843. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  5844. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5845. return self}, function($ctx1) {$ctx1.fill(self,"updateMatchesList",{},globals.ReferencesBrowser)})},
  5846. args: [],
  5847. 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 ]] ]",
  5848. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "matches", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5849. referencedClasses: []
  5850. }),
  5851. globals.ReferencesBrowser);
  5852. smalltalk.addMethod(
  5853. smalltalk.method({
  5854. selector: "updateReferencedClassesList",
  5855. protocol: 'updating',
  5856. fn: function (){
  5857. var self=this;
  5858. return smalltalk.withContext(function($ctx1) {
  5859. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5860. _st(self["@referencedClassesList"])._contents_((function(html){
  5861. return smalltalk.withContext(function($ctx2) {
  5862. $1=_st(html)._li();
  5863. $ctx2.sendIdx["li"]=1;
  5864. _st($1)._class_("column_label");
  5865. $2=$1;
  5866. $7=self._referencedClasses();
  5867. $ctx2.sendIdx["referencedClasses"]=1;
  5868. $6=_st($7)._size();
  5869. $5=_st($6)._asString();
  5870. $ctx2.sendIdx["asString"]=1;
  5871. $4="Class references (".__comma($5);
  5872. $ctx2.sendIdx[","]=2;
  5873. $3=_st($4).__comma(")");
  5874. $ctx2.sendIdx[","]=1;
  5875. _st($2)._with_($3);
  5876. $ctx2.sendIdx["with:"]=1;
  5877. $8=_st($1)._style_("font-weight: bold");
  5878. $8;
  5879. return _st(self._referencedClasses())._do_((function(each){
  5880. return smalltalk.withContext(function($ctx3) {
  5881. $9=_st(html)._li();
  5882. $10=$9;
  5883. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector());
  5884. $ctx3.sendIdx[","]=3;
  5885. _st($10)._with_($11);
  5886. $12=_st($9)._onClick_((function(){
  5887. return smalltalk.withContext(function($ctx4) {
  5888. return self._openBrowserOn_(each);
  5889. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5890. return $12;
  5891. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  5892. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5893. return self}, function($ctx1) {$ctx1.fill(self,"updateReferencedClassesList",{},globals.ReferencesBrowser)})},
  5894. args: [],
  5895. 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 ]] ]",
  5896. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "referencedClasses", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5897. referencedClasses: []
  5898. }),
  5899. globals.ReferencesBrowser);
  5900. smalltalk.addMethod(
  5901. smalltalk.method({
  5902. selector: "updateSendersList",
  5903. protocol: 'updating',
  5904. fn: function (){
  5905. var self=this;
  5906. return smalltalk.withContext(function($ctx1) {
  5907. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5908. _st(self["@sendersList"])._contents_((function(html){
  5909. return smalltalk.withContext(function($ctx2) {
  5910. $1=_st(html)._li();
  5911. $ctx2.sendIdx["li"]=1;
  5912. _st($1)._class_("column_label");
  5913. $2=$1;
  5914. $7=self._senders();
  5915. $ctx2.sendIdx["senders"]=1;
  5916. $6=_st($7)._size();
  5917. $5=_st($6)._asString();
  5918. $ctx2.sendIdx["asString"]=1;
  5919. $4="Senders (".__comma($5);
  5920. $ctx2.sendIdx[","]=2;
  5921. $3=_st($4).__comma(")");
  5922. $ctx2.sendIdx[","]=1;
  5923. _st($2)._with_($3);
  5924. $ctx2.sendIdx["with:"]=1;
  5925. $8=_st($1)._style_("font-weight: bold");
  5926. $8;
  5927. return _st(self._senders())._do_((function(each){
  5928. return smalltalk.withContext(function($ctx3) {
  5929. $9=_st(html)._li();
  5930. $10=$9;
  5931. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector());
  5932. $ctx3.sendIdx[","]=3;
  5933. _st($10)._with_($11);
  5934. $12=_st($9)._onClick_((function(){
  5935. return smalltalk.withContext(function($ctx4) {
  5936. return self._openBrowserOn_(each);
  5937. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5938. return $12;
  5939. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  5940. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5941. return self}, function($ctx1) {$ctx1.fill(self,"updateSendersList",{},globals.ReferencesBrowser)})},
  5942. args: [],
  5943. 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 ]] ]",
  5944. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "senders", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5945. referencedClasses: []
  5946. }),
  5947. globals.ReferencesBrowser);
  5948. smalltalk.addMethod(
  5949. smalltalk.method({
  5950. selector: "search:",
  5951. protocol: 'instance creation',
  5952. fn: function (aString){
  5953. var self=this;
  5954. return smalltalk.withContext(function($ctx1) {
  5955. var $2,$3,$1;
  5956. $2=self._new();
  5957. _st($2)._searchReferencesFor_(aString);
  5958. $3=_st($2)._open();
  5959. $1=$3;
  5960. return $1;
  5961. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},globals.ReferencesBrowser.klass)})},
  5962. args: ["aString"],
  5963. source: "search: aString\x0a\x09^ self new\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09open",
  5964. messageSends: ["searchReferencesFor:", "new", "open"],
  5965. referencedClasses: []
  5966. }),
  5967. globals.ReferencesBrowser.klass);
  5968. smalltalk.addClass('TestRunner', globals.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  5969. smalltalk.addMethod(
  5970. smalltalk.method({
  5971. selector: "allClasses",
  5972. protocol: 'accessing',
  5973. fn: function (){
  5974. var self=this;
  5975. function $TestCase(){return globals.TestCase||(typeof TestCase=="undefined"?nil:TestCase)}
  5976. return smalltalk.withContext(function($ctx1) {
  5977. var $1;
  5978. $1=_st(_st($TestCase())._allSubclasses())._select_((function(each){
  5979. return smalltalk.withContext(function($ctx2) {
  5980. return _st(_st(each)._isAbstract())._not();
  5981. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5982. return $1;
  5983. }, function($ctx1) {$ctx1.fill(self,"allClasses",{},globals.TestRunner)})},
  5984. args: [],
  5985. source: "allClasses\x0a\x09^ TestCase allSubclasses select: [ :each | each isAbstract not ]",
  5986. messageSends: ["select:", "allSubclasses", "not", "isAbstract"],
  5987. referencedClasses: ["TestCase"]
  5988. }),
  5989. globals.TestRunner);
  5990. smalltalk.addMethod(
  5991. smalltalk.method({
  5992. selector: "classes",
  5993. protocol: 'accessing',
  5994. fn: function (){
  5995. var self=this;
  5996. return smalltalk.withContext(function($ctx1) {
  5997. var $2,$1;
  5998. $1=_st(_st(self._allClasses())._select_((function(each){
  5999. return smalltalk.withContext(function($ctx2) {
  6000. return _st(self._selectedCategories())._includes_(_st(each)._category());
  6001. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._sort_((function(a,b){
  6002. return smalltalk.withContext(function($ctx2) {
  6003. $2=_st(a)._name();
  6004. $ctx2.sendIdx["name"]=1;
  6005. return _st($2).__gt(_st(b)._name());
  6006. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)})}));
  6007. return $1;
  6008. }, function($ctx1) {$ctx1.fill(self,"classes",{},globals.TestRunner)})},
  6009. args: [],
  6010. source: "classes\x0a\x09^ (self allClasses\x0a\x09select: [ :each | self selectedCategories includes: each category ])\x0a\x09sort: [ :a :b | a name > b name ]",
  6011. messageSends: ["sort:", "select:", "allClasses", "includes:", "selectedCategories", "category", ">", "name"],
  6012. referencedClasses: []
  6013. }),
  6014. globals.TestRunner);
  6015. smalltalk.addMethod(
  6016. smalltalk.method({
  6017. selector: "initialize",
  6018. protocol: 'initialization',
  6019. fn: function (){
  6020. var self=this;
  6021. function $TestResult(){return globals.TestResult||(typeof TestResult=="undefined"?nil:TestResult)}
  6022. return smalltalk.withContext(function($ctx1) {
  6023. globals.TestRunner.superclass.fn.prototype._initialize.apply(_st(self), []);
  6024. self["@result"]=_st($TestResult())._new();
  6025. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.TestRunner)})},
  6026. args: [],
  6027. source: "initialize\x0a\x09super initialize.\x0a\x09result := TestResult new",
  6028. messageSends: ["initialize", "new"],
  6029. referencedClasses: ["TestResult"]
  6030. }),
  6031. globals.TestRunner);
  6032. smalltalk.addMethod(
  6033. smalltalk.method({
  6034. selector: "isSelectedCategory:",
  6035. protocol: 'testing',
  6036. fn: function (aCategory){
  6037. var self=this;
  6038. return smalltalk.withContext(function($ctx1) {
  6039. var $1;
  6040. $1=_st(self._selectedCategories())._includes_(aCategory);
  6041. return $1;
  6042. }, function($ctx1) {$ctx1.fill(self,"isSelectedCategory:",{aCategory:aCategory},globals.TestRunner)})},
  6043. args: ["aCategory"],
  6044. source: "isSelectedCategory: aCategory\x0a\x09^ (self selectedCategories includes: aCategory)",
  6045. messageSends: ["includes:", "selectedCategories"],
  6046. referencedClasses: []
  6047. }),
  6048. globals.TestRunner);
  6049. smalltalk.addMethod(
  6050. smalltalk.method({
  6051. selector: "isSelectedClass:",
  6052. protocol: 'testing',
  6053. fn: function (aClass){
  6054. var self=this;
  6055. return smalltalk.withContext(function($ctx1) {
  6056. var $1;
  6057. $1=_st(self._selectedClasses())._includes_(aClass);
  6058. return $1;
  6059. }, function($ctx1) {$ctx1.fill(self,"isSelectedClass:",{aClass:aClass},globals.TestRunner)})},
  6060. args: ["aClass"],
  6061. source: "isSelectedClass: aClass\x0a\x09^ (self selectedClasses includes: aClass)",
  6062. messageSends: ["includes:", "selectedClasses"],
  6063. referencedClasses: []
  6064. }),
  6065. globals.TestRunner);
  6066. smalltalk.addMethod(
  6067. smalltalk.method({
  6068. selector: "label",
  6069. protocol: 'accessing',
  6070. fn: function (){
  6071. var self=this;
  6072. return "SUnit";
  6073. },
  6074. args: [],
  6075. source: "label\x0a\x09^ 'SUnit'",
  6076. messageSends: [],
  6077. referencedClasses: []
  6078. }),
  6079. globals.TestRunner);
  6080. smalltalk.addMethod(
  6081. smalltalk.method({
  6082. selector: "packages",
  6083. protocol: 'accessing',
  6084. fn: function (){
  6085. var self=this;
  6086. var packages;
  6087. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  6088. return smalltalk.withContext(function($ctx1) {
  6089. var $2,$3,$1,$4;
  6090. packages=_st($Array())._new();
  6091. _st(self._allClasses())._do_((function(each){
  6092. return smalltalk.withContext(function($ctx2) {
  6093. $2=packages;
  6094. $3=_st(each)._category();
  6095. $ctx2.sendIdx["category"]=1;
  6096. $1=_st($2)._includes_($3);
  6097. if(! smalltalk.assert($1)){
  6098. return _st(packages)._add_(_st(each)._category());
  6099. };
  6100. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6101. $4=_st(packages)._sort();
  6102. return $4;
  6103. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},globals.TestRunner)})},
  6104. args: [],
  6105. 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",
  6106. messageSends: ["new", "do:", "allClasses", "ifFalse:", "includes:", "category", "add:", "sort"],
  6107. referencedClasses: ["Array"]
  6108. }),
  6109. globals.TestRunner);
  6110. smalltalk.addMethod(
  6111. smalltalk.method({
  6112. selector: "performFailure:",
  6113. protocol: 'actions',
  6114. fn: function (aTestCase){
  6115. var self=this;
  6116. return smalltalk.withContext(function($ctx1) {
  6117. _st(aTestCase)._runCase();
  6118. return self}, function($ctx1) {$ctx1.fill(self,"performFailure:",{aTestCase:aTestCase},globals.TestRunner)})},
  6119. args: ["aTestCase"],
  6120. source: "performFailure: aTestCase\x0a\x09aTestCase runCase",
  6121. messageSends: ["runCase"],
  6122. referencedClasses: []
  6123. }),
  6124. globals.TestRunner);
  6125. smalltalk.addMethod(
  6126. smalltalk.method({
  6127. selector: "printErrors",
  6128. protocol: 'printing',
  6129. fn: function (){
  6130. var self=this;
  6131. return smalltalk.withContext(function($ctx1) {
  6132. var $1;
  6133. $1=_st(_st(_st(_st(self._result())._errors())._size())._asString()).__comma(" errors, ");
  6134. return $1;
  6135. }, function($ctx1) {$ctx1.fill(self,"printErrors",{},globals.TestRunner)})},
  6136. args: [],
  6137. source: "printErrors\x0a\x09^ self result errors size asString , ' errors, '",
  6138. messageSends: [",", "asString", "size", "errors", "result"],
  6139. referencedClasses: []
  6140. }),
  6141. globals.TestRunner);
  6142. smalltalk.addMethod(
  6143. smalltalk.method({
  6144. selector: "printFailures",
  6145. protocol: 'printing',
  6146. fn: function (){
  6147. var self=this;
  6148. return smalltalk.withContext(function($ctx1) {
  6149. var $1;
  6150. $1=_st(_st(_st(_st(self._result())._failures())._size())._asString()).__comma(" failures");
  6151. return $1;
  6152. }, function($ctx1) {$ctx1.fill(self,"printFailures",{},globals.TestRunner)})},
  6153. args: [],
  6154. source: "printFailures\x0a\x09^ self result failures size asString, ' failures'",
  6155. messageSends: [",", "asString", "size", "failures", "result"],
  6156. referencedClasses: []
  6157. }),
  6158. globals.TestRunner);
  6159. smalltalk.addMethod(
  6160. smalltalk.method({
  6161. selector: "printPasses",
  6162. protocol: 'printing',
  6163. fn: function (){
  6164. var self=this;
  6165. return smalltalk.withContext(function($ctx1) {
  6166. var $6,$5,$9,$8,$7,$4,$3,$2,$1;
  6167. $6=self._result();
  6168. $ctx1.sendIdx["result"]=1;
  6169. $5=_st($6)._runs();
  6170. $9=self._result();
  6171. $ctx1.sendIdx["result"]=2;
  6172. $8=_st($9)._errors();
  6173. $7=_st($8)._size();
  6174. $ctx1.sendIdx["size"]=1;
  6175. $4=_st($5).__minus($7);
  6176. $3=_st($4).__minus(_st(_st(self._result())._failures())._size());
  6177. $ctx1.sendIdx["-"]=1;
  6178. $2=_st($3)._asString();
  6179. $1=_st($2).__comma(" passes, ");
  6180. return $1;
  6181. }, function($ctx1) {$ctx1.fill(self,"printPasses",{},globals.TestRunner)})},
  6182. args: [],
  6183. source: "printPasses\x0a\x09^ (self result runs - self result errors size - self result failures size) asString , ' passes, '",
  6184. messageSends: [",", "asString", "-", "runs", "result", "size", "errors", "failures"],
  6185. referencedClasses: []
  6186. }),
  6187. globals.TestRunner);
  6188. smalltalk.addMethod(
  6189. smalltalk.method({
  6190. selector: "printTotal",
  6191. protocol: 'printing',
  6192. fn: function (){
  6193. var self=this;
  6194. return smalltalk.withContext(function($ctx1) {
  6195. var $1;
  6196. $1=_st(_st(_st(self._result())._total())._asString()).__comma(" runs, ");
  6197. return $1;
  6198. }, function($ctx1) {$ctx1.fill(self,"printTotal",{},globals.TestRunner)})},
  6199. args: [],
  6200. source: "printTotal\x0a\x09^ self result total asString, ' runs, '",
  6201. messageSends: [",", "asString", "total", "result"],
  6202. referencedClasses: []
  6203. }),
  6204. globals.TestRunner);
  6205. smalltalk.addMethod(
  6206. smalltalk.method({
  6207. selector: "progressBar",
  6208. protocol: 'accessing',
  6209. fn: function (){
  6210. var self=this;
  6211. function $ProgressBar(){return globals.ProgressBar||(typeof ProgressBar=="undefined"?nil:ProgressBar)}
  6212. return smalltalk.withContext(function($ctx1) {
  6213. var $2,$1;
  6214. $2=self["@progressBar"];
  6215. if(($receiver = $2) == nil || $receiver == null){
  6216. self["@progressBar"]=_st($ProgressBar())._new();
  6217. $1=self["@progressBar"];
  6218. } else {
  6219. $1=$2;
  6220. };
  6221. return $1;
  6222. }, function($ctx1) {$ctx1.fill(self,"progressBar",{},globals.TestRunner)})},
  6223. args: [],
  6224. source: "progressBar\x0a\x09^ progressBar ifNil: [ progressBar := ProgressBar new ]",
  6225. messageSends: ["ifNil:", "new"],
  6226. referencedClasses: ["ProgressBar"]
  6227. }),
  6228. globals.TestRunner);
  6229. smalltalk.addMethod(
  6230. smalltalk.method({
  6231. selector: "renderBoxOn:",
  6232. protocol: 'rendering',
  6233. fn: function (html){
  6234. var self=this;
  6235. return smalltalk.withContext(function($ctx1) {
  6236. var $1;
  6237. self._renderCategoriesOn_(html);
  6238. self._renderClassesOn_(html);
  6239. $1=self._renderResultsOn_(html);
  6240. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.TestRunner)})},
  6241. args: ["html"],
  6242. source: "renderBoxOn: html\x0a\x09self\x0a\x09renderCategoriesOn: html;\x0a\x09renderClassesOn: html;\x0a\x09renderResultsOn: html",
  6243. messageSends: ["renderCategoriesOn:", "renderClassesOn:", "renderResultsOn:"],
  6244. referencedClasses: []
  6245. }),
  6246. globals.TestRunner);
  6247. smalltalk.addMethod(
  6248. smalltalk.method({
  6249. selector: "renderButtonsOn:",
  6250. protocol: 'rendering',
  6251. fn: function (html){
  6252. var self=this;
  6253. return smalltalk.withContext(function($ctx1) {
  6254. var $1,$2;
  6255. $1=_st(html)._button();
  6256. _st($1)._with_("Run selected");
  6257. $2=_st($1)._onClick_((function(){
  6258. return smalltalk.withContext(function($ctx2) {
  6259. return self._run_(self._testCases());
  6260. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  6261. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.TestRunner)})},
  6262. args: ["html"],
  6263. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Run selected';\x0a\x09onClick: [ self run: self testCases ]",
  6264. messageSends: ["with:", "button", "onClick:", "run:", "testCases"],
  6265. referencedClasses: []
  6266. }),
  6267. globals.TestRunner);
  6268. smalltalk.addMethod(
  6269. smalltalk.method({
  6270. selector: "renderCategoriesOn:",
  6271. protocol: 'rendering',
  6272. fn: function (html){
  6273. var self=this;
  6274. return smalltalk.withContext(function($ctx1) {
  6275. self["@packagesList"]=_st(_st(html)._ul())._class_("amber_column sunit packages");
  6276. self._updateCategoriesList();
  6277. return self}, function($ctx1) {$ctx1.fill(self,"renderCategoriesOn:",{html:html},globals.TestRunner)})},
  6278. args: ["html"],
  6279. source: "renderCategoriesOn: html\x0a\x09packagesList := html ul class: 'amber_column sunit packages'.\x0a\x09self updateCategoriesList",
  6280. messageSends: ["class:", "ul", "updateCategoriesList"],
  6281. referencedClasses: []
  6282. }),
  6283. globals.TestRunner);
  6284. smalltalk.addMethod(
  6285. smalltalk.method({
  6286. selector: "renderClassesOn:",
  6287. protocol: 'rendering',
  6288. fn: function (html){
  6289. var self=this;
  6290. return smalltalk.withContext(function($ctx1) {
  6291. self["@classesList"]=_st(_st(html)._ul())._class_("amber_column sunit classes");
  6292. self._updateClassesList();
  6293. return self}, function($ctx1) {$ctx1.fill(self,"renderClassesOn:",{html:html},globals.TestRunner)})},
  6294. args: ["html"],
  6295. source: "renderClassesOn: html\x0a\x09classesList := html ul class: 'amber_column sunit classes'.\x0a\x09self updateClassesList",
  6296. messageSends: ["class:", "ul", "updateClassesList"],
  6297. referencedClasses: []
  6298. }),
  6299. globals.TestRunner);
  6300. smalltalk.addMethod(
  6301. smalltalk.method({
  6302. selector: "renderErrorsOn:",
  6303. protocol: 'rendering',
  6304. fn: function (html){
  6305. var self=this;
  6306. return smalltalk.withContext(function($ctx1) {
  6307. var $1,$2,$3,$4;
  6308. _st(_st(self._result())._errors())._do_((function(each){
  6309. return smalltalk.withContext(function($ctx2) {
  6310. $1=_st(html)._li();
  6311. _st($1)._class_("errors");
  6312. $2=$1;
  6313. $3=_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector());
  6314. $ctx2.sendIdx[","]=1;
  6315. _st($2)._with_($3);
  6316. $4=_st($1)._onClick_((function(){
  6317. return smalltalk.withContext(function($ctx3) {
  6318. return self._performFailure_(each);
  6319. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6320. return $4;
  6321. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6322. return self}, function($ctx1) {$ctx1.fill(self,"renderErrorsOn:",{html:html},globals.TestRunner)})},
  6323. args: ["html"],
  6324. 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 ]]",
  6325. messageSends: ["do:", "errors", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"],
  6326. referencedClasses: []
  6327. }),
  6328. globals.TestRunner);
  6329. smalltalk.addMethod(
  6330. smalltalk.method({
  6331. selector: "renderFailuresOn:",
  6332. protocol: 'rendering',
  6333. fn: function (html){
  6334. var self=this;
  6335. return smalltalk.withContext(function($ctx1) {
  6336. var $1,$2,$3,$4;
  6337. _st(_st(self._result())._failures())._do_((function(each){
  6338. return smalltalk.withContext(function($ctx2) {
  6339. $1=_st(html)._li();
  6340. _st($1)._class_("failures");
  6341. $2=$1;
  6342. $3=_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector());
  6343. $ctx2.sendIdx[","]=1;
  6344. _st($2)._with_($3);
  6345. $4=_st($1)._onClick_((function(){
  6346. return smalltalk.withContext(function($ctx3) {
  6347. return self._performFailure_(each);
  6348. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6349. return $4;
  6350. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6351. return self}, function($ctx1) {$ctx1.fill(self,"renderFailuresOn:",{html:html},globals.TestRunner)})},
  6352. args: ["html"],
  6353. 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 ]]",
  6354. messageSends: ["do:", "failures", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"],
  6355. referencedClasses: []
  6356. }),
  6357. globals.TestRunner);
  6358. smalltalk.addMethod(
  6359. smalltalk.method({
  6360. selector: "renderResultsOn:",
  6361. protocol: 'rendering',
  6362. fn: function (html){
  6363. var self=this;
  6364. return smalltalk.withContext(function($ctx1) {
  6365. self["@statusDiv"]=_st(html)._div();
  6366. _st(html)._with_(self._progressBar());
  6367. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column sunit results");
  6368. self._updateMethodsList();
  6369. self._updateStatusDiv();
  6370. return self}, function($ctx1) {$ctx1.fill(self,"renderResultsOn:",{html:html},globals.TestRunner)})},
  6371. args: ["html"],
  6372. 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",
  6373. messageSends: ["div", "with:", "progressBar", "class:", "ul", "updateMethodsList", "updateStatusDiv"],
  6374. referencedClasses: []
  6375. }),
  6376. globals.TestRunner);
  6377. smalltalk.addMethod(
  6378. smalltalk.method({
  6379. selector: "result",
  6380. protocol: 'accessing',
  6381. fn: function (){
  6382. var self=this;
  6383. var $1;
  6384. $1=self["@result"];
  6385. return $1;
  6386. },
  6387. args: [],
  6388. source: "result\x0a\x09^ result",
  6389. messageSends: [],
  6390. referencedClasses: []
  6391. }),
  6392. globals.TestRunner);
  6393. smalltalk.addMethod(
  6394. smalltalk.method({
  6395. selector: "run:",
  6396. protocol: 'actions',
  6397. fn: function (aCollection){
  6398. var self=this;
  6399. var worker;
  6400. function $TestSuiteRunner(){return globals.TestSuiteRunner||(typeof TestSuiteRunner=="undefined"?nil:TestSuiteRunner)}
  6401. function $ResultAnnouncement(){return globals.ResultAnnouncement||(typeof ResultAnnouncement=="undefined"?nil:ResultAnnouncement)}
  6402. return smalltalk.withContext(function($ctx1) {
  6403. var $1;
  6404. worker=_st($TestSuiteRunner())._on_(aCollection);
  6405. self["@result"]=_st(worker)._result();
  6406. $ctx1.sendIdx["result"]=1;
  6407. _st(_st(worker)._announcer())._on_do_($ResultAnnouncement(),(function(ann){
  6408. return smalltalk.withContext(function($ctx2) {
  6409. $1=_st(_st(ann)._result()).__eq_eq(self["@result"]);
  6410. if(smalltalk.assert($1)){
  6411. _st(self._progressBar())._updatePercent_(_st(_st(_st(self["@result"])._runs()).__slash(_st(self["@result"])._total())).__star((100)));
  6412. self._updateStatusDiv();
  6413. return self._updateMethodsList();
  6414. };
  6415. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,1)})}));
  6416. _st(worker)._run();
  6417. return self}, function($ctx1) {$ctx1.fill(self,"run:",{aCollection:aCollection,worker:worker},globals.TestRunner)})},
  6418. args: ["aCollection"],
  6419. 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",
  6420. messageSends: ["on:", "result", "on:do:", "announcer", "ifTrue:", "==", "updatePercent:", "progressBar", "*", "/", "runs", "total", "updateStatusDiv", "updateMethodsList", "run"],
  6421. referencedClasses: ["TestSuiteRunner", "ResultAnnouncement"]
  6422. }),
  6423. globals.TestRunner);
  6424. smalltalk.addMethod(
  6425. smalltalk.method({
  6426. selector: "selectAllCategories",
  6427. protocol: 'actions',
  6428. fn: function (){
  6429. var self=this;
  6430. return smalltalk.withContext(function($ctx1) {
  6431. var $1,$2;
  6432. _st(self._packages())._do_((function(each){
  6433. return smalltalk.withContext(function($ctx2) {
  6434. $1=_st(self["@selectedCategories"])._includes_(each);
  6435. if(! smalltalk.assert($1)){
  6436. return _st(self._selectedCategories())._add_(each);
  6437. };
  6438. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6439. self._updateCategoriesList();
  6440. $2=self._updateClassesList();
  6441. return self}, function($ctx1) {$ctx1.fill(self,"selectAllCategories",{},globals.TestRunner)})},
  6442. args: [],
  6443. 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",
  6444. messageSends: ["do:", "packages", "ifFalse:", "includes:", "add:", "selectedCategories", "updateCategoriesList", "updateClassesList"],
  6445. referencedClasses: []
  6446. }),
  6447. globals.TestRunner);
  6448. smalltalk.addMethod(
  6449. smalltalk.method({
  6450. selector: "selectAllClasses",
  6451. protocol: 'actions',
  6452. fn: function (){
  6453. var self=this;
  6454. return smalltalk.withContext(function($ctx1) {
  6455. var $1,$2;
  6456. _st(self._classes())._do_((function(each){
  6457. return smalltalk.withContext(function($ctx2) {
  6458. $1=_st(self["@selectedClasses"])._includes_(each);
  6459. if(! smalltalk.assert($1)){
  6460. return _st(self._selectedClasses())._add_(each);
  6461. };
  6462. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6463. self._updateCategoriesList();
  6464. $2=self._updateClassesList();
  6465. return self}, function($ctx1) {$ctx1.fill(self,"selectAllClasses",{},globals.TestRunner)})},
  6466. args: [],
  6467. 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",
  6468. messageSends: ["do:", "classes", "ifFalse:", "includes:", "add:", "selectedClasses", "updateCategoriesList", "updateClassesList"],
  6469. referencedClasses: []
  6470. }),
  6471. globals.TestRunner);
  6472. smalltalk.addMethod(
  6473. smalltalk.method({
  6474. selector: "selectedCategories",
  6475. protocol: 'accessing',
  6476. fn: function (){
  6477. var self=this;
  6478. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  6479. return smalltalk.withContext(function($ctx1) {
  6480. var $2,$1;
  6481. $2=self["@selectedCategories"];
  6482. if(($receiver = $2) == nil || $receiver == null){
  6483. self["@selectedCategories"]=_st($Array())._new();
  6484. $1=self["@selectedCategories"];
  6485. } else {
  6486. $1=$2;
  6487. };
  6488. return $1;
  6489. }, function($ctx1) {$ctx1.fill(self,"selectedCategories",{},globals.TestRunner)})},
  6490. args: [],
  6491. source: "selectedCategories\x0a\x09^ selectedCategories ifNil: [ selectedCategories := Array new ]",
  6492. messageSends: ["ifNil:", "new"],
  6493. referencedClasses: ["Array"]
  6494. }),
  6495. globals.TestRunner);
  6496. smalltalk.addMethod(
  6497. smalltalk.method({
  6498. selector: "selectedClasses",
  6499. protocol: 'accessing',
  6500. fn: function (){
  6501. var self=this;
  6502. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  6503. return smalltalk.withContext(function($ctx1) {
  6504. var $2,$1;
  6505. $2=self["@selectedClasses"];
  6506. if(($receiver = $2) == nil || $receiver == null){
  6507. self["@selectedClasses"]=_st($Array())._new();
  6508. $1=self["@selectedClasses"];
  6509. } else {
  6510. $1=$2;
  6511. };
  6512. return $1;
  6513. }, function($ctx1) {$ctx1.fill(self,"selectedClasses",{},globals.TestRunner)})},
  6514. args: [],
  6515. source: "selectedClasses\x0a\x09^ selectedClasses ifNil: [ selectedClasses := Array new ]",
  6516. messageSends: ["ifNil:", "new"],
  6517. referencedClasses: ["Array"]
  6518. }),
  6519. globals.TestRunner);
  6520. smalltalk.addMethod(
  6521. smalltalk.method({
  6522. selector: "statusInfo",
  6523. protocol: 'accessing',
  6524. fn: function (){
  6525. var self=this;
  6526. return smalltalk.withContext(function($ctx1) {
  6527. var $2,$1;
  6528. $2=_st(_st(self._printTotal()).__comma(self._printPasses())).__comma(self._printErrors());
  6529. $ctx1.sendIdx[","]=2;
  6530. $1=_st($2).__comma(self._printFailures());
  6531. $ctx1.sendIdx[","]=1;
  6532. return $1;
  6533. }, function($ctx1) {$ctx1.fill(self,"statusInfo",{},globals.TestRunner)})},
  6534. args: [],
  6535. source: "statusInfo\x0a\x09^ self printTotal, self printPasses, self printErrors, self printFailures",
  6536. messageSends: [",", "printTotal", "printPasses", "printErrors", "printFailures"],
  6537. referencedClasses: []
  6538. }),
  6539. globals.TestRunner);
  6540. smalltalk.addMethod(
  6541. smalltalk.method({
  6542. selector: "testCases",
  6543. protocol: 'accessing',
  6544. fn: function (){
  6545. var self=this;
  6546. var testCases;
  6547. return smalltalk.withContext(function($ctx1) {
  6548. var $1;
  6549. testCases=[];
  6550. _st(_st(self._selectedClasses())._select_((function(each){
  6551. return smalltalk.withContext(function($ctx2) {
  6552. return _st(self._selectedCategories())._includes_(_st(each)._category());
  6553. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._do_((function(each){
  6554. return smalltalk.withContext(function($ctx2) {
  6555. return _st(testCases)._addAll_(_st(each)._buildSuite());
  6556. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
  6557. $1=testCases;
  6558. return $1;
  6559. }, function($ctx1) {$ctx1.fill(self,"testCases",{testCases:testCases},globals.TestRunner)})},
  6560. args: [],
  6561. 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",
  6562. messageSends: ["do:", "select:", "selectedClasses", "includes:", "selectedCategories", "category", "addAll:", "buildSuite"],
  6563. referencedClasses: []
  6564. }),
  6565. globals.TestRunner);
  6566. smalltalk.addMethod(
  6567. smalltalk.method({
  6568. selector: "toggleCategory:",
  6569. protocol: 'actions',
  6570. fn: function (aCategory){
  6571. var self=this;
  6572. return smalltalk.withContext(function($ctx1) {
  6573. var $1,$2;
  6574. $1=self._isSelectedCategory_(aCategory);
  6575. if(smalltalk.assert($1)){
  6576. _st(self["@selectedCategories"])._remove_(aCategory);
  6577. } else {
  6578. _st(self["@selectedCategories"])._add_(aCategory);
  6579. };
  6580. self._updateCategoriesList();
  6581. $2=self._updateClassesList();
  6582. return self}, function($ctx1) {$ctx1.fill(self,"toggleCategory:",{aCategory:aCategory},globals.TestRunner)})},
  6583. args: ["aCategory"],
  6584. 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",
  6585. messageSends: ["ifFalse:ifTrue:", "isSelectedCategory:", "add:", "remove:", "updateCategoriesList", "updateClassesList"],
  6586. referencedClasses: []
  6587. }),
  6588. globals.TestRunner);
  6589. smalltalk.addMethod(
  6590. smalltalk.method({
  6591. selector: "toggleClass:",
  6592. protocol: 'actions',
  6593. fn: function (aClass){
  6594. var self=this;
  6595. return smalltalk.withContext(function($ctx1) {
  6596. var $1;
  6597. $1=self._isSelectedClass_(aClass);
  6598. if(smalltalk.assert($1)){
  6599. _st(self["@selectedClasses"])._remove_(aClass);
  6600. } else {
  6601. _st(self["@selectedClasses"])._add_(aClass);
  6602. };
  6603. self._updateClassesList();
  6604. return self}, function($ctx1) {$ctx1.fill(self,"toggleClass:",{aClass:aClass},globals.TestRunner)})},
  6605. args: ["aClass"],
  6606. 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",
  6607. messageSends: ["ifFalse:ifTrue:", "isSelectedClass:", "add:", "remove:", "updateClassesList"],
  6608. referencedClasses: []
  6609. }),
  6610. globals.TestRunner);
  6611. smalltalk.addMethod(
  6612. smalltalk.method({
  6613. selector: "updateCategoriesList",
  6614. protocol: 'updating',
  6615. fn: function (){
  6616. var self=this;
  6617. return smalltalk.withContext(function($ctx1) {
  6618. var $1,$2,$3,$4,$5;
  6619. _st(self["@packagesList"])._contents_((function(html){
  6620. return smalltalk.withContext(function($ctx2) {
  6621. $1=_st(html)._li();
  6622. $ctx2.sendIdx["li"]=1;
  6623. _st($1)._class_("all");
  6624. $ctx2.sendIdx["class:"]=1;
  6625. _st($1)._with_("All");
  6626. $ctx2.sendIdx["with:"]=1;
  6627. $2=_st($1)._onClick_((function(){
  6628. return smalltalk.withContext(function($ctx3) {
  6629. return self._selectAllCategories();
  6630. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6631. $ctx2.sendIdx["onClick:"]=1;
  6632. $2;
  6633. return _st(self._packages())._do_((function(each){
  6634. var li;
  6635. return smalltalk.withContext(function($ctx3) {
  6636. li=_st(html)._li();
  6637. li;
  6638. $3=_st(self._selectedCategories())._includes_(each);
  6639. if(smalltalk.assert($3)){
  6640. _st(li)._class_("selected");
  6641. };
  6642. $4=li;
  6643. _st($4)._with_(each);
  6644. $5=_st($4)._onClick_((function(){
  6645. return smalltalk.withContext(function($ctx4) {
  6646. return self._toggleCategory_(each);
  6647. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  6648. return $5;
  6649. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,3)})}));
  6650. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6651. return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},globals.TestRunner)})},
  6652. args: [],
  6653. 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 ]] ]",
  6654. messageSends: ["contents:", "class:", "li", "with:", "onClick:", "selectAllCategories", "do:", "packages", "ifTrue:", "includes:", "selectedCategories", "toggleCategory:"],
  6655. referencedClasses: []
  6656. }),
  6657. globals.TestRunner);
  6658. smalltalk.addMethod(
  6659. smalltalk.method({
  6660. selector: "updateClassesList",
  6661. protocol: 'updating',
  6662. fn: function (){
  6663. var self=this;
  6664. return smalltalk.withContext(function($ctx1) {
  6665. var $1,$2,$3,$4,$5,$6;
  6666. _st(self["@classesList"])._contents_((function(html){
  6667. return smalltalk.withContext(function($ctx2) {
  6668. $1=_st(self._selectedCategories())._isEmpty();
  6669. if(! smalltalk.assert($1)){
  6670. $2=_st(html)._li();
  6671. $ctx2.sendIdx["li"]=1;
  6672. _st($2)._class_("all");
  6673. $ctx2.sendIdx["class:"]=1;
  6674. _st($2)._with_("All");
  6675. $ctx2.sendIdx["with:"]=1;
  6676. $3=_st($2)._onClick_((function(){
  6677. return smalltalk.withContext(function($ctx3) {
  6678. return self._selectAllClasses();
  6679. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  6680. $ctx2.sendIdx["onClick:"]=1;
  6681. $3;
  6682. };
  6683. return _st(self._classes())._do_((function(each){
  6684. var li;
  6685. return smalltalk.withContext(function($ctx3) {
  6686. li=_st(html)._li();
  6687. li;
  6688. $4=_st(self._selectedClasses())._includes_(each);
  6689. if(smalltalk.assert($4)){
  6690. _st(li)._class_("selected");
  6691. };
  6692. $5=li;
  6693. _st($5)._with_(_st(each)._name());
  6694. $6=_st($5)._onClick_((function(){
  6695. return smalltalk.withContext(function($ctx4) {
  6696. return self._toggleClass_(each);
  6697. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)})}));
  6698. return $6;
  6699. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,4)})}));
  6700. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6701. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},globals.TestRunner)})},
  6702. args: [],
  6703. source: "updateClassesList\x0a\x09classesList contents: [ :html |\x0a\x09(self selectedCategories isEmpty) ifFalse: [\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 ]] ]",
  6704. messageSends: ["contents:", "ifFalse:", "isEmpty", "selectedCategories", "class:", "li", "with:", "onClick:", "selectAllClasses", "do:", "classes", "ifTrue:", "includes:", "selectedClasses", "name", "toggleClass:"],
  6705. referencedClasses: []
  6706. }),
  6707. globals.TestRunner);
  6708. smalltalk.addMethod(
  6709. smalltalk.method({
  6710. selector: "updateMethodsList",
  6711. protocol: 'updating',
  6712. fn: function (){
  6713. var self=this;
  6714. return smalltalk.withContext(function($ctx1) {
  6715. _st(self["@methodsList"])._contents_((function(html){
  6716. return smalltalk.withContext(function($ctx2) {
  6717. self._renderErrorsOn_(html);
  6718. return self._renderFailuresOn_(html);
  6719. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6720. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},globals.TestRunner)})},
  6721. args: [],
  6722. source: "updateMethodsList\x0a\x09methodsList contents: [ :html |\x0a\x09\x09self renderErrorsOn: html.\x0a\x09\x09\x09\x09self renderFailuresOn: html ]",
  6723. messageSends: ["contents:", "renderErrorsOn:", "renderFailuresOn:"],
  6724. referencedClasses: []
  6725. }),
  6726. globals.TestRunner);
  6727. smalltalk.addMethod(
  6728. smalltalk.method({
  6729. selector: "updateStatusDiv",
  6730. protocol: 'updating',
  6731. fn: function (){
  6732. var self=this;
  6733. return smalltalk.withContext(function($ctx1) {
  6734. _st(self["@statusDiv"])._class_("sunit status ".__comma(_st(self["@result"])._status()));
  6735. _st(self["@statusDiv"])._contents_((function(html){
  6736. return smalltalk.withContext(function($ctx2) {
  6737. return _st(_st(html)._span())._with_(self._statusInfo());
  6738. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6739. return self}, function($ctx1) {$ctx1.fill(self,"updateStatusDiv",{},globals.TestRunner)})},
  6740. args: [],
  6741. source: "updateStatusDiv\x0a\x09statusDiv class: 'sunit status ', result status.\x0a\x09statusDiv contents: [ :html |\x0a\x09\x09html span with: self statusInfo ]",
  6742. messageSends: ["class:", ",", "status", "contents:", "with:", "span", "statusInfo"],
  6743. referencedClasses: []
  6744. }),
  6745. globals.TestRunner);
  6746. smalltalk.addClass('Workspace', globals.TabWidget, ['sourceArea'], 'IDE');
  6747. smalltalk.addMethod(
  6748. smalltalk.method({
  6749. selector: "clearWorkspace",
  6750. protocol: 'actions',
  6751. fn: function (){
  6752. var self=this;
  6753. return smalltalk.withContext(function($ctx1) {
  6754. _st(self["@sourceArea"])._clear();
  6755. return self}, function($ctx1) {$ctx1.fill(self,"clearWorkspace",{},globals.Workspace)})},
  6756. args: [],
  6757. source: "clearWorkspace\x0a\x09sourceArea clear",
  6758. messageSends: ["clear"],
  6759. referencedClasses: []
  6760. }),
  6761. globals.Workspace);
  6762. smalltalk.addMethod(
  6763. smalltalk.method({
  6764. selector: "doIt",
  6765. protocol: 'actions',
  6766. fn: function (){
  6767. var self=this;
  6768. return smalltalk.withContext(function($ctx1) {
  6769. _st(self["@sourceArea"])._doIt();
  6770. return self}, function($ctx1) {$ctx1.fill(self,"doIt",{},globals.Workspace)})},
  6771. args: [],
  6772. source: "doIt\x0a\x09sourceArea doIt",
  6773. messageSends: ["doIt"],
  6774. referencedClasses: []
  6775. }),
  6776. globals.Workspace);
  6777. smalltalk.addMethod(
  6778. smalltalk.method({
  6779. selector: "fileIn",
  6780. protocol: 'actions',
  6781. fn: function (){
  6782. var self=this;
  6783. return smalltalk.withContext(function($ctx1) {
  6784. _st(self["@sourceArea"])._fileIn();
  6785. return self}, function($ctx1) {$ctx1.fill(self,"fileIn",{},globals.Workspace)})},
  6786. args: [],
  6787. source: "fileIn\x0a\x09sourceArea fileIn",
  6788. messageSends: ["fileIn"],
  6789. referencedClasses: []
  6790. }),
  6791. globals.Workspace);
  6792. smalltalk.addMethod(
  6793. smalltalk.method({
  6794. selector: "inspectIt",
  6795. protocol: 'actions',
  6796. fn: function (){
  6797. var self=this;
  6798. return smalltalk.withContext(function($ctx1) {
  6799. _st(self["@sourceArea"])._inspectIt();
  6800. return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{},globals.Workspace)})},
  6801. args: [],
  6802. source: "inspectIt\x0a\x09sourceArea inspectIt",
  6803. messageSends: ["inspectIt"],
  6804. referencedClasses: []
  6805. }),
  6806. globals.Workspace);
  6807. smalltalk.addMethod(
  6808. smalltalk.method({
  6809. selector: "label",
  6810. protocol: 'accessing',
  6811. fn: function (){
  6812. var self=this;
  6813. return "Workspace";
  6814. },
  6815. args: [],
  6816. source: "label\x0a\x09^ 'Workspace'",
  6817. messageSends: [],
  6818. referencedClasses: []
  6819. }),
  6820. globals.Workspace);
  6821. smalltalk.addMethod(
  6822. smalltalk.method({
  6823. selector: "printIt",
  6824. protocol: 'actions',
  6825. fn: function (){
  6826. var self=this;
  6827. return smalltalk.withContext(function($ctx1) {
  6828. _st(self["@sourceArea"])._printIt();
  6829. return self}, function($ctx1) {$ctx1.fill(self,"printIt",{},globals.Workspace)})},
  6830. args: [],
  6831. source: "printIt\x0a\x09sourceArea printIt",
  6832. messageSends: ["printIt"],
  6833. referencedClasses: []
  6834. }),
  6835. globals.Workspace);
  6836. smalltalk.addMethod(
  6837. smalltalk.method({
  6838. selector: "renderBoxOn:",
  6839. protocol: 'rendering',
  6840. fn: function (html){
  6841. var self=this;
  6842. function $SourceArea(){return globals.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  6843. return smalltalk.withContext(function($ctx1) {
  6844. self["@sourceArea"]=_st($SourceArea())._new();
  6845. _st(self["@sourceArea"])._renderOn_(html);
  6846. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.Workspace)})},
  6847. args: ["html"],
  6848. source: "renderBoxOn: html\x0a\x09sourceArea := SourceArea new.\x0a\x09sourceArea renderOn: html",
  6849. messageSends: ["new", "renderOn:"],
  6850. referencedClasses: ["SourceArea"]
  6851. }),
  6852. globals.Workspace);
  6853. smalltalk.addMethod(
  6854. smalltalk.method({
  6855. selector: "renderButtonsOn:",
  6856. protocol: 'rendering',
  6857. fn: function (html){
  6858. var self=this;
  6859. return smalltalk.withContext(function($ctx1) {
  6860. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10;
  6861. $1=_st(html)._button();
  6862. $ctx1.sendIdx["button"]=1;
  6863. _st($1)._with_("DoIt");
  6864. $ctx1.sendIdx["with:"]=1;
  6865. _st($1)._title_("ctrl+d");
  6866. $ctx1.sendIdx["title:"]=1;
  6867. $2=_st($1)._onClick_((function(){
  6868. return smalltalk.withContext(function($ctx2) {
  6869. return self._doIt();
  6870. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  6871. $ctx1.sendIdx["onClick:"]=1;
  6872. $3=_st(html)._button();
  6873. $ctx1.sendIdx["button"]=2;
  6874. _st($3)._with_("PrintIt");
  6875. $ctx1.sendIdx["with:"]=2;
  6876. _st($3)._title_("ctrl+p");
  6877. $ctx1.sendIdx["title:"]=2;
  6878. $4=_st($3)._onClick_((function(){
  6879. return smalltalk.withContext(function($ctx2) {
  6880. return self._printIt();
  6881. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  6882. $ctx1.sendIdx["onClick:"]=2;
  6883. $5=_st(html)._button();
  6884. $ctx1.sendIdx["button"]=3;
  6885. _st($5)._with_("InspectIt");
  6886. $ctx1.sendIdx["with:"]=3;
  6887. _st($5)._title_("ctrl+i");
  6888. $ctx1.sendIdx["title:"]=3;
  6889. $6=_st($5)._onClick_((function(){
  6890. return smalltalk.withContext(function($ctx2) {
  6891. return self._inspectIt();
  6892. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  6893. $ctx1.sendIdx["onClick:"]=3;
  6894. $7=_st(html)._button();
  6895. $ctx1.sendIdx["button"]=4;
  6896. _st($7)._with_("FileIn");
  6897. $ctx1.sendIdx["with:"]=4;
  6898. _st($7)._title_("ctrl+f");
  6899. $8=_st($7)._onClick_((function(){
  6900. return smalltalk.withContext(function($ctx2) {
  6901. return self._fileIn();
  6902. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  6903. $ctx1.sendIdx["onClick:"]=4;
  6904. $9=_st(html)._button();
  6905. _st($9)._with_("Clear workspace");
  6906. $10=_st($9)._onClick_((function(){
  6907. return smalltalk.withContext(function($ctx2) {
  6908. return self._clearWorkspace();
  6909. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
  6910. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.Workspace)})},
  6911. args: ["html"],
  6912. 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 ]",
  6913. messageSends: ["with:", "button", "title:", "onClick:", "doIt", "printIt", "inspectIt", "fileIn", "clearWorkspace"],
  6914. referencedClasses: []
  6915. }),
  6916. globals.Workspace);
  6917. smalltalk.addMethod(
  6918. smalltalk.method({
  6919. selector: "show",
  6920. protocol: 'actions',
  6921. fn: function (){
  6922. var self=this;
  6923. return smalltalk.withContext(function($ctx1) {
  6924. globals.Workspace.superclass.fn.prototype._show.apply(_st(self), []);
  6925. _st(self["@sourceArea"])._focus();
  6926. return self}, function($ctx1) {$ctx1.fill(self,"show",{},globals.Workspace)})},
  6927. args: [],
  6928. source: "show\x0a\x09super show.\x0a\x09sourceArea focus.",
  6929. messageSends: ["show", "focus"],
  6930. referencedClasses: []
  6931. }),
  6932. globals.Workspace);
  6933. smalltalk.addMethod(
  6934. smalltalk.method({
  6935. selector: "inspectOn:",
  6936. protocol: '*IDE',
  6937. fn: function (anInspector){
  6938. var self=this;
  6939. var variables;
  6940. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  6941. return smalltalk.withContext(function($ctx1) {
  6942. var $1;
  6943. variables=_st($Dictionary())._new();
  6944. _st(variables)._at_put_("#self",self);
  6945. $ctx1.sendIdx["at:put:"]=1;
  6946. _st(variables)._at_put_("#year",self._year());
  6947. $ctx1.sendIdx["at:put:"]=2;
  6948. _st(variables)._at_put_("#month",self._month());
  6949. $ctx1.sendIdx["at:put:"]=3;
  6950. _st(variables)._at_put_("#day",self._day());
  6951. $ctx1.sendIdx["at:put:"]=4;
  6952. _st(variables)._at_put_("#hours",self._hours());
  6953. $ctx1.sendIdx["at:put:"]=5;
  6954. _st(variables)._at_put_("#minutes",self._minutes());
  6955. $ctx1.sendIdx["at:put:"]=6;
  6956. _st(variables)._at_put_("#seconds",self._seconds());
  6957. $ctx1.sendIdx["at:put:"]=7;
  6958. _st(variables)._at_put_("#milliseconds",self._milliseconds());
  6959. _st(anInspector)._setLabel_(self._printString());
  6960. $1=_st(anInspector)._setVariables_(variables);
  6961. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},globals.Date)})},
  6962. args: ["anInspector"],
  6963. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#year' put: self year.\x0a\x09variables at: '#month' put: self month.\x0a\x09variables at: '#day' put: self day.\x0a\x09variables at: '#hours' put: self hours.\x0a\x09variables at: '#minutes' put: self minutes.\x0a\x09variables at: '#seconds' put: self seconds.\x0a\x09variables at: '#milliseconds' put: self milliseconds.\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  6964. messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"],
  6965. referencedClasses: ["Dictionary"]
  6966. }),
  6967. globals.Date);
  6968. smalltalk.addMethod(
  6969. smalltalk.method({
  6970. selector: "inspectOn:",
  6971. protocol: '*IDE',
  6972. fn: function (anInspector){
  6973. var self=this;
  6974. var variables;
  6975. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  6976. return smalltalk.withContext(function($ctx1) {
  6977. var $1;
  6978. variables=_st($Dictionary())._new();
  6979. _st(variables)._at_put_("#self",self);
  6980. $ctx1.sendIdx["at:put:"]=1;
  6981. self._withIndexDo_((function(each,i){
  6982. return smalltalk.withContext(function($ctx2) {
  6983. return _st(variables)._at_put_(i,each);
  6984. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,1)})}));
  6985. _st(anInspector)._setLabel_(self._printString());
  6986. $1=_st(anInspector)._setVariables_(variables);
  6987. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},globals.Collection)})},
  6988. args: ["anInspector"],
  6989. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09self withIndexDo: [ :each :i |\x0a\x09\x09variables at: i put: each ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  6990. messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"],
  6991. referencedClasses: ["Dictionary"]
  6992. }),
  6993. globals.Collection);
  6994. smalltalk.addMethod(
  6995. smalltalk.method({
  6996. selector: "inspectOn:",
  6997. protocol: '*IDE',
  6998. fn: function (anInspector){
  6999. var self=this;
  7000. var label;
  7001. return smalltalk.withContext(function($ctx1) {
  7002. var $3,$2,$1,$5,$4;
  7003. globals.String.superclass.fn.prototype._inspectOn_.apply(_st(self), [anInspector]);
  7004. $3=self._printString();
  7005. $ctx1.sendIdx["printString"]=1;
  7006. $2=_st($3)._size();
  7007. $1=_st($2).__gt((30));
  7008. if(smalltalk.assert($1)){
  7009. $5=self._printString();
  7010. $ctx1.sendIdx["printString"]=2;
  7011. $4=_st($5)._copyFrom_to_((1),(30));
  7012. label=_st($4).__comma("...'");
  7013. label;
  7014. } else {
  7015. label=self._printString();
  7016. label;
  7017. };
  7018. _st(anInspector)._setLabel_(label);
  7019. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,label:label},globals.String)})},
  7020. args: ["anInspector"],
  7021. source: "inspectOn: anInspector\x0a\x09| label |\x0a\x09super inspectOn: anInspector.\x0a\x09self printString size > 30\x0a\x09\x09ifTrue: [ label := (self printString copyFrom: 1 to: 30), '...''' ]\x0a\x09\x09ifFalse: [ label := self printString ].\x0a\x09anInspector setLabel: label",
  7022. messageSends: ["inspectOn:", "ifTrue:ifFalse:", ">", "size", "printString", ",", "copyFrom:to:", "setLabel:"],
  7023. referencedClasses: []
  7024. }),
  7025. globals.String);
  7026. smalltalk.addMethod(
  7027. smalltalk.method({
  7028. selector: "inspectOn:",
  7029. protocol: '*IDE',
  7030. fn: function (anInspector){
  7031. var self=this;
  7032. var variables;
  7033. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7034. return smalltalk.withContext(function($ctx1) {
  7035. var $1;
  7036. variables=_st($Dictionary())._new();
  7037. _st(variables)._at_put_("#self",self);
  7038. $ctx1.sendIdx["at:put:"]=1;
  7039. _st(variables)._at_put_("#home",self._home());
  7040. $ctx1.sendIdx["at:put:"]=2;
  7041. _st(variables)._at_put_("#receiver",self._receiver());
  7042. $ctx1.sendIdx["at:put:"]=3;
  7043. _st(variables)._at_put_("#selector",self._selector());
  7044. $ctx1.sendIdx["at:put:"]=4;
  7045. _st(variables)._at_put_("#temps",self._temps());
  7046. $ctx1.sendIdx["at:put:"]=5;
  7047. _st(_st(self._class())._instanceVariableNames())._do_((function(each){
  7048. return smalltalk.withContext(function($ctx2) {
  7049. return _st(variables)._at_put_(each,self._instVarAt_(each));
  7050. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  7051. _st(anInspector)._setLabel_(self._printString());
  7052. $1=_st(anInspector)._setVariables_(variables);
  7053. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},globals.MethodContext)})},
  7054. args: ["anInspector"],
  7055. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#home' put: self home.\x0a\x09variables at: '#receiver' put: self receiver.\x0a\x09variables at: '#selector' put: self selector.\x0a\x09variables at: '#temps' put: self temps.\x0a\x09self class instanceVariableNames do: [ :each |\x0a\x09\x09variables at: each put: (self instVarAt: each) ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  7056. messageSends: ["new", "at:put:", "home", "receiver", "selector", "temps", "do:", "instanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"],
  7057. referencedClasses: ["Dictionary"]
  7058. }),
  7059. globals.MethodContext);
  7060. smalltalk.addMethod(
  7061. smalltalk.method({
  7062. selector: "inspectOn:",
  7063. protocol: '*IDE',
  7064. fn: function (anInspector){
  7065. var self=this;
  7066. var variables;
  7067. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7068. return smalltalk.withContext(function($ctx1) {
  7069. var $1;
  7070. variables=_st($Dictionary())._new();
  7071. _st(variables)._at_put_("#self",self);
  7072. $ctx1.sendIdx["at:put:"]=1;
  7073. _st(variables)._at_put_("#keys",self._keys());
  7074. $ctx1.sendIdx["at:put:"]=2;
  7075. self._keysAndValuesDo_((function(key,value){
  7076. return smalltalk.withContext(function($ctx2) {
  7077. return _st(variables)._at_put_(key,value);
  7078. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,1)})}));
  7079. _st(anInspector)._setLabel_(self._printString());
  7080. $1=_st(anInspector)._setVariables_(variables);
  7081. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},globals.AssociativeCollection)})},
  7082. args: ["anInspector"],
  7083. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#keys' put: self keys.\x0a\x09self keysAndValuesDo: [ :key :value |\x0a\x09\x09variables at: key put: value ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  7084. messageSends: ["new", "at:put:", "keys", "keysAndValuesDo:", "setLabel:", "printString", "setVariables:"],
  7085. referencedClasses: ["Dictionary"]
  7086. }),
  7087. globals.AssociativeCollection);
  7088. smalltalk.addMethod(
  7089. smalltalk.method({
  7090. selector: "inspectOn:",
  7091. protocol: '*IDE',
  7092. fn: function (anInspector){
  7093. var self=this;
  7094. var variables,i;
  7095. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7096. return smalltalk.withContext(function($ctx1) {
  7097. var $1;
  7098. variables=_st($Dictionary())._new();
  7099. _st(variables)._at_put_("#self",self);
  7100. $ctx1.sendIdx["at:put:"]=1;
  7101. i=(1);
  7102. self._do_((function(each){
  7103. return smalltalk.withContext(function($ctx2) {
  7104. _st(variables)._at_put_(i,each);
  7105. i=_st(i).__plus((1));
  7106. return i;
  7107. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  7108. _st(anInspector)._setLabel_(self._printString());
  7109. $1=_st(anInspector)._setVariables_(variables);
  7110. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables,i:i},globals.Set)})},
  7111. args: ["anInspector"],
  7112. source: "inspectOn: anInspector\x0a\x09| variables i |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09i := 1.\x0a\x09self do: [ :each |\x0a\x09\x09variables at: i put: each.\x0a\x09\x09i := i + 1 ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  7113. messageSends: ["new", "at:put:", "do:", "+", "setLabel:", "printString", "setVariables:"],
  7114. referencedClasses: ["Dictionary"]
  7115. }),
  7116. globals.Set);
  7117. });