12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848 |
- smalltalk.addPackage('IDE', {});
- smalltalk.addClass('ClassesList', smalltalk.Widget, ['browser', 'ul', 'nodes'], 'IDE');
- smalltalk.addMethod(
- "_browser",
- smalltalk.method({
- selector: "browser",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@browser"];
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"browser",{}, smalltalk.ClassesList)})},
- args: [],
- source: "browser\x0a\x09^browser",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesList);
- smalltalk.addMethod(
- "_browser_",
- smalltalk.method({
- selector: "browser:",
- category: 'accessing',
- fn: function (aBrowser){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@browser"]=aBrowser;
- return self}, function($ctx1) {$ctx1.fill(self,"browser:",{aBrowser:aBrowser}, smalltalk.ClassesList)})},
- args: ["aBrowser"],
- source: "browser: aBrowser\x0a\x09browser := aBrowser",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesList);
- smalltalk.addMethod(
- "_category",
- smalltalk.method({
- selector: "category",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(_st(self)._browser())._selectedPackage();
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"category",{}, smalltalk.ClassesList)})},
- args: [],
- source: "category\x0a\x09^self browser selectedPackage",
- messageSends: ["selectedPackage", "browser"],
- referencedClasses: []
- }),
- smalltalk.ClassesList);
- smalltalk.addMethod(
- "_getNodes",
- smalltalk.method({
- selector: "getNodes",
- category: 'accessing',
- fn: function (){
- var self=this;
- var classes,children,others;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$2,$4;
- classes=_st(_st(self)._browser())._classes();
- children=[];
- others=[];
- $1=classes;
- $2=(function(each){
- return smalltalk.withContext(function($ctx2) {
$3=_st(classes)._includes_(_st(each)._superclass());
- if(smalltalk.assert($3)){
- return _st(others)._add_(each);
- } else {
- return _st(children)._add_(each);
- };
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
- _st($1)._do_($2);
- $4=_st(children)._collect_((function(each){
- return smalltalk.withContext(function($ctx2) {
return _st((smalltalk.ClassesListNode || ClassesListNode))._on_browser_classes_level_(each,_st(self)._browser(),others,(0));
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
- return $4;
- }, function($ctx1) {$ctx1.fill(self,"getNodes",{classes:classes,children:children,others:others}, smalltalk.ClassesList)})},
- args: [],
- 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]",
- messageSends: ["classes", "browser", "do:", "ifFalse:ifTrue:", "add:", "includes:", "superclass", "collect:", "on:browser:classes:level:"],
- referencedClasses: ["ClassesListNode"]
- }),
- smalltalk.ClassesList);
- smalltalk.addMethod(
- "_nodes",
- smalltalk.method({
- selector: "nodes",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=self["@nodes"];
- if(($receiver = $1) == nil || $receiver == undefined){
- self["@nodes"]=_st(self)._getNodes();
- self["@nodes"];
- } else {
- $1;
- };
- $2=self["@nodes"];
- return $2;
- }, function($ctx1) {$ctx1.fill(self,"nodes",{}, smalltalk.ClassesList)})},
- args: [],
- source: "nodes\x0a\x09nodes ifNil: [nodes := self getNodes].\x0a\x09^nodes",
- messageSends: ["ifNil:", "getNodes"],
- referencedClasses: []
- }),
- smalltalk.ClassesList);
- smalltalk.addMethod(
- "_renderOn_",
- smalltalk.method({
- selector: "renderOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=_st(html)._ul();
- _st($1)._class_("amber_column browser classes");
- $2=_st($1)._yourself();
- self["@ul"]=$2;
- _st(self)._updateNodes();
- return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html}, smalltalk.ClassesList)})},
- args: ["html"],
- source: "renderOn: html\x0a\x09ul := html ul\x0a\x09\x09class: 'amber_column browser classes';\x0a\x09\x09yourself.\x0a\x09self updateNodes",
- messageSends: ["class:", "ul", "yourself", "updateNodes"],
- referencedClasses: []
- }),
- smalltalk.ClassesList);
- smalltalk.addMethod(
- "_resetNodes",
- smalltalk.method({
- selector: "resetNodes",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@nodes"]=nil;
- return self}, function($ctx1) {$ctx1.fill(self,"resetNodes",{}, smalltalk.ClassesList)})},
- args: [],
- source: "resetNodes\x0a\x09nodes := nil",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesList);
- smalltalk.addMethod(
- "_updateNodes",
- smalltalk.method({
- selector: "updateNodes",
- category: 'rendering',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self["@ul"])._contents_((function(html){
- return smalltalk.withContext(function($ctx2) {
return _st(_st(self)._nodes())._do_((function(each){
- return smalltalk.withContext(function($ctx3) {
return _st(each)._renderOn_(html);
- }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"updateNodes",{}, smalltalk.ClassesList)})},
- args: [],
- source: "updateNodes\x0a\x09ul contents: [:html |\x0a\x09\x09self nodes do: [:each |\x0a\x09\x09\x09each renderOn: html]]",
- messageSends: ["contents:", "do:", "renderOn:", "nodes"],
- referencedClasses: []
- }),
- smalltalk.ClassesList);
- smalltalk.addMethod(
- "_on_",
- smalltalk.method({
- selector: "on:",
- category: 'instance creation',
- fn: function (aBrowser){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$3,$1;
- $2=_st(self)._new();
- _st($2)._browser_(aBrowser);
- $3=_st($2)._yourself();
- $1=$3;
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowser:aBrowser}, smalltalk.ClassesList.klass)})},
- args: ["aBrowser"],
- source: "on: aBrowser\x0a\x09^self new \x0a\x09\x09browser: aBrowser; \x0a\x09\x09yourself",
- messageSends: ["browser:", "new", "yourself"],
- referencedClasses: []
- }),
- smalltalk.ClassesList.klass);
- smalltalk.addClass('ClassesListNode', smalltalk.Widget, ['browser', 'theClass', 'level', 'nodes'], 'IDE');
- smalltalk.addMethod(
- "_browser",
- smalltalk.method({
- selector: "browser",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@browser"];
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"browser",{}, smalltalk.ClassesListNode)})},
- args: [],
- source: "browser\x0a\x09^browser",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_browser_",
- smalltalk.method({
- selector: "browser:",
- category: 'accessing',
- fn: function (aBrowser){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@browser"]=aBrowser;
- return self}, function($ctx1) {$ctx1.fill(self,"browser:",{aBrowser:aBrowser}, smalltalk.ClassesListNode)})},
- args: ["aBrowser"],
- source: "browser: aBrowser\x0a\x09browser := aBrowser",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_getNodesFrom_",
- smalltalk.method({
- selector: "getNodesFrom:",
- category: 'accessing',
- fn: function (aCollection){
- var self=this;
- var children,others;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$2;
- children=[];
- others=[];
- $1=aCollection;
- $2=(function(each){
- return smalltalk.withContext(function($ctx2) {
$3=_st(_st(each)._superclass()).__eq(_st(self)._theClass());
- if(smalltalk.assert($3)){
- return _st(children)._add_(each);
- } else {
- return _st(others)._add_(each);
- };
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
- _st($1)._do_($2);
- self["@nodes"]=_st(children)._collect_((function(each){
- return smalltalk.withContext(function($ctx2) {
return _st((smalltalk.ClassesListNode || ClassesListNode))._on_browser_classes_level_(each,_st(self)._browser(),others,_st(_st(self)._level()).__plus((1)));
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"getNodesFrom:",{aCollection:aCollection,children:children,others:others}, smalltalk.ClassesListNode)})},
- args: ["aCollection"],
- 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]",
- messageSends: ["do:", "ifTrue:ifFalse:", "add:", "=", "theClass", "superclass", "collect:", "on:browser:classes:level:", "browser", "+", "level"],
- referencedClasses: ["ClassesListNode"]
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_label",
- smalltalk.method({
- selector: "label",
- category: 'accessing',
- fn: function (){
- var self=this;
- var str;
- return smalltalk.withContext(function($ctx1) {
var $1;
- str=_st(_st((smalltalk.String || String))._new())._writeStream();
- _st(_st(self)._level())._timesRepeat_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(str)._nextPutAll_(" ");
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- _st(str)._nextPutAll_(_st(_st(self)._theClass())._name());
- $1=_st(str)._contents();
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"label",{str:str}, smalltalk.ClassesListNode)})},
- args: [],
- 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",
- messageSends: ["writeStream", "new", "timesRepeat:", "nextPutAll:", "level", "name", "theClass", "contents"],
- referencedClasses: ["String"]
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_level",
- smalltalk.method({
- selector: "level",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@level"];
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"level",{}, smalltalk.ClassesListNode)})},
- args: [],
- source: "level\x0a\x09^level",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_level_",
- smalltalk.method({
- selector: "level:",
- category: 'accessing',
- fn: function (anInteger){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@level"]=anInteger;
- return self}, function($ctx1) {$ctx1.fill(self,"level:",{anInteger:anInteger}, smalltalk.ClassesListNode)})},
- args: ["anInteger"],
- source: "level: anInteger\x0a\x09level := anInteger",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_nodes",
- smalltalk.method({
- selector: "nodes",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@nodes"];
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"nodes",{}, smalltalk.ClassesListNode)})},
- args: [],
- source: "nodes\x0a\x09^nodes",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_renderOn_",
- smalltalk.method({
- selector: "renderOn:",
- category: '',
- fn: function (html){
- var self=this;
- var li,cssClass;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- cssClass="";
- li=_st(_st(html)._li())._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(_st(self)._browser())._selectClass_(_st(self)._theClass());
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- _st(_st(li)._asJQuery())._html_(_st(self)._label());
- $1=_st(_st(_st(self)._browser())._selectedClass()).__eq(_st(self)._theClass());
- if(smalltalk.assert($1)){
- cssClass=_st(cssClass).__comma(" selected");
- cssClass;
- };
- $2=_st(_st(_st(self)._theClass())._comment())._isEmpty();
- if(! smalltalk.assert($2)){
- cssClass=_st(cssClass).__comma(" commented");
- cssClass;
- };
- _st(li)._class_(cssClass);
- _st(_st(self)._nodes())._do_((function(each){
- return smalltalk.withContext(function($ctx2) {
return _st(each)._renderOn_(html);
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,li:li,cssClass:cssClass}, smalltalk.ClassesListNode)})},
- args: ["html"],
- 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]",
- messageSends: ["onClick:", "selectClass:", "theClass", "browser", "li", "html:", "label", "asJQuery", "ifTrue:", ",", "=", "selectedClass", "ifFalse:", "isEmpty", "comment", "class:", "do:", "renderOn:", "nodes"],
- referencedClasses: []
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_theClass",
- smalltalk.method({
- selector: "theClass",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@theClass"];
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.ClassesListNode)})},
- args: [],
- source: "theClass\x0a\x09^theClass",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_theClass_",
- smalltalk.method({
- selector: "theClass:",
- category: 'accessing',
- fn: function (aClass){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@theClass"]=aClass;
- return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.ClassesListNode)})},
- args: ["aClass"],
- source: "theClass: aClass\x0a\x09theClass := aClass",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_on_browser_classes_level_",
- smalltalk.method({
- selector: "on:browser:classes:level:",
- category: 'instance creation',
- fn: function (aClass,aBrowser,aCollection,anInteger){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$3,$1;
- $2=_st(self)._new();
- _st($2)._theClass_(aClass);
- _st($2)._browser_(aBrowser);
- _st($2)._level_(anInteger);
- _st($2)._getNodesFrom_(aCollection);
- $3=_st($2)._yourself();
- $1=$3;
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"on:browser:classes:level:",{aClass:aClass,aBrowser:aBrowser,aCollection:aCollection,anInteger:anInteger}, smalltalk.ClassesListNode.klass)})},
- args: ["aClass", "aBrowser", "aCollection", "anInteger"],
- 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",
- messageSends: ["theClass:", "new", "browser:", "level:", "getNodesFrom:", "yourself"],
- referencedClasses: []
- }),
- smalltalk.ClassesListNode.klass);
- smalltalk.addClass('DebugErrorHandler', smalltalk.ErrorHandler, [], 'IDE');
- smalltalk.addMethod(
- "_handleError_",
- smalltalk.method({
- selector: "handleError:",
- category: 'error handling',
- fn: function (anError){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- _st((function(){
- return smalltalk.withContext(function($ctx2) {
$1=_st((smalltalk.Debugger || Debugger))._new();
- _st($1)._error_(anError);
- $2=_st($1)._open();
- return $2;
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.Error || Error),(function(error){
- return smalltalk.withContext(function($ctx2) {
return _st(_st((smalltalk.ErrorHandler || ErrorHandler))._new())._handleError_(error);
- }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError}, smalltalk.DebugErrorHandler)})},
- args: ["anError"],
- 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 ]",
- messageSends: ["on:do:", "handleError:", "new", "error:", "open"],
- referencedClasses: ["Error", "ErrorHandler", "Debugger"]
- }),
- smalltalk.DebugErrorHandler);
- smalltalk.addMethod(
- "_initialize",
- smalltalk.method({
- selector: "initialize",
- category: 'initialization',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self)._register();
- return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.DebugErrorHandler.klass)})},
- args: [],
- source: "initialize\x0a\x09self register",
- messageSends: ["register"],
- referencedClasses: []
- }),
- smalltalk.DebugErrorHandler.klass);
- smalltalk.addClass('SourceArea', smalltalk.Widget, ['editor', 'div', 'receiver', 'onDoIt'], 'IDE');
- smalltalk.addMethod(
- "_clear",
- smalltalk.method({
- selector: "clear",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self)._val_("");
- return self}, function($ctx1) {$ctx1.fill(self,"clear",{}, smalltalk.SourceArea)})},
- args: [],
- source: "clear\x0a self val: ''",
- messageSends: ["val:"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_currentLine",
- smalltalk.method({
- selector: "currentLine",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(self["@editor"])._getLine_(_st(_st(self["@editor"])._getCursor())._line());
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"currentLine",{}, smalltalk.SourceArea)})},
- args: [],
- source: "currentLine\x0a ^editor getLine: (editor getCursor line)",
- messageSends: ["getLine:", "line", "getCursor"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_currentLineOrSelection",
- smalltalk.method({
- selector: "currentLineOrSelection",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$1;
- $2=_st(self["@editor"])._somethingSelected();
- if(smalltalk.assert($2)){
- $1=_st(self)._selection();
- } else {
- $1=_st(self)._currentLine();
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"currentLineOrSelection",{}, smalltalk.SourceArea)})},
- args: [],
- source: "currentLineOrSelection\x0a ^editor somethingSelected\x0a\x09ifFalse: [self currentLine]\x0a\x09ifTrue: [self selection]",
- messageSends: ["ifFalse:ifTrue:", "currentLine", "selection", "somethingSelected"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_doIt",
- smalltalk.method({
- selector: "doIt",
- category: 'actions',
- fn: function (){
- var self=this;
- var result;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- result=_st(self)._eval_(_st(self)._currentLineOrSelection());
- $1=_st(self)._onDoIt();
- if(($receiver = $1) == nil || $receiver == undefined){
- $1;
- } else {
- _st(_st(self)._onDoIt())._value();
- };
- $2=result;
- return $2;
- }, function($ctx1) {$ctx1.fill(self,"doIt",{result:result}, smalltalk.SourceArea)})},
- args: [],
- source: "doIt\x0a | result |\x0a result := self eval: self currentLineOrSelection.\x0a self onDoIt ifNotNil: [self onDoIt value].\x0a ^result",
- messageSends: ["eval:", "currentLineOrSelection", "ifNotNil:", "value", "onDoIt"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_editor",
- smalltalk.method({
- selector: "editor",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@editor"];
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"editor",{}, smalltalk.SourceArea)})},
- args: [],
- source: "editor\x0a\x09^editor",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_eval_",
- smalltalk.method({
- selector: "eval:",
- category: 'actions',
- fn: function (aString){
- var self=this;
- var compiler;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- var $early={};
- try {
- compiler=_st((smalltalk.Compiler || Compiler))._new();
- _st((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(compiler)._parseExpression_(aString);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.Error || Error),(function(ex){
- return smalltalk.withContext(function($ctx2) {
$1=_st(window)._alert_(_st(ex)._messageText());
- throw $early=[$1];
- }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
- $2=_st(_st(_st(compiler)._eval_(_st(compiler)._compile_forClass_(_st(_st("doIt ^[").__comma(aString)).__comma("] value"),(smalltalk.DoIt || DoIt))))._fn())._applyTo_arguments_(_st(self)._receiver(),[]);
- return $2;
- }
- catch(e) {if(e===$early)return e[0]; throw e}
- }, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,compiler:compiler}, smalltalk.SourceArea)})},
- args: ["aString"],
- 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 eval: (compiler compile: 'doIt ^[', aString, '] value' forClass: DoIt)) fn applyTo: self receiver arguments: #()",
- messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "applyTo:arguments:", "receiver", "fn", "eval:", "compile:forClass:", ","],
- referencedClasses: ["Compiler", "Error", "DoIt"]
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_fileIn",
- smalltalk.method({
- selector: "fileIn",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st((smalltalk.Importer || Importer))._new())._import_(_st(_st(self)._currentLineOrSelection())._readStream());
- return self}, function($ctx1) {$ctx1.fill(self,"fileIn",{}, smalltalk.SourceArea)})},
- args: [],
- source: "fileIn\x0a Importer new import: self currentLineOrSelection readStream",
- messageSends: ["import:", "readStream", "currentLineOrSelection", "new"],
- referencedClasses: ["Importer"]
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_focus",
- smalltalk.method({
- selector: "focus",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st(self)._editor())._focus();
- return self}, function($ctx1) {$ctx1.fill(self,"focus",{}, smalltalk.SourceArea)})},
- args: [],
- source: "focus\x0a self editor focus.",
- messageSends: ["focus", "editor"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_handleKeyDown_",
- smalltalk.method({
- selector: "handleKeyDown:",
- category: 'actions',
- fn: function (anEvent){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
if(anEvent.ctrlKey) {
- if(anEvent.keyCode === 80) { //ctrl+p
- self._printIt();
- anEvent.preventDefault();
- return false;
- }
- if(anEvent.keyCode === 68) { //ctrl+d
- self._doIt();
- anEvent.preventDefault();
- return false;
- }
- if(anEvent.keyCode === 73) { //ctrl+i
- self._inspectIt();
- anEvent.preventDefault();
- return false;
- }
- };
- return self}, function($ctx1) {$ctx1.fill(self,"handleKeyDown:",{anEvent:anEvent}, smalltalk.SourceArea)})},
- args: ["anEvent"],
- source: "handleKeyDown: anEvent\x0a <if(anEvent.ctrlKey) {\x0a\x09\x09if(anEvent.keyCode === 80) { //ctrl+p\x0a\x09\x09\x09self._printIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 68) { //ctrl+d\x0a\x09\x09\x09self._doIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 73) { //ctrl+i\x0a\x09\x09\x09self._inspectIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09}>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_inspectIt",
- smalltalk.method({
- selector: "inspectIt",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st(self)._doIt())._inspect();
- return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{}, smalltalk.SourceArea)})},
- args: [],
- source: "inspectIt\x0a self doIt inspect",
- messageSends: ["inspect", "doIt"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_onDoIt",
- smalltalk.method({
- selector: "onDoIt",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@onDoIt"];
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"onDoIt",{}, smalltalk.SourceArea)})},
- args: [],
- source: "onDoIt\x0a\x09^onDoIt",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_onDoIt_",
- smalltalk.method({
- selector: "onDoIt:",
- category: 'accessing',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@onDoIt"]=aBlock;
- return self}, function($ctx1) {$ctx1.fill(self,"onDoIt:",{aBlock:aBlock}, smalltalk.SourceArea)})},
- args: ["aBlock"],
- source: "onDoIt: aBlock\x0a\x09onDoIt := aBlock",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_onKeyDown_",
- smalltalk.method({
- selector: "onKeyDown:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self["@div"])._onKeyDown_(aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{aBlock:aBlock}, smalltalk.SourceArea)})},
- args: ["aBlock"],
- source: "onKeyDown: aBlock\x0a\x09div onKeyDown: aBlock",
- messageSends: ["onKeyDown:"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_onKeyUp_",
- smalltalk.method({
- selector: "onKeyUp:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self["@div"])._onKeyUp_(aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onKeyUp:",{aBlock:aBlock}, smalltalk.SourceArea)})},
- args: ["aBlock"],
- source: "onKeyUp: aBlock\x0a\x09div onKeyUp: aBlock",
- messageSends: ["onKeyUp:"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_print_",
- smalltalk.method({
- selector: "print:",
- category: 'actions',
- fn: function (aString){
- var self=this;
- var start,stop,currentLine;
- return smalltalk.withContext(function($ctx1) {
currentLine=_st(_st(self["@editor"])._getCursor_(false))._line();
- start=_st((smalltalk.HashedCollection || HashedCollection))._new();
- _st(start)._at_put_("line",currentLine);
- _st(start)._at_put_("ch",_st(_st(self["@editor"])._getCursor_(false))._ch());
- _st(_st(self["@editor"])._getSelection())._ifEmpty_((function(){
- return smalltalk.withContext(function($ctx2) {
_st(start)._at_put_("ch",_st(_st(self["@editor"])._getLine_(currentLine))._size());
- return _st(self["@editor"])._setSelection_end_(smalltalk.HashedCollection._fromPairs_([_st("line").__minus_gt(currentLine),_st("ch").__minus_gt((0))]),start);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- stop=_st((smalltalk.HashedCollection || HashedCollection))._new();
- _st(stop)._at_put_("line",currentLine);
- _st(stop)._at_put_("ch",_st(_st(_st(start)._at_("ch")).__plus(_st(aString)._size())).__plus((2)));
- _st(self["@editor"])._replaceSelection_(_st(_st(_st(_st(self["@editor"])._getSelection()).__comma(" ")).__comma(aString)).__comma(" "));
- _st(self["@editor"])._setCursor_(_st(self["@editor"])._getCursor_(true));
- _st(self["@editor"])._setSelection_end_(stop,start);
- return self}, function($ctx1) {$ctx1.fill(self,"print:",{aString:aString,start:start,stop:stop,currentLine:currentLine}, smalltalk.SourceArea)})},
- args: ["aString"],
- source: "print: aString\x0a\x09| start stop currentLine |\x0a currentLine := (editor getCursor: false) line.\x0a\x09start := HashedCollection new.\x0a\x09start at: 'line' put: currentLine.\x0a\x09start at: 'ch' put: (editor getCursor: false) ch.\x0a (editor getSelection) ifEmpty: [\x0a \x09\x22select current line if selection is empty\x22\x0a \x09start at: 'ch' put: (editor getLine: currentLine) size.\x0a editor setSelection: #{'line' -> currentLine. 'ch' -> 0} end: start.\x0a ].\x0a\x09stop := HashedCollection new.\x0a\x09stop at: 'line' put: currentLine.\x0a\x09stop at: 'ch' put: ((start at: 'ch') + aString size + 2).\x0a\x0a\x09editor replaceSelection: (editor getSelection, ' ', aString, ' ').\x0a\x09editor setCursor: (editor getCursor: true).\x0a\x09editor setSelection: stop end: start",
- messageSends: ["line", "getCursor:", "new", "at:put:", "ch", "ifEmpty:", "size", "getLine:", "setSelection:end:", "->", "getSelection", "+", "at:", "replaceSelection:", ",", "setCursor:"],
- referencedClasses: ["HashedCollection"]
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_printIt",
- smalltalk.method({
- selector: "printIt",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self)._print_(_st(_st(self)._doIt())._printString());
- _st(self)._focus();
- return self}, function($ctx1) {$ctx1.fill(self,"printIt",{}, smalltalk.SourceArea)})},
- args: [],
- source: "printIt\x0a self print: self doIt printString.\x0a\x09self focus.",
- messageSends: ["print:", "printString", "doIt", "focus"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_receiver",
- smalltalk.method({
- selector: "receiver",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$1;
- $2=self["@receiver"];
- if(($receiver = $2) == nil || $receiver == undefined){
- $1=_st((smalltalk.DoIt || DoIt))._new();
- } else {
- $1=$2;
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"receiver",{}, smalltalk.SourceArea)})},
- args: [],
- source: "receiver\x0a\x09^receiver ifNil: [DoIt new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: ["DoIt"]
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_receiver_",
- smalltalk.method({
- selector: "receiver:",
- category: 'accessing',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@receiver"]=anObject;
- return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject}, smalltalk.SourceArea)})},
- args: ["anObject"],
- source: "receiver: anObject\x0a\x09receiver := anObject",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_renderOn_",
- smalltalk.method({
- selector: "renderOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- var textarea;
- return smalltalk.withContext(function($ctx1) {
self["@div"]=_st(_st(html)._div())._class_("source");
- _st(self["@div"])._with_((function(){
- return smalltalk.withContext(function($ctx2) {
textarea=_st(html)._textarea();
- return textarea;
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- _st(self)._setEditorOn_(_st(textarea)._element());
- _st(self["@div"])._onKeyDown_((function(e){
- return smalltalk.withContext(function($ctx2) {
return _st(self)._handleKeyDown_(e);
- }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,textarea:textarea}, smalltalk.SourceArea)})},
- args: ["html"],
- source: "renderOn: html\x0a | textarea |\x0a div := html div class: 'source'.\x0a div with: [textarea := html textarea].\x0a self setEditorOn: textarea element.\x0a div onKeyDown: [:e | self handleKeyDown: e]",
- messageSends: ["class:", "div", "with:", "textarea", "setEditorOn:", "element", "onKeyDown:", "handleKeyDown:"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_selection",
- smalltalk.method({
- selector: "selection",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(self["@editor"])._getSelection();
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"selection",{}, smalltalk.SourceArea)})},
- args: [],
- source: "selection\x0a\x09^editor getSelection",
- messageSends: ["getSelection"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_selectionEnd",
- smalltalk.method({
- selector: "selectionEnd",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionEnd", []);
- return $1;
- },
- args: [],
- source: "selectionEnd\x0a ^textarea element selectionEnd",
- messageSends: ["selectionEnd", "element"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_selectionEnd_",
- smalltalk.method({
- selector: "selectionEnd:",
- category: 'accessing',
- fn: function (anInteger) {
- var self = this;
- smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionEnd_", [anInteger]);
- return self;
- },
- args: ["anInteger"],
- source: "selectionEnd: anInteger\x0a textarea element selectionEnd: anInteger",
- messageSends: ["selectionEnd:", "element"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_selectionStart",
- smalltalk.method({
- selector: "selectionStart",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionStart", []);
- return $1;
- },
- args: [],
- source: "selectionStart\x0a ^textarea element selectionStart",
- messageSends: ["selectionStart", "element"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_selectionStart_",
- smalltalk.method({
- selector: "selectionStart:",
- category: 'accessing',
- fn: function (anInteger) {
- var self = this;
- smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionStart_", [anInteger]);
- return self;
- },
- args: ["anInteger"],
- source: "selectionStart: anInteger\x0a textarea element selectionStart: anInteger",
- messageSends: ["selectionStart:", "element"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_setEditorOn_",
- smalltalk.method({
- selector: "setEditorOn:",
- category: 'accessing',
- fn: function (aTextarea) {
- var self = this;
- self['@editor'] = CodeMirror.fromTextArea(aTextarea, {theme: "amber", lineNumbers: true, enterMode: "flat", matchBrackets: true, electricChars: false});
- return self;
- },
- args: ["aTextarea"],
- source: "setEditorOn: aTextarea\x0a\x09<self['@editor'] = CodeMirror.fromTextArea(aTextarea, {\x0a\x09\x09theme: 'amber',\x0a lineNumbers: true,\x0a enterMode: 'flat',\x0a matchBrackets: true,\x0a electricChars: false\x0a\x09})>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_val",
- smalltalk.method({
- selector: "val",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(self['@editor'], "_getValue", []);
- return $1;
- },
- args: [],
- source: "val\x0a ^editor getValue",
- messageSends: ["getValue"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_val_",
- smalltalk.method({
- selector: "val:",
- category: 'accessing',
- fn: function (aString) {
- var self = this;
- smalltalk.send(self['@editor'], "_setValue_", [aString]);
- return self;
- },
- args: ["aString"],
- source: "val: aString\x0a editor setValue: aString",
- messageSends: ["setValue:"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addClass('TabManager', smalltalk.Widget, ['selectedTab', 'tabs', 'opened', 'ul', 'input'], 'IDE');
- smalltalk.addMethod(
- "_addTab_",
- smalltalk.method({
- selector: "addTab:",
- category: 'adding/Removing',
- fn: function (aWidget){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st(self)._tabs())._add_(aWidget);
- _st(aWidget)._appendToJQuery_(_st("#amber")._asJQuery());
- _st(aWidget)._hide();
- return self}, function($ctx1) {$ctx1.fill(self,"addTab:",{aWidget:aWidget}, smalltalk.TabManager)})},
- args: ["aWidget"],
- source: "addTab: aWidget\x0a self tabs add: aWidget.\x0a aWidget appendToJQuery: '#amber' asJQuery.\x0a aWidget hide",
- messageSends: ["add:", "tabs", "appendToJQuery:", "asJQuery", "hide"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_close",
- smalltalk.method({
- selector: "close",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@opened"];
- if(smalltalk.assert($1)){
- _st(_st("#amber")._asJQuery())._hide();
- _st(_st(self["@ul"])._asJQuery())._hide();
- _st(self["@selectedTab"])._hide();
- _st(self)._removeBodyMargin();
- _st(_st("body")._asJQuery())._removeClass_("amberBody");
- self["@opened"]=false;
- self["@opened"];
- };
- return self}, function($ctx1) {$ctx1.fill(self,"close",{}, smalltalk.TabManager)})},
- args: [],
- source: "close\x0a opened ifTrue: [\x0a\x09'#amber' asJQuery hide.\x0a\x09ul asJQuery hide.\x0a\x09selectedTab hide.\x0a\x09self removeBodyMargin.\x0a\x09'body' asJQuery removeClass: 'amberBody'.\x0a\x09opened := false]",
- messageSends: ["ifTrue:", "hide", "asJQuery", "removeBodyMargin", "removeClass:"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_closeTab_",
- smalltalk.method({
- selector: "closeTab:",
- category: 'actions',
- fn: function (aWidget){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self)._removeTab_(aWidget);
- _st(self)._selectTab_(_st(_st(self)._tabs())._last());
- _st(aWidget)._remove();
- _st(self)._update();
- return self}, function($ctx1) {$ctx1.fill(self,"closeTab:",{aWidget:aWidget}, smalltalk.TabManager)})},
- args: ["aWidget"],
- source: "closeTab: aWidget\x0a self removeTab: aWidget.\x0a self selectTab: self tabs last.\x0a aWidget remove.\x0a self update",
- messageSends: ["removeTab:", "selectTab:", "last", "tabs", "remove", "update"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_initialize",
- smalltalk.method({
- selector: "initialize",
- category: 'initialization',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4,$5,$6;
- smalltalk.Widget.fn.prototype._initialize.apply(_st(self), []);
- self["@opened"]=true;
- _st((function(html){
- return smalltalk.withContext(function($ctx2) {
return _st(_st(html)._div())._id_("amber");
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}))._appendToJQuery_(_st("body")._asJQuery());
- _st(_st("body")._asJQuery())._addClass_("amberBody");
- _st(self)._appendToJQuery_(_st("#amber")._asJQuery());
- $1=self;
- _st($1)._addTab_(_st((smalltalk.IDETranscript || IDETranscript))._current());
- _st($1)._addTab_(_st((smalltalk.Workspace || Workspace))._new());
- $2=_st($1)._addTab_(_st((smalltalk.TestRunner || TestRunner))._new());
- _st(self)._selectTab_(_st(_st(self)._tabs())._last());
- $3=self;
- _st($3)._onResize_((function(){
- return smalltalk.withContext(function($ctx2) {
$4=self;
- _st($4)._updateBodyMargin();
- $5=_st($4)._updatePosition();
- return $5;
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- $6=_st($3)._onWindowResize_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(self)._updatePosition();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.TabManager)})},
- args: [],
- source: "initialize\x0a super initialize.\x0a opened := true.\x0a [:html | html div id: 'amber'] appendToJQuery: 'body' asJQuery.\x0a 'body' asJQuery \x0a\x09addClass: 'amberBody'.\x0a self appendToJQuery: '#amber' asJQuery.\x0a self \x0a\x09addTab: IDETranscript current;\x0a\x09addTab: Workspace new;\x0a\x09addTab: TestRunner new.\x0a self selectTab: self tabs last.\x0a self \x0a\x09onResize: [self updateBodyMargin; updatePosition];\x0a\x09onWindowResize: [self updatePosition]",
- messageSends: ["initialize", "appendToJQuery:", "asJQuery", "id:", "div", "addClass:", "addTab:", "current", "new", "selectTab:", "last", "tabs", "onResize:", "updateBodyMargin", "updatePosition", "onWindowResize:"],
- referencedClasses: ["IDETranscript", "Workspace", "TestRunner"]
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_labelFor_",
- smalltalk.method({
- selector: "labelFor:",
- category: 'accessing',
- fn: function (aWidget){
- var self=this;
- var label,maxSize;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- maxSize=(15);
- label=_st(_st(aWidget)._label())._copyFrom_to_((0),_st(_st(_st(aWidget)._label())._size())._min_(maxSize));
- $1=_st(_st(_st(aWidget)._label())._size()).__gt(maxSize);
- if(smalltalk.assert($1)){
- label=_st(label).__comma("...");
- label;
- };
- $2=label;
- return $2;
- }, function($ctx1) {$ctx1.fill(self,"labelFor:",{aWidget:aWidget,label:label,maxSize:maxSize}, smalltalk.TabManager)})},
- args: ["aWidget"],
- 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",
- messageSends: ["copyFrom:to:", "min:", "size", "label", "ifTrue:", ",", ">"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_newBrowserTab",
- smalltalk.method({
- selector: "newBrowserTab",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st((smalltalk.Browser || Browser))._open();
- return self}, function($ctx1) {$ctx1.fill(self,"newBrowserTab",{}, smalltalk.TabManager)})},
- args: [],
- source: "newBrowserTab\x0a Browser open",
- messageSends: ["open"],
- referencedClasses: ["Browser"]
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_onResize_",
- smalltalk.method({
- selector: "onResize:",
- category: 'actions',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
jQuery('#amber').resizable({
- handles: 'n',
- resize: aBlock,
- minHeight: 230
- });
- return self}, function($ctx1) {$ctx1.fill(self,"onResize:",{aBlock:aBlock}, smalltalk.TabManager)})},
- args: ["aBlock"],
- source: "onResize: aBlock\x0a <jQuery('#amber').resizable({\x0a\x09handles: 'n', \x0a\x09resize: aBlock,\x0a\x09minHeight: 230\x0a})>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_onWindowResize_",
- smalltalk.method({
- selector: "onWindowResize:",
- category: 'actions',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
jQuery(window).resize(aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onWindowResize:",{aBlock:aBlock}, smalltalk.TabManager)})},
- args: ["aBlock"],
- source: "onWindowResize: aBlock\x0a <jQuery(window).resize(aBlock)>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_open",
- smalltalk.method({
- selector: "open",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@opened"];
- if(! smalltalk.assert($1)){
- _st(_st("body")._asJQuery())._addClass_("amberBody");
- _st(_st("#amber")._asJQuery())._show();
- _st(_st(self["@ul"])._asJQuery())._show();
- _st(self)._updateBodyMargin();
- _st(self["@selectedTab"])._show();
- self["@opened"]=true;
- self["@opened"];
- };
- return self}, function($ctx1) {$ctx1.fill(self,"open",{}, smalltalk.TabManager)})},
- args: [],
- source: "open\x0a opened ifFalse: [\x0a\x09'body' asJQuery addClass: 'amberBody'.\x0a\x09'#amber' asJQuery show.\x0a\x09ul asJQuery show.\x0a\x09self updateBodyMargin.\x0a\x09selectedTab show.\x0a\x09opened := true]",
- messageSends: ["ifFalse:", "addClass:", "asJQuery", "show", "updateBodyMargin"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_removeBodyMargin",
- smalltalk.method({
- selector: "removeBodyMargin",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self)._setBodyMargin_((0));
- return self}, function($ctx1) {$ctx1.fill(self,"removeBodyMargin",{}, smalltalk.TabManager)})},
- args: [],
- source: "removeBodyMargin\x0a self setBodyMargin: 0",
- messageSends: ["setBodyMargin:"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_removeTab_",
- smalltalk.method({
- selector: "removeTab:",
- category: 'adding/Removing',
- fn: function (aWidget){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st(self)._tabs())._remove_(aWidget);
- _st(self)._update();
- return self}, function($ctx1) {$ctx1.fill(self,"removeTab:",{aWidget:aWidget}, smalltalk.TabManager)})},
- args: ["aWidget"],
- source: "removeTab: aWidget\x0a self tabs remove: aWidget.\x0a self update",
- messageSends: ["remove:", "tabs", "update"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_renderOn_",
- smalltalk.method({
- selector: "renderOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- _st(_st(html)._div())._id_("logo");
- _st(self)._renderToolbarOn_(html);
- $1=_st(html)._ul();
- _st($1)._id_("amberTabs");
- $2=_st($1)._yourself();
- self["@ul"]=$2;
- _st(self)._renderTabs();
- return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html}, smalltalk.TabManager)})},
- args: ["html"],
- 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",
- messageSends: ["id:", "div", "renderToolbarOn:", "ul", "yourself", "renderTabs"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_renderTabFor_on_",
- smalltalk.method({
- selector: "renderTabFor:on:",
- category: 'rendering',
- fn: function (aWidget,html){
- var self=this;
- var li;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$5,$7,$9,$10,$11,$8,$6,$4,$12;
- li=_st(html)._li();
- $1=_st(self["@selectedTab"]).__eq(aWidget);
- if(smalltalk.assert($1)){
- _st(li)._class_("selected");
- };
- $2=li;
- $3=$2;
- $4=(function(){
- return smalltalk.withContext(function($ctx2) {
_st(_st(html)._span())._class_("ltab");
- $5=_st(html)._span();
- _st($5)._class_("mtab");
- $7=$5;
- $8=(function(){
- return smalltalk.withContext(function($ctx3) {
$9=_st(aWidget)._canBeClosed();
- if(smalltalk.assert($9)){
- $10=_st(html)._span();
- _st($10)._class_("close");
- _st($10)._with_("x");
- $11=_st($10)._onClick_((function(){
- return smalltalk.withContext(function($ctx4) {
return _st(self)._closeTab_(aWidget);
- }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
- $11;
- };
- return _st(_st(html)._span())._with_(_st(self)._labelFor_(aWidget));
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
- $6=_st($7)._with_($8);
- $6;
- return _st(_st(html)._span())._class_("rtab");
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
- _st($3)._with_($4);
- $12=_st($2)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(self)._selectTab_(aWidget);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"renderTabFor:on:",{aWidget:aWidget,html:html,li:li}, smalltalk.TabManager)})},
- args: ["aWidget", "html"],
- 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]",
- messageSends: ["li", "ifTrue:", "class:", "=", "with:", "span", "onClick:", "closeTab:", "canBeClosed", "labelFor:", "selectTab:"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_renderTabs",
- smalltalk.method({
- selector: "renderTabs",
- category: 'rendering',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
- _st(self["@ul"])._contents_((function(html){
- return smalltalk.withContext(function($ctx2) {
_st(_st(self)._tabs())._do_((function(each){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._renderTabFor_on_(each,html);
- }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
- $1=_st(html)._li();
- _st($1)._class_("newtab");
- _st($1)._with_((function(){
- return smalltalk.withContext(function($ctx3) {
_st(_st(html)._span())._class_("ltab");
- $2=_st(html)._span();
- _st($2)._class_("mtab");
- $3=_st($2)._with_(" + ");
- $3;
- return _st(_st(html)._span())._class_("rtab");
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $4=_st($1)._onClick_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._newBrowserTab();
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- return $4;
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"renderTabs",{}, smalltalk.TabManager)})},
- args: [],
- source: "renderTabs\x0a\x09ul contents: [:html |\x0a\x09 self tabs do: [:each |\x0a\x09\x09self renderTabFor: each on: html].\x0a\x09 html li\x0a\x09\x09class: 'newtab';\x0a\x09\x09with: [\x0a\x09\x09\x09html span class: 'ltab'.\x0a\x09\x09\x09html span class: 'mtab'; with: ' + '.\x0a\x09\x09\x09html span class: 'rtab'];\x0a\x09\x09onClick: [self newBrowserTab]]",
- messageSends: ["contents:", "do:", "renderTabFor:on:", "tabs", "class:", "li", "with:", "span", "onClick:", "newBrowserTab"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_renderToolbarOn_",
- smalltalk.method({
- selector: "renderToolbarOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$5,$6,$7,$9,$8,$10,$11,$4,$2;
- $1=_st(html)._div();
- _st($1)._id_("amber_toolbar");
- $3=$1;
- $4=(function(){
- return smalltalk.withContext(function($ctx2) {
$5=_st(html)._input();
- _st($5)._class_("implementors");
- $6=_st($5)._yourself();
- self["@input"]=$6;
- self["@input"];
- $7=self["@input"];
- $8=(function(event){
- return smalltalk.withContext(function($ctx3) {
$9=_st(_st(event)._keyCode()).__eq((13));
- if(smalltalk.assert($9)){
- return _st(self)._search_(_st(_st(self["@input"])._asJQuery())._val());
- };
- }, function($ctx3) {$ctx3.fillBlock({event:event},$ctx1)})});
- _st($7)._onKeyPress_($8);
- $10=_st(html)._div();
- _st($10)._id_("amber_close");
- $11=_st($10)._onClick_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._close();
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- return $11;
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
- $2=_st($3)._with_($4);
- return self}, function($ctx1) {$ctx1.fill(self,"renderToolbarOn:",{html:html}, smalltalk.TabManager)})},
- args: ["html"],
- 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]]",
- messageSends: ["id:", "div", "with:", "class:", "input", "yourself", "onKeyPress:", "ifTrue:", "search:", "val", "asJQuery", "=", "keyCode", "onClick:", "close"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_search_",
- smalltalk.method({
- selector: "search:",
- category: 'actions',
- fn: function (aString){
- var self=this;
- var searchedClass;
- return smalltalk.withContext(function($ctx1) {
var $1;
- searchedClass=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(aString);
- $1=_st(searchedClass)._isClass();
- if(smalltalk.assert($1)){
- _st((smalltalk.Browser || Browser))._openOn_(searchedClass);
- } else {
- _st((smalltalk.ReferencesBrowser || ReferencesBrowser))._search_(aString);
- };
- return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString,searchedClass:searchedClass}, smalltalk.TabManager)})},
- args: ["aString"],
- 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]",
- messageSends: ["at:", "current", "ifTrue:ifFalse:", "openOn:", "search:", "isClass"],
- referencedClasses: ["Smalltalk", "Browser", "ReferencesBrowser"]
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_selectTab_",
- smalltalk.method({
- selector: "selectTab:",
- category: 'actions',
- fn: function (aWidget){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self)._open();
- self["@selectedTab"]=aWidget;
- _st(_st(self)._tabs())._do_((function(each){
- return smalltalk.withContext(function($ctx2) {
return _st(each)._hide();
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
- _st(aWidget)._show();
- _st(self)._update();
- return self}, function($ctx1) {$ctx1.fill(self,"selectTab:",{aWidget:aWidget}, smalltalk.TabManager)})},
- args: ["aWidget"],
- source: "selectTab: aWidget\x0a self open.\x0a selectedTab := aWidget.\x0a self tabs do: [:each |\x0a\x09each hide].\x0a aWidget show.\x0a\x09\x0a self update",
- messageSends: ["open", "do:", "hide", "tabs", "show", "update"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_setBodyMargin_",
- smalltalk.method({
- selector: "setBodyMargin:",
- category: 'actions',
- fn: function (anInteger){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st(".amberBody")._asJQuery())._css_put_("margin-bottom",_st(_st(anInteger)._asString()).__comma("px"));
- return self}, function($ctx1) {$ctx1.fill(self,"setBodyMargin:",{anInteger:anInteger}, smalltalk.TabManager)})},
- args: ["anInteger"],
- source: "setBodyMargin: anInteger\x0a '.amberBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'",
- messageSends: ["css:put:", ",", "asString", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_tabs",
- smalltalk.method({
- selector: "tabs",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$1;
- $2=self["@tabs"];
- if(($receiver = $2) == nil || $receiver == undefined){
- self["@tabs"]=_st((smalltalk.Array || Array))._new();
- $1=self["@tabs"];
- } else {
- $1=$2;
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"tabs",{}, smalltalk.TabManager)})},
- args: [],
- source: "tabs\x0a ^tabs ifNil: [tabs := Array new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: ["Array"]
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_update",
- smalltalk.method({
- selector: "update",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self)._renderTabs();
- return self}, function($ctx1) {$ctx1.fill(self,"update",{}, smalltalk.TabManager)})},
- args: [],
- source: "update\x0a\x09self renderTabs",
- messageSends: ["renderTabs"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_updateBodyMargin",
- smalltalk.method({
- selector: "updateBodyMargin",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self)._setBodyMargin_(_st(_st("#amber")._asJQuery())._height());
- return self}, function($ctx1) {$ctx1.fill(self,"updateBodyMargin",{}, smalltalk.TabManager)})},
- args: [],
- source: "updateBodyMargin\x0a self setBodyMargin: '#amber' asJQuery height",
- messageSends: ["setBodyMargin:", "height", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_updatePosition",
- smalltalk.method({
- selector: "updatePosition",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
jQuery('#amber').css('top', '').css('bottom', '0px');
- return self}, function($ctx1) {$ctx1.fill(self,"updatePosition",{}, smalltalk.TabManager)})},
- args: [],
- source: "updatePosition\x0a <jQuery('#amber').css('top', '').css('bottom', '0px')>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.TabManager.klass.iVarNames = ['current'];
- smalltalk.addMethod(
- "_current",
- smalltalk.method({
- selector: "current",
- category: 'instance creation',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$1;
- $2=self["@current"];
- if(($receiver = $2) == nil || $receiver == undefined){
- self["@current"]=smalltalk.Widget.klass.fn.prototype._new.apply(_st(self), []);
- $1=self["@current"];
- } else {
- $1=$2;
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.TabManager.klass)})},
- args: [],
- source: "current\x0a ^current ifNil: [current := super new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: []
- }),
- smalltalk.TabManager.klass);
- smalltalk.addMethod(
- "_new",
- smalltalk.method({
- selector: "new",
- category: 'instance creation',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self)._shouldNotImplement();
- return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.TabManager.klass)})},
- args: [],
- source: "new\x0a self shouldNotImplement",
- messageSends: ["shouldNotImplement"],
- referencedClasses: []
- }),
- smalltalk.TabManager.klass);
- smalltalk.addClass('TabWidget', smalltalk.Widget, ['div'], 'IDE');
- smalltalk.addMethod(
- "_canBeClosed",
- smalltalk.method({
- selector: "canBeClosed",
- category: 'testing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
return false;
- }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{}, smalltalk.TabWidget)})},
- args: [],
- source: "canBeClosed\x0a ^false",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_close",
- smalltalk.method({
- selector: "close",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st((smalltalk.TabManager || TabManager))._current())._closeTab_(self);
- return self}, function($ctx1) {$ctx1.fill(self,"close",{}, smalltalk.TabWidget)})},
- args: [],
- source: "close\x0a TabManager current closeTab: self",
- messageSends: ["closeTab:", "current"],
- referencedClasses: ["TabManager"]
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_hide",
- smalltalk.method({
- selector: "hide",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st(self["@div"])._asJQuery())._hide();
- return self}, function($ctx1) {$ctx1.fill(self,"hide",{}, smalltalk.TabWidget)})},
- args: [],
- source: "hide\x0a\x09div asJQuery hide",
- messageSends: ["hide", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_label",
- smalltalk.method({
- selector: "label",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self)._subclassResponsibility();
- return self}, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.TabWidget)})},
- args: [],
- source: "label\x0a self subclassResponsibility",
- messageSends: ["subclassResponsibility"],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_open",
- smalltalk.method({
- selector: "open",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st((smalltalk.TabManager || TabManager))._current())._addTab_(self);
- _st(_st((smalltalk.TabManager || TabManager))._current())._selectTab_(self);
- return self}, function($ctx1) {$ctx1.fill(self,"open",{}, smalltalk.TabWidget)})},
- args: [],
- source: "open\x0a TabManager current addTab: self.\x0a TabManager current selectTab: self",
- messageSends: ["addTab:", "current", "selectTab:"],
- referencedClasses: ["TabManager"]
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_remove",
- smalltalk.method({
- selector: "remove",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st(self["@div"])._asJQuery())._remove();
- return self}, function($ctx1) {$ctx1.fill(self,"remove",{}, smalltalk.TabWidget)})},
- args: [],
- source: "remove\x0a\x09div asJQuery remove",
- messageSends: ["remove", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_renderBoxOn_",
- smalltalk.method({
- selector: "renderBoxOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.TabWidget)})},
- args: ["html"],
- source: "renderBoxOn: html",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_renderButtonsOn_",
- smalltalk.method({
- selector: "renderButtonsOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.TabWidget)})},
- args: ["html"],
- source: "renderButtonsOn: html",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_renderOn_",
- smalltalk.method({
- selector: "renderOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=_st(html)._div();
- _st($1)._class_("amberTool");
- $2=_st($1)._yourself();
- self["@div"]=$2;
- _st(self)._renderTab();
- return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html}, smalltalk.TabWidget)})},
- args: ["html"],
- source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'amberTool';\x0a\x09\x09yourself.\x0a\x09self renderTab",
- messageSends: ["class:", "div", "yourself", "renderTab"],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_renderTab",
- smalltalk.method({
- selector: "renderTab",
- category: 'rendering',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
- _st(self["@div"])._contents_((function(html){
- return smalltalk.withContext(function($ctx2) {
$1=_st(html)._div();
- _st($1)._class_("amber_box");
- $2=_st($1)._with_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._renderBoxOn_(html);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $2;
- $3=_st(html)._div();
- _st($3)._class_("amber_buttons");
- $4=_st($3)._with_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._renderButtonsOn_(html);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- return $4;
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"renderTab",{}, smalltalk.TabWidget)})},
- args: [],
- source: "renderTab\x0a\x09div contents: [:html |\x0a\x09 html div\x0a\x09\x09class: 'amber_box';\x0a\x09\x09with: [self renderBoxOn: html].\x0a\x09 html div\x0a\x09\x09class: 'amber_buttons';\x0a\x09\x09with: [self renderButtonsOn: html]]",
- messageSends: ["contents:", "class:", "div", "with:", "renderBoxOn:", "renderButtonsOn:"],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_show",
- smalltalk.method({
- selector: "show",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st(self["@div"])._asJQuery())._show();
- return self}, function($ctx1) {$ctx1.fill(self,"show",{}, smalltalk.TabWidget)})},
- args: [],
- source: "show\x0a\x09div asJQuery show",
- messageSends: ["show", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_update",
- smalltalk.method({
- selector: "update",
- category: 'rendering',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self)._renderTab();
- return self}, function($ctx1) {$ctx1.fill(self,"update",{}, smalltalk.TabWidget)})},
- args: [],
- source: "update\x0a\x09self renderTab",
- messageSends: ["renderTab"],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_open",
- smalltalk.method({
- selector: "open",
- category: 'instance creation',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(_st(self)._new())._open();
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"open",{}, smalltalk.TabWidget.klass)})},
- args: [],
- source: "open\x0a ^self new open",
- messageSends: ["open", "new"],
- referencedClasses: []
- }),
- smalltalk.TabWidget.klass);
- smalltalk.addClass('Browser', smalltalk.TabWidget, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'packagesList', 'classesList', 'protocolsList', 'methodsList', 'sourceArea', 'tabsList', 'selectedTab', 'saveButton', 'classButtons', 'methodButtons', 'unsavedChanges'], 'IDE');
- smalltalk.addMethod(
- "_addInstanceVariableNamed_toClass_",
- smalltalk.method({
- selector: "addInstanceVariableNamed:toClass:",
- category: 'actions',
- fn: function (aString,aClass){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=_st(_st(aClass)._instanceVariableNames())._copy();
- _st($1)._add_(aString);
- $2=_st($1)._yourself();
- _st(_st((smalltalk.ClassBuilder || ClassBuilder))._new())._addSubclassOf_named_instanceVariableNames_package_(_st(aClass)._superclass(),_st(aClass)._name(),$2,_st(_st(aClass)._package())._name());
- return self}, function($ctx1) {$ctx1.fill(self,"addInstanceVariableNamed:toClass:",{aString:aString,aClass:aClass}, smalltalk.Browser)})},
- args: ["aString", "aClass"],
- 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",
- messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package", "new"],
- referencedClasses: ["ClassBuilder"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_addNewClass",
- smalltalk.method({
- selector: "addNewClass",
- category: 'actions',
- fn: function (){
- var self=this;
- var className;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3;
- className=_st(window)._prompt_("New class");
- $1=_st(_st(className)._notNil())._and_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(className)._notEmpty();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- if(smalltalk.assert($1)){
- _st((smalltalk.Object || Object))._subclass_instanceVariableNames_package_(className,"",_st(self)._selectedPackage());
- $2=self;
- _st($2)._resetClassesList();
- $3=_st($2)._updateClassesList();
- $3;
- _st(self)._selectClass_(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(className));
- };
- return self}, function($ctx1) {$ctx1.fill(self,"addNewClass",{className:className}, smalltalk.Browser)})},
- args: [],
- source: "addNewClass\x0a\x09| className |\x0a\x09className := window prompt: 'New class'.\x0a\x09(className notNil and: [className notEmpty]) ifTrue: [\x0a\x09\x09Object subclass: className instanceVariableNames: '' package: self selectedPackage.\x0a \x09 self \x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk current at: className)]",
- messageSends: ["prompt:", "ifTrue:", "subclass:instanceVariableNames:package:", "selectedPackage", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current", "and:", "notEmpty", "notNil"],
- referencedClasses: ["Object", "Smalltalk"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_addNewProtocol",
- smalltalk.method({
- selector: "addNewProtocol",
- category: 'actions',
- fn: function (){
- var self=this;
- var newProtocol;
- return smalltalk.withContext(function($ctx1) {
var $1;
- newProtocol=_st(window)._prompt_("New method protocol");
- $1=_st(_st(newProtocol)._notNil())._and_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(newProtocol)._notEmpty();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- if(smalltalk.assert($1)){
- _st(self["@selectedMethod"])._category_(newProtocol);
- _st(self)._setMethodProtocol_(newProtocol);
- };
- return self}, function($ctx1) {$ctx1.fill(self,"addNewProtocol",{newProtocol:newProtocol}, smalltalk.Browser)})},
- args: [],
- source: "addNewProtocol\x0a | newProtocol |\x0a newProtocol := window prompt: 'New method protocol'.\x0a (newProtocol notNil and: [newProtocol notEmpty]) ifTrue: [\x0a\x09selectedMethod category: newProtocol.\x0a\x09self setMethodProtocol: newProtocol]",
- messageSends: ["prompt:", "ifTrue:", "category:", "setMethodProtocol:", "and:", "notEmpty", "notNil"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_ajaxPutAt_data_",
- smalltalk.method({
- selector: "ajaxPutAt:data:",
- category: 'network',
- fn: function (aURL,aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(jQuery)._ajax_options_(aURL,smalltalk.HashedCollection._fromPairs_([_st("type").__minus_gt("PUT"),_st("data").__minus_gt(aString),_st("contentType").__minus_gt("text/plain;charset=UTF-8"),_st("error").__minus_gt((function(xhr){
- return smalltalk.withContext(function($ctx2) {
return _st(window)._alert_(_st(_st(_st(_st("Commiting ").__comma(aURL)).__comma(" failed with reason: \x22")).__comma(_st(xhr)._responseText())).__comma("\x22"));
- }, function($ctx2) {$ctx2.fillBlock({xhr:xhr},$ctx1)})}))]));
- return self}, function($ctx1) {$ctx1.fill(self,"ajaxPutAt:data:",{aURL:aURL,aString:aString}, smalltalk.Browser)})},
- args: ["aURL", "aString"],
- source: "ajaxPutAt: aURL data: aString\x0a\x09jQuery\x0a\x09\x09ajax: aURL\x09options: #{\x09'type' -> 'PUT'.\x0a\x09\x09\x09\x09\x09\x09\x09\x09'data' -> aString.\x0a\x09\x09\x09\x09\x09\x09\x09\x09'contentType' -> 'text/plain;charset=UTF-8'.\x0a\x09\x09\x09\x09\x09\x09\x09\x09'error' -> [:xhr | window alert: 'Commiting ' , aURL , ' failed with reason: \x22' , (xhr responseText) , '\x22'] }",
- messageSends: ["ajax:options:", "->", "alert:", ",", "responseText"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_canBeClosed",
- smalltalk.method({
- selector: "canBeClosed",
- category: 'testing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
return true;
- }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{}, smalltalk.Browser)})},
- args: [],
- source: "canBeClosed\x0a\x09^true",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_cancelChanges",
- smalltalk.method({
- selector: "cancelChanges",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$1;
- $2=self["@unsavedChanges"];
- if(smalltalk.assert($2)){
- $1=_st(window)._confirm_("Cancel changes?");
- } else {
- $1=true;
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"cancelChanges",{}, smalltalk.Browser)})},
- args: [],
- source: "cancelChanges\x0a ^unsavedChanges \x0a\x09ifTrue: [window confirm: 'Cancel changes?']\x0a\x09ifFalse: [true]",
- messageSends: ["ifTrue:ifFalse:", "confirm:"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_classCommentSource",
- smalltalk.method({
- selector: "classCommentSource",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(self["@selectedClass"])._comment();
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"classCommentSource",{}, smalltalk.Browser)})},
- args: [],
- source: "classCommentSource\x0a ^selectedClass comment",
- messageSends: ["comment"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_classDeclarationSource",
- smalltalk.method({
- selector: "classDeclarationSource",
- category: 'accessing',
- fn: function (){
- var self=this;
- var stream;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4,$5,$6,$7;
- stream=_st("")._writeStream();
- $1=self["@selectedClass"];
- if(($receiver = $1) == nil || $receiver == undefined){
- $2=_st(self)._classDeclarationTemplate();
- return $2;
- } else {
- $1;
- };
- $3=stream;
- _st($3)._nextPutAll_(_st(_st(self["@selectedClass"])._superclass())._asString());
- _st($3)._nextPutAll_(" subclass: #");
- _st($3)._nextPutAll_(_st(self["@selectedClass"])._name());
- _st($3)._nextPutAll_(_st(_st((smalltalk.String || String))._lf()).__comma(_st((smalltalk.String || String))._tab()));
- $4=_st($3)._nextPutAll_("instanceVariableNames: '");
- _st(_st(self["@selectedClass"])._instanceVariableNames())._do_separatedBy_((function(each){
- return smalltalk.withContext(function($ctx2) {
return _st(stream)._nextPutAll_(each);
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
- return smalltalk.withContext(function($ctx2) {
return _st(stream)._nextPutAll_(" ");
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- $5=stream;
- _st($5)._nextPutAll_(_st(_st("'").__comma(_st((smalltalk.String || String))._lf())).__comma(_st((smalltalk.String || String))._tab()));
- _st($5)._nextPutAll_("package: '");
- _st($5)._nextPutAll_(_st(self["@selectedClass"])._category());
- $6=_st($5)._nextPutAll_("'");
- $7=_st(stream)._contents();
- return $7;
- }, function($ctx1) {$ctx1.fill(self,"classDeclarationSource",{stream:stream}, smalltalk.Browser)})},
- args: [],
- source: "classDeclarationSource\x0a\x09| stream |\x0a\x09stream := '' writeStream.\x0a\x09selectedClass ifNil: [^self classDeclarationTemplate].\x0a\x09stream \x0a\x09 nextPutAll: selectedClass superclass asString;\x0a\x09 nextPutAll: ' subclass: #';\x0a\x09 nextPutAll: selectedClass name;\x0a\x09 nextPutAll: String lf, String tab;\x0a\x09 nextPutAll: 'instanceVariableNames: '''.\x0a\x09selectedClass instanceVariableNames \x0a\x09 do: [:each | stream nextPutAll: each] \x0a\x09 separatedBy: [stream nextPutAll: ' '].\x0a\x09stream\x0a\x09 nextPutAll: '''', String lf, String tab;\x0a\x09 nextPutAll: 'package: ''';\x0a\x09 nextPutAll: selectedClass category;\x0a\x09 nextPutAll: ''''.\x0a\x09^stream contents",
- messageSends: ["writeStream", "ifNil:", "classDeclarationTemplate", "nextPutAll:", "asString", "superclass", "name", ",", "tab", "lf", "do:separatedBy:", "instanceVariableNames", "category", "contents"],
- referencedClasses: ["String"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_classDeclarationTemplate",
- smalltalk.method({
- selector: "classDeclarationTemplate",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(_st("Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''\x0a\x09package: '").__comma(_st(self)._selectedPackage())).__comma("'");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"classDeclarationTemplate",{}, smalltalk.Browser)})},
- args: [],
- source: "classDeclarationTemplate\x0a\x09^'Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''''\x0a\x09package: ''', self selectedPackage, ''''",
- messageSends: [",", "selectedPackage"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_classes",
- smalltalk.method({
- selector: "classes",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(_st(_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes())._select_((function(each){
- return smalltalk.withContext(function($ctx2) {
return _st(_st(each)._category()).__eq(self["@selectedPackage"]);
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._sort_((function(a,b){
- return smalltalk.withContext(function($ctx2) {
return _st(_st(a)._name()).__lt(_st(b)._name());
- }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})})))._asSet();
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"classes",{}, smalltalk.Browser)})},
- args: [],
- source: "classes\x0a ^((Smalltalk current classes \x0a\x09select: [:each | each category = selectedPackage])\x0a\x09sort: [:a :b | a name < b name]) asSet",
- messageSends: ["asSet", "sort:", "<", "name", "select:", "=", "category", "classes", "current"],
- referencedClasses: ["Smalltalk"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_commitPackage",
- smalltalk.method({
- selector: "commitPackage",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@selectedPackage"];
- if(($receiver = $1) == nil || $receiver == undefined){
- $1;
- } else {
- package_=_st((smalltalk.Package || Package))._named_(self["@selectedPackage"]);
- package_;
- _st([_st((smalltalk.Exporter || Exporter)).__minus_gt(_st(_st(_st(_st(package_)._commitPathJs()).__comma("/")).__comma(self["@selectedPackage"])).__comma(".js")),_st((smalltalk.StrippedExporter || StrippedExporter)).__minus_gt(_st(_st(_st(_st(package_)._commitPathJs()).__comma("/")).__comma(self["@selectedPackage"])).__comma(".deploy.js")),_st((smalltalk.ChunkExporter || ChunkExporter)).__minus_gt(_st(_st(_st(_st(package_)._commitPathSt()).__comma("/")).__comma(self["@selectedPackage"])).__comma(".st"))])._do_((function(commitStrategy){
- var fileContents;
- return smalltalk.withContext(function($ctx2) {
fileContents=_st(_st(_st(commitStrategy)._key())._new())._exportPackage_(self["@selectedPackage"]);
- fileContents;
- return _st(self)._ajaxPutAt_data_(_st(commitStrategy)._value(),fileContents);
- }, function($ctx2) {$ctx2.fillBlock({commitStrategy:commitStrategy,fileContents:fileContents},$ctx1)})}));
- };
- return self}, function($ctx1) {$ctx1.fill(self,"commitPackage",{}, smalltalk.Browser)})},
- args: [],
- source: "commitPackage\x0a\x09selectedPackage ifNotNil: [ |package|\x0a\x09\x09package := Package named: selectedPackage.\x0a\x09\x09{ \x09Exporter -> (package commitPathJs, '/', selectedPackage, '.js').\x0a\x09\x09\x09StrippedExporter -> (package commitPathJs, '/', selectedPackage, '.deploy.js').\x0a\x09\x09\x09ChunkExporter -> (package commitPathSt, '/', selectedPackage, '.st')\x0a\x09\x09} do: [:commitStrategy| |fileContents|\x0a\x09\x09\x09fileContents := (commitStrategy key new exportPackage: selectedPackage).\x0a\x09\x09\x09self ajaxPutAt: commitStrategy value data: fileContents\x0a \x09\x09]\x0a\x09]",
- messageSends: ["ifNotNil:", "named:", "do:", "exportPackage:", "new", "key", "ajaxPutAt:data:", "value", "->", ",", "commitPathJs", "commitPathSt"],
- referencedClasses: ["Package", "Exporter", "StrippedExporter", "ChunkExporter"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_compile",
- smalltalk.method({
- selector: "compile",
- category: 'actions',
- fn: function (){
- var self=this;
- var currentEditLine;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$2,$5,$4;
- _st(self)._disableSaveButton();
- currentEditLine=_st(_st(self["@sourceArea"])._editor())._getCursor();
- $1=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("comment"));
- $2=(function(){
- return smalltalk.withContext(function($ctx2) {
$3=self["@selectedClass"];
- if(($receiver = $3) == nil || $receiver == undefined){
- return $3;
- } else {
- return _st(self)._compileClassComment();
- };
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
- $4=(function(){
- return smalltalk.withContext(function($ctx2) {
$5=_st(_st(self["@selectedProtocol"])._notNil())._or_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self["@selectedMethod"])._notNil();
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- if(smalltalk.assert($5)){
- return _st(self)._compileMethodDefinition();
- } else {
- return _st(self)._compileDefinition();
- };
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
- _st($1)._ifTrue_ifFalse_($2,$4);
- _st(_st(self["@sourceArea"])._editor())._setCursor_(currentEditLine);
- return self}, function($ctx1) {$ctx1.fill(self,"compile",{currentEditLine:currentEditLine}, smalltalk.Browser)})},
- args: [],
- source: "compile\x0a | currentEditLine |\x0a self disableSaveButton.\x0a currentEditLine := sourceArea editor getCursor.\x0a selectedTab = #comment \x0a\x09ifTrue: [\x0a\x09\x09\x09selectedClass ifNotNil: [\x0a\x09\x09\x09\x09self compileClassComment]]\x0a\x09ifFalse: [\x0a\x09\x09\x09(selectedProtocol notNil or: [selectedMethod notNil])\x0a\x09\x09\x09\x09ifFalse: [self compileDefinition]\x0a\x09\x09\x09\x09ifTrue: [self compileMethodDefinition]].\x0a sourceArea editor setCursor: currentEditLine.",
- messageSends: ["disableSaveButton", "getCursor", "editor", "ifTrue:ifFalse:", "ifNotNil:", "compileClassComment", "ifFalse:ifTrue:", "compileDefinition", "compileMethodDefinition", "or:", "notNil", "=", "setCursor:"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_compileClassComment",
- smalltalk.method({
- selector: "compileClassComment",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self["@selectedClass"])._comment_(_st(self["@sourceArea"])._val());
- return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment",{}, smalltalk.Browser)})},
- args: [],
- source: "compileClassComment\x0a selectedClass comment: sourceArea val",
- messageSends: ["comment:", "val"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_compileDefinition",
- smalltalk.method({
- selector: "compileDefinition",
- category: 'actions',
- fn: function (){
- var self=this;
- var newClass;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- newClass=_st(_st((smalltalk.Compiler || Compiler))._new())._evaluateExpression_(_st(self["@sourceArea"])._val());
- $1=self;
- _st($1)._resetClassesList();
- _st($1)._updateCategoriesList();
- $2=_st($1)._updateClassesList();
- _st(self)._selectClass_(newClass);
- return self}, function($ctx1) {$ctx1.fill(self,"compileDefinition",{newClass:newClass}, smalltalk.Browser)})},
- args: [],
- source: "compileDefinition\x0a | newClass |\x0a newClass := Compiler new evaluateExpression: sourceArea val.\x0a self \x0a\x09resetClassesList;\x0a\x09updateCategoriesList;\x0a\x09updateClassesList.\x0a self selectClass: newClass",
- messageSends: ["evaluateExpression:", "val", "new", "resetClassesList", "updateCategoriesList", "updateClassesList", "selectClass:"],
- referencedClasses: ["Compiler"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_compileMethodDefinition",
- smalltalk.method({
- selector: "compileMethodDefinition",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
- if(smalltalk.assert($1)){
- _st(self)._compileMethodDefinitionFor_(self["@selectedClass"]);
- } else {
- _st(self)._compileMethodDefinitionFor_(_st(self["@selectedClass"])._class());
- };
- return self}, function($ctx1) {$ctx1.fill(self,"compileMethodDefinition",{}, smalltalk.Browser)})},
- args: [],
- source: "compileMethodDefinition\x0a selectedTab = #instance\x0a\x09ifTrue: [self compileMethodDefinitionFor: selectedClass]\x0a\x09ifFalse: [self compileMethodDefinitionFor: selectedClass class]",
- messageSends: ["ifTrue:ifFalse:", "compileMethodDefinitionFor:", "class", "="],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_compileMethodDefinitionFor_",
- smalltalk.method({
- selector: "compileMethodDefinitionFor:",
- category: 'actions',
- fn: function (aClass){
- var self=this;
- var compiler,method,source,node;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4,$6,$8,$9,$7,$5;
- var $early={};
- try {
- source=_st(self["@sourceArea"])._val();
- $1=self["@selectedProtocol"];
- if(($receiver = $1) == nil || $receiver == undefined){
- self["@selectedProtocol"]=_st(self["@selectedMethod"])._category();
- self["@selectedProtocol"];
- } else {
- $1;
- };
- compiler=_st((smalltalk.Compiler || Compiler))._new();
- _st(compiler)._source_(source);
- node=_st(compiler)._parse_(source);
- $2=_st(node)._isParseFailure();
- if(smalltalk.assert($2)){
- $3=_st(window)._alert_(_st(_st(_st("PARSE ERROR: ").__comma(_st(node)._reason())).__comma(", position: ")).__comma(_st(_st(node)._position())._asString()));
- return $3;
- };
- _st(compiler)._currentClass_(aClass);
- method=_st(compiler)._eval_(_st(compiler)._compileNode_(node));
- _st(method)._category_(self["@selectedProtocol"]);
- $4=_st(compiler)._unknownVariables();
- $5=(function(each){
- return smalltalk.withContext(function($ctx2) {
$6=_st(window)._at_(each);
- $7=(function(){
- return smalltalk.withContext(function($ctx3) {
$8=_st(window)._confirm_(_st(_st("Declare '").__comma(each)).__comma("' as instance variable?"));
- if(smalltalk.assert($8)){
- _st(self)._addInstanceVariableNamed_toClass_(each,aClass);
- $9=_st(self)._compileMethodDefinitionFor_(aClass);
- throw $early=[$9];
- };
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
- return _st($6)._ifNil_($7);
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
- _st($4)._do_($5);
- _st(aClass)._addCompiledMethod_(method);
- _st(compiler)._setupClass_(aClass);
- _st(self)._updateMethodsList();
- _st(self)._selectMethod_(method);
- return self}
- catch(e) {if(e===$early)return e[0]; throw e}
- }, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,method:method,source:source,node:node}, smalltalk.Browser)})},
- args: ["aClass"],
- source: "compileMethodDefinitionFor: aClass\x0a | compiler method source node | \x0a source := sourceArea val.\x0a selectedProtocol ifNil: [selectedProtocol := selectedMethod category].\x0a compiler := Compiler new.\x0a compiler source: source.\x0a node := compiler parse: source.\x0a node isParseFailure ifTrue: [\x0a\x09^window alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString].\x0a compiler currentClass: aClass.\x0a method := compiler eval: (compiler compileNode: node).\x0a method category: selectedProtocol.\x0a compiler unknownVariables do: [:each |\x0a \x22Do not try to redeclare javascript's objects\x22\x0a (window at: each) ifNil: [\x0a\x09 \x09(window confirm: 'Declare ''', each, ''' as instance variable?') ifTrue: [\x0a\x09\x09\x09self addInstanceVariableNamed: each toClass: aClass.\x0a\x09\x09\x09^self compileMethodDefinitionFor: aClass]]].\x0a aClass addCompiledMethod: method.\x0a compiler setupClass: aClass.\x0a self updateMethodsList.\x0a self selectMethod: method",
- messageSends: ["val", "ifNil:", "category", "new", "source:", "parse:", "ifTrue:", "alert:", ",", "asString", "position", "reason", "isParseFailure", "currentClass:", "eval:", "compileNode:", "category:", "do:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "confirm:", "at:", "unknownVariables", "addCompiledMethod:", "setupClass:", "updateMethodsList", "selectMethod:"],
- referencedClasses: ["Compiler"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_copyClass",
- smalltalk.method({
- selector: "copyClass",
- category: 'actions',
- fn: function (){
- var self=this;
- var className;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3;
- className=_st(window)._prompt_("Copy class");
- $1=_st(_st(className)._notNil())._and_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(className)._notEmpty();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- if(smalltalk.assert($1)){
- _st(_st((smalltalk.ClassBuilder || ClassBuilder))._new())._copyClass_named_(_st(self)._selectedClass(),className);
- $2=self;
- _st($2)._resetClassesList();
- $3=_st($2)._updateClassesList();
- $3;
- _st(self)._selectClass_(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(className));
- };
- return self}, function($ctx1) {$ctx1.fill(self,"copyClass",{className:className}, smalltalk.Browser)})},
- args: [],
- source: "copyClass\x0a\x09| className |\x0a\x09className := window prompt: 'Copy class'.\x0a\x09(className notNil and: [className notEmpty]) ifTrue: [\x0a\x09\x09ClassBuilder new copyClass: self selectedClass named: className.\x0a \x09 self \x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk current at: className)]",
- messageSends: ["prompt:", "ifTrue:", "copyClass:named:", "selectedClass", "new", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current", "and:", "notEmpty", "notNil"],
- referencedClasses: ["ClassBuilder", "Smalltalk"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_declarationSource",
- smalltalk.method({
- selector: "declarationSource",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$1;
- $2=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
- if(smalltalk.assert($2)){
- $1=_st(self)._classDeclarationSource();
- } else {
- $1=_st(self)._metaclassDeclarationSource();
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"declarationSource",{}, smalltalk.Browser)})},
- args: [],
- source: "declarationSource\x0a ^selectedTab = #instance\x0a\x09ifTrue: [self classDeclarationSource]\x0a\x09ifFalse: [self metaclassDeclarationSource]",
- messageSends: ["ifTrue:ifFalse:", "classDeclarationSource", "metaclassDeclarationSource", "="],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_disableSaveButton",
- smalltalk.method({
- selector: "disableSaveButton",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@saveButton"];
- if(($receiver = $1) == nil || $receiver == undefined){
- $1;
- } else {
- _st(self["@saveButton"])._at_put_("disabled",true);
- };
- self["@unsavedChanges"]=false;
- return self}, function($ctx1) {$ctx1.fill(self,"disableSaveButton",{}, smalltalk.Browser)})},
- args: [],
- source: "disableSaveButton\x0a saveButton ifNotNil: [\x0a\x09saveButton at: 'disabled' put: true].\x0a unsavedChanges := false",
- messageSends: ["ifNotNil:", "at:put:"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_dummyMethodSource",
- smalltalk.method({
- selector: "dummyMethodSource",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
return "messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements";
- }, function($ctx1) {$ctx1.fill(self,"dummyMethodSource",{}, smalltalk.Browser)})},
- args: [],
- source: "dummyMethodSource\x0a ^'messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements'",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_handleSourceAreaKeyDown_",
- smalltalk.method({
- selector: "handleSourceAreaKeyDown:",
- category: 'actions',
- fn: function (anEvent){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
if(anEvent.ctrlKey) {
- if(anEvent.keyCode === 83) { //ctrl+s
- self._compile();
- anEvent.preventDefault();
- return false;
- }
- }
- ;
- return self}, function($ctx1) {$ctx1.fill(self,"handleSourceAreaKeyDown:",{anEvent:anEvent}, smalltalk.Browser)})},
- args: ["anEvent"],
- 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>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_hideClassButtons",
- smalltalk.method({
- selector: "hideClassButtons",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st(self["@classButtons"])._asJQuery())._hide();
- return self}, function($ctx1) {$ctx1.fill(self,"hideClassButtons",{}, smalltalk.Browser)})},
- args: [],
- source: "hideClassButtons\x0a classButtons asJQuery hide",
- messageSends: ["hide", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_hideMethodButtons",
- smalltalk.method({
- selector: "hideMethodButtons",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st(self["@methodButtons"])._asJQuery())._hide();
- return self}, function($ctx1) {$ctx1.fill(self,"hideMethodButtons",{}, smalltalk.Browser)})},
- args: [],
- source: "hideMethodButtons\x0a methodButtons asJQuery hide",
- messageSends: ["hide", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_initialize",
- smalltalk.method({
- selector: "initialize",
- category: 'initialization',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
- self["@selectedTab"]=smalltalk.symbolFor("instance");
- self["@selectedPackage"]=_st(_st(self)._packages())._first();
- self["@unsavedChanges"]=false;
- return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.Browser)})},
- args: [],
- source: "initialize\x0a super initialize.\x0a selectedTab := #instance.\x0a selectedPackage := self packages first.\x0a unsavedChanges := false",
- messageSends: ["initialize", "first", "packages"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_label",
- smalltalk.method({
- selector: "label",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$1;
- $2=self["@selectedClass"];
- if(($receiver = $2) == nil || $receiver == undefined){
- $1="Browser (nil)";
- } else {
- $1=_st("Browser: ").__comma(_st(self["@selectedClass"])._name());
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.Browser)})},
- args: [],
- source: "label\x0a ^selectedClass \x0a\x09ifNil: ['Browser (nil)']\x0a\x09ifNotNil: ['Browser: ', selectedClass name]",
- messageSends: ["ifNil:ifNotNil:", ",", "name"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_metaclassDeclarationSource",
- smalltalk.method({
- selector: "metaclassDeclarationSource",
- category: 'accessing',
- fn: function (){
- var self=this;
- var stream;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
- stream=_st("")._writeStream();
- $1=self["@selectedClass"];
- if(($receiver = $1) == nil || $receiver == undefined){
- $1;
- } else {
- $2=stream;
- _st($2)._nextPutAll_(_st(self["@selectedClass"])._asString());
- _st($2)._nextPutAll_(" class ");
- $3=_st($2)._nextPutAll_("instanceVariableNames: '");
- $3;
- _st(_st(_st(self["@selectedClass"])._class())._instanceVariableNames())._do_separatedBy_((function(each){
- return smalltalk.withContext(function($ctx2) {
return _st(stream)._nextPutAll_(each);
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
- return smalltalk.withContext(function($ctx2) {
return _st(stream)._nextPutAll_(" ");
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- _st(stream)._nextPutAll_("'");
- };
- $4=_st(stream)._contents();
- return $4;
- }, function($ctx1) {$ctx1.fill(self,"metaclassDeclarationSource",{stream:stream}, smalltalk.Browser)})},
- args: [],
- source: "metaclassDeclarationSource\x0a | stream |\x0a stream := '' writeStream.\x0a selectedClass ifNotNil: [\x0a\x09stream \x0a\x09 nextPutAll: selectedClass asString;\x0a\x09 nextPutAll: ' class ';\x0a\x09 nextPutAll: 'instanceVariableNames: '''.\x0a\x09selectedClass class instanceVariableNames\x0a\x09 do: [:each | stream nextPutAll: each]\x0a\x09 separatedBy: [stream nextPutAll: ' '].\x0a\x09stream nextPutAll: ''''].\x0a ^stream contents",
- messageSends: ["writeStream", "ifNotNil:", "nextPutAll:", "asString", "do:separatedBy:", "instanceVariableNames", "class", "contents"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_methodSource",
- smalltalk.method({
- selector: "methodSource",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$1;
- $2=self["@selectedMethod"];
- if(($receiver = $2) == nil || $receiver == undefined){
- $1=_st(self)._dummyMethodSource();
- } else {
- $1=_st(self["@selectedMethod"])._source();
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"methodSource",{}, smalltalk.Browser)})},
- args: [],
- source: "methodSource\x0a ^selectedMethod\x0a\x09ifNil: [self dummyMethodSource]\x0a\x09ifNotNil: [selectedMethod source]",
- messageSends: ["ifNil:ifNotNil:", "dummyMethodSource", "source"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_methods",
- smalltalk.method({
- selector: "methods",
- category: 'accessing',
- fn: function (){
- var self=this;
- var klass;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$4,$3,$7,$9,$8,$6,$5;
- $1=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("comment"));
- if(smalltalk.assert($1)){
- return [];
- };
- $2=self["@selectedClass"];
- $3=(function(){
- return smalltalk.withContext(function($ctx2) {
$4=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
- if(smalltalk.assert($4)){
- klass=self["@selectedClass"];
- } else {
- klass=_st(self["@selectedClass"])._class();
- };
- return klass;
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
- _st($2)._ifNotNil_($3);
- $7=self["@selectedProtocol"];
- $8=(function(){
- return smalltalk.withContext(function($ctx2) {
$9=klass;
- if(($receiver = $9) == nil || $receiver == undefined){
- return [];
- } else {
- return _st(_st(klass)._methodDictionary())._values();
- };
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
- $6=_st($7)._ifNil_ifNotNil_($8,(function(){
- return smalltalk.withContext(function($ctx2) {
return _st(_st(_st(klass)._methodDictionary())._values())._select_((function(each){
- return smalltalk.withContext(function($ctx3) {
return _st(_st(each)._category()).__eq(self["@selectedProtocol"]);
- }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- $5=_st($6)._sort_((function(a,b){
- return smalltalk.withContext(function($ctx2) {
return _st(_st(a)._selector()).__lt(_st(b)._selector());
- }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
- return $5;
- }, function($ctx1) {$ctx1.fill(self,"methods",{klass:klass}, smalltalk.Browser)})},
- args: [],
- source: "methods\x0a | klass |\x0a selectedTab = #comment ifTrue: [^#()].\x0a selectedClass ifNotNil: [\x0a\x09klass := selectedTab = #instance\x0a\x09 ifTrue: [selectedClass]\x0a\x09 ifFalse: [selectedClass class]].\x0a ^(selectedProtocol \x0a\x09ifNil: [\x0a\x09 klass \x0a\x09\x09ifNil: [#()] \x0a\x09\x09ifNotNil: [klass methodDictionary values]]\x0a\x09ifNotNil: [\x0a\x09 klass methodDictionary values select: [:each |\x0a\x09\x09each category = selectedProtocol]]) sort: [:a :b | a selector < b selector]",
- messageSends: ["ifTrue:", "=", "ifNotNil:", "ifTrue:ifFalse:", "class", "sort:", "<", "selector", "ifNil:ifNotNil:", "values", "methodDictionary", "select:", "category"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_packages",
- smalltalk.method({
- selector: "packages",
- category: 'accessing',
- fn: function (){
- var self=this;
- var packages;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$2,$4;
- packages=_st((smalltalk.Array || Array))._new();
- $1=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes();
- $2=(function(each){
- return smalltalk.withContext(function($ctx2) {
$3=_st(packages)._includes_(_st(each)._category());
- if(! smalltalk.assert($3)){
- return _st(packages)._add_(_st(each)._category());
- };
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
- _st($1)._do_($2);
- $4=_st(packages)._sort();
- return $4;
- }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages}, smalltalk.Browser)})},
- args: [],
- source: "packages\x0a | packages |\x0a packages := Array new.\x0a Smalltalk current classes do: [:each |\x0a\x09(packages includes: each category) ifFalse: [\x0a\x09 packages add: each category]].\x0a ^packages sort",
- messageSends: ["new", "do:", "ifFalse:", "add:", "category", "includes:", "classes", "current", "sort"],
- referencedClasses: ["Array", "Smalltalk"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_protocols",
- smalltalk.method({
- selector: "protocols",
- category: 'accessing',
- fn: function (){
- var self=this;
- var klass;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$4,$5,$6,$7,$2,$8;
- var $early={};
- try {
- $1=self["@selectedClass"];
- $2=(function(){
- return smalltalk.withContext(function($ctx2) {
$3=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("comment"));
- if(smalltalk.assert($3)){
- throw $early=[[]];
- };
- $4=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
- if(smalltalk.assert($4)){
- klass=self["@selectedClass"];
- } else {
- klass=_st(self["@selectedClass"])._class();
- };
- klass;
- $5=_st(_st(klass)._methodDictionary())._isEmpty();
- if(smalltalk.assert($5)){
- $6=_st((smalltalk.Array || Array))._with_("not yet classified");
- throw $early=[$6];
- };
- $7=_st(klass)._protocols();
- throw $early=[$7];
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
- _st($1)._ifNotNil_($2);
- $8=_st((smalltalk.Array || Array))._new();
- return $8;
- }
- catch(e) {if(e===$early)return e[0]; throw e}
- }, function($ctx1) {$ctx1.fill(self,"protocols",{klass:klass}, smalltalk.Browser)})},
- args: [],
- source: "protocols\x0a | klass |\x0a selectedClass ifNotNil: [\x0a\x09selectedTab = #comment ifTrue: [^#()].\x0a\x09klass := selectedTab = #instance\x0a\x09 ifTrue: [selectedClass]\x0a\x09 ifFalse: [selectedClass class].\x0a\x09klass methodDictionary isEmpty ifTrue: [\x0a\x09 ^Array with: 'not yet classified'].\x0a\x09^klass protocols].\x0a ^Array new",
- messageSends: ["ifNotNil:", "ifTrue:", "=", "ifTrue:ifFalse:", "class", "with:", "isEmpty", "methodDictionary", "protocols", "new"],
- referencedClasses: ["Array"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_removeClass",
- smalltalk.method({
- selector: "removeClass",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(window)._confirm_(_st(_st("Do you really want to remove ").__comma(_st(self["@selectedClass"])._name())).__comma("?"));
- if(smalltalk.assert($1)){
- _st(_st((smalltalk.Smalltalk || Smalltalk))._current())._removeClass_(self["@selectedClass"]);
- _st(self)._resetClassesList();
- _st(self)._selectClass_(nil);
- };
- return self}, function($ctx1) {$ctx1.fill(self,"removeClass",{}, smalltalk.Browser)})},
- args: [],
- source: "removeClass\x0a (window confirm: 'Do you really want to remove ', selectedClass name, '?')\x0a\x09ifTrue: [\x0a\x09 Smalltalk current removeClass: selectedClass.\x0a\x09 self resetClassesList.\x0a\x09 self selectClass: nil]",
- messageSends: ["ifTrue:", "removeClass:", "current", "resetClassesList", "selectClass:", "confirm:", ",", "name"],
- referencedClasses: ["Smalltalk"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_removeMethod",
- smalltalk.method({
- selector: "removeMethod",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$5,$4,$2;
- $1=_st(self)._cancelChanges();
- $2=(function(){
- return smalltalk.withContext(function($ctx2) {
$3=_st(window)._confirm_(_st(_st("Do you really want to remove #").__comma(_st(self["@selectedMethod"])._selector())).__comma("?"));
- $4=(function(){
- return smalltalk.withContext(function($ctx3) {
$5=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
- if(smalltalk.assert($5)){
- _st(self["@selectedClass"])._removeCompiledMethod_(self["@selectedMethod"]);
- } else {
- _st(_st(self["@selectedClass"])._class())._removeCompiledMethod_(self["@selectedMethod"]);
- };
- return _st(self)._selectMethod_(nil);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
- return _st($3)._ifTrue_($4);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
- _st($1)._ifTrue_($2);
- return self}, function($ctx1) {$ctx1.fill(self,"removeMethod",{}, smalltalk.Browser)})},
- args: [],
- source: "removeMethod\x0a self cancelChanges ifTrue: [\x0a\x09(window confirm: 'Do you really want to remove #', selectedMethod selector, '?')\x0a\x09 ifTrue: [\x0a\x09\x09selectedTab = #instance \x0a\x09\x09\x09ifTrue: [selectedClass removeCompiledMethod: selectedMethod]\x0a\x09\x09\x09ifFalse: [selectedClass class removeCompiledMethod: selectedMethod].\x0a\x09\x09self selectMethod: nil]]",
- messageSends: ["ifTrue:", "ifTrue:ifFalse:", "removeCompiledMethod:", "class", "=", "selectMethod:", "confirm:", ",", "selector", "cancelChanges"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_removePackage",
- smalltalk.method({
- selector: "removePackage",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(window)._confirm_(_st(_st("Do you really want to remove the whole package ").__comma(self["@selectedPackage"])).__comma(" with all its classes?"));
- if(smalltalk.assert($1)){
- _st(_st((smalltalk.Smalltalk || Smalltalk))._current())._removePackage_(self["@selectedPackage"]);
- _st(self)._updateCategoriesList();
- };
- return self}, function($ctx1) {$ctx1.fill(self,"removePackage",{}, smalltalk.Browser)})},
- args: [],
- source: "removePackage\x0a\x0a (window confirm: 'Do you really want to remove the whole package ', selectedPackage, ' with all its classes?')\x0a\x09ifTrue: [\x0a\x09 Smalltalk current removePackage: selectedPackage.\x0a\x09 self updateCategoriesList]",
- messageSends: ["ifTrue:", "removePackage:", "current", "updateCategoriesList", "confirm:", ","],
- referencedClasses: ["Smalltalk"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_renameClass",
- smalltalk.method({
- selector: "renameClass",
- category: 'actions',
- fn: function (){
- var self=this;
- var newName;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3;
- newName=_st(window)._prompt_(_st("Rename class ").__comma(_st(self["@selectedClass"])._name()));
- $1=_st(_st(newName)._notNil())._and_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(newName)._notEmpty();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- if(smalltalk.assert($1)){
- _st(self["@selectedClass"])._rename_(newName);
- $2=self;
- _st($2)._updateClassesList();
- $3=_st($2)._updateSourceAndButtons();
- $3;
- };
- return self}, function($ctx1) {$ctx1.fill(self,"renameClass",{newName:newName}, smalltalk.Browser)})},
- args: [],
- source: "renameClass\x0a | newName |\x0a newName := window prompt: 'Rename class ', selectedClass name.\x0a (newName notNil and: [newName notEmpty]) ifTrue: [\x0a\x09selectedClass rename: newName.\x0a\x09self \x0a\x09\x09updateClassesList;\x0a\x09\x09updateSourceAndButtons]",
- messageSends: ["prompt:", ",", "name", "ifTrue:", "rename:", "updateClassesList", "updateSourceAndButtons", "and:", "notEmpty", "notNil"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_renamePackage",
- smalltalk.method({
- selector: "renamePackage",
- category: 'actions',
- fn: function (){
- var self=this;
- var newName;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$2;
- newName=_st(window)._prompt_(_st("Rename package ").__comma(self["@selectedPackage"]));
- $1=newName;
- $2=(function(){
- return smalltalk.withContext(function($ctx2) {
$3=_st(newName)._notEmpty();
- if(smalltalk.assert($3)){
- _st(_st((smalltalk.Smalltalk || Smalltalk))._current())._renamePackage_to_(self["@selectedPackage"],newName);
- return _st(self)._updateCategoriesList();
- };
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
- _st($1)._ifNotNil_($2);
- return self}, function($ctx1) {$ctx1.fill(self,"renamePackage",{newName:newName}, smalltalk.Browser)})},
- args: [],
- source: "renamePackage\x0a\x0a | newName |\x0a newName := window prompt: 'Rename package ', selectedPackage.\x0a newName ifNotNil: [\x0a newName notEmpty ifTrue: [\x0a\x09Smalltalk current renamePackage: selectedPackage to: newName.\x0a\x09self updateCategoriesList]]",
- messageSends: ["prompt:", ",", "ifNotNil:", "ifTrue:", "renamePackage:to:", "current", "updateCategoriesList", "notEmpty"],
- referencedClasses: ["Smalltalk"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_renderBottomPanelOn_",
- smalltalk.method({
- selector: "renderBottomPanelOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=_st(html)._div();
- _st($1)._class_("amber_sourceCode");
- $2=_st($1)._with_((function(){
- return smalltalk.withContext(function($ctx2) {
self["@sourceArea"]=_st((smalltalk.SourceArea || SourceArea))._new();
- self["@sourceArea"];
- _st(self["@sourceArea"])._renderOn_(html);
- _st(self["@sourceArea"])._onKeyDown_((function(e){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._handleSourceAreaKeyDown_(e);
- }, function($ctx3) {$ctx3.fillBlock({e:e},$ctx1)})}));
- return _st(self["@sourceArea"])._onKeyUp_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._updateStatus();
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html}, smalltalk.Browser)})},
- args: ["html"],
- source: "renderBottomPanelOn: html\x0a html div\x0a\x09class: 'amber_sourceCode';\x0a\x09with: [\x0a\x09 sourceArea := SourceArea new.\x0a\x09 sourceArea renderOn: html.\x0a sourceArea onKeyDown: [:e |\x0a self handleSourceAreaKeyDown: e].\x0a\x09 sourceArea onKeyUp: [self updateStatus]]",
- messageSends: ["class:", "div", "with:", "new", "renderOn:", "onKeyDown:", "handleSourceAreaKeyDown:", "onKeyUp:", "updateStatus"],
- referencedClasses: ["SourceArea"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_renderBoxOn_",
- smalltalk.method({
- selector: "renderBoxOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=self;
- _st($1)._renderTopPanelOn_(html);
- _st($1)._renderTabsOn_(html);
- $2=_st($1)._renderBottomPanelOn_(html);
- return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.Browser)})},
- args: ["html"],
- source: "renderBoxOn: html\x0a self \x0a\x09renderTopPanelOn: html;\x0a\x09renderTabsOn: html;\x0a\x09renderBottomPanelOn: html",
- messageSends: ["renderTopPanelOn:", "renderTabsOn:", "renderBottomPanelOn:"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_renderButtonsOn_",
- smalltalk.method({
- selector: "renderButtonsOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$5,$6,$7,$8,$9,$10,$4;
- self["@saveButton"]=_st(html)._button();
- $1=self["@saveButton"];
- _st($1)._with_("Save");
- $2=_st($1)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(self)._compile();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- self["@methodButtons"]=_st(html)._span();
- self["@classButtons"]=_st(html)._span();
- $3=_st(html)._div();
- _st($3)._class_("right");
- $4=_st($3)._with_((function(){
- return smalltalk.withContext(function($ctx2) {
$5=_st(html)._button();
- _st($5)._with_("DoIt");
- $6=_st($5)._onClick_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self["@sourceArea"])._doIt();
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $6;
- $7=_st(html)._button();
- _st($7)._with_("PrintIt");
- $8=_st($7)._onClick_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self["@sourceArea"])._printIt();
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $8;
- $9=_st(html)._button();
- _st($9)._with_("InspectIt");
- $10=_st($9)._onClick_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self["@sourceArea"])._inspectIt();
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- return $10;
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- _st(self)._updateSourceAndButtons();
- return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.Browser)})},
- args: ["html"],
- source: "renderButtonsOn: html\x0a saveButton := html button.\x0a saveButton \x0a\x09with: 'Save';\x0a\x09onClick: [self compile].\x0a methodButtons := html span.\x0a classButtons := html span.\x0a html div \x0a\x09class: 'right';\x0a\x09with: [\x0a\x09\x09html button\x0a\x09\x09\x09with: 'DoIt';\x0a\x09\x09\x09onClick: [sourceArea doIt].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'PrintIt';\x0a\x09\x09\x09onClick: [sourceArea printIt].\x0a\x09\x09html button with: 'InspectIt';\x0a\x09\x09\x09onClick: [sourceArea inspectIt]]. \x0a self updateSourceAndButtons",
- messageSends: ["button", "with:", "onClick:", "compile", "span", "class:", "div", "doIt", "printIt", "inspectIt", "updateSourceAndButtons"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_renderTabsOn_",
- smalltalk.method({
- selector: "renderTabsOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@tabsList"]=_st(_st(html)._ul())._class_("amber_tabs amber_browser");
- _st(self)._updateTabsList();
- return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html}, smalltalk.Browser)})},
- args: ["html"],
- source: "renderTabsOn: html\x0a tabsList := html ul class: 'amber_tabs amber_browser'.\x0a self updateTabsList.",
- messageSends: ["class:", "ul", "updateTabsList"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_renderTopPanelOn_",
- smalltalk.method({
- selector: "renderTopPanelOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$5,$6,$7,$8,$9,$10,$4,$11,$12,$2;
- $1=_st(html)._div();
- _st($1)._class_("top");
- $2=_st($1)._with_((function(){
- return smalltalk.withContext(function($ctx2) {
self["@packagesList"]=_st(_st(html)._ul())._class_("amber_column browser packages");
- self["@packagesList"];
- $3=_st(html)._div();
- _st($3)._class_("amber_packagesButtons");
- $4=_st($3)._with_((function(){
- return smalltalk.withContext(function($ctx3) {
$5=_st(html)._button();
- _st($5)._title_("Commit classes in this package to disk");
- _st($5)._onClick_((function(){
- return smalltalk.withContext(function($ctx4) {
return _st(self)._commitPackage();
- }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
- $6=_st($5)._with_("Commit");
- $6;
- $7=_st(html)._button();
- _st($7)._title_("Rename package");
- _st($7)._onClick_((function(){
- return smalltalk.withContext(function($ctx4) {
return _st(self)._renamePackage();
- }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
- $8=_st($7)._with_("Rename");
- $8;
- $9=_st(html)._button();
- _st($9)._title_("Remove this package from the system");
- _st($9)._onClick_((function(){
- return smalltalk.withContext(function($ctx4) {
return _st(self)._removePackage();
- }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
- $10=_st($9)._with_("Remove");
- return $10;
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $4;
- self["@classesList"]=_st((smalltalk.ClassesList || ClassesList))._on_(self);
- self["@classesList"];
- _st(self["@classesList"])._renderOn_(html);
- self["@protocolsList"]=_st(_st(html)._ul())._class_("amber_column browser protocols");
- self["@protocolsList"];
- self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column browser methods");
- self["@methodsList"];
- $11=self;
- _st($11)._updateCategoriesList();
- _st($11)._updateClassesList();
- _st($11)._updateProtocolsList();
- $12=_st($11)._updateMethodsList();
- $12;
- return _st(_st(html)._div())._class_("amber_clear");
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html}, smalltalk.Browser)})},
- args: ["html"],
- source: "renderTopPanelOn: html\x0a\x09html div \x0a\x09\x09class: 'top'; \x0a\x09\x09with: [\x0a\x09\x09\x09packagesList := html ul class: 'amber_column browser packages'.\x0a \x09\x09html div class: 'amber_packagesButtons'; with: [\x0a\x09\x09\x09\x09html button \x0a\x09\x09\x09\x09\x09title: 'Commit classes in this package to disk';\x0a\x09\x09\x09\x09\x09onClick: [self commitPackage];\x0a\x09\x09\x09\x09\x09with: 'Commit'.\x0a \x09\x09\x09html button\x0a\x09\x09\x09\x09\x09title: 'Rename package';\x0a\x09\x09\x09\x09\x09onClick: [self renamePackage];\x0a\x09\x09\x09\x09\x09with: 'Rename'.\x0a \x09\x09\x09html button\x0a\x09\x09\x09\x09\x09title: 'Remove this package from the system';\x0a\x09\x09\x09\x09\x09onClick: [self removePackage];\x0a\x09\x09\x09\x09\x09with: 'Remove'].\x0a\x09\x09\x09classesList := ClassesList on: self.\x0a\x09\x09\x09classesList renderOn: html.\x0a\x09\x09\x09protocolsList := html ul class: 'amber_column browser protocols'.\x0a\x09\x09\x09methodsList := html ul class: 'amber_column browser methods'.\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09updateCategoriesList;\x0a\x09\x09\x09\x09updateClassesList;\x0a\x09\x09\x09\x09updateProtocolsList;\x0a\x09\x09\x09\x09updateMethodsList.\x0a\x09\x09\x09html div class: 'amber_clear']",
- messageSends: ["class:", "div", "with:", "ul", "title:", "button", "onClick:", "commitPackage", "renamePackage", "removePackage", "on:", "renderOn:", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList"],
- referencedClasses: ["ClassesList"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_resetClassesList",
- smalltalk.method({
- selector: "resetClassesList",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self["@classesList"])._resetNodes();
- return self}, function($ctx1) {$ctx1.fill(self,"resetClassesList",{}, smalltalk.Browser)})},
- args: [],
- source: "resetClassesList\x0a\x09classesList resetNodes",
- messageSends: ["resetNodes"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_search_",
- smalltalk.method({
- selector: "search:",
- category: 'actions',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$2;
- $1=_st(self)._cancelChanges();
- $2=(function(){
- var searchedClass;
- return smalltalk.withContext(function($ctx2) {
searchedClass=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(aString);
- searchedClass;
- $3=_st(searchedClass)._isClass();
- if(smalltalk.assert($3)){
- return _st(_st(self)._class())._openOn_(searchedClass);
- } else {
- return _st(self)._searchReferencesOf_(aString);
- };
- }, function($ctx2) {$ctx2.fillBlock({searchedClass:searchedClass},$ctx1)})});
- _st($1)._ifTrue_($2);
- return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString}, smalltalk.Browser)})},
- args: ["aString"],
- 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]]",
- messageSends: ["ifTrue:", "at:", "current", "ifTrue:ifFalse:", "openOn:", "class", "searchReferencesOf:", "isClass", "cancelChanges"],
- referencedClasses: ["Smalltalk"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_searchClassReferences",
- smalltalk.method({
- selector: "searchClassReferences",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st((smalltalk.ReferencesBrowser || ReferencesBrowser))._search_(_st(self["@selectedClass"])._name());
- return self}, function($ctx1) {$ctx1.fill(self,"searchClassReferences",{}, smalltalk.Browser)})},
- args: [],
- source: "searchClassReferences\x0a\x09ReferencesBrowser search: selectedClass name",
- messageSends: ["search:", "name"],
- referencedClasses: ["ReferencesBrowser"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_searchReferencesOf_",
- smalltalk.method({
- selector: "searchReferencesOf:",
- category: 'actions',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st((smalltalk.ReferencesBrowser || ReferencesBrowser))._search_(aString);
- return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesOf:",{aString:aString}, smalltalk.Browser)})},
- args: ["aString"],
- source: "searchReferencesOf: aString\x0a\x09ReferencesBrowser search: aString",
- messageSends: ["search:"],
- referencedClasses: ["ReferencesBrowser"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_selectCategory_",
- smalltalk.method({
- selector: "selectCategory:",
- category: 'actions',
- fn: function (aCategory){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3;
- $1=_st(self)._cancelChanges();
- if(smalltalk.assert($1)){
- self["@selectedPackage"]=aCategory;
- self["@selectedPackage"];
- self["@selectedMethod"]=nil;
- self["@selectedProtocol"]=self["@selectedMethod"];
- self["@selectedClass"]=self["@selectedProtocol"];
- self["@selectedClass"];
- _st(self)._resetClassesList();
- $2=self;
- _st($2)._updateCategoriesList();
- _st($2)._updateClassesList();
- _st($2)._updateProtocolsList();
- _st($2)._updateMethodsList();
- $3=_st($2)._updateSourceAndButtons();
- $3;
- };
- return self}, function($ctx1) {$ctx1.fill(self,"selectCategory:",{aCategory:aCategory}, smalltalk.Browser)})},
- args: ["aCategory"],
- source: "selectCategory: aCategory\x0a self cancelChanges ifTrue: [\x0a\x09selectedPackage := aCategory.\x0a\x09selectedClass := selectedProtocol := selectedMethod := nil.\x0a\x09self resetClassesList.\x0a\x09self \x0a\x09 updateCategoriesList;\x0a\x09 updateClassesList;\x0a\x09 updateProtocolsList;\x0a\x09 updateMethodsList;\x0a\x09 updateSourceAndButtons]",
- messageSends: ["ifTrue:", "resetClassesList", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "cancelChanges"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_selectClass_",
- smalltalk.method({
- selector: "selectClass:",
- category: 'actions',
- fn: function (aClass){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3;
- $1=_st(self)._cancelChanges();
- if(smalltalk.assert($1)){
- self["@selectedClass"]=aClass;
- self["@selectedClass"];
- self["@selectedMethod"]=nil;
- self["@selectedProtocol"]=self["@selectedMethod"];
- self["@selectedProtocol"];
- $2=self;
- _st($2)._updateClassesList();
- _st($2)._updateProtocolsList();
- _st($2)._updateMethodsList();
- $3=_st($2)._updateSourceAndButtons();
- $3;
- };
- return self}, function($ctx1) {$ctx1.fill(self,"selectClass:",{aClass:aClass}, smalltalk.Browser)})},
- args: ["aClass"],
- source: "selectClass: aClass\x0a self cancelChanges ifTrue: [\x0a\x09selectedClass := aClass.\x0a\x09selectedProtocol := selectedMethod := nil.\x0a\x09self \x0a\x09 updateClassesList;\x0a\x09 updateProtocolsList;\x0a\x09 updateMethodsList;\x0a\x09 updateSourceAndButtons]",
- messageSends: ["ifTrue:", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "cancelChanges"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_selectMethod_",
- smalltalk.method({
- selector: "selectMethod:",
- category: 'actions',
- fn: function (aMethod){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3;
- $1=_st(self)._cancelChanges();
- if(smalltalk.assert($1)){
- self["@selectedMethod"]=aMethod;
- self["@selectedMethod"];
- $2=self;
- _st($2)._updateProtocolsList();
- _st($2)._updateMethodsList();
- $3=_st($2)._updateSourceAndButtons();
- $3;
- };
- return self}, function($ctx1) {$ctx1.fill(self,"selectMethod:",{aMethod:aMethod}, smalltalk.Browser)})},
- args: ["aMethod"],
- source: "selectMethod: aMethod\x0a self cancelChanges ifTrue: [\x0a\x09selectedMethod := aMethod.\x0a\x09self \x0a\x09 updateProtocolsList;\x0a\x09 updateMethodsList;\x0a\x09 updateSourceAndButtons]",
- messageSends: ["ifTrue:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "cancelChanges"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_selectProtocol_",
- smalltalk.method({
- selector: "selectProtocol:",
- category: 'actions',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3;
- $1=_st(self)._cancelChanges();
- if(smalltalk.assert($1)){
- self["@selectedProtocol"]=aString;
- self["@selectedProtocol"];
- self["@selectedMethod"]=nil;
- self["@selectedMethod"];
- $2=self;
- _st($2)._updateProtocolsList();
- _st($2)._updateMethodsList();
- $3=_st($2)._updateSourceAndButtons();
- $3;
- };
- return self}, function($ctx1) {$ctx1.fill(self,"selectProtocol:",{aString:aString}, smalltalk.Browser)})},
- args: ["aString"],
- source: "selectProtocol: aString\x0a self cancelChanges ifTrue: [\x0a\x09selectedProtocol := aString.\x0a\x09selectedMethod := nil.\x0a\x09self \x0a\x09 updateProtocolsList;\x0a\x09 updateMethodsList;\x0a\x09 updateSourceAndButtons]",
- messageSends: ["ifTrue:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "cancelChanges"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_selectTab_",
- smalltalk.method({
- selector: "selectTab:",
- category: 'actions',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(self)._cancelChanges();
- if(smalltalk.assert($1)){
- self["@selectedTab"]=aString;
- self["@selectedTab"];
- _st(self)._selectProtocol_(nil);
- _st(self)._updateTabsList();
- };
- return self}, function($ctx1) {$ctx1.fill(self,"selectTab:",{aString:aString}, smalltalk.Browser)})},
- args: ["aString"],
- source: "selectTab: aString\x0a self cancelChanges ifTrue: [\x0a\x09selectedTab := aString.\x0a\x09self selectProtocol: nil.\x0a\x09self updateTabsList]",
- messageSends: ["ifTrue:", "selectProtocol:", "updateTabsList", "cancelChanges"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_selectedClass",
- smalltalk.method({
- selector: "selectedClass",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@selectedClass"];
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"selectedClass",{}, smalltalk.Browser)})},
- args: [],
- source: "selectedClass\x0a\x09^selectedClass",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_selectedPackage",
- smalltalk.method({
- selector: "selectedPackage",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@selectedPackage"];
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{}, smalltalk.Browser)})},
- args: [],
- source: "selectedPackage\x0a\x09^selectedPackage",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_setMethodProtocol_",
- smalltalk.method({
- selector: "setMethodProtocol:",
- category: 'actions',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$4,$5,$2;
- $1=_st(self)._cancelChanges();
- $2=(function(){
- return smalltalk.withContext(function($ctx2) {
$3=_st(_st(self)._protocols())._includes_(aString);
- if(smalltalk.assert($3)){
- _st(self["@selectedMethod"])._category_(aString);
- self["@selectedProtocol"]=aString;
- self["@selectedProtocol"];
- self["@selectedMethod"]=self["@selectedMethod"];
- self["@selectedMethod"];
- $4=self;
- _st($4)._updateProtocolsList();
- _st($4)._updateMethodsList();
- $5=_st($4)._updateSourceAndButtons();
- return $5;
- } else {
- return _st(self)._addNewProtocol();
- };
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
- _st($1)._ifTrue_($2);
- return self}, function($ctx1) {$ctx1.fill(self,"setMethodProtocol:",{aString:aString}, smalltalk.Browser)})},
- args: ["aString"],
- source: "setMethodProtocol: aString\x0a self cancelChanges ifTrue: [\x0a\x09(self protocols includes: aString)\x0a\x09 ifFalse: [self addNewProtocol]\x0a\x09 ifTrue: [\x0a\x09\x09selectedMethod category: aString.\x0a\x09\x09selectedProtocol := aString.\x0a\x09\x09selectedMethod := selectedMethod.\x0a\x09\x09self \x0a\x09\x09 updateProtocolsList;\x0a\x09\x09 updateMethodsList;\x0a\x09\x09 updateSourceAndButtons]]",
- messageSends: ["ifTrue:", "ifFalse:ifTrue:", "addNewProtocol", "category:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "includes:", "protocols", "cancelChanges"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_showClassButtons",
- smalltalk.method({
- selector: "showClassButtons",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st(self["@classButtons"])._asJQuery())._show();
- return self}, function($ctx1) {$ctx1.fill(self,"showClassButtons",{}, smalltalk.Browser)})},
- args: [],
- source: "showClassButtons\x0a classButtons asJQuery show",
- messageSends: ["show", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_showMethodButtons",
- smalltalk.method({
- selector: "showMethodButtons",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st(self["@methodButtons"])._asJQuery())._show();
- return self}, function($ctx1) {$ctx1.fill(self,"showMethodButtons",{}, smalltalk.Browser)})},
- args: [],
- source: "showMethodButtons\x0a methodButtons asJQuery show",
- messageSends: ["show", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_source",
- smalltalk.method({
- selector: "source",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$4,$3,$2,$6,$5;
- var $early={};
- try {
- $1=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("comment"));
- $2=(function(){
- return smalltalk.withContext(function($ctx2) {
$4=_st(_st(self["@selectedProtocol"])._notNil())._or_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self["@selectedMethod"])._notNil();
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- if(smalltalk.assert($4)){
- $3=_st(self)._methodSource();
- } else {
- $3=_st(self)._declarationSource();
- };
- throw $early=[$3];
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
- _st($1)._ifFalse_($2);
- $6=self["@selectedClass"];
- if(($receiver = $6) == nil || $receiver == undefined){
- $5="";
- } else {
- $5=_st(self)._classCommentSource();
- };
- return $5;
- }
- catch(e) {if(e===$early)return e[0]; throw e}
- }, function($ctx1) {$ctx1.fill(self,"source",{}, smalltalk.Browser)})},
- args: [],
- source: "source\x0a selectedTab = #comment ifFalse: [\x0a\x09^(selectedProtocol notNil or: [selectedMethod notNil])\x0a\x09 ifFalse: [self declarationSource]\x0a\x09 ifTrue: [self methodSource]].\x0a ^selectedClass\x0a\x09ifNil: ['']\x0a\x09ifNotNil: [self classCommentSource]",
- messageSends: ["ifFalse:", "ifFalse:ifTrue:", "declarationSource", "methodSource", "or:", "notNil", "=", "ifNil:ifNotNil:", "classCommentSource"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_updateCategoriesList",
- smalltalk.method({
- selector: "updateCategoriesList",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$5,$6,$7,$8,$4,$2;
- $1=self["@packagesList"];
- $2=(function(html){
- return smalltalk.withContext(function($ctx2) {
$3=_st(self)._packages();
- $4=(function(each){
- var li,label;
- return smalltalk.withContext(function($ctx3) {
$5=_st(each)._isEmpty();
- if(smalltalk.assert($5)){
- label="Unclassified";
- label;
- } else {
- label=each;
- label;
- };
- li=_st(html)._li();
- li;
- $6=_st(self["@selectedPackage"]).__eq(each);
- if(smalltalk.assert($6)){
- _st(li)._class_("selected");
- };
- $7=li;
- _st($7)._with_(label);
- $8=_st($7)._onClick_((function(){
- return smalltalk.withContext(function($ctx4) {
return _st(self)._selectCategory_(each);
- }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
- return $8;
- }, function($ctx3) {$ctx3.fillBlock({each:each,li:li,label:label},$ctx1)})});
- return _st($3)._do_($4);
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})});
- _st($1)._contents_($2);
- return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{}, smalltalk.Browser)})},
- args: [],
- source: "updateCategoriesList\x0a packagesList contents: [:html |\x0a\x09self packages do: [:each || li label |\x0a\x09 each isEmpty \x0a\x09\x09ifTrue: [label := 'Unclassified']\x0a\x09\x09ifFalse: [label := each].\x0a\x09 li := html li.\x0a\x09 selectedPackage = each ifTrue: [\x0a\x09\x09li class: 'selected'].\x0a\x09 li\x0a\x09\x09with: label;\x0a\x09\x09onClick: [self selectCategory: each]]]",
- messageSends: ["contents:", "do:", "ifTrue:ifFalse:", "isEmpty", "li", "ifTrue:", "class:", "=", "with:", "onClick:", "selectCategory:", "packages"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_updateClassesList",
- smalltalk.method({
- selector: "updateClassesList",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st((smalltalk.TabManager || TabManager))._current())._update();
- _st(self["@classesList"])._updateNodes();
- return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{}, smalltalk.Browser)})},
- args: [],
- source: "updateClassesList\x0a TabManager current update.\x0a classesList updateNodes",
- messageSends: ["update", "current", "updateNodes"],
- referencedClasses: ["TabManager"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_updateMethodsList",
- smalltalk.method({
- selector: "updateMethodsList",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$5,$6,$7,$4,$2;
- $1=self["@methodsList"];
- $2=(function(html){
- return smalltalk.withContext(function($ctx2) {
$3=_st(self)._methods();
- $4=(function(each){
- var li;
- return smalltalk.withContext(function($ctx3) {
li=_st(html)._li();
- li;
- $5=_st(self["@selectedMethod"]).__eq(each);
- if(smalltalk.assert($5)){
- _st(li)._class_("selected");
- };
- $6=li;
- _st($6)._with_(_st(each)._selector());
- $7=_st($6)._onClick_((function(){
- return smalltalk.withContext(function($ctx4) {
return _st(self)._selectMethod_(each);
- }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
- return $7;
- }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})});
- return _st($3)._do_($4);
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})});
- _st($1)._contents_($2);
- return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{}, smalltalk.Browser)})},
- args: [],
- source: "updateMethodsList\x0a methodsList contents: [:html |\x0a\x09self methods do: [:each || li |\x0a\x09 li := html li.\x0a\x09 selectedMethod = each ifTrue: [\x0a\x09\x09li class: 'selected'].\x0a\x09 li\x0a\x09\x09with: each selector;\x0a\x09\x09onClick: [self selectMethod: each]]]",
- messageSends: ["contents:", "do:", "li", "ifTrue:", "class:", "=", "with:", "selector", "onClick:", "selectMethod:", "methods"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_updateProtocolsList",
- smalltalk.method({
- selector: "updateProtocolsList",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$5,$6,$7,$4,$2;
- $1=self["@protocolsList"];
- $2=(function(html){
- return smalltalk.withContext(function($ctx2) {
$3=_st(self)._protocols();
- $4=(function(each){
- var li;
- return smalltalk.withContext(function($ctx3) {
li=_st(html)._li();
- li;
- $5=_st(self["@selectedProtocol"]).__eq(each);
- if(smalltalk.assert($5)){
- _st(li)._class_("selected");
- };
- $6=li;
- _st($6)._with_(each);
- $7=_st($6)._onClick_((function(){
- return smalltalk.withContext(function($ctx4) {
return _st(self)._selectProtocol_(each);
- }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
- return $7;
- }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})});
- return _st($3)._do_($4);
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})});
- _st($1)._contents_($2);
- return self}, function($ctx1) {$ctx1.fill(self,"updateProtocolsList",{}, smalltalk.Browser)})},
- args: [],
- source: "updateProtocolsList\x0a protocolsList contents: [:html |\x0a\x09self protocols do: [:each || li |\x0a\x09 li := html li.\x0a\x09 selectedProtocol = each ifTrue: [\x0a\x09\x09li class: 'selected'].\x0a\x09 li \x0a\x09\x09with: each;\x0a\x09\x09onClick: [self selectProtocol: each]]]",
- messageSends: ["contents:", "do:", "li", "ifTrue:", "class:", "=", "with:", "onClick:", "selectProtocol:", "protocols"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_updateSourceAndButtons",
- smalltalk.method({
- selector: "updateSourceAndButtons",
- category: 'updating',
- fn: function (){
- var self=this;
- var currentProtocol;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$13,$14,$15,$17,$19,$20,$21,$22,$23,$24,$26,$25,$18,$16,$27,$28,$30,$31,$32,$33,$29,$12,$34,$36,$35;
- _st(self)._disableSaveButton();
- _st(self["@classButtons"])._contents_((function(html){
- return smalltalk.withContext(function($ctx2) {
$1=_st(html)._button();
- _st($1)._title_("Create a new class");
- _st($1)._onClick_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._addNewClass();
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $2=_st($1)._with_("New class");
- $2;
- $3=_st(html)._button();
- _st($3)._with_("Rename class");
- $4=_st($3)._onClick_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._renameClass();
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $4;
- $5=_st(html)._button();
- _st($5)._with_("Copy class");
- $6=_st($5)._onClick_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._copyClass();
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $6;
- $7=_st(html)._button();
- _st($7)._with_("Remove class");
- $8=_st($7)._onClick_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._removeClass();
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $8;
- $9=_st(html)._button();
- _st($9)._with_("References");
- $10=_st($9)._onClick_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._searchClassReferences();
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- return $10;
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
- $11=self["@methodButtons"];
- $12=(function(html){
- var protocolSelect,referencesSelect;
- return smalltalk.withContext(function($ctx2) {
$13=_st(html)._button();
- _st($13)._with_("Remove method");
- $14=_st($13)._onClick_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._removeMethod();
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $14;
- protocolSelect=_st(html)._select();
- protocolSelect;
- $15=protocolSelect;
- _st($15)._onChange_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._setMethodProtocol_(_st(_st(protocolSelect)._asJQuery())._val());
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $17=$15;
- $18=(function(){
- return smalltalk.withContext(function($ctx3) {
$19=_st(html)._option();
- _st($19)._with_("Method protocol");
- $20=_st($19)._at_put_("disabled","disabled");
- $20;
- $21=_st(html)._option();
- _st($21)._class_("important");
- $22=_st($21)._with_("New...");
- $22;
- currentProtocol=self["@selectedProtocol"];
- currentProtocol;
- $23=_st(_st(currentProtocol)._isNil())._and_((function(){
- return smalltalk.withContext(function($ctx4) {
return _st(self["@selectedMethod"])._notNil();
- }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
- if(smalltalk.assert($23)){
- currentProtocol=_st(self["@selectedMethod"])._category();
- currentProtocol;
- };
- $24=_st(self)._protocols();
- $25=(function(each){
- return smalltalk.withContext(function($ctx4) {
option=_st(_st(html)._option())._with_(each);
- option;
- $26=_st(currentProtocol).__eq(each);
- if(smalltalk.assert($26)){
- return _st(option)._at_put_("selected","selected");
- };
- }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})});
- return _st($24)._do_($25);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
- $16=_st($17)._with_($18);
- $16;
- $27=_st(self["@selectedMethod"])._isNil();
- if(! smalltalk.assert($27)){
- referencesSelect=_st(html)._select();
- referencesSelect;
- $28=referencesSelect;
- _st($28)._onChange_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._searchReferencesOf_(_st(_st(referencesSelect)._asJQuery())._val());
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $29=_st($28)._with_((function(){
- var option;
- return smalltalk.withContext(function($ctx3) {
$30=_st(html)._option();
- _st($30)._with_("References");
- _st($30)._at_put_("disabled","disabled");
- $31=_st($30)._at_put_("selected","selected");
- $31;
- $32=_st(html)._option();
- _st($32)._class_("important");
- $33=_st($32)._with_(_st(self["@selectedMethod"])._selector());
- $33;
- return _st(_st(_st(self["@selectedMethod"])._messageSends())._sorted())._do_((function(each){
- return smalltalk.withContext(function($ctx4) {
return _st(_st(html)._option())._with_(each);
- }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
- }, function($ctx3) {$ctx3.fillBlock({option:option},$ctx1)})}));
- return $29;
- };
- }, function($ctx2) {$ctx2.fillBlock({html:html,protocolSelect:protocolSelect,referencesSelect:referencesSelect},$ctx1)})});
- _st($11)._contents_($12);
- $34=_st(self["@selectedMethod"])._isNil();
- $35=(function(){
- return smalltalk.withContext(function($ctx2) {
_st(self)._hideMethodButtons();
- $36=_st(_st(self["@selectedClass"])._isNil())._or_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self["@selectedProtocol"])._notNil();
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- if(smalltalk.assert($36)){
- return _st(self)._hideClassButtons();
- } else {
- return _st(self)._showClassButtons();
- };
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
- _st($34)._ifTrue_ifFalse_($35,(function(){
- return smalltalk.withContext(function($ctx2) {
_st(self)._hideClassButtons();
- return _st(self)._showMethodButtons();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- _st(self["@sourceArea"])._val_(_st(self)._source());
- return self}, function($ctx1) {$ctx1.fill(self,"updateSourceAndButtons",{currentProtocol:currentProtocol}, smalltalk.Browser)})},
- args: [],
- source: "updateSourceAndButtons\x0a\x09| currentProtocol |\x0a\x0a\x09self disableSaveButton.\x0a\x09classButtons contents: [:html |\x0a\x09\x09html button\x0a\x09\x09\x09title: 'Create a new class';\x0a\x09\x09\x09onClick: [self addNewClass];\x0a\x09\x09\x09with: 'New class'.\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Rename class';\x0a\x09\x09\x09onClick: [self renameClass].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Copy class';\x0a\x09\x09\x09onClick: [self copyClass].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Remove class';\x0a\x09\x09\x09onClick: [self removeClass].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'References';\x0a\x09\x09\x09onClick: [self searchClassReferences]].\x0a\x09methodButtons contents: [:html | | protocolSelect referencesSelect |\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Remove method';\x0a\x09\x09\x09onClick: [self removeMethod].\x0a\x09\x09protocolSelect := html select.\x0a protocolSelect\x0a\x09\x09\x09onChange: [ self setMethodProtocol: protocolSelect asJQuery val];\x0a\x09\x09\x09with: [\x0a\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09with: 'Method protocol';\x0a\x09\x09\x09\x09\x09at: 'disabled' put: 'disabled'.\x0a\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09class: 'important';\x0a\x09\x09\x09\x09\x09with: 'New...'.\x0a currentProtocol := selectedProtocol.\x0a (currentProtocol isNil and: [ selectedMethod notNil ])\x0a \x09ifTrue: [ currentProtocol := selectedMethod category].\x0a\x09\x09\x09\x09self protocols do: [:each |\x0a\x09\x09\x09\x09\x09option := html option with: each.\x0a\x09\x09\x09\x09\x09currentProtocol = each ifTrue: [ option at: 'selected' put: 'selected' ] ]].\x0a\x09\x09selectedMethod isNil ifFalse: [\x0a\x09\x09\x09referencesSelect := html select.\x0a referencesSelect\x0a\x09\x09\x09\x09onChange: [self searchReferencesOf: referencesSelect asJQuery val];\x0a\x09\x09\x09\x09with: [ |option|\x0a\x09\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09\x09with: 'References';\x0a\x09\x09\x09\x09\x09\x09at: 'disabled' put: 'disabled';\x0a at: 'selected' put: 'selected'.\x0a\x09\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09\x09class: 'important';\x0a\x09\x09\x09\x09\x09\x09with: selectedMethod selector.\x0a\x09\x09\x09\x09\x09selectedMethod messageSends sorted do: [:each |\x0a\x09\x09\x09\x09\x09\x09html option with: each]]]].\x0a\x09selectedMethod isNil\x0a\x09\x09ifTrue: [\x0a\x09\x09\x09self hideMethodButtons.\x0a\x09\x09\x09\x09(selectedClass isNil or: [selectedProtocol notNil])\x0a\x09\x09\x09\x09\x09ifTrue: [self hideClassButtons]\x0a\x09\x09\x09\x09\x09ifFalse: [self showClassButtons]]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09self hideClassButtons.\x0a\x09\x09\x09self showMethodButtons].\x0a\x09sourceArea val: self source",
- 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"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_updateStatus",
- smalltalk.method({
- selector: "updateStatus",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$2,$5,$4;
- $1=_st(_st(self["@sourceArea"])._val()).__eq(_st(self)._source());
- $2=(function(){
- return smalltalk.withContext(function($ctx2) {
$3=self["@saveButton"];
- if(($receiver = $3) == nil || $receiver == undefined){
- $3;
- } else {
- _st(self["@saveButton"])._at_put_("disabled",true);
- };
- self["@unsavedChanges"]=false;
- return self["@unsavedChanges"];
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
- $4=(function(){
- return smalltalk.withContext(function($ctx2) {
$5=self["@saveButton"];
- if(($receiver = $5) == nil || $receiver == undefined){
- $5;
- } else {
- _st(self["@saveButton"])._removeAt_("disabled");
- };
- self["@unsavedChanges"]=true;
- return self["@unsavedChanges"];
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
- _st($1)._ifTrue_ifFalse_($2,$4);
- return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{}, smalltalk.Browser)})},
- args: [],
- 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]",
- messageSends: ["ifTrue:ifFalse:", "ifNotNil:", "at:put:", "removeAt:", "=", "source", "val"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_updateTabsList",
- smalltalk.method({
- selector: "updateTabsList",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$2;
- $1=self["@tabsList"];
- $2=(function(html){
- var li;
- return smalltalk.withContext(function($ctx2) {
li=_st(html)._li();
- li;
- $3=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
- if(smalltalk.assert($3)){
- _st(li)._class_("selected");
- };
- $4=li;
- _st($4)._with_((function(){
- return smalltalk.withContext(function($ctx3) {
_st(_st(html)._span())._class_("ltab");
- $5=_st(html)._span();
- _st($5)._class_("mtab");
- $6=_st($5)._with_("Instance");
- $6;
- return _st(_st(html)._span())._class_("rtab");
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $7=_st($4)._onClick_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._selectTab_(smalltalk.symbolFor("instance"));
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $7;
- li=_st(html)._li();
- li;
- $8=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("class"));
- if(smalltalk.assert($8)){
- _st(li)._class_("selected");
- };
- $9=li;
- _st($9)._with_((function(){
- return smalltalk.withContext(function($ctx3) {
_st(_st(html)._span())._class_("ltab");
- $10=_st(html)._span();
- _st($10)._class_("mtab");
- $11=_st($10)._with_("Class");
- $11;
- return _st(_st(html)._span())._class_("rtab");
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $12=_st($9)._onClick_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._selectTab_(smalltalk.symbolFor("class"));
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $12;
- li=_st(html)._li();
- li;
- $13=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("comment"));
- if(smalltalk.assert($13)){
- _st(li)._class_("selected");
- };
- $14=li;
- _st($14)._with_((function(){
- return smalltalk.withContext(function($ctx3) {
_st(_st(html)._span())._class_("ltab");
- $15=_st(html)._span();
- _st($15)._class_("mtab");
- $16=_st($15)._with_("Comment");
- $16;
- return _st(_st(html)._span())._class_("rtab");
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $17=_st($14)._onClick_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._selectTab_(smalltalk.symbolFor("comment"));
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- return $17;
- }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1)})});
- _st($1)._contents_($2);
- return self}, function($ctx1) {$ctx1.fill(self,"updateTabsList",{}, smalltalk.Browser)})},
- args: [],
- source: "updateTabsList\x0a tabsList contents: [:html || li |\x0a\x09li := html li.\x0a\x09selectedTab = #instance ifTrue: [li class: 'selected'].\x0a\x09li\x0a\x09 with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span class: 'mtab'; with: 'Instance'.\x0a\x09\x09html span class: 'rtab'];\x0a\x09 onClick: [self selectTab: #instance].\x0a\x09li := html li.\x0a\x09selectedTab = #class ifTrue: [li class: 'selected'].\x0a\x09li\x0a\x09 with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span class: 'mtab'; with: 'Class'.\x0a\x09\x09html span class: 'rtab'];\x0a\x09 onClick: [self selectTab: #class].\x0a\x09li := html li.\x0a\x09selectedTab = #comment ifTrue: [li class: 'selected'].\x0a\x09li\x0a\x09 with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span class: 'mtab'; with: 'Comment'.\x0a\x09\x09html span class: 'rtab'];\x0a\x09 onClick: [self selectTab: #comment]]",
- messageSends: ["contents:", "li", "ifTrue:", "class:", "=", "with:", "span", "onClick:", "selectTab:"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_open",
- smalltalk.method({
- selector: "open",
- category: 'convenience',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st(self)._new())._open();
- return self}, function($ctx1) {$ctx1.fill(self,"open",{}, smalltalk.Browser.klass)})},
- args: [],
- source: "open\x0a self new open",
- messageSends: ["open", "new"],
- referencedClasses: []
- }),
- smalltalk.Browser.klass);
- smalltalk.addMethod(
- "_openOn_",
- smalltalk.method({
- selector: "openOn:",
- category: 'convenience',
- fn: function (aClass){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$3,$1;
- $2=_st(self)._new();
- _st($2)._open();
- _st($2)._selectCategory_(_st(aClass)._category());
- $3=_st($2)._selectClass_(aClass);
- $1=$3;
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"openOn:",{aClass:aClass}, smalltalk.Browser.klass)})},
- args: ["aClass"],
- source: "openOn: aClass\x0a ^self new\x0a\x09open;\x0a\x09selectCategory: aClass category;\x0a\x09selectClass: aClass",
- messageSends: ["open", "new", "selectCategory:", "category", "selectClass:"],
- referencedClasses: []
- }),
- smalltalk.Browser.klass);
- smalltalk.addClass('Debugger', smalltalk.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
- smalltalk.addMethod(
- "_allVariables",
- smalltalk.method({
- selector: "allVariables",
- category: 'accessing',
- fn: function (){
- var self=this;
- var all;
- return smalltalk.withContext(function($ctx1) {
var $1;
- all=_st((smalltalk.Dictionary || Dictionary))._new();
- _st(_st(_st(_st(self)._receiver())._class())._allInstanceVariableNames())._do_((function(each){
- return smalltalk.withContext(function($ctx2) {
return _st(all)._at_put_(each,_st(_st(self)._receiver())._instVarAt_(each));
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
- _st(_st(self["@selectedContext"])._locals())._keysAndValuesDo_((function(key,value){
- return smalltalk.withContext(function($ctx2) {
return _st(all)._at_put_(key,value);
- }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
- $1=all;
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"allVariables",{all:all}, smalltalk.Debugger)})},
- args: [],
- source: "allVariables\x0a\x09| all |\x0a\x09all := Dictionary new.\x0a\x0a\x09self receiver class allInstanceVariableNames do: [:each |\x0a\x09\x09all at: each put: (self receiver instVarAt: each) ].\x0a \x0a selectedContext locals keysAndValuesDo: [ :key :value |\x0a \x09all at: key put: value ].\x0a \x0a ^ all",
- messageSends: ["new", "do:", "at:put:", "instVarAt:", "receiver", "allInstanceVariableNames", "class", "keysAndValuesDo:", "locals"],
- referencedClasses: ["Dictionary"]
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_canBeClosed",
- smalltalk.method({
- selector: "canBeClosed",
- category: 'testing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
return true;
- }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{}, smalltalk.Debugger)})},
- args: [],
- source: "canBeClosed\x0a ^true",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_error",
- smalltalk.method({
- selector: "error",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@error"];
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"error",{}, smalltalk.Debugger)})},
- args: [],
- source: "error\x0a\x09^error",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_error_",
- smalltalk.method({
- selector: "error:",
- category: 'accessing',
- fn: function (anError){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@error"]=anError;
- return self}, function($ctx1) {$ctx1.fill(self,"error:",{anError:anError}, smalltalk.Debugger)})},
- args: ["anError"],
- source: "error: anError\x0a\x09error := anError",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_initialize",
- smalltalk.method({
- selector: "initialize",
- category: 'initialization',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
- _st(self["@unsavedChanges"]).__eq(false);
- return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.Debugger)})},
- args: [],
- source: "initialize\x0a\x09super initialize.\x0a\x09unsavedChanges = false",
- messageSends: ["initialize", "="],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_inspectSelectedVariable",
- smalltalk.method({
- selector: "inspectSelectedVariable",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self["@selectedVariable"])._inspect();
- return self}, function($ctx1) {$ctx1.fill(self,"inspectSelectedVariable",{}, smalltalk.Debugger)})},
- args: [],
- source: "inspectSelectedVariable\x0a\x09selectedVariable inspect",
- messageSends: ["inspect"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_label",
- smalltalk.method({
- selector: "label",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
return "[Debugger]";
- }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.Debugger)})},
- args: [],
- source: "label\x0a\x09^'[Debugger]'",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_method",
- smalltalk.method({
- selector: "method",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(self["@selectedContext"])._method();
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"method",{}, smalltalk.Debugger)})},
- args: [],
- source: "method\x0a\x09^selectedContext method",
- messageSends: ["method"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_proceed",
- smalltalk.method({
- selector: "proceed",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self)._close();
- _st(_st(self["@selectedContext"])._receiver())._perform_withArguments_(_st(self["@selectedContext"])._selector(),_st(self["@selectedContext"])._temps());
- return self}, function($ctx1) {$ctx1.fill(self,"proceed",{}, smalltalk.Debugger)})},
- args: [],
- source: "proceed\x0a\x09self close.\x0a\x09selectedContext receiver perform: selectedContext selector withArguments: selectedContext temps",
- messageSends: ["close", "perform:withArguments:", "selector", "temps", "receiver"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_receiver",
- smalltalk.method({
- selector: "receiver",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(self["@selectedContext"])._receiver();
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"receiver",{}, smalltalk.Debugger)})},
- args: [],
- source: "receiver\x0a\x09^selectedContext receiver",
- messageSends: ["receiver"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_renderBottomPanelOn_",
- smalltalk.method({
- selector: "renderBottomPanelOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=_st(html)._div();
- _st($1)._class_("amber_sourceCode debugger");
- $2=_st($1)._with_((function(){
- return smalltalk.withContext(function($ctx2) {
self["@sourceArea"]=_st((smalltalk.SourceArea || SourceArea))._new();
- self["@sourceArea"];
- return _st(self["@sourceArea"])._renderOn_(html);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- self["@ul2"]=_st(_st(html)._ul())._class_("amber_column debugger variables");
- self["@inspector"]=_st(_st(html)._div())._class_("amber_column debugger inspector");
- _st(self["@sourceArea"])._onKeyUp_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(self)._updateStatus();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html}, smalltalk.Debugger)})},
- args: ["html"],
- 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]",
- messageSends: ["class:", "div", "with:", "new", "renderOn:", "ul", "onKeyUp:", "updateStatus"],
- referencedClasses: ["SourceArea"]
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_renderBoxOn_",
- smalltalk.method({
- selector: "renderBoxOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=self;
- _st($1)._renderTopPanelOn_(html);
- $2=_st($1)._renderBottomPanelOn_(html);
- return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.Debugger)})},
- args: ["html"],
- source: "renderBoxOn: html\x0a self \x0a\x09renderTopPanelOn: html;\x0a\x09renderBottomPanelOn: html",
- messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_renderButtonsOn_",
- smalltalk.method({
- selector: "renderButtonsOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16;
- $1=_st(html)._button();
- _st($1)._with_("Save");
- $2=_st($1)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(self)._save();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- self["@saveButton"]=$2;
- $3=_st(html)._button();
- _st($3)._with_("DoIt");
- $4=_st($3)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(self["@sourceArea"])._doIt();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- $5=_st(html)._button();
- _st($5)._with_("PrintIt");
- $6=_st($5)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(self["@sourceArea"])._printIt();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- $7=_st(html)._button();
- _st($7)._with_("InspectIt");
- $8=_st($7)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(self["@sourceArea"])._inspectIt();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- $9=_st(html)._button();
- _st($9)._with_("Proceed");
- $10=_st($9)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(self)._proceed();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- $11=_st(html)._button();
- _st($11)._with_("Abandon");
- $12=_st($11)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(self)._close();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- $13=_st(html)._button();
- _st($13)._class_("amber_button debugger inspect");
- _st($13)._with_("Inspect");
- $14=_st($13)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(self)._inspectSelectedVariable();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- self["@inspectButton"]=$14;
- $15=self;
- _st($15)._updateSourceArea();
- _st($15)._updateStatus();
- _st($15)._updateVariablesList();
- $16=_st($15)._updateInspector();
- return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.Debugger)})},
- args: ["html"],
- source: "renderButtonsOn: html\x0a\x09saveButton := html button\x0a\x09\x09with: 'Save';\x0a\x09\x09onClick: [self save].\x0a\x09html button\x0a\x09\x09with: 'DoIt';\x0a\x09\x09onClick: [sourceArea doIt].\x0a\x09html button\x0a\x09\x09with: 'PrintIt';\x0a\x09\x09onClick: [sourceArea printIt].\x0a\x09html button\x0a\x09\x09with: 'InspectIt';\x0a\x09\x09onClick: [sourceArea inspectIt].\x0a\x09html button \x0a\x09\x09with: 'Proceed';\x0a\x09\x09onClick: [self proceed].\x0a\x09html button\x0a\x09\x09with: 'Abandon';\x0a\x09\x09onClick: [self close].\x0a\x09inspectButton := html button\x0a\x09\x09class: 'amber_button debugger inspect';\x0a\x09\x09with: 'Inspect';\x0a\x09\x09onClick: [self inspectSelectedVariable].\x0a\x09 self \x0a\x09\x09updateSourceArea;\x0a\x09\x09updateStatus;\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateInspector",
- messageSends: ["with:", "button", "onClick:", "save", "doIt", "printIt", "inspectIt", "proceed", "close", "class:", "inspectSelectedVariable", "updateSourceArea", "updateStatus", "updateVariablesList", "updateInspector"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_renderContext_on_",
- smalltalk.method({
- selector: "renderContext:on:",
- category: 'rendering',
- fn: function (aContext,html){
- var self=this;
- var li;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
- li=_st(html)._li();
- $1=_st(self["@selectedContext"]).__eq(aContext);
- if(smalltalk.assert($1)){
- _st(li)._class_("selected");
- };
- $2=li;
- _st($2)._with_(_st(aContext)._asString());
- $3=_st($2)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(self)._selectContext_(aContext);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- $4=_st(aContext)._outerContext();
- if(($receiver = $4) == nil || $receiver == undefined){
- $4;
- } else {
- _st(self)._renderContext_on_(_st(aContext)._outerContext(),html);
- };
- return self}, function($ctx1) {$ctx1.fill(self,"renderContext:on:",{aContext:aContext,html:html,li:li}, smalltalk.Debugger)})},
- args: ["aContext", "html"],
- 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]",
- messageSends: ["li", "ifTrue:", "class:", "=", "with:", "asString", "onClick:", "selectContext:", "ifNotNil:", "renderContext:on:", "outerContext"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_renderTopPanelOn_",
- smalltalk.method({
- selector: "renderTopPanelOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$4,$5,$6,$2;
- self["@selectedContext"]=_st(_st(self)._error())._context();
- $1=_st(html)._div();
- _st($1)._class_("top");
- $2=_st($1)._with_((function(){
- return smalltalk.withContext(function($ctx2) {
$3=_st(html)._div();
- _st($3)._class_("label");
- $4=_st($3)._with_(_st(_st(self)._error())._messageText());
- $4;
- $5=_st(html)._ul();
- _st($5)._class_("amber_column debugger contexts");
- $6=_st($5)._with_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._renderContext_on_(_st(_st(self)._error())._context(),html);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- self["@ul"]=$6;
- return self["@ul"];
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html}, smalltalk.Debugger)})},
- args: ["html"],
- 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]]",
- messageSends: ["context", "error", "class:", "div", "with:", "messageText", "ul", "renderContext:on:"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_save",
- smalltalk.method({
- selector: "save",
- category: 'actions',
- fn: function (){
- var self=this;
- var protocol;
- return smalltalk.withContext(function($ctx1) {
protocol=_st(_st(_st(_st(_st(self["@selectedContext"])._receiver())._class())._methodDictionary())._at_(_st(self["@selectedContext"])._selector()))._category();
- _st(_st(_st(self["@selectedContext"])._receiver())._class())._compile_category_(_st(self["@sourceArea"])._val(),protocol);
- _st(self)._updateStatus();
- return self}, function($ctx1) {$ctx1.fill(self,"save",{protocol:protocol}, smalltalk.Debugger)})},
- args: [],
- 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",
- messageSends: ["category", "at:", "selector", "methodDictionary", "class", "receiver", "compile:category:", "val", "updateStatus"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_selectContext_",
- smalltalk.method({
- selector: "selectContext:",
- category: 'actions',
- fn: function (aContext){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- self["@selectedContext"]=aContext;
- self["@selectedVariable"]=nil;
- self["@selectedVariableName"]=nil;
- $1=self;
- _st($1)._updateContextsList();
- _st($1)._updateSourceArea();
- _st($1)._updateInspector();
- _st($1)._updateVariablesList();
- $2=_st($1)._updateStatus();
- return self}, function($ctx1) {$ctx1.fill(self,"selectContext:",{aContext:aContext}, smalltalk.Debugger)})},
- args: ["aContext"],
- 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",
- messageSends: ["updateContextsList", "updateSourceArea", "updateInspector", "updateVariablesList", "updateStatus"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_selectVariable_named_",
- smalltalk.method({
- selector: "selectVariable:named:",
- category: 'actions',
- fn: function (anObject,aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@selectedVariable"]=anObject;
- self["@selectedVariableName"]=aString;
- _st(self["@inspector"])._contents_((function(html){
- return smalltalk.withContext(function($ctx2) {
return _st(html)._with_(_st(anObject)._printString());
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
- _st(self)._updateVariablesList();
- return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:named:",{anObject:anObject,aString:aString}, smalltalk.Debugger)})},
- args: ["anObject", "aString"],
- source: "selectVariable: anObject named: aString\x0a \x0a\x09selectedVariable := anObject.\x0a\x09selectedVariableName := aString.\x0a\x09inspector contents: [:html | html with: anObject printString].\x0a\x09self updateVariablesList",
- messageSends: ["contents:", "with:", "printString", "updateVariablesList"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_source",
- smalltalk.method({
- selector: "source",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$1;
- $2=_st(self)._method();
- if(($receiver = $2) == nil || $receiver == undefined){
- $1="Method doesn't exist!";
- } else {
- $1=_st(_st(self)._method())._source();
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"source",{}, smalltalk.Debugger)})},
- args: [],
- source: "source\x0a\x09^self method \x0a\x09\x09ifNil: ['Method doesn''t exist!']\x0a\x09\x09ifNotNil: [self method source]",
- messageSends: ["ifNil:ifNotNil:", "source", "method"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_updateContextsList",
- smalltalk.method({
- selector: "updateContextsList",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self["@ul"])._contents_((function(html){
- return smalltalk.withContext(function($ctx2) {
return _st(self)._renderContext_on_(_st(_st(self)._error())._context(),html);
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"updateContextsList",{}, smalltalk.Debugger)})},
- args: [],
- source: "updateContextsList\x0a\x09ul contents: [:html |\x0a\x09\x09self renderContext: self error context on: html]",
- messageSends: ["contents:", "renderContext:on:", "context", "error"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_updateInspector",
- smalltalk.method({
- selector: "updateInspector",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self["@inspector"])._contents_((function(html){
- return smalltalk.withContext(function($ctx2) {
}, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"updateInspector",{}, smalltalk.Debugger)})},
- args: [],
- source: "updateInspector\x0a\x09inspector contents: [:html |]",
- messageSends: ["contents:"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_updateSourceArea",
- smalltalk.method({
- selector: "updateSourceArea",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self["@sourceArea"])._val_(_st(self)._source());
- return self}, function($ctx1) {$ctx1.fill(self,"updateSourceArea",{}, smalltalk.Debugger)})},
- args: [],
- source: "updateSourceArea\x0a\x09 sourceArea val: self source",
- messageSends: ["val:", "source"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_updateStatus",
- smalltalk.method({
- selector: "updateStatus",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$2,$5,$4;
- $1=_st(_st(self["@sourceArea"])._val()).__eq(_st(self)._source());
- $2=(function(){
- return smalltalk.withContext(function($ctx2) {
$3=self["@saveButton"];
- if(($receiver = $3) == nil || $receiver == undefined){
- $3;
- } else {
- _st(self["@saveButton"])._at_put_("disabled",true);
- };
- self["@unsavedChanges"]=false;
- return self["@unsavedChanges"];
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
- $4=(function(){
- return smalltalk.withContext(function($ctx2) {
$5=self["@saveButton"];
- if(($receiver = $5) == nil || $receiver == undefined){
- $5;
- } else {
- _st(self["@saveButton"])._removeAt_("disabled");
- };
- self["@unsavedChanges"]=true;
- return self["@unsavedChanges"];
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
- _st($1)._ifTrue_ifFalse_($2,$4);
- return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{}, smalltalk.Debugger)})},
- args: [],
- 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]",
- messageSends: ["ifTrue:ifFalse:", "ifNotNil:", "at:put:", "removeAt:", "=", "source", "val"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_updateVariablesList",
- smalltalk.method({
- selector: "updateVariablesList",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$4,$5,$6,$8,$9,$10,$7,$2,$11;
- $1=self["@ul2"];
- $2=(function(html){
- var li;
- return smalltalk.withContext(function($ctx2) {
$3=_st(html)._li();
- _st($3)._with_("self");
- $4=_st($3)._onClick_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._selectVariable_named_(_st(self)._receiver(),"self");
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- li=$4;
- li;
- $5=_st(self["@selectedVariableName"]).__eq("self");
- if(smalltalk.assert($5)){
- _st(li)._class_("selected");
- };
- $6=_st(self)._allVariables();
- $7=(function(key,value){
- return smalltalk.withContext(function($ctx3) {
$8=_st(html)._li();
- _st($8)._with_(key);
- $9=_st($8)._onClick_((function(){
- return smalltalk.withContext(function($ctx4) {
return _st(self)._selectVariable_named_(value,key);
- }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
- li=$9;
- li;
- $10=_st(self["@selectedVariableName"]).__eq(key);
- if(smalltalk.assert($10)){
- return _st(li)._class_("selected");
- };
- }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx1)})});
- return _st($6)._keysAndValuesDo_($7);
- }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1)})});
- _st($1)._contents_($2);
- $11=self["@selectedVariable"];
- if(($receiver = $11) == nil || $receiver == undefined){
- _st(self["@inspectButton"])._at_put_("disabled",true);
- } else {
- _st(self["@inspectButton"])._removeAt_("disabled");
- };
- return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{}, smalltalk.Debugger)})},
- args: [],
- source: "updateVariablesList\x0a\x09ul2 contents: [ :html | | li |\x0a\x09\x09li := html li \x0a\x09\x09\x09with: 'self';\x0a\x09\x09\x09onClick: [ self selectVariable: self receiver named: 'self' ].\x0a selectedVariableName = 'self' ifTrue: [ li class: 'selected' ].\x0a \x0a self allVariables keysAndValuesDo: [:key :value |\x0a li := html li \x0a\x09\x09\x09\x09\x09\x09\x09with: key;\x0a\x09\x09\x09\x09\x09\x09\x09onClick: [ self selectVariable: value named: key ].\x0a selectedVariableName = key ifTrue: [\x0a\x09\x09\x09\x09\x09\x09\x09li class: 'selected' ] ] ].\x0a \x0a\x09selectedVariable \x0a \x09ifNil: [ inspectButton at: 'disabled' put: true ] \x0a ifNotNil: [ inspectButton removeAt: 'disabled' ]",
- messageSends: ["contents:", "with:", "li", "onClick:", "selectVariable:named:", "receiver", "ifTrue:", "class:", "=", "keysAndValuesDo:", "allVariables", "ifNil:ifNotNil:", "at:put:", "removeAt:"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addClass('IDETranscript', smalltalk.TabWidget, ['textarea'], 'IDE');
- smalltalk.addMethod(
- "_clear",
- smalltalk.method({
- selector: "clear",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st(self["@textarea"])._asJQuery())._val_("");
- return self}, function($ctx1) {$ctx1.fill(self,"clear",{}, smalltalk.IDETranscript)})},
- args: [],
- source: "clear\x0a textarea asJQuery val: ''",
- messageSends: ["val:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.IDETranscript);
- smalltalk.addMethod(
- "_cr",
- smalltalk.method({
- selector: "cr",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st(self["@textarea"])._asJQuery())._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st((smalltalk.String || String))._cr()));
- return self}, function($ctx1) {$ctx1.fill(self,"cr",{}, smalltalk.IDETranscript)})},
- args: [],
- source: "cr\x0a textarea asJQuery val: textarea asJQuery val, String cr.",
- messageSends: ["val:", ",", "cr", "val", "asJQuery"],
- referencedClasses: ["String"]
- }),
- smalltalk.IDETranscript);
- smalltalk.addMethod(
- "_label",
- smalltalk.method({
- selector: "label",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
return "Transcript";
- }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.IDETranscript)})},
- args: [],
- source: "label\x0a ^'Transcript'",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.IDETranscript);
- smalltalk.addMethod(
- "_open",
- smalltalk.method({
- selector: "open",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=_st((smalltalk.TabManager || TabManager))._current();
- _st($1)._open();
- $2=_st($1)._selectTab_(self);
- return self}, function($ctx1) {$ctx1.fill(self,"open",{}, smalltalk.IDETranscript)})},
- args: [],
- source: "open\x0a TabManager current \x0a\x09open;\x0a\x09selectTab: self",
- messageSends: ["open", "current", "selectTab:"],
- referencedClasses: ["TabManager"]
- }),
- smalltalk.IDETranscript);
- smalltalk.addMethod(
- "_renderBoxOn_",
- smalltalk.method({
- selector: "renderBoxOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- self["@textarea"]=_st(html)._textarea();
- $1=self["@textarea"];
- _st($1)._class_("amber_transcript");
- $2=_st($1)._at_put_("spellcheck","false");
- return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.IDETranscript)})},
- args: ["html"],
- source: "renderBoxOn: html\x0a textarea := html textarea.\x0a textarea \x0a\x09class: 'amber_transcript';\x0a\x09at: 'spellcheck' put: 'false'",
- messageSends: ["textarea", "class:", "at:put:"],
- referencedClasses: []
- }),
- smalltalk.IDETranscript);
- smalltalk.addMethod(
- "_renderButtonsOn_",
- smalltalk.method({
- selector: "renderButtonsOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=_st(html)._button();
- _st($1)._with_("Clear transcript");
- $2=_st($1)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(self)._clear();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.IDETranscript)})},
- args: ["html"],
- source: "renderButtonsOn: html\x0a html button\x0a\x09with: 'Clear transcript';\x0a\x09onClick: [self clear]",
- messageSends: ["with:", "button", "onClick:", "clear"],
- referencedClasses: []
- }),
- smalltalk.IDETranscript);
- smalltalk.addMethod(
- "_show_",
- smalltalk.method({
- selector: "show:",
- category: 'actions',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@textarea"];
- if(($receiver = $1) == nil || $receiver == undefined){
- _st(self)._open();
- } else {
- $1;
- };
- _st(_st(self["@textarea"])._asJQuery())._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st(anObject)._asString()));
- return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject}, smalltalk.IDETranscript)})},
- args: ["anObject"],
- source: "show: anObject\x0a textarea ifNil: [self open].\x0a textarea asJQuery val: textarea asJQuery val, anObject asString.",
- messageSends: ["ifNil:", "open", "val:", ",", "asString", "val", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.IDETranscript);
- smalltalk.IDETranscript.klass.iVarNames = ['current'];
- smalltalk.addMethod(
- "_current",
- smalltalk.method({
- selector: "current",
- category: 'instance creation',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$1;
- $2=self["@current"];
- if(($receiver = $2) == nil || $receiver == undefined){
- self["@current"]=smalltalk.TabWidget.klass.fn.prototype._new.apply(_st(self), []);
- $1=self["@current"];
- } else {
- $1=$2;
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.IDETranscript.klass)})},
- args: [],
- source: "current\x0a\x09^current ifNil: [current := super new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: []
- }),
- smalltalk.IDETranscript.klass);
- smalltalk.addMethod(
- "_initialize",
- smalltalk.method({
- selector: "initialize",
- category: 'initialization',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st((smalltalk.Transcript || Transcript))._register_(_st(self)._current());
- return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.IDETranscript.klass)})},
- args: [],
- source: "initialize\x0a\x09Transcript register: self current",
- messageSends: ["register:", "current"],
- referencedClasses: ["Transcript"]
- }),
- smalltalk.IDETranscript.klass);
- smalltalk.addMethod(
- "_new",
- smalltalk.method({
- selector: "new",
- category: 'instance creation',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self)._shouldNotImplement();
- return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.IDETranscript.klass)})},
- args: [],
- source: "new\x0a self shouldNotImplement",
- messageSends: ["shouldNotImplement"],
- referencedClasses: []
- }),
- smalltalk.IDETranscript.klass);
- smalltalk.addMethod(
- "_open",
- smalltalk.method({
- selector: "open",
- category: 'instance creation',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=_st((smalltalk.TabManager || TabManager))._current();
- _st($1)._open();
- $2=_st($1)._selectTab_(_st(self)._current());
- return self}, function($ctx1) {$ctx1.fill(self,"open",{}, smalltalk.IDETranscript.klass)})},
- args: [],
- source: "open\x0a TabManager current \x0a\x09open;\x0a\x09selectTab: self current",
- messageSends: ["open", "current", "selectTab:"],
- referencedClasses: ["TabManager"]
- }),
- smalltalk.IDETranscript.klass);
- smalltalk.addClass('Inspector', smalltalk.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
- smalltalk.addMethod(
- "_canBeClosed",
- smalltalk.method({
- selector: "canBeClosed",
- category: 'testing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
return true;
- }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{}, smalltalk.Inspector)})},
- args: [],
- source: "canBeClosed\x0a\x09^true",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_dive",
- smalltalk.method({
- selector: "dive",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(_st(_st(self)._variables())._at_(_st(self)._selectedVariable()))._inspect();
- return self}, function($ctx1) {$ctx1.fill(self,"dive",{}, smalltalk.Inspector)})},
- args: [],
- source: "dive\x0a\x09(self variables at: self selectedVariable) inspect",
- messageSends: ["inspect", "at:", "selectedVariable", "variables"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_inspect_",
- smalltalk.method({
- selector: "inspect:",
- category: 'actions',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@object"]=anObject;
- self["@variables"]=[];
- _st(self["@object"])._inspectOn_(self);
- return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject}, smalltalk.Inspector)})},
- args: ["anObject"],
- source: "inspect: anObject\x0a\x09object := anObject.\x0a\x09variables := #().\x0a\x09object inspectOn: self",
- messageSends: ["inspectOn:"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_label",
- smalltalk.method({
- selector: "label",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$1;
- $2=self["@label"];
- if(($receiver = $2) == nil || $receiver == undefined){
- $1="Inspector (nil)";
- } else {
- $1=$2;
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.Inspector)})},
- args: [],
- source: "label\x0a\x09^label ifNil: ['Inspector (nil)']",
- messageSends: ["ifNil:"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_refresh",
- smalltalk.method({
- selector: "refresh",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=self;
- _st($1)._inspect_(self["@object"]);
- _st($1)._updateVariablesList();
- $2=_st($1)._updateValueTextarea();
- return self}, function($ctx1) {$ctx1.fill(self,"refresh",{}, smalltalk.Inspector)})},
- args: [],
- source: "refresh\x0a\x09self \x0a\x09\x09inspect: object; \x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea",
- messageSends: ["inspect:", "updateVariablesList", "updateValueTextarea"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_renderBottomPanelOn_",
- smalltalk.method({
- selector: "renderBottomPanelOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$4,$2;
- $1=_st(html)._div();
- _st($1)._class_("amber_sourceCode");
- $2=_st($1)._with_((function(){
- return smalltalk.withContext(function($ctx2) {
$3=_st((smalltalk.SourceArea || SourceArea))._new();
- _st($3)._receiver_(self["@object"]);
- _st($3)._onDoIt_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._refresh();
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $4=_st($3)._yourself();
- self["@sourceArea"]=$4;
- self["@sourceArea"];
- return _st(self["@sourceArea"])._renderOn_(html);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html}, smalltalk.Inspector)})},
- args: ["html"],
- source: "renderBottomPanelOn: html\x0a html div\x0a\x09class: 'amber_sourceCode';\x0a\x09with: [\x0a\x09 sourceArea := SourceArea new\x0a\x09\x09receiver: object;\x0a\x09\x09onDoIt: [self refresh];\x0a\x09\x09yourself.\x0a sourceArea renderOn: html]",
- messageSends: ["class:", "div", "with:", "receiver:", "new", "onDoIt:", "refresh", "yourself", "renderOn:"],
- referencedClasses: ["SourceArea"]
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_renderBoxOn_",
- smalltalk.method({
- selector: "renderBoxOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=self;
- _st($1)._renderTopPanelOn_(html);
- $2=_st($1)._renderBottomPanelOn_(html);
- return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.Inspector)})},
- args: ["html"],
- source: "renderBoxOn: html\x0a\x09self \x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
- messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_renderButtonsOn_",
- smalltalk.method({
- selector: "renderButtonsOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4,$5,$6;
- $1=_st(html)._button();
- _st($1)._with_("DoIt");
- $2=_st($1)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(_st(self)._sourceArea())._doIt();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- $3=_st(html)._button();
- _st($3)._with_("PrintIt");
- $4=_st($3)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(_st(self)._sourceArea())._printIt();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- $5=_st(html)._button();
- _st($5)._with_("InspectIt");
- $6=_st($5)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(_st(self)._sourceArea())._inspectIt();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- _st(self)._updateButtons();
- return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.Inspector)})},
- args: ["html"],
- 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",
- messageSends: ["with:", "button", "onClick:", "doIt", "sourceArea", "printIt", "inspectIt", "updateButtons"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_renderTopPanelOn_",
- smalltalk.method({
- selector: "renderTopPanelOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$4,$5,$7,$8,$9,$10,$6,$2,$11,$12;
- $1=_st(html)._div();
- _st($1)._class_("top");
- $2=_st($1)._with_((function(){
- return smalltalk.withContext(function($ctx2) {
self["@variablesList"]=_st(_st(html)._ul())._class_("amber_column variables");
- self["@variablesList"];
- $3=_st(html)._textarea();
- _st($3)._class_("amber_column value");
- $4=_st($3)._at_put_("readonly","readonly");
- self["@valueTextarea"]=$4;
- self["@valueTextarea"];
- $5=_st(html)._div();
- _st($5)._class_("amber_tabs inspector");
- $6=_st($5)._with_((function(){
- return smalltalk.withContext(function($ctx3) {
$7=_st(html)._button();
- _st($7)._class_("amber_button inspector refresh");
- _st($7)._with_("Refresh");
- $8=_st($7)._onClick_((function(){
- return smalltalk.withContext(function($ctx4) {
return _st(self)._refresh();
- }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
- $8;
- $9=_st(html)._button();
- _st($9)._class_("amber_button inspector dive");
- _st($9)._with_("Dive");
- $10=_st($9)._onClick_((function(){
- return smalltalk.withContext(function($ctx4) {
return _st(self)._dive();
- }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
- self["@diveButton"]=$10;
- return self["@diveButton"];
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $6;
- return _st(_st(html)._div())._class_("amber_clear");
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- $11=self;
- _st($11)._updateVariablesList();
- $12=_st($11)._updateValueTextarea();
- return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html}, smalltalk.Inspector)})},
- args: ["html"],
- 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.",
- messageSends: ["class:", "div", "with:", "ul", "textarea", "at:put:", "button", "onClick:", "refresh", "dive", "updateVariablesList", "updateValueTextarea"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_selectVariable_",
- smalltalk.method({
- selector: "selectVariable:",
- category: 'updating',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- _st(self)._selectedVariable_(aString);
- $1=self;
- _st($1)._updateVariablesList();
- _st($1)._updateValueTextarea();
- $2=_st($1)._updateButtons();
- return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:",{aString:aString}, smalltalk.Inspector)})},
- args: ["aString"],
- source: "selectVariable: aString\x0a\x09self selectedVariable: aString.\x0a\x09self \x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea;\x0a\x09\x09updateButtons",
- messageSends: ["selectedVariable:", "updateVariablesList", "updateValueTextarea", "updateButtons"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_selectedVariable",
- smalltalk.method({
- selector: "selectedVariable",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@selectedVariable"];
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"selectedVariable",{}, smalltalk.Inspector)})},
- args: [],
- source: "selectedVariable\x0a\x09^selectedVariable",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_selectedVariable_",
- smalltalk.method({
- selector: "selectedVariable:",
- category: 'accessing',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@selectedVariable"]=aString;
- return self}, function($ctx1) {$ctx1.fill(self,"selectedVariable:",{aString:aString}, smalltalk.Inspector)})},
- args: ["aString"],
- source: "selectedVariable: aString\x0a\x09selectedVariable := aString",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_setLabel_",
- smalltalk.method({
- selector: "setLabel:",
- category: 'accessing',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@label"]=aString;
- return self}, function($ctx1) {$ctx1.fill(self,"setLabel:",{aString:aString}, smalltalk.Inspector)})},
- args: ["aString"],
- source: "setLabel: aString\x0a\x09label := aString",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_setVariables_",
- smalltalk.method({
- selector: "setVariables:",
- category: 'accessing',
- fn: function (aCollection){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@variables"]=aCollection;
- return self}, function($ctx1) {$ctx1.fill(self,"setVariables:",{aCollection:aCollection}, smalltalk.Inspector)})},
- args: ["aCollection"],
- source: "setVariables: aCollection\x0a\x09variables := aCollection",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_sourceArea",
- smalltalk.method({
- selector: "sourceArea",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@sourceArea"];
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"sourceArea",{}, smalltalk.Inspector)})},
- args: [],
- source: "sourceArea\x0a\x09^sourceArea",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_updateButtons",
- smalltalk.method({
- selector: "updateButtons",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(_st(_st(self)._selectedVariable())._notNil())._and_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(_st(_st(self)._variables())._at_(_st(self)._selectedVariable()))._notNil();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- if(smalltalk.assert($1)){
- _st(self["@diveButton"])._removeAt_("disabled");
- } else {
- _st(self["@diveButton"])._at_put_("disabled",true);
- };
- return self}, function($ctx1) {$ctx1.fill(self,"updateButtons",{}, smalltalk.Inspector)})},
- args: [],
- 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']",
- messageSends: ["ifFalse:ifTrue:", "at:put:", "removeAt:", "and:", "notNil", "at:", "selectedVariable", "variables"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_updateValueTextarea",
- smalltalk.method({
- selector: "updateValueTextarea",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$2;
- $1=_st(self["@valueTextarea"])._asJQuery();
- $3=_st(_st(self)._selectedVariable())._isNil();
- if(smalltalk.assert($3)){
- $2="";
- } else {
- $2=_st(_st(_st(self)._variables())._at_(_st(self)._selectedVariable()))._printString();
- };
- _st($1)._val_($2);
- return self}, function($ctx1) {$ctx1.fill(self,"updateValueTextarea",{}, smalltalk.Inspector)})},
- args: [],
- source: "updateValueTextarea\x0a\x09valueTextarea asJQuery val: (self selectedVariable isNil\x0a\x09\x09ifTrue: ['']\x0a\x09\x09ifFalse: [(self variables at: self selectedVariable) printString])",
- messageSends: ["val:", "ifTrue:ifFalse:", "printString", "at:", "selectedVariable", "variables", "isNil", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_updateVariablesList",
- smalltalk.method({
- selector: "updateVariablesList",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$5,$6,$7,$4,$2;
- $1=self["@variablesList"];
- $2=(function(html){
- return smalltalk.withContext(function($ctx2) {
$3=_st(_st(self)._variables())._keys();
- $4=(function(each){
- var li;
- return smalltalk.withContext(function($ctx3) {
li=_st(html)._li();
- li;
- $5=li;
- _st($5)._with_(each);
- $6=_st($5)._onClick_((function(){
- return smalltalk.withContext(function($ctx4) {
return _st(self)._selectVariable_(each);
- }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
- $6;
- $7=_st(_st(self)._selectedVariable()).__eq(each);
- if(smalltalk.assert($7)){
- return _st(li)._class_("selected");
- };
- }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})});
- return _st($3)._do_($4);
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})});
- _st($1)._contents_($2);
- return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{}, smalltalk.Inspector)})},
- args: [],
- 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']]]",
- messageSends: ["contents:", "do:", "li", "with:", "onClick:", "selectVariable:", "ifTrue:", "class:", "=", "selectedVariable", "keys", "variables"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_variables",
- smalltalk.method({
- selector: "variables",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@variables"];
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"variables",{}, smalltalk.Inspector)})},
- args: [],
- source: "variables\x0a\x09^variables",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_on_",
- smalltalk.method({
- selector: "on:",
- category: 'instance creation',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$3,$1;
- $2=_st(self)._new();
- _st($2)._inspect_(anObject);
- $3=_st($2)._yourself();
- $1=$3;
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject}, smalltalk.Inspector.klass)})},
- args: ["anObject"],
- source: "on: anObject\x0a\x09^self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09yourself",
- messageSends: ["inspect:", "new", "yourself"],
- referencedClasses: []
- }),
- smalltalk.Inspector.klass);
- smalltalk.addClass('ProgressBar', smalltalk.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
- smalltalk.addMethod(
- "_percent",
- smalltalk.method({
- selector: "percent",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$1;
- $2=self["@percent"];
- if(($receiver = $2) == nil || $receiver == undefined){
- $1=(0);
- } else {
- $1=$2;
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"percent",{}, smalltalk.ProgressBar)})},
- args: [],
- source: "percent\x0a\x09^percent ifNil: [0]",
- messageSends: ["ifNil:"],
- referencedClasses: []
- }),
- smalltalk.ProgressBar);
- smalltalk.addMethod(
- "_percent_",
- smalltalk.method({
- selector: "percent:",
- category: 'accessing',
- fn: function (aNumber){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@percent"]=aNumber;
- return self}, function($ctx1) {$ctx1.fill(self,"percent:",{aNumber:aNumber}, smalltalk.ProgressBar)})},
- args: ["aNumber"],
- source: "percent: aNumber\x0a\x09percent := aNumber",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ProgressBar);
- smalltalk.addMethod(
- "_renderOn_",
- smalltalk.method({
- selector: "renderOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=_st(html)._div();
- _st($1)._class_("progress_bar");
- $2=_st($1)._yourself();
- self["@div"]=$2;
- _st(self)._renderProgressBar();
- return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html}, smalltalk.ProgressBar)})},
- args: ["html"],
- source: "renderOn: html \x0a\x09div := html div \x0a\x09\x09class: 'progress_bar';\x0a\x09\x09yourself.\x0a\x09self renderProgressBar",
- messageSends: ["class:", "div", "yourself", "renderProgressBar"],
- referencedClasses: []
- }),
- smalltalk.ProgressBar);
- smalltalk.addMethod(
- "_renderProgressBar",
- smalltalk.method({
- selector: "renderProgressBar",
- category: 'rendering',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- _st(self["@div"])._contents_((function(html){
- return smalltalk.withContext(function($ctx2) {
$1=_st(html)._div();
- _st($1)._class_("progress");
- $2=_st($1)._style_(_st(_st("width:").__comma(_st(_st(self)._percent())._asString())).__comma("%"));
- return $2;
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"renderProgressBar",{}, smalltalk.ProgressBar)})},
- args: [],
- source: "renderProgressBar\x0a\x09div contents: [:html |\x0a\x09\x09html div \x0a\x09\x09\x09class: 'progress';\x0a\x09\x09\x09style: 'width:', self percent asString, '%']",
- messageSends: ["contents:", "class:", "div", "style:", ",", "asString", "percent"],
- referencedClasses: []
- }),
- smalltalk.ProgressBar);
- smalltalk.addMethod(
- "_updatePercent_",
- smalltalk.method({
- selector: "updatePercent:",
- category: 'updating',
- fn: function (aNumber){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self)._percent_(aNumber);
- _st(self)._renderProgressBar();
- return self}, function($ctx1) {$ctx1.fill(self,"updatePercent:",{aNumber:aNumber}, smalltalk.ProgressBar)})},
- args: ["aNumber"],
- source: "updatePercent: aNumber\x0a\x09self percent: aNumber.\x0a\x09self renderProgressBar",
- messageSends: ["percent:", "renderProgressBar"],
- referencedClasses: []
- }),
- smalltalk.ProgressBar);
- smalltalk.addClass('ReferencesBrowser', smalltalk.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
- smalltalk.addMethod(
- "_canBeClosed",
- smalltalk.method({
- selector: "canBeClosed",
- category: 'testing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
return true;
- }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{}, smalltalk.ReferencesBrowser)})},
- args: [],
- source: "canBeClosed\x0a\x09^true",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_classesAndMetaclasses",
- smalltalk.method({
- selector: "classesAndMetaclasses",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes()).__comma(_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes())._collect_((function(each){
- return smalltalk.withContext(function($ctx2) {
return _st(each)._class();
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})));
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{}, smalltalk.ReferencesBrowser)})},
- args: [],
- source: "classesAndMetaclasses\x0a\x09^Smalltalk current classes, (Smalltalk current classes collect: [:each | each class])",
- messageSends: [",", "collect:", "class", "classes", "current"],
- referencedClasses: ["Smalltalk"]
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_implementors",
- smalltalk.method({
- selector: "implementors",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$1;
- $2=self["@implementors"];
- if(($receiver = $2) == nil || $receiver == undefined){
- self["@implementors"]=_st((smalltalk.Array || Array))._new();
- $1=self["@implementors"];
- } else {
- $1=$2;
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"implementors",{}, smalltalk.ReferencesBrowser)})},
- args: [],
- source: "implementors\x0a\x09^implementors ifNil: [implementors := Array new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: ["Array"]
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_initialize",
- smalltalk.method({
- selector: "initialize",
- category: 'initialization',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
- self["@selector"]="";
- return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.ReferencesBrowser)})},
- args: [],
- source: "initialize\x0a\x09super initialize.\x0a\x09selector := ''",
- messageSends: ["initialize"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_label",
- smalltalk.method({
- selector: "label",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
return "[References]";
- }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.ReferencesBrowser)})},
- args: [],
- source: "label\x0a\x09^'[References]'",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_matches",
- smalltalk.method({
- selector: "matches",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$1;
- $2=self["@matches"];
- if(($receiver = $2) == nil || $receiver == undefined){
- self["@matches"]=_st((smalltalk.Array || Array))._new();
- $1=self["@matches"];
- } else {
- $1=$2;
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"matches",{}, smalltalk.ReferencesBrowser)})},
- args: [],
- source: "matches\x0a\x09^matches ifNil: [matches := Array new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: ["Array"]
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_openBrowserOn_",
- smalltalk.method({
- selector: "openBrowserOn:",
- category: 'actions',
- fn: function (aMethod){
- var self=this;
- var browser;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$2,$4,$5,$6;
- $1=(smalltalk.Browser || Browser);
- $3=_st(_st(aMethod)._methodClass())._isMetaclass();
- if(smalltalk.assert($3)){
- $2=_st(_st(aMethod)._methodClass())._instanceClass();
- } else {
- $2=_st(aMethod)._methodClass();
- };
- browser=_st($1)._openOn_($2);
- $4=_st(_st(aMethod)._methodClass())._isMetaclass();
- if(smalltalk.assert($4)){
- _st(browser)._selectTab_(smalltalk.symbolFor("class"));
- };
- $5=browser;
- _st($5)._selectProtocol_(_st(aMethod)._category());
- $6=_st($5)._selectMethod_(aMethod);
- return self}, function($ctx1) {$ctx1.fill(self,"openBrowserOn:",{aMethod:aMethod,browser:browser}, smalltalk.ReferencesBrowser)})},
- args: ["aMethod"],
- source: "openBrowserOn: aMethod\x0a | browser |\x0a browser := Browser openOn: (aMethod methodClass isMetaclass \x0a\x09\x09ifTrue: [aMethod methodClass instanceClass] ifFalse: [aMethod methodClass]).\x0a aMethod methodClass isMetaclass ifTrue: [browser selectTab: #class].\x0a browser\x0a selectProtocol: aMethod category;\x0a selectMethod: aMethod",
- messageSends: ["openOn:", "ifTrue:ifFalse:", "instanceClass", "methodClass", "isMetaclass", "ifTrue:", "selectTab:", "selectProtocol:", "category", "selectMethod:"],
- referencedClasses: ["Browser"]
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_referencedClasses",
- smalltalk.method({
- selector: "referencedClasses",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$1;
- $2=self["@referencedClasses"];
- if(($receiver = $2) == nil || $receiver == undefined){
- self["@referencedClasses"]=_st((smalltalk.Array || Array))._new();
- $1=self["@referencedClasses"];
- } else {
- $1=$2;
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"referencedClasses",{}, smalltalk.ReferencesBrowser)})},
- args: [],
- source: "referencedClasses\x0a\x09^referencedClasses ifNil: [referencedClasses := Array new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: ["Array"]
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_renderBoxOn_",
- smalltalk.method({
- selector: "renderBoxOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=self;
- _st($1)._renderInputOn_(html);
- _st($1)._renderImplementorsOn_(html);
- _st($1)._renderSendersOn_(html);
- _st($1)._renderReferencedClassesOn_(html);
- $2=_st($1)._renderMatchesOn_(html);
- return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.ReferencesBrowser)})},
- args: ["html"],
- 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",
- messageSends: ["renderInputOn:", "renderImplementorsOn:", "renderSendersOn:", "renderReferencedClassesOn:", "renderMatchesOn:"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_renderImplementorsOn_",
- smalltalk.method({
- selector: "renderImplementorsOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@implementorsList"]=_st(_st(html)._ul())._class_("amber_column implementors");
- _st(self)._updateImplementorsList();
- return self}, function($ctx1) {$ctx1.fill(self,"renderImplementorsOn:",{html:html}, smalltalk.ReferencesBrowser)})},
- args: ["html"],
- source: "renderImplementorsOn: html\x0a\x09implementorsList := html ul class: 'amber_column implementors'.\x0a\x09self updateImplementorsList",
- messageSends: ["class:", "ul", "updateImplementorsList"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_renderInputOn_",
- smalltalk.method({
- selector: "renderInputOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=_st(html)._input();
- _st($1)._class_("implementors");
- $2=_st($1)._yourself();
- self["@input"]=$2;
- _st(_st(self["@input"])._asJQuery())._val_(self["@selector"]);
- _st(self)._setInputEvents();
- return self}, function($ctx1) {$ctx1.fill(self,"renderInputOn:",{html:html}, smalltalk.ReferencesBrowser)})},
- args: ["html"],
- source: "renderInputOn: html\x0a\x09input := html input \x0a\x09\x09class: 'implementors';\x0a\x09\x09yourself.\x0a\x09input asJQuery val: selector.\x0a\x09self setInputEvents",
- messageSends: ["class:", "input", "yourself", "val:", "asJQuery", "setInputEvents"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_renderMatchesOn_",
- smalltalk.method({
- selector: "renderMatchesOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@matchesList"]=_st(_st(html)._ul())._class_("amber_column matches");
- _st(self)._updateMatchesList();
- return self}, function($ctx1) {$ctx1.fill(self,"renderMatchesOn:",{html:html}, smalltalk.ReferencesBrowser)})},
- args: ["html"],
- source: "renderMatchesOn: html\x0a\x09matchesList := html ul class: 'amber_column matches'.\x0a\x09self updateMatchesList",
- messageSends: ["class:", "ul", "updateMatchesList"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_renderReferencedClassesOn_",
- smalltalk.method({
- selector: "renderReferencedClassesOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@referencedClassesList"]=_st(_st(html)._ul())._class_("amber_column referenced_classes");
- _st(self)._updateReferencedClassesList();
- return self}, function($ctx1) {$ctx1.fill(self,"renderReferencedClassesOn:",{html:html}, smalltalk.ReferencesBrowser)})},
- args: ["html"],
- source: "renderReferencedClassesOn: html\x0a\x09referencedClassesList := html ul class: 'amber_column referenced_classes'.\x0a\x09self updateReferencedClassesList",
- messageSends: ["class:", "ul", "updateReferencedClassesList"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_renderSendersOn_",
- smalltalk.method({
- selector: "renderSendersOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@sendersList"]=_st(_st(html)._ul())._class_("amber_column senders");
- _st(self)._updateSendersList();
- return self}, function($ctx1) {$ctx1.fill(self,"renderSendersOn:",{html:html}, smalltalk.ReferencesBrowser)})},
- args: ["html"],
- source: "renderSendersOn: html\x0a\x09sendersList := html ul class: 'amber_column senders'.\x0a\x09self updateSendersList",
- messageSends: ["class:", "ul", "updateSendersList"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_search_",
- smalltalk.method({
- selector: "search:",
- category: 'actions',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=self;
- _st($1)._searchReferencesFor_(aString);
- _st($1)._updateImplementorsList();
- _st($1)._updateSendersList();
- _st($1)._updateReferencedClassesList();
- $2=_st($1)._updateMatchesList();
- return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString}, smalltalk.ReferencesBrowser)})},
- args: ["aString"],
- source: "search: aString\x0a\x09self \x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09updateImplementorsList;\x0a\x09\x09updateSendersList;\x0a\x09\x09updateReferencedClassesList;\x0a\x09\x09updateMatchesList",
- messageSends: ["searchReferencesFor:", "updateImplementorsList", "updateSendersList", "updateReferencedClassesList", "updateMatchesList"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_searchMethodSource",
- smalltalk.method({
- selector: "searchMethodSource",
- category: 'actions',
- fn: function (){
- var self=this;
- var regex;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$5,$4,$2;
- regex=_st(self["@selector"])._allButFirst();
- $1=_st(self)._classesAndMetaclasses();
- $2=(function(each){
- return smalltalk.withContext(function($ctx2) {
$3=_st(_st(each)._methodDictionary())._values();
- $4=(function(value){
- return smalltalk.withContext(function($ctx3) {
$5=_st(_st(value)._source())._match_(regex);
- if(smalltalk.assert($5)){
- return _st(_st(self)._matches())._add_(value);
- };
- }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx1)})});
- return _st($3)._do_($4);
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
- _st($1)._do_($2);
- return self}, function($ctx1) {$ctx1.fill(self,"searchMethodSource",{regex:regex}, smalltalk.ReferencesBrowser)})},
- args: [],
- 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]]]",
- messageSends: ["allButFirst", "do:", "ifTrue:", "add:", "matches", "match:", "source", "values", "methodDictionary", "classesAndMetaclasses"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_searchReferencedClasses",
- smalltalk.method({
- selector: "searchReferencedClasses",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$5,$4,$2;
- $1=_st(self)._classesAndMetaclasses();
- $2=(function(each){
- return smalltalk.withContext(function($ctx2) {
$3=_st(_st(each)._methodDictionary())._values();
- $4=(function(value){
- return smalltalk.withContext(function($ctx3) {
$5=_st(_st(value)._referencedClasses())._includes_(self["@selector"]);
- if(smalltalk.assert($5)){
- return _st(_st(self)._referencedClasses())._add_(value);
- };
- }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx1)})});
- return _st($3)._do_($4);
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
- _st($1)._do_($2);
- return self}, function($ctx1) {$ctx1.fill(self,"searchReferencedClasses",{}, smalltalk.ReferencesBrowser)})},
- args: [],
- 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]]]",
- messageSends: ["do:", "ifTrue:", "add:", "referencedClasses", "includes:", "values", "methodDictionary", "classesAndMetaclasses"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_searchReferencesFor_",
- smalltalk.method({
- selector: "searchReferencesFor:",
- category: 'actions',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- self["@selector"]=aString;
- self["@implementors"]=_st((smalltalk.Array || Array))._new();
- self["@senders"]=_st((smalltalk.Array || Array))._new();
- self["@referencedClasses"]=_st((smalltalk.Array || Array))._new();
- self["@matches"]=_st((smalltalk.Array || Array))._new();
- _st(self)._searchMethodSource();
- $1=_st(self["@selector"])._match_("^[A-Z]");
- if(smalltalk.assert($1)){
- _st(self)._searchReferencedClasses();
- } else {
- _st(self)._searchSelectorReferences();
- };
- return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesFor:",{aString:aString}, smalltalk.ReferencesBrowser)})},
- args: ["aString"],
- 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]",
- messageSends: ["new", "searchMethodSource", "ifFalse:ifTrue:", "searchSelectorReferences", "searchReferencedClasses", "match:"],
- referencedClasses: ["Array"]
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_searchSelectorReferences",
- smalltalk.method({
- selector: "searchSelectorReferences",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$5,$6,$4,$2;
- $1=_st(self)._classesAndMetaclasses();
- $2=(function(each){
- return smalltalk.withContext(function($ctx2) {
$3=_st(each)._methodDictionary();
- $4=(function(key,value){
- return smalltalk.withContext(function($ctx3) {
$5=_st(key).__eq(self["@selector"]);
- if(smalltalk.assert($5)){
- _st(_st(self)._implementors())._add_(value);
- };
- $6=_st(_st(value)._messageSends())._includes_(self["@selector"]);
- if(smalltalk.assert($6)){
- return _st(_st(self)._senders())._add_(value);
- };
- }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx1)})});
- return _st($3)._keysAndValuesDo_($4);
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
- _st($1)._do_($2);
- return self}, function($ctx1) {$ctx1.fill(self,"searchSelectorReferences",{}, smalltalk.ReferencesBrowser)})},
- args: [],
- 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]]]",
- messageSends: ["do:", "keysAndValuesDo:", "ifTrue:", "add:", "implementors", "=", "senders", "includes:", "messageSends", "methodDictionary", "classesAndMetaclasses"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_selector",
- smalltalk.method({
- selector: "selector",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@selector"];
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"selector",{}, smalltalk.ReferencesBrowser)})},
- args: [],
- source: "selector\x0a\x09^selector",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_senders",
- smalltalk.method({
- selector: "senders",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$1;
- $2=self["@senders"];
- if(($receiver = $2) == nil || $receiver == undefined){
- self["@senders"]=_st((smalltalk.Array || Array))._new();
- $1=self["@senders"];
- } else {
- $1=$2;
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"senders",{}, smalltalk.ReferencesBrowser)})},
- args: [],
- source: "senders\x0a\x09^senders ifNil: [senders := Array new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: ["Array"]
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_setInputEvents",
- smalltalk.method({
- selector: "setInputEvents",
- category: 'private',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$5,$4,$2;
- $1=self["@input"];
- _st($1)._onKeyUp_((function(){
- return smalltalk.withContext(function($ctx2) {
self["@timer"]=_st((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._search_(_st(_st(self["@input"])._asJQuery())._val());
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithTimeout_((100));
- return self["@timer"];
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- $3=$1;
- $4=(function(){
- return smalltalk.withContext(function($ctx2) {
$5=self["@timer"];
- if(($receiver = $5) == nil || $receiver == undefined){
- return $5;
- } else {
- return _st(self["@timer"])._clearTimeout();
- };
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
- $2=_st($3)._onKeyDown_($4);
- return self}, function($ctx1) {$ctx1.fill(self,"setInputEvents",{}, smalltalk.ReferencesBrowser)})},
- args: [],
- source: "setInputEvents\x0a\x09input\x0a\x09\x09onKeyUp: [timer := [self search: input asJQuery val] valueWithTimeout: 100];\x0a\x09\x09onKeyDown: [timer ifNotNil: [timer clearTimeout]]",
- messageSends: ["onKeyUp:", "valueWithTimeout:", "search:", "val", "asJQuery", "onKeyDown:", "ifNotNil:", "clearTimeout"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_updateImplementorsList",
- smalltalk.method({
- selector: "updateImplementorsList",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
- _st(self["@implementorsList"])._contents_((function(html){
- return smalltalk.withContext(function($ctx2) {
$1=_st(html)._li();
- _st($1)._class_("column_label");
- _st($1)._with_(_st(_st("Implementors (").__comma(_st(_st(_st(self)._implementors())._size())._asString())).__comma(")"));
- $2=_st($1)._style_("font-weight: bold");
- $2;
- return _st(_st(self)._implementors())._do_((function(each){
- var li;
- return smalltalk.withContext(function($ctx3) {
li=_st(html)._li();
- li;
- $3=li;
- _st($3)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(self)._selector()));
- $4=_st($3)._onClick_((function(){
- return smalltalk.withContext(function($ctx4) {
return _st(self)._openBrowserOn_(each);
- }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
- return $4;
- }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})}));
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"updateImplementorsList",{}, smalltalk.ReferencesBrowser)})},
- args: [],
- source: "updateImplementorsList\x0a implementorsList contents: [:html |\x0a\x09html li\x0a\x09\x09class: 'column_label'; \x0a\x09\x09with: 'Implementors (', self implementors size asString, ')';\x0a\x09\x09style: 'font-weight: bold'.\x0a\x09self implementors do: [:each || li |\x0a\x09 li := html li.\x0a\x09 li\x0a\x09\x09with: (each methodClass asString, ' >> ', self selector);\x0a\x09\x09onClick: [self openBrowserOn: each]]]",
- messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "implementors", "style:", "do:", "selector", "methodClass", "onClick:", "openBrowserOn:"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_updateMatchesList",
- smalltalk.method({
- selector: "updateMatchesList",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
- _st(self["@matchesList"])._contents_((function(html){
- return smalltalk.withContext(function($ctx2) {
$1=_st(html)._li();
- _st($1)._class_("column_label");
- _st($1)._with_(_st(_st("Regex matches (").__comma(_st(_st(_st(self)._matches())._size())._asString())).__comma(")"));
- $2=_st($1)._style_("font-weight: bold");
- $2;
- return _st(_st(self)._matches())._do_((function(each){
- var li;
- return smalltalk.withContext(function($ctx3) {
li=_st(html)._li();
- li;
- $3=li;
- _st($3)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector()));
- $4=_st($3)._onClick_((function(){
- return smalltalk.withContext(function($ctx4) {
return _st(self)._openBrowserOn_(each);
- }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
- return $4;
- }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})}));
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"updateMatchesList",{}, smalltalk.ReferencesBrowser)})},
- args: [],
- source: "updateMatchesList\x0a matchesList contents: [:html |\x0a\x09html li\x0a\x09\x09class: 'column_label'; \x0a\x09\x09with: 'Regex matches (', self matches size asString, ')';\x0a\x09\x09style: 'font-weight: bold'.\x0a\x09self matches do: [:each || li |\x0a\x09 li := html li.\x0a\x09 li\x0a\x09\x09with: (each methodClass asString, ' >> ', each selector);\x0a\x09\x09onClick: [self openBrowserOn: each]]]",
- messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "matches", "style:", "do:", "selector", "methodClass", "onClick:", "openBrowserOn:"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_updateReferencedClassesList",
- smalltalk.method({
- selector: "updateReferencedClassesList",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
- _st(self["@referencedClassesList"])._contents_((function(html){
- return smalltalk.withContext(function($ctx2) {
$1=_st(html)._li();
- _st($1)._class_("column_label");
- _st($1)._with_(_st(_st("Class references (").__comma(_st(_st(_st(self)._referencedClasses())._size())._asString())).__comma(")"));
- $2=_st($1)._style_("font-weight: bold");
- $2;
- return _st(_st(self)._referencedClasses())._do_((function(each){
- return smalltalk.withContext(function($ctx3) {
$3=_st(html)._li();
- _st($3)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector()));
- $4=_st($3)._onClick_((function(){
- return smalltalk.withContext(function($ctx4) {
return _st(self)._openBrowserOn_(each);
- }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
- return $4;
- }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"updateReferencedClassesList",{}, smalltalk.ReferencesBrowser)})},
- args: [],
- 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]]]",
- messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "referencedClasses", "style:", "do:", "selector", "methodClass", "onClick:", "openBrowserOn:"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_updateSendersList",
- smalltalk.method({
- selector: "updateSendersList",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
- _st(self["@sendersList"])._contents_((function(html){
- return smalltalk.withContext(function($ctx2) {
$1=_st(html)._li();
- _st($1)._class_("column_label");
- _st($1)._with_(_st(_st("Senders (").__comma(_st(_st(_st(self)._senders())._size())._asString())).__comma(")"));
- $2=_st($1)._style_("font-weight: bold");
- $2;
- return _st(_st(self)._senders())._do_((function(each){
- return smalltalk.withContext(function($ctx3) {
$3=_st(html)._li();
- _st($3)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector()));
- $4=_st($3)._onClick_((function(){
- return smalltalk.withContext(function($ctx4) {
return _st(self)._openBrowserOn_(each);
- }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
- return $4;
- }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"updateSendersList",{}, smalltalk.ReferencesBrowser)})},
- args: [],
- 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]]]",
- messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "senders", "style:", "do:", "selector", "methodClass", "onClick:", "openBrowserOn:"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_search_",
- smalltalk.method({
- selector: "search:",
- category: 'instance creation',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$3,$1;
- $2=_st(self)._new();
- _st($2)._searchReferencesFor_(aString);
- $3=_st($2)._open();
- $1=$3;
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString}, smalltalk.ReferencesBrowser.klass)})},
- args: ["aString"],
- source: "search: aString\x0a\x09^self new\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09open",
- messageSends: ["searchReferencesFor:", "new", "open"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser.klass);
- smalltalk.addClass('TestRunner', smalltalk.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
- smalltalk.addMethod(
- "_allClasses",
- smalltalk.method({
- selector: "allClasses",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(_st((smalltalk.TestCase || TestCase))._allSubclasses())._select_((function(each){
- return smalltalk.withContext(function($ctx2) {
return _st(_st(each)._isAbstract())._not();
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"allClasses",{}, smalltalk.TestRunner)})},
- args: [],
- source: "allClasses\x0a\x09^TestCase allSubclasses select: [ :each | each isAbstract not ]",
- messageSends: ["select:", "not", "isAbstract", "allSubclasses"],
- referencedClasses: ["TestCase"]
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_classes",
- smalltalk.method({
- selector: "classes",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(_st(_st(self)._allClasses())._select_((function(each){
- return smalltalk.withContext(function($ctx2) {
return _st(_st(self)._selectedCategories())._includes_(_st(each)._category());
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._sort_((function(a,b){
- return smalltalk.withContext(function($ctx2) {
return _st(_st(a)._name()).__gt(_st(b)._name());
- }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"classes",{}, smalltalk.TestRunner)})},
- args: [],
- source: "classes\x0a ^(self allClasses \x0a\x09select: [:each | self selectedCategories includes: each category])\x0a\x09sort: [:a :b | a name > b name]",
- messageSends: ["sort:", ">", "name", "select:", "includes:", "category", "selectedCategories", "allClasses"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_initialize",
- smalltalk.method({
- selector: "initialize",
- category: 'initialization',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
- self["@result"]=_st((smalltalk.TestResult || TestResult))._new();
- return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.TestRunner)})},
- args: [],
- source: "initialize\x0a\x09super initialize.\x0a\x09result := TestResult new",
- messageSends: ["initialize", "new"],
- referencedClasses: ["TestResult"]
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_isSelectedCategory_",
- smalltalk.method({
- selector: "isSelectedCategory:",
- category: 'testing',
- fn: function (aCategory){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(_st(self)._selectedCategories())._includes_(aCategory);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"isSelectedCategory:",{aCategory:aCategory}, smalltalk.TestRunner)})},
- args: ["aCategory"],
- source: "isSelectedCategory: aCategory\x0a\x09^(self selectedCategories includes: aCategory)",
- messageSends: ["includes:", "selectedCategories"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_isSelectedClass_",
- smalltalk.method({
- selector: "isSelectedClass:",
- category: 'testing',
- fn: function (aClass){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(_st(self)._selectedClasses())._includes_(aClass);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"isSelectedClass:",{aClass:aClass}, smalltalk.TestRunner)})},
- args: ["aClass"],
- source: "isSelectedClass: aClass\x0a\x09^(self selectedClasses includes: aClass)",
- messageSends: ["includes:", "selectedClasses"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_label",
- smalltalk.method({
- selector: "label",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
return "SUnit";
- }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.TestRunner)})},
- args: [],
- source: "label\x0a ^'SUnit'",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_packages",
- smalltalk.method({
- selector: "packages",
- category: 'accessing',
- fn: function (){
- var self=this;
- var packages;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$2,$4;
- packages=_st((smalltalk.Array || Array))._new();
- $1=_st(self)._allClasses();
- $2=(function(each){
- return smalltalk.withContext(function($ctx2) {
$3=_st(packages)._includes_(_st(each)._category());
- if(! smalltalk.assert($3)){
- return _st(packages)._add_(_st(each)._category());
- };
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
- _st($1)._do_($2);
- $4=_st(packages)._sort();
- return $4;
- }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages}, smalltalk.TestRunner)})},
- args: [],
- source: "packages\x0a | packages |\x0a packages := Array new.\x0a self allClasses do: [:each |\x0a\x09(packages includes: each category) ifFalse: [\x0a\x09 packages add: each category]].\x0a ^packages sort",
- messageSends: ["new", "do:", "ifFalse:", "add:", "category", "includes:", "allClasses", "sort"],
- referencedClasses: ["Array"]
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_performFailure_",
- smalltalk.method({
- selector: "performFailure:",
- category: 'actions',
- fn: function (aTestCase){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(aTestCase)._runCase();
- return self}, function($ctx1) {$ctx1.fill(self,"performFailure:",{aTestCase:aTestCase}, smalltalk.TestRunner)})},
- args: ["aTestCase"],
- source: "performFailure: aTestCase\x0a\x09aTestCase runCase",
- messageSends: ["runCase"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_printErrors",
- smalltalk.method({
- selector: "printErrors",
- category: 'printing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(_st(_st(_st(_st(self)._result())._errors())._size())._asString()).__comma(" errors, ");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"printErrors",{}, smalltalk.TestRunner)})},
- args: [],
- source: "printErrors\x0a\x09^self result errors size asString , ' errors, '",
- messageSends: [",", "asString", "size", "errors", "result"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_printFailures",
- smalltalk.method({
- selector: "printFailures",
- category: 'printing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(_st(_st(_st(_st(self)._result())._failures())._size())._asString()).__comma(" failures");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"printFailures",{}, smalltalk.TestRunner)})},
- args: [],
- source: "printFailures\x0a\x09^self result failures size asString, ' failures'",
- messageSends: [",", "asString", "size", "failures", "result"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_printPasses",
- smalltalk.method({
- selector: "printPasses",
- category: 'printing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $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, ");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"printPasses",{}, smalltalk.TestRunner)})},
- args: [],
- source: "printPasses\x0a\x09^(self result runs - self result errors size - self result failures size) asString , ' passes, '",
- messageSends: [",", "asString", "-", "size", "failures", "result", "errors", "runs"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_printTotal",
- smalltalk.method({
- selector: "printTotal",
- category: 'printing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(_st(_st(_st(self)._result())._total())._asString()).__comma(" runs, ");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"printTotal",{}, smalltalk.TestRunner)})},
- args: [],
- source: "printTotal\x0a\x09^self result total asString, ' runs, '",
- messageSends: [",", "asString", "total", "result"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_progressBar",
- smalltalk.method({
- selector: "progressBar",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$1;
- $2=self["@progressBar"];
- if(($receiver = $2) == nil || $receiver == undefined){
- self["@progressBar"]=_st((smalltalk.ProgressBar || ProgressBar))._new();
- $1=self["@progressBar"];
- } else {
- $1=$2;
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"progressBar",{}, smalltalk.TestRunner)})},
- args: [],
- source: "progressBar\x0a\x09^progressBar ifNil: [progressBar := ProgressBar new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: ["ProgressBar"]
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_renderBoxOn_",
- smalltalk.method({
- selector: "renderBoxOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=self;
- _st($1)._renderCategoriesOn_(html);
- _st($1)._renderClassesOn_(html);
- $2=_st($1)._renderResultsOn_(html);
- return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.TestRunner)})},
- args: ["html"],
- source: "renderBoxOn: html\x0a self \x0a\x09renderCategoriesOn: html;\x0a\x09renderClassesOn: html;\x0a\x09renderResultsOn: html",
- messageSends: ["renderCategoriesOn:", "renderClassesOn:", "renderResultsOn:"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_renderButtonsOn_",
- smalltalk.method({
- selector: "renderButtonsOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=_st(html)._button();
- _st($1)._with_("Run selected");
- $2=_st($1)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(self)._run_(_st(self)._testCases());
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.TestRunner)})},
- args: ["html"],
- source: "renderButtonsOn: html\x0a html button\x0a\x09with: 'Run selected';\x0a\x09onClick: [self run: self testCases]",
- messageSends: ["with:", "button", "onClick:", "run:", "testCases"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_renderCategoriesOn_",
- smalltalk.method({
- selector: "renderCategoriesOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@packagesList"]=_st(_st(html)._ul())._class_("amber_column sunit packages");
- _st(self)._updateCategoriesList();
- return self}, function($ctx1) {$ctx1.fill(self,"renderCategoriesOn:",{html:html}, smalltalk.TestRunner)})},
- args: ["html"],
- source: "renderCategoriesOn: html\x0a\x09packagesList := html ul class: 'amber_column sunit packages'.\x0a\x09self updateCategoriesList",
- messageSends: ["class:", "ul", "updateCategoriesList"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_renderClassesOn_",
- smalltalk.method({
- selector: "renderClassesOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@classesList"]=_st(_st(html)._ul())._class_("amber_column sunit classes");
- _st(self)._updateClassesList();
- return self}, function($ctx1) {$ctx1.fill(self,"renderClassesOn:",{html:html}, smalltalk.TestRunner)})},
- args: ["html"],
- source: "renderClassesOn: html\x0a\x09classesList := html ul class: 'amber_column sunit classes'.\x0a\x09self updateClassesList",
- messageSends: ["class:", "ul", "updateClassesList"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_renderErrorsOn_",
- smalltalk.method({
- selector: "renderErrorsOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- _st(_st(_st(self)._result())._errors())._do_((function(each){
- return smalltalk.withContext(function($ctx2) {
$1=_st(html)._li();
- _st($1)._class_("errors");
- _st($1)._with_(_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector()));
- $2=_st($1)._onClick_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._performFailure_(each);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- return $2;
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"renderErrorsOn:",{html:html}, smalltalk.TestRunner)})},
- args: ["html"],
- source: "renderErrorsOn: html\x0a\x09self result errors do: [:each |\x0a\x09\x09html li \x0a\x09\x09\x09class: 'errors';\x0a\x09\x09\x09with: each class name, ' >> ', each selector;\x0a onClick: [self performFailure: each]]",
- messageSends: ["do:", "class:", "li", "with:", ",", "selector", "name", "class", "onClick:", "performFailure:", "errors", "result"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_renderFailuresOn_",
- smalltalk.method({
- selector: "renderFailuresOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- _st(_st(_st(self)._result())._failures())._do_((function(each){
- return smalltalk.withContext(function($ctx2) {
$1=_st(html)._li();
- _st($1)._class_("failures");
- _st($1)._with_(_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector()));
- $2=_st($1)._onClick_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._performFailure_(each);
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- return $2;
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"renderFailuresOn:",{html:html}, smalltalk.TestRunner)})},
- args: ["html"],
- source: "renderFailuresOn: html\x0a\x09self result failures do: [:each |\x0a\x09\x09html li \x0a\x09\x09\x09class: 'failures';\x0a\x09\x09\x09with: each class name, ' >> ', each selector;\x0a onClick: [self performFailure: each]]",
- messageSends: ["do:", "class:", "li", "with:", ",", "selector", "name", "class", "onClick:", "performFailure:", "failures", "result"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_renderResultsOn_",
- smalltalk.method({
- selector: "renderResultsOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@statusDiv"]=_st(html)._div();
- _st(html)._with_(_st(self)._progressBar());
- self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column sunit results");
- _st(self)._updateMethodsList();
- _st(self)._updateStatusDiv();
- return self}, function($ctx1) {$ctx1.fill(self,"renderResultsOn:",{html:html}, smalltalk.TestRunner)})},
- args: ["html"],
- 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",
- messageSends: ["div", "with:", "progressBar", "class:", "ul", "updateMethodsList", "updateStatusDiv"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_result",
- smalltalk.method({
- selector: "result",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=self["@result"];
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"result",{}, smalltalk.TestRunner)})},
- args: [],
- source: "result\x0a\x09^result",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_run_",
- smalltalk.method({
- selector: "run:",
- category: 'actions',
- fn: function (aCollection){
- var self=this;
- var worker;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$4,$3;
- worker=_st((smalltalk.TestSuiteRunner || TestSuiteRunner))._on_(aCollection);
- self["@result"]=_st(worker)._result();
- $1=_st(worker)._announcer();
- $2=(smalltalk.ResultAnnouncement || ResultAnnouncement);
- $3=(function(ann){
- return smalltalk.withContext(function($ctx2) {
$4=_st(_st(ann)._result()).__eq_eq(self["@result"]);
- if(smalltalk.assert($4)){
- _st(_st(self)._progressBar())._updatePercent_(_st(_st(_st(self["@result"])._runs()).__slash(_st(self["@result"])._total())).__star((100)));
- _st(self)._updateStatusDiv();
- return _st(self)._updateMethodsList();
- };
- }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})});
- _st($1)._on_do_($2,$3);
- _st(worker)._run();
- return self}, function($ctx1) {$ctx1.fill(self,"run:",{aCollection:aCollection,worker:worker}, smalltalk.TestRunner)})},
- args: ["aCollection"],
- source: "run: aCollection\x0a| worker |\x0a\x09worker := TestSuiteRunner on: aCollection.\x0a\x09result := worker result.\x0a worker announcer on: ResultAnnouncement do: [:ann |\x0a \x09ann result == result ifTrue: [\x0a\x09\x09\x09self progressBar updatePercent: result runs / result total * 100.\x0a\x09\x09\x09self updateStatusDiv.\x0a\x09\x09\x09self updateMethodsList\x0a \x09\x09]\x0a\x09].\x0a\x09worker run",
- messageSends: ["on:", "result", "on:do:", "ifTrue:", "updatePercent:", "*", "/", "total", "runs", "progressBar", "updateStatusDiv", "updateMethodsList", "==", "announcer", "run"],
- referencedClasses: ["TestSuiteRunner", "ResultAnnouncement"]
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_selectAllCategories",
- smalltalk.method({
- selector: "selectAllCategories",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$2,$4,$5;
- $1=_st(self)._packages();
- $2=(function(each){
- return smalltalk.withContext(function($ctx2) {
$3=_st(self["@selectedCategories"])._includes_(each);
- if(! smalltalk.assert($3)){
- return _st(_st(self)._selectedCategories())._add_(each);
- };
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
- _st($1)._do_($2);
- $4=self;
- _st($4)._updateCategoriesList();
- $5=_st($4)._updateClassesList();
- return self}, function($ctx1) {$ctx1.fill(self,"selectAllCategories",{}, smalltalk.TestRunner)})},
- args: [],
- source: "selectAllCategories\x0a\x09self packages do: [:each | \x0a\x09\x09(selectedCategories includes: each) ifFalse: [\x0a\x09\x09\x09self selectedCategories add: each]].\x0a\x09self \x0a\x09 updateCategoriesList;\x0a\x09 updateClassesList",
- messageSends: ["do:", "ifFalse:", "add:", "selectedCategories", "includes:", "packages", "updateCategoriesList", "updateClassesList"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_selectAllClasses",
- smalltalk.method({
- selector: "selectAllClasses",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$2,$4,$5;
- $1=_st(self)._classes();
- $2=(function(each){
- return smalltalk.withContext(function($ctx2) {
$3=_st(self["@selectedClasses"])._includes_(each);
- if(! smalltalk.assert($3)){
- return _st(_st(self)._selectedClasses())._add_(each);
- };
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
- _st($1)._do_($2);
- $4=self;
- _st($4)._updateCategoriesList();
- $5=_st($4)._updateClassesList();
- return self}, function($ctx1) {$ctx1.fill(self,"selectAllClasses",{}, smalltalk.TestRunner)})},
- args: [],
- source: "selectAllClasses\x0a\x09self classes do: [:each | \x0a\x09\x09(selectedClasses includes: each) ifFalse: [\x0a\x09\x09\x09self selectedClasses add: each]].\x0a\x09self \x0a\x09 updateCategoriesList;\x0a\x09 updateClassesList",
- messageSends: ["do:", "ifFalse:", "add:", "selectedClasses", "includes:", "classes", "updateCategoriesList", "updateClassesList"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_selectedCategories",
- smalltalk.method({
- selector: "selectedCategories",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$1;
- $2=self["@selectedCategories"];
- if(($receiver = $2) == nil || $receiver == undefined){
- self["@selectedCategories"]=_st((smalltalk.Array || Array))._new();
- $1=self["@selectedCategories"];
- } else {
- $1=$2;
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"selectedCategories",{}, smalltalk.TestRunner)})},
- args: [],
- source: "selectedCategories\x0a\x09^selectedCategories ifNil: [selectedCategories := Array new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: ["Array"]
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_selectedClasses",
- smalltalk.method({
- selector: "selectedClasses",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $2,$1;
- $2=self["@selectedClasses"];
- if(($receiver = $2) == nil || $receiver == undefined){
- self["@selectedClasses"]=_st((smalltalk.Array || Array))._new();
- $1=self["@selectedClasses"];
- } else {
- $1=$2;
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"selectedClasses",{}, smalltalk.TestRunner)})},
- args: [],
- source: "selectedClasses\x0a\x09^selectedClasses ifNil: [selectedClasses := Array new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: ["Array"]
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_statusInfo",
- smalltalk.method({
- selector: "statusInfo",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(_st(_st(_st(self)._printTotal()).__comma(_st(self)._printPasses())).__comma(_st(self)._printErrors())).__comma(_st(self)._printFailures());
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"statusInfo",{}, smalltalk.TestRunner)})},
- args: [],
- source: "statusInfo\x0a\x09^self printTotal, self printPasses, self printErrors, self printFailures",
- messageSends: [",", "printFailures", "printErrors", "printPasses", "printTotal"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_testCases",
- smalltalk.method({
- selector: "testCases",
- category: 'accessing',
- fn: function (){
- var self=this;
- var testCases;
- return smalltalk.withContext(function($ctx1) {
var $1;
- testCases=[];
- _st(_st(_st(self)._selectedClasses())._select_((function(each){
- return smalltalk.withContext(function($ctx2) {
return _st(_st(self)._selectedCategories())._includes_(_st(each)._category());
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._do_((function(each){
- return smalltalk.withContext(function($ctx2) {
return _st(testCases)._addAll_(_st(each)._buildSuite());
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
- $1=testCases;
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"testCases",{testCases:testCases}, smalltalk.TestRunner)})},
- args: [],
- 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",
- messageSends: ["do:", "addAll:", "buildSuite", "select:", "includes:", "category", "selectedCategories", "selectedClasses"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_toggleCategory_",
- smalltalk.method({
- selector: "toggleCategory:",
- category: 'actions',
- fn: function (aCategory){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3;
- $1=_st(self)._isSelectedCategory_(aCategory);
- if(smalltalk.assert($1)){
- _st(self["@selectedCategories"])._remove_(aCategory);
- } else {
- _st(self["@selectedCategories"])._add_(aCategory);
- };
- $2=self;
- _st($2)._updateCategoriesList();
- $3=_st($2)._updateClassesList();
- return self}, function($ctx1) {$ctx1.fill(self,"toggleCategory:",{aCategory:aCategory}, smalltalk.TestRunner)})},
- args: ["aCategory"],
- source: "toggleCategory: aCategory\x0a\x09(self isSelectedCategory: aCategory) \x0a\x09\x09ifFalse: [selectedCategories add: aCategory]\x0a\x09\x09ifTrue: [selectedCategories remove: aCategory].\x0a\x09self \x0a\x09 updateCategoriesList;\x0a\x09 updateClassesList",
- messageSends: ["ifFalse:ifTrue:", "add:", "remove:", "isSelectedCategory:", "updateCategoriesList", "updateClassesList"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_toggleClass_",
- smalltalk.method({
- selector: "toggleClass:",
- category: 'actions',
- fn: function (aClass){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(self)._isSelectedClass_(aClass);
- if(smalltalk.assert($1)){
- _st(self["@selectedClasses"])._remove_(aClass);
- } else {
- _st(self["@selectedClasses"])._add_(aClass);
- };
- _st(self)._updateClassesList();
- return self}, function($ctx1) {$ctx1.fill(self,"toggleClass:",{aClass:aClass}, smalltalk.TestRunner)})},
- args: ["aClass"],
- source: "toggleClass: aClass\x0a\x09(self isSelectedClass: aClass) \x0a\x09\x09ifFalse: [selectedClasses add: aClass]\x0a\x09\x09ifTrue: [selectedClasses remove: aClass].\x0a\x09self \x0a\x09 updateClassesList",
- messageSends: ["ifFalse:ifTrue:", "add:", "remove:", "isSelectedClass:", "updateClassesList"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_updateCategoriesList",
- smalltalk.method({
- selector: "updateCategoriesList",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$4,$5,$7,$8,$9,$6,$2;
- $1=self["@packagesList"];
- $2=(function(html){
- return smalltalk.withContext(function($ctx2) {
$3=_st(html)._li();
- _st($3)._class_("all");
- _st($3)._with_("All");
- $4=_st($3)._onClick_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._selectAllCategories();
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $4;
- $5=_st(self)._packages();
- $6=(function(each){
- var li;
- return smalltalk.withContext(function($ctx3) {
li=_st(html)._li();
- li;
- $7=_st(_st(self)._selectedCategories())._includes_(each);
- if(smalltalk.assert($7)){
- _st(li)._class_("selected");
- };
- $8=li;
- _st($8)._with_(each);
- $9=_st($8)._onClick_((function(){
- return smalltalk.withContext(function($ctx4) {
return _st(self)._toggleCategory_(each);
- }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
- return $9;
- }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})});
- return _st($5)._do_($6);
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})});
- _st($1)._contents_($2);
- return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{}, smalltalk.TestRunner)})},
- args: [],
- source: "updateCategoriesList\x0a packagesList contents: [:html |\x0a\x09 html li \x0a\x09\x09class: 'all';\x0a\x09\x09with: 'All';\x0a\x09\x09onClick: [self selectAllCategories].\x0a\x09self packages do: [:each || li |\x0a\x09 li := html li.\x0a\x09 (self selectedCategories includes: each) ifTrue: [\x0a\x09\x09li class: 'selected'].\x0a\x09 li\x0a\x09\x09with: each;\x0a\x09\x09onClick: [self toggleCategory: each]]]",
- messageSends: ["contents:", "class:", "li", "with:", "onClick:", "selectAllCategories", "do:", "ifTrue:", "includes:", "selectedCategories", "toggleCategory:", "packages"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_updateClassesList",
- smalltalk.method({
- selector: "updateClassesList",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$3,$4,$5,$6,$8,$9,$10,$7,$2;
- $1=self["@classesList"];
- $2=(function(html){
- return smalltalk.withContext(function($ctx2) {
$3=_st(_st(self)._selectedCategories())._isEmpty();
- if(! smalltalk.assert($3)){
- $4=_st(html)._li();
- _st($4)._class_("all");
- _st($4)._with_("All");
- $5=_st($4)._onClick_((function(){
- return smalltalk.withContext(function($ctx3) {
return _st(self)._selectAllClasses();
- }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
- $5;
- };
- $6=_st(self)._classes();
- $7=(function(each){
- var li;
- return smalltalk.withContext(function($ctx3) {
li=_st(html)._li();
- li;
- $8=_st(_st(self)._selectedClasses())._includes_(each);
- if(smalltalk.assert($8)){
- _st(li)._class_("selected");
- };
- $9=li;
- _st($9)._with_(_st(each)._name());
- $10=_st($9)._onClick_((function(){
- return smalltalk.withContext(function($ctx4) {
return _st(self)._toggleClass_(each);
- }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
- return $10;
- }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})});
- return _st($6)._do_($7);
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})});
- _st($1)._contents_($2);
- return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{}, smalltalk.TestRunner)})},
- args: [],
- source: "updateClassesList\x0a classesList contents: [:html |\x0a\x09(self selectedCategories isEmpty) ifFalse: [\x0a\x09\x09html li\x0a\x09\x09\x09class: 'all';\x0a\x09\x09\x09with: 'All';\x0a\x09\x09\x09onClick: [self selectAllClasses]].\x0a\x09self classes do: [:each || li |\x0a\x09\x09li := html li.\x0a\x09\x09(self selectedClasses includes: each) ifTrue: [\x0a\x09\x09\x09li class: 'selected'].\x0a\x09\x09li\x0a\x09\x09\x09with: each name;\x0a\x09\x09\x09onClick: [self toggleClass: each]]]",
- messageSends: ["contents:", "ifFalse:", "class:", "li", "with:", "onClick:", "selectAllClasses", "isEmpty", "selectedCategories", "do:", "ifTrue:", "includes:", "selectedClasses", "name", "toggleClass:", "classes"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_updateMethodsList",
- smalltalk.method({
- selector: "updateMethodsList",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self["@methodsList"])._contents_((function(html){
- return smalltalk.withContext(function($ctx2) {
_st(self)._renderErrorsOn_(html);
- return _st(self)._renderFailuresOn_(html);
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{}, smalltalk.TestRunner)})},
- args: [],
- source: "updateMethodsList\x0a\x09methodsList contents: [:html |\x0a\x09\x09self renderErrorsOn: html.\x0a self renderFailuresOn: html]",
- messageSends: ["contents:", "renderErrorsOn:", "renderFailuresOn:"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_updateStatusDiv",
- smalltalk.method({
- selector: "updateStatusDiv",
- category: 'updating',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self["@statusDiv"])._class_(_st("sunit status ").__comma(_st(self["@result"])._status()));
- _st(self["@statusDiv"])._contents_((function(html){
- return smalltalk.withContext(function($ctx2) {
return _st(_st(html)._span())._with_(_st(self)._statusInfo());
- }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"updateStatusDiv",{}, smalltalk.TestRunner)})},
- args: [],
- source: "updateStatusDiv\x0a\x09statusDiv class: 'sunit status ', result status.\x0a\x09statusDiv contents: [:html |\x0a\x09\x09html span with: self statusInfo]",
- messageSends: ["class:", ",", "status", "contents:", "with:", "statusInfo", "span"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addClass('Workspace', smalltalk.TabWidget, ['sourceArea'], 'IDE');
- smalltalk.addMethod(
- "_clearWorkspace",
- smalltalk.method({
- selector: "clearWorkspace",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self["@sourceArea"])._clear();
- return self}, function($ctx1) {$ctx1.fill(self,"clearWorkspace",{}, smalltalk.Workspace)})},
- args: [],
- source: "clearWorkspace\x0a sourceArea clear",
- messageSends: ["clear"],
- referencedClasses: []
- }),
- smalltalk.Workspace);
- smalltalk.addMethod(
- "_doIt",
- smalltalk.method({
- selector: "doIt",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self["@sourceArea"])._doIt();
- return self}, function($ctx1) {$ctx1.fill(self,"doIt",{}, smalltalk.Workspace)})},
- args: [],
- source: "doIt\x0a sourceArea doIt",
- messageSends: ["doIt"],
- referencedClasses: []
- }),
- smalltalk.Workspace);
- smalltalk.addMethod(
- "_fileIn",
- smalltalk.method({
- selector: "fileIn",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self["@sourceArea"])._fileIn();
- return self}, function($ctx1) {$ctx1.fill(self,"fileIn",{}, smalltalk.Workspace)})},
- args: [],
- source: "fileIn\x0a sourceArea fileIn",
- messageSends: ["fileIn"],
- referencedClasses: []
- }),
- smalltalk.Workspace);
- smalltalk.addMethod(
- "_inspectIt",
- smalltalk.method({
- selector: "inspectIt",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self["@sourceArea"])._inspectIt();
- return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{}, smalltalk.Workspace)})},
- args: [],
- source: "inspectIt\x0a sourceArea inspectIt",
- messageSends: ["inspectIt"],
- referencedClasses: []
- }),
- smalltalk.Workspace);
- smalltalk.addMethod(
- "_label",
- smalltalk.method({
- selector: "label",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
return "Workspace";
- }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.Workspace)})},
- args: [],
- source: "label\x0a ^'Workspace'",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Workspace);
- smalltalk.addMethod(
- "_printIt",
- smalltalk.method({
- selector: "printIt",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self["@sourceArea"])._printIt();
- return self}, function($ctx1) {$ctx1.fill(self,"printIt",{}, smalltalk.Workspace)})},
- args: [],
- source: "printIt\x0a\x09sourceArea printIt",
- messageSends: ["printIt"],
- referencedClasses: []
- }),
- smalltalk.Workspace);
- smalltalk.addMethod(
- "_renderBoxOn_",
- smalltalk.method({
- selector: "renderBoxOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
self["@sourceArea"]=_st((smalltalk.SourceArea || SourceArea))._new();
- _st(self["@sourceArea"])._renderOn_(html);
- return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.Workspace)})},
- args: ["html"],
- source: "renderBoxOn: html\x0a sourceArea := SourceArea new.\x0a sourceArea renderOn: html",
- messageSends: ["new", "renderOn:"],
- referencedClasses: ["SourceArea"]
- }),
- smalltalk.Workspace);
- smalltalk.addMethod(
- "_renderButtonsOn_",
- smalltalk.method({
- selector: "renderButtonsOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10;
- $1=_st(html)._button();
- _st($1)._with_("DoIt");
- _st($1)._title_("ctrl+d");
- $2=_st($1)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(self)._doIt();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- $3=_st(html)._button();
- _st($3)._with_("PrintIt");
- _st($3)._title_("ctrl+p");
- $4=_st($3)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(self)._printIt();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- $5=_st(html)._button();
- _st($5)._with_("InspectIt");
- _st($5)._title_("ctrl+i");
- $6=_st($5)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(self)._inspectIt();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- $7=_st(html)._button();
- _st($7)._with_("FileIn");
- _st($7)._title_("ctrl+f");
- $8=_st($7)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(self)._fileIn();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- $9=_st(html)._button();
- _st($9)._with_("Clear workspace");
- $10=_st($9)._onClick_((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(self)._clearWorkspace();
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.Workspace)})},
- args: ["html"],
- source: "renderButtonsOn: html\x0a html button\x0a\x09with: 'DoIt';\x0a\x09title: 'ctrl+d';\x0a\x09onClick: [self doIt].\x0a html button\x0a\x09with: 'PrintIt';\x0a\x09title: 'ctrl+p';\x0a\x09onClick: [self printIt].\x0a html button\x0a\x09with: 'InspectIt';\x0a\x09title: 'ctrl+i';\x0a\x09onClick: [self inspectIt].\x0a html button\x0a\x09with: 'FileIn';\x0a\x09title: 'ctrl+f';\x0a\x09onClick: [self fileIn].\x0a html button\x0a\x09with: 'Clear workspace';\x0a\x09onClick: [self clearWorkspace]",
- messageSends: ["with:", "button", "title:", "onClick:", "doIt", "printIt", "inspectIt", "fileIn", "clearWorkspace"],
- referencedClasses: []
- }),
- smalltalk.Workspace);
- smalltalk.addMethod(
- "_show",
- smalltalk.method({
- selector: "show",
- category: 'actions',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
smalltalk.TabWidget.fn.prototype._show.apply(_st(self), []);
- _st(self["@sourceArea"])._focus();
- return self}, function($ctx1) {$ctx1.fill(self,"show",{}, smalltalk.Workspace)})},
- args: [],
- source: "show\x0a\x09super show.\x0a\x09sourceArea focus.",
- messageSends: ["show", "focus"],
- referencedClasses: []
- }),
- smalltalk.Workspace);
- smalltalk.addMethod(
- "_inspect",
- smalltalk.method({
- selector: "inspect",
- category: '*IDE',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- $1=_st((smalltalk.Inspector || Inspector))._new();
- _st($1)._inspect_(self);
- $2=_st($1)._open();
- return self}, function($ctx1) {$ctx1.fill(self,"inspect",{}, smalltalk.Object)})},
- args: [],
- source: "inspect\x0a\x09Inspector new \x0a\x09\x09inspect: self;\x0a\x09\x09open",
- messageSends: ["inspect:", "new", "open"],
- referencedClasses: ["Inspector"]
- }),
- smalltalk.Object);
- smalltalk.addMethod(
- "_inspectOn_",
- smalltalk.method({
- selector: "inspectOn:",
- category: '*IDE',
- fn: function (anInspector){
- var self=this;
- var variables;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- variables=_st((smalltalk.Dictionary || Dictionary))._new();
- _st(variables)._at_put_("#self",self);
- _st(_st(_st(self)._class())._allInstanceVariableNames())._do_((function(each){
- return smalltalk.withContext(function($ctx2) {
return _st(variables)._at_put_(each,_st(self)._instVarAt_(each));
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
- $1=anInspector;
- _st($1)._setLabel_(_st(self)._printString());
- $2=_st($1)._setVariables_(variables);
- return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables}, smalltalk.Object)})},
- args: ["anInspector"],
- 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",
- messageSends: ["new", "at:put:", "do:", "instVarAt:", "allInstanceVariableNames", "class", "setLabel:", "printString", "setVariables:"],
- referencedClasses: ["Dictionary"]
- }),
- smalltalk.Object);
- smalltalk.addMethod(
- "_inspectOn_",
- smalltalk.method({
- selector: "inspectOn:",
- category: '*IDE',
- fn: function (anInspector){
- var self=this;
- var variables;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- variables=_st((smalltalk.Dictionary || Dictionary))._new();
- _st(variables)._at_put_("#self",self);
- _st(self)._withIndexDo_((function(each,i){
- return smalltalk.withContext(function($ctx2) {
return _st(variables)._at_put_(i,each);
- }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1)})}));
- $1=anInspector;
- _st($1)._setLabel_(_st(self)._printString());
- $2=_st($1)._setVariables_(variables);
- return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables}, smalltalk.Collection)})},
- args: ["anInspector"],
- 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",
- messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"],
- referencedClasses: ["Dictionary"]
- }),
- smalltalk.Collection);
- smalltalk.addMethod(
- "_inspectOn_",
- smalltalk.method({
- selector: "inspectOn:",
- category: '*IDE',
- fn: function (anInspector){
- var self=this;
- var variables;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- variables=_st((smalltalk.Dictionary || Dictionary))._new();
- _st(variables)._at_put_("#self",self);
- _st(variables)._at_put_("#keys",_st(self)._keys());
- _st(self)._keysAndValuesDo_((function(key,value){
- return smalltalk.withContext(function($ctx2) {
return _st(variables)._at_put_(key,value);
- }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
- $1=anInspector;
- _st($1)._setLabel_(_st(self)._printString());
- $2=_st($1)._setVariables_(variables);
- return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables}, smalltalk.HashedCollection)})},
- args: ["anInspector"],
- 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",
- messageSends: ["new", "at:put:", "keys", "keysAndValuesDo:", "setLabel:", "printString", "setVariables:"],
- referencedClasses: ["Dictionary"]
- }),
- smalltalk.HashedCollection);
- smalltalk.addMethod(
- "_inspectOn_",
- smalltalk.method({
- selector: "inspectOn:",
- category: '*IDE',
- fn: function (anInspector){
- var self=this;
- var label;
- return smalltalk.withContext(function($ctx1) {
var $1;
- smalltalk.CharacterArray.fn.prototype._inspectOn_.apply(_st(self), [anInspector]);
- $1=_st(_st(_st(self)._printString())._size()).__gt((30));
- if(smalltalk.assert($1)){
- label=_st(_st(_st(self)._printString())._copyFrom_to_((1),(30))).__comma("...'");
- label;
- } else {
- label=_st(self)._printString();
- label;
- };
- _st(anInspector)._setLabel_(label);
- return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,label:label}, smalltalk.String)})},
- args: ["anInspector"],
- 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",
- messageSends: ["inspectOn:", "ifTrue:ifFalse:", ",", "copyFrom:to:", "printString", ">", "size", "setLabel:"],
- referencedClasses: []
- }),
- smalltalk.String);
- smalltalk.addMethod(
- "_inspectOn_",
- smalltalk.method({
- selector: "inspectOn:",
- category: '*IDE',
- fn: function (anInspector){
- var self=this;
- var variables;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- variables=_st((smalltalk.Dictionary || Dictionary))._new();
- _st(variables)._at_put_("#self",self);
- _st(self["@elements"])._withIndexDo_((function(each,i){
- return smalltalk.withContext(function($ctx2) {
return _st(variables)._at_put_(i,each);
- }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1)})}));
- $1=anInspector;
- _st($1)._setLabel_(_st(self)._printString());
- $2=_st($1)._setVariables_(variables);
- return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables}, smalltalk.Set)})},
- args: ["anInspector"],
- 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",
- messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"],
- referencedClasses: ["Dictionary"]
- }),
- smalltalk.Set);
- smalltalk.addMethod(
- "_inspectOn_",
- smalltalk.method({
- selector: "inspectOn:",
- category: '*IDE',
- fn: function (anInspector){
- var self=this;
- var variables;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- variables=_st((smalltalk.Dictionary || Dictionary))._new();
- _st(variables)._at_put_("#self",self);
- _st(variables)._at_put_("#year",_st(self)._year());
- _st(variables)._at_put_("#month",_st(self)._month());
- _st(variables)._at_put_("#day",_st(self)._day());
- _st(variables)._at_put_("#hours",_st(self)._hours());
- _st(variables)._at_put_("#minutes",_st(self)._minutes());
- _st(variables)._at_put_("#seconds",_st(self)._seconds());
- _st(variables)._at_put_("#milliseconds",_st(self)._milliseconds());
- $1=anInspector;
- _st($1)._setLabel_(_st(self)._printString());
- $2=_st($1)._setVariables_(variables);
- return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables}, smalltalk.Date)})},
- args: ["anInspector"],
- 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",
- messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"],
- referencedClasses: ["Dictionary"]
- }),
- smalltalk.Date);
- smalltalk.addMethod(
- "_inspectOn_",
- smalltalk.method({
- selector: "inspectOn:",
- category: '*IDE',
- fn: function (anInspector){
- var self=this;
- var variables;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- variables=_st((smalltalk.Dictionary || Dictionary))._new();
- _st(variables)._at_put_("#self",self);
- _st(variables)._at_put_("#home",_st(self)._home());
- _st(variables)._at_put_("#receiver",_st(self)._receiver());
- _st(variables)._at_put_("#selector",_st(self)._selector());
- _st(variables)._at_put_("#temps",_st(self)._temps());
- _st(_st(_st(self)._class())._instanceVariableNames())._do_((function(each){
- return smalltalk.withContext(function($ctx2) {
return _st(variables)._at_put_(each,_st(self)._instVarAt_(each));
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
- $1=anInspector;
- _st($1)._setLabel_(_st(self)._printString());
- $2=_st($1)._setVariables_(variables);
- return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables}, smalltalk.MethodContext)})},
- args: ["anInspector"],
- 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",
- messageSends: ["new", "at:put:", "home", "receiver", "selector", "temps", "do:", "instVarAt:", "instanceVariableNames", "class", "setLabel:", "printString", "setVariables:"],
- referencedClasses: ["Dictionary"]
- }),
- smalltalk.MethodContext);
|