IDE.js 269 KB

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