IDE.js 268 KB

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