IDE.js 269 KB

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