IDE.js 274 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478
  1. define("amber_core/IDE", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_core/Canvas", "amber_core/Kernel-Exceptions", "amber_core/Kernel-Objects", "amber_core/Kernel-Collections", "amber_core/Kernel-Methods"], function(smalltalk,nil,_st){
  2. smalltalk.addPackage('IDE');
  3. smalltalk.packages["IDE"].transport = {"type":"amd","amdNamespace":"amber_core"};
  4. smalltalk.addClass('ClassesList', smalltalk.Widget, ['browser', 'ul', 'nodes'], 'IDE');
  5. smalltalk.addMethod(
  6. smalltalk.method({
  7. selector: "browser",
  8. protocol: 'accessing',
  9. fn: function (){
  10. var self=this;
  11. return smalltalk.withContext(function($ctx1) {
  12. var $1;
  13. $1=self["@browser"];
  14. return $1;
  15. }, function($ctx1) {$ctx1.fill(self,"browser",{},smalltalk.ClassesList)})},
  16. args: [],
  17. source: "browser\x0a\x09^ browser",
  18. messageSends: [],
  19. referencedClasses: []
  20. }),
  21. smalltalk.ClassesList);
  22. smalltalk.addMethod(
  23. smalltalk.method({
  24. selector: "browser:",
  25. protocol: 'accessing',
  26. fn: function (aBrowser){
  27. var self=this;
  28. return smalltalk.withContext(function($ctx1) {
  29. self["@browser"]=aBrowser;
  30. return self}, function($ctx1) {$ctx1.fill(self,"browser:",{aBrowser:aBrowser},smalltalk.ClassesList)})},
  31. args: ["aBrowser"],
  32. source: "browser: aBrowser\x0a\x09browser := aBrowser",
  33. messageSends: [],
  34. referencedClasses: []
  35. }),
  36. smalltalk.ClassesList);
  37. smalltalk.addMethod(
  38. smalltalk.method({
  39. selector: "category",
  40. protocol: 'accessing',
  41. fn: function (){
  42. var self=this;
  43. return smalltalk.withContext(function($ctx1) {
  44. var $1;
  45. $1=_st(self._browser())._selectedPackage();
  46. return $1;
  47. }, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.ClassesList)})},
  48. args: [],
  49. source: "category\x0a\x09^ self browser selectedPackage",
  50. messageSends: ["selectedPackage", "browser"],
  51. referencedClasses: []
  52. }),
  53. smalltalk.ClassesList);
  54. smalltalk.addMethod(
  55. smalltalk.method({
  56. selector: "getNodes",
  57. protocol: 'accessing',
  58. fn: function (){
  59. var self=this;
  60. var classes,children,others;
  61. function $ClassesListNode(){return smalltalk.ClassesListNode||(typeof ClassesListNode=="undefined"?nil:ClassesListNode)}
  62. return smalltalk.withContext(function($ctx1) {
  63. var $1,$2,$3;
  64. $1=self._browser();
  65. $ctx1.sendIdx["browser"]=1;
  66. classes=_st($1)._classes();
  67. children=[];
  68. others=[];
  69. _st(classes)._do_((function(each){
  70. return smalltalk.withContext(function($ctx2) {
  71. $2=_st(classes)._includes_(_st(each)._superclass());
  72. if(smalltalk.assert($2)){
  73. return _st(others)._add_(each);
  74. } else {
  75. return _st(children)._add_(each);
  76. $ctx2.sendIdx["add:"]=1;
  77. };
  78. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  79. $3=_st(children)._collect_((function(each){
  80. return smalltalk.withContext(function($ctx2) {
  81. return _st($ClassesListNode())._on_browser_classes_level_(each,self._browser(),others,(0));
  82. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
  83. return $3;
  84. }, function($ctx1) {$ctx1.fill(self,"getNodes",{classes:classes,children:children,others:others},smalltalk.ClassesList)})},
  85. args: [],
  86. 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 ]",
  87. messageSends: ["classes", "browser", "do:", "ifFalse:ifTrue:", "includes:", "superclass", "add:", "collect:", "on:browser:classes:level:"],
  88. referencedClasses: ["ClassesListNode"]
  89. }),
  90. smalltalk.ClassesList);
  91. smalltalk.addMethod(
  92. smalltalk.method({
  93. selector: "nodes",
  94. protocol: 'accessing',
  95. fn: function (){
  96. var self=this;
  97. return smalltalk.withContext(function($ctx1) {
  98. var $1,$2;
  99. $1=self["@nodes"];
  100. if(($receiver = $1) == nil || $receiver == null){
  101. self["@nodes"]=self._getNodes();
  102. self["@nodes"];
  103. } else {
  104. $1;
  105. };
  106. $2=self["@nodes"];
  107. return $2;
  108. }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.ClassesList)})},
  109. args: [],
  110. source: "nodes\x0a\x09nodes ifNil: [ nodes := self getNodes ].\x0a\x09^ nodes",
  111. messageSends: ["ifNil:", "getNodes"],
  112. referencedClasses: []
  113. }),
  114. smalltalk.ClassesList);
  115. smalltalk.addMethod(
  116. smalltalk.method({
  117. selector: "renderOn:",
  118. protocol: 'rendering',
  119. fn: function (html){
  120. var self=this;
  121. return smalltalk.withContext(function($ctx1) {
  122. var $1,$2;
  123. $1=_st(html)._ul();
  124. _st($1)._class_("amber_column browser classes");
  125. $2=_st($1)._yourself();
  126. self["@ul"]=$2;
  127. self._updateNodes();
  128. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.ClassesList)})},
  129. args: ["html"],
  130. source: "renderOn: html\x0a\x09ul := html ul\x0a\x09\x09class: 'amber_column browser classes';\x0a\x09\x09yourself.\x0a\x09self updateNodes",
  131. messageSends: ["class:", "ul", "yourself", "updateNodes"],
  132. referencedClasses: []
  133. }),
  134. smalltalk.ClassesList);
  135. smalltalk.addMethod(
  136. smalltalk.method({
  137. selector: "resetNodes",
  138. protocol: 'accessing',
  139. fn: function (){
  140. var self=this;
  141. return smalltalk.withContext(function($ctx1) {
  142. self["@nodes"]=nil;
  143. return self}, function($ctx1) {$ctx1.fill(self,"resetNodes",{},smalltalk.ClassesList)})},
  144. args: [],
  145. source: "resetNodes\x0a\x09nodes := nil",
  146. messageSends: [],
  147. referencedClasses: []
  148. }),
  149. smalltalk.ClassesList);
  150. smalltalk.addMethod(
  151. smalltalk.method({
  152. selector: "updateNodes",
  153. protocol: 'rendering',
  154. fn: function (){
  155. var self=this;
  156. return smalltalk.withContext(function($ctx1) {
  157. _st(self["@ul"])._contents_((function(html){
  158. return smalltalk.withContext(function($ctx2) {
  159. return _st(self._nodes())._do_((function(each){
  160. return smalltalk.withContext(function($ctx3) {
  161. return _st(each)._renderOn_(html);
  162. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  163. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  164. return self}, function($ctx1) {$ctx1.fill(self,"updateNodes",{},smalltalk.ClassesList)})},
  165. args: [],
  166. source: "updateNodes\x0a\x09ul contents: [ :html |\x0a\x09\x09self nodes do: [ :each |\x0a\x09\x09\x09each renderOn: html ]]",
  167. messageSends: ["contents:", "do:", "nodes", "renderOn:"],
  168. referencedClasses: []
  169. }),
  170. smalltalk.ClassesList);
  171. smalltalk.addMethod(
  172. smalltalk.method({
  173. selector: "on:",
  174. protocol: 'instance creation',
  175. fn: function (aBrowser){
  176. var self=this;
  177. return smalltalk.withContext(function($ctx1) {
  178. var $2,$3,$1;
  179. $2=self._new();
  180. _st($2)._browser_(aBrowser);
  181. $3=_st($2)._yourself();
  182. $1=$3;
  183. return $1;
  184. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowser:aBrowser},smalltalk.ClassesList.klass)})},
  185. args: ["aBrowser"],
  186. source: "on: aBrowser\x0a\x09^ self new\x0a\x09\x09browser: aBrowser;\x0a\x09\x09yourself",
  187. messageSends: ["browser:", "new", "yourself"],
  188. referencedClasses: []
  189. }),
  190. smalltalk.ClassesList.klass);
  191. smalltalk.addClass('ClassesListNode', smalltalk.Widget, ['browser', 'theClass', 'level', 'nodes'], 'IDE');
  192. smalltalk.addMethod(
  193. smalltalk.method({
  194. selector: "browser",
  195. protocol: 'accessing',
  196. fn: function (){
  197. var self=this;
  198. return smalltalk.withContext(function($ctx1) {
  199. var $1;
  200. $1=self["@browser"];
  201. return $1;
  202. }, function($ctx1) {$ctx1.fill(self,"browser",{},smalltalk.ClassesListNode)})},
  203. args: [],
  204. source: "browser\x0a\x09^ browser",
  205. messageSends: [],
  206. referencedClasses: []
  207. }),
  208. smalltalk.ClassesListNode);
  209. smalltalk.addMethod(
  210. smalltalk.method({
  211. selector: "browser:",
  212. protocol: 'accessing',
  213. fn: function (aBrowser){
  214. var self=this;
  215. return smalltalk.withContext(function($ctx1) {
  216. self["@browser"]=aBrowser;
  217. return self}, function($ctx1) {$ctx1.fill(self,"browser:",{aBrowser:aBrowser},smalltalk.ClassesListNode)})},
  218. args: ["aBrowser"],
  219. source: "browser: aBrowser\x0a\x09browser := aBrowser",
  220. messageSends: [],
  221. referencedClasses: []
  222. }),
  223. smalltalk.ClassesListNode);
  224. smalltalk.addMethod(
  225. smalltalk.method({
  226. selector: "getNodesFrom:",
  227. protocol: 'accessing',
  228. fn: function (aCollection){
  229. var self=this;
  230. var children,others;
  231. function $ClassesListNode(){return smalltalk.ClassesListNode||(typeof ClassesListNode=="undefined"?nil:ClassesListNode)}
  232. return smalltalk.withContext(function($ctx1) {
  233. var $1;
  234. children=[];
  235. others=[];
  236. _st(aCollection)._do_((function(each){
  237. return smalltalk.withContext(function($ctx2) {
  238. $1=_st(_st(each)._superclass()).__eq(self._theClass());
  239. if(smalltalk.assert($1)){
  240. return _st(children)._add_(each);
  241. $ctx2.sendIdx["add:"]=1;
  242. } else {
  243. return _st(others)._add_(each);
  244. };
  245. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  246. self["@nodes"]=_st(children)._collect_((function(each){
  247. return smalltalk.withContext(function($ctx2) {
  248. return _st($ClassesListNode())._on_browser_classes_level_(each,self._browser(),others,_st(self._level()).__plus((1)));
  249. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
  250. return self}, function($ctx1) {$ctx1.fill(self,"getNodesFrom:",{aCollection:aCollection,children:children,others:others},smalltalk.ClassesListNode)})},
  251. args: ["aCollection"],
  252. 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 ]",
  253. messageSends: ["do:", "ifTrue:ifFalse:", "=", "superclass", "theClass", "add:", "collect:", "on:browser:classes:level:", "browser", "+", "level"],
  254. referencedClasses: ["ClassesListNode"]
  255. }),
  256. smalltalk.ClassesListNode);
  257. smalltalk.addMethod(
  258. smalltalk.method({
  259. selector: "label",
  260. protocol: 'accessing',
  261. fn: function (){
  262. var self=this;
  263. var str;
  264. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  265. return smalltalk.withContext(function($ctx1) {
  266. var $1;
  267. str=_st(_st($String())._new())._writeStream();
  268. _st(self._level())._timesRepeat_((function(){
  269. return smalltalk.withContext(function($ctx2) {
  270. return _st(str)._nextPutAll_("    ");
  271. $ctx2.sendIdx["nextPutAll:"]=1;
  272. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  273. _st(str)._nextPutAll_(_st(self._theClass())._name());
  274. $1=_st(str)._contents();
  275. return $1;
  276. }, function($ctx1) {$ctx1.fill(self,"label",{str:str},smalltalk.ClassesListNode)})},
  277. args: [],
  278. 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",
  279. messageSends: ["writeStream", "new", "timesRepeat:", "level", "nextPutAll:", "name", "theClass", "contents"],
  280. referencedClasses: ["String"]
  281. }),
  282. smalltalk.ClassesListNode);
  283. smalltalk.addMethod(
  284. smalltalk.method({
  285. selector: "level",
  286. protocol: 'accessing',
  287. fn: function (){
  288. var self=this;
  289. return smalltalk.withContext(function($ctx1) {
  290. var $1;
  291. $1=self["@level"];
  292. return $1;
  293. }, function($ctx1) {$ctx1.fill(self,"level",{},smalltalk.ClassesListNode)})},
  294. args: [],
  295. source: "level\x0a\x09^ level",
  296. messageSends: [],
  297. referencedClasses: []
  298. }),
  299. smalltalk.ClassesListNode);
  300. smalltalk.addMethod(
  301. smalltalk.method({
  302. selector: "level:",
  303. protocol: 'accessing',
  304. fn: function (anInteger){
  305. var self=this;
  306. return smalltalk.withContext(function($ctx1) {
  307. self["@level"]=anInteger;
  308. return self}, function($ctx1) {$ctx1.fill(self,"level:",{anInteger:anInteger},smalltalk.ClassesListNode)})},
  309. args: ["anInteger"],
  310. source: "level: anInteger\x0a\x09level := anInteger",
  311. messageSends: [],
  312. referencedClasses: []
  313. }),
  314. smalltalk.ClassesListNode);
  315. smalltalk.addMethod(
  316. smalltalk.method({
  317. selector: "nodes",
  318. protocol: 'accessing',
  319. fn: function (){
  320. var self=this;
  321. return smalltalk.withContext(function($ctx1) {
  322. var $1;
  323. $1=self["@nodes"];
  324. return $1;
  325. }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.ClassesListNode)})},
  326. args: [],
  327. source: "nodes\x0a\x09^ nodes",
  328. messageSends: [],
  329. referencedClasses: []
  330. }),
  331. smalltalk.ClassesListNode);
  332. smalltalk.addMethod(
  333. smalltalk.method({
  334. selector: "renderOn:",
  335. protocol: 'rendering',
  336. fn: function (html){
  337. var self=this;
  338. var li,cssClass;
  339. return smalltalk.withContext(function($ctx1) {
  340. var $1,$2,$4,$5,$3,$6;
  341. cssClass="";
  342. li=_st(_st(html)._li())._onClick_((function(){
  343. return smalltalk.withContext(function($ctx2) {
  344. $1=self._browser();
  345. $ctx2.sendIdx["browser"]=1;
  346. $2=self._theClass();
  347. $ctx2.sendIdx["theClass"]=1;
  348. return _st($1)._selectClass_($2);
  349. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  350. _st(_st(li)._asJQuery())._html_(self._label());
  351. $4=_st(self._browser())._selectedClass();
  352. $5=self._theClass();
  353. $ctx1.sendIdx["theClass"]=2;
  354. $3=_st($4).__eq($5);
  355. if(smalltalk.assert($3)){
  356. cssClass=_st(cssClass).__comma(" selected");
  357. $ctx1.sendIdx[","]=1;
  358. cssClass;
  359. };
  360. $6=_st(_st(self._theClass())._comment())._isEmpty();
  361. if(! smalltalk.assert($6)){
  362. cssClass=_st(cssClass).__comma(" commented");
  363. cssClass;
  364. };
  365. _st(li)._class_(cssClass);
  366. _st(self._nodes())._do_((function(each){
  367. return smalltalk.withContext(function($ctx2) {
  368. return _st(each)._renderOn_(html);
  369. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
  370. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,li:li,cssClass:cssClass},smalltalk.ClassesListNode)})},
  371. args: ["html"],
  372. 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 ]",
  373. messageSends: ["onClick:", "li", "selectClass:", "browser", "theClass", "html:", "asJQuery", "label", "ifTrue:", "=", "selectedClass", ",", "ifFalse:", "isEmpty", "comment", "class:", "do:", "nodes", "renderOn:"],
  374. referencedClasses: []
  375. }),
  376. smalltalk.ClassesListNode);
  377. smalltalk.addMethod(
  378. smalltalk.method({
  379. selector: "theClass",
  380. protocol: 'accessing',
  381. fn: function (){
  382. var self=this;
  383. return smalltalk.withContext(function($ctx1) {
  384. var $1;
  385. $1=self["@theClass"];
  386. return $1;
  387. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassesListNode)})},
  388. args: [],
  389. source: "theClass\x0a\x09^ theClass",
  390. messageSends: [],
  391. referencedClasses: []
  392. }),
  393. smalltalk.ClassesListNode);
  394. smalltalk.addMethod(
  395. smalltalk.method({
  396. selector: "theClass:",
  397. protocol: 'accessing',
  398. fn: function (aClass){
  399. var self=this;
  400. return smalltalk.withContext(function($ctx1) {
  401. self["@theClass"]=aClass;
  402. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ClassesListNode)})},
  403. args: ["aClass"],
  404. source: "theClass: aClass\x0a\x09theClass := aClass",
  405. messageSends: [],
  406. referencedClasses: []
  407. }),
  408. smalltalk.ClassesListNode);
  409. smalltalk.addMethod(
  410. smalltalk.method({
  411. selector: "on:browser:classes:level:",
  412. protocol: 'instance creation',
  413. fn: function (aClass,aBrowser,aCollection,anInteger){
  414. var self=this;
  415. return smalltalk.withContext(function($ctx1) {
  416. var $2,$3,$1;
  417. $2=self._new();
  418. _st($2)._theClass_(aClass);
  419. _st($2)._browser_(aBrowser);
  420. _st($2)._level_(anInteger);
  421. _st($2)._getNodesFrom_(aCollection);
  422. $3=_st($2)._yourself();
  423. $1=$3;
  424. return $1;
  425. }, function($ctx1) {$ctx1.fill(self,"on:browser:classes:level:",{aClass:aClass,aBrowser:aBrowser,aCollection:aCollection,anInteger:anInteger},smalltalk.ClassesListNode.klass)})},
  426. args: ["aClass", "aBrowser", "aCollection", "anInteger"],
  427. 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",
  428. messageSends: ["theClass:", "new", "browser:", "level:", "getNodesFrom:", "yourself"],
  429. referencedClasses: []
  430. }),
  431. smalltalk.ClassesListNode.klass);
  432. smalltalk.addClass('DebugErrorHandler', smalltalk.ErrorHandler, [], 'IDE');
  433. smalltalk.addMethod(
  434. smalltalk.method({
  435. selector: "handleError:",
  436. protocol: 'error handling',
  437. fn: function (anError){
  438. var self=this;
  439. function $Debugger(){return smalltalk.Debugger||(typeof Debugger=="undefined"?nil:Debugger)}
  440. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  441. function $ErrorHandler(){return smalltalk.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  442. return smalltalk.withContext(function($ctx1) {
  443. var $1,$2;
  444. _st((function(){
  445. return smalltalk.withContext(function($ctx2) {
  446. $1=_st($Debugger())._new();
  447. $ctx2.sendIdx["new"]=1;
  448. _st($1)._error_(anError);
  449. $2=_st($1)._open();
  450. return $2;
  451. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._on_do_($Error(),(function(error){
  452. return smalltalk.withContext(function($ctx2) {
  453. return _st(_st($ErrorHandler())._new())._handleError_(error);
  454. }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1,2)})}));
  455. return self}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},smalltalk.DebugErrorHandler)})},
  456. args: ["anError"],
  457. 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 ]",
  458. messageSends: ["on:do:", "error:", "new", "open", "handleError:"],
  459. referencedClasses: ["Debugger", "Error", "ErrorHandler"]
  460. }),
  461. smalltalk.DebugErrorHandler);
  462. smalltalk.addMethod(
  463. smalltalk.method({
  464. selector: "initialize",
  465. protocol: 'initialization',
  466. fn: function (){
  467. var self=this;
  468. function $ErrorHandler(){return smalltalk.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  469. return smalltalk.withContext(function($ctx1) {
  470. var $1;
  471. $1=_st($ErrorHandler())._current();
  472. if(($receiver = $1) == nil || $receiver == null){
  473. self._register();
  474. } else {
  475. $1;
  476. };
  477. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.DebugErrorHandler.klass)})},
  478. args: [],
  479. source: "initialize\x0a\x09ErrorHandler current ifNil: [ self register ]",
  480. messageSends: ["ifNil:", "current", "register"],
  481. referencedClasses: ["ErrorHandler"]
  482. }),
  483. smalltalk.DebugErrorHandler.klass);
  484. smalltalk.addClass('SourceArea', smalltalk.Widget, ['editor', 'div', 'receiver', 'onDoIt'], 'IDE');
  485. smalltalk.addMethod(
  486. smalltalk.method({
  487. selector: "clear",
  488. protocol: 'actions',
  489. fn: function (){
  490. var self=this;
  491. return smalltalk.withContext(function($ctx1) {
  492. self._val_("");
  493. return self}, function($ctx1) {$ctx1.fill(self,"clear",{},smalltalk.SourceArea)})},
  494. args: [],
  495. source: "clear\x0a\x09self val: ''",
  496. messageSends: ["val:"],
  497. referencedClasses: []
  498. }),
  499. smalltalk.SourceArea);
  500. smalltalk.addMethod(
  501. smalltalk.method({
  502. selector: "currentLine",
  503. protocol: 'accessing',
  504. fn: function (){
  505. var self=this;
  506. return smalltalk.withContext(function($ctx1) {
  507. var $1;
  508. $1=_st(self["@editor"])._getLine_(_st(_st(self["@editor"])._getCursor())._line());
  509. return $1;
  510. }, function($ctx1) {$ctx1.fill(self,"currentLine",{},smalltalk.SourceArea)})},
  511. args: [],
  512. source: "currentLine\x0a\x09^ editor getLine: (editor getCursor line)",
  513. messageSends: ["getLine:", "line", "getCursor"],
  514. referencedClasses: []
  515. }),
  516. smalltalk.SourceArea);
  517. smalltalk.addMethod(
  518. smalltalk.method({
  519. selector: "currentLineOrSelection",
  520. protocol: 'accessing',
  521. fn: function (){
  522. var self=this;
  523. return smalltalk.withContext(function($ctx1) {
  524. var $2,$1;
  525. $2=_st(self["@editor"])._somethingSelected();
  526. if(smalltalk.assert($2)){
  527. $1=self._selection();
  528. } else {
  529. $1=self._currentLine();
  530. };
  531. return $1;
  532. }, function($ctx1) {$ctx1.fill(self,"currentLineOrSelection",{},smalltalk.SourceArea)})},
  533. args: [],
  534. source: "currentLineOrSelection\x0a\x09^ editor somethingSelected\x0a\x09ifFalse: [ self currentLine ]\x0a\x09ifTrue: [ self selection ]",
  535. messageSends: ["ifFalse:ifTrue:", "somethingSelected", "currentLine", "selection"],
  536. referencedClasses: []
  537. }),
  538. smalltalk.SourceArea);
  539. smalltalk.addMethod(
  540. smalltalk.method({
  541. selector: "doIt",
  542. protocol: 'actions',
  543. fn: function (){
  544. var self=this;
  545. var result;
  546. return smalltalk.withContext(function($ctx1) {
  547. var $1,$2;
  548. result=self._eval_(self._currentLineOrSelection());
  549. $1=self._onDoIt();
  550. $ctx1.sendIdx["onDoIt"]=1;
  551. if(($receiver = $1) == nil || $receiver == null){
  552. $1;
  553. } else {
  554. _st(self._onDoIt())._value();
  555. };
  556. $2=result;
  557. return $2;
  558. }, function($ctx1) {$ctx1.fill(self,"doIt",{result:result},smalltalk.SourceArea)})},
  559. args: [],
  560. source: "doIt\x0a\x09| result |\x0a\x09result := self eval: self currentLineOrSelection.\x0a\x09self onDoIt ifNotNil: [ self onDoIt value ].\x0a\x09^ result",
  561. messageSends: ["eval:", "currentLineOrSelection", "ifNotNil:", "onDoIt", "value"],
  562. referencedClasses: []
  563. }),
  564. smalltalk.SourceArea);
  565. smalltalk.addMethod(
  566. smalltalk.method({
  567. selector: "editor",
  568. protocol: 'accessing',
  569. fn: function (){
  570. var self=this;
  571. return smalltalk.withContext(function($ctx1) {
  572. var $1;
  573. $1=self["@editor"];
  574. return $1;
  575. }, function($ctx1) {$ctx1.fill(self,"editor",{},smalltalk.SourceArea)})},
  576. args: [],
  577. source: "editor\x0a\x09^ editor",
  578. messageSends: [],
  579. referencedClasses: []
  580. }),
  581. smalltalk.SourceArea);
  582. smalltalk.addMethod(
  583. smalltalk.method({
  584. selector: "eval:",
  585. protocol: 'actions',
  586. fn: function (aString){
  587. var self=this;
  588. var compiler;
  589. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  590. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  591. return smalltalk.withContext(function($ctx1) {
  592. var $1,$2;
  593. var $early={};
  594. try {
  595. compiler=_st($Compiler())._new();
  596. _st((function(){
  597. return smalltalk.withContext(function($ctx2) {
  598. return _st(compiler)._parseExpression_(aString);
  599. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._on_do_($Error(),(function(ex){
  600. return smalltalk.withContext(function($ctx2) {
  601. $1=self._alert_(_st(ex)._messageText());
  602. throw $early=[$1];
  603. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,2)})}));
  604. $2=_st(compiler)._evaluateExpression_on_(aString,self._receiver());
  605. return $2;
  606. }
  607. catch(e) {if(e===$early)return e[0]; throw e}
  608. }, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,compiler:compiler},smalltalk.SourceArea)})},
  609. args: ["aString"],
  610. source: "eval: aString\x0a\x09| compiler |\x0a\x09compiler := Compiler new.\x0a\x09[ compiler parseExpression: aString ] on: Error do: [ :ex |\x0a\x09\x09^ self alert: ex messageText ].\x0a\x09^ compiler evaluateExpression: aString on: self receiver",
  611. messageSends: ["new", "on:do:", "parseExpression:", "alert:", "messageText", "evaluateExpression:on:", "receiver"],
  612. referencedClasses: ["Compiler", "Error"]
  613. }),
  614. smalltalk.SourceArea);
  615. smalltalk.addMethod(
  616. smalltalk.method({
  617. selector: "fileIn",
  618. protocol: 'actions',
  619. fn: function (){
  620. var self=this;
  621. function $Importer(){return smalltalk.Importer||(typeof Importer=="undefined"?nil:Importer)}
  622. return smalltalk.withContext(function($ctx1) {
  623. _st(_st($Importer())._new())._import_(_st(self._currentLineOrSelection())._readStream());
  624. return self}, function($ctx1) {$ctx1.fill(self,"fileIn",{},smalltalk.SourceArea)})},
  625. args: [],
  626. source: "fileIn\x0a\x09Importer new import: self currentLineOrSelection readStream",
  627. messageSends: ["import:", "new", "readStream", "currentLineOrSelection"],
  628. referencedClasses: ["Importer"]
  629. }),
  630. smalltalk.SourceArea);
  631. smalltalk.addMethod(
  632. smalltalk.method({
  633. selector: "focus",
  634. protocol: 'actions',
  635. fn: function (){
  636. var self=this;
  637. return smalltalk.withContext(function($ctx1) {
  638. _st(self._editor())._focus();
  639. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.SourceArea)})},
  640. args: [],
  641. source: "focus\x0a\x09self editor focus.",
  642. messageSends: ["focus", "editor"],
  643. referencedClasses: []
  644. }),
  645. smalltalk.SourceArea);
  646. smalltalk.addMethod(
  647. smalltalk.method({
  648. selector: "handleKeyDown:",
  649. protocol: 'actions',
  650. fn: function (anEvent){
  651. var self=this;
  652. return smalltalk.withContext(function($ctx1) {
  653. if(anEvent.ctrlKey) {
  654. if(anEvent.keyCode === 80) { //ctrl+p
  655. self._printIt();
  656. anEvent.preventDefault();
  657. return false;
  658. }
  659. if(anEvent.keyCode === 68) { //ctrl+d
  660. self._doIt();
  661. anEvent.preventDefault();
  662. return false;
  663. }
  664. if(anEvent.keyCode === 73) { //ctrl+i
  665. self._inspectIt();
  666. anEvent.preventDefault();
  667. return false;
  668. }
  669. };
  670. return self}, function($ctx1) {$ctx1.fill(self,"handleKeyDown:",{anEvent:anEvent},smalltalk.SourceArea)})},
  671. args: ["anEvent"],
  672. source: "handleKeyDown: anEvent\x0a\x09<if(anEvent.ctrlKey) {\x0a\x09\x09if(anEvent.keyCode === 80) { //ctrl+p\x0a\x09\x09\x09self._printIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 68) { //ctrl+d\x0a\x09\x09\x09self._doIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 73) { //ctrl+i\x0a\x09\x09\x09self._inspectIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09}>",
  673. messageSends: [],
  674. referencedClasses: []
  675. }),
  676. smalltalk.SourceArea);
  677. smalltalk.addMethod(
  678. smalltalk.method({
  679. selector: "inspectIt",
  680. protocol: 'actions',
  681. fn: function (){
  682. var self=this;
  683. return smalltalk.withContext(function($ctx1) {
  684. _st(self._doIt())._inspect();
  685. return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{},smalltalk.SourceArea)})},
  686. args: [],
  687. source: "inspectIt\x0a\x09self doIt inspect",
  688. messageSends: ["inspect", "doIt"],
  689. referencedClasses: []
  690. }),
  691. smalltalk.SourceArea);
  692. smalltalk.addMethod(
  693. smalltalk.method({
  694. selector: "onDoIt",
  695. protocol: 'accessing',
  696. fn: function (){
  697. var self=this;
  698. return smalltalk.withContext(function($ctx1) {
  699. var $1;
  700. $1=self["@onDoIt"];
  701. return $1;
  702. }, function($ctx1) {$ctx1.fill(self,"onDoIt",{},smalltalk.SourceArea)})},
  703. args: [],
  704. source: "onDoIt\x0a\x09^ onDoIt",
  705. messageSends: [],
  706. referencedClasses: []
  707. }),
  708. smalltalk.SourceArea);
  709. smalltalk.addMethod(
  710. smalltalk.method({
  711. selector: "onDoIt:",
  712. protocol: 'accessing',
  713. fn: function (aBlock){
  714. var self=this;
  715. return smalltalk.withContext(function($ctx1) {
  716. self["@onDoIt"]=aBlock;
  717. return self}, function($ctx1) {$ctx1.fill(self,"onDoIt:",{aBlock:aBlock},smalltalk.SourceArea)})},
  718. args: ["aBlock"],
  719. source: "onDoIt: aBlock\x0a\x09onDoIt := aBlock",
  720. messageSends: [],
  721. referencedClasses: []
  722. }),
  723. smalltalk.SourceArea);
  724. smalltalk.addMethod(
  725. smalltalk.method({
  726. selector: "onKeyDown:",
  727. protocol: 'events',
  728. fn: function (aBlock){
  729. var self=this;
  730. return smalltalk.withContext(function($ctx1) {
  731. _st(self["@div"])._onKeyDown_(aBlock);
  732. return self}, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{aBlock:aBlock},smalltalk.SourceArea)})},
  733. args: ["aBlock"],
  734. source: "onKeyDown: aBlock\x0a\x09div onKeyDown: aBlock",
  735. messageSends: ["onKeyDown:"],
  736. referencedClasses: []
  737. }),
  738. smalltalk.SourceArea);
  739. smalltalk.addMethod(
  740. smalltalk.method({
  741. selector: "onKeyUp:",
  742. protocol: 'events',
  743. fn: function (aBlock){
  744. var self=this;
  745. return smalltalk.withContext(function($ctx1) {
  746. _st(self["@div"])._onKeyUp_(aBlock);
  747. return self}, function($ctx1) {$ctx1.fill(self,"onKeyUp:",{aBlock:aBlock},smalltalk.SourceArea)})},
  748. args: ["aBlock"],
  749. source: "onKeyUp: aBlock\x0a\x09div onKeyUp: aBlock",
  750. messageSends: ["onKeyUp:"],
  751. referencedClasses: []
  752. }),
  753. smalltalk.SourceArea);
  754. smalltalk.addMethod(
  755. smalltalk.method({
  756. selector: "print:",
  757. protocol: 'actions',
  758. fn: function (aString){
  759. var self=this;
  760. var start,stop,currentLine;
  761. function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  762. return smalltalk.withContext(function($ctx1) {
  763. var $1,$2,$4,$3,$5,$6,$7,$8,$10,$9,$11,$12,$13,$15,$14;
  764. $1=_st(self["@editor"])._getCursor_(false);
  765. $ctx1.sendIdx["getCursor:"]=1;
  766. currentLine=_st($1)._line();
  767. start=_st($HashedCollection())._new();
  768. $ctx1.sendIdx["new"]=1;
  769. _st(start)._at_put_("line",currentLine);
  770. $ctx1.sendIdx["at:put:"]=1;
  771. $2=start;
  772. $4=_st(self["@editor"])._getCursor_(false);
  773. $ctx1.sendIdx["getCursor:"]=2;
  774. $3=_st($4)._ch();
  775. _st($2)._at_put_("ch",$3);
  776. $ctx1.sendIdx["at:put:"]=2;
  777. $5=_st(self["@editor"])._getSelection();
  778. $ctx1.sendIdx["getSelection"]=1;
  779. _st($5)._ifEmpty_((function(){
  780. return smalltalk.withContext(function($ctx2) {
  781. $6=start;
  782. $7=_st(_st(self["@editor"])._getLine_(currentLine))._size();
  783. $ctx2.sendIdx["size"]=1;
  784. _st($6)._at_put_("ch",$7);
  785. $ctx2.sendIdx["at:put:"]=3;
  786. $8=self["@editor"];
  787. $10="line".__minus_gt(currentLine);
  788. $ctx2.sendIdx["->"]=1;
  789. $9=smalltalk.HashedCollection._from_([$10,"ch".__minus_gt((0))]);
  790. return _st($8)._setSelection_end_($9,start);
  791. $ctx2.sendIdx["setSelection:end:"]=1;
  792. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  793. stop=_st($HashedCollection())._new();
  794. _st(stop)._at_put_("line",currentLine);
  795. $ctx1.sendIdx["at:put:"]=4;
  796. $11=stop;
  797. $12=_st(_st(_st(start)._at_("ch")).__plus(_st(aString)._size())).__plus((2));
  798. $ctx1.sendIdx["+"]=1;
  799. _st($11)._at_put_("ch",$12);
  800. $13=self["@editor"];
  801. $15=_st(_st(_st(self["@editor"])._getSelection()).__comma(" ")).__comma(aString);
  802. $ctx1.sendIdx[","]=2;
  803. $14=_st($15).__comma(" ");
  804. $ctx1.sendIdx[","]=1;
  805. _st($13)._replaceSelection_($14);
  806. _st(self["@editor"])._setCursor_(_st(self["@editor"])._getCursor_(true));
  807. _st(self["@editor"])._setSelection_end_(stop,start);
  808. return self}, function($ctx1) {$ctx1.fill(self,"print:",{aString:aString,start:start,stop:stop,currentLine:currentLine},smalltalk.SourceArea)})},
  809. args: ["aString"],
  810. source: "print: aString\x0a\x09| start stop currentLine |\x0a\x09currentLine := (editor getCursor: false) line.\x0a\x09start := HashedCollection new.\x0a\x09start at: 'line' put: currentLine.\x0a\x09start at: 'ch' put: (editor getCursor: false) ch.\x0a\x09(editor getSelection) ifEmpty: [\x0a\x09\x09\x22select current line if selection is empty\x22\x0a\x09\x09start at: 'ch' put: (editor getLine: currentLine) size.\x0a\x09\x09editor setSelection: #{'line' -> currentLine. 'ch' -> 0} end: start.\x0a\x09].\x0a\x09stop := HashedCollection new.\x0a\x09stop at: 'line' put: currentLine.\x0a\x09stop at: 'ch' put: ((start at: 'ch') + aString size + 2).\x0a\x0a\x09editor replaceSelection: (editor getSelection, ' ', aString, ' ').\x0a\x09editor setCursor: (editor getCursor: true).\x0a\x09editor setSelection: stop end: start",
  811. messageSends: ["line", "getCursor:", "new", "at:put:", "ch", "ifEmpty:", "getSelection", "size", "getLine:", "setSelection:end:", "->", "+", "at:", "replaceSelection:", ",", "setCursor:"],
  812. referencedClasses: ["HashedCollection"]
  813. }),
  814. smalltalk.SourceArea);
  815. smalltalk.addMethod(
  816. smalltalk.method({
  817. selector: "printIt",
  818. protocol: 'actions',
  819. fn: function (){
  820. var self=this;
  821. return smalltalk.withContext(function($ctx1) {
  822. self._print_(_st(self._doIt())._printString());
  823. self._focus();
  824. return self}, function($ctx1) {$ctx1.fill(self,"printIt",{},smalltalk.SourceArea)})},
  825. args: [],
  826. source: "printIt\x0a\x09self print: self doIt printString.\x0a\x09self focus.",
  827. messageSends: ["print:", "printString", "doIt", "focus"],
  828. referencedClasses: []
  829. }),
  830. smalltalk.SourceArea);
  831. smalltalk.addMethod(
  832. smalltalk.method({
  833. selector: "receiver",
  834. protocol: 'accessing',
  835. fn: function (){
  836. var self=this;
  837. function $DoIt(){return smalltalk.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
  838. return smalltalk.withContext(function($ctx1) {
  839. var $2,$1;
  840. $2=self["@receiver"];
  841. if(($receiver = $2) == nil || $receiver == null){
  842. $1=_st($DoIt())._new();
  843. } else {
  844. $1=$2;
  845. };
  846. return $1;
  847. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.SourceArea)})},
  848. args: [],
  849. source: "receiver\x0a\x09^ receiver ifNil: [ DoIt new ]",
  850. messageSends: ["ifNil:", "new"],
  851. referencedClasses: ["DoIt"]
  852. }),
  853. smalltalk.SourceArea);
  854. smalltalk.addMethod(
  855. smalltalk.method({
  856. selector: "receiver:",
  857. protocol: 'accessing',
  858. fn: function (anObject){
  859. var self=this;
  860. return smalltalk.withContext(function($ctx1) {
  861. self["@receiver"]=anObject;
  862. return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject},smalltalk.SourceArea)})},
  863. args: ["anObject"],
  864. source: "receiver: anObject\x0a\x09receiver := anObject",
  865. messageSends: [],
  866. referencedClasses: []
  867. }),
  868. smalltalk.SourceArea);
  869. smalltalk.addMethod(
  870. smalltalk.method({
  871. selector: "renderOn:",
  872. protocol: 'rendering',
  873. fn: function (html){
  874. var self=this;
  875. var textarea;
  876. return smalltalk.withContext(function($ctx1) {
  877. self["@div"]=_st(_st(html)._div())._class_("source");
  878. _st(self["@div"])._with_((function(){
  879. return smalltalk.withContext(function($ctx2) {
  880. textarea=_st(html)._textarea();
  881. return textarea;
  882. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  883. self._setEditorOn_(_st(textarea)._element());
  884. _st(self["@div"])._onKeyDown_((function(e){
  885. return smalltalk.withContext(function($ctx2) {
  886. return self._handleKeyDown_(e);
  887. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,2)})}));
  888. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,textarea:textarea},smalltalk.SourceArea)})},
  889. args: ["html"],
  890. source: "renderOn: html\x0a\x09| textarea |\x0a\x09div := html div class: 'source'.\x0a\x09div with: [ textarea := html textarea ].\x0a\x09self setEditorOn: textarea element.\x0a\x09div onKeyDown: [ :e | self handleKeyDown: e ]",
  891. messageSends: ["class:", "div", "with:", "textarea", "setEditorOn:", "element", "onKeyDown:", "handleKeyDown:"],
  892. referencedClasses: []
  893. }),
  894. smalltalk.SourceArea);
  895. smalltalk.addMethod(
  896. smalltalk.method({
  897. selector: "selection",
  898. protocol: 'accessing',
  899. fn: function (){
  900. var self=this;
  901. return smalltalk.withContext(function($ctx1) {
  902. var $1;
  903. $1=_st(self["@editor"])._getSelection();
  904. return $1;
  905. }, function($ctx1) {$ctx1.fill(self,"selection",{},smalltalk.SourceArea)})},
  906. args: [],
  907. source: "selection\x0a\x09^ editor getSelection",
  908. messageSends: ["getSelection"],
  909. referencedClasses: []
  910. }),
  911. smalltalk.SourceArea);
  912. smalltalk.addMethod(
  913. smalltalk.method({
  914. selector: "setEditorOn:",
  915. protocol: 'accessing',
  916. fn: function (aTextarea){
  917. var self=this;
  918. return smalltalk.withContext(function($ctx1) {
  919. self['@editor'] = CodeMirror.fromTextArea(aTextarea, {
  920. theme: 'amber',
  921. lineNumbers: true,
  922. enterMode: 'flat',
  923. indentWithTabs: true,
  924. indentUnit: 4,
  925. matchBrackets: true,
  926. electricChars: false
  927. });
  928. return self}, function($ctx1) {$ctx1.fill(self,"setEditorOn:",{aTextarea:aTextarea},smalltalk.SourceArea)})},
  929. args: ["aTextarea"],
  930. source: "setEditorOn: aTextarea\x0a\x09<self['@editor'] = CodeMirror.fromTextArea(aTextarea, {\x0a\x09\x09theme: 'amber',\x0a\x09\x09\x09\x09lineNumbers: true,\x0a\x09\x09\x09\x09enterMode: 'flat',\x0a\x09\x09\x09\x09indentWithTabs: true,\x0a\x09\x09\x09\x09indentUnit: 4,\x0a\x09\x09\x09\x09matchBrackets: true,\x0a\x09\x09\x09\x09electricChars: false\x0a\x09})>",
  931. messageSends: [],
  932. referencedClasses: []
  933. }),
  934. smalltalk.SourceArea);
  935. smalltalk.addMethod(
  936. smalltalk.method({
  937. selector: "val",
  938. protocol: 'accessing',
  939. fn: function (){
  940. var self=this;
  941. return smalltalk.withContext(function($ctx1) {
  942. var $1;
  943. $1=_st(self["@editor"])._getValue();
  944. return $1;
  945. }, function($ctx1) {$ctx1.fill(self,"val",{},smalltalk.SourceArea)})},
  946. args: [],
  947. source: "val\x0a\x09^ editor getValue",
  948. messageSends: ["getValue"],
  949. referencedClasses: []
  950. }),
  951. smalltalk.SourceArea);
  952. smalltalk.addMethod(
  953. smalltalk.method({
  954. selector: "val:",
  955. protocol: 'accessing',
  956. fn: function (aString){
  957. var self=this;
  958. return smalltalk.withContext(function($ctx1) {
  959. _st(self["@editor"])._setValue_(aString);
  960. return self}, function($ctx1) {$ctx1.fill(self,"val:",{aString:aString},smalltalk.SourceArea)})},
  961. args: ["aString"],
  962. source: "val: aString\x0a\x09editor setValue: aString",
  963. messageSends: ["setValue:"],
  964. referencedClasses: []
  965. }),
  966. smalltalk.SourceArea);
  967. smalltalk.addMethod(
  968. smalltalk.method({
  969. selector: "initialize",
  970. protocol: 'initialization',
  971. fn: function (){
  972. var self=this;
  973. return smalltalk.withContext(function($ctx1) {
  974. smalltalk.SourceArea.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
  975. self._setupCodeMirror();
  976. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.SourceArea.klass)})},
  977. args: [],
  978. source: "initialize\x0a\x09super initialize.\x0a\x09self setupCodeMirror",
  979. messageSends: ["initialize", "setupCodeMirror"],
  980. referencedClasses: []
  981. }),
  982. smalltalk.SourceArea.klass);
  983. smalltalk.addMethod(
  984. smalltalk.method({
  985. selector: "setupCodeMirror",
  986. protocol: 'initialization',
  987. fn: function (){
  988. var self=this;
  989. return smalltalk.withContext(function($ctx1) {
  990. CodeMirror.keyMap["default"].fallthrough = ["basic"] ;
  991. return self}, function($ctx1) {$ctx1.fill(self,"setupCodeMirror",{},smalltalk.SourceArea.klass)})},
  992. args: [],
  993. source: "setupCodeMirror\x0a\x09< CodeMirror.keyMap[\x22default\x22].fallthrough = [\x22basic\x22] >",
  994. messageSends: [],
  995. referencedClasses: []
  996. }),
  997. smalltalk.SourceArea.klass);
  998. smalltalk.addClass('TabManager', smalltalk.Widget, ['selectedTab', 'tabs', 'opened', 'ul', 'input'], 'IDE');
  999. smalltalk.addMethod(
  1000. smalltalk.method({
  1001. selector: "addTab:",
  1002. protocol: 'adding/Removing',
  1003. fn: function (aWidget){
  1004. var self=this;
  1005. return smalltalk.withContext(function($ctx1) {
  1006. _st(self._tabs())._add_(aWidget);
  1007. _st(aWidget)._appendToJQuery_("#amber"._asJQuery());
  1008. _st(aWidget)._hide();
  1009. return self}, function($ctx1) {$ctx1.fill(self,"addTab:",{aWidget:aWidget},smalltalk.TabManager)})},
  1010. args: ["aWidget"],
  1011. source: "addTab: aWidget\x0a\x09self tabs add: aWidget.\x0a\x09aWidget appendToJQuery: '#amber' asJQuery.\x0a\x09aWidget hide",
  1012. messageSends: ["add:", "tabs", "appendToJQuery:", "asJQuery", "hide"],
  1013. referencedClasses: []
  1014. }),
  1015. smalltalk.TabManager);
  1016. smalltalk.addMethod(
  1017. smalltalk.method({
  1018. selector: "close",
  1019. protocol: 'actions',
  1020. fn: function (){
  1021. var self=this;
  1022. return smalltalk.withContext(function($ctx1) {
  1023. var $1,$2,$3;
  1024. $1=self["@opened"];
  1025. if(smalltalk.assert($1)){
  1026. $2="#amber"._asJQuery();
  1027. $ctx1.sendIdx["asJQuery"]=1;
  1028. _st($2)._hide();
  1029. $ctx1.sendIdx["hide"]=1;
  1030. $3=_st(self["@ul"])._asJQuery();
  1031. $ctx1.sendIdx["asJQuery"]=2;
  1032. _st($3)._hide();
  1033. $ctx1.sendIdx["hide"]=2;
  1034. _st(self["@selectedTab"])._hide();
  1035. self._removeBodyMargin();
  1036. _st("body"._asJQuery())._removeClass_("amberBody");
  1037. self["@opened"]=false;
  1038. self["@opened"];
  1039. };
  1040. return self}, function($ctx1) {$ctx1.fill(self,"close",{},smalltalk.TabManager)})},
  1041. args: [],
  1042. source: "close\x0a\x09opened ifTrue: [\x0a\x09'#amber' asJQuery hide.\x0a\x09ul asJQuery hide.\x0a\x09selectedTab hide.\x0a\x09self removeBodyMargin.\x0a\x09'body' asJQuery removeClass: 'amberBody'.\x0a\x09opened := false ]",
  1043. messageSends: ["ifTrue:", "hide", "asJQuery", "removeBodyMargin", "removeClass:"],
  1044. referencedClasses: []
  1045. }),
  1046. smalltalk.TabManager);
  1047. smalltalk.addMethod(
  1048. smalltalk.method({
  1049. selector: "closeTab:",
  1050. protocol: 'actions',
  1051. fn: function (aWidget){
  1052. var self=this;
  1053. return smalltalk.withContext(function($ctx1) {
  1054. self._removeTab_(aWidget);
  1055. self._selectTab_(_st(self._tabs())._last());
  1056. _st(aWidget)._remove();
  1057. self._update();
  1058. return self}, function($ctx1) {$ctx1.fill(self,"closeTab:",{aWidget:aWidget},smalltalk.TabManager)})},
  1059. args: ["aWidget"],
  1060. source: "closeTab: aWidget\x0a\x09self removeTab: aWidget.\x0a\x09self selectTab: self tabs last.\x0a\x09aWidget remove.\x0a\x09self update",
  1061. messageSends: ["removeTab:", "selectTab:", "last", "tabs", "remove", "update"],
  1062. referencedClasses: []
  1063. }),
  1064. smalltalk.TabManager);
  1065. smalltalk.addMethod(
  1066. smalltalk.method({
  1067. selector: "initialize",
  1068. protocol: 'initialization',
  1069. fn: function (){
  1070. var self=this;
  1071. function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
  1072. function $Inspector(){return smalltalk.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
  1073. function $IDETranscript(){return smalltalk.IDETranscript||(typeof IDETranscript=="undefined"?nil:IDETranscript)}
  1074. function $Workspace(){return smalltalk.Workspace||(typeof Workspace=="undefined"?nil:Workspace)}
  1075. function $TestRunner(){return smalltalk.TestRunner||(typeof TestRunner=="undefined"?nil:TestRunner)}
  1076. return smalltalk.withContext(function($ctx1) {
  1077. var $1,$2,$3,$4,$5,$6,$7;
  1078. smalltalk.TabManager.superclass.fn.prototype._initialize.apply(_st(self), []);
  1079. _st($InspectorHandler())._register_($Inspector());
  1080. self["@opened"]=true;
  1081. $1=(function(html){
  1082. return smalltalk.withContext(function($ctx2) {
  1083. return _st(_st(html)._div())._id_("amber");
  1084. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})});
  1085. $2="body"._asJQuery();
  1086. $ctx1.sendIdx["asJQuery"]=1;
  1087. _st($1)._appendToJQuery_($2);
  1088. $ctx1.sendIdx["appendToJQuery:"]=1;
  1089. $3="body"._asJQuery();
  1090. $ctx1.sendIdx["asJQuery"]=2;
  1091. _st($3)._addClass_("amberBody");
  1092. self._appendToJQuery_("#amber"._asJQuery());
  1093. self._addTab_(_st($IDETranscript())._current());
  1094. $ctx1.sendIdx["addTab:"]=1;
  1095. $4=_st($Workspace())._new();
  1096. $ctx1.sendIdx["new"]=1;
  1097. self._addTab_($4);
  1098. $ctx1.sendIdx["addTab:"]=2;
  1099. $5=self._addTab_(_st($TestRunner())._new());
  1100. self._selectTab_(_st(self._tabs())._last());
  1101. self._onResize_((function(){
  1102. return smalltalk.withContext(function($ctx2) {
  1103. self._updateBodyMargin();
  1104. $6=self._updatePosition();
  1105. $ctx2.sendIdx["updatePosition"]=1;
  1106. return $6;
  1107. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  1108. $7=self._onWindowResize_((function(){
  1109. return smalltalk.withContext(function($ctx2) {
  1110. return self._updatePosition();
  1111. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  1112. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.TabManager)})},
  1113. args: [],
  1114. source: "initialize\x0a\x09super initialize.\x0a\x09InspectorHandler register: Inspector.\x0a\x09opened := true.\x0a\x09[ :html | html div id: 'amber' ] appendToJQuery: 'body' asJQuery.\x0a\x09'body' asJQuery\x0a\x09addClass: 'amberBody'.\x0a\x09self appendToJQuery: '#amber' asJQuery.\x0a\x09self\x0a\x09addTab: IDETranscript current;\x0a\x09addTab: Workspace new;\x0a\x09addTab: TestRunner new.\x0a\x09self selectTab: self tabs last.\x0a\x09self\x0a\x09onResize: [ self updateBodyMargin; updatePosition ];\x0a\x09onWindowResize: [ self updatePosition ]",
  1115. messageSends: ["initialize", "register:", "appendToJQuery:", "id:", "div", "asJQuery", "addClass:", "addTab:", "current", "new", "selectTab:", "last", "tabs", "onResize:", "updateBodyMargin", "updatePosition", "onWindowResize:"],
  1116. referencedClasses: ["InspectorHandler", "Inspector", "IDETranscript", "Workspace", "TestRunner"]
  1117. }),
  1118. smalltalk.TabManager);
  1119. smalltalk.addMethod(
  1120. smalltalk.method({
  1121. selector: "labelFor:",
  1122. protocol: 'accessing',
  1123. fn: function (aWidget){
  1124. var self=this;
  1125. var label,maxSize;
  1126. return smalltalk.withContext(function($ctx1) {
  1127. var $1,$4,$3,$2,$5,$6;
  1128. maxSize=(15);
  1129. $1=_st(aWidget)._label();
  1130. $ctx1.sendIdx["label"]=1;
  1131. $4=_st(aWidget)._label();
  1132. $ctx1.sendIdx["label"]=2;
  1133. $3=_st($4)._size();
  1134. $ctx1.sendIdx["size"]=1;
  1135. $2=_st($3)._min_(maxSize);
  1136. label=_st($1)._copyFrom_to_((0),$2);
  1137. $5=_st(_st(_st(aWidget)._label())._size()).__gt(maxSize);
  1138. if(smalltalk.assert($5)){
  1139. label=_st(label).__comma("...");
  1140. label;
  1141. };
  1142. $6=label;
  1143. return $6;
  1144. }, function($ctx1) {$ctx1.fill(self,"labelFor:",{aWidget:aWidget,label:label,maxSize:maxSize},smalltalk.TabManager)})},
  1145. args: ["aWidget"],
  1146. 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",
  1147. messageSends: ["copyFrom:to:", "label", "min:", "size", "ifTrue:", ">", ","],
  1148. referencedClasses: []
  1149. }),
  1150. smalltalk.TabManager);
  1151. smalltalk.addMethod(
  1152. smalltalk.method({
  1153. selector: "newBrowserTab",
  1154. protocol: 'actions',
  1155. fn: function (){
  1156. var self=this;
  1157. function $Browser(){return smalltalk.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1158. return smalltalk.withContext(function($ctx1) {
  1159. _st($Browser())._open();
  1160. return self}, function($ctx1) {$ctx1.fill(self,"newBrowserTab",{},smalltalk.TabManager)})},
  1161. args: [],
  1162. source: "newBrowserTab\x0a\x09Browser open",
  1163. messageSends: ["open"],
  1164. referencedClasses: ["Browser"]
  1165. }),
  1166. smalltalk.TabManager);
  1167. smalltalk.addMethod(
  1168. smalltalk.method({
  1169. selector: "onResize:",
  1170. protocol: 'actions',
  1171. fn: function (aBlock){
  1172. var self=this;
  1173. return smalltalk.withContext(function($ctx1) {
  1174. var $1,$3,$4,$2;
  1175. $1="#amber"._asJQuery();
  1176. $3="handles".__minus_gt("n");
  1177. $ctx1.sendIdx["->"]=1;
  1178. $4="resize".__minus_gt(aBlock);
  1179. $ctx1.sendIdx["->"]=2;
  1180. $2=smalltalk.HashedCollection._from_([$3,$4,"minHeight".__minus_gt((230))]);
  1181. _st($1)._resizable_($2);
  1182. return self}, function($ctx1) {$ctx1.fill(self,"onResize:",{aBlock:aBlock},smalltalk.TabManager)})},
  1183. args: ["aBlock"],
  1184. source: "onResize: aBlock\x0a\x09'#amber' asJQuery resizable: #{\x0a\x09\x09'handles' -> 'n'.\x0a\x09\x09'resize' -> aBlock.\x0a\x09\x09'minHeight' -> 230\x0a\x09}",
  1185. messageSends: ["resizable:", "asJQuery", "->"],
  1186. referencedClasses: []
  1187. }),
  1188. smalltalk.TabManager);
  1189. smalltalk.addMethod(
  1190. smalltalk.method({
  1191. selector: "onWindowResize:",
  1192. protocol: 'actions',
  1193. fn: function (aBlock){
  1194. var self=this;
  1195. return smalltalk.withContext(function($ctx1) {
  1196. _st(_st(window)._asJQuery())._resize_(aBlock);
  1197. return self}, function($ctx1) {$ctx1.fill(self,"onWindowResize:",{aBlock:aBlock},smalltalk.TabManager)})},
  1198. args: ["aBlock"],
  1199. source: "onWindowResize: aBlock\x0a\x09window asJQuery resize: aBlock",
  1200. messageSends: ["resize:", "asJQuery"],
  1201. referencedClasses: []
  1202. }),
  1203. smalltalk.TabManager);
  1204. smalltalk.addMethod(
  1205. smalltalk.method({
  1206. selector: "open",
  1207. protocol: 'actions',
  1208. fn: function (){
  1209. var self=this;
  1210. return smalltalk.withContext(function($ctx1) {
  1211. var $1,$2,$3;
  1212. $1=self["@opened"];
  1213. if(! smalltalk.assert($1)){
  1214. $2="body"._asJQuery();
  1215. $ctx1.sendIdx["asJQuery"]=1;
  1216. _st($2)._addClass_("amberBody");
  1217. $3="#amber"._asJQuery();
  1218. $ctx1.sendIdx["asJQuery"]=2;
  1219. _st($3)._show();
  1220. $ctx1.sendIdx["show"]=1;
  1221. _st(_st(self["@ul"])._asJQuery())._show();
  1222. $ctx1.sendIdx["show"]=2;
  1223. self._updateBodyMargin();
  1224. _st(self["@selectedTab"])._show();
  1225. self["@opened"]=true;
  1226. self["@opened"];
  1227. };
  1228. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.TabManager)})},
  1229. args: [],
  1230. source: "open\x0a\x09opened ifFalse: [\x0a\x09'body' asJQuery addClass: 'amberBody'.\x0a\x09'#amber' asJQuery show.\x0a\x09ul asJQuery show.\x0a\x09self updateBodyMargin.\x0a\x09selectedTab show.\x0a\x09opened := true ]",
  1231. messageSends: ["ifFalse:", "addClass:", "asJQuery", "show", "updateBodyMargin"],
  1232. referencedClasses: []
  1233. }),
  1234. smalltalk.TabManager);
  1235. smalltalk.addMethod(
  1236. smalltalk.method({
  1237. selector: "removeBodyMargin",
  1238. protocol: 'actions',
  1239. fn: function (){
  1240. var self=this;
  1241. return smalltalk.withContext(function($ctx1) {
  1242. self._setBodyMargin_((0));
  1243. return self}, function($ctx1) {$ctx1.fill(self,"removeBodyMargin",{},smalltalk.TabManager)})},
  1244. args: [],
  1245. source: "removeBodyMargin\x0a\x09self setBodyMargin: 0",
  1246. messageSends: ["setBodyMargin:"],
  1247. referencedClasses: []
  1248. }),
  1249. smalltalk.TabManager);
  1250. smalltalk.addMethod(
  1251. smalltalk.method({
  1252. selector: "removeTab:",
  1253. protocol: 'adding/Removing',
  1254. fn: function (aWidget){
  1255. var self=this;
  1256. return smalltalk.withContext(function($ctx1) {
  1257. _st(self._tabs())._remove_(aWidget);
  1258. self._update();
  1259. return self}, function($ctx1) {$ctx1.fill(self,"removeTab:",{aWidget:aWidget},smalltalk.TabManager)})},
  1260. args: ["aWidget"],
  1261. source: "removeTab: aWidget\x0a\x09self tabs remove: aWidget.\x0a\x09self update",
  1262. messageSends: ["remove:", "tabs", "update"],
  1263. referencedClasses: []
  1264. }),
  1265. smalltalk.TabManager);
  1266. smalltalk.addMethod(
  1267. smalltalk.method({
  1268. selector: "renderOn:",
  1269. protocol: 'rendering',
  1270. fn: function (html){
  1271. var self=this;
  1272. return smalltalk.withContext(function($ctx1) {
  1273. var $1,$2;
  1274. _st(_st(html)._div())._id_("logo");
  1275. $ctx1.sendIdx["id:"]=1;
  1276. self._renderToolbarOn_(html);
  1277. $1=_st(html)._ul();
  1278. _st($1)._id_("amberTabs");
  1279. $2=_st($1)._yourself();
  1280. self["@ul"]=$2;
  1281. self._renderTabs();
  1282. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.TabManager)})},
  1283. args: ["html"],
  1284. 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",
  1285. messageSends: ["id:", "div", "renderToolbarOn:", "ul", "yourself", "renderTabs"],
  1286. referencedClasses: []
  1287. }),
  1288. smalltalk.TabManager);
  1289. smalltalk.addMethod(
  1290. smalltalk.method({
  1291. selector: "renderTabFor:on:",
  1292. protocol: 'rendering',
  1293. fn: function (aWidget,html){
  1294. var self=this;
  1295. var li;
  1296. return smalltalk.withContext(function($ctx1) {
  1297. var $1,$2,$3,$4,$6,$7,$8,$9,$5,$10;
  1298. li=_st(html)._li();
  1299. $1=_st(self["@selectedTab"]).__eq(aWidget);
  1300. if(smalltalk.assert($1)){
  1301. _st(li)._class_("selected");
  1302. $ctx1.sendIdx["class:"]=1;
  1303. };
  1304. $2=li;
  1305. _st($2)._with_((function(){
  1306. return smalltalk.withContext(function($ctx2) {
  1307. $3=_st(html)._span();
  1308. $ctx2.sendIdx["span"]=1;
  1309. _st($3)._class_("ltab");
  1310. $ctx2.sendIdx["class:"]=2;
  1311. $4=_st(html)._span();
  1312. $ctx2.sendIdx["span"]=2;
  1313. _st($4)._class_("mtab");
  1314. $ctx2.sendIdx["class:"]=3;
  1315. $5=_st($4)._with_((function(){
  1316. return smalltalk.withContext(function($ctx3) {
  1317. $6=_st(aWidget)._canBeClosed();
  1318. if(smalltalk.assert($6)){
  1319. $7=_st(html)._span();
  1320. $ctx3.sendIdx["span"]=3;
  1321. _st($7)._class_("close");
  1322. $ctx3.sendIdx["class:"]=4;
  1323. _st($7)._with_("x");
  1324. $ctx3.sendIdx["with:"]=3;
  1325. $8=_st($7)._onClick_((function(){
  1326. return smalltalk.withContext(function($ctx4) {
  1327. return self._closeTab_(aWidget);
  1328. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  1329. $ctx3.sendIdx["onClick:"]=1;
  1330. $8;
  1331. };
  1332. $9=_st(html)._span();
  1333. $ctx3.sendIdx["span"]=4;
  1334. return _st($9)._with_(self._labelFor_(aWidget));
  1335. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1336. $ctx2.sendIdx["with:"]=2;
  1337. $5;
  1338. return _st(_st(html)._span())._class_("rtab");
  1339. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  1340. $ctx1.sendIdx["with:"]=1;
  1341. $10=_st($2)._onClick_((function(){
  1342. return smalltalk.withContext(function($ctx2) {
  1343. return self._selectTab_(aWidget);
  1344. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)})}));
  1345. return self}, function($ctx1) {$ctx1.fill(self,"renderTabFor:on:",{aWidget:aWidget,html:html,li:li},smalltalk.TabManager)})},
  1346. args: ["aWidget", "html"],
  1347. 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 ]",
  1348. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "span", "canBeClosed", "onClick:", "closeTab:", "labelFor:", "selectTab:"],
  1349. referencedClasses: []
  1350. }),
  1351. smalltalk.TabManager);
  1352. smalltalk.addMethod(
  1353. smalltalk.method({
  1354. selector: "renderTabs",
  1355. protocol: 'rendering',
  1356. fn: function (){
  1357. var self=this;
  1358. return smalltalk.withContext(function($ctx1) {
  1359. var $1,$2,$3,$4,$5;
  1360. _st(self["@ul"])._contents_((function(html){
  1361. return smalltalk.withContext(function($ctx2) {
  1362. _st(self._tabs())._do_((function(each){
  1363. return smalltalk.withContext(function($ctx3) {
  1364. return self._renderTabFor_on_(each,html);
  1365. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  1366. $1=_st(html)._li();
  1367. _st($1)._class_("newtab");
  1368. $ctx2.sendIdx["class:"]=1;
  1369. _st($1)._with_((function(){
  1370. return smalltalk.withContext(function($ctx3) {
  1371. $2=_st(html)._span();
  1372. $ctx3.sendIdx["span"]=1;
  1373. _st($2)._class_("ltab");
  1374. $ctx3.sendIdx["class:"]=2;
  1375. $3=_st(html)._span();
  1376. $ctx3.sendIdx["span"]=2;
  1377. _st($3)._class_("mtab");
  1378. $ctx3.sendIdx["class:"]=3;
  1379. $4=_st($3)._with_(" + ");
  1380. $4;
  1381. return _st(_st(html)._span())._class_("rtab");
  1382. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1383. $ctx2.sendIdx["with:"]=1;
  1384. $5=_st($1)._onClick_((function(){
  1385. return smalltalk.withContext(function($ctx3) {
  1386. return self._newBrowserTab();
  1387. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  1388. return $5;
  1389. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  1390. return self}, function($ctx1) {$ctx1.fill(self,"renderTabs",{},smalltalk.TabManager)})},
  1391. args: [],
  1392. source: "renderTabs\x0a\x09ul contents: [ :html |\x0a\x09\x09self tabs do: [ :each |\x0a\x09\x09self renderTabFor: each on: html ].\x0a\x09\x09html li\x0a\x09\x09class: 'newtab';\x0a\x09\x09with: [\x0a\x09\x09\x09html span class: 'ltab'.\x0a\x09\x09\x09html span class: 'mtab'; with: ' + '.\x0a\x09\x09\x09html span class: 'rtab' ];\x0a\x09\x09onClick: [ self newBrowserTab ]]",
  1393. messageSends: ["contents:", "do:", "tabs", "renderTabFor:on:", "class:", "li", "with:", "span", "onClick:", "newBrowserTab"],
  1394. referencedClasses: []
  1395. }),
  1396. smalltalk.TabManager);
  1397. smalltalk.addMethod(
  1398. smalltalk.method({
  1399. selector: "renderToolbarOn:",
  1400. protocol: 'rendering',
  1401. fn: function (html){
  1402. var self=this;
  1403. return smalltalk.withContext(function($ctx1) {
  1404. var $1,$3,$4,$5,$6,$7,$2;
  1405. $1=_st(html)._div();
  1406. $ctx1.sendIdx["div"]=1;
  1407. _st($1)._id_("amber_toolbar");
  1408. $ctx1.sendIdx["id:"]=1;
  1409. $2=_st($1)._with_((function(){
  1410. return smalltalk.withContext(function($ctx2) {
  1411. $3=_st(html)._input();
  1412. _st($3)._class_("implementors");
  1413. $4=_st($3)._yourself();
  1414. self["@input"]=$4;
  1415. self["@input"];
  1416. _st(self["@input"])._onKeyPress_((function(event){
  1417. return smalltalk.withContext(function($ctx3) {
  1418. $5=_st(_st(event)._keyCode()).__eq((13));
  1419. if(smalltalk.assert($5)){
  1420. return self._search_(_st(_st(self["@input"])._asJQuery())._val());
  1421. };
  1422. }, function($ctx3) {$ctx3.fillBlock({event:event},$ctx2,2)})}));
  1423. $6=_st(html)._div();
  1424. _st($6)._id_("amber_close");
  1425. $7=_st($6)._onClick_((function(){
  1426. return smalltalk.withContext(function($ctx3) {
  1427. return self._close();
  1428. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  1429. return $7;
  1430. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1431. return self}, function($ctx1) {$ctx1.fill(self,"renderToolbarOn:",{html:html},smalltalk.TabManager)})},
  1432. args: ["html"],
  1433. 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 ]]",
  1434. messageSends: ["id:", "div", "with:", "class:", "input", "yourself", "onKeyPress:", "ifTrue:", "=", "keyCode", "search:", "val", "asJQuery", "onClick:", "close"],
  1435. referencedClasses: []
  1436. }),
  1437. smalltalk.TabManager);
  1438. smalltalk.addMethod(
  1439. smalltalk.method({
  1440. selector: "search:",
  1441. protocol: 'actions',
  1442. fn: function (aString){
  1443. var self=this;
  1444. var searchedClass;
  1445. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1446. function $Browser(){return smalltalk.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1447. function $ReferencesBrowser(){return smalltalk.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  1448. return smalltalk.withContext(function($ctx1) {
  1449. var $1;
  1450. searchedClass=_st(_st($Smalltalk())._current())._at_(aString);
  1451. $1=_st(searchedClass)._isClass();
  1452. if(smalltalk.assert($1)){
  1453. _st($Browser())._openOn_(searchedClass);
  1454. } else {
  1455. _st($ReferencesBrowser())._search_(aString);
  1456. };
  1457. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString,searchedClass:searchedClass},smalltalk.TabManager)})},
  1458. args: ["aString"],
  1459. 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 ]",
  1460. messageSends: ["at:", "current", "ifTrue:ifFalse:", "isClass", "openOn:", "search:"],
  1461. referencedClasses: ["Smalltalk", "Browser", "ReferencesBrowser"]
  1462. }),
  1463. smalltalk.TabManager);
  1464. smalltalk.addMethod(
  1465. smalltalk.method({
  1466. selector: "selectTab:",
  1467. protocol: 'actions',
  1468. fn: function (aWidget){
  1469. var self=this;
  1470. return smalltalk.withContext(function($ctx1) {
  1471. self._open();
  1472. self["@selectedTab"]=aWidget;
  1473. _st(self._tabs())._do_((function(each){
  1474. return smalltalk.withContext(function($ctx2) {
  1475. return _st(each)._hide();
  1476. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  1477. _st(aWidget)._show();
  1478. self._update();
  1479. return self}, function($ctx1) {$ctx1.fill(self,"selectTab:",{aWidget:aWidget},smalltalk.TabManager)})},
  1480. args: ["aWidget"],
  1481. source: "selectTab: aWidget\x0a\x09self open.\x0a\x09selectedTab := aWidget.\x0a\x09self tabs do: [ :each |\x0a\x09each hide ].\x0a\x09aWidget show.\x0a\x09\x0a\x09self update",
  1482. messageSends: ["open", "do:", "tabs", "hide", "show", "update"],
  1483. referencedClasses: []
  1484. }),
  1485. smalltalk.TabManager);
  1486. smalltalk.addMethod(
  1487. smalltalk.method({
  1488. selector: "setBodyMargin:",
  1489. protocol: 'actions',
  1490. fn: function (anInteger){
  1491. var self=this;
  1492. return smalltalk.withContext(function($ctx1) {
  1493. _st(".amberBody"._asJQuery())._css_put_("margin-bottom",_st(_st(anInteger)._asString()).__comma("px"));
  1494. return self}, function($ctx1) {$ctx1.fill(self,"setBodyMargin:",{anInteger:anInteger},smalltalk.TabManager)})},
  1495. args: ["anInteger"],
  1496. source: "setBodyMargin: anInteger\x0a\x09'.amberBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'",
  1497. messageSends: ["css:put:", "asJQuery", ",", "asString"],
  1498. referencedClasses: []
  1499. }),
  1500. smalltalk.TabManager);
  1501. smalltalk.addMethod(
  1502. smalltalk.method({
  1503. selector: "tabs",
  1504. protocol: 'accessing',
  1505. fn: function (){
  1506. var self=this;
  1507. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  1508. return smalltalk.withContext(function($ctx1) {
  1509. var $2,$1;
  1510. $2=self["@tabs"];
  1511. if(($receiver = $2) == nil || $receiver == null){
  1512. self["@tabs"]=_st($Array())._new();
  1513. $1=self["@tabs"];
  1514. } else {
  1515. $1=$2;
  1516. };
  1517. return $1;
  1518. }, function($ctx1) {$ctx1.fill(self,"tabs",{},smalltalk.TabManager)})},
  1519. args: [],
  1520. source: "tabs\x0a\x09^ tabs ifNil: [ tabs := Array new ]",
  1521. messageSends: ["ifNil:", "new"],
  1522. referencedClasses: ["Array"]
  1523. }),
  1524. smalltalk.TabManager);
  1525. smalltalk.addMethod(
  1526. smalltalk.method({
  1527. selector: "update",
  1528. protocol: 'updating',
  1529. fn: function (){
  1530. var self=this;
  1531. return smalltalk.withContext(function($ctx1) {
  1532. self._renderTabs();
  1533. return self}, function($ctx1) {$ctx1.fill(self,"update",{},smalltalk.TabManager)})},
  1534. args: [],
  1535. source: "update\x0a\x09self renderTabs",
  1536. messageSends: ["renderTabs"],
  1537. referencedClasses: []
  1538. }),
  1539. smalltalk.TabManager);
  1540. smalltalk.addMethod(
  1541. smalltalk.method({
  1542. selector: "updateBodyMargin",
  1543. protocol: 'actions',
  1544. fn: function (){
  1545. var self=this;
  1546. return smalltalk.withContext(function($ctx1) {
  1547. self._setBodyMargin_(_st("#amber"._asJQuery())._height());
  1548. return self}, function($ctx1) {$ctx1.fill(self,"updateBodyMargin",{},smalltalk.TabManager)})},
  1549. args: [],
  1550. source: "updateBodyMargin\x0a\x09self setBodyMargin: '#amber' asJQuery height",
  1551. messageSends: ["setBodyMargin:", "height", "asJQuery"],
  1552. referencedClasses: []
  1553. }),
  1554. smalltalk.TabManager);
  1555. smalltalk.addMethod(
  1556. smalltalk.method({
  1557. selector: "updatePosition",
  1558. protocol: 'actions',
  1559. fn: function (){
  1560. var self=this;
  1561. return smalltalk.withContext(function($ctx1) {
  1562. var $1,$2;
  1563. $1="#amber"._asJQuery();
  1564. _st($1)._css_put_("top","");
  1565. $ctx1.sendIdx["css:put:"]=1;
  1566. $2=_st($1)._css_put_("bottom","0px");
  1567. return self}, function($ctx1) {$ctx1.fill(self,"updatePosition",{},smalltalk.TabManager)})},
  1568. args: [],
  1569. source: "updatePosition\x0a\x09'#amber' asJQuery\x0a\x09\x09css: 'top' put: '';\x0a\x09\x09css: 'bottom' put: '0px'",
  1570. messageSends: ["css:put:", "asJQuery"],
  1571. referencedClasses: []
  1572. }),
  1573. smalltalk.TabManager);
  1574. smalltalk.TabManager.klass.iVarNames = ['current'];
  1575. smalltalk.addMethod(
  1576. smalltalk.method({
  1577. selector: "current",
  1578. protocol: 'instance creation',
  1579. fn: function (){
  1580. var self=this;
  1581. return smalltalk.withContext(function($ctx1) {
  1582. var $2,$1;
  1583. $2=self["@current"];
  1584. if(($receiver = $2) == nil || $receiver == null){
  1585. self["@current"]=smalltalk.TabManager.klass.superclass.fn.prototype._new.apply(_st(self), []);
  1586. $1=self["@current"];
  1587. } else {
  1588. $1=$2;
  1589. };
  1590. return $1;
  1591. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.TabManager.klass)})},
  1592. args: [],
  1593. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  1594. messageSends: ["ifNil:", "new"],
  1595. referencedClasses: []
  1596. }),
  1597. smalltalk.TabManager.klass);
  1598. smalltalk.addMethod(
  1599. smalltalk.method({
  1600. selector: "new",
  1601. protocol: 'instance creation',
  1602. fn: function (){
  1603. var self=this;
  1604. return smalltalk.withContext(function($ctx1) {
  1605. self._shouldNotImplement();
  1606. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.TabManager.klass)})},
  1607. args: [],
  1608. source: "new\x0a\x09self shouldNotImplement",
  1609. messageSends: ["shouldNotImplement"],
  1610. referencedClasses: []
  1611. }),
  1612. smalltalk.TabManager.klass);
  1613. smalltalk.addMethod(
  1614. smalltalk.method({
  1615. selector: "toggleAmberIDE",
  1616. protocol: 'actions',
  1617. fn: function (){
  1618. var self=this;
  1619. function $Browser(){return smalltalk.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1620. function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1621. return smalltalk.withContext(function($ctx1) {
  1622. var $3,$2,$1,$4,$5;
  1623. $3="#amber"._asJQuery();
  1624. $ctx1.sendIdx["asJQuery"]=1;
  1625. $2=_st($3)._length();
  1626. $1=_st($2).__eq((0));
  1627. if(smalltalk.assert($1)){
  1628. _st($Browser())._open();
  1629. $ctx1.sendIdx["open"]=1;
  1630. } else {
  1631. $4=_st("#amber"._asJQuery())._is_(":visible");
  1632. if(smalltalk.assert($4)){
  1633. $5=_st($TabManager())._current();
  1634. $ctx1.sendIdx["current"]=1;
  1635. _st($5)._close();
  1636. } else {
  1637. _st(_st($TabManager())._current())._open();
  1638. };
  1639. };
  1640. return self}, function($ctx1) {$ctx1.fill(self,"toggleAmberIDE",{},smalltalk.TabManager.klass)})},
  1641. args: [],
  1642. source: "toggleAmberIDE\x0a\x09'#amber' asJQuery length = 0\x0a\x09\x09ifTrue: [ Browser open ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09('#amber' asJQuery is: ':visible')\x0a\x09\x09\x09\x09ifTrue: [ TabManager current close ]\x0a\x09\x09\x09\x09ifFalse: [ TabManager current open ] ]",
  1643. messageSends: ["ifTrue:ifFalse:", "=", "length", "asJQuery", "open", "is:", "close", "current"],
  1644. referencedClasses: ["Browser", "TabManager"]
  1645. }),
  1646. smalltalk.TabManager.klass);
  1647. smalltalk.addClass('TabWidget', smalltalk.Widget, ['div'], 'IDE');
  1648. smalltalk.addMethod(
  1649. smalltalk.method({
  1650. selector: "canBeClosed",
  1651. protocol: 'testing',
  1652. fn: function (){
  1653. var self=this;
  1654. return smalltalk.withContext(function($ctx1) {
  1655. return false;
  1656. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.TabWidget)})},
  1657. args: [],
  1658. source: "canBeClosed\x0a\x09^ false",
  1659. messageSends: [],
  1660. referencedClasses: []
  1661. }),
  1662. smalltalk.TabWidget);
  1663. smalltalk.addMethod(
  1664. smalltalk.method({
  1665. selector: "close",
  1666. protocol: 'actions',
  1667. fn: function (){
  1668. var self=this;
  1669. function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1670. return smalltalk.withContext(function($ctx1) {
  1671. _st(_st($TabManager())._current())._closeTab_(self);
  1672. return self}, function($ctx1) {$ctx1.fill(self,"close",{},smalltalk.TabWidget)})},
  1673. args: [],
  1674. source: "close\x0a\x09TabManager current closeTab: self",
  1675. messageSends: ["closeTab:", "current"],
  1676. referencedClasses: ["TabManager"]
  1677. }),
  1678. smalltalk.TabWidget);
  1679. smalltalk.addMethod(
  1680. smalltalk.method({
  1681. selector: "hide",
  1682. protocol: 'actions',
  1683. fn: function (){
  1684. var self=this;
  1685. return smalltalk.withContext(function($ctx1) {
  1686. _st(_st(self["@div"])._asJQuery())._hide();
  1687. return self}, function($ctx1) {$ctx1.fill(self,"hide",{},smalltalk.TabWidget)})},
  1688. args: [],
  1689. source: "hide\x0a\x09div asJQuery hide",
  1690. messageSends: ["hide", "asJQuery"],
  1691. referencedClasses: []
  1692. }),
  1693. smalltalk.TabWidget);
  1694. smalltalk.addMethod(
  1695. smalltalk.method({
  1696. selector: "label",
  1697. protocol: 'accessing',
  1698. fn: function (){
  1699. var self=this;
  1700. return smalltalk.withContext(function($ctx1) {
  1701. self._subclassResponsibility();
  1702. return self}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.TabWidget)})},
  1703. args: [],
  1704. source: "label\x0a\x09self subclassResponsibility",
  1705. messageSends: ["subclassResponsibility"],
  1706. referencedClasses: []
  1707. }),
  1708. smalltalk.TabWidget);
  1709. smalltalk.addMethod(
  1710. smalltalk.method({
  1711. selector: "open",
  1712. protocol: 'actions',
  1713. fn: function (){
  1714. var self=this;
  1715. function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1716. return smalltalk.withContext(function($ctx1) {
  1717. var $1;
  1718. $1=_st($TabManager())._current();
  1719. $ctx1.sendIdx["current"]=1;
  1720. _st($1)._addTab_(self);
  1721. _st(_st($TabManager())._current())._selectTab_(self);
  1722. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.TabWidget)})},
  1723. args: [],
  1724. source: "open\x0a\x09TabManager current addTab: self.\x0a\x09TabManager current selectTab: self",
  1725. messageSends: ["addTab:", "current", "selectTab:"],
  1726. referencedClasses: ["TabManager"]
  1727. }),
  1728. smalltalk.TabWidget);
  1729. smalltalk.addMethod(
  1730. smalltalk.method({
  1731. selector: "remove",
  1732. protocol: 'actions',
  1733. fn: function (){
  1734. var self=this;
  1735. return smalltalk.withContext(function($ctx1) {
  1736. _st(_st(self["@div"])._asJQuery())._remove();
  1737. return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.TabWidget)})},
  1738. args: [],
  1739. source: "remove\x0a\x09div asJQuery remove",
  1740. messageSends: ["remove", "asJQuery"],
  1741. referencedClasses: []
  1742. }),
  1743. smalltalk.TabWidget);
  1744. smalltalk.addMethod(
  1745. smalltalk.method({
  1746. selector: "renderBoxOn:",
  1747. protocol: 'rendering',
  1748. fn: function (html){
  1749. var self=this;
  1750. return smalltalk.withContext(function($ctx1) {
  1751. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.TabWidget)})},
  1752. args: ["html"],
  1753. source: "renderBoxOn: html",
  1754. messageSends: [],
  1755. referencedClasses: []
  1756. }),
  1757. smalltalk.TabWidget);
  1758. smalltalk.addMethod(
  1759. smalltalk.method({
  1760. selector: "renderButtonsOn:",
  1761. protocol: 'rendering',
  1762. fn: function (html){
  1763. var self=this;
  1764. return smalltalk.withContext(function($ctx1) {
  1765. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.TabWidget)})},
  1766. args: ["html"],
  1767. source: "renderButtonsOn: html",
  1768. messageSends: [],
  1769. referencedClasses: []
  1770. }),
  1771. smalltalk.TabWidget);
  1772. smalltalk.addMethod(
  1773. smalltalk.method({
  1774. selector: "renderOn:",
  1775. protocol: 'rendering',
  1776. fn: function (html){
  1777. var self=this;
  1778. return smalltalk.withContext(function($ctx1) {
  1779. var $1,$2;
  1780. $1=_st(html)._div();
  1781. _st($1)._class_("amberTool");
  1782. $2=_st($1)._yourself();
  1783. self["@div"]=$2;
  1784. self._renderTab();
  1785. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.TabWidget)})},
  1786. args: ["html"],
  1787. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'amberTool';\x0a\x09\x09yourself.\x0a\x09self renderTab",
  1788. messageSends: ["class:", "div", "yourself", "renderTab"],
  1789. referencedClasses: []
  1790. }),
  1791. smalltalk.TabWidget);
  1792. smalltalk.addMethod(
  1793. smalltalk.method({
  1794. selector: "renderTab",
  1795. protocol: 'rendering',
  1796. fn: function (){
  1797. var self=this;
  1798. return smalltalk.withContext(function($ctx1) {
  1799. var $1,$2,$3,$4;
  1800. _st(self["@div"])._contents_((function(html){
  1801. return smalltalk.withContext(function($ctx2) {
  1802. $1=_st(html)._div();
  1803. $ctx2.sendIdx["div"]=1;
  1804. _st($1)._class_("amber_box");
  1805. $ctx2.sendIdx["class:"]=1;
  1806. $2=_st($1)._with_((function(){
  1807. return smalltalk.withContext(function($ctx3) {
  1808. return self._renderBoxOn_(html);
  1809. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  1810. $ctx2.sendIdx["with:"]=1;
  1811. $2;
  1812. $3=_st(html)._div();
  1813. _st($3)._class_("amber_buttons");
  1814. $4=_st($3)._with_((function(){
  1815. return smalltalk.withContext(function($ctx3) {
  1816. return self._renderButtonsOn_(html);
  1817. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1818. return $4;
  1819. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  1820. return self}, function($ctx1) {$ctx1.fill(self,"renderTab",{},smalltalk.TabWidget)})},
  1821. args: [],
  1822. source: "renderTab\x0a\x09div contents: [ :html |\x0a\x09\x09html div\x0a\x09\x09class: 'amber_box';\x0a\x09\x09with: [ self renderBoxOn: html ].\x0a\x09\x09html div\x0a\x09\x09class: 'amber_buttons';\x0a\x09\x09with: [ self renderButtonsOn: html ]]",
  1823. messageSends: ["contents:", "class:", "div", "with:", "renderBoxOn:", "renderButtonsOn:"],
  1824. referencedClasses: []
  1825. }),
  1826. smalltalk.TabWidget);
  1827. smalltalk.addMethod(
  1828. smalltalk.method({
  1829. selector: "show",
  1830. protocol: 'actions',
  1831. fn: function (){
  1832. var self=this;
  1833. return smalltalk.withContext(function($ctx1) {
  1834. _st(_st(self["@div"])._asJQuery())._show();
  1835. return self}, function($ctx1) {$ctx1.fill(self,"show",{},smalltalk.TabWidget)})},
  1836. args: [],
  1837. source: "show\x0a\x09div asJQuery show",
  1838. messageSends: ["show", "asJQuery"],
  1839. referencedClasses: []
  1840. }),
  1841. smalltalk.TabWidget);
  1842. smalltalk.addMethod(
  1843. smalltalk.method({
  1844. selector: "update",
  1845. protocol: 'rendering',
  1846. fn: function (){
  1847. var self=this;
  1848. return smalltalk.withContext(function($ctx1) {
  1849. self._renderTab();
  1850. return self}, function($ctx1) {$ctx1.fill(self,"update",{},smalltalk.TabWidget)})},
  1851. args: [],
  1852. source: "update\x0a\x09self renderTab",
  1853. messageSends: ["renderTab"],
  1854. referencedClasses: []
  1855. }),
  1856. smalltalk.TabWidget);
  1857. smalltalk.addMethod(
  1858. smalltalk.method({
  1859. selector: "open",
  1860. protocol: 'instance creation',
  1861. fn: function (){
  1862. var self=this;
  1863. return smalltalk.withContext(function($ctx1) {
  1864. var $1;
  1865. $1=_st(self._new())._open();
  1866. return $1;
  1867. }, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.TabWidget.klass)})},
  1868. args: [],
  1869. source: "open\x0a\x09^ self new open",
  1870. messageSends: ["open", "new"],
  1871. referencedClasses: []
  1872. }),
  1873. smalltalk.TabWidget.klass);
  1874. smalltalk.addClass('Browser', smalltalk.TabWidget, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'packagesList', 'classesList', 'protocolsList', 'methodsList', 'sourceArea', 'tabsList', 'selectedTab', 'saveButton', 'classButtons', 'methodButtons', 'unsavedChanges'], 'IDE');
  1875. smalltalk.addMethod(
  1876. smalltalk.method({
  1877. selector: "addInstanceVariableNamed:toClass:",
  1878. protocol: 'actions',
  1879. fn: function (aString,aClass){
  1880. var self=this;
  1881. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1882. return smalltalk.withContext(function($ctx1) {
  1883. var $1,$2,$3,$4,$5;
  1884. $1=_st($ClassBuilder())._new();
  1885. $2=_st(aClass)._superclass();
  1886. $3=_st(aClass)._name();
  1887. $ctx1.sendIdx["name"]=1;
  1888. $4=_st(_st(aClass)._instanceVariableNames())._copy();
  1889. _st($4)._add_(aString);
  1890. $5=_st($4)._yourself();
  1891. _st($1)._addSubclassOf_named_instanceVariableNames_package_($2,$3,$5,_st(_st(aClass)._package())._name());
  1892. return self}, function($ctx1) {$ctx1.fill(self,"addInstanceVariableNamed:toClass:",{aString:aString,aClass:aClass},smalltalk.Browser)})},
  1893. args: ["aString", "aClass"],
  1894. 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",
  1895. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "new", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package"],
  1896. referencedClasses: ["ClassBuilder"]
  1897. }),
  1898. smalltalk.Browser);
  1899. smalltalk.addMethod(
  1900. smalltalk.method({
  1901. selector: "addNewClass",
  1902. protocol: 'actions',
  1903. fn: function (){
  1904. var self=this;
  1905. var className;
  1906. function $Object(){return smalltalk.Object||(typeof Object=="undefined"?nil:Object)}
  1907. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1908. return smalltalk.withContext(function($ctx1) {
  1909. var $1,$2;
  1910. className=self._prompt_("New class");
  1911. $1=_st(_st(className)._notNil())._and_((function(){
  1912. return smalltalk.withContext(function($ctx2) {
  1913. return _st(className)._notEmpty();
  1914. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1915. if(smalltalk.assert($1)){
  1916. _st($Object())._subclass_instanceVariableNames_package_(className,"",self._selectedPackage());
  1917. self._resetClassesList();
  1918. $2=self._updateClassesList();
  1919. $2;
  1920. self._selectClass_(_st(_st($Smalltalk())._current())._at_(className));
  1921. };
  1922. return self}, function($ctx1) {$ctx1.fill(self,"addNewClass",{className:className},smalltalk.Browser)})},
  1923. args: [],
  1924. source: "addNewClass\x0a\x09| className |\x0a\x09className := self prompt: 'New class'.\x0a\x09(className notNil and: [ className notEmpty ]) ifTrue: [\x0a\x09\x09Object subclass: className instanceVariableNames: '' package: self selectedPackage.\x0a\x09\x09\x09self\x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk current at: className) ]",
  1925. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "subclass:instanceVariableNames:package:", "selectedPackage", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current"],
  1926. referencedClasses: ["Object", "Smalltalk"]
  1927. }),
  1928. smalltalk.Browser);
  1929. smalltalk.addMethod(
  1930. smalltalk.method({
  1931. selector: "addNewProtocol",
  1932. protocol: 'actions',
  1933. fn: function (){
  1934. var self=this;
  1935. var newProtocol;
  1936. return smalltalk.withContext(function($ctx1) {
  1937. var $1;
  1938. newProtocol=self._prompt_("New method protocol");
  1939. $1=_st(_st(newProtocol)._notNil())._and_((function(){
  1940. return smalltalk.withContext(function($ctx2) {
  1941. return _st(newProtocol)._notEmpty();
  1942. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1943. if(smalltalk.assert($1)){
  1944. _st(self["@selectedMethod"])._protocol_(newProtocol);
  1945. self._setMethodProtocol_(newProtocol);
  1946. };
  1947. return self}, function($ctx1) {$ctx1.fill(self,"addNewProtocol",{newProtocol:newProtocol},smalltalk.Browser)})},
  1948. args: [],
  1949. source: "addNewProtocol\x0a\x09| newProtocol |\x0a\x09\x0a\x09newProtocol := self prompt: 'New method protocol'.\x0a\x09\x0a\x09(newProtocol notNil and: [ newProtocol notEmpty ]) ifTrue: [\x0a\x09\x09selectedMethod protocol: newProtocol.\x0a\x09\x09self setMethodProtocol: newProtocol ]",
  1950. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "protocol:", "setMethodProtocol:"],
  1951. referencedClasses: []
  1952. }),
  1953. smalltalk.Browser);
  1954. smalltalk.addMethod(
  1955. smalltalk.method({
  1956. selector: "canBeClosed",
  1957. protocol: 'testing',
  1958. fn: function (){
  1959. var self=this;
  1960. return smalltalk.withContext(function($ctx1) {
  1961. return true;
  1962. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.Browser)})},
  1963. args: [],
  1964. source: "canBeClosed\x0a\x09^ true",
  1965. messageSends: [],
  1966. referencedClasses: []
  1967. }),
  1968. smalltalk.Browser);
  1969. smalltalk.addMethod(
  1970. smalltalk.method({
  1971. selector: "cancelChanges",
  1972. protocol: 'actions',
  1973. fn: function (){
  1974. var self=this;
  1975. return smalltalk.withContext(function($ctx1) {
  1976. var $2,$1;
  1977. $2=self["@unsavedChanges"];
  1978. if(smalltalk.assert($2)){
  1979. $1=self._confirm_("Cancel changes?");
  1980. } else {
  1981. $1=true;
  1982. };
  1983. return $1;
  1984. }, function($ctx1) {$ctx1.fill(self,"cancelChanges",{},smalltalk.Browser)})},
  1985. args: [],
  1986. source: "cancelChanges\x0a\x09^ unsavedChanges\x0a\x09ifTrue: [ self confirm: 'Cancel changes?' ]\x0a\x09ifFalse: [ true ]",
  1987. messageSends: ["ifTrue:ifFalse:", "confirm:"],
  1988. referencedClasses: []
  1989. }),
  1990. smalltalk.Browser);
  1991. smalltalk.addMethod(
  1992. smalltalk.method({
  1993. selector: "classCommentSource",
  1994. protocol: 'accessing',
  1995. fn: function (){
  1996. var self=this;
  1997. return smalltalk.withContext(function($ctx1) {
  1998. var $1;
  1999. $1=_st(self["@selectedClass"])._comment();
  2000. return $1;
  2001. }, function($ctx1) {$ctx1.fill(self,"classCommentSource",{},smalltalk.Browser)})},
  2002. args: [],
  2003. source: "classCommentSource\x0a\x09^ selectedClass comment",
  2004. messageSends: ["comment"],
  2005. referencedClasses: []
  2006. }),
  2007. smalltalk.Browser);
  2008. smalltalk.addMethod(
  2009. smalltalk.method({
  2010. selector: "classDeclarationSource",
  2011. protocol: 'accessing',
  2012. fn: function (){
  2013. var self=this;
  2014. var stream;
  2015. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  2016. return smalltalk.withContext(function($ctx1) {
  2017. var $1,$2,$3,$4,$6,$7,$5,$8,$9,$10,$11,$12,$13;
  2018. stream=""._writeStream();
  2019. $1=self["@selectedClass"];
  2020. if(($receiver = $1) == nil || $receiver == null){
  2021. $2=self._classDeclarationTemplate();
  2022. return $2;
  2023. } else {
  2024. $1;
  2025. };
  2026. $3=stream;
  2027. _st($3)._nextPutAll_(_st(_st(self["@selectedClass"])._superclass())._asString());
  2028. $ctx1.sendIdx["nextPutAll:"]=1;
  2029. _st($3)._nextPutAll_(" subclass: #");
  2030. $ctx1.sendIdx["nextPutAll:"]=2;
  2031. _st($3)._nextPutAll_(_st(self["@selectedClass"])._name());
  2032. $ctx1.sendIdx["nextPutAll:"]=3;
  2033. $4=$3;
  2034. $6=_st($String())._lf();
  2035. $ctx1.sendIdx["lf"]=1;
  2036. $7=_st($String())._tab();
  2037. $ctx1.sendIdx["tab"]=1;
  2038. $5=_st($6).__comma($7);
  2039. $ctx1.sendIdx[","]=1;
  2040. _st($4)._nextPutAll_($5);
  2041. $ctx1.sendIdx["nextPutAll:"]=4;
  2042. $8=_st($3)._nextPutAll_("instanceVariableNames: '");
  2043. $ctx1.sendIdx["nextPutAll:"]=5;
  2044. _st(_st(self["@selectedClass"])._instanceVariableNames())._do_separatedBy_((function(each){
  2045. return smalltalk.withContext(function($ctx2) {
  2046. return _st(stream)._nextPutAll_(each);
  2047. $ctx2.sendIdx["nextPutAll:"]=6;
  2048. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
  2049. return smalltalk.withContext(function($ctx2) {
  2050. return _st(stream)._nextPutAll_(" ");
  2051. $ctx2.sendIdx["nextPutAll:"]=7;
  2052. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  2053. $9=stream;
  2054. $10=$9;
  2055. $11=_st("'".__comma(_st($String())._lf())).__comma(_st($String())._tab());
  2056. $ctx1.sendIdx[","]=2;
  2057. _st($10)._nextPutAll_($11);
  2058. $ctx1.sendIdx["nextPutAll:"]=8;
  2059. _st($9)._nextPutAll_("package: '");
  2060. $ctx1.sendIdx["nextPutAll:"]=9;
  2061. _st($9)._nextPutAll_(_st(self["@selectedClass"])._category());
  2062. $ctx1.sendIdx["nextPutAll:"]=10;
  2063. $12=_st($9)._nextPutAll_("'");
  2064. $13=_st(stream)._contents();
  2065. return $13;
  2066. }, function($ctx1) {$ctx1.fill(self,"classDeclarationSource",{stream:stream},smalltalk.Browser)})},
  2067. args: [],
  2068. source: "classDeclarationSource\x0a\x09| stream |\x0a\x09stream := '' writeStream.\x0a\x09selectedClass ifNil: [ ^ self classDeclarationTemplate ].\x0a\x09stream\x0a\x09\x09nextPutAll: selectedClass superclass asString;\x0a\x09\x09nextPutAll: ' subclass: #';\x0a\x09\x09nextPutAll: selectedClass name;\x0a\x09\x09nextPutAll: String lf, String tab;\x0a\x09\x09nextPutAll: 'instanceVariableNames: '''.\x0a\x09selectedClass instanceVariableNames\x0a\x09\x09do: [ :each | stream nextPutAll: each ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ' ' ].\x0a\x09stream\x0a\x09\x09nextPutAll: '''', String lf, String tab;\x0a\x09\x09nextPutAll: 'package: ''';\x0a\x09\x09nextPutAll: selectedClass category;\x0a\x09\x09nextPutAll: ''''.\x0a\x09^ stream contents",
  2069. messageSends: ["writeStream", "ifNil:", "classDeclarationTemplate", "nextPutAll:", "asString", "superclass", "name", ",", "lf", "tab", "do:separatedBy:", "instanceVariableNames", "category", "contents"],
  2070. referencedClasses: ["String"]
  2071. }),
  2072. smalltalk.Browser);
  2073. smalltalk.addMethod(
  2074. smalltalk.method({
  2075. selector: "classDeclarationTemplate",
  2076. protocol: 'accessing',
  2077. fn: function (){
  2078. var self=this;
  2079. return smalltalk.withContext(function($ctx1) {
  2080. var $1;
  2081. $1=_st("Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''\x0a\x09package: '".__comma(self._selectedPackage())).__comma("'");
  2082. $ctx1.sendIdx[","]=1;
  2083. return $1;
  2084. }, function($ctx1) {$ctx1.fill(self,"classDeclarationTemplate",{},smalltalk.Browser)})},
  2085. args: [],
  2086. source: "classDeclarationTemplate\x0a\x09^ 'Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''''\x0a\x09package: ''', self selectedPackage, ''''",
  2087. messageSends: [",", "selectedPackage"],
  2088. referencedClasses: []
  2089. }),
  2090. smalltalk.Browser);
  2091. smalltalk.addMethod(
  2092. smalltalk.method({
  2093. selector: "classes",
  2094. protocol: 'accessing',
  2095. fn: function (){
  2096. var self=this;
  2097. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2098. return smalltalk.withContext(function($ctx1) {
  2099. var $2,$1;
  2100. $1=_st(_st(_st(_st(_st($Smalltalk())._current())._classes())._select_((function(each){
  2101. return smalltalk.withContext(function($ctx2) {
  2102. return _st(_st(each)._category()).__eq(self["@selectedPackage"]);
  2103. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._sort_((function(a,b){
  2104. return smalltalk.withContext(function($ctx2) {
  2105. $2=_st(a)._name();
  2106. $ctx2.sendIdx["name"]=1;
  2107. return _st($2).__lt(_st(b)._name());
  2108. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)})})))._asSet();
  2109. return $1;
  2110. }, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Browser)})},
  2111. args: [],
  2112. source: "classes\x0a\x09^ ((Smalltalk current classes\x0a\x09select: [ :each | each category = selectedPackage ])\x0a\x09sort: [ :a :b | a name < b name ]) asSet",
  2113. messageSends: ["asSet", "sort:", "select:", "classes", "current", "=", "category", "<", "name"],
  2114. referencedClasses: ["Smalltalk"]
  2115. }),
  2116. smalltalk.Browser);
  2117. smalltalk.addMethod(
  2118. smalltalk.method({
  2119. selector: "commitPackage",
  2120. protocol: 'actions',
  2121. fn: function (){
  2122. var self=this;
  2123. function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
  2124. return smalltalk.withContext(function($ctx1) {
  2125. var $1;
  2126. $1=self["@selectedPackage"];
  2127. if(($receiver = $1) == nil || $receiver == null){
  2128. $1;
  2129. } else {
  2130. _st(_st($Package())._named_(self["@selectedPackage"]))._commit();
  2131. };
  2132. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage",{},smalltalk.Browser)})},
  2133. args: [],
  2134. source: "commitPackage\x0a\x09selectedPackage ifNotNil: [\x0a\x09\x09(Package named: selectedPackage) commit ]",
  2135. messageSends: ["ifNotNil:", "commit", "named:"],
  2136. referencedClasses: ["Package"]
  2137. }),
  2138. smalltalk.Browser);
  2139. smalltalk.addMethod(
  2140. smalltalk.method({
  2141. selector: "compile",
  2142. protocol: 'actions',
  2143. fn: function (){
  2144. var self=this;
  2145. var currentEditLine;
  2146. return smalltalk.withContext(function($ctx1) {
  2147. var $1,$2,$3,$5,$4;
  2148. self._disableSaveButton();
  2149. $1=_st(self["@sourceArea"])._editor();
  2150. $ctx1.sendIdx["editor"]=1;
  2151. currentEditLine=_st($1)._getCursor();
  2152. $2=_st(self["@selectedTab"]).__eq("comment");
  2153. if(smalltalk.assert($2)){
  2154. $3=self["@selectedClass"];
  2155. if(($receiver = $3) == nil || $receiver == null){
  2156. $3;
  2157. } else {
  2158. self._compileClassComment();
  2159. };
  2160. } else {
  2161. $5=_st(self["@selectedProtocol"])._notNil();
  2162. $ctx1.sendIdx["notNil"]=1;
  2163. $4=_st($5)._or_((function(){
  2164. return smalltalk.withContext(function($ctx2) {
  2165. return _st(self["@selectedMethod"])._notNil();
  2166. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  2167. if(smalltalk.assert($4)){
  2168. self._compileMethodDefinition();
  2169. } else {
  2170. self._compileDefinition();
  2171. };
  2172. };
  2173. _st(_st(self["@sourceArea"])._editor())._setCursor_(currentEditLine);
  2174. return self}, function($ctx1) {$ctx1.fill(self,"compile",{currentEditLine:currentEditLine},smalltalk.Browser)})},
  2175. args: [],
  2176. source: "compile\x0a\x09| currentEditLine |\x0a\x09self disableSaveButton.\x0a\x09currentEditLine := sourceArea editor getCursor.\x0a\x09selectedTab = #comment\x0a\x09ifTrue: [\x0a\x09\x09\x09selectedClass ifNotNil: [\x0a\x09\x09\x09\x09self compileClassComment ]]\x0a\x09ifFalse: [\x0a\x09\x09\x09(selectedProtocol notNil or: [ selectedMethod notNil ])\x0a\x09\x09\x09\x09ifFalse: [ self compileDefinition ]\x0a\x09\x09\x09\x09ifTrue: [ self compileMethodDefinition ]].\x0a\x09sourceArea editor setCursor: currentEditLine.",
  2177. messageSends: ["disableSaveButton", "getCursor", "editor", "ifTrue:ifFalse:", "=", "ifNotNil:", "compileClassComment", "ifFalse:ifTrue:", "or:", "notNil", "compileDefinition", "compileMethodDefinition", "setCursor:"],
  2178. referencedClasses: []
  2179. }),
  2180. smalltalk.Browser);
  2181. smalltalk.addMethod(
  2182. smalltalk.method({
  2183. selector: "compileClassComment",
  2184. protocol: 'actions',
  2185. fn: function (){
  2186. var self=this;
  2187. return smalltalk.withContext(function($ctx1) {
  2188. _st(self["@selectedClass"])._comment_(_st(self["@sourceArea"])._val());
  2189. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment",{},smalltalk.Browser)})},
  2190. args: [],
  2191. source: "compileClassComment\x0a\x09selectedClass comment: sourceArea val",
  2192. messageSends: ["comment:", "val"],
  2193. referencedClasses: []
  2194. }),
  2195. smalltalk.Browser);
  2196. smalltalk.addMethod(
  2197. smalltalk.method({
  2198. selector: "compileDefinition",
  2199. protocol: 'actions',
  2200. fn: function (){
  2201. var self=this;
  2202. var newClass;
  2203. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  2204. return smalltalk.withContext(function($ctx1) {
  2205. var $1;
  2206. newClass=_st(_st($Compiler())._new())._evaluateExpression_(_st(self["@sourceArea"])._val());
  2207. self._resetClassesList();
  2208. self._updateCategoriesList();
  2209. $1=self._updateClassesList();
  2210. self._selectClass_(newClass);
  2211. return self}, function($ctx1) {$ctx1.fill(self,"compileDefinition",{newClass:newClass},smalltalk.Browser)})},
  2212. args: [],
  2213. source: "compileDefinition\x0a\x09| newClass |\x0a\x09newClass := Compiler new evaluateExpression: sourceArea val.\x0a\x09self\x0a\x09resetClassesList;\x0a\x09updateCategoriesList;\x0a\x09updateClassesList.\x0a\x09self selectClass: newClass",
  2214. messageSends: ["evaluateExpression:", "new", "val", "resetClassesList", "updateCategoriesList", "updateClassesList", "selectClass:"],
  2215. referencedClasses: ["Compiler"]
  2216. }),
  2217. smalltalk.Browser);
  2218. smalltalk.addMethod(
  2219. smalltalk.method({
  2220. selector: "compileMethodDefinition",
  2221. protocol: 'actions',
  2222. fn: function (){
  2223. var self=this;
  2224. return smalltalk.withContext(function($ctx1) {
  2225. var $1;
  2226. $1=_st(self["@selectedTab"]).__eq("instance");
  2227. if(smalltalk.assert($1)){
  2228. self._compileMethodDefinitionFor_(self["@selectedClass"]);
  2229. $ctx1.sendIdx["compileMethodDefinitionFor:"]=1;
  2230. } else {
  2231. self._compileMethodDefinitionFor_(_st(self["@selectedClass"])._class());
  2232. };
  2233. return self}, function($ctx1) {$ctx1.fill(self,"compileMethodDefinition",{},smalltalk.Browser)})},
  2234. args: [],
  2235. source: "compileMethodDefinition\x0a\x09selectedTab = #instance\x0a\x09ifTrue: [ self compileMethodDefinitionFor: selectedClass ]\x0a\x09ifFalse: [ self compileMethodDefinitionFor: selectedClass class ]",
  2236. messageSends: ["ifTrue:ifFalse:", "=", "compileMethodDefinitionFor:", "class"],
  2237. referencedClasses: []
  2238. }),
  2239. smalltalk.Browser);
  2240. smalltalk.addMethod(
  2241. smalltalk.method({
  2242. selector: "compileMethodDefinitionFor:",
  2243. protocol: 'actions',
  2244. fn: function (aClass){
  2245. var self=this;
  2246. var compiler,method,source,node;
  2247. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  2248. function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
  2249. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2250. return smalltalk.withContext(function($ctx1) {
  2251. var $1,$2,$6,$5,$4,$3,$7,$9,$8,$10;
  2252. var $early={};
  2253. try {
  2254. source=_st(self["@sourceArea"])._val();
  2255. $1=self["@selectedProtocol"];
  2256. if(($receiver = $1) == nil || $receiver == null){
  2257. self["@selectedProtocol"]=_st(self["@selectedMethod"])._protocol();
  2258. self["@selectedProtocol"];
  2259. } else {
  2260. $1;
  2261. };
  2262. compiler=_st($Compiler())._new();
  2263. $ctx1.sendIdx["new"]=1;
  2264. _st(compiler)._source_(source);
  2265. node=_st(compiler)._parse_(source);
  2266. $2=_st(node)._isParseFailure();
  2267. if(smalltalk.assert($2)){
  2268. $6="PARSE ERROR: ".__comma(_st(node)._reason());
  2269. $ctx1.sendIdx[","]=3;
  2270. $5=_st($6).__comma(", position: ");
  2271. $ctx1.sendIdx[","]=2;
  2272. $4=_st($5).__comma(_st(_st(node)._position())._asString());
  2273. $ctx1.sendIdx[","]=1;
  2274. $3=self._alert_($4);
  2275. return $3;
  2276. };
  2277. _st(compiler)._currentClass_(aClass);
  2278. method=_st(compiler)._eval_(_st(compiler)._compileNode_(node));
  2279. _st(_st(compiler)._unknownVariables())._do_((function(each){
  2280. return smalltalk.withContext(function($ctx2) {
  2281. $7=_st($PlatformInterface())._existsGlobal_(each);
  2282. if(! smalltalk.assert($7)){
  2283. $9=_st("Declare '".__comma(each)).__comma("' as instance variable?");
  2284. $ctx2.sendIdx[","]=4;
  2285. $8=self._confirm_($9);
  2286. if(smalltalk.assert($8)){
  2287. self._addInstanceVariableNamed_toClass_(each,aClass);
  2288. $10=self._compileMethodDefinitionFor_(aClass);
  2289. throw $early=[$10];
  2290. };
  2291. };
  2292. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
  2293. _st(_st($ClassBuilder())._new())._installMethod_forClass_protocol_(method,aClass,self["@selectedProtocol"]);
  2294. self._updateMethodsList();
  2295. self._selectMethod_(method);
  2296. return self}
  2297. catch(e) {if(e===$early)return e[0]; throw e}
  2298. }, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,method:method,source:source,node:node},smalltalk.Browser)})},
  2299. args: ["aClass"],
  2300. source: "compileMethodDefinitionFor: aClass\x0a\x09| compiler method source node |\x0a\x09source := sourceArea val.\x0a\x09selectedProtocol ifNil: [ selectedProtocol := selectedMethod protocol ].\x0a\x09compiler := Compiler new.\x0a\x09compiler source: source.\x0a\x09node := compiler parse: source.\x0a\x09node isParseFailure ifTrue: [\x0a\x09^ self alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString ].\x0a\x09compiler currentClass: aClass.\x0a\x09method := compiler eval: (compiler compileNode: node).\x0a\x09compiler unknownVariables do: [ :each |\x0a\x09\x09\x22Do not try to redeclare javascript's objects\x22\x0a\x09\x09(PlatformInterface existsGlobal: each) ifFalse: [\x0a\x09\x09(self confirm: 'Declare ''', each, ''' as instance variable?') ifTrue: [\x0a\x09\x09\x09self addInstanceVariableNamed: each toClass: aClass.\x0a\x09\x09\x09^ self compileMethodDefinitionFor: aClass ]] ].\x0a\x09ClassBuilder new installMethod: method forClass: aClass protocol: selectedProtocol.\x0a\x09self updateMethodsList.\x0a\x09self selectMethod: method",
  2301. messageSends: ["val", "ifNil:", "protocol", "new", "source:", "parse:", "ifTrue:", "isParseFailure", "alert:", ",", "reason", "asString", "position", "currentClass:", "eval:", "compileNode:", "do:", "unknownVariables", "ifFalse:", "existsGlobal:", "confirm:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "installMethod:forClass:protocol:", "updateMethodsList", "selectMethod:"],
  2302. referencedClasses: ["Compiler", "PlatformInterface", "ClassBuilder"]
  2303. }),
  2304. smalltalk.Browser);
  2305. smalltalk.addMethod(
  2306. smalltalk.method({
  2307. selector: "copyClass",
  2308. protocol: 'actions',
  2309. fn: function (){
  2310. var self=this;
  2311. var className;
  2312. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2313. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2314. return smalltalk.withContext(function($ctx1) {
  2315. var $1,$2;
  2316. className=self._prompt_("Copy class");
  2317. $1=_st(_st(className)._notNil())._and_((function(){
  2318. return smalltalk.withContext(function($ctx2) {
  2319. return _st(className)._notEmpty();
  2320. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2321. if(smalltalk.assert($1)){
  2322. _st(_st($ClassBuilder())._new())._copyClass_named_(self._selectedClass(),className);
  2323. self._resetClassesList();
  2324. $2=self._updateClassesList();
  2325. $2;
  2326. self._selectClass_(_st(_st($Smalltalk())._current())._at_(className));
  2327. };
  2328. return self}, function($ctx1) {$ctx1.fill(self,"copyClass",{className:className},smalltalk.Browser)})},
  2329. args: [],
  2330. source: "copyClass\x0a\x09| className |\x0a\x09className := self prompt: 'Copy class'.\x0a\x09(className notNil and: [ className notEmpty ]) ifTrue: [\x0a\x09\x09ClassBuilder new copyClass: self selectedClass named: className.\x0a\x09\x09\x09self\x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk current at: className) ]",
  2331. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "copyClass:named:", "new", "selectedClass", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current"],
  2332. referencedClasses: ["ClassBuilder", "Smalltalk"]
  2333. }),
  2334. smalltalk.Browser);
  2335. smalltalk.addMethod(
  2336. smalltalk.method({
  2337. selector: "declarationSource",
  2338. protocol: 'accessing',
  2339. fn: function (){
  2340. var self=this;
  2341. return smalltalk.withContext(function($ctx1) {
  2342. var $2,$1;
  2343. $2=_st(self["@selectedTab"]).__eq("instance");
  2344. if(smalltalk.assert($2)){
  2345. $1=self._classDeclarationSource();
  2346. } else {
  2347. $1=self._metaclassDeclarationSource();
  2348. };
  2349. return $1;
  2350. }, function($ctx1) {$ctx1.fill(self,"declarationSource",{},smalltalk.Browser)})},
  2351. args: [],
  2352. source: "declarationSource\x0a\x09^ selectedTab = #instance\x0a\x09ifTrue: [ self classDeclarationSource ]\x0a\x09ifFalse: [ self metaclassDeclarationSource ]",
  2353. messageSends: ["ifTrue:ifFalse:", "=", "classDeclarationSource", "metaclassDeclarationSource"],
  2354. referencedClasses: []
  2355. }),
  2356. smalltalk.Browser);
  2357. smalltalk.addMethod(
  2358. smalltalk.method({
  2359. selector: "disableSaveButton",
  2360. protocol: 'actions',
  2361. fn: function (){
  2362. var self=this;
  2363. return smalltalk.withContext(function($ctx1) {
  2364. var $1;
  2365. $1=self["@saveButton"];
  2366. if(($receiver = $1) == nil || $receiver == null){
  2367. $1;
  2368. } else {
  2369. _st(self["@saveButton"])._at_put_("disabled",true);
  2370. };
  2371. self["@unsavedChanges"]=false;
  2372. return self}, function($ctx1) {$ctx1.fill(self,"disableSaveButton",{},smalltalk.Browser)})},
  2373. args: [],
  2374. source: "disableSaveButton\x0a\x09saveButton ifNotNil: [\x0a\x09saveButton at: 'disabled' put: true ].\x0a\x09unsavedChanges := false",
  2375. messageSends: ["ifNotNil:", "at:put:"],
  2376. referencedClasses: []
  2377. }),
  2378. smalltalk.Browser);
  2379. smalltalk.addMethod(
  2380. smalltalk.method({
  2381. selector: "dummyMethodSource",
  2382. protocol: 'accessing',
  2383. fn: function (){
  2384. var self=this;
  2385. return smalltalk.withContext(function($ctx1) {
  2386. return "messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements";
  2387. }, function($ctx1) {$ctx1.fill(self,"dummyMethodSource",{},smalltalk.Browser)})},
  2388. args: [],
  2389. source: "dummyMethodSource\x0a\x09^ 'messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements'",
  2390. messageSends: [],
  2391. referencedClasses: []
  2392. }),
  2393. smalltalk.Browser);
  2394. smalltalk.addMethod(
  2395. smalltalk.method({
  2396. selector: "handleSourceAreaKeyDown:",
  2397. protocol: 'actions',
  2398. fn: function (anEvent){
  2399. var self=this;
  2400. return smalltalk.withContext(function($ctx1) {
  2401. if(anEvent.ctrlKey) {
  2402. if(anEvent.keyCode === 83) { //ctrl+s
  2403. self._compile();
  2404. anEvent.preventDefault();
  2405. return false;
  2406. }
  2407. }
  2408. ;
  2409. return self}, function($ctx1) {$ctx1.fill(self,"handleSourceAreaKeyDown:",{anEvent:anEvent},smalltalk.Browser)})},
  2410. args: ["anEvent"],
  2411. 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>",
  2412. messageSends: [],
  2413. referencedClasses: []
  2414. }),
  2415. smalltalk.Browser);
  2416. smalltalk.addMethod(
  2417. smalltalk.method({
  2418. selector: "hideClassButtons",
  2419. protocol: 'actions',
  2420. fn: function (){
  2421. var self=this;
  2422. return smalltalk.withContext(function($ctx1) {
  2423. _st(_st(self["@classButtons"])._asJQuery())._hide();
  2424. return self}, function($ctx1) {$ctx1.fill(self,"hideClassButtons",{},smalltalk.Browser)})},
  2425. args: [],
  2426. source: "hideClassButtons\x0a\x09classButtons asJQuery hide",
  2427. messageSends: ["hide", "asJQuery"],
  2428. referencedClasses: []
  2429. }),
  2430. smalltalk.Browser);
  2431. smalltalk.addMethod(
  2432. smalltalk.method({
  2433. selector: "hideMethodButtons",
  2434. protocol: 'actions',
  2435. fn: function (){
  2436. var self=this;
  2437. return smalltalk.withContext(function($ctx1) {
  2438. _st(_st(self["@methodButtons"])._asJQuery())._hide();
  2439. return self}, function($ctx1) {$ctx1.fill(self,"hideMethodButtons",{},smalltalk.Browser)})},
  2440. args: [],
  2441. source: "hideMethodButtons\x0a\x09methodButtons asJQuery hide",
  2442. messageSends: ["hide", "asJQuery"],
  2443. referencedClasses: []
  2444. }),
  2445. smalltalk.Browser);
  2446. smalltalk.addMethod(
  2447. smalltalk.method({
  2448. selector: "initialize",
  2449. protocol: 'initialization',
  2450. fn: function (){
  2451. var self=this;
  2452. return smalltalk.withContext(function($ctx1) {
  2453. smalltalk.Browser.superclass.fn.prototype._initialize.apply(_st(self), []);
  2454. self["@selectedTab"]="instance";
  2455. self["@selectedPackage"]=_st(self._packages())._first();
  2456. self["@unsavedChanges"]=false;
  2457. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Browser)})},
  2458. args: [],
  2459. source: "initialize\x0a\x09super initialize.\x0a\x09selectedTab := #instance.\x0a\x09selectedPackage := self packages first.\x0a\x09unsavedChanges := false",
  2460. messageSends: ["initialize", "first", "packages"],
  2461. referencedClasses: []
  2462. }),
  2463. smalltalk.Browser);
  2464. smalltalk.addMethod(
  2465. smalltalk.method({
  2466. selector: "label",
  2467. protocol: 'accessing',
  2468. fn: function (){
  2469. var self=this;
  2470. return smalltalk.withContext(function($ctx1) {
  2471. var $2,$1;
  2472. $2=self["@selectedClass"];
  2473. if(($receiver = $2) == nil || $receiver == null){
  2474. $1="Browser (nil)";
  2475. } else {
  2476. $1="Browser: ".__comma(_st(self["@selectedClass"])._name());
  2477. };
  2478. return $1;
  2479. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.Browser)})},
  2480. args: [],
  2481. source: "label\x0a\x09^ selectedClass\x0a\x09ifNil: [ 'Browser (nil)' ]\x0a\x09ifNotNil: [ 'Browser: ', selectedClass name ]",
  2482. messageSends: ["ifNil:ifNotNil:", ",", "name"],
  2483. referencedClasses: []
  2484. }),
  2485. smalltalk.Browser);
  2486. smalltalk.addMethod(
  2487. smalltalk.method({
  2488. selector: "metaclassDeclarationSource",
  2489. protocol: 'accessing',
  2490. fn: function (){
  2491. var self=this;
  2492. var stream;
  2493. return smalltalk.withContext(function($ctx1) {
  2494. var $1,$2,$3,$4;
  2495. stream=""._writeStream();
  2496. $1=self["@selectedClass"];
  2497. if(($receiver = $1) == nil || $receiver == null){
  2498. $1;
  2499. } else {
  2500. $2=stream;
  2501. _st($2)._nextPutAll_(_st(self["@selectedClass"])._asString());
  2502. $ctx1.sendIdx["nextPutAll:"]=1;
  2503. _st($2)._nextPutAll_(" class ");
  2504. $ctx1.sendIdx["nextPutAll:"]=2;
  2505. $3=_st($2)._nextPutAll_("instanceVariableNames: '");
  2506. $ctx1.sendIdx["nextPutAll:"]=3;
  2507. $3;
  2508. _st(_st(_st(self["@selectedClass"])._class())._instanceVariableNames())._do_separatedBy_((function(each){
  2509. return smalltalk.withContext(function($ctx2) {
  2510. return _st(stream)._nextPutAll_(each);
  2511. $ctx2.sendIdx["nextPutAll:"]=4;
  2512. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
  2513. return smalltalk.withContext(function($ctx2) {
  2514. return _st(stream)._nextPutAll_(" ");
  2515. $ctx2.sendIdx["nextPutAll:"]=5;
  2516. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  2517. _st(stream)._nextPutAll_("'");
  2518. };
  2519. $4=_st(stream)._contents();
  2520. return $4;
  2521. }, function($ctx1) {$ctx1.fill(self,"metaclassDeclarationSource",{stream:stream},smalltalk.Browser)})},
  2522. args: [],
  2523. source: "metaclassDeclarationSource\x0a\x09| stream |\x0a\x09stream := '' writeStream.\x0a\x09selectedClass ifNotNil: [\x0a\x09stream\x0a\x09\x09nextPutAll: selectedClass asString;\x0a\x09\x09nextPutAll: ' class ';\x0a\x09\x09nextPutAll: 'instanceVariableNames: '''.\x0a\x09selectedClass class instanceVariableNames\x0a\x09\x09do: [ :each | stream nextPutAll: each ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ' ' ].\x0a\x09stream nextPutAll: '''' ].\x0a\x09^ stream contents",
  2524. messageSends: ["writeStream", "ifNotNil:", "nextPutAll:", "asString", "do:separatedBy:", "instanceVariableNames", "class", "contents"],
  2525. referencedClasses: []
  2526. }),
  2527. smalltalk.Browser);
  2528. smalltalk.addMethod(
  2529. smalltalk.method({
  2530. selector: "methodSource",
  2531. protocol: 'accessing',
  2532. fn: function (){
  2533. var self=this;
  2534. return smalltalk.withContext(function($ctx1) {
  2535. var $2,$1;
  2536. $2=self["@selectedMethod"];
  2537. if(($receiver = $2) == nil || $receiver == null){
  2538. $1=self._dummyMethodSource();
  2539. } else {
  2540. $1=_st(self["@selectedMethod"])._source();
  2541. };
  2542. return $1;
  2543. }, function($ctx1) {$ctx1.fill(self,"methodSource",{},smalltalk.Browser)})},
  2544. args: [],
  2545. source: "methodSource\x0a\x09^ selectedMethod\x0a\x09ifNil: [ self dummyMethodSource ]\x0a\x09ifNotNil: [ selectedMethod source ]",
  2546. messageSends: ["ifNil:ifNotNil:", "dummyMethodSource", "source"],
  2547. referencedClasses: []
  2548. }),
  2549. smalltalk.Browser);
  2550. smalltalk.addMethod(
  2551. smalltalk.method({
  2552. selector: "methods",
  2553. protocol: 'accessing',
  2554. fn: function (){
  2555. var self=this;
  2556. var klass;
  2557. return smalltalk.withContext(function($ctx1) {
  2558. var $1,$2,$3,$4,$7,$8,$6,$9,$5;
  2559. $1=_st(self["@selectedTab"]).__eq("comment");
  2560. $ctx1.sendIdx["="]=1;
  2561. if(smalltalk.assert($1)){
  2562. $2=[];
  2563. return $2;
  2564. };
  2565. $3=self["@selectedClass"];
  2566. if(($receiver = $3) == nil || $receiver == null){
  2567. $3;
  2568. } else {
  2569. $4=_st(self["@selectedTab"]).__eq("instance");
  2570. if(smalltalk.assert($4)){
  2571. klass=self["@selectedClass"];
  2572. } else {
  2573. klass=_st(self["@selectedClass"])._class();
  2574. };
  2575. klass;
  2576. };
  2577. $7=self["@selectedProtocol"];
  2578. if(($receiver = $7) == nil || $receiver == null){
  2579. $8=klass;
  2580. if(($receiver = $8) == nil || $receiver == null){
  2581. $6=[];
  2582. } else {
  2583. $6=_st(_st(klass)._methodDictionary())._values();
  2584. };
  2585. } else {
  2586. $6=_st(klass)._methodsInProtocol_(self["@selectedProtocol"]);
  2587. };
  2588. $5=_st($6)._sort_((function(a,b){
  2589. return smalltalk.withContext(function($ctx2) {
  2590. $9=_st(a)._selector();
  2591. $ctx2.sendIdx["selector"]=1;
  2592. return _st($9).__lt(_st(b)._selector());
  2593. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,9)})}));
  2594. return $5;
  2595. }, function($ctx1) {$ctx1.fill(self,"methods",{klass:klass},smalltalk.Browser)})},
  2596. args: [],
  2597. source: "methods\x0a\x09| klass |\x0a\x09selectedTab = #comment ifTrue: [ ^ #() ].\x0a\x09selectedClass ifNotNil: [\x0a\x09klass := selectedTab = #instance\x0a\x09\x09ifTrue: [ selectedClass ]\x0a\x09\x09ifFalse: [ selectedClass class ]].\x0a\x09^ (selectedProtocol\x0a\x09ifNil: [\x0a\x09\x09klass\x0a\x09\x09ifNil: [ #() ]\x0a\x09\x09ifNotNil: [ klass methodDictionary values ]]\x0a\x09ifNotNil: [\x0a\x09\x09klass methodsInProtocol: selectedProtocol ]) \x0a\x09\x09\x09\x09sort: [ :a :b | a selector < b selector ]",
  2598. messageSends: ["ifTrue:", "=", "ifNotNil:", "ifTrue:ifFalse:", "class", "sort:", "ifNil:ifNotNil:", "values", "methodDictionary", "methodsInProtocol:", "<", "selector"],
  2599. referencedClasses: []
  2600. }),
  2601. smalltalk.Browser);
  2602. smalltalk.addMethod(
  2603. smalltalk.method({
  2604. selector: "packages",
  2605. protocol: 'accessing',
  2606. fn: function (){
  2607. var self=this;
  2608. var packages;
  2609. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  2610. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2611. return smalltalk.withContext(function($ctx1) {
  2612. var $2,$3,$1,$4;
  2613. packages=_st($Array())._new();
  2614. _st(_st(_st($Smalltalk())._current())._classes())._do_((function(each){
  2615. return smalltalk.withContext(function($ctx2) {
  2616. $2=packages;
  2617. $3=_st(each)._category();
  2618. $ctx2.sendIdx["category"]=1;
  2619. $1=_st($2)._includes_($3);
  2620. if(! smalltalk.assert($1)){
  2621. return _st(packages)._add_(_st(each)._category());
  2622. };
  2623. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  2624. $4=_st(packages)._sort();
  2625. return $4;
  2626. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},smalltalk.Browser)})},
  2627. args: [],
  2628. source: "packages\x0a\x09| packages |\x0a\x09packages := Array new.\x0a\x09Smalltalk current classes do: [ :each |\x0a\x09(packages includes: each category) ifFalse: [\x0a\x09\x09packages add: each category ]].\x0a\x09^ packages sort",
  2629. messageSends: ["new", "do:", "classes", "current", "ifFalse:", "includes:", "category", "add:", "sort"],
  2630. referencedClasses: ["Array", "Smalltalk"]
  2631. }),
  2632. smalltalk.Browser);
  2633. smalltalk.addMethod(
  2634. smalltalk.method({
  2635. selector: "protocols",
  2636. protocol: 'accessing',
  2637. fn: function (){
  2638. var self=this;
  2639. var klass;
  2640. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  2641. return smalltalk.withContext(function($ctx1) {
  2642. var $1,$2,$3,$4,$5,$6,$7,$8;
  2643. $1=self["@selectedClass"];
  2644. if(($receiver = $1) == nil || $receiver == null){
  2645. $1;
  2646. } else {
  2647. $2=_st(self["@selectedTab"]).__eq("comment");
  2648. $ctx1.sendIdx["="]=1;
  2649. if(smalltalk.assert($2)){
  2650. $3=[];
  2651. return $3;
  2652. };
  2653. $4=_st(self["@selectedTab"]).__eq("instance");
  2654. if(smalltalk.assert($4)){
  2655. klass=self["@selectedClass"];
  2656. } else {
  2657. klass=_st(self["@selectedClass"])._class();
  2658. };
  2659. klass;
  2660. $5=_st(_st(klass)._methodDictionary())._isEmpty();
  2661. if(smalltalk.assert($5)){
  2662. $6=_st($Array())._with_("not yet classified");
  2663. return $6;
  2664. };
  2665. $7=_st(klass)._protocols();
  2666. return $7;
  2667. };
  2668. $8=_st($Array())._new();
  2669. return $8;
  2670. }, function($ctx1) {$ctx1.fill(self,"protocols",{klass:klass},smalltalk.Browser)})},
  2671. args: [],
  2672. source: "protocols\x0a\x09| klass |\x0a\x09selectedClass ifNotNil: [\x0a\x09selectedTab = #comment ifTrue: [ ^ #() ].\x0a\x09klass := selectedTab = #instance\x0a\x09\x09ifTrue: [ selectedClass ]\x0a\x09\x09ifFalse: [ selectedClass class ].\x0a\x09klass methodDictionary isEmpty ifTrue: [\x0a\x09\x09^ Array with: 'not yet classified' ].\x0a\x09^ klass protocols ].\x0a\x09^ Array new",
  2673. messageSends: ["ifNotNil:", "ifTrue:", "=", "ifTrue:ifFalse:", "class", "isEmpty", "methodDictionary", "with:", "protocols", "new"],
  2674. referencedClasses: ["Array"]
  2675. }),
  2676. smalltalk.Browser);
  2677. smalltalk.addMethod(
  2678. smalltalk.method({
  2679. selector: "removeClass",
  2680. protocol: 'actions',
  2681. fn: function (){
  2682. var self=this;
  2683. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2684. return smalltalk.withContext(function($ctx1) {
  2685. var $2,$1;
  2686. $2=_st("Do you really want to remove ".__comma(_st(self["@selectedClass"])._name())).__comma("?");
  2687. $ctx1.sendIdx[","]=1;
  2688. $1=self._confirm_($2);
  2689. if(smalltalk.assert($1)){
  2690. _st(_st($Smalltalk())._current())._removeClass_(self["@selectedClass"]);
  2691. self._resetClassesList();
  2692. self._selectClass_(nil);
  2693. };
  2694. return self}, function($ctx1) {$ctx1.fill(self,"removeClass",{},smalltalk.Browser)})},
  2695. args: [],
  2696. source: "removeClass\x0a\x09(self confirm: 'Do you really want to remove ', selectedClass name, '?')\x0a\x09ifTrue: [\x0a\x09\x09Smalltalk current removeClass: selectedClass.\x0a\x09\x09self resetClassesList.\x0a\x09\x09self selectClass: nil ]",
  2697. messageSends: ["ifTrue:", "confirm:", ",", "name", "removeClass:", "current", "resetClassesList", "selectClass:"],
  2698. referencedClasses: ["Smalltalk"]
  2699. }),
  2700. smalltalk.Browser);
  2701. smalltalk.addMethod(
  2702. smalltalk.method({
  2703. selector: "removeMethod",
  2704. protocol: 'actions',
  2705. fn: function (){
  2706. var self=this;
  2707. return smalltalk.withContext(function($ctx1) {
  2708. var $1,$3,$2,$4;
  2709. $1=self._cancelChanges();
  2710. if(smalltalk.assert($1)){
  2711. $3=_st("Do you really want to remove #".__comma(_st(self["@selectedMethod"])._selector())).__comma("?");
  2712. $ctx1.sendIdx[","]=1;
  2713. $2=self._confirm_($3);
  2714. if(smalltalk.assert($2)){
  2715. $4=_st(self["@selectedTab"]).__eq("instance");
  2716. if(smalltalk.assert($4)){
  2717. _st(self["@selectedClass"])._removeCompiledMethod_(self["@selectedMethod"]);
  2718. $ctx1.sendIdx["removeCompiledMethod:"]=1;
  2719. } else {
  2720. _st(_st(self["@selectedClass"])._class())._removeCompiledMethod_(self["@selectedMethod"]);
  2721. };
  2722. self._selectMethod_(nil);
  2723. };
  2724. };
  2725. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod",{},smalltalk.Browser)})},
  2726. args: [],
  2727. source: "removeMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09(self confirm: 'Do you really want to remove #', selectedMethod selector, '?')\x0a\x09\x09ifTrue: [\x0a\x09\x09selectedTab = #instance\x0a\x09\x09\x09ifTrue: [ selectedClass removeCompiledMethod: selectedMethod ]\x0a\x09\x09\x09ifFalse: [ selectedClass class removeCompiledMethod: selectedMethod ].\x0a\x09\x09self selectMethod: nil ]]",
  2728. messageSends: ["ifTrue:", "cancelChanges", "confirm:", ",", "selector", "ifTrue:ifFalse:", "=", "removeCompiledMethod:", "class", "selectMethod:"],
  2729. referencedClasses: []
  2730. }),
  2731. smalltalk.Browser);
  2732. smalltalk.addMethod(
  2733. smalltalk.method({
  2734. selector: "removePackage",
  2735. protocol: 'actions',
  2736. fn: function (){
  2737. var self=this;
  2738. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2739. return smalltalk.withContext(function($ctx1) {
  2740. var $2,$1;
  2741. $2=_st("Do you really want to remove the whole package ".__comma(self["@selectedPackage"])).__comma(" with all its classes?");
  2742. $ctx1.sendIdx[","]=1;
  2743. $1=self._confirm_($2);
  2744. if(smalltalk.assert($1)){
  2745. _st(_st($Smalltalk())._current())._removePackage_(self["@selectedPackage"]);
  2746. self._updateCategoriesList();
  2747. };
  2748. return self}, function($ctx1) {$ctx1.fill(self,"removePackage",{},smalltalk.Browser)})},
  2749. args: [],
  2750. source: "removePackage\x0a\x0a\x09(self confirm: 'Do you really want to remove the whole package ', selectedPackage, ' with all its classes?')\x0a\x09ifTrue: [\x0a\x09\x09Smalltalk current removePackage: selectedPackage.\x0a\x09\x09self updateCategoriesList ]",
  2751. messageSends: ["ifTrue:", "confirm:", ",", "removePackage:", "current", "updateCategoriesList"],
  2752. referencedClasses: ["Smalltalk"]
  2753. }),
  2754. smalltalk.Browser);
  2755. smalltalk.addMethod(
  2756. smalltalk.method({
  2757. selector: "renameClass",
  2758. protocol: 'actions',
  2759. fn: function (){
  2760. var self=this;
  2761. var newName;
  2762. return smalltalk.withContext(function($ctx1) {
  2763. var $1,$2;
  2764. newName=self._prompt_("Rename class ".__comma(_st(self["@selectedClass"])._name()));
  2765. $1=_st(_st(newName)._notNil())._and_((function(){
  2766. return smalltalk.withContext(function($ctx2) {
  2767. return _st(newName)._notEmpty();
  2768. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2769. if(smalltalk.assert($1)){
  2770. _st(self["@selectedClass"])._rename_(newName);
  2771. self._updateClassesList();
  2772. $2=self._updateSourceAndButtons();
  2773. $2;
  2774. };
  2775. return self}, function($ctx1) {$ctx1.fill(self,"renameClass",{newName:newName},smalltalk.Browser)})},
  2776. args: [],
  2777. source: "renameClass\x0a\x09| newName |\x0a\x09newName := self prompt: 'Rename class ', selectedClass name.\x0a\x09(newName notNil and: [ newName notEmpty ]) ifTrue: [\x0a\x09selectedClass rename: newName.\x0a\x09self\x0a\x09\x09updateClassesList;\x0a\x09\x09updateSourceAndButtons ]",
  2778. messageSends: ["prompt:", ",", "name", "ifTrue:", "and:", "notNil", "notEmpty", "rename:", "updateClassesList", "updateSourceAndButtons"],
  2779. referencedClasses: []
  2780. }),
  2781. smalltalk.Browser);
  2782. smalltalk.addMethod(
  2783. smalltalk.method({
  2784. selector: "renamePackage",
  2785. protocol: 'actions',
  2786. fn: function (){
  2787. var self=this;
  2788. var newName;
  2789. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2790. return smalltalk.withContext(function($ctx1) {
  2791. var $1,$2;
  2792. newName=self._prompt_("Rename package ".__comma(self["@selectedPackage"]));
  2793. $1=newName;
  2794. if(($receiver = $1) == nil || $receiver == null){
  2795. $1;
  2796. } else {
  2797. $2=_st(newName)._notEmpty();
  2798. if(smalltalk.assert($2)){
  2799. _st(_st($Smalltalk())._current())._renamePackage_to_(self["@selectedPackage"],newName);
  2800. self._updateCategoriesList();
  2801. };
  2802. };
  2803. return self}, function($ctx1) {$ctx1.fill(self,"renamePackage",{newName:newName},smalltalk.Browser)})},
  2804. args: [],
  2805. source: "renamePackage\x0a\x0a\x09| newName |\x0a\x09newName := self prompt: 'Rename package ', selectedPackage.\x0a\x09newName ifNotNil: [\x0a\x09newName notEmpty ifTrue: [\x0a\x09Smalltalk current renamePackage: selectedPackage to: newName.\x0a\x09self updateCategoriesList ]]",
  2806. messageSends: ["prompt:", ",", "ifNotNil:", "ifTrue:", "notEmpty", "renamePackage:to:", "current", "updateCategoriesList"],
  2807. referencedClasses: ["Smalltalk"]
  2808. }),
  2809. smalltalk.Browser);
  2810. smalltalk.addMethod(
  2811. smalltalk.method({
  2812. selector: "renderBottomPanelOn:",
  2813. protocol: 'rendering',
  2814. fn: function (html){
  2815. var self=this;
  2816. function $SourceArea(){return smalltalk.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  2817. return smalltalk.withContext(function($ctx1) {
  2818. var $1,$2;
  2819. $1=_st(html)._div();
  2820. _st($1)._class_("amber_sourceCode");
  2821. $2=_st($1)._with_((function(){
  2822. return smalltalk.withContext(function($ctx2) {
  2823. self["@sourceArea"]=_st($SourceArea())._new();
  2824. self["@sourceArea"];
  2825. _st(self["@sourceArea"])._renderOn_(html);
  2826. _st(self["@sourceArea"])._onKeyDown_((function(e){
  2827. return smalltalk.withContext(function($ctx3) {
  2828. return self._handleSourceAreaKeyDown_(e);
  2829. }, function($ctx3) {$ctx3.fillBlock({e:e},$ctx2,2)})}));
  2830. return _st(self["@sourceArea"])._onKeyUp_((function(){
  2831. return smalltalk.withContext(function($ctx3) {
  2832. return self._updateStatus();
  2833. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  2834. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2835. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},smalltalk.Browser)})},
  2836. args: ["html"],
  2837. source: "renderBottomPanelOn: html\x0a\x09html div\x0a\x09class: 'amber_sourceCode';\x0a\x09with: [\x0a\x09\x09sourceArea := SourceArea new.\x0a\x09\x09sourceArea renderOn: html.\x0a\x09\x09\x09sourceArea onKeyDown: [ :e |\x0a\x09\x09\x09\x09self handleSourceAreaKeyDown: e ].\x0a\x09\x09sourceArea onKeyUp: [ self updateStatus ]]",
  2838. messageSends: ["class:", "div", "with:", "new", "renderOn:", "onKeyDown:", "handleSourceAreaKeyDown:", "onKeyUp:", "updateStatus"],
  2839. referencedClasses: ["SourceArea"]
  2840. }),
  2841. smalltalk.Browser);
  2842. smalltalk.addMethod(
  2843. smalltalk.method({
  2844. selector: "renderBoxOn:",
  2845. protocol: 'rendering',
  2846. fn: function (html){
  2847. var self=this;
  2848. return smalltalk.withContext(function($ctx1) {
  2849. var $1;
  2850. self._renderTopPanelOn_(html);
  2851. self._renderTabsOn_(html);
  2852. $1=self._renderBottomPanelOn_(html);
  2853. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.Browser)})},
  2854. args: ["html"],
  2855. source: "renderBoxOn: html\x0a\x09self\x0a\x09renderTopPanelOn: html;\x0a\x09renderTabsOn: html;\x0a\x09renderBottomPanelOn: html",
  2856. messageSends: ["renderTopPanelOn:", "renderTabsOn:", "renderBottomPanelOn:"],
  2857. referencedClasses: []
  2858. }),
  2859. smalltalk.Browser);
  2860. smalltalk.addMethod(
  2861. smalltalk.method({
  2862. selector: "renderButtonsOn:",
  2863. protocol: 'rendering',
  2864. fn: function (html){
  2865. var self=this;
  2866. return smalltalk.withContext(function($ctx1) {
  2867. var $1,$2,$3,$5,$6,$7,$8,$9,$10,$4;
  2868. self["@saveButton"]=_st(html)._button();
  2869. $ctx1.sendIdx["button"]=1;
  2870. $1=self["@saveButton"];
  2871. _st($1)._with_("Save");
  2872. $ctx1.sendIdx["with:"]=1;
  2873. $2=_st($1)._onClick_((function(){
  2874. return smalltalk.withContext(function($ctx2) {
  2875. return self._compile();
  2876. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2877. $ctx1.sendIdx["onClick:"]=1;
  2878. self["@methodButtons"]=_st(html)._span();
  2879. $ctx1.sendIdx["span"]=1;
  2880. self["@classButtons"]=_st(html)._span();
  2881. $3=_st(html)._div();
  2882. _st($3)._class_("right");
  2883. $4=_st($3)._with_((function(){
  2884. return smalltalk.withContext(function($ctx2) {
  2885. $5=_st(html)._button();
  2886. $ctx2.sendIdx["button"]=2;
  2887. _st($5)._with_("DoIt");
  2888. $ctx2.sendIdx["with:"]=3;
  2889. $6=_st($5)._onClick_((function(){
  2890. return smalltalk.withContext(function($ctx3) {
  2891. return _st(self["@sourceArea"])._doIt();
  2892. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  2893. $ctx2.sendIdx["onClick:"]=2;
  2894. $6;
  2895. $7=_st(html)._button();
  2896. $ctx2.sendIdx["button"]=3;
  2897. _st($7)._with_("PrintIt");
  2898. $ctx2.sendIdx["with:"]=4;
  2899. $8=_st($7)._onClick_((function(){
  2900. return smalltalk.withContext(function($ctx3) {
  2901. return _st(self["@sourceArea"])._printIt();
  2902. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  2903. $ctx2.sendIdx["onClick:"]=3;
  2904. $8;
  2905. $9=_st(html)._button();
  2906. _st($9)._with_("InspectIt");
  2907. $10=_st($9)._onClick_((function(){
  2908. return smalltalk.withContext(function($ctx3) {
  2909. return _st(self["@sourceArea"])._inspectIt();
  2910. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
  2911. return $10;
  2912. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  2913. $ctx1.sendIdx["with:"]=2;
  2914. self._updateSourceAndButtons();
  2915. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.Browser)})},
  2916. args: ["html"],
  2917. source: "renderButtonsOn: html\x0a\x09saveButton := html button.\x0a\x09saveButton\x0a\x09with: 'Save';\x0a\x09onClick: [ self compile ].\x0a\x09methodButtons := html span.\x0a\x09classButtons := html span.\x0a\x09html div\x0a\x09class: 'right';\x0a\x09with: [\x0a\x09\x09html button\x0a\x09\x09\x09with: 'DoIt';\x0a\x09\x09\x09onClick: [ sourceArea doIt ].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'PrintIt';\x0a\x09\x09\x09onClick: [ sourceArea printIt ].\x0a\x09\x09html button with: 'InspectIt';\x0a\x09\x09\x09onClick: [ sourceArea inspectIt ]].\x0a\x09self updateSourceAndButtons",
  2918. messageSends: ["button", "with:", "onClick:", "compile", "span", "class:", "div", "doIt", "printIt", "inspectIt", "updateSourceAndButtons"],
  2919. referencedClasses: []
  2920. }),
  2921. smalltalk.Browser);
  2922. smalltalk.addMethod(
  2923. smalltalk.method({
  2924. selector: "renderTabsOn:",
  2925. protocol: 'rendering',
  2926. fn: function (html){
  2927. var self=this;
  2928. return smalltalk.withContext(function($ctx1) {
  2929. self["@tabsList"]=_st(_st(html)._ul())._class_("amber_tabs amber_browser");
  2930. self._updateTabsList();
  2931. return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},smalltalk.Browser)})},
  2932. args: ["html"],
  2933. source: "renderTabsOn: html\x0a\x09tabsList := html ul class: 'amber_tabs amber_browser'.\x0a\x09self updateTabsList.",
  2934. messageSends: ["class:", "ul", "updateTabsList"],
  2935. referencedClasses: []
  2936. }),
  2937. smalltalk.Browser);
  2938. smalltalk.addMethod(
  2939. smalltalk.method({
  2940. selector: "renderTopPanelOn:",
  2941. protocol: 'rendering',
  2942. fn: function (html){
  2943. var self=this;
  2944. function $ClassesList(){return smalltalk.ClassesList||(typeof ClassesList=="undefined"?nil:ClassesList)}
  2945. return smalltalk.withContext(function($ctx1) {
  2946. var $1,$3,$4,$6,$7,$8,$9,$10,$11,$5,$12,$13,$2;
  2947. $1=_st(html)._div();
  2948. $ctx1.sendIdx["div"]=1;
  2949. _st($1)._class_("top");
  2950. $ctx1.sendIdx["class:"]=1;
  2951. $2=_st($1)._with_((function(){
  2952. return smalltalk.withContext(function($ctx2) {
  2953. $3=_st(html)._ul();
  2954. $ctx2.sendIdx["ul"]=1;
  2955. self["@packagesList"]=_st($3)._class_("amber_column browser packages");
  2956. $ctx2.sendIdx["class:"]=2;
  2957. self["@packagesList"];
  2958. $4=_st(html)._div();
  2959. $ctx2.sendIdx["div"]=2;
  2960. _st($4)._class_("amber_packagesButtons");
  2961. $ctx2.sendIdx["class:"]=3;
  2962. $5=_st($4)._with_((function(){
  2963. return smalltalk.withContext(function($ctx3) {
  2964. $6=_st(html)._button();
  2965. $ctx3.sendIdx["button"]=1;
  2966. _st($6)._title_("Commit classes in this package to disk");
  2967. $ctx3.sendIdx["title:"]=1;
  2968. _st($6)._onClick_((function(){
  2969. return smalltalk.withContext(function($ctx4) {
  2970. return self._commitPackage();
  2971. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  2972. $ctx3.sendIdx["onClick:"]=1;
  2973. $7=_st($6)._with_("Commit");
  2974. $ctx3.sendIdx["with:"]=3;
  2975. $7;
  2976. $8=_st(html)._button();
  2977. $ctx3.sendIdx["button"]=2;
  2978. _st($8)._title_("Rename package");
  2979. $ctx3.sendIdx["title:"]=2;
  2980. _st($8)._onClick_((function(){
  2981. return smalltalk.withContext(function($ctx4) {
  2982. return self._renamePackage();
  2983. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  2984. $ctx3.sendIdx["onClick:"]=2;
  2985. $9=_st($8)._with_("Rename");
  2986. $ctx3.sendIdx["with:"]=4;
  2987. $9;
  2988. $10=_st(html)._button();
  2989. _st($10)._title_("Remove this package from the system");
  2990. _st($10)._onClick_((function(){
  2991. return smalltalk.withContext(function($ctx4) {
  2992. return self._removePackage();
  2993. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  2994. $11=_st($10)._with_("Remove");
  2995. return $11;
  2996. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  2997. $ctx2.sendIdx["with:"]=2;
  2998. $5;
  2999. self["@classesList"]=_st($ClassesList())._on_(self);
  3000. self["@classesList"];
  3001. _st(self["@classesList"])._renderOn_(html);
  3002. $12=_st(html)._ul();
  3003. $ctx2.sendIdx["ul"]=2;
  3004. self["@protocolsList"]=_st($12)._class_("amber_column browser protocols");
  3005. $ctx2.sendIdx["class:"]=4;
  3006. self["@protocolsList"];
  3007. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column browser methods");
  3008. $ctx2.sendIdx["class:"]=5;
  3009. self["@methodsList"];
  3010. self._updateCategoriesList();
  3011. self._updateClassesList();
  3012. self._updateProtocolsList();
  3013. $13=self._updateMethodsList();
  3014. $13;
  3015. return _st(_st(html)._div())._class_("amber_clear");
  3016. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  3017. $ctx1.sendIdx["with:"]=1;
  3018. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},smalltalk.Browser)})},
  3019. args: ["html"],
  3020. source: "renderTopPanelOn: html\x0a\x09html div\x0a\x09\x09class: 'top';\x0a\x09\x09with: [\x0a\x09\x09\x09packagesList := html ul class: 'amber_column browser packages'.\x0a\x09\x09\x09\x09html div class: 'amber_packagesButtons'; with: [\x0a\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09title: 'Commit classes in this package to disk';\x0a\x09\x09\x09\x09\x09onClick: [ self commitPackage ];\x0a\x09\x09\x09\x09\x09with: 'Commit'.\x0a\x09\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09title: 'Rename package';\x0a\x09\x09\x09\x09\x09onClick: [ self renamePackage ];\x0a\x09\x09\x09\x09\x09with: 'Rename'.\x0a\x09\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09title: 'Remove this package from the system';\x0a\x09\x09\x09\x09\x09onClick: [ self removePackage ];\x0a\x09\x09\x09\x09\x09with: 'Remove' ].\x0a\x09\x09\x09classesList := ClassesList on: self.\x0a\x09\x09\x09classesList renderOn: html.\x0a\x09\x09\x09protocolsList := html ul class: 'amber_column browser protocols'.\x0a\x09\x09\x09methodsList := html ul class: 'amber_column browser methods'.\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09updateCategoriesList;\x0a\x09\x09\x09\x09updateClassesList;\x0a\x09\x09\x09\x09updateProtocolsList;\x0a\x09\x09\x09\x09updateMethodsList.\x0a\x09\x09\x09html div class: 'amber_clear' ]",
  3021. messageSends: ["class:", "div", "with:", "ul", "title:", "button", "onClick:", "commitPackage", "renamePackage", "removePackage", "on:", "renderOn:", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList"],
  3022. referencedClasses: ["ClassesList"]
  3023. }),
  3024. smalltalk.Browser);
  3025. smalltalk.addMethod(
  3026. smalltalk.method({
  3027. selector: "resetClassesList",
  3028. protocol: 'updating',
  3029. fn: function (){
  3030. var self=this;
  3031. return smalltalk.withContext(function($ctx1) {
  3032. _st(self["@classesList"])._resetNodes();
  3033. return self}, function($ctx1) {$ctx1.fill(self,"resetClassesList",{},smalltalk.Browser)})},
  3034. args: [],
  3035. source: "resetClassesList\x0a\x09classesList resetNodes",
  3036. messageSends: ["resetNodes"],
  3037. referencedClasses: []
  3038. }),
  3039. smalltalk.Browser);
  3040. smalltalk.addMethod(
  3041. smalltalk.method({
  3042. selector: "search:",
  3043. protocol: 'actions',
  3044. fn: function (aString){
  3045. var self=this;
  3046. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  3047. return smalltalk.withContext(function($ctx1) {
  3048. var $1,$2;
  3049. $1=self._cancelChanges();
  3050. if(smalltalk.assert($1)){
  3051. var searchedClass;
  3052. searchedClass=_st(_st($Smalltalk())._current())._at_(aString);
  3053. searchedClass;
  3054. $2=_st(searchedClass)._isClass();
  3055. if(smalltalk.assert($2)){
  3056. _st(self._class())._openOn_(searchedClass);
  3057. } else {
  3058. self._searchReferencesOf_(aString);
  3059. };
  3060. };
  3061. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.Browser)})},
  3062. args: ["aString"],
  3063. 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 ]]",
  3064. messageSends: ["ifTrue:", "cancelChanges", "at:", "current", "ifTrue:ifFalse:", "isClass", "openOn:", "class", "searchReferencesOf:"],
  3065. referencedClasses: ["Smalltalk"]
  3066. }),
  3067. smalltalk.Browser);
  3068. smalltalk.addMethod(
  3069. smalltalk.method({
  3070. selector: "searchClassReferences",
  3071. protocol: 'actions',
  3072. fn: function (){
  3073. var self=this;
  3074. function $ReferencesBrowser(){return smalltalk.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  3075. return smalltalk.withContext(function($ctx1) {
  3076. _st($ReferencesBrowser())._search_(_st(self["@selectedClass"])._name());
  3077. return self}, function($ctx1) {$ctx1.fill(self,"searchClassReferences",{},smalltalk.Browser)})},
  3078. args: [],
  3079. source: "searchClassReferences\x0a\x09ReferencesBrowser search: selectedClass name",
  3080. messageSends: ["search:", "name"],
  3081. referencedClasses: ["ReferencesBrowser"]
  3082. }),
  3083. smalltalk.Browser);
  3084. smalltalk.addMethod(
  3085. smalltalk.method({
  3086. selector: "searchReferencesOf:",
  3087. protocol: 'actions',
  3088. fn: function (aString){
  3089. var self=this;
  3090. function $ReferencesBrowser(){return smalltalk.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  3091. return smalltalk.withContext(function($ctx1) {
  3092. _st($ReferencesBrowser())._search_(aString);
  3093. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesOf:",{aString:aString},smalltalk.Browser)})},
  3094. args: ["aString"],
  3095. source: "searchReferencesOf: aString\x0a\x09ReferencesBrowser search: aString",
  3096. messageSends: ["search:"],
  3097. referencedClasses: ["ReferencesBrowser"]
  3098. }),
  3099. smalltalk.Browser);
  3100. smalltalk.addMethod(
  3101. smalltalk.method({
  3102. selector: "selectCategory:",
  3103. protocol: 'actions',
  3104. fn: function (aCategory){
  3105. var self=this;
  3106. return smalltalk.withContext(function($ctx1) {
  3107. var $1,$2;
  3108. $1=self._cancelChanges();
  3109. if(smalltalk.assert($1)){
  3110. self["@selectedPackage"]=aCategory;
  3111. self["@selectedPackage"];
  3112. self["@selectedMethod"]=nil;
  3113. self["@selectedProtocol"]=self["@selectedMethod"];
  3114. self["@selectedClass"]=self["@selectedProtocol"];
  3115. self["@selectedClass"];
  3116. self._resetClassesList();
  3117. self._updateCategoriesList();
  3118. self._updateClassesList();
  3119. self._updateProtocolsList();
  3120. self._updateMethodsList();
  3121. $2=self._updateSourceAndButtons();
  3122. $2;
  3123. };
  3124. return self}, function($ctx1) {$ctx1.fill(self,"selectCategory:",{aCategory:aCategory},smalltalk.Browser)})},
  3125. args: ["aCategory"],
  3126. source: "selectCategory: aCategory\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedPackage := aCategory.\x0a\x09selectedClass := selectedProtocol := selectedMethod := nil.\x0a\x09self resetClassesList.\x0a\x09self\x0a\x09\x09updateCategoriesList;\x0a\x09\x09updateClassesList;\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  3127. messageSends: ["ifTrue:", "cancelChanges", "resetClassesList", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3128. referencedClasses: []
  3129. }),
  3130. smalltalk.Browser);
  3131. smalltalk.addMethod(
  3132. smalltalk.method({
  3133. selector: "selectClass:",
  3134. protocol: 'actions',
  3135. fn: function (aClass){
  3136. var self=this;
  3137. return smalltalk.withContext(function($ctx1) {
  3138. var $1,$2;
  3139. $1=self._cancelChanges();
  3140. if(smalltalk.assert($1)){
  3141. self["@selectedClass"]=aClass;
  3142. self["@selectedClass"];
  3143. self["@selectedMethod"]=nil;
  3144. self["@selectedProtocol"]=self["@selectedMethod"];
  3145. self["@selectedProtocol"];
  3146. self._updateClassesList();
  3147. self._updateProtocolsList();
  3148. self._updateMethodsList();
  3149. $2=self._updateSourceAndButtons();
  3150. $2;
  3151. };
  3152. return self}, function($ctx1) {$ctx1.fill(self,"selectClass:",{aClass:aClass},smalltalk.Browser)})},
  3153. args: ["aClass"],
  3154. source: "selectClass: aClass\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedClass := aClass.\x0a\x09selectedProtocol := selectedMethod := nil.\x0a\x09self\x0a\x09\x09updateClassesList;\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  3155. messageSends: ["ifTrue:", "cancelChanges", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3156. referencedClasses: []
  3157. }),
  3158. smalltalk.Browser);
  3159. smalltalk.addMethod(
  3160. smalltalk.method({
  3161. selector: "selectMethod:",
  3162. protocol: 'actions',
  3163. fn: function (aMethod){
  3164. var self=this;
  3165. return smalltalk.withContext(function($ctx1) {
  3166. var $1,$2;
  3167. $1=self._cancelChanges();
  3168. if(smalltalk.assert($1)){
  3169. self["@selectedMethod"]=aMethod;
  3170. self["@selectedMethod"];
  3171. self._updateProtocolsList();
  3172. self._updateMethodsList();
  3173. $2=self._updateSourceAndButtons();
  3174. $2;
  3175. };
  3176. return self}, function($ctx1) {$ctx1.fill(self,"selectMethod:",{aMethod:aMethod},smalltalk.Browser)})},
  3177. args: ["aMethod"],
  3178. source: "selectMethod: aMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedMethod := aMethod.\x0a\x09self\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  3179. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3180. referencedClasses: []
  3181. }),
  3182. smalltalk.Browser);
  3183. smalltalk.addMethod(
  3184. smalltalk.method({
  3185. selector: "selectProtocol:",
  3186. protocol: 'actions',
  3187. fn: function (aString){
  3188. var self=this;
  3189. return smalltalk.withContext(function($ctx1) {
  3190. var $1,$2;
  3191. $1=self._cancelChanges();
  3192. if(smalltalk.assert($1)){
  3193. self["@selectedProtocol"]=aString;
  3194. self["@selectedProtocol"];
  3195. self["@selectedMethod"]=nil;
  3196. self["@selectedMethod"];
  3197. self._updateProtocolsList();
  3198. self._updateMethodsList();
  3199. $2=self._updateSourceAndButtons();
  3200. $2;
  3201. };
  3202. return self}, function($ctx1) {$ctx1.fill(self,"selectProtocol:",{aString:aString},smalltalk.Browser)})},
  3203. args: ["aString"],
  3204. source: "selectProtocol: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedProtocol := aString.\x0a\x09selectedMethod := nil.\x0a\x09self\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  3205. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3206. referencedClasses: []
  3207. }),
  3208. smalltalk.Browser);
  3209. smalltalk.addMethod(
  3210. smalltalk.method({
  3211. selector: "selectTab:",
  3212. protocol: 'actions',
  3213. fn: function (aString){
  3214. var self=this;
  3215. return smalltalk.withContext(function($ctx1) {
  3216. var $1;
  3217. $1=self._cancelChanges();
  3218. if(smalltalk.assert($1)){
  3219. self["@selectedTab"]=aString;
  3220. self["@selectedTab"];
  3221. self._selectProtocol_(nil);
  3222. self._updateTabsList();
  3223. };
  3224. return self}, function($ctx1) {$ctx1.fill(self,"selectTab:",{aString:aString},smalltalk.Browser)})},
  3225. args: ["aString"],
  3226. source: "selectTab: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedTab := aString.\x0a\x09self selectProtocol: nil.\x0a\x09self updateTabsList ]",
  3227. messageSends: ["ifTrue:", "cancelChanges", "selectProtocol:", "updateTabsList"],
  3228. referencedClasses: []
  3229. }),
  3230. smalltalk.Browser);
  3231. smalltalk.addMethod(
  3232. smalltalk.method({
  3233. selector: "selectedClass",
  3234. protocol: 'accessing',
  3235. fn: function (){
  3236. var self=this;
  3237. return smalltalk.withContext(function($ctx1) {
  3238. var $1;
  3239. $1=self["@selectedClass"];
  3240. return $1;
  3241. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{},smalltalk.Browser)})},
  3242. args: [],
  3243. source: "selectedClass\x0a\x09^ selectedClass",
  3244. messageSends: [],
  3245. referencedClasses: []
  3246. }),
  3247. smalltalk.Browser);
  3248. smalltalk.addMethod(
  3249. smalltalk.method({
  3250. selector: "selectedPackage",
  3251. protocol: 'accessing',
  3252. fn: function (){
  3253. var self=this;
  3254. return smalltalk.withContext(function($ctx1) {
  3255. var $1;
  3256. $1=self["@selectedPackage"];
  3257. return $1;
  3258. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{},smalltalk.Browser)})},
  3259. args: [],
  3260. source: "selectedPackage\x0a\x09^ selectedPackage",
  3261. messageSends: [],
  3262. referencedClasses: []
  3263. }),
  3264. smalltalk.Browser);
  3265. smalltalk.addMethod(
  3266. smalltalk.method({
  3267. selector: "setMethodProtocol:",
  3268. protocol: 'actions',
  3269. fn: function (aString){
  3270. var self=this;
  3271. return smalltalk.withContext(function($ctx1) {
  3272. var $1,$2,$3;
  3273. $1=self._cancelChanges();
  3274. if(smalltalk.assert($1)){
  3275. $2=_st(self._protocols())._includes_(aString);
  3276. if(smalltalk.assert($2)){
  3277. _st(self["@selectedMethod"])._protocol_(aString);
  3278. self["@selectedProtocol"]=aString;
  3279. self["@selectedProtocol"];
  3280. self["@selectedMethod"]=self["@selectedMethod"];
  3281. self["@selectedMethod"];
  3282. self._updateProtocolsList();
  3283. self._updateMethodsList();
  3284. $3=self._updateSourceAndButtons();
  3285. $3;
  3286. } else {
  3287. self._addNewProtocol();
  3288. };
  3289. };
  3290. return self}, function($ctx1) {$ctx1.fill(self,"setMethodProtocol:",{aString:aString},smalltalk.Browser)})},
  3291. args: ["aString"],
  3292. source: "setMethodProtocol: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09(self protocols includes: aString)\x0a\x09\x09ifFalse: [ self addNewProtocol ]\x0a\x09\x09ifTrue: [\x0a\x09\x09selectedMethod protocol: aString.\x0a\x09\x09selectedProtocol := aString.\x0a\x09\x09selectedMethod := selectedMethod.\x0a\x09\x09self\x0a\x09\x09\x09updateProtocolsList;\x0a\x09\x09\x09updateMethodsList;\x0a\x09\x09\x09updateSourceAndButtons ]]",
  3293. messageSends: ["ifTrue:", "cancelChanges", "ifFalse:ifTrue:", "includes:", "protocols", "addNewProtocol", "protocol:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3294. referencedClasses: []
  3295. }),
  3296. smalltalk.Browser);
  3297. smalltalk.addMethod(
  3298. smalltalk.method({
  3299. selector: "showClassButtons",
  3300. protocol: 'actions',
  3301. fn: function (){
  3302. var self=this;
  3303. return smalltalk.withContext(function($ctx1) {
  3304. _st(_st(self["@classButtons"])._asJQuery())._show();
  3305. return self}, function($ctx1) {$ctx1.fill(self,"showClassButtons",{},smalltalk.Browser)})},
  3306. args: [],
  3307. source: "showClassButtons\x0a\x09classButtons asJQuery show",
  3308. messageSends: ["show", "asJQuery"],
  3309. referencedClasses: []
  3310. }),
  3311. smalltalk.Browser);
  3312. smalltalk.addMethod(
  3313. smalltalk.method({
  3314. selector: "showMethodButtons",
  3315. protocol: 'actions',
  3316. fn: function (){
  3317. var self=this;
  3318. return smalltalk.withContext(function($ctx1) {
  3319. _st(_st(self["@methodButtons"])._asJQuery())._show();
  3320. return self}, function($ctx1) {$ctx1.fill(self,"showMethodButtons",{},smalltalk.Browser)})},
  3321. args: [],
  3322. source: "showMethodButtons\x0a\x09methodButtons asJQuery show",
  3323. messageSends: ["show", "asJQuery"],
  3324. referencedClasses: []
  3325. }),
  3326. smalltalk.Browser);
  3327. smalltalk.addMethod(
  3328. smalltalk.method({
  3329. selector: "source",
  3330. protocol: 'accessing',
  3331. fn: function (){
  3332. var self=this;
  3333. return smalltalk.withContext(function($ctx1) {
  3334. var $1,$4,$3,$2,$6,$5;
  3335. $1=_st(self["@selectedTab"]).__eq("comment");
  3336. if(! smalltalk.assert($1)){
  3337. $4=_st(self["@selectedProtocol"])._notNil();
  3338. $ctx1.sendIdx["notNil"]=1;
  3339. $3=_st($4)._or_((function(){
  3340. return smalltalk.withContext(function($ctx2) {
  3341. return _st(self["@selectedMethod"])._notNil();
  3342. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  3343. if(smalltalk.assert($3)){
  3344. $2=self._methodSource();
  3345. } else {
  3346. $2=self._declarationSource();
  3347. };
  3348. return $2;
  3349. };
  3350. $6=self["@selectedClass"];
  3351. if(($receiver = $6) == nil || $receiver == null){
  3352. $5="";
  3353. } else {
  3354. $5=self._classCommentSource();
  3355. };
  3356. return $5;
  3357. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.Browser)})},
  3358. args: [],
  3359. source: "source\x0a\x09selectedTab = #comment ifFalse: [\x0a\x09^ (selectedProtocol notNil or: [ selectedMethod notNil ])\x0a\x09\x09ifFalse: [ self declarationSource ]\x0a\x09\x09ifTrue: [ self methodSource ]].\x0a\x09^ selectedClass\x0a\x09ifNil: [ '' ]\x0a\x09ifNotNil: [ self classCommentSource ]",
  3360. messageSends: ["ifFalse:", "=", "ifFalse:ifTrue:", "or:", "notNil", "declarationSource", "methodSource", "ifNil:ifNotNil:", "classCommentSource"],
  3361. referencedClasses: []
  3362. }),
  3363. smalltalk.Browser);
  3364. smalltalk.addMethod(
  3365. smalltalk.method({
  3366. selector: "updateCategoriesList",
  3367. protocol: 'updating',
  3368. fn: function (){
  3369. var self=this;
  3370. return smalltalk.withContext(function($ctx1) {
  3371. var $1,$2,$3,$4;
  3372. _st(self["@packagesList"])._contents_((function(html){
  3373. return smalltalk.withContext(function($ctx2) {
  3374. return _st(self._packages())._do_((function(each){
  3375. var li,label;
  3376. return smalltalk.withContext(function($ctx3) {
  3377. $1=_st(each)._isEmpty();
  3378. if(smalltalk.assert($1)){
  3379. label="Unclassified";
  3380. label;
  3381. } else {
  3382. label=each;
  3383. label;
  3384. };
  3385. li=_st(html)._li();
  3386. li;
  3387. $2=_st(self["@selectedPackage"]).__eq(each);
  3388. if(smalltalk.assert($2)){
  3389. _st(li)._class_("selected");
  3390. };
  3391. $3=li;
  3392. _st($3)._with_(label);
  3393. $4=_st($3)._onClick_((function(){
  3394. return smalltalk.withContext(function($ctx4) {
  3395. return self._selectCategory_(each);
  3396. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)})}));
  3397. return $4;
  3398. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li,label:label},$ctx2,2)})}));
  3399. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3400. return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},smalltalk.Browser)})},
  3401. args: [],
  3402. source: "updateCategoriesList\x0a\x09packagesList contents: [ :html |\x0a\x09self packages do: [ :each || li label |\x0a\x09\x09each isEmpty\x0a\x09\x09ifTrue: [ label := 'Unclassified' ]\x0a\x09\x09ifFalse: [ label := each ].\x0a\x09\x09li := html li.\x0a\x09\x09selectedPackage = each ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09with: label;\x0a\x09\x09onClick: [ self selectCategory: each ]] ]",
  3403. messageSends: ["contents:", "do:", "packages", "ifTrue:ifFalse:", "isEmpty", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectCategory:"],
  3404. referencedClasses: []
  3405. }),
  3406. smalltalk.Browser);
  3407. smalltalk.addMethod(
  3408. smalltalk.method({
  3409. selector: "updateClassesList",
  3410. protocol: 'updating',
  3411. fn: function (){
  3412. var self=this;
  3413. function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  3414. return smalltalk.withContext(function($ctx1) {
  3415. _st(_st($TabManager())._current())._update();
  3416. _st(self["@classesList"])._updateNodes();
  3417. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},smalltalk.Browser)})},
  3418. args: [],
  3419. source: "updateClassesList\x0a\x09TabManager current update.\x0a\x09classesList updateNodes",
  3420. messageSends: ["update", "current", "updateNodes"],
  3421. referencedClasses: ["TabManager"]
  3422. }),
  3423. smalltalk.Browser);
  3424. smalltalk.addMethod(
  3425. smalltalk.method({
  3426. selector: "updateMethodsList",
  3427. protocol: 'updating',
  3428. fn: function (){
  3429. var self=this;
  3430. return smalltalk.withContext(function($ctx1) {
  3431. var $1,$2,$3;
  3432. _st(self["@methodsList"])._contents_((function(html){
  3433. return smalltalk.withContext(function($ctx2) {
  3434. return _st(self._methods())._do_((function(each){
  3435. var li;
  3436. return smalltalk.withContext(function($ctx3) {
  3437. li=_st(html)._li();
  3438. li;
  3439. $1=_st(self["@selectedMethod"]).__eq(each);
  3440. if(smalltalk.assert($1)){
  3441. _st(li)._class_("selected");
  3442. };
  3443. $2=li;
  3444. _st($2)._with_(_st(each)._selector());
  3445. $3=_st($2)._onClick_((function(){
  3446. return smalltalk.withContext(function($ctx4) {
  3447. return self._selectMethod_(each);
  3448. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  3449. return $3;
  3450. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  3451. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3452. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},smalltalk.Browser)})},
  3453. args: [],
  3454. source: "updateMethodsList\x0a\x09methodsList contents: [ :html |\x0a\x09self methods do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09selectedMethod = each ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09with: each selector;\x0a\x09\x09onClick: [ self selectMethod: each ]] ]",
  3455. messageSends: ["contents:", "do:", "methods", "li", "ifTrue:", "=", "class:", "with:", "selector", "onClick:", "selectMethod:"],
  3456. referencedClasses: []
  3457. }),
  3458. smalltalk.Browser);
  3459. smalltalk.addMethod(
  3460. smalltalk.method({
  3461. selector: "updateProtocolsList",
  3462. protocol: 'updating',
  3463. fn: function (){
  3464. var self=this;
  3465. return smalltalk.withContext(function($ctx1) {
  3466. var $1,$2,$3;
  3467. _st(self["@protocolsList"])._contents_((function(html){
  3468. return smalltalk.withContext(function($ctx2) {
  3469. return _st(self._protocols())._do_((function(each){
  3470. var li;
  3471. return smalltalk.withContext(function($ctx3) {
  3472. li=_st(html)._li();
  3473. li;
  3474. $1=_st(self["@selectedProtocol"]).__eq(each);
  3475. if(smalltalk.assert($1)){
  3476. _st(li)._class_("selected");
  3477. };
  3478. $2=li;
  3479. _st($2)._with_(each);
  3480. $3=_st($2)._onClick_((function(){
  3481. return smalltalk.withContext(function($ctx4) {
  3482. return self._selectProtocol_(each);
  3483. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  3484. return $3;
  3485. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  3486. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3487. return self}, function($ctx1) {$ctx1.fill(self,"updateProtocolsList",{},smalltalk.Browser)})},
  3488. args: [],
  3489. source: "updateProtocolsList\x0a\x09protocolsList contents: [ :html |\x0a\x09self protocols do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09selectedProtocol = each ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09with: each;\x0a\x09\x09onClick: [ self selectProtocol: each ]] ]",
  3490. messageSends: ["contents:", "do:", "protocols", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectProtocol:"],
  3491. referencedClasses: []
  3492. }),
  3493. smalltalk.Browser);
  3494. smalltalk.addMethod(
  3495. smalltalk.method({
  3496. selector: "updateSourceAndButtons",
  3497. protocol: 'updating',
  3498. fn: function (){
  3499. var self=this;
  3500. var currentProtocol;
  3501. return smalltalk.withContext(function($ctx1) {
  3502. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$15,$14,$17,$18,$19,$20,$22,$21,$23,$24,$16,$25,$26,$28,$29,$30,$31,$27,$32,$33;
  3503. self._disableSaveButton();
  3504. _st(self["@classButtons"])._contents_((function(html){
  3505. return smalltalk.withContext(function($ctx2) {
  3506. $1=_st(html)._button();
  3507. $ctx2.sendIdx["button"]=1;
  3508. _st($1)._title_("Create a new class");
  3509. _st($1)._onClick_((function(){
  3510. return smalltalk.withContext(function($ctx3) {
  3511. return self._addNewClass();
  3512. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  3513. $ctx2.sendIdx["onClick:"]=1;
  3514. $2=_st($1)._with_("New class");
  3515. $ctx2.sendIdx["with:"]=1;
  3516. $2;
  3517. $3=_st(html)._button();
  3518. $ctx2.sendIdx["button"]=2;
  3519. _st($3)._with_("Rename class");
  3520. $ctx2.sendIdx["with:"]=2;
  3521. $4=_st($3)._onClick_((function(){
  3522. return smalltalk.withContext(function($ctx3) {
  3523. return self._renameClass();
  3524. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  3525. $ctx2.sendIdx["onClick:"]=2;
  3526. $4;
  3527. $5=_st(html)._button();
  3528. $ctx2.sendIdx["button"]=3;
  3529. _st($5)._with_("Copy class");
  3530. $ctx2.sendIdx["with:"]=3;
  3531. $6=_st($5)._onClick_((function(){
  3532. return smalltalk.withContext(function($ctx3) {
  3533. return self._copyClass();
  3534. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  3535. $ctx2.sendIdx["onClick:"]=3;
  3536. $6;
  3537. $7=_st(html)._button();
  3538. $ctx2.sendIdx["button"]=4;
  3539. _st($7)._with_("Remove class");
  3540. $ctx2.sendIdx["with:"]=4;
  3541. $8=_st($7)._onClick_((function(){
  3542. return smalltalk.withContext(function($ctx3) {
  3543. return self._removeClass();
  3544. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
  3545. $ctx2.sendIdx["onClick:"]=4;
  3546. $8;
  3547. $9=_st(html)._button();
  3548. $ctx2.sendIdx["button"]=5;
  3549. _st($9)._with_("References");
  3550. $ctx2.sendIdx["with:"]=5;
  3551. $10=_st($9)._onClick_((function(){
  3552. return smalltalk.withContext(function($ctx3) {
  3553. return self._searchClassReferences();
  3554. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,6)})}));
  3555. $ctx2.sendIdx["onClick:"]=5;
  3556. return $10;
  3557. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3558. $ctx1.sendIdx["contents:"]=1;
  3559. _st(self["@methodButtons"])._contents_((function(html){
  3560. var protocolSelect,referencesSelect;
  3561. return smalltalk.withContext(function($ctx2) {
  3562. $11=_st(html)._button();
  3563. _st($11)._with_("Remove method");
  3564. $ctx2.sendIdx["with:"]=6;
  3565. $12=_st($11)._onClick_((function(){
  3566. return smalltalk.withContext(function($ctx3) {
  3567. return self._removeMethod();
  3568. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,8)})}));
  3569. $12;
  3570. protocolSelect=_st(html)._select();
  3571. $ctx2.sendIdx["select"]=1;
  3572. protocolSelect;
  3573. $13=protocolSelect;
  3574. _st($13)._onChange_((function(){
  3575. return smalltalk.withContext(function($ctx3) {
  3576. $15=_st(protocolSelect)._asJQuery();
  3577. $ctx3.sendIdx["asJQuery"]=1;
  3578. $14=_st($15)._val();
  3579. $ctx3.sendIdx["val"]=1;
  3580. return self._setMethodProtocol_($14);
  3581. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)})}));
  3582. $ctx2.sendIdx["onChange:"]=1;
  3583. $16=_st($13)._with_((function(){
  3584. return smalltalk.withContext(function($ctx3) {
  3585. $17=_st(html)._option();
  3586. $ctx3.sendIdx["option"]=1;
  3587. _st($17)._with_("Method protocol");
  3588. $ctx3.sendIdx["with:"]=8;
  3589. $18=_st($17)._at_put_("disabled","disabled");
  3590. $ctx3.sendIdx["at:put:"]=1;
  3591. $18;
  3592. $19=_st(html)._option();
  3593. $ctx3.sendIdx["option"]=2;
  3594. _st($19)._class_("important");
  3595. $ctx3.sendIdx["class:"]=1;
  3596. $20=_st($19)._with_("New...");
  3597. $ctx3.sendIdx["with:"]=9;
  3598. $20;
  3599. currentProtocol=self["@selectedProtocol"];
  3600. currentProtocol;
  3601. $22=_st(currentProtocol)._isNil();
  3602. $ctx3.sendIdx["isNil"]=1;
  3603. $21=_st($22)._and_((function(){
  3604. return smalltalk.withContext(function($ctx4) {
  3605. return _st(self["@selectedMethod"])._notNil();
  3606. $ctx4.sendIdx["notNil"]=1;
  3607. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,11)})}));
  3608. if(smalltalk.assert($21)){
  3609. currentProtocol=_st(self["@selectedMethod"])._category();
  3610. currentProtocol;
  3611. };
  3612. return _st(self._protocols())._do_((function(each){
  3613. var option;
  3614. return smalltalk.withContext(function($ctx4) {
  3615. $23=_st(html)._option();
  3616. $ctx4.sendIdx["option"]=3;
  3617. option=_st($23)._with_(each);
  3618. $ctx4.sendIdx["with:"]=10;
  3619. option;
  3620. $24=_st(currentProtocol).__eq(each);
  3621. if(smalltalk.assert($24)){
  3622. return _st(option)._at_put_("selected","selected");
  3623. $ctx4.sendIdx["at:put:"]=2;
  3624. };
  3625. }, function($ctx4) {$ctx4.fillBlock({each:each,option:option},$ctx3,13)})}));
  3626. $ctx3.sendIdx["do:"]=1;
  3627. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,10)})}));
  3628. $ctx2.sendIdx["with:"]=7;
  3629. $16;
  3630. $25=_st(self["@selectedMethod"])._isNil();
  3631. $ctx2.sendIdx["isNil"]=2;
  3632. if(! smalltalk.assert($25)){
  3633. referencesSelect=_st(html)._select();
  3634. referencesSelect;
  3635. $26=referencesSelect;
  3636. _st($26)._onChange_((function(){
  3637. return smalltalk.withContext(function($ctx3) {
  3638. return self._searchReferencesOf_(_st(_st(referencesSelect)._asJQuery())._val());
  3639. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,16)})}));
  3640. $27=_st($26)._with_((function(){
  3641. var option;
  3642. return smalltalk.withContext(function($ctx3) {
  3643. $28=_st(html)._option();
  3644. $ctx3.sendIdx["option"]=4;
  3645. _st($28)._with_("References");
  3646. $ctx3.sendIdx["with:"]=12;
  3647. _st($28)._at_put_("disabled","disabled");
  3648. $ctx3.sendIdx["at:put:"]=3;
  3649. $29=_st($28)._at_put_("selected","selected");
  3650. $29;
  3651. $30=_st(html)._option();
  3652. $ctx3.sendIdx["option"]=5;
  3653. _st($30)._class_("important");
  3654. $31=_st($30)._with_(_st(self["@selectedMethod"])._selector());
  3655. $ctx3.sendIdx["with:"]=13;
  3656. $31;
  3657. return _st(_st(_st(self["@selectedMethod"])._messageSends())._sorted())._do_((function(each){
  3658. return smalltalk.withContext(function($ctx4) {
  3659. return _st(_st(html)._option())._with_(each);
  3660. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,18)})}));
  3661. }, function($ctx3) {$ctx3.fillBlock({option:option},$ctx2,17)})}));
  3662. $ctx2.sendIdx["with:"]=11;
  3663. return $27;
  3664. };
  3665. }, function($ctx2) {$ctx2.fillBlock({html:html,protocolSelect:protocolSelect,referencesSelect:referencesSelect},$ctx1,7)})}));
  3666. $32=_st(self["@selectedMethod"])._isNil();
  3667. $ctx1.sendIdx["isNil"]=3;
  3668. if(smalltalk.assert($32)){
  3669. self._hideMethodButtons();
  3670. $33=_st(_st(self["@selectedClass"])._isNil())._or_((function(){
  3671. return smalltalk.withContext(function($ctx2) {
  3672. return _st(self["@selectedProtocol"])._notNil();
  3673. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,20)})}));
  3674. if(smalltalk.assert($33)){
  3675. self._hideClassButtons();
  3676. $ctx1.sendIdx["hideClassButtons"]=1;
  3677. } else {
  3678. self._showClassButtons();
  3679. };
  3680. } else {
  3681. self._hideClassButtons();
  3682. self._showMethodButtons();
  3683. };
  3684. _st(self["@sourceArea"])._val_(self._source());
  3685. return self}, function($ctx1) {$ctx1.fill(self,"updateSourceAndButtons",{currentProtocol:currentProtocol},smalltalk.Browser)})},
  3686. args: [],
  3687. source: "updateSourceAndButtons\x0a\x09| currentProtocol |\x0a\x0a\x09self disableSaveButton.\x0a\x09classButtons contents: [ :html |\x0a\x09\x09html button\x0a\x09\x09\x09title: 'Create a new class';\x0a\x09\x09\x09onClick: [ self addNewClass ];\x0a\x09\x09\x09with: 'New class'.\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Rename class';\x0a\x09\x09\x09onClick: [ self renameClass ].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Copy class';\x0a\x09\x09\x09onClick: [ self copyClass ].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Remove class';\x0a\x09\x09\x09onClick: [ self removeClass ].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'References';\x0a\x09\x09\x09onClick: [ self searchClassReferences ]].\x0a\x09methodButtons contents: [ :html | | protocolSelect referencesSelect |\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Remove method';\x0a\x09\x09\x09onClick: [ self removeMethod ].\x0a\x09\x09protocolSelect := html select.\x0a\x09\x09\x09\x09protocolSelect\x0a\x09\x09\x09onChange: [ self setMethodProtocol: protocolSelect asJQuery val ];\x0a\x09\x09\x09with: [\x0a\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09with: 'Method protocol';\x0a\x09\x09\x09\x09\x09at: 'disabled' put: 'disabled'.\x0a\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09class: 'important';\x0a\x09\x09\x09\x09\x09with: 'New...'.\x0a\x09\x09\x09\x09currentProtocol := selectedProtocol.\x0a\x09\x09\x09\x09(currentProtocol isNil and: [ selectedMethod notNil ])\x0a\x09\x09\x09\x09\x09ifTrue: [ currentProtocol := selectedMethod category ].\x0a\x09\x09\x09\x09self protocols do: [ :each | | option |\x0a\x09\x09\x09\x09\x09option := html option with: each.\x0a\x09\x09\x09\x09\x09currentProtocol = each ifTrue: [ option at: 'selected' put: 'selected' ] ] ].\x0a\x09\x09selectedMethod isNil ifFalse: [\x0a\x09\x09\x09referencesSelect := html select.\x0a\x09\x09\x09\x09\x09\x09referencesSelect\x0a\x09\x09\x09\x09onChange: [ self searchReferencesOf: referencesSelect asJQuery val ];\x0a\x09\x09\x09\x09with: [ |option|\x0a\x09\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09\x09with: 'References';\x0a\x09\x09\x09\x09\x09\x09at: 'disabled' put: 'disabled';\x0a\x09\x09\x09\x09\x09\x09at: 'selected' put: 'selected'.\x0a\x09\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09\x09class: 'important';\x0a\x09\x09\x09\x09\x09\x09with: selectedMethod selector.\x0a\x09\x09\x09\x09\x09selectedMethod messageSends sorted do: [ :each |\x0a\x09\x09\x09\x09\x09\x09html option with: each ]] ]].\x0a\x09selectedMethod isNil\x0a\x09\x09ifTrue: [\x0a\x09\x09\x09self hideMethodButtons.\x0a\x09\x09\x09\x09(selectedClass isNil or: [ selectedProtocol notNil ])\x0a\x09\x09\x09\x09\x09ifTrue: [ self hideClassButtons ]\x0a\x09\x09\x09\x09\x09ifFalse: [ self showClassButtons ]]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09self hideClassButtons.\x0a\x09\x09\x09self showMethodButtons ].\x0a\x09sourceArea val: self source",
  3688. messageSends: ["disableSaveButton", "contents:", "title:", "button", "onClick:", "addNewClass", "with:", "renameClass", "copyClass", "removeClass", "searchClassReferences", "removeMethod", "select", "onChange:", "setMethodProtocol:", "val", "asJQuery", "option", "at:put:", "class:", "ifTrue:", "and:", "isNil", "notNil", "category", "do:", "protocols", "=", "ifFalse:", "searchReferencesOf:", "selector", "sorted", "messageSends", "ifTrue:ifFalse:", "hideMethodButtons", "or:", "hideClassButtons", "showClassButtons", "showMethodButtons", "val:", "source"],
  3689. referencedClasses: []
  3690. }),
  3691. smalltalk.Browser);
  3692. smalltalk.addMethod(
  3693. smalltalk.method({
  3694. selector: "updateStatus",
  3695. protocol: 'updating',
  3696. fn: function (){
  3697. var self=this;
  3698. return smalltalk.withContext(function($ctx1) {
  3699. var $1,$2,$3;
  3700. $1=_st(_st(self["@sourceArea"])._val()).__eq(self._source());
  3701. if(smalltalk.assert($1)){
  3702. $2=self["@saveButton"];
  3703. if(($receiver = $2) == nil || $receiver == null){
  3704. $2;
  3705. } else {
  3706. _st(self["@saveButton"])._at_put_("disabled",true);
  3707. };
  3708. self["@unsavedChanges"]=false;
  3709. self["@unsavedChanges"];
  3710. } else {
  3711. $3=self["@saveButton"];
  3712. if(($receiver = $3) == nil || $receiver == null){
  3713. $3;
  3714. } else {
  3715. _st(self["@saveButton"])._removeAt_("disabled");
  3716. };
  3717. self["@unsavedChanges"]=true;
  3718. self["@unsavedChanges"];
  3719. };
  3720. return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{},smalltalk.Browser)})},
  3721. args: [],
  3722. 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 ]",
  3723. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"],
  3724. referencedClasses: []
  3725. }),
  3726. smalltalk.Browser);
  3727. smalltalk.addMethod(
  3728. smalltalk.method({
  3729. selector: "updateTabsList",
  3730. protocol: 'updating',
  3731. fn: function (){
  3732. var self=this;
  3733. return smalltalk.withContext(function($ctx1) {
  3734. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20;
  3735. _st(self["@tabsList"])._contents_((function(html){
  3736. var li;
  3737. return smalltalk.withContext(function($ctx2) {
  3738. li=_st(html)._li();
  3739. $ctx2.sendIdx["li"]=1;
  3740. li;
  3741. $1=_st(self["@selectedTab"]).__eq("instance");
  3742. $ctx2.sendIdx["="]=1;
  3743. if(smalltalk.assert($1)){
  3744. _st(li)._class_("selected");
  3745. $ctx2.sendIdx["class:"]=1;
  3746. };
  3747. $2=li;
  3748. _st($2)._with_((function(){
  3749. return smalltalk.withContext(function($ctx3) {
  3750. $3=_st(html)._span();
  3751. $ctx3.sendIdx["span"]=1;
  3752. _st($3)._class_("ltab");
  3753. $ctx3.sendIdx["class:"]=2;
  3754. $4=_st(html)._span();
  3755. $ctx3.sendIdx["span"]=2;
  3756. _st($4)._class_("mtab");
  3757. $ctx3.sendIdx["class:"]=3;
  3758. $5=_st($4)._with_("Instance");
  3759. $ctx3.sendIdx["with:"]=2;
  3760. $5;
  3761. $6=_st(html)._span();
  3762. $ctx3.sendIdx["span"]=3;
  3763. return _st($6)._class_("rtab");
  3764. $ctx3.sendIdx["class:"]=4;
  3765. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  3766. $ctx2.sendIdx["with:"]=1;
  3767. $7=_st($2)._onClick_((function(){
  3768. return smalltalk.withContext(function($ctx3) {
  3769. return self._selectTab_("instance");
  3770. $ctx3.sendIdx["selectTab:"]=1;
  3771. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  3772. $ctx2.sendIdx["onClick:"]=1;
  3773. $7;
  3774. li=_st(html)._li();
  3775. $ctx2.sendIdx["li"]=2;
  3776. li;
  3777. $8=_st(self["@selectedTab"]).__eq("class");
  3778. $ctx2.sendIdx["="]=2;
  3779. if(smalltalk.assert($8)){
  3780. _st(li)._class_("selected");
  3781. $ctx2.sendIdx["class:"]=5;
  3782. };
  3783. $9=li;
  3784. _st($9)._with_((function(){
  3785. return smalltalk.withContext(function($ctx3) {
  3786. $10=_st(html)._span();
  3787. $ctx3.sendIdx["span"]=4;
  3788. _st($10)._class_("ltab");
  3789. $ctx3.sendIdx["class:"]=6;
  3790. $11=_st(html)._span();
  3791. $ctx3.sendIdx["span"]=5;
  3792. _st($11)._class_("mtab");
  3793. $ctx3.sendIdx["class:"]=7;
  3794. $12=_st($11)._with_("Class");
  3795. $ctx3.sendIdx["with:"]=4;
  3796. $12;
  3797. $13=_st(html)._span();
  3798. $ctx3.sendIdx["span"]=6;
  3799. return _st($13)._class_("rtab");
  3800. $ctx3.sendIdx["class:"]=8;
  3801. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,6)})}));
  3802. $ctx2.sendIdx["with:"]=3;
  3803. $14=_st($9)._onClick_((function(){
  3804. return smalltalk.withContext(function($ctx3) {
  3805. return self._selectTab_("class");
  3806. $ctx3.sendIdx["selectTab:"]=2;
  3807. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)})}));
  3808. $ctx2.sendIdx["onClick:"]=2;
  3809. $14;
  3810. li=_st(html)._li();
  3811. li;
  3812. $15=_st(self["@selectedTab"]).__eq("comment");
  3813. if(smalltalk.assert($15)){
  3814. _st(li)._class_("selected");
  3815. $ctx2.sendIdx["class:"]=9;
  3816. };
  3817. $16=li;
  3818. _st($16)._with_((function(){
  3819. return smalltalk.withContext(function($ctx3) {
  3820. $17=_st(html)._span();
  3821. $ctx3.sendIdx["span"]=7;
  3822. _st($17)._class_("ltab");
  3823. $ctx3.sendIdx["class:"]=10;
  3824. $18=_st(html)._span();
  3825. $ctx3.sendIdx["span"]=8;
  3826. _st($18)._class_("mtab");
  3827. $ctx3.sendIdx["class:"]=11;
  3828. $19=_st($18)._with_("Comment");
  3829. $19;
  3830. return _st(_st(html)._span())._class_("rtab");
  3831. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)})}));
  3832. $ctx2.sendIdx["with:"]=5;
  3833. $20=_st($16)._onClick_((function(){
  3834. return smalltalk.withContext(function($ctx3) {
  3835. return self._selectTab_("comment");
  3836. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,10)})}));
  3837. return $20;
  3838. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1,1)})}));
  3839. return self}, function($ctx1) {$ctx1.fill(self,"updateTabsList",{},smalltalk.Browser)})},
  3840. args: [],
  3841. source: "updateTabsList\x0a\x09tabsList contents: [ :html || li |\x0a\x09li := html li.\x0a\x09selectedTab = #instance ifTrue: [ li class: 'selected' ].\x0a\x09li\x0a\x09\x09with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span class: 'mtab'; with: 'Instance'.\x0a\x09\x09html span class: 'rtab' ];\x0a\x09\x09onClick: [ self selectTab: #instance ].\x0a\x09li := html li.\x0a\x09selectedTab = #class ifTrue: [ li class: 'selected' ].\x0a\x09li\x0a\x09\x09with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span class: 'mtab'; with: 'Class'.\x0a\x09\x09html span class: 'rtab' ];\x0a\x09\x09onClick: [ self selectTab: #class ].\x0a\x09li := html li.\x0a\x09selectedTab = #comment ifTrue: [ li class: 'selected' ].\x0a\x09li\x0a\x09\x09with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span class: 'mtab'; with: 'Comment'.\x0a\x09\x09html span class: 'rtab' ];\x0a\x09\x09onClick: [ self selectTab: #comment ]]",
  3842. messageSends: ["contents:", "li", "ifTrue:", "=", "class:", "with:", "span", "onClick:", "selectTab:"],
  3843. referencedClasses: []
  3844. }),
  3845. smalltalk.Browser);
  3846. smalltalk.addMethod(
  3847. smalltalk.method({
  3848. selector: "open",
  3849. protocol: 'convenience',
  3850. fn: function (){
  3851. var self=this;
  3852. return smalltalk.withContext(function($ctx1) {
  3853. _st(self._new())._open();
  3854. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.Browser.klass)})},
  3855. args: [],
  3856. source: "open\x0a\x09self new open",
  3857. messageSends: ["open", "new"],
  3858. referencedClasses: []
  3859. }),
  3860. smalltalk.Browser.klass);
  3861. smalltalk.addMethod(
  3862. smalltalk.method({
  3863. selector: "openOn:",
  3864. protocol: 'convenience',
  3865. fn: function (aClass){
  3866. var self=this;
  3867. return smalltalk.withContext(function($ctx1) {
  3868. var $2,$3,$1;
  3869. $2=self._new();
  3870. _st($2)._open();
  3871. _st($2)._selectCategory_(_st(aClass)._category());
  3872. $3=_st($2)._selectClass_(aClass);
  3873. $1=$3;
  3874. return $1;
  3875. }, function($ctx1) {$ctx1.fill(self,"openOn:",{aClass:aClass},smalltalk.Browser.klass)})},
  3876. args: ["aClass"],
  3877. source: "openOn: aClass\x0a\x09^ self new\x0a\x09open;\x0a\x09selectCategory: aClass category;\x0a\x09selectClass: aClass",
  3878. messageSends: ["open", "new", "selectCategory:", "category", "selectClass:"],
  3879. referencedClasses: []
  3880. }),
  3881. smalltalk.Browser.klass);
  3882. smalltalk.addClass('Debugger', smalltalk.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  3883. smalltalk.addMethod(
  3884. smalltalk.method({
  3885. selector: "allVariables",
  3886. protocol: 'accessing',
  3887. fn: function (){
  3888. var self=this;
  3889. var all;
  3890. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  3891. return smalltalk.withContext(function($ctx1) {
  3892. var $3,$2,$1,$4;
  3893. all=_st($Dictionary())._new();
  3894. $3=self._receiver();
  3895. $ctx1.sendIdx["receiver"]=1;
  3896. $2=_st($3)._class();
  3897. $1=_st($2)._allInstanceVariableNames();
  3898. _st($1)._do_((function(each){
  3899. return smalltalk.withContext(function($ctx2) {
  3900. return _st(all)._at_put_(each,_st(self._receiver())._instVarAt_(each));
  3901. $ctx2.sendIdx["at:put:"]=1;
  3902. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  3903. _st(_st(self["@selectedContext"])._locals())._keysAndValuesDo_((function(key,value){
  3904. return smalltalk.withContext(function($ctx2) {
  3905. return _st(all)._at_put_(key,value);
  3906. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,2)})}));
  3907. $4=all;
  3908. return $4;
  3909. }, function($ctx1) {$ctx1.fill(self,"allVariables",{all:all},smalltalk.Debugger)})},
  3910. args: [],
  3911. source: "allVariables\x0a\x09| all |\x0a\x09all := Dictionary new.\x0a\x0a\x09self receiver class allInstanceVariableNames do: [ :each |\x0a\x09\x09all at: each put: (self receiver instVarAt: each) ].\x0a\x09\x0a\x09selectedContext locals keysAndValuesDo: [ :key :value |\x0a\x09\x09all at: key put: value ].\x0a\x09\x0a\x09^ all",
  3912. messageSends: ["new", "do:", "allInstanceVariableNames", "class", "receiver", "at:put:", "instVarAt:", "keysAndValuesDo:", "locals"],
  3913. referencedClasses: ["Dictionary"]
  3914. }),
  3915. smalltalk.Debugger);
  3916. smalltalk.addMethod(
  3917. smalltalk.method({
  3918. selector: "canBeClosed",
  3919. protocol: 'testing',
  3920. fn: function (){
  3921. var self=this;
  3922. return smalltalk.withContext(function($ctx1) {
  3923. return true;
  3924. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.Debugger)})},
  3925. args: [],
  3926. source: "canBeClosed\x0a\x09^ true",
  3927. messageSends: [],
  3928. referencedClasses: []
  3929. }),
  3930. smalltalk.Debugger);
  3931. smalltalk.addMethod(
  3932. smalltalk.method({
  3933. selector: "error",
  3934. protocol: 'accessing',
  3935. fn: function (){
  3936. var self=this;
  3937. return smalltalk.withContext(function($ctx1) {
  3938. var $1;
  3939. $1=self["@error"];
  3940. return $1;
  3941. }, function($ctx1) {$ctx1.fill(self,"error",{},smalltalk.Debugger)})},
  3942. args: [],
  3943. source: "error\x0a\x09^ error",
  3944. messageSends: [],
  3945. referencedClasses: []
  3946. }),
  3947. smalltalk.Debugger);
  3948. smalltalk.addMethod(
  3949. smalltalk.method({
  3950. selector: "error:",
  3951. protocol: 'accessing',
  3952. fn: function (anError){
  3953. var self=this;
  3954. return smalltalk.withContext(function($ctx1) {
  3955. self["@error"]=anError;
  3956. return self}, function($ctx1) {$ctx1.fill(self,"error:",{anError:anError},smalltalk.Debugger)})},
  3957. args: ["anError"],
  3958. source: "error: anError\x0a\x09error := anError",
  3959. messageSends: [],
  3960. referencedClasses: []
  3961. }),
  3962. smalltalk.Debugger);
  3963. smalltalk.addMethod(
  3964. smalltalk.method({
  3965. selector: "initialize",
  3966. protocol: 'initialization',
  3967. fn: function (){
  3968. var self=this;
  3969. return smalltalk.withContext(function($ctx1) {
  3970. smalltalk.Debugger.superclass.fn.prototype._initialize.apply(_st(self), []);
  3971. _st(self["@unsavedChanges"]).__eq(false);
  3972. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Debugger)})},
  3973. args: [],
  3974. source: "initialize\x0a\x09super initialize.\x0a\x09unsavedChanges = false",
  3975. messageSends: ["initialize", "="],
  3976. referencedClasses: []
  3977. }),
  3978. smalltalk.Debugger);
  3979. smalltalk.addMethod(
  3980. smalltalk.method({
  3981. selector: "inspectSelectedVariable",
  3982. protocol: 'actions',
  3983. fn: function (){
  3984. var self=this;
  3985. return smalltalk.withContext(function($ctx1) {
  3986. _st(self["@selectedVariable"])._inspect();
  3987. return self}, function($ctx1) {$ctx1.fill(self,"inspectSelectedVariable",{},smalltalk.Debugger)})},
  3988. args: [],
  3989. source: "inspectSelectedVariable\x0a\x09selectedVariable inspect",
  3990. messageSends: ["inspect"],
  3991. referencedClasses: []
  3992. }),
  3993. smalltalk.Debugger);
  3994. smalltalk.addMethod(
  3995. smalltalk.method({
  3996. selector: "label",
  3997. protocol: 'accessing',
  3998. fn: function (){
  3999. var self=this;
  4000. return smalltalk.withContext(function($ctx1) {
  4001. return "[ Debugger ]";
  4002. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.Debugger)})},
  4003. args: [],
  4004. source: "label\x0a\x09^ '[ Debugger ]'",
  4005. messageSends: [],
  4006. referencedClasses: []
  4007. }),
  4008. smalltalk.Debugger);
  4009. smalltalk.addMethod(
  4010. smalltalk.method({
  4011. selector: "method",
  4012. protocol: 'accessing',
  4013. fn: function (){
  4014. var self=this;
  4015. return smalltalk.withContext(function($ctx1) {
  4016. var $1;
  4017. $1=_st(self["@selectedContext"])._method();
  4018. return $1;
  4019. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.Debugger)})},
  4020. args: [],
  4021. source: "method\x0a\x09^ selectedContext method",
  4022. messageSends: ["method"],
  4023. referencedClasses: []
  4024. }),
  4025. smalltalk.Debugger);
  4026. smalltalk.addMethod(
  4027. smalltalk.method({
  4028. selector: "proceed",
  4029. protocol: 'actions',
  4030. fn: function (){
  4031. var self=this;
  4032. return smalltalk.withContext(function($ctx1) {
  4033. self._close();
  4034. _st(_st(self["@selectedContext"])._receiver())._perform_withArguments_(_st(self["@selectedContext"])._selector(),_st(self["@selectedContext"])._temps());
  4035. return self}, function($ctx1) {$ctx1.fill(self,"proceed",{},smalltalk.Debugger)})},
  4036. args: [],
  4037. source: "proceed\x0a\x09self close.\x0a\x09selectedContext receiver perform: selectedContext selector withArguments: selectedContext temps",
  4038. messageSends: ["close", "perform:withArguments:", "receiver", "selector", "temps"],
  4039. referencedClasses: []
  4040. }),
  4041. smalltalk.Debugger);
  4042. smalltalk.addMethod(
  4043. smalltalk.method({
  4044. selector: "receiver",
  4045. protocol: 'accessing',
  4046. fn: function (){
  4047. var self=this;
  4048. return smalltalk.withContext(function($ctx1) {
  4049. var $1;
  4050. $1=_st(self["@selectedContext"])._receiver();
  4051. return $1;
  4052. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.Debugger)})},
  4053. args: [],
  4054. source: "receiver\x0a\x09^ selectedContext receiver",
  4055. messageSends: ["receiver"],
  4056. referencedClasses: []
  4057. }),
  4058. smalltalk.Debugger);
  4059. smalltalk.addMethod(
  4060. smalltalk.method({
  4061. selector: "renderBottomPanelOn:",
  4062. protocol: 'rendering',
  4063. fn: function (html){
  4064. var self=this;
  4065. function $SourceArea(){return smalltalk.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  4066. return smalltalk.withContext(function($ctx1) {
  4067. var $1,$2;
  4068. $1=_st(html)._div();
  4069. $ctx1.sendIdx["div"]=1;
  4070. _st($1)._class_("amber_sourceCode debugger");
  4071. $ctx1.sendIdx["class:"]=1;
  4072. $2=_st($1)._with_((function(){
  4073. return smalltalk.withContext(function($ctx2) {
  4074. self["@sourceArea"]=_st($SourceArea())._new();
  4075. self["@sourceArea"];
  4076. return _st(self["@sourceArea"])._renderOn_(html);
  4077. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4078. self["@ul2"]=_st(_st(html)._ul())._class_("amber_column debugger variables");
  4079. $ctx1.sendIdx["class:"]=2;
  4080. self["@inspector"]=_st(_st(html)._div())._class_("amber_column debugger inspector");
  4081. _st(self["@sourceArea"])._onKeyUp_((function(){
  4082. return smalltalk.withContext(function($ctx2) {
  4083. return self._updateStatus();
  4084. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4085. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},smalltalk.Debugger)})},
  4086. args: ["html"],
  4087. 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 ]",
  4088. messageSends: ["class:", "div", "with:", "new", "renderOn:", "ul", "onKeyUp:", "updateStatus"],
  4089. referencedClasses: ["SourceArea"]
  4090. }),
  4091. smalltalk.Debugger);
  4092. smalltalk.addMethod(
  4093. smalltalk.method({
  4094. selector: "renderBoxOn:",
  4095. protocol: 'rendering',
  4096. fn: function (html){
  4097. var self=this;
  4098. return smalltalk.withContext(function($ctx1) {
  4099. var $1;
  4100. self._renderTopPanelOn_(html);
  4101. $1=self._renderBottomPanelOn_(html);
  4102. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.Debugger)})},
  4103. args: ["html"],
  4104. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
  4105. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"],
  4106. referencedClasses: []
  4107. }),
  4108. smalltalk.Debugger);
  4109. smalltalk.addMethod(
  4110. smalltalk.method({
  4111. selector: "renderButtonsOn:",
  4112. protocol: 'rendering',
  4113. fn: function (html){
  4114. var self=this;
  4115. return smalltalk.withContext(function($ctx1) {
  4116. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15;
  4117. $1=_st(html)._button();
  4118. $ctx1.sendIdx["button"]=1;
  4119. _st($1)._with_("Save");
  4120. $ctx1.sendIdx["with:"]=1;
  4121. $2=_st($1)._onClick_((function(){
  4122. return smalltalk.withContext(function($ctx2) {
  4123. return self._save();
  4124. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4125. $ctx1.sendIdx["onClick:"]=1;
  4126. self["@saveButton"]=$2;
  4127. $3=_st(html)._button();
  4128. $ctx1.sendIdx["button"]=2;
  4129. _st($3)._with_("DoIt");
  4130. $ctx1.sendIdx["with:"]=2;
  4131. $4=_st($3)._onClick_((function(){
  4132. return smalltalk.withContext(function($ctx2) {
  4133. return _st(self["@sourceArea"])._doIt();
  4134. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4135. $ctx1.sendIdx["onClick:"]=2;
  4136. $5=_st(html)._button();
  4137. $ctx1.sendIdx["button"]=3;
  4138. _st($5)._with_("PrintIt");
  4139. $ctx1.sendIdx["with:"]=3;
  4140. $6=_st($5)._onClick_((function(){
  4141. return smalltalk.withContext(function($ctx2) {
  4142. return _st(self["@sourceArea"])._printIt();
  4143. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  4144. $ctx1.sendIdx["onClick:"]=3;
  4145. $7=_st(html)._button();
  4146. $ctx1.sendIdx["button"]=4;
  4147. _st($7)._with_("InspectIt");
  4148. $ctx1.sendIdx["with:"]=4;
  4149. $8=_st($7)._onClick_((function(){
  4150. return smalltalk.withContext(function($ctx2) {
  4151. return _st(self["@sourceArea"])._inspectIt();
  4152. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  4153. $ctx1.sendIdx["onClick:"]=4;
  4154. $9=_st(html)._button();
  4155. $ctx1.sendIdx["button"]=5;
  4156. _st($9)._with_("Proceed");
  4157. $ctx1.sendIdx["with:"]=5;
  4158. $10=_st($9)._onClick_((function(){
  4159. return smalltalk.withContext(function($ctx2) {
  4160. return self._proceed();
  4161. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
  4162. $ctx1.sendIdx["onClick:"]=5;
  4163. $11=_st(html)._button();
  4164. $ctx1.sendIdx["button"]=6;
  4165. _st($11)._with_("Abandon");
  4166. $ctx1.sendIdx["with:"]=6;
  4167. $12=_st($11)._onClick_((function(){
  4168. return smalltalk.withContext(function($ctx2) {
  4169. return self._close();
  4170. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)})}));
  4171. $ctx1.sendIdx["onClick:"]=6;
  4172. $13=_st(html)._button();
  4173. _st($13)._class_("amber_button debugger inspect");
  4174. _st($13)._with_("Inspect");
  4175. $14=_st($13)._onClick_((function(){
  4176. return smalltalk.withContext(function($ctx2) {
  4177. return self._inspectSelectedVariable();
  4178. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,7)})}));
  4179. self["@inspectButton"]=$14;
  4180. self._updateSourceArea();
  4181. self._updateStatus();
  4182. self._updateVariablesList();
  4183. $15=self._updateInspector();
  4184. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.Debugger)})},
  4185. args: ["html"],
  4186. source: "renderButtonsOn: html\x0a\x09saveButton := html button\x0a\x09\x09with: 'Save';\x0a\x09\x09onClick: [ self save ].\x0a\x09html button\x0a\x09\x09with: 'DoIt';\x0a\x09\x09onClick: [ sourceArea doIt ].\x0a\x09html button\x0a\x09\x09with: 'PrintIt';\x0a\x09\x09onClick: [ sourceArea printIt ].\x0a\x09html button\x0a\x09\x09with: 'InspectIt';\x0a\x09\x09onClick: [ sourceArea inspectIt ].\x0a\x09html button\x0a\x09\x09with: 'Proceed';\x0a\x09\x09onClick: [ self proceed ].\x0a\x09html button\x0a\x09\x09with: 'Abandon';\x0a\x09\x09onClick: [ self close ].\x0a\x09inspectButton := html button\x0a\x09\x09class: 'amber_button debugger inspect';\x0a\x09\x09with: 'Inspect';\x0a\x09\x09onClick: [ self inspectSelectedVariable ].\x0a\x09self\x0a\x09\x09updateSourceArea;\x0a\x09\x09updateStatus;\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateInspector",
  4187. messageSends: ["with:", "button", "onClick:", "save", "doIt", "printIt", "inspectIt", "proceed", "close", "class:", "inspectSelectedVariable", "updateSourceArea", "updateStatus", "updateVariablesList", "updateInspector"],
  4188. referencedClasses: []
  4189. }),
  4190. smalltalk.Debugger);
  4191. smalltalk.addMethod(
  4192. smalltalk.method({
  4193. selector: "renderContext:on:",
  4194. protocol: 'rendering',
  4195. fn: function (aContext,html){
  4196. var self=this;
  4197. var li;
  4198. return smalltalk.withContext(function($ctx1) {
  4199. var $1,$2,$3,$4;
  4200. li=_st(html)._li();
  4201. $1=_st(self["@selectedContext"]).__eq(aContext);
  4202. if(smalltalk.assert($1)){
  4203. _st(li)._class_("selected");
  4204. };
  4205. $2=li;
  4206. _st($2)._with_(_st(aContext)._asString());
  4207. $3=_st($2)._onClick_((function(){
  4208. return smalltalk.withContext(function($ctx2) {
  4209. return self._selectContext_(aContext);
  4210. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4211. $4=_st(aContext)._outerContext();
  4212. $ctx1.sendIdx["outerContext"]=1;
  4213. if(($receiver = $4) == nil || $receiver == null){
  4214. $4;
  4215. } else {
  4216. self._renderContext_on_(_st(aContext)._outerContext(),html);
  4217. };
  4218. return self}, function($ctx1) {$ctx1.fill(self,"renderContext:on:",{aContext:aContext,html:html,li:li},smalltalk.Debugger)})},
  4219. args: ["aContext", "html"],
  4220. 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 ]",
  4221. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "asString", "onClick:", "selectContext:", "ifNotNil:", "outerContext", "renderContext:on:"],
  4222. referencedClasses: []
  4223. }),
  4224. smalltalk.Debugger);
  4225. smalltalk.addMethod(
  4226. smalltalk.method({
  4227. selector: "renderTopPanelOn:",
  4228. protocol: 'rendering',
  4229. fn: function (html){
  4230. var self=this;
  4231. return smalltalk.withContext(function($ctx1) {
  4232. var $1,$2,$4,$6,$8,$7,$5,$9,$10,$3;
  4233. $1=self._error();
  4234. $ctx1.sendIdx["error"]=1;
  4235. self["@selectedContext"]=_st($1)._context();
  4236. $ctx1.sendIdx["context"]=1;
  4237. $2=_st(html)._div();
  4238. $ctx1.sendIdx["div"]=1;
  4239. _st($2)._class_("top");
  4240. $ctx1.sendIdx["class:"]=1;
  4241. $3=_st($2)._with_((function(){
  4242. return smalltalk.withContext(function($ctx2) {
  4243. $4=_st(html)._div();
  4244. _st($4)._class_("label");
  4245. $ctx2.sendIdx["class:"]=2;
  4246. $6=$4;
  4247. $8=self._error();
  4248. $ctx2.sendIdx["error"]=2;
  4249. $7=_st($8)._messageText();
  4250. $5=_st($6)._with_($7);
  4251. $ctx2.sendIdx["with:"]=2;
  4252. $5;
  4253. $9=_st(html)._ul();
  4254. _st($9)._class_("amber_column debugger contexts");
  4255. $10=_st($9)._with_((function(){
  4256. return smalltalk.withContext(function($ctx3) {
  4257. return self._renderContext_on_(_st(self._error())._context(),html);
  4258. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4259. self["@ul"]=$10;
  4260. return self["@ul"];
  4261. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4262. $ctx1.sendIdx["with:"]=1;
  4263. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},smalltalk.Debugger)})},
  4264. args: ["html"],
  4265. 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 ]]",
  4266. messageSends: ["context", "error", "class:", "div", "with:", "messageText", "ul", "renderContext:on:"],
  4267. referencedClasses: []
  4268. }),
  4269. smalltalk.Debugger);
  4270. smalltalk.addMethod(
  4271. smalltalk.method({
  4272. selector: "save",
  4273. protocol: 'actions',
  4274. fn: function (){
  4275. var self=this;
  4276. var protocol;
  4277. return smalltalk.withContext(function($ctx1) {
  4278. var $4,$3,$2,$1;
  4279. $4=_st(self["@selectedContext"])._receiver();
  4280. $ctx1.sendIdx["receiver"]=1;
  4281. $3=_st($4)._class();
  4282. $ctx1.sendIdx["class"]=1;
  4283. $2=_st($3)._methodDictionary();
  4284. $1=_st($2)._at_(_st(self["@selectedContext"])._selector());
  4285. protocol=_st($1)._category();
  4286. _st(_st(_st(self["@selectedContext"])._receiver())._class())._compile_category_(_st(self["@sourceArea"])._val(),protocol);
  4287. self._updateStatus();
  4288. return self}, function($ctx1) {$ctx1.fill(self,"save",{protocol:protocol},smalltalk.Debugger)})},
  4289. args: [],
  4290. 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",
  4291. messageSends: ["category", "at:", "methodDictionary", "class", "receiver", "selector", "compile:category:", "val", "updateStatus"],
  4292. referencedClasses: []
  4293. }),
  4294. smalltalk.Debugger);
  4295. smalltalk.addMethod(
  4296. smalltalk.method({
  4297. selector: "selectContext:",
  4298. protocol: 'actions',
  4299. fn: function (aContext){
  4300. var self=this;
  4301. return smalltalk.withContext(function($ctx1) {
  4302. var $1;
  4303. self["@selectedContext"]=aContext;
  4304. self["@selectedVariable"]=nil;
  4305. self["@selectedVariableName"]=nil;
  4306. self._updateContextsList();
  4307. self._updateSourceArea();
  4308. self._updateInspector();
  4309. self._updateVariablesList();
  4310. $1=self._updateStatus();
  4311. return self}, function($ctx1) {$ctx1.fill(self,"selectContext:",{aContext:aContext},smalltalk.Debugger)})},
  4312. args: ["aContext"],
  4313. 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",
  4314. messageSends: ["updateContextsList", "updateSourceArea", "updateInspector", "updateVariablesList", "updateStatus"],
  4315. referencedClasses: []
  4316. }),
  4317. smalltalk.Debugger);
  4318. smalltalk.addMethod(
  4319. smalltalk.method({
  4320. selector: "selectVariable:named:",
  4321. protocol: 'actions',
  4322. fn: function (anObject,aString){
  4323. var self=this;
  4324. return smalltalk.withContext(function($ctx1) {
  4325. self["@selectedVariable"]=anObject;
  4326. self["@selectedVariableName"]=aString;
  4327. _st(self["@inspector"])._contents_((function(html){
  4328. return smalltalk.withContext(function($ctx2) {
  4329. return _st(html)._with_(_st(anObject)._printString());
  4330. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4331. self._updateVariablesList();
  4332. return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:named:",{anObject:anObject,aString:aString},smalltalk.Debugger)})},
  4333. args: ["anObject", "aString"],
  4334. source: "selectVariable: anObject named: aString\x0a\x09\x0a\x09selectedVariable := anObject.\x0a\x09selectedVariableName := aString.\x0a\x09inspector contents: [ :html | html with: anObject printString ].\x0a\x09self updateVariablesList",
  4335. messageSends: ["contents:", "with:", "printString", "updateVariablesList"],
  4336. referencedClasses: []
  4337. }),
  4338. smalltalk.Debugger);
  4339. smalltalk.addMethod(
  4340. smalltalk.method({
  4341. selector: "source",
  4342. protocol: 'accessing',
  4343. fn: function (){
  4344. var self=this;
  4345. return smalltalk.withContext(function($ctx1) {
  4346. var $2,$1;
  4347. $2=self._method();
  4348. $ctx1.sendIdx["method"]=1;
  4349. if(($receiver = $2) == nil || $receiver == null){
  4350. $1="Method doesn't exist!";
  4351. } else {
  4352. $1=_st(self._method())._source();
  4353. };
  4354. return $1;
  4355. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.Debugger)})},
  4356. args: [],
  4357. source: "source\x0a\x09^ self method\x0a\x09\x09ifNil: [ 'Method doesn''t exist!' ]\x0a\x09\x09ifNotNil: [ self method source ]",
  4358. messageSends: ["ifNil:ifNotNil:", "method", "source"],
  4359. referencedClasses: []
  4360. }),
  4361. smalltalk.Debugger);
  4362. smalltalk.addMethod(
  4363. smalltalk.method({
  4364. selector: "updateContextsList",
  4365. protocol: 'updating',
  4366. fn: function (){
  4367. var self=this;
  4368. return smalltalk.withContext(function($ctx1) {
  4369. _st(self["@ul"])._contents_((function(html){
  4370. return smalltalk.withContext(function($ctx2) {
  4371. return self._renderContext_on_(_st(self._error())._context(),html);
  4372. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4373. return self}, function($ctx1) {$ctx1.fill(self,"updateContextsList",{},smalltalk.Debugger)})},
  4374. args: [],
  4375. source: "updateContextsList\x0a\x09ul contents: [ :html |\x0a\x09\x09self renderContext: self error context on: html ]",
  4376. messageSends: ["contents:", "renderContext:on:", "context", "error"],
  4377. referencedClasses: []
  4378. }),
  4379. smalltalk.Debugger);
  4380. smalltalk.addMethod(
  4381. smalltalk.method({
  4382. selector: "updateInspector",
  4383. protocol: 'updating',
  4384. fn: function (){
  4385. var self=this;
  4386. return smalltalk.withContext(function($ctx1) {
  4387. _st(self["@inspector"])._contents_((function(html){
  4388. return smalltalk.withContext(function($ctx2) {
  4389. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4390. return self}, function($ctx1) {$ctx1.fill(self,"updateInspector",{},smalltalk.Debugger)})},
  4391. args: [],
  4392. source: "updateInspector\x0a\x09inspector contents: [ :html | ]",
  4393. messageSends: ["contents:"],
  4394. referencedClasses: []
  4395. }),
  4396. smalltalk.Debugger);
  4397. smalltalk.addMethod(
  4398. smalltalk.method({
  4399. selector: "updateSourceArea",
  4400. protocol: 'updating',
  4401. fn: function (){
  4402. var self=this;
  4403. return smalltalk.withContext(function($ctx1) {
  4404. _st(self["@sourceArea"])._val_(self._source());
  4405. return self}, function($ctx1) {$ctx1.fill(self,"updateSourceArea",{},smalltalk.Debugger)})},
  4406. args: [],
  4407. source: "updateSourceArea\x0a\x09sourceArea val: self source",
  4408. messageSends: ["val:", "source"],
  4409. referencedClasses: []
  4410. }),
  4411. smalltalk.Debugger);
  4412. smalltalk.addMethod(
  4413. smalltalk.method({
  4414. selector: "updateStatus",
  4415. protocol: 'updating',
  4416. fn: function (){
  4417. var self=this;
  4418. return smalltalk.withContext(function($ctx1) {
  4419. var $1,$2,$3;
  4420. $1=_st(_st(self["@sourceArea"])._val()).__eq(self._source());
  4421. if(smalltalk.assert($1)){
  4422. $2=self["@saveButton"];
  4423. if(($receiver = $2) == nil || $receiver == null){
  4424. $2;
  4425. } else {
  4426. _st(self["@saveButton"])._at_put_("disabled",true);
  4427. };
  4428. self["@unsavedChanges"]=false;
  4429. self["@unsavedChanges"];
  4430. } else {
  4431. $3=self["@saveButton"];
  4432. if(($receiver = $3) == nil || $receiver == null){
  4433. $3;
  4434. } else {
  4435. _st(self["@saveButton"])._removeAt_("disabled");
  4436. };
  4437. self["@unsavedChanges"]=true;
  4438. self["@unsavedChanges"];
  4439. };
  4440. return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{},smalltalk.Debugger)})},
  4441. args: [],
  4442. 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 ]",
  4443. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"],
  4444. referencedClasses: []
  4445. }),
  4446. smalltalk.Debugger);
  4447. smalltalk.addMethod(
  4448. smalltalk.method({
  4449. selector: "updateVariablesList",
  4450. protocol: 'updating',
  4451. fn: function (){
  4452. var self=this;
  4453. return smalltalk.withContext(function($ctx1) {
  4454. var $1,$2,$3,$4,$5,$6,$7;
  4455. _st(self["@ul2"])._contents_((function(html){
  4456. var li;
  4457. return smalltalk.withContext(function($ctx2) {
  4458. $1=_st(html)._li();
  4459. $ctx2.sendIdx["li"]=1;
  4460. _st($1)._with_("self");
  4461. $ctx2.sendIdx["with:"]=1;
  4462. $2=_st($1)._onClick_((function(){
  4463. return smalltalk.withContext(function($ctx3) {
  4464. return self._selectVariable_named_(self._receiver(),"self");
  4465. $ctx3.sendIdx["selectVariable:named:"]=1;
  4466. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4467. $ctx2.sendIdx["onClick:"]=1;
  4468. li=$2;
  4469. li;
  4470. $3=_st(self["@selectedVariableName"]).__eq("self");
  4471. $ctx2.sendIdx["="]=1;
  4472. if(smalltalk.assert($3)){
  4473. _st(li)._class_("selected");
  4474. $ctx2.sendIdx["class:"]=1;
  4475. };
  4476. return _st(self._allVariables())._keysAndValuesDo_((function(key,value){
  4477. return smalltalk.withContext(function($ctx3) {
  4478. $4=_st(html)._li();
  4479. _st($4)._with_(key);
  4480. $5=_st($4)._onClick_((function(){
  4481. return smalltalk.withContext(function($ctx4) {
  4482. return self._selectVariable_named_(value,key);
  4483. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  4484. li=$5;
  4485. li;
  4486. $6=_st(self["@selectedVariableName"]).__eq(key);
  4487. if(smalltalk.assert($6)){
  4488. return _st(li)._class_("selected");
  4489. };
  4490. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx2,4)})}));
  4491. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1,1)})}));
  4492. $7=self["@selectedVariable"];
  4493. if(($receiver = $7) == nil || $receiver == null){
  4494. _st(self["@inspectButton"])._at_put_("disabled",true);
  4495. } else {
  4496. _st(self["@inspectButton"])._removeAt_("disabled");
  4497. };
  4498. return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},smalltalk.Debugger)})},
  4499. args: [],
  4500. source: "updateVariablesList\x0a\x09ul2 contents: [ :html | | li |\x0a\x09\x09li := html li\x0a\x09\x09\x09with: 'self';\x0a\x09\x09\x09onClick: [ self selectVariable: self receiver named: 'self' ].\x0a\x09\x09\x09\x09selectedVariableName = 'self' ifTrue: [ li class: 'selected' ].\x0a\x09\x09\x0a\x09\x09self allVariables keysAndValuesDo: [ :key :value |\x0a\x09\x09\x09\x09\x09\x09li := html li\x0a\x09\x09\x09\x09\x09\x09\x09with: key;\x0a\x09\x09\x09\x09\x09\x09\x09onClick: [ self selectVariable: value named: key ].\x0a\x09\x09\x09\x09\x09\x09selectedVariableName = key ifTrue: [\x0a\x09\x09\x09\x09\x09\x09\x09li class: 'selected' ] ] ].\x0a\x09\x09\x09\x09\x09\x09\x09\x0a\x09selectedVariable\x0a\x09\x09ifNil: [ inspectButton at: 'disabled' put: true ]\x0a\x09\x09ifNotNil: [ inspectButton removeAt: 'disabled' ]",
  4501. messageSends: ["contents:", "with:", "li", "onClick:", "selectVariable:named:", "receiver", "ifTrue:", "=", "class:", "keysAndValuesDo:", "allVariables", "ifNil:ifNotNil:", "at:put:", "removeAt:"],
  4502. referencedClasses: []
  4503. }),
  4504. smalltalk.Debugger);
  4505. smalltalk.addClass('IDETranscript', smalltalk.TabWidget, ['textarea'], 'IDE');
  4506. smalltalk.addMethod(
  4507. smalltalk.method({
  4508. selector: "clear",
  4509. protocol: 'actions',
  4510. fn: function (){
  4511. var self=this;
  4512. return smalltalk.withContext(function($ctx1) {
  4513. _st(_st(self["@textarea"])._asJQuery())._val_("");
  4514. return self}, function($ctx1) {$ctx1.fill(self,"clear",{},smalltalk.IDETranscript)})},
  4515. args: [],
  4516. source: "clear\x0a\x09textarea asJQuery val: ''",
  4517. messageSends: ["val:", "asJQuery"],
  4518. referencedClasses: []
  4519. }),
  4520. smalltalk.IDETranscript);
  4521. smalltalk.addMethod(
  4522. smalltalk.method({
  4523. selector: "cr",
  4524. protocol: 'actions',
  4525. fn: function (){
  4526. var self=this;
  4527. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  4528. return smalltalk.withContext(function($ctx1) {
  4529. var $1;
  4530. $1=_st(self["@textarea"])._asJQuery();
  4531. $ctx1.sendIdx["asJQuery"]=1;
  4532. _st($1)._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st($String())._cr()));
  4533. return self}, function($ctx1) {$ctx1.fill(self,"cr",{},smalltalk.IDETranscript)})},
  4534. args: [],
  4535. source: "cr\x0a\x09textarea asJQuery val: textarea asJQuery val, String cr.",
  4536. messageSends: ["val:", "asJQuery", ",", "val", "cr"],
  4537. referencedClasses: ["String"]
  4538. }),
  4539. smalltalk.IDETranscript);
  4540. smalltalk.addMethod(
  4541. smalltalk.method({
  4542. selector: "label",
  4543. protocol: 'accessing',
  4544. fn: function (){
  4545. var self=this;
  4546. return smalltalk.withContext(function($ctx1) {
  4547. return "Transcript";
  4548. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.IDETranscript)})},
  4549. args: [],
  4550. source: "label\x0a\x09^ 'Transcript'",
  4551. messageSends: [],
  4552. referencedClasses: []
  4553. }),
  4554. smalltalk.IDETranscript);
  4555. smalltalk.addMethod(
  4556. smalltalk.method({
  4557. selector: "open",
  4558. protocol: 'actions',
  4559. fn: function (){
  4560. var self=this;
  4561. function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  4562. return smalltalk.withContext(function($ctx1) {
  4563. var $1,$2;
  4564. $1=_st($TabManager())._current();
  4565. _st($1)._open();
  4566. $2=_st($1)._selectTab_(self);
  4567. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.IDETranscript)})},
  4568. args: [],
  4569. source: "open\x0a\x09TabManager current\x0a\x09open;\x0a\x09selectTab: self",
  4570. messageSends: ["open", "current", "selectTab:"],
  4571. referencedClasses: ["TabManager"]
  4572. }),
  4573. smalltalk.IDETranscript);
  4574. smalltalk.addMethod(
  4575. smalltalk.method({
  4576. selector: "renderBoxOn:",
  4577. protocol: 'rendering',
  4578. fn: function (html){
  4579. var self=this;
  4580. return smalltalk.withContext(function($ctx1) {
  4581. var $1,$2;
  4582. self["@textarea"]=_st(html)._textarea();
  4583. $1=self["@textarea"];
  4584. _st($1)._class_("amber_transcript");
  4585. $2=_st($1)._at_put_("spellcheck","false");
  4586. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.IDETranscript)})},
  4587. args: ["html"],
  4588. source: "renderBoxOn: html\x0a\x09textarea := html textarea.\x0a\x09textarea\x0a\x09class: 'amber_transcript';\x0a\x09at: 'spellcheck' put: 'false'",
  4589. messageSends: ["textarea", "class:", "at:put:"],
  4590. referencedClasses: []
  4591. }),
  4592. smalltalk.IDETranscript);
  4593. smalltalk.addMethod(
  4594. smalltalk.method({
  4595. selector: "renderButtonsOn:",
  4596. protocol: 'rendering',
  4597. fn: function (html){
  4598. var self=this;
  4599. return smalltalk.withContext(function($ctx1) {
  4600. var $1,$2;
  4601. $1=_st(html)._button();
  4602. _st($1)._with_("Clear transcript");
  4603. $2=_st($1)._onClick_((function(){
  4604. return smalltalk.withContext(function($ctx2) {
  4605. return self._clear();
  4606. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4607. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.IDETranscript)})},
  4608. args: ["html"],
  4609. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Clear transcript';\x0a\x09onClick: [ self clear ]",
  4610. messageSends: ["with:", "button", "onClick:", "clear"],
  4611. referencedClasses: []
  4612. }),
  4613. smalltalk.IDETranscript);
  4614. smalltalk.addMethod(
  4615. smalltalk.method({
  4616. selector: "show:",
  4617. protocol: 'actions',
  4618. fn: function (anObject){
  4619. var self=this;
  4620. return smalltalk.withContext(function($ctx1) {
  4621. var $1,$2;
  4622. $1=self["@textarea"];
  4623. if(($receiver = $1) == nil || $receiver == null){
  4624. self._open();
  4625. } else {
  4626. $1;
  4627. };
  4628. $2=_st(self["@textarea"])._asJQuery();
  4629. $ctx1.sendIdx["asJQuery"]=1;
  4630. _st($2)._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st(anObject)._asString()));
  4631. return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},smalltalk.IDETranscript)})},
  4632. args: ["anObject"],
  4633. source: "show: anObject\x0a\x09textarea ifNil: [ self open ].\x0a\x09textarea asJQuery val: textarea asJQuery val, anObject asString.",
  4634. messageSends: ["ifNil:", "open", "val:", "asJQuery", ",", "val", "asString"],
  4635. referencedClasses: []
  4636. }),
  4637. smalltalk.IDETranscript);
  4638. smalltalk.IDETranscript.klass.iVarNames = ['current'];
  4639. smalltalk.addMethod(
  4640. smalltalk.method({
  4641. selector: "current",
  4642. protocol: 'instance creation',
  4643. fn: function (){
  4644. var self=this;
  4645. return smalltalk.withContext(function($ctx1) {
  4646. var $2,$1;
  4647. $2=self["@current"];
  4648. if(($receiver = $2) == nil || $receiver == null){
  4649. self["@current"]=smalltalk.IDETranscript.klass.superclass.fn.prototype._new.apply(_st(self), []);
  4650. $1=self["@current"];
  4651. } else {
  4652. $1=$2;
  4653. };
  4654. return $1;
  4655. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.IDETranscript.klass)})},
  4656. args: [],
  4657. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  4658. messageSends: ["ifNil:", "new"],
  4659. referencedClasses: []
  4660. }),
  4661. smalltalk.IDETranscript.klass);
  4662. smalltalk.addMethod(
  4663. smalltalk.method({
  4664. selector: "initialize",
  4665. protocol: 'initialization',
  4666. fn: function (){
  4667. var self=this;
  4668. function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
  4669. return smalltalk.withContext(function($ctx1) {
  4670. _st($Transcript())._register_(self._current());
  4671. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.IDETranscript.klass)})},
  4672. args: [],
  4673. source: "initialize\x0a\x09Transcript register: self current",
  4674. messageSends: ["register:", "current"],
  4675. referencedClasses: ["Transcript"]
  4676. }),
  4677. smalltalk.IDETranscript.klass);
  4678. smalltalk.addMethod(
  4679. smalltalk.method({
  4680. selector: "new",
  4681. protocol: 'instance creation',
  4682. fn: function (){
  4683. var self=this;
  4684. return smalltalk.withContext(function($ctx1) {
  4685. self._shouldNotImplement();
  4686. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.IDETranscript.klass)})},
  4687. args: [],
  4688. source: "new\x0a\x09self shouldNotImplement",
  4689. messageSends: ["shouldNotImplement"],
  4690. referencedClasses: []
  4691. }),
  4692. smalltalk.IDETranscript.klass);
  4693. smalltalk.addMethod(
  4694. smalltalk.method({
  4695. selector: "open",
  4696. protocol: 'instance creation',
  4697. fn: function (){
  4698. var self=this;
  4699. function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  4700. return smalltalk.withContext(function($ctx1) {
  4701. var $1,$2;
  4702. $1=_st($TabManager())._current();
  4703. $ctx1.sendIdx["current"]=1;
  4704. _st($1)._open();
  4705. $2=_st($1)._selectTab_(self._current());
  4706. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.IDETranscript.klass)})},
  4707. args: [],
  4708. source: "open\x0a\x09TabManager current\x0a\x09open;\x0a\x09selectTab: self current",
  4709. messageSends: ["open", "current", "selectTab:"],
  4710. referencedClasses: ["TabManager"]
  4711. }),
  4712. smalltalk.IDETranscript.klass);
  4713. smalltalk.addClass('Inspector', smalltalk.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  4714. smalltalk.addMethod(
  4715. smalltalk.method({
  4716. selector: "canBeClosed",
  4717. protocol: 'testing',
  4718. fn: function (){
  4719. var self=this;
  4720. return smalltalk.withContext(function($ctx1) {
  4721. return true;
  4722. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.Inspector)})},
  4723. args: [],
  4724. source: "canBeClosed\x0a\x09^ true",
  4725. messageSends: [],
  4726. referencedClasses: []
  4727. }),
  4728. smalltalk.Inspector);
  4729. smalltalk.addMethod(
  4730. smalltalk.method({
  4731. selector: "dive",
  4732. protocol: 'actions',
  4733. fn: function (){
  4734. var self=this;
  4735. return smalltalk.withContext(function($ctx1) {
  4736. _st(_st(self._variables())._at_(self._selectedVariable()))._inspect();
  4737. return self}, function($ctx1) {$ctx1.fill(self,"dive",{},smalltalk.Inspector)})},
  4738. args: [],
  4739. source: "dive\x0a\x09(self variables at: self selectedVariable) inspect",
  4740. messageSends: ["inspect", "at:", "variables", "selectedVariable"],
  4741. referencedClasses: []
  4742. }),
  4743. smalltalk.Inspector);
  4744. smalltalk.addMethod(
  4745. smalltalk.method({
  4746. selector: "inspect:",
  4747. protocol: 'actions',
  4748. fn: function (anObject){
  4749. var self=this;
  4750. return smalltalk.withContext(function($ctx1) {
  4751. self["@object"]=anObject;
  4752. self["@variables"]=[];
  4753. _st(self["@object"])._inspectOn_(self);
  4754. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Inspector)})},
  4755. args: ["anObject"],
  4756. source: "inspect: anObject\x0a\x09object := anObject.\x0a\x09variables := #().\x0a\x09object inspectOn: self",
  4757. messageSends: ["inspectOn:"],
  4758. referencedClasses: []
  4759. }),
  4760. smalltalk.Inspector);
  4761. smalltalk.addMethod(
  4762. smalltalk.method({
  4763. selector: "label",
  4764. protocol: 'accessing',
  4765. fn: function (){
  4766. var self=this;
  4767. return smalltalk.withContext(function($ctx1) {
  4768. var $2,$1;
  4769. $2=self["@label"];
  4770. if(($receiver = $2) == nil || $receiver == null){
  4771. $1="Inspector (nil)";
  4772. } else {
  4773. $1=$2;
  4774. };
  4775. return $1;
  4776. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.Inspector)})},
  4777. args: [],
  4778. source: "label\x0a\x09^ label ifNil: [ 'Inspector (nil)' ]",
  4779. messageSends: ["ifNil:"],
  4780. referencedClasses: []
  4781. }),
  4782. smalltalk.Inspector);
  4783. smalltalk.addMethod(
  4784. smalltalk.method({
  4785. selector: "refresh",
  4786. protocol: 'actions',
  4787. fn: function (){
  4788. var self=this;
  4789. return smalltalk.withContext(function($ctx1) {
  4790. var $1;
  4791. self._inspect_(self["@object"]);
  4792. self._updateVariablesList();
  4793. $1=self._updateValueTextarea();
  4794. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.Inspector)})},
  4795. args: [],
  4796. source: "refresh\x0a\x09self\x0a\x09\x09inspect: object;\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea",
  4797. messageSends: ["inspect:", "updateVariablesList", "updateValueTextarea"],
  4798. referencedClasses: []
  4799. }),
  4800. smalltalk.Inspector);
  4801. smalltalk.addMethod(
  4802. smalltalk.method({
  4803. selector: "renderBottomPanelOn:",
  4804. protocol: 'rendering',
  4805. fn: function (html){
  4806. var self=this;
  4807. function $SourceArea(){return smalltalk.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  4808. return smalltalk.withContext(function($ctx1) {
  4809. var $1,$3,$4,$2;
  4810. $1=_st(html)._div();
  4811. _st($1)._class_("amber_sourceCode");
  4812. $2=_st($1)._with_((function(){
  4813. return smalltalk.withContext(function($ctx2) {
  4814. $3=_st($SourceArea())._new();
  4815. _st($3)._receiver_(self["@object"]);
  4816. _st($3)._onDoIt_((function(){
  4817. return smalltalk.withContext(function($ctx3) {
  4818. return self._refresh();
  4819. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4820. $4=_st($3)._yourself();
  4821. self["@sourceArea"]=$4;
  4822. self["@sourceArea"];
  4823. return _st(self["@sourceArea"])._renderOn_(html);
  4824. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4825. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},smalltalk.Inspector)})},
  4826. args: ["html"],
  4827. source: "renderBottomPanelOn: html\x0a\x09html div\x0a\x09class: 'amber_sourceCode';\x0a\x09with: [\x0a\x09\x09sourceArea := SourceArea new\x0a\x09\x09receiver: object;\x0a\x09\x09onDoIt: [ self refresh ];\x0a\x09\x09yourself.\x0a\x09\x09\x09sourceArea renderOn: html ]",
  4828. messageSends: ["class:", "div", "with:", "receiver:", "new", "onDoIt:", "refresh", "yourself", "renderOn:"],
  4829. referencedClasses: ["SourceArea"]
  4830. }),
  4831. smalltalk.Inspector);
  4832. smalltalk.addMethod(
  4833. smalltalk.method({
  4834. selector: "renderBoxOn:",
  4835. protocol: 'rendering',
  4836. fn: function (html){
  4837. var self=this;
  4838. return smalltalk.withContext(function($ctx1) {
  4839. var $1;
  4840. self._renderTopPanelOn_(html);
  4841. $1=self._renderBottomPanelOn_(html);
  4842. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.Inspector)})},
  4843. args: ["html"],
  4844. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
  4845. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"],
  4846. referencedClasses: []
  4847. }),
  4848. smalltalk.Inspector);
  4849. smalltalk.addMethod(
  4850. smalltalk.method({
  4851. selector: "renderButtonsOn:",
  4852. protocol: 'rendering',
  4853. fn: function (html){
  4854. var self=this;
  4855. return smalltalk.withContext(function($ctx1) {
  4856. var $1,$3,$2,$4,$6,$5,$7,$8;
  4857. $1=_st(html)._button();
  4858. $ctx1.sendIdx["button"]=1;
  4859. _st($1)._with_("DoIt");
  4860. $ctx1.sendIdx["with:"]=1;
  4861. $2=_st($1)._onClick_((function(){
  4862. return smalltalk.withContext(function($ctx2) {
  4863. $3=self._sourceArea();
  4864. $ctx2.sendIdx["sourceArea"]=1;
  4865. return _st($3)._doIt();
  4866. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4867. $ctx1.sendIdx["onClick:"]=1;
  4868. $4=_st(html)._button();
  4869. $ctx1.sendIdx["button"]=2;
  4870. _st($4)._with_("PrintIt");
  4871. $ctx1.sendIdx["with:"]=2;
  4872. $5=_st($4)._onClick_((function(){
  4873. return smalltalk.withContext(function($ctx2) {
  4874. $6=self._sourceArea();
  4875. $ctx2.sendIdx["sourceArea"]=2;
  4876. return _st($6)._printIt();
  4877. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4878. $ctx1.sendIdx["onClick:"]=2;
  4879. $7=_st(html)._button();
  4880. _st($7)._with_("InspectIt");
  4881. $8=_st($7)._onClick_((function(){
  4882. return smalltalk.withContext(function($ctx2) {
  4883. return _st(self._sourceArea())._inspectIt();
  4884. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  4885. self._updateButtons();
  4886. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.Inspector)})},
  4887. args: ["html"],
  4888. 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",
  4889. messageSends: ["with:", "button", "onClick:", "doIt", "sourceArea", "printIt", "inspectIt", "updateButtons"],
  4890. referencedClasses: []
  4891. }),
  4892. smalltalk.Inspector);
  4893. smalltalk.addMethod(
  4894. smalltalk.method({
  4895. selector: "renderTopPanelOn:",
  4896. protocol: 'rendering',
  4897. fn: function (html){
  4898. var self=this;
  4899. return smalltalk.withContext(function($ctx1) {
  4900. var $1,$3,$4,$5,$7,$8,$9,$10,$6,$2,$11;
  4901. $1=_st(html)._div();
  4902. $ctx1.sendIdx["div"]=1;
  4903. _st($1)._class_("top");
  4904. $ctx1.sendIdx["class:"]=1;
  4905. $2=_st($1)._with_((function(){
  4906. return smalltalk.withContext(function($ctx2) {
  4907. self["@variablesList"]=_st(_st(html)._ul())._class_("amber_column variables");
  4908. $ctx2.sendIdx["class:"]=2;
  4909. self["@variablesList"];
  4910. $3=_st(html)._textarea();
  4911. _st($3)._class_("amber_column value");
  4912. $ctx2.sendIdx["class:"]=3;
  4913. _st($3)._at_put_("readonly","readonly");
  4914. $4=_st($3)._yourself();
  4915. self["@valueTextarea"]=$4;
  4916. self["@valueTextarea"];
  4917. $5=_st(html)._div();
  4918. $ctx2.sendIdx["div"]=2;
  4919. _st($5)._class_("amber_tabs inspector");
  4920. $ctx2.sendIdx["class:"]=4;
  4921. $6=_st($5)._with_((function(){
  4922. return smalltalk.withContext(function($ctx3) {
  4923. $7=_st(html)._button();
  4924. $ctx3.sendIdx["button"]=1;
  4925. _st($7)._class_("amber_button inspector refresh");
  4926. $ctx3.sendIdx["class:"]=5;
  4927. _st($7)._with_("Refresh");
  4928. $ctx3.sendIdx["with:"]=3;
  4929. $8=_st($7)._onClick_((function(){
  4930. return smalltalk.withContext(function($ctx4) {
  4931. return self._refresh();
  4932. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  4933. $ctx3.sendIdx["onClick:"]=1;
  4934. $8;
  4935. $9=_st(html)._button();
  4936. _st($9)._class_("amber_button inspector dive");
  4937. $ctx3.sendIdx["class:"]=6;
  4938. _st($9)._with_("Dive");
  4939. $10=_st($9)._onClick_((function(){
  4940. return smalltalk.withContext(function($ctx4) {
  4941. return self._dive();
  4942. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  4943. self["@diveButton"]=$10;
  4944. return self["@diveButton"];
  4945. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4946. $ctx2.sendIdx["with:"]=2;
  4947. $6;
  4948. return _st(_st(html)._div())._class_("amber_clear");
  4949. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4950. $ctx1.sendIdx["with:"]=1;
  4951. self._updateVariablesList();
  4952. $11=self._updateValueTextarea();
  4953. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},smalltalk.Inspector)})},
  4954. args: ["html"],
  4955. source: "renderTopPanelOn: html\x0a\x09html div\x0a\x09\x09class: 'top';\x0a\x09\x09with: [\x0a\x09\x09\x09variablesList := html ul class: 'amber_column variables'.\x0a\x09\x09\x09valueTextarea := html textarea class: 'amber_column value'; at: 'readonly' put: 'readonly'; yourself.\x0a\x09\x09\x09html div class: 'amber_tabs inspector'; with: [\x0a\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09class: 'amber_button inspector refresh';\x0a\x09\x09\x09\x09\x09with: 'Refresh';\x0a\x09\x09\x09\x09\x09onClick: [ self refresh ].\x0a\x09\x09\x09\x09diveButton := html button\x0a\x09\x09\x09\x09\x09class: 'amber_button inspector dive';\x0a\x09\x09\x09\x09\x09with: 'Dive';\x0a\x09\x09\x09\x09\x09onClick: [ self dive ]].\x0a\x09\x09\x09html div class: 'amber_clear' ].\x0a\x09self\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea.",
  4956. messageSends: ["class:", "div", "with:", "ul", "textarea", "at:put:", "yourself", "button", "onClick:", "refresh", "dive", "updateVariablesList", "updateValueTextarea"],
  4957. referencedClasses: []
  4958. }),
  4959. smalltalk.Inspector);
  4960. smalltalk.addMethod(
  4961. smalltalk.method({
  4962. selector: "selectVariable:",
  4963. protocol: 'updating',
  4964. fn: function (aString){
  4965. var self=this;
  4966. return smalltalk.withContext(function($ctx1) {
  4967. var $1;
  4968. self._selectedVariable_(aString);
  4969. self._updateVariablesList();
  4970. self._updateValueTextarea();
  4971. $1=self._updateButtons();
  4972. return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:",{aString:aString},smalltalk.Inspector)})},
  4973. args: ["aString"],
  4974. source: "selectVariable: aString\x0a\x09self selectedVariable: aString.\x0a\x09self\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea;\x0a\x09\x09updateButtons",
  4975. messageSends: ["selectedVariable:", "updateVariablesList", "updateValueTextarea", "updateButtons"],
  4976. referencedClasses: []
  4977. }),
  4978. smalltalk.Inspector);
  4979. smalltalk.addMethod(
  4980. smalltalk.method({
  4981. selector: "selectedVariable",
  4982. protocol: 'accessing',
  4983. fn: function (){
  4984. var self=this;
  4985. return smalltalk.withContext(function($ctx1) {
  4986. var $1;
  4987. $1=self["@selectedVariable"];
  4988. return $1;
  4989. }, function($ctx1) {$ctx1.fill(self,"selectedVariable",{},smalltalk.Inspector)})},
  4990. args: [],
  4991. source: "selectedVariable\x0a\x09^ selectedVariable",
  4992. messageSends: [],
  4993. referencedClasses: []
  4994. }),
  4995. smalltalk.Inspector);
  4996. smalltalk.addMethod(
  4997. smalltalk.method({
  4998. selector: "selectedVariable:",
  4999. protocol: 'accessing',
  5000. fn: function (aString){
  5001. var self=this;
  5002. return smalltalk.withContext(function($ctx1) {
  5003. self["@selectedVariable"]=aString;
  5004. return self}, function($ctx1) {$ctx1.fill(self,"selectedVariable:",{aString:aString},smalltalk.Inspector)})},
  5005. args: ["aString"],
  5006. source: "selectedVariable: aString\x0a\x09selectedVariable := aString",
  5007. messageSends: [],
  5008. referencedClasses: []
  5009. }),
  5010. smalltalk.Inspector);
  5011. smalltalk.addMethod(
  5012. smalltalk.method({
  5013. selector: "setLabel:",
  5014. protocol: 'accessing',
  5015. fn: function (aString){
  5016. var self=this;
  5017. return smalltalk.withContext(function($ctx1) {
  5018. self["@label"]=aString;
  5019. return self}, function($ctx1) {$ctx1.fill(self,"setLabel:",{aString:aString},smalltalk.Inspector)})},
  5020. args: ["aString"],
  5021. source: "setLabel: aString\x0a\x09label := aString",
  5022. messageSends: [],
  5023. referencedClasses: []
  5024. }),
  5025. smalltalk.Inspector);
  5026. smalltalk.addMethod(
  5027. smalltalk.method({
  5028. selector: "setVariables:",
  5029. protocol: 'accessing',
  5030. fn: function (aCollection){
  5031. var self=this;
  5032. return smalltalk.withContext(function($ctx1) {
  5033. self["@variables"]=aCollection;
  5034. return self}, function($ctx1) {$ctx1.fill(self,"setVariables:",{aCollection:aCollection},smalltalk.Inspector)})},
  5035. args: ["aCollection"],
  5036. source: "setVariables: aCollection\x0a\x09variables := aCollection",
  5037. messageSends: [],
  5038. referencedClasses: []
  5039. }),
  5040. smalltalk.Inspector);
  5041. smalltalk.addMethod(
  5042. smalltalk.method({
  5043. selector: "sourceArea",
  5044. protocol: 'accessing',
  5045. fn: function (){
  5046. var self=this;
  5047. return smalltalk.withContext(function($ctx1) {
  5048. var $1;
  5049. $1=self["@sourceArea"];
  5050. return $1;
  5051. }, function($ctx1) {$ctx1.fill(self,"sourceArea",{},smalltalk.Inspector)})},
  5052. args: [],
  5053. source: "sourceArea\x0a\x09^ sourceArea",
  5054. messageSends: [],
  5055. referencedClasses: []
  5056. }),
  5057. smalltalk.Inspector);
  5058. smalltalk.addMethod(
  5059. smalltalk.method({
  5060. selector: "updateButtons",
  5061. protocol: 'updating',
  5062. fn: function (){
  5063. var self=this;
  5064. return smalltalk.withContext(function($ctx1) {
  5065. var $3,$2,$1;
  5066. $3=self._selectedVariable();
  5067. $ctx1.sendIdx["selectedVariable"]=1;
  5068. $2=_st($3)._notNil();
  5069. $ctx1.sendIdx["notNil"]=1;
  5070. $1=_st($2)._and_((function(){
  5071. return smalltalk.withContext(function($ctx2) {
  5072. return _st(_st(self._variables())._at_(self._selectedVariable()))._notNil();
  5073. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  5074. if(smalltalk.assert($1)){
  5075. _st(self["@diveButton"])._removeAt_("disabled");
  5076. } else {
  5077. _st(self["@diveButton"])._at_put_("disabled",true);
  5078. };
  5079. return self}, function($ctx1) {$ctx1.fill(self,"updateButtons",{},smalltalk.Inspector)})},
  5080. args: [],
  5081. 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' ]",
  5082. messageSends: ["ifFalse:ifTrue:", "and:", "notNil", "selectedVariable", "at:", "variables", "at:put:", "removeAt:"],
  5083. referencedClasses: []
  5084. }),
  5085. smalltalk.Inspector);
  5086. smalltalk.addMethod(
  5087. smalltalk.method({
  5088. selector: "updateValueTextarea",
  5089. protocol: 'updating',
  5090. fn: function (){
  5091. var self=this;
  5092. return smalltalk.withContext(function($ctx1) {
  5093. var $1,$4,$3,$2;
  5094. $1=_st(self["@valueTextarea"])._asJQuery();
  5095. $4=self._selectedVariable();
  5096. $ctx1.sendIdx["selectedVariable"]=1;
  5097. $3=_st($4)._isNil();
  5098. if(smalltalk.assert($3)){
  5099. $2="";
  5100. } else {
  5101. $2=_st(_st(self._variables())._at_(self._selectedVariable()))._printString();
  5102. };
  5103. _st($1)._val_($2);
  5104. return self}, function($ctx1) {$ctx1.fill(self,"updateValueTextarea",{},smalltalk.Inspector)})},
  5105. args: [],
  5106. source: "updateValueTextarea\x0a\x09valueTextarea asJQuery val: (self selectedVariable isNil\x0a\x09\x09ifTrue: [ '' ]\x0a\x09\x09ifFalse: [ (self variables at: self selectedVariable) printString ])",
  5107. messageSends: ["val:", "asJQuery", "ifTrue:ifFalse:", "isNil", "selectedVariable", "printString", "at:", "variables"],
  5108. referencedClasses: []
  5109. }),
  5110. smalltalk.Inspector);
  5111. smalltalk.addMethod(
  5112. smalltalk.method({
  5113. selector: "updateVariablesList",
  5114. protocol: 'updating',
  5115. fn: function (){
  5116. var self=this;
  5117. return smalltalk.withContext(function($ctx1) {
  5118. var $1,$2,$3;
  5119. _st(self["@variablesList"])._contents_((function(html){
  5120. return smalltalk.withContext(function($ctx2) {
  5121. return _st(self._variables())._keysDo_((function(each){
  5122. var li;
  5123. return smalltalk.withContext(function($ctx3) {
  5124. li=_st(html)._li();
  5125. li;
  5126. $1=li;
  5127. _st($1)._with_(each);
  5128. $2=_st($1)._onClick_((function(){
  5129. return smalltalk.withContext(function($ctx4) {
  5130. return self._selectVariable_(each);
  5131. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5132. $2;
  5133. $3=_st(self._selectedVariable()).__eq(each);
  5134. if(smalltalk.assert($3)){
  5135. return _st(li)._class_("selected");
  5136. };
  5137. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  5138. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5139. return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},smalltalk.Inspector)})},
  5140. args: [],
  5141. source: "updateVariablesList\x0a\x09variablesList contents: [ :html |\x0a\x09\x09self variables keysDo: [ :each || li |\x0a\x09\x09\x09li := html li.\x0a\x09\x09\x09li\x0a\x09\x09\x09\x09with: each;\x0a\x09\x09\x09\x09onClick: [ self selectVariable: each ].\x0a\x09\x09\x09self selectedVariable = each ifTrue: [\x0a\x09\x09\x09\x09li class: 'selected' ]] ]",
  5142. messageSends: ["contents:", "keysDo:", "variables", "li", "with:", "onClick:", "selectVariable:", "ifTrue:", "=", "selectedVariable", "class:"],
  5143. referencedClasses: []
  5144. }),
  5145. smalltalk.Inspector);
  5146. smalltalk.addMethod(
  5147. smalltalk.method({
  5148. selector: "variables",
  5149. protocol: 'accessing',
  5150. fn: function (){
  5151. var self=this;
  5152. return smalltalk.withContext(function($ctx1) {
  5153. var $1;
  5154. $1=self["@variables"];
  5155. return $1;
  5156. }, function($ctx1) {$ctx1.fill(self,"variables",{},smalltalk.Inspector)})},
  5157. args: [],
  5158. source: "variables\x0a\x09^ variables",
  5159. messageSends: [],
  5160. referencedClasses: []
  5161. }),
  5162. smalltalk.Inspector);
  5163. smalltalk.addMethod(
  5164. smalltalk.method({
  5165. selector: "inspect:",
  5166. protocol: 'instance creation',
  5167. fn: function (anObject){
  5168. var self=this;
  5169. return smalltalk.withContext(function($ctx1) {
  5170. var $2,$3,$1;
  5171. $2=self._new();
  5172. _st($2)._inspect_(anObject);
  5173. _st($2)._open();
  5174. $3=_st($2)._yourself();
  5175. $1=$3;
  5176. return $1;
  5177. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Inspector.klass)})},
  5178. args: ["anObject"],
  5179. source: "inspect: anObject\x0a\x09^ self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09open;\x0a\x09\x09yourself",
  5180. messageSends: ["inspect:", "new", "open", "yourself"],
  5181. referencedClasses: []
  5182. }),
  5183. smalltalk.Inspector.klass);
  5184. smalltalk.addMethod(
  5185. smalltalk.method({
  5186. selector: "on:",
  5187. protocol: 'instance creation',
  5188. fn: function (anObject){
  5189. var self=this;
  5190. return smalltalk.withContext(function($ctx1) {
  5191. var $2,$3,$1;
  5192. $2=self._new();
  5193. _st($2)._inspect_(anObject);
  5194. $3=_st($2)._yourself();
  5195. $1=$3;
  5196. return $1;
  5197. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},smalltalk.Inspector.klass)})},
  5198. args: ["anObject"],
  5199. source: "on: anObject\x0a\x09^ self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09yourself",
  5200. messageSends: ["inspect:", "new", "yourself"],
  5201. referencedClasses: []
  5202. }),
  5203. smalltalk.Inspector.klass);
  5204. smalltalk.addClass('ProgressBar', smalltalk.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  5205. smalltalk.addMethod(
  5206. smalltalk.method({
  5207. selector: "percent",
  5208. protocol: 'accessing',
  5209. fn: function (){
  5210. var self=this;
  5211. return smalltalk.withContext(function($ctx1) {
  5212. var $2,$1;
  5213. $2=self["@percent"];
  5214. if(($receiver = $2) == nil || $receiver == null){
  5215. $1=(0);
  5216. } else {
  5217. $1=$2;
  5218. };
  5219. return $1;
  5220. }, function($ctx1) {$ctx1.fill(self,"percent",{},smalltalk.ProgressBar)})},
  5221. args: [],
  5222. source: "percent\x0a\x09^ percent ifNil: [ 0 ]",
  5223. messageSends: ["ifNil:"],
  5224. referencedClasses: []
  5225. }),
  5226. smalltalk.ProgressBar);
  5227. smalltalk.addMethod(
  5228. smalltalk.method({
  5229. selector: "percent:",
  5230. protocol: 'accessing',
  5231. fn: function (aNumber){
  5232. var self=this;
  5233. return smalltalk.withContext(function($ctx1) {
  5234. self["@percent"]=aNumber;
  5235. return self}, function($ctx1) {$ctx1.fill(self,"percent:",{aNumber:aNumber},smalltalk.ProgressBar)})},
  5236. args: ["aNumber"],
  5237. source: "percent: aNumber\x0a\x09percent := aNumber",
  5238. messageSends: [],
  5239. referencedClasses: []
  5240. }),
  5241. smalltalk.ProgressBar);
  5242. smalltalk.addMethod(
  5243. smalltalk.method({
  5244. selector: "renderOn:",
  5245. protocol: 'rendering',
  5246. fn: function (html){
  5247. var self=this;
  5248. return smalltalk.withContext(function($ctx1) {
  5249. var $1,$2;
  5250. $1=_st(html)._div();
  5251. _st($1)._class_("progress_bar");
  5252. $2=_st($1)._yourself();
  5253. self["@div"]=$2;
  5254. self._renderProgressBar();
  5255. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.ProgressBar)})},
  5256. args: ["html"],
  5257. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'progress_bar';\x0a\x09\x09yourself.\x0a\x09self renderProgressBar",
  5258. messageSends: ["class:", "div", "yourself", "renderProgressBar"],
  5259. referencedClasses: []
  5260. }),
  5261. smalltalk.ProgressBar);
  5262. smalltalk.addMethod(
  5263. smalltalk.method({
  5264. selector: "renderProgressBar",
  5265. protocol: 'rendering',
  5266. fn: function (){
  5267. var self=this;
  5268. return smalltalk.withContext(function($ctx1) {
  5269. var $1,$3,$4,$2;
  5270. _st(self["@div"])._contents_((function(html){
  5271. return smalltalk.withContext(function($ctx2) {
  5272. $1=_st(html)._div();
  5273. _st($1)._class_("progress");
  5274. $3=$1;
  5275. $4=_st("width:".__comma(_st(self._percent())._asString())).__comma("%");
  5276. $ctx2.sendIdx[","]=1;
  5277. $2=_st($3)._style_($4);
  5278. return $2;
  5279. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5280. return self}, function($ctx1) {$ctx1.fill(self,"renderProgressBar",{},smalltalk.ProgressBar)})},
  5281. args: [],
  5282. source: "renderProgressBar\x0a\x09div contents: [ :html |\x0a\x09\x09html div\x0a\x09\x09\x09class: 'progress';\x0a\x09\x09\x09style: 'width:', self percent asString, '%' ]",
  5283. messageSends: ["contents:", "class:", "div", "style:", ",", "asString", "percent"],
  5284. referencedClasses: []
  5285. }),
  5286. smalltalk.ProgressBar);
  5287. smalltalk.addMethod(
  5288. smalltalk.method({
  5289. selector: "updatePercent:",
  5290. protocol: 'updating',
  5291. fn: function (aNumber){
  5292. var self=this;
  5293. return smalltalk.withContext(function($ctx1) {
  5294. self._percent_(aNumber);
  5295. self._renderProgressBar();
  5296. return self}, function($ctx1) {$ctx1.fill(self,"updatePercent:",{aNumber:aNumber},smalltalk.ProgressBar)})},
  5297. args: ["aNumber"],
  5298. source: "updatePercent: aNumber\x0a\x09self percent: aNumber.\x0a\x09self renderProgressBar",
  5299. messageSends: ["percent:", "renderProgressBar"],
  5300. referencedClasses: []
  5301. }),
  5302. smalltalk.ProgressBar);
  5303. smalltalk.addClass('ReferencesBrowser', smalltalk.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  5304. smalltalk.addMethod(
  5305. smalltalk.method({
  5306. selector: "canBeClosed",
  5307. protocol: 'testing',
  5308. fn: function (){
  5309. var self=this;
  5310. return smalltalk.withContext(function($ctx1) {
  5311. return true;
  5312. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.ReferencesBrowser)})},
  5313. args: [],
  5314. source: "canBeClosed\x0a\x09^ true",
  5315. messageSends: [],
  5316. referencedClasses: []
  5317. }),
  5318. smalltalk.ReferencesBrowser);
  5319. smalltalk.addMethod(
  5320. smalltalk.method({
  5321. selector: "classesAndMetaclasses",
  5322. protocol: 'accessing',
  5323. fn: function (){
  5324. var self=this;
  5325. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  5326. return smalltalk.withContext(function($ctx1) {
  5327. var $3,$2,$1;
  5328. $3=_st($Smalltalk())._current();
  5329. $ctx1.sendIdx["current"]=1;
  5330. $2=_st($3)._classes();
  5331. $ctx1.sendIdx["classes"]=1;
  5332. $1=_st($2).__comma(_st(_st(_st($Smalltalk())._current())._classes())._collect_((function(each){
  5333. return smalltalk.withContext(function($ctx2) {
  5334. return _st(each)._class();
  5335. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})));
  5336. return $1;
  5337. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},smalltalk.ReferencesBrowser)})},
  5338. args: [],
  5339. source: "classesAndMetaclasses\x0a\x09^ Smalltalk current classes, (Smalltalk current classes collect: [ :each | each class ])",
  5340. messageSends: [",", "classes", "current", "collect:", "class"],
  5341. referencedClasses: ["Smalltalk"]
  5342. }),
  5343. smalltalk.ReferencesBrowser);
  5344. smalltalk.addMethod(
  5345. smalltalk.method({
  5346. selector: "implementors",
  5347. protocol: 'accessing',
  5348. fn: function (){
  5349. var self=this;
  5350. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  5351. return smalltalk.withContext(function($ctx1) {
  5352. var $2,$1;
  5353. $2=self["@implementors"];
  5354. if(($receiver = $2) == nil || $receiver == null){
  5355. self["@implementors"]=_st($Array())._new();
  5356. $1=self["@implementors"];
  5357. } else {
  5358. $1=$2;
  5359. };
  5360. return $1;
  5361. }, function($ctx1) {$ctx1.fill(self,"implementors",{},smalltalk.ReferencesBrowser)})},
  5362. args: [],
  5363. source: "implementors\x0a\x09^ implementors ifNil: [ implementors := Array new ]",
  5364. messageSends: ["ifNil:", "new"],
  5365. referencedClasses: ["Array"]
  5366. }),
  5367. smalltalk.ReferencesBrowser);
  5368. smalltalk.addMethod(
  5369. smalltalk.method({
  5370. selector: "initialize",
  5371. protocol: 'initialization',
  5372. fn: function (){
  5373. var self=this;
  5374. return smalltalk.withContext(function($ctx1) {
  5375. smalltalk.ReferencesBrowser.superclass.fn.prototype._initialize.apply(_st(self), []);
  5376. self["@selector"]="";
  5377. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ReferencesBrowser)})},
  5378. args: [],
  5379. source: "initialize\x0a\x09super initialize.\x0a\x09selector := ''",
  5380. messageSends: ["initialize"],
  5381. referencedClasses: []
  5382. }),
  5383. smalltalk.ReferencesBrowser);
  5384. smalltalk.addMethod(
  5385. smalltalk.method({
  5386. selector: "label",
  5387. protocol: 'accessing',
  5388. fn: function (){
  5389. var self=this;
  5390. return smalltalk.withContext(function($ctx1) {
  5391. return "[ References ]";
  5392. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.ReferencesBrowser)})},
  5393. args: [],
  5394. source: "label\x0a\x09^ '[ References ]'",
  5395. messageSends: [],
  5396. referencedClasses: []
  5397. }),
  5398. smalltalk.ReferencesBrowser);
  5399. smalltalk.addMethod(
  5400. smalltalk.method({
  5401. selector: "matches",
  5402. protocol: 'accessing',
  5403. fn: function (){
  5404. var self=this;
  5405. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  5406. return smalltalk.withContext(function($ctx1) {
  5407. var $2,$1;
  5408. $2=self["@matches"];
  5409. if(($receiver = $2) == nil || $receiver == null){
  5410. self["@matches"]=_st($Array())._new();
  5411. $1=self["@matches"];
  5412. } else {
  5413. $1=$2;
  5414. };
  5415. return $1;
  5416. }, function($ctx1) {$ctx1.fill(self,"matches",{},smalltalk.ReferencesBrowser)})},
  5417. args: [],
  5418. source: "matches\x0a\x09^ matches ifNil: [ matches := Array new ]",
  5419. messageSends: ["ifNil:", "new"],
  5420. referencedClasses: ["Array"]
  5421. }),
  5422. smalltalk.ReferencesBrowser);
  5423. smalltalk.addMethod(
  5424. smalltalk.method({
  5425. selector: "openBrowserOn:",
  5426. protocol: 'actions',
  5427. fn: function (aMethod){
  5428. var self=this;
  5429. var browser;
  5430. function $Browser(){return smalltalk.Browser||(typeof Browser=="undefined"?nil:Browser)}
  5431. return smalltalk.withContext(function($ctx1) {
  5432. var $3,$2,$4,$1,$5,$6,$7;
  5433. $3=_st(aMethod)._methodClass();
  5434. $ctx1.sendIdx["methodClass"]=1;
  5435. $2=_st($3)._isMetaclass();
  5436. $ctx1.sendIdx["isMetaclass"]=1;
  5437. if(smalltalk.assert($2)){
  5438. $4=_st(aMethod)._methodClass();
  5439. $ctx1.sendIdx["methodClass"]=2;
  5440. $1=_st($4)._instanceClass();
  5441. } else {
  5442. $1=_st(aMethod)._methodClass();
  5443. $ctx1.sendIdx["methodClass"]=3;
  5444. };
  5445. browser=_st($Browser())._openOn_($1);
  5446. $5=_st(_st(aMethod)._methodClass())._isMetaclass();
  5447. if(smalltalk.assert($5)){
  5448. _st(browser)._selectTab_("class");
  5449. };
  5450. $6=browser;
  5451. _st($6)._selectProtocol_(_st(aMethod)._category());
  5452. $7=_st($6)._selectMethod_(aMethod);
  5453. return self}, function($ctx1) {$ctx1.fill(self,"openBrowserOn:",{aMethod:aMethod,browser:browser},smalltalk.ReferencesBrowser)})},
  5454. args: ["aMethod"],
  5455. source: "openBrowserOn: aMethod\x0a\x09| browser |\x0a\x09browser := Browser openOn: (aMethod methodClass isMetaclass\x0a\x09\x09ifTrue: [ aMethod methodClass instanceClass ] ifFalse: [ aMethod methodClass ]).\x0a\x09aMethod methodClass isMetaclass ifTrue: [ browser selectTab: #class ].\x0a\x09browser\x0a\x09\x09selectProtocol: aMethod category;\x0a\x09\x09selectMethod: aMethod",
  5456. messageSends: ["openOn:", "ifTrue:ifFalse:", "isMetaclass", "methodClass", "instanceClass", "ifTrue:", "selectTab:", "selectProtocol:", "category", "selectMethod:"],
  5457. referencedClasses: ["Browser"]
  5458. }),
  5459. smalltalk.ReferencesBrowser);
  5460. smalltalk.addMethod(
  5461. smalltalk.method({
  5462. selector: "referencedClasses",
  5463. protocol: 'accessing',
  5464. fn: function (){
  5465. var self=this;
  5466. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  5467. return smalltalk.withContext(function($ctx1) {
  5468. var $2,$1;
  5469. $2=self["@referencedClasses"];
  5470. if(($receiver = $2) == nil || $receiver == null){
  5471. self["@referencedClasses"]=_st($Array())._new();
  5472. $1=self["@referencedClasses"];
  5473. } else {
  5474. $1=$2;
  5475. };
  5476. return $1;
  5477. }, function($ctx1) {$ctx1.fill(self,"referencedClasses",{},smalltalk.ReferencesBrowser)})},
  5478. args: [],
  5479. source: "referencedClasses\x0a\x09^ referencedClasses ifNil: [ referencedClasses := Array new ]",
  5480. messageSends: ["ifNil:", "new"],
  5481. referencedClasses: ["Array"]
  5482. }),
  5483. smalltalk.ReferencesBrowser);
  5484. smalltalk.addMethod(
  5485. smalltalk.method({
  5486. selector: "renderBoxOn:",
  5487. protocol: 'rendering',
  5488. fn: function (html){
  5489. var self=this;
  5490. return smalltalk.withContext(function($ctx1) {
  5491. var $1;
  5492. self._renderInputOn_(html);
  5493. self._renderImplementorsOn_(html);
  5494. self._renderSendersOn_(html);
  5495. self._renderReferencedClassesOn_(html);
  5496. $1=self._renderMatchesOn_(html);
  5497. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.ReferencesBrowser)})},
  5498. args: ["html"],
  5499. 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",
  5500. messageSends: ["renderInputOn:", "renderImplementorsOn:", "renderSendersOn:", "renderReferencedClassesOn:", "renderMatchesOn:"],
  5501. referencedClasses: []
  5502. }),
  5503. smalltalk.ReferencesBrowser);
  5504. smalltalk.addMethod(
  5505. smalltalk.method({
  5506. selector: "renderImplementorsOn:",
  5507. protocol: 'rendering',
  5508. fn: function (html){
  5509. var self=this;
  5510. return smalltalk.withContext(function($ctx1) {
  5511. self["@implementorsList"]=_st(_st(html)._ul())._class_("amber_column implementors");
  5512. self._updateImplementorsList();
  5513. return self}, function($ctx1) {$ctx1.fill(self,"renderImplementorsOn:",{html:html},smalltalk.ReferencesBrowser)})},
  5514. args: ["html"],
  5515. source: "renderImplementorsOn: html\x0a\x09implementorsList := html ul class: 'amber_column implementors'.\x0a\x09self updateImplementorsList",
  5516. messageSends: ["class:", "ul", "updateImplementorsList"],
  5517. referencedClasses: []
  5518. }),
  5519. smalltalk.ReferencesBrowser);
  5520. smalltalk.addMethod(
  5521. smalltalk.method({
  5522. selector: "renderInputOn:",
  5523. protocol: 'rendering',
  5524. fn: function (html){
  5525. var self=this;
  5526. return smalltalk.withContext(function($ctx1) {
  5527. var $1,$2;
  5528. $1=_st(html)._input();
  5529. _st($1)._class_("implementors");
  5530. $2=_st($1)._yourself();
  5531. self["@input"]=$2;
  5532. _st(_st(self["@input"])._asJQuery())._val_(self["@selector"]);
  5533. self._setInputEvents();
  5534. return self}, function($ctx1) {$ctx1.fill(self,"renderInputOn:",{html:html},smalltalk.ReferencesBrowser)})},
  5535. args: ["html"],
  5536. source: "renderInputOn: html\x0a\x09input := html input\x0a\x09\x09class: 'implementors';\x0a\x09\x09yourself.\x0a\x09input asJQuery val: selector.\x0a\x09self setInputEvents",
  5537. messageSends: ["class:", "input", "yourself", "val:", "asJQuery", "setInputEvents"],
  5538. referencedClasses: []
  5539. }),
  5540. smalltalk.ReferencesBrowser);
  5541. smalltalk.addMethod(
  5542. smalltalk.method({
  5543. selector: "renderMatchesOn:",
  5544. protocol: 'rendering',
  5545. fn: function (html){
  5546. var self=this;
  5547. return smalltalk.withContext(function($ctx1) {
  5548. self["@matchesList"]=_st(_st(html)._ul())._class_("amber_column matches");
  5549. self._updateMatchesList();
  5550. return self}, function($ctx1) {$ctx1.fill(self,"renderMatchesOn:",{html:html},smalltalk.ReferencesBrowser)})},
  5551. args: ["html"],
  5552. source: "renderMatchesOn: html\x0a\x09matchesList := html ul class: 'amber_column matches'.\x0a\x09self updateMatchesList",
  5553. messageSends: ["class:", "ul", "updateMatchesList"],
  5554. referencedClasses: []
  5555. }),
  5556. smalltalk.ReferencesBrowser);
  5557. smalltalk.addMethod(
  5558. smalltalk.method({
  5559. selector: "renderReferencedClassesOn:",
  5560. protocol: 'rendering',
  5561. fn: function (html){
  5562. var self=this;
  5563. return smalltalk.withContext(function($ctx1) {
  5564. self["@referencedClassesList"]=_st(_st(html)._ul())._class_("amber_column referenced_classes");
  5565. self._updateReferencedClassesList();
  5566. return self}, function($ctx1) {$ctx1.fill(self,"renderReferencedClassesOn:",{html:html},smalltalk.ReferencesBrowser)})},
  5567. args: ["html"],
  5568. source: "renderReferencedClassesOn: html\x0a\x09referencedClassesList := html ul class: 'amber_column referenced_classes'.\x0a\x09self updateReferencedClassesList",
  5569. messageSends: ["class:", "ul", "updateReferencedClassesList"],
  5570. referencedClasses: []
  5571. }),
  5572. smalltalk.ReferencesBrowser);
  5573. smalltalk.addMethod(
  5574. smalltalk.method({
  5575. selector: "renderSendersOn:",
  5576. protocol: 'rendering',
  5577. fn: function (html){
  5578. var self=this;
  5579. return smalltalk.withContext(function($ctx1) {
  5580. self["@sendersList"]=_st(_st(html)._ul())._class_("amber_column senders");
  5581. self._updateSendersList();
  5582. return self}, function($ctx1) {$ctx1.fill(self,"renderSendersOn:",{html:html},smalltalk.ReferencesBrowser)})},
  5583. args: ["html"],
  5584. source: "renderSendersOn: html\x0a\x09sendersList := html ul class: 'amber_column senders'.\x0a\x09self updateSendersList",
  5585. messageSends: ["class:", "ul", "updateSendersList"],
  5586. referencedClasses: []
  5587. }),
  5588. smalltalk.ReferencesBrowser);
  5589. smalltalk.addMethod(
  5590. smalltalk.method({
  5591. selector: "search:",
  5592. protocol: 'actions',
  5593. fn: function (aString){
  5594. var self=this;
  5595. return smalltalk.withContext(function($ctx1) {
  5596. var $1;
  5597. self._searchReferencesFor_(aString);
  5598. self._updateImplementorsList();
  5599. self._updateSendersList();
  5600. self._updateReferencedClassesList();
  5601. $1=self._updateMatchesList();
  5602. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.ReferencesBrowser)})},
  5603. args: ["aString"],
  5604. source: "search: aString\x0a\x09self\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09updateImplementorsList;\x0a\x09\x09updateSendersList;\x0a\x09\x09updateReferencedClassesList;\x0a\x09\x09updateMatchesList",
  5605. messageSends: ["searchReferencesFor:", "updateImplementorsList", "updateSendersList", "updateReferencedClassesList", "updateMatchesList"],
  5606. referencedClasses: []
  5607. }),
  5608. smalltalk.ReferencesBrowser);
  5609. smalltalk.addMethod(
  5610. smalltalk.method({
  5611. selector: "searchMethodSource",
  5612. protocol: 'actions',
  5613. fn: function (){
  5614. var self=this;
  5615. var regex;
  5616. return smalltalk.withContext(function($ctx1) {
  5617. var $1;
  5618. regex=_st(self["@selector"])._allButFirst();
  5619. _st(self._classesAndMetaclasses())._do_((function(each){
  5620. return smalltalk.withContext(function($ctx2) {
  5621. return _st(_st(each)._methodDictionary())._valuesDo_((function(value){
  5622. return smalltalk.withContext(function($ctx3) {
  5623. $1=_st(_st(value)._source())._match_(regex);
  5624. if(smalltalk.assert($1)){
  5625. return _st(self._matches())._add_(value);
  5626. };
  5627. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx2,2)})}));
  5628. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5629. return self}, function($ctx1) {$ctx1.fill(self,"searchMethodSource",{regex:regex},smalltalk.ReferencesBrowser)})},
  5630. args: [],
  5631. source: "searchMethodSource\x0a\x09| regex |\x0a\x09regex := selector allButFirst.\x0a\x09self classesAndMetaclasses do: [ :each |\x0a\x09\x09each methodDictionary valuesDo: [ :value |\x0a\x09\x09\x09(value source match: regex) ifTrue: [\x0a\x09\x09\x09\x09self matches add: value ]] ]",
  5632. messageSends: ["allButFirst", "do:", "classesAndMetaclasses", "valuesDo:", "methodDictionary", "ifTrue:", "match:", "source", "add:", "matches"],
  5633. referencedClasses: []
  5634. }),
  5635. smalltalk.ReferencesBrowser);
  5636. smalltalk.addMethod(
  5637. smalltalk.method({
  5638. selector: "searchReferencedClasses",
  5639. protocol: 'actions',
  5640. fn: function (){
  5641. var self=this;
  5642. return smalltalk.withContext(function($ctx1) {
  5643. var $2,$1;
  5644. _st(self._classesAndMetaclasses())._do_((function(each){
  5645. return smalltalk.withContext(function($ctx2) {
  5646. return _st(_st(each)._methodDictionary())._valuesDo_((function(value){
  5647. return smalltalk.withContext(function($ctx3) {
  5648. $2=_st(value)._referencedClasses();
  5649. $ctx3.sendIdx["referencedClasses"]=1;
  5650. $1=_st($2)._includes_(self["@selector"]);
  5651. if(smalltalk.assert($1)){
  5652. return _st(self._referencedClasses())._add_(value);
  5653. };
  5654. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx2,2)})}));
  5655. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5656. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencedClasses",{},smalltalk.ReferencesBrowser)})},
  5657. args: [],
  5658. source: "searchReferencedClasses\x0a\x09self classesAndMetaclasses do: [ :each |\x0a\x09\x09each methodDictionary valuesDo: [ :value |\x0a\x09\x09\x09(value referencedClasses includes: selector) ifTrue: [\x0a\x09\x09\x09\x09self referencedClasses add: value ]] ]",
  5659. messageSends: ["do:", "classesAndMetaclasses", "valuesDo:", "methodDictionary", "ifTrue:", "includes:", "referencedClasses", "add:"],
  5660. referencedClasses: []
  5661. }),
  5662. smalltalk.ReferencesBrowser);
  5663. smalltalk.addMethod(
  5664. smalltalk.method({
  5665. selector: "searchReferencesFor:",
  5666. protocol: 'actions',
  5667. fn: function (aString){
  5668. var self=this;
  5669. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  5670. return smalltalk.withContext(function($ctx1) {
  5671. var $1;
  5672. self["@selector"]=aString;
  5673. self["@implementors"]=_st($Array())._new();
  5674. $ctx1.sendIdx["new"]=1;
  5675. self["@senders"]=_st($Array())._new();
  5676. $ctx1.sendIdx["new"]=2;
  5677. self["@referencedClasses"]=_st($Array())._new();
  5678. $ctx1.sendIdx["new"]=3;
  5679. self["@matches"]=_st($Array())._new();
  5680. self._searchMethodSource();
  5681. $1=_st(self["@selector"])._match_("^[A-Z]");
  5682. if(smalltalk.assert($1)){
  5683. self._searchReferencedClasses();
  5684. } else {
  5685. self._searchSelectorReferences();
  5686. };
  5687. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesFor:",{aString:aString},smalltalk.ReferencesBrowser)})},
  5688. args: ["aString"],
  5689. 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 ]",
  5690. messageSends: ["new", "searchMethodSource", "ifFalse:ifTrue:", "match:", "searchSelectorReferences", "searchReferencedClasses"],
  5691. referencedClasses: ["Array"]
  5692. }),
  5693. smalltalk.ReferencesBrowser);
  5694. smalltalk.addMethod(
  5695. smalltalk.method({
  5696. selector: "searchSelectorReferences",
  5697. protocol: 'actions',
  5698. fn: function (){
  5699. var self=this;
  5700. return smalltalk.withContext(function($ctx1) {
  5701. var $1,$2;
  5702. _st(self._classesAndMetaclasses())._do_((function(each){
  5703. return smalltalk.withContext(function($ctx2) {
  5704. return _st(_st(each)._methodDictionary())._keysAndValuesDo_((function(key,value){
  5705. return smalltalk.withContext(function($ctx3) {
  5706. $1=_st(key).__eq(self["@selector"]);
  5707. if(smalltalk.assert($1)){
  5708. _st(self._implementors())._add_(value);
  5709. $ctx3.sendIdx["add:"]=1;
  5710. };
  5711. $2=_st(_st(value)._messageSends())._includes_(self["@selector"]);
  5712. if(smalltalk.assert($2)){
  5713. return _st(self._senders())._add_(value);
  5714. };
  5715. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx2,2)})}));
  5716. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5717. return self}, function($ctx1) {$ctx1.fill(self,"searchSelectorReferences",{},smalltalk.ReferencesBrowser)})},
  5718. args: [],
  5719. 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 ]] ]",
  5720. messageSends: ["do:", "classesAndMetaclasses", "keysAndValuesDo:", "methodDictionary", "ifTrue:", "=", "add:", "implementors", "includes:", "messageSends", "senders"],
  5721. referencedClasses: []
  5722. }),
  5723. smalltalk.ReferencesBrowser);
  5724. smalltalk.addMethod(
  5725. smalltalk.method({
  5726. selector: "selector",
  5727. protocol: 'accessing',
  5728. fn: function (){
  5729. var self=this;
  5730. return smalltalk.withContext(function($ctx1) {
  5731. var $1;
  5732. $1=self["@selector"];
  5733. return $1;
  5734. }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.ReferencesBrowser)})},
  5735. args: [],
  5736. source: "selector\x0a\x09^ selector",
  5737. messageSends: [],
  5738. referencedClasses: []
  5739. }),
  5740. smalltalk.ReferencesBrowser);
  5741. smalltalk.addMethod(
  5742. smalltalk.method({
  5743. selector: "senders",
  5744. protocol: 'accessing',
  5745. fn: function (){
  5746. var self=this;
  5747. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  5748. return smalltalk.withContext(function($ctx1) {
  5749. var $2,$1;
  5750. $2=self["@senders"];
  5751. if(($receiver = $2) == nil || $receiver == null){
  5752. self["@senders"]=_st($Array())._new();
  5753. $1=self["@senders"];
  5754. } else {
  5755. $1=$2;
  5756. };
  5757. return $1;
  5758. }, function($ctx1) {$ctx1.fill(self,"senders",{},smalltalk.ReferencesBrowser)})},
  5759. args: [],
  5760. source: "senders\x0a\x09^ senders ifNil: [ senders := Array new ]",
  5761. messageSends: ["ifNil:", "new"],
  5762. referencedClasses: ["Array"]
  5763. }),
  5764. smalltalk.ReferencesBrowser);
  5765. smalltalk.addMethod(
  5766. smalltalk.method({
  5767. selector: "setInputEvents",
  5768. protocol: 'private',
  5769. fn: function (){
  5770. var self=this;
  5771. return smalltalk.withContext(function($ctx1) {
  5772. var $1,$3,$2;
  5773. $1=self["@input"];
  5774. _st($1)._onKeyUp_((function(){
  5775. return smalltalk.withContext(function($ctx2) {
  5776. self["@timer"]=_st((function(){
  5777. return smalltalk.withContext(function($ctx3) {
  5778. return self._search_(_st(_st(self["@input"])._asJQuery())._val());
  5779. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}))._valueWithTimeout_((100));
  5780. return self["@timer"];
  5781. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  5782. $2=_st($1)._onKeyDown_((function(){
  5783. return smalltalk.withContext(function($ctx2) {
  5784. $3=self["@timer"];
  5785. if(($receiver = $3) == nil || $receiver == null){
  5786. return $3;
  5787. } else {
  5788. return _st(self["@timer"])._clearTimeout();
  5789. };
  5790. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  5791. return self}, function($ctx1) {$ctx1.fill(self,"setInputEvents",{},smalltalk.ReferencesBrowser)})},
  5792. args: [],
  5793. source: "setInputEvents\x0a\x09input\x0a\x09\x09onKeyUp: [ timer := [ self search: input asJQuery val ] valueWithTimeout: 100 ];\x0a\x09\x09onKeyDown: [ timer ifNotNil: [ timer clearTimeout ]]",
  5794. messageSends: ["onKeyUp:", "valueWithTimeout:", "search:", "val", "asJQuery", "onKeyDown:", "ifNotNil:", "clearTimeout"],
  5795. referencedClasses: []
  5796. }),
  5797. smalltalk.ReferencesBrowser);
  5798. smalltalk.addMethod(
  5799. smalltalk.method({
  5800. selector: "updateImplementorsList",
  5801. protocol: 'updating',
  5802. fn: function (){
  5803. var self=this;
  5804. return smalltalk.withContext(function($ctx1) {
  5805. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5806. _st(self["@implementorsList"])._contents_((function(html){
  5807. return smalltalk.withContext(function($ctx2) {
  5808. $1=_st(html)._li();
  5809. $ctx2.sendIdx["li"]=1;
  5810. _st($1)._class_("column_label");
  5811. $2=$1;
  5812. $7=self._implementors();
  5813. $ctx2.sendIdx["implementors"]=1;
  5814. $6=_st($7)._size();
  5815. $5=_st($6)._asString();
  5816. $ctx2.sendIdx["asString"]=1;
  5817. $4="Implementors (".__comma($5);
  5818. $ctx2.sendIdx[","]=2;
  5819. $3=_st($4).__comma(")");
  5820. $ctx2.sendIdx[","]=1;
  5821. _st($2)._with_($3);
  5822. $ctx2.sendIdx["with:"]=1;
  5823. $8=_st($1)._style_("font-weight: bold");
  5824. $8;
  5825. return _st(self._implementors())._do_((function(each){
  5826. var li;
  5827. return smalltalk.withContext(function($ctx3) {
  5828. li=_st(html)._li();
  5829. li;
  5830. $9=li;
  5831. $10=$9;
  5832. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(self._selector());
  5833. $ctx3.sendIdx[","]=3;
  5834. _st($10)._with_($11);
  5835. $12=_st($9)._onClick_((function(){
  5836. return smalltalk.withContext(function($ctx4) {
  5837. return self._openBrowserOn_(each);
  5838. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5839. return $12;
  5840. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  5841. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5842. return self}, function($ctx1) {$ctx1.fill(self,"updateImplementorsList",{},smalltalk.ReferencesBrowser)})},
  5843. args: [],
  5844. source: "updateImplementorsList\x0a\x09implementorsList contents: [ :html |\x0a\x09html li\x0a\x09\x09class: 'column_label';\x0a\x09\x09with: 'Implementors (', self implementors size asString, ')';\x0a\x09\x09style: 'font-weight: bold'.\x0a\x09self implementors do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09li\x0a\x09\x09with: (each methodClass asString, ' >> ', self selector);\x0a\x09\x09onClick: [ self openBrowserOn: each ]] ]",
  5845. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "implementors", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5846. referencedClasses: []
  5847. }),
  5848. smalltalk.ReferencesBrowser);
  5849. smalltalk.addMethod(
  5850. smalltalk.method({
  5851. selector: "updateMatchesList",
  5852. protocol: 'updating',
  5853. fn: function (){
  5854. var self=this;
  5855. return smalltalk.withContext(function($ctx1) {
  5856. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5857. _st(self["@matchesList"])._contents_((function(html){
  5858. return smalltalk.withContext(function($ctx2) {
  5859. $1=_st(html)._li();
  5860. $ctx2.sendIdx["li"]=1;
  5861. _st($1)._class_("column_label");
  5862. $2=$1;
  5863. $7=self._matches();
  5864. $ctx2.sendIdx["matches"]=1;
  5865. $6=_st($7)._size();
  5866. $5=_st($6)._asString();
  5867. $ctx2.sendIdx["asString"]=1;
  5868. $4="Regex matches (".__comma($5);
  5869. $ctx2.sendIdx[","]=2;
  5870. $3=_st($4).__comma(")");
  5871. $ctx2.sendIdx[","]=1;
  5872. _st($2)._with_($3);
  5873. $ctx2.sendIdx["with:"]=1;
  5874. $8=_st($1)._style_("font-weight: bold");
  5875. $8;
  5876. return _st(self._matches())._do_((function(each){
  5877. var li;
  5878. return smalltalk.withContext(function($ctx3) {
  5879. li=_st(html)._li();
  5880. li;
  5881. $9=li;
  5882. $10=$9;
  5883. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector());
  5884. $ctx3.sendIdx[","]=3;
  5885. _st($10)._with_($11);
  5886. $12=_st($9)._onClick_((function(){
  5887. return smalltalk.withContext(function($ctx4) {
  5888. return self._openBrowserOn_(each);
  5889. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5890. return $12;
  5891. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  5892. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5893. return self}, function($ctx1) {$ctx1.fill(self,"updateMatchesList",{},smalltalk.ReferencesBrowser)})},
  5894. args: [],
  5895. source: "updateMatchesList\x0a\x09matchesList contents: [ :html |\x0a\x09html li\x0a\x09\x09class: 'column_label';\x0a\x09\x09with: 'Regex matches (', self matches size asString, ')';\x0a\x09\x09style: 'font-weight: bold'.\x0a\x09self matches do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09li\x0a\x09\x09with: (each methodClass asString, ' >> ', each selector);\x0a\x09\x09onClick: [ self openBrowserOn: each ]] ]",
  5896. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "matches", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5897. referencedClasses: []
  5898. }),
  5899. smalltalk.ReferencesBrowser);
  5900. smalltalk.addMethod(
  5901. smalltalk.method({
  5902. selector: "updateReferencedClassesList",
  5903. protocol: 'updating',
  5904. fn: function (){
  5905. var self=this;
  5906. return smalltalk.withContext(function($ctx1) {
  5907. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5908. _st(self["@referencedClassesList"])._contents_((function(html){
  5909. return smalltalk.withContext(function($ctx2) {
  5910. $1=_st(html)._li();
  5911. $ctx2.sendIdx["li"]=1;
  5912. _st($1)._class_("column_label");
  5913. $2=$1;
  5914. $7=self._referencedClasses();
  5915. $ctx2.sendIdx["referencedClasses"]=1;
  5916. $6=_st($7)._size();
  5917. $5=_st($6)._asString();
  5918. $ctx2.sendIdx["asString"]=1;
  5919. $4="Class references (".__comma($5);
  5920. $ctx2.sendIdx[","]=2;
  5921. $3=_st($4).__comma(")");
  5922. $ctx2.sendIdx[","]=1;
  5923. _st($2)._with_($3);
  5924. $ctx2.sendIdx["with:"]=1;
  5925. $8=_st($1)._style_("font-weight: bold");
  5926. $8;
  5927. return _st(self._referencedClasses())._do_((function(each){
  5928. return smalltalk.withContext(function($ctx3) {
  5929. $9=_st(html)._li();
  5930. $10=$9;
  5931. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector());
  5932. $ctx3.sendIdx[","]=3;
  5933. _st($10)._with_($11);
  5934. $12=_st($9)._onClick_((function(){
  5935. return smalltalk.withContext(function($ctx4) {
  5936. return self._openBrowserOn_(each);
  5937. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5938. return $12;
  5939. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  5940. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5941. return self}, function($ctx1) {$ctx1.fill(self,"updateReferencedClassesList",{},smalltalk.ReferencesBrowser)})},
  5942. args: [],
  5943. 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 ]] ]",
  5944. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "referencedClasses", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5945. referencedClasses: []
  5946. }),
  5947. smalltalk.ReferencesBrowser);
  5948. smalltalk.addMethod(
  5949. smalltalk.method({
  5950. selector: "updateSendersList",
  5951. protocol: 'updating',
  5952. fn: function (){
  5953. var self=this;
  5954. return smalltalk.withContext(function($ctx1) {
  5955. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5956. _st(self["@sendersList"])._contents_((function(html){
  5957. return smalltalk.withContext(function($ctx2) {
  5958. $1=_st(html)._li();
  5959. $ctx2.sendIdx["li"]=1;
  5960. _st($1)._class_("column_label");
  5961. $2=$1;
  5962. $7=self._senders();
  5963. $ctx2.sendIdx["senders"]=1;
  5964. $6=_st($7)._size();
  5965. $5=_st($6)._asString();
  5966. $ctx2.sendIdx["asString"]=1;
  5967. $4="Senders (".__comma($5);
  5968. $ctx2.sendIdx[","]=2;
  5969. $3=_st($4).__comma(")");
  5970. $ctx2.sendIdx[","]=1;
  5971. _st($2)._with_($3);
  5972. $ctx2.sendIdx["with:"]=1;
  5973. $8=_st($1)._style_("font-weight: bold");
  5974. $8;
  5975. return _st(self._senders())._do_((function(each){
  5976. return smalltalk.withContext(function($ctx3) {
  5977. $9=_st(html)._li();
  5978. $10=$9;
  5979. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector());
  5980. $ctx3.sendIdx[","]=3;
  5981. _st($10)._with_($11);
  5982. $12=_st($9)._onClick_((function(){
  5983. return smalltalk.withContext(function($ctx4) {
  5984. return self._openBrowserOn_(each);
  5985. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5986. return $12;
  5987. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  5988. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5989. return self}, function($ctx1) {$ctx1.fill(self,"updateSendersList",{},smalltalk.ReferencesBrowser)})},
  5990. args: [],
  5991. 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 ]] ]",
  5992. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "senders", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5993. referencedClasses: []
  5994. }),
  5995. smalltalk.ReferencesBrowser);
  5996. smalltalk.addMethod(
  5997. smalltalk.method({
  5998. selector: "search:",
  5999. protocol: 'instance creation',
  6000. fn: function (aString){
  6001. var self=this;
  6002. return smalltalk.withContext(function($ctx1) {
  6003. var $2,$3,$1;
  6004. $2=self._new();
  6005. _st($2)._searchReferencesFor_(aString);
  6006. $3=_st($2)._open();
  6007. $1=$3;
  6008. return $1;
  6009. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.ReferencesBrowser.klass)})},
  6010. args: ["aString"],
  6011. source: "search: aString\x0a\x09^ self new\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09open",
  6012. messageSends: ["searchReferencesFor:", "new", "open"],
  6013. referencedClasses: []
  6014. }),
  6015. smalltalk.ReferencesBrowser.klass);
  6016. smalltalk.addClass('TestRunner', smalltalk.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  6017. smalltalk.addMethod(
  6018. smalltalk.method({
  6019. selector: "allClasses",
  6020. protocol: 'accessing',
  6021. fn: function (){
  6022. var self=this;
  6023. function $TestCase(){return smalltalk.TestCase||(typeof TestCase=="undefined"?nil:TestCase)}
  6024. return smalltalk.withContext(function($ctx1) {
  6025. var $1;
  6026. $1=_st(_st($TestCase())._allSubclasses())._select_((function(each){
  6027. return smalltalk.withContext(function($ctx2) {
  6028. return _st(_st(each)._isAbstract())._not();
  6029. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6030. return $1;
  6031. }, function($ctx1) {$ctx1.fill(self,"allClasses",{},smalltalk.TestRunner)})},
  6032. args: [],
  6033. source: "allClasses\x0a\x09^ TestCase allSubclasses select: [ :each | each isAbstract not ]",
  6034. messageSends: ["select:", "allSubclasses", "not", "isAbstract"],
  6035. referencedClasses: ["TestCase"]
  6036. }),
  6037. smalltalk.TestRunner);
  6038. smalltalk.addMethod(
  6039. smalltalk.method({
  6040. selector: "classes",
  6041. protocol: 'accessing',
  6042. fn: function (){
  6043. var self=this;
  6044. return smalltalk.withContext(function($ctx1) {
  6045. var $2,$1;
  6046. $1=_st(_st(self._allClasses())._select_((function(each){
  6047. return smalltalk.withContext(function($ctx2) {
  6048. return _st(self._selectedCategories())._includes_(_st(each)._category());
  6049. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._sort_((function(a,b){
  6050. return smalltalk.withContext(function($ctx2) {
  6051. $2=_st(a)._name();
  6052. $ctx2.sendIdx["name"]=1;
  6053. return _st($2).__gt(_st(b)._name());
  6054. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)})}));
  6055. return $1;
  6056. }, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.TestRunner)})},
  6057. args: [],
  6058. source: "classes\x0a\x09^ (self allClasses\x0a\x09select: [ :each | self selectedCategories includes: each category ])\x0a\x09sort: [ :a :b | a name > b name ]",
  6059. messageSends: ["sort:", "select:", "allClasses", "includes:", "selectedCategories", "category", ">", "name"],
  6060. referencedClasses: []
  6061. }),
  6062. smalltalk.TestRunner);
  6063. smalltalk.addMethod(
  6064. smalltalk.method({
  6065. selector: "initialize",
  6066. protocol: 'initialization',
  6067. fn: function (){
  6068. var self=this;
  6069. function $TestResult(){return smalltalk.TestResult||(typeof TestResult=="undefined"?nil:TestResult)}
  6070. return smalltalk.withContext(function($ctx1) {
  6071. smalltalk.TestRunner.superclass.fn.prototype._initialize.apply(_st(self), []);
  6072. self["@result"]=_st($TestResult())._new();
  6073. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.TestRunner)})},
  6074. args: [],
  6075. source: "initialize\x0a\x09super initialize.\x0a\x09result := TestResult new",
  6076. messageSends: ["initialize", "new"],
  6077. referencedClasses: ["TestResult"]
  6078. }),
  6079. smalltalk.TestRunner);
  6080. smalltalk.addMethod(
  6081. smalltalk.method({
  6082. selector: "isSelectedCategory:",
  6083. protocol: 'testing',
  6084. fn: function (aCategory){
  6085. var self=this;
  6086. return smalltalk.withContext(function($ctx1) {
  6087. var $1;
  6088. $1=_st(self._selectedCategories())._includes_(aCategory);
  6089. return $1;
  6090. }, function($ctx1) {$ctx1.fill(self,"isSelectedCategory:",{aCategory:aCategory},smalltalk.TestRunner)})},
  6091. args: ["aCategory"],
  6092. source: "isSelectedCategory: aCategory\x0a\x09^ (self selectedCategories includes: aCategory)",
  6093. messageSends: ["includes:", "selectedCategories"],
  6094. referencedClasses: []
  6095. }),
  6096. smalltalk.TestRunner);
  6097. smalltalk.addMethod(
  6098. smalltalk.method({
  6099. selector: "isSelectedClass:",
  6100. protocol: 'testing',
  6101. fn: function (aClass){
  6102. var self=this;
  6103. return smalltalk.withContext(function($ctx1) {
  6104. var $1;
  6105. $1=_st(self._selectedClasses())._includes_(aClass);
  6106. return $1;
  6107. }, function($ctx1) {$ctx1.fill(self,"isSelectedClass:",{aClass:aClass},smalltalk.TestRunner)})},
  6108. args: ["aClass"],
  6109. source: "isSelectedClass: aClass\x0a\x09^ (self selectedClasses includes: aClass)",
  6110. messageSends: ["includes:", "selectedClasses"],
  6111. referencedClasses: []
  6112. }),
  6113. smalltalk.TestRunner);
  6114. smalltalk.addMethod(
  6115. smalltalk.method({
  6116. selector: "label",
  6117. protocol: 'accessing',
  6118. fn: function (){
  6119. var self=this;
  6120. return smalltalk.withContext(function($ctx1) {
  6121. return "SUnit";
  6122. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.TestRunner)})},
  6123. args: [],
  6124. source: "label\x0a\x09^ 'SUnit'",
  6125. messageSends: [],
  6126. referencedClasses: []
  6127. }),
  6128. smalltalk.TestRunner);
  6129. smalltalk.addMethod(
  6130. smalltalk.method({
  6131. selector: "packages",
  6132. protocol: 'accessing',
  6133. fn: function (){
  6134. var self=this;
  6135. var packages;
  6136. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  6137. return smalltalk.withContext(function($ctx1) {
  6138. var $2,$3,$1,$4;
  6139. packages=_st($Array())._new();
  6140. _st(self._allClasses())._do_((function(each){
  6141. return smalltalk.withContext(function($ctx2) {
  6142. $2=packages;
  6143. $3=_st(each)._category();
  6144. $ctx2.sendIdx["category"]=1;
  6145. $1=_st($2)._includes_($3);
  6146. if(! smalltalk.assert($1)){
  6147. return _st(packages)._add_(_st(each)._category());
  6148. };
  6149. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6150. $4=_st(packages)._sort();
  6151. return $4;
  6152. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},smalltalk.TestRunner)})},
  6153. args: [],
  6154. source: "packages\x0a\x09| packages |\x0a\x09packages := Array new.\x0a\x09self allClasses do: [ :each |\x0a\x09(packages includes: each category) ifFalse: [\x0a\x09\x09packages add: each category ]].\x0a\x09^ packages sort",
  6155. messageSends: ["new", "do:", "allClasses", "ifFalse:", "includes:", "category", "add:", "sort"],
  6156. referencedClasses: ["Array"]
  6157. }),
  6158. smalltalk.TestRunner);
  6159. smalltalk.addMethod(
  6160. smalltalk.method({
  6161. selector: "performFailure:",
  6162. protocol: 'actions',
  6163. fn: function (aTestCase){
  6164. var self=this;
  6165. return smalltalk.withContext(function($ctx1) {
  6166. _st(aTestCase)._runCase();
  6167. return self}, function($ctx1) {$ctx1.fill(self,"performFailure:",{aTestCase:aTestCase},smalltalk.TestRunner)})},
  6168. args: ["aTestCase"],
  6169. source: "performFailure: aTestCase\x0a\x09aTestCase runCase",
  6170. messageSends: ["runCase"],
  6171. referencedClasses: []
  6172. }),
  6173. smalltalk.TestRunner);
  6174. smalltalk.addMethod(
  6175. smalltalk.method({
  6176. selector: "printErrors",
  6177. protocol: 'printing',
  6178. fn: function (){
  6179. var self=this;
  6180. return smalltalk.withContext(function($ctx1) {
  6181. var $1;
  6182. $1=_st(_st(_st(_st(self._result())._errors())._size())._asString()).__comma(" errors, ");
  6183. return $1;
  6184. }, function($ctx1) {$ctx1.fill(self,"printErrors",{},smalltalk.TestRunner)})},
  6185. args: [],
  6186. source: "printErrors\x0a\x09^ self result errors size asString , ' errors, '",
  6187. messageSends: [",", "asString", "size", "errors", "result"],
  6188. referencedClasses: []
  6189. }),
  6190. smalltalk.TestRunner);
  6191. smalltalk.addMethod(
  6192. smalltalk.method({
  6193. selector: "printFailures",
  6194. protocol: 'printing',
  6195. fn: function (){
  6196. var self=this;
  6197. return smalltalk.withContext(function($ctx1) {
  6198. var $1;
  6199. $1=_st(_st(_st(_st(self._result())._failures())._size())._asString()).__comma(" failures");
  6200. return $1;
  6201. }, function($ctx1) {$ctx1.fill(self,"printFailures",{},smalltalk.TestRunner)})},
  6202. args: [],
  6203. source: "printFailures\x0a\x09^ self result failures size asString, ' failures'",
  6204. messageSends: [",", "asString", "size", "failures", "result"],
  6205. referencedClasses: []
  6206. }),
  6207. smalltalk.TestRunner);
  6208. smalltalk.addMethod(
  6209. smalltalk.method({
  6210. selector: "printPasses",
  6211. protocol: 'printing',
  6212. fn: function (){
  6213. var self=this;
  6214. return smalltalk.withContext(function($ctx1) {
  6215. var $6,$5,$9,$8,$7,$4,$3,$2,$1;
  6216. $6=self._result();
  6217. $ctx1.sendIdx["result"]=1;
  6218. $5=_st($6)._runs();
  6219. $9=self._result();
  6220. $ctx1.sendIdx["result"]=2;
  6221. $8=_st($9)._errors();
  6222. $7=_st($8)._size();
  6223. $ctx1.sendIdx["size"]=1;
  6224. $4=_st($5).__minus($7);
  6225. $3=_st($4).__minus(_st(_st(self._result())._failures())._size());
  6226. $ctx1.sendIdx["-"]=1;
  6227. $2=_st($3)._asString();
  6228. $1=_st($2).__comma(" passes, ");
  6229. return $1;
  6230. }, function($ctx1) {$ctx1.fill(self,"printPasses",{},smalltalk.TestRunner)})},
  6231. args: [],
  6232. source: "printPasses\x0a\x09^ (self result runs - self result errors size - self result failures size) asString , ' passes, '",
  6233. messageSends: [",", "asString", "-", "runs", "result", "size", "errors", "failures"],
  6234. referencedClasses: []
  6235. }),
  6236. smalltalk.TestRunner);
  6237. smalltalk.addMethod(
  6238. smalltalk.method({
  6239. selector: "printTotal",
  6240. protocol: 'printing',
  6241. fn: function (){
  6242. var self=this;
  6243. return smalltalk.withContext(function($ctx1) {
  6244. var $1;
  6245. $1=_st(_st(_st(self._result())._total())._asString()).__comma(" runs, ");
  6246. return $1;
  6247. }, function($ctx1) {$ctx1.fill(self,"printTotal",{},smalltalk.TestRunner)})},
  6248. args: [],
  6249. source: "printTotal\x0a\x09^ self result total asString, ' runs, '",
  6250. messageSends: [",", "asString", "total", "result"],
  6251. referencedClasses: []
  6252. }),
  6253. smalltalk.TestRunner);
  6254. smalltalk.addMethod(
  6255. smalltalk.method({
  6256. selector: "progressBar",
  6257. protocol: 'accessing',
  6258. fn: function (){
  6259. var self=this;
  6260. function $ProgressBar(){return smalltalk.ProgressBar||(typeof ProgressBar=="undefined"?nil:ProgressBar)}
  6261. return smalltalk.withContext(function($ctx1) {
  6262. var $2,$1;
  6263. $2=self["@progressBar"];
  6264. if(($receiver = $2) == nil || $receiver == null){
  6265. self["@progressBar"]=_st($ProgressBar())._new();
  6266. $1=self["@progressBar"];
  6267. } else {
  6268. $1=$2;
  6269. };
  6270. return $1;
  6271. }, function($ctx1) {$ctx1.fill(self,"progressBar",{},smalltalk.TestRunner)})},
  6272. args: [],
  6273. source: "progressBar\x0a\x09^ progressBar ifNil: [ progressBar := ProgressBar new ]",
  6274. messageSends: ["ifNil:", "new"],
  6275. referencedClasses: ["ProgressBar"]
  6276. }),
  6277. smalltalk.TestRunner);
  6278. smalltalk.addMethod(
  6279. smalltalk.method({
  6280. selector: "renderBoxOn:",
  6281. protocol: 'rendering',
  6282. fn: function (html){
  6283. var self=this;
  6284. return smalltalk.withContext(function($ctx1) {
  6285. var $1;
  6286. self._renderCategoriesOn_(html);
  6287. self._renderClassesOn_(html);
  6288. $1=self._renderResultsOn_(html);
  6289. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.TestRunner)})},
  6290. args: ["html"],
  6291. source: "renderBoxOn: html\x0a\x09self\x0a\x09renderCategoriesOn: html;\x0a\x09renderClassesOn: html;\x0a\x09renderResultsOn: html",
  6292. messageSends: ["renderCategoriesOn:", "renderClassesOn:", "renderResultsOn:"],
  6293. referencedClasses: []
  6294. }),
  6295. smalltalk.TestRunner);
  6296. smalltalk.addMethod(
  6297. smalltalk.method({
  6298. selector: "renderButtonsOn:",
  6299. protocol: 'rendering',
  6300. fn: function (html){
  6301. var self=this;
  6302. return smalltalk.withContext(function($ctx1) {
  6303. var $1,$2;
  6304. $1=_st(html)._button();
  6305. _st($1)._with_("Run selected");
  6306. $2=_st($1)._onClick_((function(){
  6307. return smalltalk.withContext(function($ctx2) {
  6308. return self._run_(self._testCases());
  6309. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  6310. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.TestRunner)})},
  6311. args: ["html"],
  6312. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Run selected';\x0a\x09onClick: [ self run: self testCases ]",
  6313. messageSends: ["with:", "button", "onClick:", "run:", "testCases"],
  6314. referencedClasses: []
  6315. }),
  6316. smalltalk.TestRunner);
  6317. smalltalk.addMethod(
  6318. smalltalk.method({
  6319. selector: "renderCategoriesOn:",
  6320. protocol: 'rendering',
  6321. fn: function (html){
  6322. var self=this;
  6323. return smalltalk.withContext(function($ctx1) {
  6324. self["@packagesList"]=_st(_st(html)._ul())._class_("amber_column sunit packages");
  6325. self._updateCategoriesList();
  6326. return self}, function($ctx1) {$ctx1.fill(self,"renderCategoriesOn:",{html:html},smalltalk.TestRunner)})},
  6327. args: ["html"],
  6328. source: "renderCategoriesOn: html\x0a\x09packagesList := html ul class: 'amber_column sunit packages'.\x0a\x09self updateCategoriesList",
  6329. messageSends: ["class:", "ul", "updateCategoriesList"],
  6330. referencedClasses: []
  6331. }),
  6332. smalltalk.TestRunner);
  6333. smalltalk.addMethod(
  6334. smalltalk.method({
  6335. selector: "renderClassesOn:",
  6336. protocol: 'rendering',
  6337. fn: function (html){
  6338. var self=this;
  6339. return smalltalk.withContext(function($ctx1) {
  6340. self["@classesList"]=_st(_st(html)._ul())._class_("amber_column sunit classes");
  6341. self._updateClassesList();
  6342. return self}, function($ctx1) {$ctx1.fill(self,"renderClassesOn:",{html:html},smalltalk.TestRunner)})},
  6343. args: ["html"],
  6344. source: "renderClassesOn: html\x0a\x09classesList := html ul class: 'amber_column sunit classes'.\x0a\x09self updateClassesList",
  6345. messageSends: ["class:", "ul", "updateClassesList"],
  6346. referencedClasses: []
  6347. }),
  6348. smalltalk.TestRunner);
  6349. smalltalk.addMethod(
  6350. smalltalk.method({
  6351. selector: "renderErrorsOn:",
  6352. protocol: 'rendering',
  6353. fn: function (html){
  6354. var self=this;
  6355. return smalltalk.withContext(function($ctx1) {
  6356. var $1,$2,$3,$4;
  6357. _st(_st(self._result())._errors())._do_((function(each){
  6358. return smalltalk.withContext(function($ctx2) {
  6359. $1=_st(html)._li();
  6360. _st($1)._class_("errors");
  6361. $2=$1;
  6362. $3=_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector());
  6363. $ctx2.sendIdx[","]=1;
  6364. _st($2)._with_($3);
  6365. $4=_st($1)._onClick_((function(){
  6366. return smalltalk.withContext(function($ctx3) {
  6367. return self._performFailure_(each);
  6368. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6369. return $4;
  6370. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6371. return self}, function($ctx1) {$ctx1.fill(self,"renderErrorsOn:",{html:html},smalltalk.TestRunner)})},
  6372. args: ["html"],
  6373. source: "renderErrorsOn: html\x0a\x09self result errors do: [ :each |\x0a\x09\x09html li\x0a\x09\x09\x09class: 'errors';\x0a\x09\x09\x09with: each class name, ' >> ', each selector;\x0a\x09\x09\x09\x09\x09\x09onClick: [ self performFailure: each ]]",
  6374. messageSends: ["do:", "errors", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"],
  6375. referencedClasses: []
  6376. }),
  6377. smalltalk.TestRunner);
  6378. smalltalk.addMethod(
  6379. smalltalk.method({
  6380. selector: "renderFailuresOn:",
  6381. protocol: 'rendering',
  6382. fn: function (html){
  6383. var self=this;
  6384. return smalltalk.withContext(function($ctx1) {
  6385. var $1,$2,$3,$4;
  6386. _st(_st(self._result())._failures())._do_((function(each){
  6387. return smalltalk.withContext(function($ctx2) {
  6388. $1=_st(html)._li();
  6389. _st($1)._class_("failures");
  6390. $2=$1;
  6391. $3=_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector());
  6392. $ctx2.sendIdx[","]=1;
  6393. _st($2)._with_($3);
  6394. $4=_st($1)._onClick_((function(){
  6395. return smalltalk.withContext(function($ctx3) {
  6396. return self._performFailure_(each);
  6397. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6398. return $4;
  6399. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6400. return self}, function($ctx1) {$ctx1.fill(self,"renderFailuresOn:",{html:html},smalltalk.TestRunner)})},
  6401. args: ["html"],
  6402. source: "renderFailuresOn: html\x0a\x09self result failures do: [ :each |\x0a\x09\x09html li\x0a\x09\x09\x09class: 'failures';\x0a\x09\x09\x09with: each class name, ' >> ', each selector;\x0a\x09\x09\x09\x09\x09\x09onClick: [ self performFailure: each ]]",
  6403. messageSends: ["do:", "failures", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"],
  6404. referencedClasses: []
  6405. }),
  6406. smalltalk.TestRunner);
  6407. smalltalk.addMethod(
  6408. smalltalk.method({
  6409. selector: "renderResultsOn:",
  6410. protocol: 'rendering',
  6411. fn: function (html){
  6412. var self=this;
  6413. return smalltalk.withContext(function($ctx1) {
  6414. self["@statusDiv"]=_st(html)._div();
  6415. _st(html)._with_(self._progressBar());
  6416. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column sunit results");
  6417. self._updateMethodsList();
  6418. self._updateStatusDiv();
  6419. return self}, function($ctx1) {$ctx1.fill(self,"renderResultsOn:",{html:html},smalltalk.TestRunner)})},
  6420. args: ["html"],
  6421. 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",
  6422. messageSends: ["div", "with:", "progressBar", "class:", "ul", "updateMethodsList", "updateStatusDiv"],
  6423. referencedClasses: []
  6424. }),
  6425. smalltalk.TestRunner);
  6426. smalltalk.addMethod(
  6427. smalltalk.method({
  6428. selector: "result",
  6429. protocol: 'accessing',
  6430. fn: function (){
  6431. var self=this;
  6432. return smalltalk.withContext(function($ctx1) {
  6433. var $1;
  6434. $1=self["@result"];
  6435. return $1;
  6436. }, function($ctx1) {$ctx1.fill(self,"result",{},smalltalk.TestRunner)})},
  6437. args: [],
  6438. source: "result\x0a\x09^ result",
  6439. messageSends: [],
  6440. referencedClasses: []
  6441. }),
  6442. smalltalk.TestRunner);
  6443. smalltalk.addMethod(
  6444. smalltalk.method({
  6445. selector: "run:",
  6446. protocol: 'actions',
  6447. fn: function (aCollection){
  6448. var self=this;
  6449. var worker;
  6450. function $TestSuiteRunner(){return smalltalk.TestSuiteRunner||(typeof TestSuiteRunner=="undefined"?nil:TestSuiteRunner)}
  6451. function $ResultAnnouncement(){return smalltalk.ResultAnnouncement||(typeof ResultAnnouncement=="undefined"?nil:ResultAnnouncement)}
  6452. return smalltalk.withContext(function($ctx1) {
  6453. var $1;
  6454. worker=_st($TestSuiteRunner())._on_(aCollection);
  6455. self["@result"]=_st(worker)._result();
  6456. $ctx1.sendIdx["result"]=1;
  6457. _st(_st(worker)._announcer())._on_do_($ResultAnnouncement(),(function(ann){
  6458. return smalltalk.withContext(function($ctx2) {
  6459. $1=_st(_st(ann)._result()).__eq_eq(self["@result"]);
  6460. if(smalltalk.assert($1)){
  6461. _st(self._progressBar())._updatePercent_(_st(_st(_st(self["@result"])._runs()).__slash(_st(self["@result"])._total())).__star((100)));
  6462. self._updateStatusDiv();
  6463. return self._updateMethodsList();
  6464. };
  6465. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,1)})}));
  6466. _st(worker)._run();
  6467. return self}, function($ctx1) {$ctx1.fill(self,"run:",{aCollection:aCollection,worker:worker},smalltalk.TestRunner)})},
  6468. args: ["aCollection"],
  6469. source: "run: aCollection\x0a| worker |\x0a\x09worker := TestSuiteRunner on: aCollection.\x0a\x09result := worker result.\x0a\x09worker announcer on: ResultAnnouncement do: [ :ann |\x0a\x09\x09ann result == result ifTrue: [\x0a\x09\x09\x09self progressBar updatePercent: result runs / result total * 100.\x0a\x09\x09\x09self updateStatusDiv.\x0a\x09\x09\x09self updateMethodsList\x0a\x09\x09]\x0a\x09].\x0a\x09worker run",
  6470. messageSends: ["on:", "result", "on:do:", "announcer", "ifTrue:", "==", "updatePercent:", "progressBar", "*", "/", "runs", "total", "updateStatusDiv", "updateMethodsList", "run"],
  6471. referencedClasses: ["TestSuiteRunner", "ResultAnnouncement"]
  6472. }),
  6473. smalltalk.TestRunner);
  6474. smalltalk.addMethod(
  6475. smalltalk.method({
  6476. selector: "selectAllCategories",
  6477. protocol: 'actions',
  6478. fn: function (){
  6479. var self=this;
  6480. return smalltalk.withContext(function($ctx1) {
  6481. var $1,$2;
  6482. _st(self._packages())._do_((function(each){
  6483. return smalltalk.withContext(function($ctx2) {
  6484. $1=_st(self["@selectedCategories"])._includes_(each);
  6485. if(! smalltalk.assert($1)){
  6486. return _st(self._selectedCategories())._add_(each);
  6487. };
  6488. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6489. self._updateCategoriesList();
  6490. $2=self._updateClassesList();
  6491. return self}, function($ctx1) {$ctx1.fill(self,"selectAllCategories",{},smalltalk.TestRunner)})},
  6492. args: [],
  6493. source: "selectAllCategories\x0a\x09self packages do: [ :each |\x0a\x09\x09(selectedCategories includes: each) ifFalse: [\x0a\x09\x09\x09self selectedCategories add: each ]].\x0a\x09self\x0a\x09\x09updateCategoriesList;\x0a\x09\x09updateClassesList",
  6494. messageSends: ["do:", "packages", "ifFalse:", "includes:", "add:", "selectedCategories", "updateCategoriesList", "updateClassesList"],
  6495. referencedClasses: []
  6496. }),
  6497. smalltalk.TestRunner);
  6498. smalltalk.addMethod(
  6499. smalltalk.method({
  6500. selector: "selectAllClasses",
  6501. protocol: 'actions',
  6502. fn: function (){
  6503. var self=this;
  6504. return smalltalk.withContext(function($ctx1) {
  6505. var $1,$2;
  6506. _st(self._classes())._do_((function(each){
  6507. return smalltalk.withContext(function($ctx2) {
  6508. $1=_st(self["@selectedClasses"])._includes_(each);
  6509. if(! smalltalk.assert($1)){
  6510. return _st(self._selectedClasses())._add_(each);
  6511. };
  6512. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6513. self._updateCategoriesList();
  6514. $2=self._updateClassesList();
  6515. return self}, function($ctx1) {$ctx1.fill(self,"selectAllClasses",{},smalltalk.TestRunner)})},
  6516. args: [],
  6517. source: "selectAllClasses\x0a\x09self classes do: [ :each |\x0a\x09\x09(selectedClasses includes: each) ifFalse: [\x0a\x09\x09\x09self selectedClasses add: each ]].\x0a\x09self\x0a\x09\x09updateCategoriesList;\x0a\x09\x09updateClassesList",
  6518. messageSends: ["do:", "classes", "ifFalse:", "includes:", "add:", "selectedClasses", "updateCategoriesList", "updateClassesList"],
  6519. referencedClasses: []
  6520. }),
  6521. smalltalk.TestRunner);
  6522. smalltalk.addMethod(
  6523. smalltalk.method({
  6524. selector: "selectedCategories",
  6525. protocol: 'accessing',
  6526. fn: function (){
  6527. var self=this;
  6528. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  6529. return smalltalk.withContext(function($ctx1) {
  6530. var $2,$1;
  6531. $2=self["@selectedCategories"];
  6532. if(($receiver = $2) == nil || $receiver == null){
  6533. self["@selectedCategories"]=_st($Array())._new();
  6534. $1=self["@selectedCategories"];
  6535. } else {
  6536. $1=$2;
  6537. };
  6538. return $1;
  6539. }, function($ctx1) {$ctx1.fill(self,"selectedCategories",{},smalltalk.TestRunner)})},
  6540. args: [],
  6541. source: "selectedCategories\x0a\x09^ selectedCategories ifNil: [ selectedCategories := Array new ]",
  6542. messageSends: ["ifNil:", "new"],
  6543. referencedClasses: ["Array"]
  6544. }),
  6545. smalltalk.TestRunner);
  6546. smalltalk.addMethod(
  6547. smalltalk.method({
  6548. selector: "selectedClasses",
  6549. protocol: 'accessing',
  6550. fn: function (){
  6551. var self=this;
  6552. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  6553. return smalltalk.withContext(function($ctx1) {
  6554. var $2,$1;
  6555. $2=self["@selectedClasses"];
  6556. if(($receiver = $2) == nil || $receiver == null){
  6557. self["@selectedClasses"]=_st($Array())._new();
  6558. $1=self["@selectedClasses"];
  6559. } else {
  6560. $1=$2;
  6561. };
  6562. return $1;
  6563. }, function($ctx1) {$ctx1.fill(self,"selectedClasses",{},smalltalk.TestRunner)})},
  6564. args: [],
  6565. source: "selectedClasses\x0a\x09^ selectedClasses ifNil: [ selectedClasses := Array new ]",
  6566. messageSends: ["ifNil:", "new"],
  6567. referencedClasses: ["Array"]
  6568. }),
  6569. smalltalk.TestRunner);
  6570. smalltalk.addMethod(
  6571. smalltalk.method({
  6572. selector: "statusInfo",
  6573. protocol: 'accessing',
  6574. fn: function (){
  6575. var self=this;
  6576. return smalltalk.withContext(function($ctx1) {
  6577. var $2,$1;
  6578. $2=_st(_st(self._printTotal()).__comma(self._printPasses())).__comma(self._printErrors());
  6579. $ctx1.sendIdx[","]=2;
  6580. $1=_st($2).__comma(self._printFailures());
  6581. $ctx1.sendIdx[","]=1;
  6582. return $1;
  6583. }, function($ctx1) {$ctx1.fill(self,"statusInfo",{},smalltalk.TestRunner)})},
  6584. args: [],
  6585. source: "statusInfo\x0a\x09^ self printTotal, self printPasses, self printErrors, self printFailures",
  6586. messageSends: [",", "printTotal", "printPasses", "printErrors", "printFailures"],
  6587. referencedClasses: []
  6588. }),
  6589. smalltalk.TestRunner);
  6590. smalltalk.addMethod(
  6591. smalltalk.method({
  6592. selector: "testCases",
  6593. protocol: 'accessing',
  6594. fn: function (){
  6595. var self=this;
  6596. var testCases;
  6597. return smalltalk.withContext(function($ctx1) {
  6598. var $1;
  6599. testCases=[];
  6600. _st(_st(self._selectedClasses())._select_((function(each){
  6601. return smalltalk.withContext(function($ctx2) {
  6602. return _st(self._selectedCategories())._includes_(_st(each)._category());
  6603. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._do_((function(each){
  6604. return smalltalk.withContext(function($ctx2) {
  6605. return _st(testCases)._addAll_(_st(each)._buildSuite());
  6606. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
  6607. $1=testCases;
  6608. return $1;
  6609. }, function($ctx1) {$ctx1.fill(self,"testCases",{testCases:testCases},smalltalk.TestRunner)})},
  6610. args: [],
  6611. 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",
  6612. messageSends: ["do:", "select:", "selectedClasses", "includes:", "selectedCategories", "category", "addAll:", "buildSuite"],
  6613. referencedClasses: []
  6614. }),
  6615. smalltalk.TestRunner);
  6616. smalltalk.addMethod(
  6617. smalltalk.method({
  6618. selector: "toggleCategory:",
  6619. protocol: 'actions',
  6620. fn: function (aCategory){
  6621. var self=this;
  6622. return smalltalk.withContext(function($ctx1) {
  6623. var $1,$2;
  6624. $1=self._isSelectedCategory_(aCategory);
  6625. if(smalltalk.assert($1)){
  6626. _st(self["@selectedCategories"])._remove_(aCategory);
  6627. } else {
  6628. _st(self["@selectedCategories"])._add_(aCategory);
  6629. };
  6630. self._updateCategoriesList();
  6631. $2=self._updateClassesList();
  6632. return self}, function($ctx1) {$ctx1.fill(self,"toggleCategory:",{aCategory:aCategory},smalltalk.TestRunner)})},
  6633. args: ["aCategory"],
  6634. source: "toggleCategory: aCategory\x0a\x09(self isSelectedCategory: aCategory)\x0a\x09\x09ifFalse: [ selectedCategories add: aCategory ]\x0a\x09\x09ifTrue: [ selectedCategories remove: aCategory ].\x0a\x09self\x0a\x09\x09updateCategoriesList;\x0a\x09\x09updateClassesList",
  6635. messageSends: ["ifFalse:ifTrue:", "isSelectedCategory:", "add:", "remove:", "updateCategoriesList", "updateClassesList"],
  6636. referencedClasses: []
  6637. }),
  6638. smalltalk.TestRunner);
  6639. smalltalk.addMethod(
  6640. smalltalk.method({
  6641. selector: "toggleClass:",
  6642. protocol: 'actions',
  6643. fn: function (aClass){
  6644. var self=this;
  6645. return smalltalk.withContext(function($ctx1) {
  6646. var $1;
  6647. $1=self._isSelectedClass_(aClass);
  6648. if(smalltalk.assert($1)){
  6649. _st(self["@selectedClasses"])._remove_(aClass);
  6650. } else {
  6651. _st(self["@selectedClasses"])._add_(aClass);
  6652. };
  6653. self._updateClassesList();
  6654. return self}, function($ctx1) {$ctx1.fill(self,"toggleClass:",{aClass:aClass},smalltalk.TestRunner)})},
  6655. args: ["aClass"],
  6656. source: "toggleClass: aClass\x0a\x09(self isSelectedClass: aClass)\x0a\x09\x09ifFalse: [ selectedClasses add: aClass ]\x0a\x09\x09ifTrue: [ selectedClasses remove: aClass ].\x0a\x09self\x0a\x09\x09updateClassesList",
  6657. messageSends: ["ifFalse:ifTrue:", "isSelectedClass:", "add:", "remove:", "updateClassesList"],
  6658. referencedClasses: []
  6659. }),
  6660. smalltalk.TestRunner);
  6661. smalltalk.addMethod(
  6662. smalltalk.method({
  6663. selector: "updateCategoriesList",
  6664. protocol: 'updating',
  6665. fn: function (){
  6666. var self=this;
  6667. return smalltalk.withContext(function($ctx1) {
  6668. var $1,$2,$3,$4,$5;
  6669. _st(self["@packagesList"])._contents_((function(html){
  6670. return smalltalk.withContext(function($ctx2) {
  6671. $1=_st(html)._li();
  6672. $ctx2.sendIdx["li"]=1;
  6673. _st($1)._class_("all");
  6674. $ctx2.sendIdx["class:"]=1;
  6675. _st($1)._with_("All");
  6676. $ctx2.sendIdx["with:"]=1;
  6677. $2=_st($1)._onClick_((function(){
  6678. return smalltalk.withContext(function($ctx3) {
  6679. return self._selectAllCategories();
  6680. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6681. $ctx2.sendIdx["onClick:"]=1;
  6682. $2;
  6683. return _st(self._packages())._do_((function(each){
  6684. var li;
  6685. return smalltalk.withContext(function($ctx3) {
  6686. li=_st(html)._li();
  6687. li;
  6688. $3=_st(self._selectedCategories())._includes_(each);
  6689. if(smalltalk.assert($3)){
  6690. _st(li)._class_("selected");
  6691. };
  6692. $4=li;
  6693. _st($4)._with_(each);
  6694. $5=_st($4)._onClick_((function(){
  6695. return smalltalk.withContext(function($ctx4) {
  6696. return self._toggleCategory_(each);
  6697. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  6698. return $5;
  6699. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,3)})}));
  6700. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6701. return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},smalltalk.TestRunner)})},
  6702. args: [],
  6703. source: "updateCategoriesList\x0a\x09packagesList contents: [ :html |\x0a\x09\x09html li\x0a\x09\x09class: 'all';\x0a\x09\x09with: 'All';\x0a\x09\x09onClick: [ self selectAllCategories ].\x0a\x09self packages do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09(self selectedCategories includes: each) ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09with: each;\x0a\x09\x09onClick: [ self toggleCategory: each ]] ]",
  6704. messageSends: ["contents:", "class:", "li", "with:", "onClick:", "selectAllCategories", "do:", "packages", "ifTrue:", "includes:", "selectedCategories", "toggleCategory:"],
  6705. referencedClasses: []
  6706. }),
  6707. smalltalk.TestRunner);
  6708. smalltalk.addMethod(
  6709. smalltalk.method({
  6710. selector: "updateClassesList",
  6711. protocol: 'updating',
  6712. fn: function (){
  6713. var self=this;
  6714. return smalltalk.withContext(function($ctx1) {
  6715. var $1,$2,$3,$4,$5,$6;
  6716. _st(self["@classesList"])._contents_((function(html){
  6717. return smalltalk.withContext(function($ctx2) {
  6718. $1=_st(self._selectedCategories())._isEmpty();
  6719. if(! smalltalk.assert($1)){
  6720. $2=_st(html)._li();
  6721. $ctx2.sendIdx["li"]=1;
  6722. _st($2)._class_("all");
  6723. $ctx2.sendIdx["class:"]=1;
  6724. _st($2)._with_("All");
  6725. $ctx2.sendIdx["with:"]=1;
  6726. $3=_st($2)._onClick_((function(){
  6727. return smalltalk.withContext(function($ctx3) {
  6728. return self._selectAllClasses();
  6729. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  6730. $ctx2.sendIdx["onClick:"]=1;
  6731. $3;
  6732. };
  6733. return _st(self._classes())._do_((function(each){
  6734. var li;
  6735. return smalltalk.withContext(function($ctx3) {
  6736. li=_st(html)._li();
  6737. li;
  6738. $4=_st(self._selectedClasses())._includes_(each);
  6739. if(smalltalk.assert($4)){
  6740. _st(li)._class_("selected");
  6741. };
  6742. $5=li;
  6743. _st($5)._with_(_st(each)._name());
  6744. $6=_st($5)._onClick_((function(){
  6745. return smalltalk.withContext(function($ctx4) {
  6746. return self._toggleClass_(each);
  6747. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)})}));
  6748. return $6;
  6749. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,4)})}));
  6750. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6751. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},smalltalk.TestRunner)})},
  6752. args: [],
  6753. source: "updateClassesList\x0a\x09classesList contents: [ :html |\x0a\x09(self selectedCategories isEmpty) ifFalse: [\x0a\x09\x09html li\x0a\x09\x09\x09class: 'all';\x0a\x09\x09\x09with: 'All';\x0a\x09\x09\x09onClick: [ self selectAllClasses ]].\x0a\x09self classes do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09(self selectedClasses includes: each) ifTrue: [\x0a\x09\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09\x09with: each name;\x0a\x09\x09\x09onClick: [ self toggleClass: each ]] ]",
  6754. messageSends: ["contents:", "ifFalse:", "isEmpty", "selectedCategories", "class:", "li", "with:", "onClick:", "selectAllClasses", "do:", "classes", "ifTrue:", "includes:", "selectedClasses", "name", "toggleClass:"],
  6755. referencedClasses: []
  6756. }),
  6757. smalltalk.TestRunner);
  6758. smalltalk.addMethod(
  6759. smalltalk.method({
  6760. selector: "updateMethodsList",
  6761. protocol: 'updating',
  6762. fn: function (){
  6763. var self=this;
  6764. return smalltalk.withContext(function($ctx1) {
  6765. _st(self["@methodsList"])._contents_((function(html){
  6766. return smalltalk.withContext(function($ctx2) {
  6767. self._renderErrorsOn_(html);
  6768. return self._renderFailuresOn_(html);
  6769. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6770. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},smalltalk.TestRunner)})},
  6771. args: [],
  6772. source: "updateMethodsList\x0a\x09methodsList contents: [ :html |\x0a\x09\x09self renderErrorsOn: html.\x0a\x09\x09\x09\x09self renderFailuresOn: html ]",
  6773. messageSends: ["contents:", "renderErrorsOn:", "renderFailuresOn:"],
  6774. referencedClasses: []
  6775. }),
  6776. smalltalk.TestRunner);
  6777. smalltalk.addMethod(
  6778. smalltalk.method({
  6779. selector: "updateStatusDiv",
  6780. protocol: 'updating',
  6781. fn: function (){
  6782. var self=this;
  6783. return smalltalk.withContext(function($ctx1) {
  6784. _st(self["@statusDiv"])._class_("sunit status ".__comma(_st(self["@result"])._status()));
  6785. _st(self["@statusDiv"])._contents_((function(html){
  6786. return smalltalk.withContext(function($ctx2) {
  6787. return _st(_st(html)._span())._with_(self._statusInfo());
  6788. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6789. return self}, function($ctx1) {$ctx1.fill(self,"updateStatusDiv",{},smalltalk.TestRunner)})},
  6790. args: [],
  6791. source: "updateStatusDiv\x0a\x09statusDiv class: 'sunit status ', result status.\x0a\x09statusDiv contents: [ :html |\x0a\x09\x09html span with: self statusInfo ]",
  6792. messageSends: ["class:", ",", "status", "contents:", "with:", "span", "statusInfo"],
  6793. referencedClasses: []
  6794. }),
  6795. smalltalk.TestRunner);
  6796. smalltalk.addClass('Workspace', smalltalk.TabWidget, ['sourceArea'], 'IDE');
  6797. smalltalk.addMethod(
  6798. smalltalk.method({
  6799. selector: "clearWorkspace",
  6800. protocol: 'actions',
  6801. fn: function (){
  6802. var self=this;
  6803. return smalltalk.withContext(function($ctx1) {
  6804. _st(self["@sourceArea"])._clear();
  6805. return self}, function($ctx1) {$ctx1.fill(self,"clearWorkspace",{},smalltalk.Workspace)})},
  6806. args: [],
  6807. source: "clearWorkspace\x0a\x09sourceArea clear",
  6808. messageSends: ["clear"],
  6809. referencedClasses: []
  6810. }),
  6811. smalltalk.Workspace);
  6812. smalltalk.addMethod(
  6813. smalltalk.method({
  6814. selector: "doIt",
  6815. protocol: 'actions',
  6816. fn: function (){
  6817. var self=this;
  6818. return smalltalk.withContext(function($ctx1) {
  6819. _st(self["@sourceArea"])._doIt();
  6820. return self}, function($ctx1) {$ctx1.fill(self,"doIt",{},smalltalk.Workspace)})},
  6821. args: [],
  6822. source: "doIt\x0a\x09sourceArea doIt",
  6823. messageSends: ["doIt"],
  6824. referencedClasses: []
  6825. }),
  6826. smalltalk.Workspace);
  6827. smalltalk.addMethod(
  6828. smalltalk.method({
  6829. selector: "fileIn",
  6830. protocol: 'actions',
  6831. fn: function (){
  6832. var self=this;
  6833. return smalltalk.withContext(function($ctx1) {
  6834. _st(self["@sourceArea"])._fileIn();
  6835. return self}, function($ctx1) {$ctx1.fill(self,"fileIn",{},smalltalk.Workspace)})},
  6836. args: [],
  6837. source: "fileIn\x0a\x09sourceArea fileIn",
  6838. messageSends: ["fileIn"],
  6839. referencedClasses: []
  6840. }),
  6841. smalltalk.Workspace);
  6842. smalltalk.addMethod(
  6843. smalltalk.method({
  6844. selector: "inspectIt",
  6845. protocol: 'actions',
  6846. fn: function (){
  6847. var self=this;
  6848. return smalltalk.withContext(function($ctx1) {
  6849. _st(self["@sourceArea"])._inspectIt();
  6850. return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{},smalltalk.Workspace)})},
  6851. args: [],
  6852. source: "inspectIt\x0a\x09sourceArea inspectIt",
  6853. messageSends: ["inspectIt"],
  6854. referencedClasses: []
  6855. }),
  6856. smalltalk.Workspace);
  6857. smalltalk.addMethod(
  6858. smalltalk.method({
  6859. selector: "label",
  6860. protocol: 'accessing',
  6861. fn: function (){
  6862. var self=this;
  6863. return smalltalk.withContext(function($ctx1) {
  6864. return "Workspace";
  6865. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.Workspace)})},
  6866. args: [],
  6867. source: "label\x0a\x09^ 'Workspace'",
  6868. messageSends: [],
  6869. referencedClasses: []
  6870. }),
  6871. smalltalk.Workspace);
  6872. smalltalk.addMethod(
  6873. smalltalk.method({
  6874. selector: "printIt",
  6875. protocol: 'actions',
  6876. fn: function (){
  6877. var self=this;
  6878. return smalltalk.withContext(function($ctx1) {
  6879. _st(self["@sourceArea"])._printIt();
  6880. return self}, function($ctx1) {$ctx1.fill(self,"printIt",{},smalltalk.Workspace)})},
  6881. args: [],
  6882. source: "printIt\x0a\x09sourceArea printIt",
  6883. messageSends: ["printIt"],
  6884. referencedClasses: []
  6885. }),
  6886. smalltalk.Workspace);
  6887. smalltalk.addMethod(
  6888. smalltalk.method({
  6889. selector: "renderBoxOn:",
  6890. protocol: 'rendering',
  6891. fn: function (html){
  6892. var self=this;
  6893. function $SourceArea(){return smalltalk.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  6894. return smalltalk.withContext(function($ctx1) {
  6895. self["@sourceArea"]=_st($SourceArea())._new();
  6896. _st(self["@sourceArea"])._renderOn_(html);
  6897. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.Workspace)})},
  6898. args: ["html"],
  6899. source: "renderBoxOn: html\x0a\x09sourceArea := SourceArea new.\x0a\x09sourceArea renderOn: html",
  6900. messageSends: ["new", "renderOn:"],
  6901. referencedClasses: ["SourceArea"]
  6902. }),
  6903. smalltalk.Workspace);
  6904. smalltalk.addMethod(
  6905. smalltalk.method({
  6906. selector: "renderButtonsOn:",
  6907. protocol: 'rendering',
  6908. fn: function (html){
  6909. var self=this;
  6910. return smalltalk.withContext(function($ctx1) {
  6911. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10;
  6912. $1=_st(html)._button();
  6913. $ctx1.sendIdx["button"]=1;
  6914. _st($1)._with_("DoIt");
  6915. $ctx1.sendIdx["with:"]=1;
  6916. _st($1)._title_("ctrl+d");
  6917. $ctx1.sendIdx["title:"]=1;
  6918. $2=_st($1)._onClick_((function(){
  6919. return smalltalk.withContext(function($ctx2) {
  6920. return self._doIt();
  6921. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  6922. $ctx1.sendIdx["onClick:"]=1;
  6923. $3=_st(html)._button();
  6924. $ctx1.sendIdx["button"]=2;
  6925. _st($3)._with_("PrintIt");
  6926. $ctx1.sendIdx["with:"]=2;
  6927. _st($3)._title_("ctrl+p");
  6928. $ctx1.sendIdx["title:"]=2;
  6929. $4=_st($3)._onClick_((function(){
  6930. return smalltalk.withContext(function($ctx2) {
  6931. return self._printIt();
  6932. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  6933. $ctx1.sendIdx["onClick:"]=2;
  6934. $5=_st(html)._button();
  6935. $ctx1.sendIdx["button"]=3;
  6936. _st($5)._with_("InspectIt");
  6937. $ctx1.sendIdx["with:"]=3;
  6938. _st($5)._title_("ctrl+i");
  6939. $ctx1.sendIdx["title:"]=3;
  6940. $6=_st($5)._onClick_((function(){
  6941. return smalltalk.withContext(function($ctx2) {
  6942. return self._inspectIt();
  6943. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  6944. $ctx1.sendIdx["onClick:"]=3;
  6945. $7=_st(html)._button();
  6946. $ctx1.sendIdx["button"]=4;
  6947. _st($7)._with_("FileIn");
  6948. $ctx1.sendIdx["with:"]=4;
  6949. _st($7)._title_("ctrl+f");
  6950. $8=_st($7)._onClick_((function(){
  6951. return smalltalk.withContext(function($ctx2) {
  6952. return self._fileIn();
  6953. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  6954. $ctx1.sendIdx["onClick:"]=4;
  6955. $9=_st(html)._button();
  6956. _st($9)._with_("Clear workspace");
  6957. $10=_st($9)._onClick_((function(){
  6958. return smalltalk.withContext(function($ctx2) {
  6959. return self._clearWorkspace();
  6960. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
  6961. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.Workspace)})},
  6962. args: ["html"],
  6963. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'DoIt';\x0a\x09title: 'ctrl+d';\x0a\x09onClick: [ self doIt ].\x0a\x09html button\x0a\x09with: 'PrintIt';\x0a\x09title: 'ctrl+p';\x0a\x09onClick: [ self printIt ].\x0a\x09html button\x0a\x09with: 'InspectIt';\x0a\x09title: 'ctrl+i';\x0a\x09onClick: [ self inspectIt ].\x0a\x09html button\x0a\x09with: 'FileIn';\x0a\x09title: 'ctrl+f';\x0a\x09onClick: [ self fileIn ].\x0a\x09html button\x0a\x09with: 'Clear workspace';\x0a\x09onClick: [ self clearWorkspace ]",
  6964. messageSends: ["with:", "button", "title:", "onClick:", "doIt", "printIt", "inspectIt", "fileIn", "clearWorkspace"],
  6965. referencedClasses: []
  6966. }),
  6967. smalltalk.Workspace);
  6968. smalltalk.addMethod(
  6969. smalltalk.method({
  6970. selector: "show",
  6971. protocol: 'actions',
  6972. fn: function (){
  6973. var self=this;
  6974. return smalltalk.withContext(function($ctx1) {
  6975. smalltalk.Workspace.superclass.fn.prototype._show.apply(_st(self), []);
  6976. _st(self["@sourceArea"])._focus();
  6977. return self}, function($ctx1) {$ctx1.fill(self,"show",{},smalltalk.Workspace)})},
  6978. args: [],
  6979. source: "show\x0a\x09super show.\x0a\x09sourceArea focus.",
  6980. messageSends: ["show", "focus"],
  6981. referencedClasses: []
  6982. }),
  6983. smalltalk.Workspace);
  6984. smalltalk.addMethod(
  6985. smalltalk.method({
  6986. selector: "inspectOn:",
  6987. protocol: '*IDE',
  6988. fn: function (anInspector){
  6989. var self=this;
  6990. var variables;
  6991. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  6992. return smalltalk.withContext(function($ctx1) {
  6993. var $1;
  6994. variables=_st($Dictionary())._new();
  6995. _st(variables)._at_put_("#self",self);
  6996. $ctx1.sendIdx["at:put:"]=1;
  6997. _st(variables)._at_put_("#year",self._year());
  6998. $ctx1.sendIdx["at:put:"]=2;
  6999. _st(variables)._at_put_("#month",self._month());
  7000. $ctx1.sendIdx["at:put:"]=3;
  7001. _st(variables)._at_put_("#day",self._day());
  7002. $ctx1.sendIdx["at:put:"]=4;
  7003. _st(variables)._at_put_("#hours",self._hours());
  7004. $ctx1.sendIdx["at:put:"]=5;
  7005. _st(variables)._at_put_("#minutes",self._minutes());
  7006. $ctx1.sendIdx["at:put:"]=6;
  7007. _st(variables)._at_put_("#seconds",self._seconds());
  7008. $ctx1.sendIdx["at:put:"]=7;
  7009. _st(variables)._at_put_("#milliseconds",self._milliseconds());
  7010. _st(anInspector)._setLabel_(self._printString());
  7011. $1=_st(anInspector)._setVariables_(variables);
  7012. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Date)})},
  7013. args: ["anInspector"],
  7014. 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",
  7015. messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"],
  7016. referencedClasses: ["Dictionary"]
  7017. }),
  7018. smalltalk.Date);
  7019. smalltalk.addMethod(
  7020. smalltalk.method({
  7021. selector: "inspectOn:",
  7022. protocol: '*IDE',
  7023. fn: function (anInspector){
  7024. var self=this;
  7025. var variables;
  7026. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7027. return smalltalk.withContext(function($ctx1) {
  7028. var $1;
  7029. variables=_st($Dictionary())._new();
  7030. _st(variables)._at_put_("#self",self);
  7031. $ctx1.sendIdx["at:put:"]=1;
  7032. self._withIndexDo_((function(each,i){
  7033. return smalltalk.withContext(function($ctx2) {
  7034. return _st(variables)._at_put_(i,each);
  7035. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,1)})}));
  7036. _st(anInspector)._setLabel_(self._printString());
  7037. $1=_st(anInspector)._setVariables_(variables);
  7038. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Collection)})},
  7039. args: ["anInspector"],
  7040. 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",
  7041. messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"],
  7042. referencedClasses: ["Dictionary"]
  7043. }),
  7044. smalltalk.Collection);
  7045. smalltalk.addMethod(
  7046. smalltalk.method({
  7047. selector: "inspectOn:",
  7048. protocol: '*IDE',
  7049. fn: function (anInspector){
  7050. var self=this;
  7051. var label;
  7052. return smalltalk.withContext(function($ctx1) {
  7053. var $3,$2,$1,$5,$4;
  7054. smalltalk.String.superclass.fn.prototype._inspectOn_.apply(_st(self), [anInspector]);
  7055. $3=self._printString();
  7056. $ctx1.sendIdx["printString"]=1;
  7057. $2=_st($3)._size();
  7058. $1=_st($2).__gt((30));
  7059. if(smalltalk.assert($1)){
  7060. $5=self._printString();
  7061. $ctx1.sendIdx["printString"]=2;
  7062. $4=_st($5)._copyFrom_to_((1),(30));
  7063. label=_st($4).__comma("...'");
  7064. label;
  7065. } else {
  7066. label=self._printString();
  7067. label;
  7068. };
  7069. _st(anInspector)._setLabel_(label);
  7070. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,label:label},smalltalk.String)})},
  7071. args: ["anInspector"],
  7072. 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",
  7073. messageSends: ["inspectOn:", "ifTrue:ifFalse:", ">", "size", "printString", ",", "copyFrom:to:", "setLabel:"],
  7074. referencedClasses: []
  7075. }),
  7076. smalltalk.String);
  7077. smalltalk.addMethod(
  7078. smalltalk.method({
  7079. selector: "inspectOn:",
  7080. protocol: '*IDE',
  7081. fn: function (anInspector){
  7082. var self=this;
  7083. var variables;
  7084. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7085. return smalltalk.withContext(function($ctx1) {
  7086. var $1;
  7087. variables=_st($Dictionary())._new();
  7088. _st(variables)._at_put_("#self",self);
  7089. $ctx1.sendIdx["at:put:"]=1;
  7090. _st(variables)._at_put_("#home",self._home());
  7091. $ctx1.sendIdx["at:put:"]=2;
  7092. _st(variables)._at_put_("#receiver",self._receiver());
  7093. $ctx1.sendIdx["at:put:"]=3;
  7094. _st(variables)._at_put_("#selector",self._selector());
  7095. $ctx1.sendIdx["at:put:"]=4;
  7096. _st(variables)._at_put_("#temps",self._temps());
  7097. $ctx1.sendIdx["at:put:"]=5;
  7098. _st(_st(self._class())._instanceVariableNames())._do_((function(each){
  7099. return smalltalk.withContext(function($ctx2) {
  7100. return _st(variables)._at_put_(each,self._instVarAt_(each));
  7101. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  7102. _st(anInspector)._setLabel_(self._printString());
  7103. $1=_st(anInspector)._setVariables_(variables);
  7104. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.MethodContext)})},
  7105. args: ["anInspector"],
  7106. 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",
  7107. messageSends: ["new", "at:put:", "home", "receiver", "selector", "temps", "do:", "instanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"],
  7108. referencedClasses: ["Dictionary"]
  7109. }),
  7110. smalltalk.MethodContext);
  7111. smalltalk.addMethod(
  7112. smalltalk.method({
  7113. selector: "inspectOn:",
  7114. protocol: '*IDE',
  7115. fn: function (anInspector){
  7116. var self=this;
  7117. var variables;
  7118. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7119. return smalltalk.withContext(function($ctx1) {
  7120. var $1;
  7121. variables=_st($Dictionary())._new();
  7122. _st(variables)._at_put_("#self",self);
  7123. $ctx1.sendIdx["at:put:"]=1;
  7124. _st(variables)._at_put_("#keys",self._keys());
  7125. $ctx1.sendIdx["at:put:"]=2;
  7126. self._keysAndValuesDo_((function(key,value){
  7127. return smalltalk.withContext(function($ctx2) {
  7128. return _st(variables)._at_put_(key,value);
  7129. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,1)})}));
  7130. _st(anInspector)._setLabel_(self._printString());
  7131. $1=_st(anInspector)._setVariables_(variables);
  7132. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.AssociativeCollection)})},
  7133. args: ["anInspector"],
  7134. 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",
  7135. messageSends: ["new", "at:put:", "keys", "keysAndValuesDo:", "setLabel:", "printString", "setVariables:"],
  7136. referencedClasses: ["Dictionary"]
  7137. }),
  7138. smalltalk.AssociativeCollection);
  7139. smalltalk.addMethod(
  7140. smalltalk.method({
  7141. selector: "inspectOn:",
  7142. protocol: '*IDE',
  7143. fn: function (anInspector){
  7144. var self=this;
  7145. var variables,i;
  7146. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7147. return smalltalk.withContext(function($ctx1) {
  7148. var $1;
  7149. variables=_st($Dictionary())._new();
  7150. _st(variables)._at_put_("#self",self);
  7151. $ctx1.sendIdx["at:put:"]=1;
  7152. _st(self["@elements"])._withIndexDo_((function(each,i){
  7153. return smalltalk.withContext(function($ctx2) {
  7154. return _st(variables)._at_put_(i,each);
  7155. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,1)})}));
  7156. _st(anInspector)._setLabel_(self._printString());
  7157. $1=_st(anInspector)._setVariables_(variables);
  7158. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Set)})},
  7159. args: ["anInspector"],
  7160. 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",
  7161. messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"],
  7162. referencedClasses: ["Dictionary"]
  7163. }),
  7164. smalltalk.Set);
  7165. });