1
0

IDE.js 274 KB

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