1
0

IDE.js 267 KB

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