IDE.js 266 KB

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