IDE.js 268 KB

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