IDE.deploy.js 193 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315
  1. smalltalk.addPackage('IDE');
  2. smalltalk.addClass('ClassesList', smalltalk.Widget, ['browser', 'ul', 'nodes'], 'IDE');
  3. smalltalk.addMethod(
  4. "_browser",
  5. smalltalk.method({
  6. selector: "browser",
  7. fn: function (){
  8. var self=this;
  9. return smalltalk.withContext(function($ctx1) { var $1;
  10. $1=self["@browser"];
  11. return $1;
  12. }, function($ctx1) {$ctx1.fill(self,"browser",{}, smalltalk.ClassesList)})},
  13. messageSends: []}),
  14. smalltalk.ClassesList);
  15. smalltalk.addMethod(
  16. "_browser_",
  17. smalltalk.method({
  18. selector: "browser:",
  19. fn: function (aBrowser){
  20. var self=this;
  21. return smalltalk.withContext(function($ctx1) { self["@browser"]=aBrowser;
  22. return self}, function($ctx1) {$ctx1.fill(self,"browser:",{aBrowser:aBrowser}, smalltalk.ClassesList)})},
  23. messageSends: []}),
  24. smalltalk.ClassesList);
  25. smalltalk.addMethod(
  26. "_category",
  27. smalltalk.method({
  28. selector: "category",
  29. fn: function (){
  30. var self=this;
  31. return smalltalk.withContext(function($ctx1) { var $1;
  32. $1=_st(_st(self)._browser())._selectedPackage();
  33. return $1;
  34. }, function($ctx1) {$ctx1.fill(self,"category",{}, smalltalk.ClassesList)})},
  35. messageSends: ["selectedPackage", "browser"]}),
  36. smalltalk.ClassesList);
  37. smalltalk.addMethod(
  38. "_getNodes",
  39. smalltalk.method({
  40. selector: "getNodes",
  41. fn: function (){
  42. var self=this;
  43. var classes,children,others;
  44. return smalltalk.withContext(function($ctx1) { var $1,$2;
  45. classes=_st(_st(self)._browser())._classes();
  46. children=[];
  47. others=[];
  48. _st(classes)._do_((function(each){
  49. return smalltalk.withContext(function($ctx2) { $1=_st(classes)._includes_(_st(each)._superclass());
  50. if(smalltalk.assert($1)){
  51. return _st(others)._add_(each);
  52. } else {
  53. return _st(children)._add_(each);
  54. };
  55. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  56. $2=_st(children)._collect_((function(each){
  57. return smalltalk.withContext(function($ctx2) { return _st((smalltalk.ClassesListNode || ClassesListNode))._on_browser_classes_level_(each,_st(self)._browser(),others,(0));
  58. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  59. return $2;
  60. }, function($ctx1) {$ctx1.fill(self,"getNodes",{classes:classes,children:children,others:others}, smalltalk.ClassesList)})},
  61. messageSends: ["classes", "browser", "do:", "ifFalse:ifTrue:", "add:", "includes:", "superclass", "collect:", "on:browser:classes:level:"]}),
  62. smalltalk.ClassesList);
  63. smalltalk.addMethod(
  64. "_nodes",
  65. smalltalk.method({
  66. selector: "nodes",
  67. fn: function (){
  68. var self=this;
  69. return smalltalk.withContext(function($ctx1) { var $1,$2;
  70. $1=self["@nodes"];
  71. if(($receiver = $1) == nil || $receiver == undefined){
  72. self["@nodes"]=_st(self)._getNodes();
  73. self["@nodes"];
  74. } else {
  75. $1;
  76. };
  77. $2=self["@nodes"];
  78. return $2;
  79. }, function($ctx1) {$ctx1.fill(self,"nodes",{}, smalltalk.ClassesList)})},
  80. messageSends: ["ifNil:", "getNodes"]}),
  81. smalltalk.ClassesList);
  82. smalltalk.addMethod(
  83. "_renderOn_",
  84. smalltalk.method({
  85. selector: "renderOn:",
  86. fn: function (html){
  87. var self=this;
  88. return smalltalk.withContext(function($ctx1) { var $1,$2;
  89. $1=_st(html)._ul();
  90. _st($1)._class_("amber_column browser classes");
  91. $2=_st($1)._yourself();
  92. self["@ul"]=$2;
  93. _st(self)._updateNodes();
  94. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html}, smalltalk.ClassesList)})},
  95. messageSends: ["class:", "ul", "yourself", "updateNodes"]}),
  96. smalltalk.ClassesList);
  97. smalltalk.addMethod(
  98. "_resetNodes",
  99. smalltalk.method({
  100. selector: "resetNodes",
  101. fn: function (){
  102. var self=this;
  103. return smalltalk.withContext(function($ctx1) { self["@nodes"]=nil;
  104. return self}, function($ctx1) {$ctx1.fill(self,"resetNodes",{}, smalltalk.ClassesList)})},
  105. messageSends: []}),
  106. smalltalk.ClassesList);
  107. smalltalk.addMethod(
  108. "_updateNodes",
  109. smalltalk.method({
  110. selector: "updateNodes",
  111. fn: function (){
  112. var self=this;
  113. return smalltalk.withContext(function($ctx1) { _st(self["@ul"])._contents_((function(html){
  114. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._nodes())._do_((function(each){
  115. return smalltalk.withContext(function($ctx3) { return _st(each)._renderOn_(html);
  116. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  117. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  118. return self}, function($ctx1) {$ctx1.fill(self,"updateNodes",{}, smalltalk.ClassesList)})},
  119. messageSends: ["contents:", "do:", "renderOn:", "nodes"]}),
  120. smalltalk.ClassesList);
  121. smalltalk.addMethod(
  122. "_on_",
  123. smalltalk.method({
  124. selector: "on:",
  125. fn: function (aBrowser){
  126. var self=this;
  127. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  128. $2=_st(self)._new();
  129. _st($2)._browser_(aBrowser);
  130. $3=_st($2)._yourself();
  131. $1=$3;
  132. return $1;
  133. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowser:aBrowser}, smalltalk.ClassesList.klass)})},
  134. messageSends: ["browser:", "new", "yourself"]}),
  135. smalltalk.ClassesList.klass);
  136. smalltalk.addClass('ClassesListNode', smalltalk.Widget, ['browser', 'theClass', 'level', 'nodes'], 'IDE');
  137. smalltalk.addMethod(
  138. "_browser",
  139. smalltalk.method({
  140. selector: "browser",
  141. fn: function (){
  142. var self=this;
  143. return smalltalk.withContext(function($ctx1) { var $1;
  144. $1=self["@browser"];
  145. return $1;
  146. }, function($ctx1) {$ctx1.fill(self,"browser",{}, smalltalk.ClassesListNode)})},
  147. messageSends: []}),
  148. smalltalk.ClassesListNode);
  149. smalltalk.addMethod(
  150. "_browser_",
  151. smalltalk.method({
  152. selector: "browser:",
  153. fn: function (aBrowser){
  154. var self=this;
  155. return smalltalk.withContext(function($ctx1) { self["@browser"]=aBrowser;
  156. return self}, function($ctx1) {$ctx1.fill(self,"browser:",{aBrowser:aBrowser}, smalltalk.ClassesListNode)})},
  157. messageSends: []}),
  158. smalltalk.ClassesListNode);
  159. smalltalk.addMethod(
  160. "_getNodesFrom_",
  161. smalltalk.method({
  162. selector: "getNodesFrom:",
  163. fn: function (aCollection){
  164. var self=this;
  165. var children,others;
  166. return smalltalk.withContext(function($ctx1) { var $1;
  167. children=[];
  168. others=[];
  169. _st(aCollection)._do_((function(each){
  170. return smalltalk.withContext(function($ctx2) { $1=_st(_st(each)._superclass()).__eq(_st(self)._theClass());
  171. if(smalltalk.assert($1)){
  172. return _st(children)._add_(each);
  173. } else {
  174. return _st(others)._add_(each);
  175. };
  176. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  177. self["@nodes"]=_st(children)._collect_((function(each){
  178. 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)));
  179. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  180. return self}, function($ctx1) {$ctx1.fill(self,"getNodesFrom:",{aCollection:aCollection,children:children,others:others}, smalltalk.ClassesListNode)})},
  181. messageSends: ["do:", "ifTrue:ifFalse:", "add:", "=", "theClass", "superclass", "collect:", "on:browser:classes:level:", "browser", "+", "level"]}),
  182. smalltalk.ClassesListNode);
  183. smalltalk.addMethod(
  184. "_label",
  185. smalltalk.method({
  186. selector: "label",
  187. fn: function (){
  188. var self=this;
  189. var str;
  190. return smalltalk.withContext(function($ctx1) { var $1;
  191. str=_st(_st((smalltalk.String || String))._new())._writeStream();
  192. _st(_st(self)._level())._timesRepeat_((function(){
  193. return smalltalk.withContext(function($ctx2) { return _st(str)._nextPutAll_("    ");
  194. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  195. _st(str)._nextPutAll_(_st(_st(self)._theClass())._name());
  196. $1=_st(str)._contents();
  197. return $1;
  198. }, function($ctx1) {$ctx1.fill(self,"label",{str:str}, smalltalk.ClassesListNode)})},
  199. messageSends: ["writeStream", "new", "timesRepeat:", "nextPutAll:", "level", "name", "theClass", "contents"]}),
  200. smalltalk.ClassesListNode);
  201. smalltalk.addMethod(
  202. "_level",
  203. smalltalk.method({
  204. selector: "level",
  205. fn: function (){
  206. var self=this;
  207. return smalltalk.withContext(function($ctx1) { var $1;
  208. $1=self["@level"];
  209. return $1;
  210. }, function($ctx1) {$ctx1.fill(self,"level",{}, smalltalk.ClassesListNode)})},
  211. messageSends: []}),
  212. smalltalk.ClassesListNode);
  213. smalltalk.addMethod(
  214. "_level_",
  215. smalltalk.method({
  216. selector: "level:",
  217. fn: function (anInteger){
  218. var self=this;
  219. return smalltalk.withContext(function($ctx1) { self["@level"]=anInteger;
  220. return self}, function($ctx1) {$ctx1.fill(self,"level:",{anInteger:anInteger}, smalltalk.ClassesListNode)})},
  221. messageSends: []}),
  222. smalltalk.ClassesListNode);
  223. smalltalk.addMethod(
  224. "_nodes",
  225. smalltalk.method({
  226. selector: "nodes",
  227. fn: function (){
  228. var self=this;
  229. return smalltalk.withContext(function($ctx1) { var $1;
  230. $1=self["@nodes"];
  231. return $1;
  232. }, function($ctx1) {$ctx1.fill(self,"nodes",{}, smalltalk.ClassesListNode)})},
  233. messageSends: []}),
  234. smalltalk.ClassesListNode);
  235. smalltalk.addMethod(
  236. "_renderOn_",
  237. smalltalk.method({
  238. selector: "renderOn:",
  239. fn: function (html){
  240. var self=this;
  241. var li,cssClass;
  242. return smalltalk.withContext(function($ctx1) { var $1,$2;
  243. cssClass="";
  244. li=_st(_st(html)._li())._onClick_((function(){
  245. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._browser())._selectClass_(_st(self)._theClass());
  246. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  247. _st(_st(li)._asJQuery())._html_(_st(self)._label());
  248. $1=_st(_st(_st(self)._browser())._selectedClass()).__eq(_st(self)._theClass());
  249. if(smalltalk.assert($1)){
  250. cssClass=_st(cssClass).__comma(" selected");
  251. cssClass;
  252. };
  253. $2=_st(_st(_st(self)._theClass())._comment())._isEmpty();
  254. if(! smalltalk.assert($2)){
  255. cssClass=_st(cssClass).__comma(" commented");
  256. cssClass;
  257. };
  258. _st(li)._class_(cssClass);
  259. _st(_st(self)._nodes())._do_((function(each){
  260. return smalltalk.withContext(function($ctx2) { return _st(each)._renderOn_(html);
  261. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  262. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,li:li,cssClass:cssClass}, smalltalk.ClassesListNode)})},
  263. messageSends: ["onClick:", "selectClass:", "theClass", "browser", "li", "html:", "label", "asJQuery", "ifTrue:", ",", "=", "selectedClass", "ifFalse:", "isEmpty", "comment", "class:", "do:", "renderOn:", "nodes"]}),
  264. smalltalk.ClassesListNode);
  265. smalltalk.addMethod(
  266. "_theClass",
  267. smalltalk.method({
  268. selector: "theClass",
  269. fn: function (){
  270. var self=this;
  271. return smalltalk.withContext(function($ctx1) { var $1;
  272. $1=self["@theClass"];
  273. return $1;
  274. }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.ClassesListNode)})},
  275. messageSends: []}),
  276. smalltalk.ClassesListNode);
  277. smalltalk.addMethod(
  278. "_theClass_",
  279. smalltalk.method({
  280. selector: "theClass:",
  281. fn: function (aClass){
  282. var self=this;
  283. return smalltalk.withContext(function($ctx1) { self["@theClass"]=aClass;
  284. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.ClassesListNode)})},
  285. messageSends: []}),
  286. smalltalk.ClassesListNode);
  287. smalltalk.addMethod(
  288. "_on_browser_classes_level_",
  289. smalltalk.method({
  290. selector: "on:browser:classes:level:",
  291. fn: function (aClass,aBrowser,aCollection,anInteger){
  292. var self=this;
  293. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  294. $2=_st(self)._new();
  295. _st($2)._theClass_(aClass);
  296. _st($2)._browser_(aBrowser);
  297. _st($2)._level_(anInteger);
  298. _st($2)._getNodesFrom_(aCollection);
  299. $3=_st($2)._yourself();
  300. $1=$3;
  301. return $1;
  302. }, function($ctx1) {$ctx1.fill(self,"on:browser:classes:level:",{aClass:aClass,aBrowser:aBrowser,aCollection:aCollection,anInteger:anInteger}, smalltalk.ClassesListNode.klass)})},
  303. messageSends: ["theClass:", "new", "browser:", "level:", "getNodesFrom:", "yourself"]}),
  304. smalltalk.ClassesListNode.klass);
  305. smalltalk.addClass('DebugErrorHandler', smalltalk.ErrorHandler, [], 'IDE');
  306. smalltalk.addMethod(
  307. "_handleError_",
  308. smalltalk.method({
  309. selector: "handleError:",
  310. fn: function (anError){
  311. var self=this;
  312. return smalltalk.withContext(function($ctx1) { var $1,$2;
  313. _st((function(){
  314. return smalltalk.withContext(function($ctx2) { $1=_st((smalltalk.Debugger || Debugger))._new();
  315. _st($1)._error_(anError);
  316. $2=_st($1)._open();
  317. return $2;
  318. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.Error || Error),(function(error){
  319. return smalltalk.withContext(function($ctx2) { return _st(_st((smalltalk.ErrorHandler || ErrorHandler))._new())._handleError_(error);
  320. }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1)})}));
  321. return self}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError}, smalltalk.DebugErrorHandler)})},
  322. messageSends: ["on:do:", "handleError:", "new", "error:", "open"]}),
  323. smalltalk.DebugErrorHandler);
  324. smalltalk.addMethod(
  325. "_initialize",
  326. smalltalk.method({
  327. selector: "initialize",
  328. fn: function (){
  329. var self=this;
  330. return smalltalk.withContext(function($ctx1) { _st(self)._register();
  331. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.DebugErrorHandler.klass)})},
  332. messageSends: ["register"]}),
  333. smalltalk.DebugErrorHandler.klass);
  334. smalltalk.addClass('SourceArea', smalltalk.Widget, ['editor', 'div', 'receiver', 'onDoIt'], 'IDE');
  335. smalltalk.addMethod(
  336. "_clear",
  337. smalltalk.method({
  338. selector: "clear",
  339. fn: function (){
  340. var self=this;
  341. return smalltalk.withContext(function($ctx1) { _st(self)._val_("");
  342. return self}, function($ctx1) {$ctx1.fill(self,"clear",{}, smalltalk.SourceArea)})},
  343. messageSends: ["val:"]}),
  344. smalltalk.SourceArea);
  345. smalltalk.addMethod(
  346. "_currentLine",
  347. smalltalk.method({
  348. selector: "currentLine",
  349. fn: function (){
  350. var self=this;
  351. return smalltalk.withContext(function($ctx1) { var $1;
  352. $1=_st(self["@editor"])._getLine_(_st(_st(self["@editor"])._getCursor())._line());
  353. return $1;
  354. }, function($ctx1) {$ctx1.fill(self,"currentLine",{}, smalltalk.SourceArea)})},
  355. messageSends: ["getLine:", "line", "getCursor"]}),
  356. smalltalk.SourceArea);
  357. smalltalk.addMethod(
  358. "_currentLineOrSelection",
  359. smalltalk.method({
  360. selector: "currentLineOrSelection",
  361. fn: function (){
  362. var self=this;
  363. return smalltalk.withContext(function($ctx1) { var $2,$1;
  364. $2=_st(self["@editor"])._somethingSelected();
  365. if(smalltalk.assert($2)){
  366. $1=_st(self)._selection();
  367. } else {
  368. $1=_st(self)._currentLine();
  369. };
  370. return $1;
  371. }, function($ctx1) {$ctx1.fill(self,"currentLineOrSelection",{}, smalltalk.SourceArea)})},
  372. messageSends: ["ifFalse:ifTrue:", "currentLine", "selection", "somethingSelected"]}),
  373. smalltalk.SourceArea);
  374. smalltalk.addMethod(
  375. "_doIt",
  376. smalltalk.method({
  377. selector: "doIt",
  378. fn: function (){
  379. var self=this;
  380. var result;
  381. return smalltalk.withContext(function($ctx1) { var $1,$2;
  382. result=_st(self)._eval_(_st(self)._currentLineOrSelection());
  383. $1=_st(self)._onDoIt();
  384. if(($receiver = $1) == nil || $receiver == undefined){
  385. $1;
  386. } else {
  387. _st(_st(self)._onDoIt())._value();
  388. };
  389. $2=result;
  390. return $2;
  391. }, function($ctx1) {$ctx1.fill(self,"doIt",{result:result}, smalltalk.SourceArea)})},
  392. messageSends: ["eval:", "currentLineOrSelection", "ifNotNil:", "value", "onDoIt"]}),
  393. smalltalk.SourceArea);
  394. smalltalk.addMethod(
  395. "_editor",
  396. smalltalk.method({
  397. selector: "editor",
  398. fn: function (){
  399. var self=this;
  400. return smalltalk.withContext(function($ctx1) { var $1;
  401. $1=self["@editor"];
  402. return $1;
  403. }, function($ctx1) {$ctx1.fill(self,"editor",{}, smalltalk.SourceArea)})},
  404. messageSends: []}),
  405. smalltalk.SourceArea);
  406. smalltalk.addMethod(
  407. "_eval_",
  408. smalltalk.method({
  409. selector: "eval:",
  410. fn: function (aString){
  411. var self=this;
  412. var compiler;
  413. return smalltalk.withContext(function($ctx1) { var $1,$2;
  414. var $early={};
  415. try {
  416. compiler=_st((smalltalk.Compiler || Compiler))._new();
  417. _st((function(){
  418. return smalltalk.withContext(function($ctx2) { return _st(compiler)._parseExpression_(aString);
  419. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.Error || Error),(function(ex){
  420. return smalltalk.withContext(function($ctx2) { $1=_st(window)._alert_(_st(ex)._messageText());
  421. throw $early=[$1];
  422. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  423. $2=_st(compiler)._evaluateExpression_on_(aString,_st(self)._receiver());
  424. return $2;
  425. }
  426. catch(e) {if(e===$early)return e[0]; throw e}
  427. }, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,compiler:compiler}, smalltalk.SourceArea)})},
  428. messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "evaluateExpression:on:", "receiver"]}),
  429. smalltalk.SourceArea);
  430. smalltalk.addMethod(
  431. "_fileIn",
  432. smalltalk.method({
  433. selector: "fileIn",
  434. fn: function (){
  435. var self=this;
  436. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.Importer || Importer))._new())._import_(_st(_st(self)._currentLineOrSelection())._readStream());
  437. return self}, function($ctx1) {$ctx1.fill(self,"fileIn",{}, smalltalk.SourceArea)})},
  438. messageSends: ["import:", "readStream", "currentLineOrSelection", "new"]}),
  439. smalltalk.SourceArea);
  440. smalltalk.addMethod(
  441. "_focus",
  442. smalltalk.method({
  443. selector: "focus",
  444. fn: function (){
  445. var self=this;
  446. return smalltalk.withContext(function($ctx1) { _st(_st(self)._editor())._focus();
  447. return self}, function($ctx1) {$ctx1.fill(self,"focus",{}, smalltalk.SourceArea)})},
  448. messageSends: ["focus", "editor"]}),
  449. smalltalk.SourceArea);
  450. smalltalk.addMethod(
  451. "_handleKeyDown_",
  452. smalltalk.method({
  453. selector: "handleKeyDown:",
  454. fn: function (anEvent){
  455. var self=this;
  456. return smalltalk.withContext(function($ctx1) { if(anEvent.ctrlKey) {
  457. if(anEvent.keyCode === 80) { //ctrl+p
  458. self._printIt();
  459. anEvent.preventDefault();
  460. return false;
  461. }
  462. if(anEvent.keyCode === 68) { //ctrl+d
  463. self._doIt();
  464. anEvent.preventDefault();
  465. return false;
  466. }
  467. if(anEvent.keyCode === 73) { //ctrl+i
  468. self._inspectIt();
  469. anEvent.preventDefault();
  470. return false;
  471. }
  472. };
  473. return self}, function($ctx1) {$ctx1.fill(self,"handleKeyDown:",{anEvent:anEvent}, smalltalk.SourceArea)})},
  474. messageSends: []}),
  475. smalltalk.SourceArea);
  476. smalltalk.addMethod(
  477. "_inspectIt",
  478. smalltalk.method({
  479. selector: "inspectIt",
  480. fn: function (){
  481. var self=this;
  482. return smalltalk.withContext(function($ctx1) { _st(_st(self)._doIt())._inspect();
  483. return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{}, smalltalk.SourceArea)})},
  484. messageSends: ["inspect", "doIt"]}),
  485. smalltalk.SourceArea);
  486. smalltalk.addMethod(
  487. "_onDoIt",
  488. smalltalk.method({
  489. selector: "onDoIt",
  490. fn: function (){
  491. var self=this;
  492. return smalltalk.withContext(function($ctx1) { var $1;
  493. $1=self["@onDoIt"];
  494. return $1;
  495. }, function($ctx1) {$ctx1.fill(self,"onDoIt",{}, smalltalk.SourceArea)})},
  496. messageSends: []}),
  497. smalltalk.SourceArea);
  498. smalltalk.addMethod(
  499. "_onDoIt_",
  500. smalltalk.method({
  501. selector: "onDoIt:",
  502. fn: function (aBlock){
  503. var self=this;
  504. return smalltalk.withContext(function($ctx1) { self["@onDoIt"]=aBlock;
  505. return self}, function($ctx1) {$ctx1.fill(self,"onDoIt:",{aBlock:aBlock}, smalltalk.SourceArea)})},
  506. messageSends: []}),
  507. smalltalk.SourceArea);
  508. smalltalk.addMethod(
  509. "_onKeyDown_",
  510. smalltalk.method({
  511. selector: "onKeyDown:",
  512. fn: function (aBlock){
  513. var self=this;
  514. return smalltalk.withContext(function($ctx1) { _st(self["@div"])._onKeyDown_(aBlock);
  515. return self}, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{aBlock:aBlock}, smalltalk.SourceArea)})},
  516. messageSends: ["onKeyDown:"]}),
  517. smalltalk.SourceArea);
  518. smalltalk.addMethod(
  519. "_onKeyUp_",
  520. smalltalk.method({
  521. selector: "onKeyUp:",
  522. fn: function (aBlock){
  523. var self=this;
  524. return smalltalk.withContext(function($ctx1) { _st(self["@div"])._onKeyUp_(aBlock);
  525. return self}, function($ctx1) {$ctx1.fill(self,"onKeyUp:",{aBlock:aBlock}, smalltalk.SourceArea)})},
  526. messageSends: ["onKeyUp:"]}),
  527. smalltalk.SourceArea);
  528. smalltalk.addMethod(
  529. "_print_",
  530. smalltalk.method({
  531. selector: "print:",
  532. fn: function (aString){
  533. var self=this;
  534. var start,stop,currentLine;
  535. return smalltalk.withContext(function($ctx1) { currentLine=_st(_st(self["@editor"])._getCursor_(false))._line();
  536. start=_st((smalltalk.HashedCollection || HashedCollection))._new();
  537. _st(start)._at_put_("line",currentLine);
  538. _st(start)._at_put_("ch",_st(_st(self["@editor"])._getCursor_(false))._ch());
  539. _st(_st(self["@editor"])._getSelection())._ifEmpty_((function(){
  540. return smalltalk.withContext(function($ctx2) { _st(start)._at_put_("ch",_st(_st(self["@editor"])._getLine_(currentLine))._size());
  541. return _st(self["@editor"])._setSelection_end_(smalltalk.HashedCollection._fromPairs_([_st("line").__minus_gt(currentLine),_st("ch").__minus_gt((0))]),start);
  542. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  543. stop=_st((smalltalk.HashedCollection || HashedCollection))._new();
  544. _st(stop)._at_put_("line",currentLine);
  545. _st(stop)._at_put_("ch",_st(_st(_st(start)._at_("ch")).__plus(_st(aString)._size())).__plus((2)));
  546. _st(self["@editor"])._replaceSelection_(_st(_st(_st(_st(self["@editor"])._getSelection()).__comma(" ")).__comma(aString)).__comma(" "));
  547. _st(self["@editor"])._setCursor_(_st(self["@editor"])._getCursor_(true));
  548. _st(self["@editor"])._setSelection_end_(stop,start);
  549. return self}, function($ctx1) {$ctx1.fill(self,"print:",{aString:aString,start:start,stop:stop,currentLine:currentLine}, smalltalk.SourceArea)})},
  550. messageSends: ["line", "getCursor:", "new", "at:put:", "ch", "ifEmpty:", "size", "getLine:", "setSelection:end:", "->", "getSelection", "+", "at:", "replaceSelection:", ",", "setCursor:"]}),
  551. smalltalk.SourceArea);
  552. smalltalk.addMethod(
  553. "_printIt",
  554. smalltalk.method({
  555. selector: "printIt",
  556. fn: function (){
  557. var self=this;
  558. return smalltalk.withContext(function($ctx1) { _st(self)._print_(_st(_st(self)._doIt())._printString());
  559. _st(self)._focus();
  560. return self}, function($ctx1) {$ctx1.fill(self,"printIt",{}, smalltalk.SourceArea)})},
  561. messageSends: ["print:", "printString", "doIt", "focus"]}),
  562. smalltalk.SourceArea);
  563. smalltalk.addMethod(
  564. "_receiver",
  565. smalltalk.method({
  566. selector: "receiver",
  567. fn: function (){
  568. var self=this;
  569. return smalltalk.withContext(function($ctx1) { var $2,$1;
  570. $2=self["@receiver"];
  571. if(($receiver = $2) == nil || $receiver == undefined){
  572. $1=_st((smalltalk.DoIt || DoIt))._new();
  573. } else {
  574. $1=$2;
  575. };
  576. return $1;
  577. }, function($ctx1) {$ctx1.fill(self,"receiver",{}, smalltalk.SourceArea)})},
  578. messageSends: ["ifNil:", "new"]}),
  579. smalltalk.SourceArea);
  580. smalltalk.addMethod(
  581. "_receiver_",
  582. smalltalk.method({
  583. selector: "receiver:",
  584. fn: function (anObject){
  585. var self=this;
  586. return smalltalk.withContext(function($ctx1) { self["@receiver"]=anObject;
  587. return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject}, smalltalk.SourceArea)})},
  588. messageSends: []}),
  589. smalltalk.SourceArea);
  590. smalltalk.addMethod(
  591. "_renderOn_",
  592. smalltalk.method({
  593. selector: "renderOn:",
  594. fn: function (html){
  595. var self=this;
  596. var textarea;
  597. return smalltalk.withContext(function($ctx1) { self["@div"]=_st(_st(html)._div())._class_("source");
  598. _st(self["@div"])._with_((function(){
  599. return smalltalk.withContext(function($ctx2) { textarea=_st(html)._textarea();
  600. return textarea;
  601. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  602. _st(self)._setEditorOn_(_st(textarea)._element());
  603. _st(self["@div"])._onKeyDown_((function(e){
  604. return smalltalk.withContext(function($ctx2) { return _st(self)._handleKeyDown_(e);
  605. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  606. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,textarea:textarea}, smalltalk.SourceArea)})},
  607. messageSends: ["class:", "div", "with:", "textarea", "setEditorOn:", "element", "onKeyDown:", "handleKeyDown:"]}),
  608. smalltalk.SourceArea);
  609. smalltalk.addMethod(
  610. "_selection",
  611. smalltalk.method({
  612. selector: "selection",
  613. fn: function (){
  614. var self=this;
  615. return smalltalk.withContext(function($ctx1) { var $1;
  616. $1=_st(self["@editor"])._getSelection();
  617. return $1;
  618. }, function($ctx1) {$ctx1.fill(self,"selection",{}, smalltalk.SourceArea)})},
  619. messageSends: ["getSelection"]}),
  620. smalltalk.SourceArea);
  621. smalltalk.addMethod(
  622. "_setEditorOn_",
  623. smalltalk.method({
  624. selector: "setEditorOn:",
  625. fn: function (aTextarea){
  626. var self=this;
  627. return smalltalk.withContext(function($ctx1) { self['@editor'] = CodeMirror.fromTextArea(aTextarea, {
  628. theme: 'amber',
  629. lineNumbers: true,
  630. enterMode: 'flat',
  631. indentWithTabs: true,
  632. indentUnit: 4,
  633. matchBrackets: true,
  634. electricChars: false
  635. });
  636. return self}, function($ctx1) {$ctx1.fill(self,"setEditorOn:",{aTextarea:aTextarea}, smalltalk.SourceArea)})},
  637. messageSends: []}),
  638. smalltalk.SourceArea);
  639. smalltalk.addMethod(
  640. "_val",
  641. smalltalk.method({
  642. selector: "val",
  643. fn: function (){
  644. var self=this;
  645. return smalltalk.withContext(function($ctx1) { var $1;
  646. $1=_st(self["@editor"])._getValue();
  647. return $1;
  648. }, function($ctx1) {$ctx1.fill(self,"val",{}, smalltalk.SourceArea)})},
  649. messageSends: ["getValue"]}),
  650. smalltalk.SourceArea);
  651. smalltalk.addMethod(
  652. "_val_",
  653. smalltalk.method({
  654. selector: "val:",
  655. fn: function (aString){
  656. var self=this;
  657. return smalltalk.withContext(function($ctx1) { _st(self["@editor"])._setValue_(aString);
  658. return self}, function($ctx1) {$ctx1.fill(self,"val:",{aString:aString}, smalltalk.SourceArea)})},
  659. messageSends: ["setValue:"]}),
  660. smalltalk.SourceArea);
  661. smalltalk.addMethod(
  662. "_initialize",
  663. smalltalk.method({
  664. selector: "initialize",
  665. fn: function (){
  666. var self=this;
  667. return smalltalk.withContext(function($ctx1) { smalltalk.Widget.klass.fn.prototype._initialize.apply(_st(self), []);
  668. _st(self)._setupCodeMirror();
  669. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.SourceArea.klass)})},
  670. messageSends: ["initialize", "setupCodeMirror"]}),
  671. smalltalk.SourceArea.klass);
  672. smalltalk.addMethod(
  673. "_setupCodeMirror",
  674. smalltalk.method({
  675. selector: "setupCodeMirror",
  676. fn: function (){
  677. var self=this;
  678. return smalltalk.withContext(function($ctx1) { CodeMirror.keyMap.default.fallthrough = ["basic"] ;
  679. return self}, function($ctx1) {$ctx1.fill(self,"setupCodeMirror",{}, smalltalk.SourceArea.klass)})},
  680. messageSends: []}),
  681. smalltalk.SourceArea.klass);
  682. smalltalk.addClass('TabManager', smalltalk.Widget, ['selectedTab', 'tabs', 'opened', 'ul', 'input'], 'IDE');
  683. smalltalk.addMethod(
  684. "_addTab_",
  685. smalltalk.method({
  686. selector: "addTab:",
  687. fn: function (aWidget){
  688. var self=this;
  689. return smalltalk.withContext(function($ctx1) { _st(_st(self)._tabs())._add_(aWidget);
  690. _st(aWidget)._appendToJQuery_(_st("#amber")._asJQuery());
  691. _st(aWidget)._hide();
  692. return self}, function($ctx1) {$ctx1.fill(self,"addTab:",{aWidget:aWidget}, smalltalk.TabManager)})},
  693. messageSends: ["add:", "tabs", "appendToJQuery:", "asJQuery", "hide"]}),
  694. smalltalk.TabManager);
  695. smalltalk.addMethod(
  696. "_close",
  697. smalltalk.method({
  698. selector: "close",
  699. fn: function (){
  700. var self=this;
  701. return smalltalk.withContext(function($ctx1) { var $1;
  702. $1=self["@opened"];
  703. if(smalltalk.assert($1)){
  704. _st(_st("#amber")._asJQuery())._hide();
  705. _st(_st(self["@ul"])._asJQuery())._hide();
  706. _st(self["@selectedTab"])._hide();
  707. _st(self)._removeBodyMargin();
  708. _st(_st("body")._asJQuery())._removeClass_("amberBody");
  709. self["@opened"]=false;
  710. self["@opened"];
  711. };
  712. return self}, function($ctx1) {$ctx1.fill(self,"close",{}, smalltalk.TabManager)})},
  713. messageSends: ["ifTrue:", "hide", "asJQuery", "removeBodyMargin", "removeClass:"]}),
  714. smalltalk.TabManager);
  715. smalltalk.addMethod(
  716. "_closeTab_",
  717. smalltalk.method({
  718. selector: "closeTab:",
  719. fn: function (aWidget){
  720. var self=this;
  721. return smalltalk.withContext(function($ctx1) { _st(self)._removeTab_(aWidget);
  722. _st(self)._selectTab_(_st(_st(self)._tabs())._last());
  723. _st(aWidget)._remove();
  724. _st(self)._update();
  725. return self}, function($ctx1) {$ctx1.fill(self,"closeTab:",{aWidget:aWidget}, smalltalk.TabManager)})},
  726. messageSends: ["removeTab:", "selectTab:", "last", "tabs", "remove", "update"]}),
  727. smalltalk.TabManager);
  728. smalltalk.addMethod(
  729. "_initialize",
  730. smalltalk.method({
  731. selector: "initialize",
  732. fn: function (){
  733. var self=this;
  734. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6;
  735. smalltalk.Widget.fn.prototype._initialize.apply(_st(self), []);
  736. self["@opened"]=true;
  737. _st((function(html){
  738. return smalltalk.withContext(function($ctx2) { return _st(_st(html)._div())._id_("amber");
  739. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}))._appendToJQuery_(_st("body")._asJQuery());
  740. _st(_st("body")._asJQuery())._addClass_("amberBody");
  741. _st(self)._appendToJQuery_(_st("#amber")._asJQuery());
  742. $1=self;
  743. _st($1)._addTab_(_st((smalltalk.IDETranscript || IDETranscript))._current());
  744. _st($1)._addTab_(_st((smalltalk.Workspace || Workspace))._new());
  745. $2=_st($1)._addTab_(_st((smalltalk.TestRunner || TestRunner))._new());
  746. _st(self)._selectTab_(_st(_st(self)._tabs())._last());
  747. $3=self;
  748. _st($3)._onResize_((function(){
  749. return smalltalk.withContext(function($ctx2) { $4=self;
  750. _st($4)._updateBodyMargin();
  751. $5=_st($4)._updatePosition();
  752. return $5;
  753. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  754. $6=_st($3)._onWindowResize_((function(){
  755. return smalltalk.withContext(function($ctx2) { return _st(self)._updatePosition();
  756. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  757. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.TabManager)})},
  758. messageSends: ["initialize", "appendToJQuery:", "asJQuery", "id:", "div", "addClass:", "addTab:", "current", "new", "selectTab:", "last", "tabs", "onResize:", "updateBodyMargin", "updatePosition", "onWindowResize:"]}),
  759. smalltalk.TabManager);
  760. smalltalk.addMethod(
  761. "_labelFor_",
  762. smalltalk.method({
  763. selector: "labelFor:",
  764. fn: function (aWidget){
  765. var self=this;
  766. var label,maxSize;
  767. return smalltalk.withContext(function($ctx1) { var $1,$2;
  768. maxSize=(15);
  769. label=_st(_st(aWidget)._label())._copyFrom_to_((0),_st(_st(_st(aWidget)._label())._size())._min_(maxSize));
  770. $1=_st(_st(_st(aWidget)._label())._size()).__gt(maxSize);
  771. if(smalltalk.assert($1)){
  772. label=_st(label).__comma("...");
  773. label;
  774. };
  775. $2=label;
  776. return $2;
  777. }, function($ctx1) {$ctx1.fill(self,"labelFor:",{aWidget:aWidget,label:label,maxSize:maxSize}, smalltalk.TabManager)})},
  778. messageSends: ["copyFrom:to:", "min:", "size", "label", "ifTrue:", ",", ">"]}),
  779. smalltalk.TabManager);
  780. smalltalk.addMethod(
  781. "_newBrowserTab",
  782. smalltalk.method({
  783. selector: "newBrowserTab",
  784. fn: function (){
  785. var self=this;
  786. return smalltalk.withContext(function($ctx1) { _st((smalltalk.Browser || Browser))._open();
  787. return self}, function($ctx1) {$ctx1.fill(self,"newBrowserTab",{}, smalltalk.TabManager)})},
  788. messageSends: ["open"]}),
  789. smalltalk.TabManager);
  790. smalltalk.addMethod(
  791. "_onResize_",
  792. smalltalk.method({
  793. selector: "onResize:",
  794. fn: function (aBlock){
  795. var self=this;
  796. return smalltalk.withContext(function($ctx1) { jQuery('#amber').resizable({
  797. handles: 'n',
  798. resize: aBlock,
  799. minHeight: 230
  800. });
  801. return self}, function($ctx1) {$ctx1.fill(self,"onResize:",{aBlock:aBlock}, smalltalk.TabManager)})},
  802. messageSends: []}),
  803. smalltalk.TabManager);
  804. smalltalk.addMethod(
  805. "_onWindowResize_",
  806. smalltalk.method({
  807. selector: "onWindowResize:",
  808. fn: function (aBlock){
  809. var self=this;
  810. return smalltalk.withContext(function($ctx1) { jQuery(window).resize(aBlock);
  811. return self}, function($ctx1) {$ctx1.fill(self,"onWindowResize:",{aBlock:aBlock}, smalltalk.TabManager)})},
  812. messageSends: []}),
  813. smalltalk.TabManager);
  814. smalltalk.addMethod(
  815. "_open",
  816. smalltalk.method({
  817. selector: "open",
  818. fn: function (){
  819. var self=this;
  820. return smalltalk.withContext(function($ctx1) { var $1;
  821. $1=self["@opened"];
  822. if(! smalltalk.assert($1)){
  823. _st(_st("body")._asJQuery())._addClass_("amberBody");
  824. _st(_st("#amber")._asJQuery())._show();
  825. _st(_st(self["@ul"])._asJQuery())._show();
  826. _st(self)._updateBodyMargin();
  827. _st(self["@selectedTab"])._show();
  828. self["@opened"]=true;
  829. self["@opened"];
  830. };
  831. return self}, function($ctx1) {$ctx1.fill(self,"open",{}, smalltalk.TabManager)})},
  832. messageSends: ["ifFalse:", "addClass:", "asJQuery", "show", "updateBodyMargin"]}),
  833. smalltalk.TabManager);
  834. smalltalk.addMethod(
  835. "_removeBodyMargin",
  836. smalltalk.method({
  837. selector: "removeBodyMargin",
  838. fn: function (){
  839. var self=this;
  840. return smalltalk.withContext(function($ctx1) { _st(self)._setBodyMargin_((0));
  841. return self}, function($ctx1) {$ctx1.fill(self,"removeBodyMargin",{}, smalltalk.TabManager)})},
  842. messageSends: ["setBodyMargin:"]}),
  843. smalltalk.TabManager);
  844. smalltalk.addMethod(
  845. "_removeTab_",
  846. smalltalk.method({
  847. selector: "removeTab:",
  848. fn: function (aWidget){
  849. var self=this;
  850. return smalltalk.withContext(function($ctx1) { _st(_st(self)._tabs())._remove_(aWidget);
  851. _st(self)._update();
  852. return self}, function($ctx1) {$ctx1.fill(self,"removeTab:",{aWidget:aWidget}, smalltalk.TabManager)})},
  853. messageSends: ["remove:", "tabs", "update"]}),
  854. smalltalk.TabManager);
  855. smalltalk.addMethod(
  856. "_renderOn_",
  857. smalltalk.method({
  858. selector: "renderOn:",
  859. fn: function (html){
  860. var self=this;
  861. return smalltalk.withContext(function($ctx1) { var $1,$2;
  862. _st(_st(html)._div())._id_("logo");
  863. _st(self)._renderToolbarOn_(html);
  864. $1=_st(html)._ul();
  865. _st($1)._id_("amberTabs");
  866. $2=_st($1)._yourself();
  867. self["@ul"]=$2;
  868. _st(self)._renderTabs();
  869. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html}, smalltalk.TabManager)})},
  870. messageSends: ["id:", "div", "renderToolbarOn:", "ul", "yourself", "renderTabs"]}),
  871. smalltalk.TabManager);
  872. smalltalk.addMethod(
  873. "_renderTabFor_on_",
  874. smalltalk.method({
  875. selector: "renderTabFor:on:",
  876. fn: function (aWidget,html){
  877. var self=this;
  878. var li;
  879. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$5,$6,$7,$4,$8;
  880. li=_st(html)._li();
  881. $1=_st(self["@selectedTab"]).__eq(aWidget);
  882. if(smalltalk.assert($1)){
  883. _st(li)._class_("selected");
  884. };
  885. $2=li;
  886. _st($2)._with_((function(){
  887. return smalltalk.withContext(function($ctx2) { _st(_st(html)._span())._class_("ltab");
  888. $3=_st(html)._span();
  889. _st($3)._class_("mtab");
  890. $4=_st($3)._with_((function(){
  891. return smalltalk.withContext(function($ctx3) { $5=_st(aWidget)._canBeClosed();
  892. if(smalltalk.assert($5)){
  893. $6=_st(html)._span();
  894. _st($6)._class_("close");
  895. _st($6)._with_("x");
  896. $7=_st($6)._onClick_((function(){
  897. return smalltalk.withContext(function($ctx4) { return _st(self)._closeTab_(aWidget);
  898. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  899. $7;
  900. };
  901. return _st(_st(html)._span())._with_(_st(self)._labelFor_(aWidget));
  902. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  903. $4;
  904. return _st(_st(html)._span())._class_("rtab");
  905. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  906. $8=_st($2)._onClick_((function(){
  907. return smalltalk.withContext(function($ctx2) { return _st(self)._selectTab_(aWidget);
  908. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  909. return self}, function($ctx1) {$ctx1.fill(self,"renderTabFor:on:",{aWidget:aWidget,html:html,li:li}, smalltalk.TabManager)})},
  910. messageSends: ["li", "ifTrue:", "class:", "=", "with:", "span", "onClick:", "closeTab:", "canBeClosed", "labelFor:", "selectTab:"]}),
  911. smalltalk.TabManager);
  912. smalltalk.addMethod(
  913. "_renderTabs",
  914. smalltalk.method({
  915. selector: "renderTabs",
  916. fn: function (){
  917. var self=this;
  918. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  919. _st(self["@ul"])._contents_((function(html){
  920. return smalltalk.withContext(function($ctx2) { _st(_st(self)._tabs())._do_((function(each){
  921. return smalltalk.withContext(function($ctx3) { return _st(self)._renderTabFor_on_(each,html);
  922. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  923. $1=_st(html)._li();
  924. _st($1)._class_("newtab");
  925. _st($1)._with_((function(){
  926. return smalltalk.withContext(function($ctx3) { _st(_st(html)._span())._class_("ltab");
  927. $2=_st(html)._span();
  928. _st($2)._class_("mtab");
  929. $3=_st($2)._with_(" + ");
  930. $3;
  931. return _st(_st(html)._span())._class_("rtab");
  932. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  933. $4=_st($1)._onClick_((function(){
  934. return smalltalk.withContext(function($ctx3) { return _st(self)._newBrowserTab();
  935. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  936. return $4;
  937. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  938. return self}, function($ctx1) {$ctx1.fill(self,"renderTabs",{}, smalltalk.TabManager)})},
  939. messageSends: ["contents:", "do:", "renderTabFor:on:", "tabs", "class:", "li", "with:", "span", "onClick:", "newBrowserTab"]}),
  940. smalltalk.TabManager);
  941. smalltalk.addMethod(
  942. "_renderToolbarOn_",
  943. smalltalk.method({
  944. selector: "renderToolbarOn:",
  945. fn: function (html){
  946. var self=this;
  947. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$6,$7,$2;
  948. $1=_st(html)._div();
  949. _st($1)._id_("amber_toolbar");
  950. $2=_st($1)._with_((function(){
  951. return smalltalk.withContext(function($ctx2) { $3=_st(html)._input();
  952. _st($3)._class_("implementors");
  953. $4=_st($3)._yourself();
  954. self["@input"]=$4;
  955. self["@input"];
  956. _st(self["@input"])._onKeyPress_((function(event){
  957. return smalltalk.withContext(function($ctx3) { $5=_st(_st(event)._keyCode()).__eq((13));
  958. if(smalltalk.assert($5)){
  959. return _st(self)._search_(_st(_st(self["@input"])._asJQuery())._val());
  960. };
  961. }, function($ctx3) {$ctx3.fillBlock({event:event},$ctx1)})}));
  962. $6=_st(html)._div();
  963. _st($6)._id_("amber_close");
  964. $7=_st($6)._onClick_((function(){
  965. return smalltalk.withContext(function($ctx3) { return _st(self)._close();
  966. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  967. return $7;
  968. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  969. return self}, function($ctx1) {$ctx1.fill(self,"renderToolbarOn:",{html:html}, smalltalk.TabManager)})},
  970. messageSends: ["id:", "div", "with:", "class:", "input", "yourself", "onKeyPress:", "ifTrue:", "search:", "val", "asJQuery", "=", "keyCode", "onClick:", "close"]}),
  971. smalltalk.TabManager);
  972. smalltalk.addMethod(
  973. "_search_",
  974. smalltalk.method({
  975. selector: "search:",
  976. fn: function (aString){
  977. var self=this;
  978. var searchedClass;
  979. return smalltalk.withContext(function($ctx1) { var $1;
  980. searchedClass=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(aString);
  981. $1=_st(searchedClass)._isClass();
  982. if(smalltalk.assert($1)){
  983. _st((smalltalk.Browser || Browser))._openOn_(searchedClass);
  984. } else {
  985. _st((smalltalk.ReferencesBrowser || ReferencesBrowser))._search_(aString);
  986. };
  987. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString,searchedClass:searchedClass}, smalltalk.TabManager)})},
  988. messageSends: ["at:", "current", "ifTrue:ifFalse:", "openOn:", "search:", "isClass"]}),
  989. smalltalk.TabManager);
  990. smalltalk.addMethod(
  991. "_selectTab_",
  992. smalltalk.method({
  993. selector: "selectTab:",
  994. fn: function (aWidget){
  995. var self=this;
  996. return smalltalk.withContext(function($ctx1) { _st(self)._open();
  997. self["@selectedTab"]=aWidget;
  998. _st(_st(self)._tabs())._do_((function(each){
  999. return smalltalk.withContext(function($ctx2) { return _st(each)._hide();
  1000. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1001. _st(aWidget)._show();
  1002. _st(self)._update();
  1003. return self}, function($ctx1) {$ctx1.fill(self,"selectTab:",{aWidget:aWidget}, smalltalk.TabManager)})},
  1004. messageSends: ["open", "do:", "hide", "tabs", "show", "update"]}),
  1005. smalltalk.TabManager);
  1006. smalltalk.addMethod(
  1007. "_setBodyMargin_",
  1008. smalltalk.method({
  1009. selector: "setBodyMargin:",
  1010. fn: function (anInteger){
  1011. var self=this;
  1012. return smalltalk.withContext(function($ctx1) { _st(_st(".amberBody")._asJQuery())._css_put_("margin-bottom",_st(_st(anInteger)._asString()).__comma("px"));
  1013. return self}, function($ctx1) {$ctx1.fill(self,"setBodyMargin:",{anInteger:anInteger}, smalltalk.TabManager)})},
  1014. messageSends: ["css:put:", ",", "asString", "asJQuery"]}),
  1015. smalltalk.TabManager);
  1016. smalltalk.addMethod(
  1017. "_tabs",
  1018. smalltalk.method({
  1019. selector: "tabs",
  1020. fn: function (){
  1021. var self=this;
  1022. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1023. $2=self["@tabs"];
  1024. if(($receiver = $2) == nil || $receiver == undefined){
  1025. self["@tabs"]=_st((smalltalk.Array || Array))._new();
  1026. $1=self["@tabs"];
  1027. } else {
  1028. $1=$2;
  1029. };
  1030. return $1;
  1031. }, function($ctx1) {$ctx1.fill(self,"tabs",{}, smalltalk.TabManager)})},
  1032. messageSends: ["ifNil:", "new"]}),
  1033. smalltalk.TabManager);
  1034. smalltalk.addMethod(
  1035. "_update",
  1036. smalltalk.method({
  1037. selector: "update",
  1038. fn: function (){
  1039. var self=this;
  1040. return smalltalk.withContext(function($ctx1) { _st(self)._renderTabs();
  1041. return self}, function($ctx1) {$ctx1.fill(self,"update",{}, smalltalk.TabManager)})},
  1042. messageSends: ["renderTabs"]}),
  1043. smalltalk.TabManager);
  1044. smalltalk.addMethod(
  1045. "_updateBodyMargin",
  1046. smalltalk.method({
  1047. selector: "updateBodyMargin",
  1048. fn: function (){
  1049. var self=this;
  1050. return smalltalk.withContext(function($ctx1) { _st(self)._setBodyMargin_(_st(_st("#amber")._asJQuery())._height());
  1051. return self}, function($ctx1) {$ctx1.fill(self,"updateBodyMargin",{}, smalltalk.TabManager)})},
  1052. messageSends: ["setBodyMargin:", "height", "asJQuery"]}),
  1053. smalltalk.TabManager);
  1054. smalltalk.addMethod(
  1055. "_updatePosition",
  1056. smalltalk.method({
  1057. selector: "updatePosition",
  1058. fn: function (){
  1059. var self=this;
  1060. return smalltalk.withContext(function($ctx1) { jQuery('#amber').css('top', '').css('bottom', '0px');
  1061. return self}, function($ctx1) {$ctx1.fill(self,"updatePosition",{}, smalltalk.TabManager)})},
  1062. messageSends: []}),
  1063. smalltalk.TabManager);
  1064. smalltalk.TabManager.klass.iVarNames = ['current'];
  1065. smalltalk.addMethod(
  1066. "_current",
  1067. smalltalk.method({
  1068. selector: "current",
  1069. fn: function (){
  1070. var self=this;
  1071. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1072. $2=self["@current"];
  1073. if(($receiver = $2) == nil || $receiver == undefined){
  1074. self["@current"]=smalltalk.Widget.klass.fn.prototype._new.apply(_st(self), []);
  1075. $1=self["@current"];
  1076. } else {
  1077. $1=$2;
  1078. };
  1079. return $1;
  1080. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.TabManager.klass)})},
  1081. messageSends: ["ifNil:", "new"]}),
  1082. smalltalk.TabManager.klass);
  1083. smalltalk.addMethod(
  1084. "_new",
  1085. smalltalk.method({
  1086. selector: "new",
  1087. fn: function (){
  1088. var self=this;
  1089. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  1090. return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.TabManager.klass)})},
  1091. messageSends: ["shouldNotImplement"]}),
  1092. smalltalk.TabManager.klass);
  1093. smalltalk.addMethod(
  1094. "_toggleAmberIDE",
  1095. smalltalk.method({
  1096. selector: "toggleAmberIDE",
  1097. fn: function (){
  1098. var self=this;
  1099. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1100. $1=_st(_st(_st(window)._jQuery_("#amber"))._length()).__eq((0));
  1101. if(smalltalk.assert($1)){
  1102. _st((smalltalk.Browser || Browser))._open();
  1103. } else {
  1104. $2=_st(_st(window)._jQuery_("#amber"))._is_(":visible");
  1105. if(smalltalk.assert($2)){
  1106. _st(_st((smalltalk.TabManager || TabManager))._current())._close();
  1107. } else {
  1108. _st(_st((smalltalk.TabManager || TabManager))._current())._open();
  1109. };
  1110. };
  1111. return self}, function($ctx1) {$ctx1.fill(self,"toggleAmberIDE",{}, smalltalk.TabManager.klass)})},
  1112. messageSends: ["ifTrue:ifFalse:", "open", "close", "current", "is:", "jQuery:", "=", "length"]}),
  1113. smalltalk.TabManager.klass);
  1114. smalltalk.addClass('TabWidget', smalltalk.Widget, ['div'], 'IDE');
  1115. smalltalk.addMethod(
  1116. "_canBeClosed",
  1117. smalltalk.method({
  1118. selector: "canBeClosed",
  1119. fn: function (){
  1120. var self=this;
  1121. return smalltalk.withContext(function($ctx1) { return false;
  1122. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{}, smalltalk.TabWidget)})},
  1123. messageSends: []}),
  1124. smalltalk.TabWidget);
  1125. smalltalk.addMethod(
  1126. "_close",
  1127. smalltalk.method({
  1128. selector: "close",
  1129. fn: function (){
  1130. var self=this;
  1131. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.TabManager || TabManager))._current())._closeTab_(self);
  1132. return self}, function($ctx1) {$ctx1.fill(self,"close",{}, smalltalk.TabWidget)})},
  1133. messageSends: ["closeTab:", "current"]}),
  1134. smalltalk.TabWidget);
  1135. smalltalk.addMethod(
  1136. "_hide",
  1137. smalltalk.method({
  1138. selector: "hide",
  1139. fn: function (){
  1140. var self=this;
  1141. return smalltalk.withContext(function($ctx1) { _st(_st(self["@div"])._asJQuery())._hide();
  1142. return self}, function($ctx1) {$ctx1.fill(self,"hide",{}, smalltalk.TabWidget)})},
  1143. messageSends: ["hide", "asJQuery"]}),
  1144. smalltalk.TabWidget);
  1145. smalltalk.addMethod(
  1146. "_label",
  1147. smalltalk.method({
  1148. selector: "label",
  1149. fn: function (){
  1150. var self=this;
  1151. return smalltalk.withContext(function($ctx1) { _st(self)._subclassResponsibility();
  1152. return self}, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.TabWidget)})},
  1153. messageSends: ["subclassResponsibility"]}),
  1154. smalltalk.TabWidget);
  1155. smalltalk.addMethod(
  1156. "_open",
  1157. smalltalk.method({
  1158. selector: "open",
  1159. fn: function (){
  1160. var self=this;
  1161. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.TabManager || TabManager))._current())._addTab_(self);
  1162. _st(_st((smalltalk.TabManager || TabManager))._current())._selectTab_(self);
  1163. return self}, function($ctx1) {$ctx1.fill(self,"open",{}, smalltalk.TabWidget)})},
  1164. messageSends: ["addTab:", "current", "selectTab:"]}),
  1165. smalltalk.TabWidget);
  1166. smalltalk.addMethod(
  1167. "_remove",
  1168. smalltalk.method({
  1169. selector: "remove",
  1170. fn: function (){
  1171. var self=this;
  1172. return smalltalk.withContext(function($ctx1) { _st(_st(self["@div"])._asJQuery())._remove();
  1173. return self}, function($ctx1) {$ctx1.fill(self,"remove",{}, smalltalk.TabWidget)})},
  1174. messageSends: ["remove", "asJQuery"]}),
  1175. smalltalk.TabWidget);
  1176. smalltalk.addMethod(
  1177. "_renderBoxOn_",
  1178. smalltalk.method({
  1179. selector: "renderBoxOn:",
  1180. fn: function (html){
  1181. var self=this;
  1182. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.TabWidget)})},
  1183. messageSends: []}),
  1184. smalltalk.TabWidget);
  1185. smalltalk.addMethod(
  1186. "_renderButtonsOn_",
  1187. smalltalk.method({
  1188. selector: "renderButtonsOn:",
  1189. fn: function (html){
  1190. var self=this;
  1191. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.TabWidget)})},
  1192. messageSends: []}),
  1193. smalltalk.TabWidget);
  1194. smalltalk.addMethod(
  1195. "_renderOn_",
  1196. smalltalk.method({
  1197. selector: "renderOn:",
  1198. fn: function (html){
  1199. var self=this;
  1200. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1201. $1=_st(html)._div();
  1202. _st($1)._class_("amberTool");
  1203. $2=_st($1)._yourself();
  1204. self["@div"]=$2;
  1205. _st(self)._renderTab();
  1206. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html}, smalltalk.TabWidget)})},
  1207. messageSends: ["class:", "div", "yourself", "renderTab"]}),
  1208. smalltalk.TabWidget);
  1209. smalltalk.addMethod(
  1210. "_renderTab",
  1211. smalltalk.method({
  1212. selector: "renderTab",
  1213. fn: function (){
  1214. var self=this;
  1215. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  1216. _st(self["@div"])._contents_((function(html){
  1217. return smalltalk.withContext(function($ctx2) { $1=_st(html)._div();
  1218. _st($1)._class_("amber_box");
  1219. $2=_st($1)._with_((function(){
  1220. return smalltalk.withContext(function($ctx3) { return _st(self)._renderBoxOn_(html);
  1221. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1222. $2;
  1223. $3=_st(html)._div();
  1224. _st($3)._class_("amber_buttons");
  1225. $4=_st($3)._with_((function(){
  1226. return smalltalk.withContext(function($ctx3) { return _st(self)._renderButtonsOn_(html);
  1227. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1228. return $4;
  1229. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  1230. return self}, function($ctx1) {$ctx1.fill(self,"renderTab",{}, smalltalk.TabWidget)})},
  1231. messageSends: ["contents:", "class:", "div", "with:", "renderBoxOn:", "renderButtonsOn:"]}),
  1232. smalltalk.TabWidget);
  1233. smalltalk.addMethod(
  1234. "_show",
  1235. smalltalk.method({
  1236. selector: "show",
  1237. fn: function (){
  1238. var self=this;
  1239. return smalltalk.withContext(function($ctx1) { _st(_st(self["@div"])._asJQuery())._show();
  1240. return self}, function($ctx1) {$ctx1.fill(self,"show",{}, smalltalk.TabWidget)})},
  1241. messageSends: ["show", "asJQuery"]}),
  1242. smalltalk.TabWidget);
  1243. smalltalk.addMethod(
  1244. "_update",
  1245. smalltalk.method({
  1246. selector: "update",
  1247. fn: function (){
  1248. var self=this;
  1249. return smalltalk.withContext(function($ctx1) { _st(self)._renderTab();
  1250. return self}, function($ctx1) {$ctx1.fill(self,"update",{}, smalltalk.TabWidget)})},
  1251. messageSends: ["renderTab"]}),
  1252. smalltalk.TabWidget);
  1253. smalltalk.addMethod(
  1254. "_open",
  1255. smalltalk.method({
  1256. selector: "open",
  1257. fn: function (){
  1258. var self=this;
  1259. return smalltalk.withContext(function($ctx1) { var $1;
  1260. $1=_st(_st(self)._new())._open();
  1261. return $1;
  1262. }, function($ctx1) {$ctx1.fill(self,"open",{}, smalltalk.TabWidget.klass)})},
  1263. messageSends: ["open", "new"]}),
  1264. smalltalk.TabWidget.klass);
  1265. smalltalk.addClass('Browser', smalltalk.TabWidget, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'packagesList', 'classesList', 'protocolsList', 'methodsList', 'sourceArea', 'tabsList', 'selectedTab', 'saveButton', 'classButtons', 'methodButtons', 'unsavedChanges'], 'IDE');
  1266. smalltalk.addMethod(
  1267. "_addInstanceVariableNamed_toClass_",
  1268. smalltalk.method({
  1269. selector: "addInstanceVariableNamed:toClass:",
  1270. fn: function (aString,aClass){
  1271. var self=this;
  1272. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1273. $1=_st(_st(aClass)._instanceVariableNames())._copy();
  1274. _st($1)._add_(aString);
  1275. $2=_st($1)._yourself();
  1276. _st(_st((smalltalk.ClassBuilder || ClassBuilder))._new())._addSubclassOf_named_instanceVariableNames_package_(_st(aClass)._superclass(),_st(aClass)._name(),$2,_st(_st(aClass)._package())._name());
  1277. return self}, function($ctx1) {$ctx1.fill(self,"addInstanceVariableNamed:toClass:",{aString:aString,aClass:aClass}, smalltalk.Browser)})},
  1278. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package", "new"]}),
  1279. smalltalk.Browser);
  1280. smalltalk.addMethod(
  1281. "_addNewClass",
  1282. smalltalk.method({
  1283. selector: "addNewClass",
  1284. fn: function (){
  1285. var self=this;
  1286. var className;
  1287. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1288. className=_st(window)._prompt_("New class");
  1289. $1=_st(_st(className)._notNil())._and_((function(){
  1290. return smalltalk.withContext(function($ctx2) { return _st(className)._notEmpty();
  1291. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1292. if(smalltalk.assert($1)){
  1293. _st((smalltalk.Object || Object))._subclass_instanceVariableNames_package_(className,"",_st(self)._selectedPackage());
  1294. $2=self;
  1295. _st($2)._resetClassesList();
  1296. $3=_st($2)._updateClassesList();
  1297. $3;
  1298. _st(self)._selectClass_(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(className));
  1299. };
  1300. return self}, function($ctx1) {$ctx1.fill(self,"addNewClass",{className:className}, smalltalk.Browser)})},
  1301. messageSends: ["prompt:", "ifTrue:", "subclass:instanceVariableNames:package:", "selectedPackage", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current", "and:", "notEmpty", "notNil"]}),
  1302. smalltalk.Browser);
  1303. smalltalk.addMethod(
  1304. "_addNewProtocol",
  1305. smalltalk.method({
  1306. selector: "addNewProtocol",
  1307. fn: function (){
  1308. var self=this;
  1309. var newProtocol;
  1310. return smalltalk.withContext(function($ctx1) { var $1;
  1311. newProtocol=_st(window)._prompt_("New method protocol");
  1312. $1=_st(_st(newProtocol)._notNil())._and_((function(){
  1313. return smalltalk.withContext(function($ctx2) { return _st(newProtocol)._notEmpty();
  1314. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1315. if(smalltalk.assert($1)){
  1316. _st(self["@selectedMethod"])._category_(newProtocol);
  1317. _st(self)._setMethodProtocol_(newProtocol);
  1318. };
  1319. return self}, function($ctx1) {$ctx1.fill(self,"addNewProtocol",{newProtocol:newProtocol}, smalltalk.Browser)})},
  1320. messageSends: ["prompt:", "ifTrue:", "category:", "setMethodProtocol:", "and:", "notEmpty", "notNil"]}),
  1321. smalltalk.Browser);
  1322. smalltalk.addMethod(
  1323. "_ajaxPutAt_data_",
  1324. smalltalk.method({
  1325. selector: "ajaxPutAt:data:",
  1326. fn: function (aURL,aString){
  1327. var self=this;
  1328. 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){
  1329. 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"));
  1330. }, function($ctx2) {$ctx2.fillBlock({xhr:xhr},$ctx1)})}))]));
  1331. return self}, function($ctx1) {$ctx1.fill(self,"ajaxPutAt:data:",{aURL:aURL,aString:aString}, smalltalk.Browser)})},
  1332. messageSends: ["ajax:options:", "->", "alert:", ",", "responseText"]}),
  1333. smalltalk.Browser);
  1334. smalltalk.addMethod(
  1335. "_canBeClosed",
  1336. smalltalk.method({
  1337. selector: "canBeClosed",
  1338. fn: function (){
  1339. var self=this;
  1340. return smalltalk.withContext(function($ctx1) { return true;
  1341. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{}, smalltalk.Browser)})},
  1342. messageSends: []}),
  1343. smalltalk.Browser);
  1344. smalltalk.addMethod(
  1345. "_cancelChanges",
  1346. smalltalk.method({
  1347. selector: "cancelChanges",
  1348. fn: function (){
  1349. var self=this;
  1350. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1351. $2=self["@unsavedChanges"];
  1352. if(smalltalk.assert($2)){
  1353. $1=_st(window)._confirm_("Cancel changes?");
  1354. } else {
  1355. $1=true;
  1356. };
  1357. return $1;
  1358. }, function($ctx1) {$ctx1.fill(self,"cancelChanges",{}, smalltalk.Browser)})},
  1359. messageSends: ["ifTrue:ifFalse:", "confirm:"]}),
  1360. smalltalk.Browser);
  1361. smalltalk.addMethod(
  1362. "_classCommentSource",
  1363. smalltalk.method({
  1364. selector: "classCommentSource",
  1365. fn: function (){
  1366. var self=this;
  1367. return smalltalk.withContext(function($ctx1) { var $1;
  1368. $1=_st(self["@selectedClass"])._comment();
  1369. return $1;
  1370. }, function($ctx1) {$ctx1.fill(self,"classCommentSource",{}, smalltalk.Browser)})},
  1371. messageSends: ["comment"]}),
  1372. smalltalk.Browser);
  1373. smalltalk.addMethod(
  1374. "_classDeclarationSource",
  1375. smalltalk.method({
  1376. selector: "classDeclarationSource",
  1377. fn: function (){
  1378. var self=this;
  1379. var stream;
  1380. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7;
  1381. stream=_st("")._writeStream();
  1382. $1=self["@selectedClass"];
  1383. if(($receiver = $1) == nil || $receiver == undefined){
  1384. $2=_st(self)._classDeclarationTemplate();
  1385. return $2;
  1386. } else {
  1387. $1;
  1388. };
  1389. $3=stream;
  1390. _st($3)._nextPutAll_(_st(_st(self["@selectedClass"])._superclass())._asString());
  1391. _st($3)._nextPutAll_(" subclass: #");
  1392. _st($3)._nextPutAll_(_st(self["@selectedClass"])._name());
  1393. _st($3)._nextPutAll_(_st(_st((smalltalk.String || String))._lf()).__comma(_st((smalltalk.String || String))._tab()));
  1394. $4=_st($3)._nextPutAll_("instanceVariableNames: '");
  1395. _st(_st(self["@selectedClass"])._instanceVariableNames())._do_separatedBy_((function(each){
  1396. return smalltalk.withContext(function($ctx2) { return _st(stream)._nextPutAll_(each);
  1397. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  1398. return smalltalk.withContext(function($ctx2) { return _st(stream)._nextPutAll_(" ");
  1399. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1400. $5=stream;
  1401. _st($5)._nextPutAll_(_st(_st("'").__comma(_st((smalltalk.String || String))._lf())).__comma(_st((smalltalk.String || String))._tab()));
  1402. _st($5)._nextPutAll_("package: '");
  1403. _st($5)._nextPutAll_(_st(self["@selectedClass"])._category());
  1404. $6=_st($5)._nextPutAll_("'");
  1405. $7=_st(stream)._contents();
  1406. return $7;
  1407. }, function($ctx1) {$ctx1.fill(self,"classDeclarationSource",{stream:stream}, smalltalk.Browser)})},
  1408. messageSends: ["writeStream", "ifNil:", "classDeclarationTemplate", "nextPutAll:", "asString", "superclass", "name", ",", "tab", "lf", "do:separatedBy:", "instanceVariableNames", "category", "contents"]}),
  1409. smalltalk.Browser);
  1410. smalltalk.addMethod(
  1411. "_classDeclarationTemplate",
  1412. smalltalk.method({
  1413. selector: "classDeclarationTemplate",
  1414. fn: function (){
  1415. var self=this;
  1416. return smalltalk.withContext(function($ctx1) { var $1;
  1417. $1=_st(_st("Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''\x0a\x09package: '").__comma(_st(self)._selectedPackage())).__comma("'");
  1418. return $1;
  1419. }, function($ctx1) {$ctx1.fill(self,"classDeclarationTemplate",{}, smalltalk.Browser)})},
  1420. messageSends: [",", "selectedPackage"]}),
  1421. smalltalk.Browser);
  1422. smalltalk.addMethod(
  1423. "_classes",
  1424. smalltalk.method({
  1425. selector: "classes",
  1426. fn: function (){
  1427. var self=this;
  1428. return smalltalk.withContext(function($ctx1) { var $1;
  1429. $1=_st(_st(_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes())._select_((function(each){
  1430. return smalltalk.withContext(function($ctx2) { return _st(_st(each)._category()).__eq(self["@selectedPackage"]);
  1431. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._sort_((function(a,b){
  1432. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._name()).__lt(_st(b)._name());
  1433. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})})))._asSet();
  1434. return $1;
  1435. }, function($ctx1) {$ctx1.fill(self,"classes",{}, smalltalk.Browser)})},
  1436. messageSends: ["asSet", "sort:", "<", "name", "select:", "=", "category", "classes", "current"]}),
  1437. smalltalk.Browser);
  1438. smalltalk.addMethod(
  1439. "_commitPackage",
  1440. smalltalk.method({
  1441. selector: "commitPackage",
  1442. fn: function (){
  1443. var self=this;
  1444. return smalltalk.withContext(function($ctx1) { var $1;
  1445. $1=self["@selectedPackage"];
  1446. if(($receiver = $1) == nil || $receiver == undefined){
  1447. $1;
  1448. } else {
  1449. package_=_st((smalltalk.Package || Package))._named_(self["@selectedPackage"]);
  1450. package_;
  1451. _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){
  1452. var fileContents;
  1453. return smalltalk.withContext(function($ctx2) { fileContents=_st(_st(_st(commitStrategy)._key())._new())._exportPackage_(self["@selectedPackage"]);
  1454. fileContents;
  1455. return _st(self)._ajaxPutAt_data_(_st(commitStrategy)._value(),fileContents);
  1456. }, function($ctx2) {$ctx2.fillBlock({commitStrategy:commitStrategy,fileContents:fileContents},$ctx1)})}));
  1457. };
  1458. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage",{}, smalltalk.Browser)})},
  1459. messageSends: ["ifNotNil:", "named:", "do:", "exportPackage:", "new", "key", "ajaxPutAt:data:", "value", "->", ",", "commitPathJs", "commitPathSt"]}),
  1460. smalltalk.Browser);
  1461. smalltalk.addMethod(
  1462. "_compile",
  1463. smalltalk.method({
  1464. selector: "compile",
  1465. fn: function (){
  1466. var self=this;
  1467. var currentEditLine;
  1468. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1469. _st(self)._disableSaveButton();
  1470. currentEditLine=_st(_st(self["@sourceArea"])._editor())._getCursor();
  1471. $1=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("comment"));
  1472. if(smalltalk.assert($1)){
  1473. $2=self["@selectedClass"];
  1474. if(($receiver = $2) == nil || $receiver == undefined){
  1475. $2;
  1476. } else {
  1477. _st(self)._compileClassComment();
  1478. };
  1479. } else {
  1480. $3=_st(_st(self["@selectedProtocol"])._notNil())._or_((function(){
  1481. return smalltalk.withContext(function($ctx2) { return _st(self["@selectedMethod"])._notNil();
  1482. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1483. if(smalltalk.assert($3)){
  1484. _st(self)._compileMethodDefinition();
  1485. } else {
  1486. _st(self)._compileDefinition();
  1487. };
  1488. };
  1489. _st(_st(self["@sourceArea"])._editor())._setCursor_(currentEditLine);
  1490. return self}, function($ctx1) {$ctx1.fill(self,"compile",{currentEditLine:currentEditLine}, smalltalk.Browser)})},
  1491. messageSends: ["disableSaveButton", "getCursor", "editor", "ifTrue:ifFalse:", "ifNotNil:", "compileClassComment", "ifFalse:ifTrue:", "compileDefinition", "compileMethodDefinition", "or:", "notNil", "=", "setCursor:"]}),
  1492. smalltalk.Browser);
  1493. smalltalk.addMethod(
  1494. "_compileClassComment",
  1495. smalltalk.method({
  1496. selector: "compileClassComment",
  1497. fn: function (){
  1498. var self=this;
  1499. return smalltalk.withContext(function($ctx1) { _st(self["@selectedClass"])._comment_(_st(self["@sourceArea"])._val());
  1500. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment",{}, smalltalk.Browser)})},
  1501. messageSends: ["comment:", "val"]}),
  1502. smalltalk.Browser);
  1503. smalltalk.addMethod(
  1504. "_compileDefinition",
  1505. smalltalk.method({
  1506. selector: "compileDefinition",
  1507. fn: function (){
  1508. var self=this;
  1509. var newClass;
  1510. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1511. newClass=_st(_st((smalltalk.Compiler || Compiler))._new())._evaluateExpression_(_st(self["@sourceArea"])._val());
  1512. $1=self;
  1513. _st($1)._resetClassesList();
  1514. _st($1)._updateCategoriesList();
  1515. $2=_st($1)._updateClassesList();
  1516. _st(self)._selectClass_(newClass);
  1517. return self}, function($ctx1) {$ctx1.fill(self,"compileDefinition",{newClass:newClass}, smalltalk.Browser)})},
  1518. messageSends: ["evaluateExpression:", "val", "new", "resetClassesList", "updateCategoriesList", "updateClassesList", "selectClass:"]}),
  1519. smalltalk.Browser);
  1520. smalltalk.addMethod(
  1521. "_compileMethodDefinition",
  1522. smalltalk.method({
  1523. selector: "compileMethodDefinition",
  1524. fn: function (){
  1525. var self=this;
  1526. return smalltalk.withContext(function($ctx1) { var $1;
  1527. $1=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
  1528. if(smalltalk.assert($1)){
  1529. _st(self)._compileMethodDefinitionFor_(self["@selectedClass"]);
  1530. } else {
  1531. _st(self)._compileMethodDefinitionFor_(_st(self["@selectedClass"])._class());
  1532. };
  1533. return self}, function($ctx1) {$ctx1.fill(self,"compileMethodDefinition",{}, smalltalk.Browser)})},
  1534. messageSends: ["ifTrue:ifFalse:", "compileMethodDefinitionFor:", "class", "="]}),
  1535. smalltalk.Browser);
  1536. smalltalk.addMethod(
  1537. "_compileMethodDefinitionFor_",
  1538. smalltalk.method({
  1539. selector: "compileMethodDefinitionFor:",
  1540. fn: function (aClass){
  1541. var self=this;
  1542. var compiler,method,source,node;
  1543. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6;
  1544. var $early={};
  1545. try {
  1546. source=_st(self["@sourceArea"])._val();
  1547. $1=self["@selectedProtocol"];
  1548. if(($receiver = $1) == nil || $receiver == undefined){
  1549. self["@selectedProtocol"]=_st(self["@selectedMethod"])._category();
  1550. self["@selectedProtocol"];
  1551. } else {
  1552. $1;
  1553. };
  1554. compiler=_st((smalltalk.Compiler || Compiler))._new();
  1555. _st(compiler)._source_(source);
  1556. node=_st(compiler)._parse_(source);
  1557. $2=_st(node)._isParseFailure();
  1558. if(smalltalk.assert($2)){
  1559. $3=_st(window)._alert_(_st(_st(_st("PARSE ERROR: ").__comma(_st(node)._reason())).__comma(", position: ")).__comma(_st(_st(node)._position())._asString()));
  1560. return $3;
  1561. };
  1562. _st(compiler)._currentClass_(aClass);
  1563. method=_st(compiler)._eval_(_st(compiler)._compileNode_(node));
  1564. _st(_st(compiler)._unknownVariables())._do_((function(each){
  1565. return smalltalk.withContext(function($ctx2) { $4=_st(window)._at_(each);
  1566. if(($receiver = $4) == nil || $receiver == undefined){
  1567. $5=_st(window)._confirm_(_st(_st("Declare '").__comma(each)).__comma("' as instance variable?"));
  1568. if(smalltalk.assert($5)){
  1569. _st(self)._addInstanceVariableNamed_toClass_(each,aClass);
  1570. $6=_st(self)._compileMethodDefinitionFor_(aClass);
  1571. throw $early=[$6];
  1572. };
  1573. } else {
  1574. return $4;
  1575. };
  1576. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1577. _st(_st((smalltalk.ClassBuilder || ClassBuilder))._new())._installMethod_forClass_category_(method,aClass,self["@selectedProtocol"]);
  1578. _st(self)._updateMethodsList();
  1579. _st(self)._selectMethod_(method);
  1580. return self}
  1581. catch(e) {if(e===$early)return e[0]; throw e}
  1582. }, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,method:method,source:source,node:node}, smalltalk.Browser)})},
  1583. messageSends: ["val", "ifNil:", "category", "new", "source:", "parse:", "ifTrue:", "alert:", ",", "asString", "position", "reason", "isParseFailure", "currentClass:", "eval:", "compileNode:", "do:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "confirm:", "at:", "unknownVariables", "installMethod:forClass:category:", "updateMethodsList", "selectMethod:"]}),
  1584. smalltalk.Browser);
  1585. smalltalk.addMethod(
  1586. "_copyClass",
  1587. smalltalk.method({
  1588. selector: "copyClass",
  1589. fn: function (){
  1590. var self=this;
  1591. var className;
  1592. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1593. className=_st(window)._prompt_("Copy class");
  1594. $1=_st(_st(className)._notNil())._and_((function(){
  1595. return smalltalk.withContext(function($ctx2) { return _st(className)._notEmpty();
  1596. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1597. if(smalltalk.assert($1)){
  1598. _st(_st((smalltalk.ClassBuilder || ClassBuilder))._new())._copyClass_named_(_st(self)._selectedClass(),className);
  1599. $2=self;
  1600. _st($2)._resetClassesList();
  1601. $3=_st($2)._updateClassesList();
  1602. $3;
  1603. _st(self)._selectClass_(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(className));
  1604. };
  1605. return self}, function($ctx1) {$ctx1.fill(self,"copyClass",{className:className}, smalltalk.Browser)})},
  1606. messageSends: ["prompt:", "ifTrue:", "copyClass:named:", "selectedClass", "new", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current", "and:", "notEmpty", "notNil"]}),
  1607. smalltalk.Browser);
  1608. smalltalk.addMethod(
  1609. "_declarationSource",
  1610. smalltalk.method({
  1611. selector: "declarationSource",
  1612. fn: function (){
  1613. var self=this;
  1614. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1615. $2=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
  1616. if(smalltalk.assert($2)){
  1617. $1=_st(self)._classDeclarationSource();
  1618. } else {
  1619. $1=_st(self)._metaclassDeclarationSource();
  1620. };
  1621. return $1;
  1622. }, function($ctx1) {$ctx1.fill(self,"declarationSource",{}, smalltalk.Browser)})},
  1623. messageSends: ["ifTrue:ifFalse:", "classDeclarationSource", "metaclassDeclarationSource", "="]}),
  1624. smalltalk.Browser);
  1625. smalltalk.addMethod(
  1626. "_disableSaveButton",
  1627. smalltalk.method({
  1628. selector: "disableSaveButton",
  1629. fn: function (){
  1630. var self=this;
  1631. return smalltalk.withContext(function($ctx1) { var $1;
  1632. $1=self["@saveButton"];
  1633. if(($receiver = $1) == nil || $receiver == undefined){
  1634. $1;
  1635. } else {
  1636. _st(self["@saveButton"])._at_put_("disabled",true);
  1637. };
  1638. self["@unsavedChanges"]=false;
  1639. return self}, function($ctx1) {$ctx1.fill(self,"disableSaveButton",{}, smalltalk.Browser)})},
  1640. messageSends: ["ifNotNil:", "at:put:"]}),
  1641. smalltalk.Browser);
  1642. smalltalk.addMethod(
  1643. "_dummyMethodSource",
  1644. smalltalk.method({
  1645. selector: "dummyMethodSource",
  1646. fn: function (){
  1647. var self=this;
  1648. return smalltalk.withContext(function($ctx1) { return "messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements";
  1649. }, function($ctx1) {$ctx1.fill(self,"dummyMethodSource",{}, smalltalk.Browser)})},
  1650. messageSends: []}),
  1651. smalltalk.Browser);
  1652. smalltalk.addMethod(
  1653. "_handleSourceAreaKeyDown_",
  1654. smalltalk.method({
  1655. selector: "handleSourceAreaKeyDown:",
  1656. fn: function (anEvent){
  1657. var self=this;
  1658. return smalltalk.withContext(function($ctx1) { if(anEvent.ctrlKey) {
  1659. if(anEvent.keyCode === 83) { //ctrl+s
  1660. self._compile();
  1661. anEvent.preventDefault();
  1662. return false;
  1663. }
  1664. }
  1665. ;
  1666. return self}, function($ctx1) {$ctx1.fill(self,"handleSourceAreaKeyDown:",{anEvent:anEvent}, smalltalk.Browser)})},
  1667. messageSends: []}),
  1668. smalltalk.Browser);
  1669. smalltalk.addMethod(
  1670. "_hideClassButtons",
  1671. smalltalk.method({
  1672. selector: "hideClassButtons",
  1673. fn: function (){
  1674. var self=this;
  1675. return smalltalk.withContext(function($ctx1) { _st(_st(self["@classButtons"])._asJQuery())._hide();
  1676. return self}, function($ctx1) {$ctx1.fill(self,"hideClassButtons",{}, smalltalk.Browser)})},
  1677. messageSends: ["hide", "asJQuery"]}),
  1678. smalltalk.Browser);
  1679. smalltalk.addMethod(
  1680. "_hideMethodButtons",
  1681. smalltalk.method({
  1682. selector: "hideMethodButtons",
  1683. fn: function (){
  1684. var self=this;
  1685. return smalltalk.withContext(function($ctx1) { _st(_st(self["@methodButtons"])._asJQuery())._hide();
  1686. return self}, function($ctx1) {$ctx1.fill(self,"hideMethodButtons",{}, smalltalk.Browser)})},
  1687. messageSends: ["hide", "asJQuery"]}),
  1688. smalltalk.Browser);
  1689. smalltalk.addMethod(
  1690. "_initialize",
  1691. smalltalk.method({
  1692. selector: "initialize",
  1693. fn: function (){
  1694. var self=this;
  1695. return smalltalk.withContext(function($ctx1) { smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
  1696. self["@selectedTab"]=smalltalk.symbolFor("instance");
  1697. self["@selectedPackage"]=_st(_st(self)._packages())._first();
  1698. self["@unsavedChanges"]=false;
  1699. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.Browser)})},
  1700. messageSends: ["initialize", "first", "packages"]}),
  1701. smalltalk.Browser);
  1702. smalltalk.addMethod(
  1703. "_label",
  1704. smalltalk.method({
  1705. selector: "label",
  1706. fn: function (){
  1707. var self=this;
  1708. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1709. $2=self["@selectedClass"];
  1710. if(($receiver = $2) == nil || $receiver == undefined){
  1711. $1="Browser (nil)";
  1712. } else {
  1713. $1=_st("Browser: ").__comma(_st(self["@selectedClass"])._name());
  1714. };
  1715. return $1;
  1716. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.Browser)})},
  1717. messageSends: ["ifNil:ifNotNil:", ",", "name"]}),
  1718. smalltalk.Browser);
  1719. smalltalk.addMethod(
  1720. "_metaclassDeclarationSource",
  1721. smalltalk.method({
  1722. selector: "metaclassDeclarationSource",
  1723. fn: function (){
  1724. var self=this;
  1725. var stream;
  1726. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  1727. stream=_st("")._writeStream();
  1728. $1=self["@selectedClass"];
  1729. if(($receiver = $1) == nil || $receiver == undefined){
  1730. $1;
  1731. } else {
  1732. $2=stream;
  1733. _st($2)._nextPutAll_(_st(self["@selectedClass"])._asString());
  1734. _st($2)._nextPutAll_(" class ");
  1735. $3=_st($2)._nextPutAll_("instanceVariableNames: '");
  1736. $3;
  1737. _st(_st(_st(self["@selectedClass"])._class())._instanceVariableNames())._do_separatedBy_((function(each){
  1738. return smalltalk.withContext(function($ctx2) { return _st(stream)._nextPutAll_(each);
  1739. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  1740. return smalltalk.withContext(function($ctx2) { return _st(stream)._nextPutAll_(" ");
  1741. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1742. _st(stream)._nextPutAll_("'");
  1743. };
  1744. $4=_st(stream)._contents();
  1745. return $4;
  1746. }, function($ctx1) {$ctx1.fill(self,"metaclassDeclarationSource",{stream:stream}, smalltalk.Browser)})},
  1747. messageSends: ["writeStream", "ifNotNil:", "nextPutAll:", "asString", "do:separatedBy:", "instanceVariableNames", "class", "contents"]}),
  1748. smalltalk.Browser);
  1749. smalltalk.addMethod(
  1750. "_methodSource",
  1751. smalltalk.method({
  1752. selector: "methodSource",
  1753. fn: function (){
  1754. var self=this;
  1755. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1756. $2=self["@selectedMethod"];
  1757. if(($receiver = $2) == nil || $receiver == undefined){
  1758. $1=_st(self)._dummyMethodSource();
  1759. } else {
  1760. $1=_st(self["@selectedMethod"])._source();
  1761. };
  1762. return $1;
  1763. }, function($ctx1) {$ctx1.fill(self,"methodSource",{}, smalltalk.Browser)})},
  1764. messageSends: ["ifNil:ifNotNil:", "dummyMethodSource", "source"]}),
  1765. smalltalk.Browser);
  1766. smalltalk.addMethod(
  1767. "_methods",
  1768. smalltalk.method({
  1769. selector: "methods",
  1770. fn: function (){
  1771. var self=this;
  1772. var klass;
  1773. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$6,$7,$5,$4;
  1774. $1=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("comment"));
  1775. if(smalltalk.assert($1)){
  1776. return [];
  1777. };
  1778. $2=self["@selectedClass"];
  1779. if(($receiver = $2) == nil || $receiver == undefined){
  1780. $2;
  1781. } else {
  1782. $3=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
  1783. if(smalltalk.assert($3)){
  1784. klass=self["@selectedClass"];
  1785. } else {
  1786. klass=_st(self["@selectedClass"])._class();
  1787. };
  1788. klass;
  1789. };
  1790. $6=self["@selectedProtocol"];
  1791. if(($receiver = $6) == nil || $receiver == undefined){
  1792. $7=klass;
  1793. if(($receiver = $7) == nil || $receiver == undefined){
  1794. $5=[];
  1795. } else {
  1796. $5=_st(_st(klass)._methodDictionary())._values();
  1797. };
  1798. } else {
  1799. $5=_st(_st(_st(klass)._methodDictionary())._values())._select_((function(each){
  1800. return smalltalk.withContext(function($ctx2) { return _st(_st(each)._category()).__eq(self["@selectedProtocol"]);
  1801. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1802. };
  1803. $4=_st($5)._sort_((function(a,b){
  1804. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._selector()).__lt(_st(b)._selector());
  1805. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  1806. return $4;
  1807. }, function($ctx1) {$ctx1.fill(self,"methods",{klass:klass}, smalltalk.Browser)})},
  1808. messageSends: ["ifTrue:", "=", "ifNotNil:", "ifTrue:ifFalse:", "class", "sort:", "<", "selector", "ifNil:ifNotNil:", "values", "methodDictionary", "select:", "category"]}),
  1809. smalltalk.Browser);
  1810. smalltalk.addMethod(
  1811. "_packages",
  1812. smalltalk.method({
  1813. selector: "packages",
  1814. fn: function (){
  1815. var self=this;
  1816. var packages;
  1817. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1818. packages=_st((smalltalk.Array || Array))._new();
  1819. _st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes())._do_((function(each){
  1820. return smalltalk.withContext(function($ctx2) { $1=_st(packages)._includes_(_st(each)._category());
  1821. if(! smalltalk.assert($1)){
  1822. return _st(packages)._add_(_st(each)._category());
  1823. };
  1824. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1825. $2=_st(packages)._sort();
  1826. return $2;
  1827. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages}, smalltalk.Browser)})},
  1828. messageSends: ["new", "do:", "ifFalse:", "add:", "category", "includes:", "classes", "current", "sort"]}),
  1829. smalltalk.Browser);
  1830. smalltalk.addMethod(
  1831. "_protocols",
  1832. smalltalk.method({
  1833. selector: "protocols",
  1834. fn: function (){
  1835. var self=this;
  1836. var klass;
  1837. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7;
  1838. $1=self["@selectedClass"];
  1839. if(($receiver = $1) == nil || $receiver == undefined){
  1840. $1;
  1841. } else {
  1842. $2=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("comment"));
  1843. if(smalltalk.assert($2)){
  1844. return [];
  1845. };
  1846. $3=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
  1847. if(smalltalk.assert($3)){
  1848. klass=self["@selectedClass"];
  1849. } else {
  1850. klass=_st(self["@selectedClass"])._class();
  1851. };
  1852. klass;
  1853. $4=_st(_st(klass)._methodDictionary())._isEmpty();
  1854. if(smalltalk.assert($4)){
  1855. $5=_st((smalltalk.Array || Array))._with_("not yet classified");
  1856. return $5;
  1857. };
  1858. $6=_st(klass)._protocols();
  1859. return $6;
  1860. };
  1861. $7=_st((smalltalk.Array || Array))._new();
  1862. return $7;
  1863. }, function($ctx1) {$ctx1.fill(self,"protocols",{klass:klass}, smalltalk.Browser)})},
  1864. messageSends: ["ifNotNil:", "ifTrue:", "=", "ifTrue:ifFalse:", "class", "with:", "isEmpty", "methodDictionary", "protocols", "new"]}),
  1865. smalltalk.Browser);
  1866. smalltalk.addMethod(
  1867. "_removeClass",
  1868. smalltalk.method({
  1869. selector: "removeClass",
  1870. fn: function (){
  1871. var self=this;
  1872. return smalltalk.withContext(function($ctx1) { var $1;
  1873. $1=_st(window)._confirm_(_st(_st("Do you really want to remove ").__comma(_st(self["@selectedClass"])._name())).__comma("?"));
  1874. if(smalltalk.assert($1)){
  1875. _st(_st((smalltalk.Smalltalk || Smalltalk))._current())._removeClass_(self["@selectedClass"]);
  1876. _st(self)._resetClassesList();
  1877. _st(self)._selectClass_(nil);
  1878. };
  1879. return self}, function($ctx1) {$ctx1.fill(self,"removeClass",{}, smalltalk.Browser)})},
  1880. messageSends: ["ifTrue:", "removeClass:", "current", "resetClassesList", "selectClass:", "confirm:", ",", "name"]}),
  1881. smalltalk.Browser);
  1882. smalltalk.addMethod(
  1883. "_removeMethod",
  1884. smalltalk.method({
  1885. selector: "removeMethod",
  1886. fn: function (){
  1887. var self=this;
  1888. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1889. $1=_st(self)._cancelChanges();
  1890. if(smalltalk.assert($1)){
  1891. $2=_st(window)._confirm_(_st(_st("Do you really want to remove #").__comma(_st(self["@selectedMethod"])._selector())).__comma("?"));
  1892. if(smalltalk.assert($2)){
  1893. $3=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
  1894. if(smalltalk.assert($3)){
  1895. _st(self["@selectedClass"])._removeCompiledMethod_(self["@selectedMethod"]);
  1896. } else {
  1897. _st(_st(self["@selectedClass"])._class())._removeCompiledMethod_(self["@selectedMethod"]);
  1898. };
  1899. _st(self)._selectMethod_(nil);
  1900. };
  1901. };
  1902. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod",{}, smalltalk.Browser)})},
  1903. messageSends: ["ifTrue:", "ifTrue:ifFalse:", "removeCompiledMethod:", "class", "=", "selectMethod:", "confirm:", ",", "selector", "cancelChanges"]}),
  1904. smalltalk.Browser);
  1905. smalltalk.addMethod(
  1906. "_removePackage",
  1907. smalltalk.method({
  1908. selector: "removePackage",
  1909. fn: function (){
  1910. var self=this;
  1911. return smalltalk.withContext(function($ctx1) { var $1;
  1912. $1=_st(window)._confirm_(_st(_st("Do you really want to remove the whole package ").__comma(self["@selectedPackage"])).__comma(" with all its classes?"));
  1913. if(smalltalk.assert($1)){
  1914. _st(_st((smalltalk.Smalltalk || Smalltalk))._current())._removePackage_(self["@selectedPackage"]);
  1915. _st(self)._updateCategoriesList();
  1916. };
  1917. return self}, function($ctx1) {$ctx1.fill(self,"removePackage",{}, smalltalk.Browser)})},
  1918. messageSends: ["ifTrue:", "removePackage:", "current", "updateCategoriesList", "confirm:", ","]}),
  1919. smalltalk.Browser);
  1920. smalltalk.addMethod(
  1921. "_renameClass",
  1922. smalltalk.method({
  1923. selector: "renameClass",
  1924. fn: function (){
  1925. var self=this;
  1926. var newName;
  1927. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1928. newName=_st(window)._prompt_(_st("Rename class ").__comma(_st(self["@selectedClass"])._name()));
  1929. $1=_st(_st(newName)._notNil())._and_((function(){
  1930. return smalltalk.withContext(function($ctx2) { return _st(newName)._notEmpty();
  1931. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1932. if(smalltalk.assert($1)){
  1933. _st(self["@selectedClass"])._rename_(newName);
  1934. $2=self;
  1935. _st($2)._updateClassesList();
  1936. $3=_st($2)._updateSourceAndButtons();
  1937. $3;
  1938. };
  1939. return self}, function($ctx1) {$ctx1.fill(self,"renameClass",{newName:newName}, smalltalk.Browser)})},
  1940. messageSends: ["prompt:", ",", "name", "ifTrue:", "rename:", "updateClassesList", "updateSourceAndButtons", "and:", "notEmpty", "notNil"]}),
  1941. smalltalk.Browser);
  1942. smalltalk.addMethod(
  1943. "_renamePackage",
  1944. smalltalk.method({
  1945. selector: "renamePackage",
  1946. fn: function (){
  1947. var self=this;
  1948. var newName;
  1949. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1950. newName=_st(window)._prompt_(_st("Rename package ").__comma(self["@selectedPackage"]));
  1951. $1=newName;
  1952. if(($receiver = $1) == nil || $receiver == undefined){
  1953. $1;
  1954. } else {
  1955. $2=_st(newName)._notEmpty();
  1956. if(smalltalk.assert($2)){
  1957. _st(_st((smalltalk.Smalltalk || Smalltalk))._current())._renamePackage_to_(self["@selectedPackage"],newName);
  1958. _st(self)._updateCategoriesList();
  1959. };
  1960. };
  1961. return self}, function($ctx1) {$ctx1.fill(self,"renamePackage",{newName:newName}, smalltalk.Browser)})},
  1962. messageSends: ["prompt:", ",", "ifNotNil:", "ifTrue:", "renamePackage:to:", "current", "updateCategoriesList", "notEmpty"]}),
  1963. smalltalk.Browser);
  1964. smalltalk.addMethod(
  1965. "_renderBottomPanelOn_",
  1966. smalltalk.method({
  1967. selector: "renderBottomPanelOn:",
  1968. fn: function (html){
  1969. var self=this;
  1970. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1971. $1=_st(html)._div();
  1972. _st($1)._class_("amber_sourceCode");
  1973. $2=_st($1)._with_((function(){
  1974. return smalltalk.withContext(function($ctx2) { self["@sourceArea"]=_st((smalltalk.SourceArea || SourceArea))._new();
  1975. self["@sourceArea"];
  1976. _st(self["@sourceArea"])._renderOn_(html);
  1977. _st(self["@sourceArea"])._onKeyDown_((function(e){
  1978. return smalltalk.withContext(function($ctx3) { return _st(self)._handleSourceAreaKeyDown_(e);
  1979. }, function($ctx3) {$ctx3.fillBlock({e:e},$ctx1)})}));
  1980. return _st(self["@sourceArea"])._onKeyUp_((function(){
  1981. return smalltalk.withContext(function($ctx3) { return _st(self)._updateStatus();
  1982. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1983. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1984. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html}, smalltalk.Browser)})},
  1985. messageSends: ["class:", "div", "with:", "new", "renderOn:", "onKeyDown:", "handleSourceAreaKeyDown:", "onKeyUp:", "updateStatus"]}),
  1986. smalltalk.Browser);
  1987. smalltalk.addMethod(
  1988. "_renderBoxOn_",
  1989. smalltalk.method({
  1990. selector: "renderBoxOn:",
  1991. fn: function (html){
  1992. var self=this;
  1993. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1994. $1=self;
  1995. _st($1)._renderTopPanelOn_(html);
  1996. _st($1)._renderTabsOn_(html);
  1997. $2=_st($1)._renderBottomPanelOn_(html);
  1998. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.Browser)})},
  1999. messageSends: ["renderTopPanelOn:", "renderTabsOn:", "renderBottomPanelOn:"]}),
  2000. smalltalk.Browser);
  2001. smalltalk.addMethod(
  2002. "_renderButtonsOn_",
  2003. smalltalk.method({
  2004. selector: "renderButtonsOn:",
  2005. fn: function (html){
  2006. var self=this;
  2007. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$5,$6,$7,$8,$9,$10,$4;
  2008. self["@saveButton"]=_st(html)._button();
  2009. $1=self["@saveButton"];
  2010. _st($1)._with_("Save");
  2011. $2=_st($1)._onClick_((function(){
  2012. return smalltalk.withContext(function($ctx2) { return _st(self)._compile();
  2013. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2014. self["@methodButtons"]=_st(html)._span();
  2015. self["@classButtons"]=_st(html)._span();
  2016. $3=_st(html)._div();
  2017. _st($3)._class_("right");
  2018. $4=_st($3)._with_((function(){
  2019. return smalltalk.withContext(function($ctx2) { $5=_st(html)._button();
  2020. _st($5)._with_("DoIt");
  2021. $6=_st($5)._onClick_((function(){
  2022. return smalltalk.withContext(function($ctx3) { return _st(self["@sourceArea"])._doIt();
  2023. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2024. $6;
  2025. $7=_st(html)._button();
  2026. _st($7)._with_("PrintIt");
  2027. $8=_st($7)._onClick_((function(){
  2028. return smalltalk.withContext(function($ctx3) { return _st(self["@sourceArea"])._printIt();
  2029. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2030. $8;
  2031. $9=_st(html)._button();
  2032. _st($9)._with_("InspectIt");
  2033. $10=_st($9)._onClick_((function(){
  2034. return smalltalk.withContext(function($ctx3) { return _st(self["@sourceArea"])._inspectIt();
  2035. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2036. return $10;
  2037. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2038. _st(self)._updateSourceAndButtons();
  2039. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.Browser)})},
  2040. messageSends: ["button", "with:", "onClick:", "compile", "span", "class:", "div", "doIt", "printIt", "inspectIt", "updateSourceAndButtons"]}),
  2041. smalltalk.Browser);
  2042. smalltalk.addMethod(
  2043. "_renderTabsOn_",
  2044. smalltalk.method({
  2045. selector: "renderTabsOn:",
  2046. fn: function (html){
  2047. var self=this;
  2048. return smalltalk.withContext(function($ctx1) { self["@tabsList"]=_st(_st(html)._ul())._class_("amber_tabs amber_browser");
  2049. _st(self)._updateTabsList();
  2050. return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html}, smalltalk.Browser)})},
  2051. messageSends: ["class:", "ul", "updateTabsList"]}),
  2052. smalltalk.Browser);
  2053. smalltalk.addMethod(
  2054. "_renderTopPanelOn_",
  2055. smalltalk.method({
  2056. selector: "renderTopPanelOn:",
  2057. fn: function (html){
  2058. var self=this;
  2059. return smalltalk.withContext(function($ctx1) { var $1,$3,$5,$6,$7,$8,$9,$10,$4,$11,$12,$2;
  2060. $1=_st(html)._div();
  2061. _st($1)._class_("top");
  2062. $2=_st($1)._with_((function(){
  2063. return smalltalk.withContext(function($ctx2) { self["@packagesList"]=_st(_st(html)._ul())._class_("amber_column browser packages");
  2064. self["@packagesList"];
  2065. $3=_st(html)._div();
  2066. _st($3)._class_("amber_packagesButtons");
  2067. $4=_st($3)._with_((function(){
  2068. return smalltalk.withContext(function($ctx3) { $5=_st(html)._button();
  2069. _st($5)._title_("Commit classes in this package to disk");
  2070. _st($5)._onClick_((function(){
  2071. return smalltalk.withContext(function($ctx4) { return _st(self)._commitPackage();
  2072. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2073. $6=_st($5)._with_("Commit");
  2074. $6;
  2075. $7=_st(html)._button();
  2076. _st($7)._title_("Rename package");
  2077. _st($7)._onClick_((function(){
  2078. return smalltalk.withContext(function($ctx4) { return _st(self)._renamePackage();
  2079. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2080. $8=_st($7)._with_("Rename");
  2081. $8;
  2082. $9=_st(html)._button();
  2083. _st($9)._title_("Remove this package from the system");
  2084. _st($9)._onClick_((function(){
  2085. return smalltalk.withContext(function($ctx4) { return _st(self)._removePackage();
  2086. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2087. $10=_st($9)._with_("Remove");
  2088. return $10;
  2089. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2090. $4;
  2091. self["@classesList"]=_st((smalltalk.ClassesList || ClassesList))._on_(self);
  2092. self["@classesList"];
  2093. _st(self["@classesList"])._renderOn_(html);
  2094. self["@protocolsList"]=_st(_st(html)._ul())._class_("amber_column browser protocols");
  2095. self["@protocolsList"];
  2096. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column browser methods");
  2097. self["@methodsList"];
  2098. $11=self;
  2099. _st($11)._updateCategoriesList();
  2100. _st($11)._updateClassesList();
  2101. _st($11)._updateProtocolsList();
  2102. $12=_st($11)._updateMethodsList();
  2103. $12;
  2104. return _st(_st(html)._div())._class_("amber_clear");
  2105. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2106. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html}, smalltalk.Browser)})},
  2107. messageSends: ["class:", "div", "with:", "ul", "title:", "button", "onClick:", "commitPackage", "renamePackage", "removePackage", "on:", "renderOn:", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList"]}),
  2108. smalltalk.Browser);
  2109. smalltalk.addMethod(
  2110. "_resetClassesList",
  2111. smalltalk.method({
  2112. selector: "resetClassesList",
  2113. fn: function (){
  2114. var self=this;
  2115. return smalltalk.withContext(function($ctx1) { _st(self["@classesList"])._resetNodes();
  2116. return self}, function($ctx1) {$ctx1.fill(self,"resetClassesList",{}, smalltalk.Browser)})},
  2117. messageSends: ["resetNodes"]}),
  2118. smalltalk.Browser);
  2119. smalltalk.addMethod(
  2120. "_search_",
  2121. smalltalk.method({
  2122. selector: "search:",
  2123. fn: function (aString){
  2124. var self=this;
  2125. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2126. $1=_st(self)._cancelChanges();
  2127. if(smalltalk.assert($1)){
  2128. searchedClass=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(aString);
  2129. searchedClass;
  2130. $2=_st(searchedClass)._isClass();
  2131. if(smalltalk.assert($2)){
  2132. _st(_st(self)._class())._openOn_(searchedClass);
  2133. } else {
  2134. _st(self)._searchReferencesOf_(aString);
  2135. };
  2136. };
  2137. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString}, smalltalk.Browser)})},
  2138. messageSends: ["ifTrue:", "at:", "current", "ifTrue:ifFalse:", "openOn:", "class", "searchReferencesOf:", "isClass", "cancelChanges"]}),
  2139. smalltalk.Browser);
  2140. smalltalk.addMethod(
  2141. "_searchClassReferences",
  2142. smalltalk.method({
  2143. selector: "searchClassReferences",
  2144. fn: function (){
  2145. var self=this;
  2146. return smalltalk.withContext(function($ctx1) { _st((smalltalk.ReferencesBrowser || ReferencesBrowser))._search_(_st(self["@selectedClass"])._name());
  2147. return self}, function($ctx1) {$ctx1.fill(self,"searchClassReferences",{}, smalltalk.Browser)})},
  2148. messageSends: ["search:", "name"]}),
  2149. smalltalk.Browser);
  2150. smalltalk.addMethod(
  2151. "_searchReferencesOf_",
  2152. smalltalk.method({
  2153. selector: "searchReferencesOf:",
  2154. fn: function (aString){
  2155. var self=this;
  2156. return smalltalk.withContext(function($ctx1) { _st((smalltalk.ReferencesBrowser || ReferencesBrowser))._search_(aString);
  2157. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesOf:",{aString:aString}, smalltalk.Browser)})},
  2158. messageSends: ["search:"]}),
  2159. smalltalk.Browser);
  2160. smalltalk.addMethod(
  2161. "_selectCategory_",
  2162. smalltalk.method({
  2163. selector: "selectCategory:",
  2164. fn: function (aCategory){
  2165. var self=this;
  2166. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2167. $1=_st(self)._cancelChanges();
  2168. if(smalltalk.assert($1)){
  2169. self["@selectedPackage"]=aCategory;
  2170. self["@selectedPackage"];
  2171. self["@selectedMethod"]=nil;
  2172. self["@selectedProtocol"]=self["@selectedMethod"];
  2173. self["@selectedClass"]=self["@selectedProtocol"];
  2174. self["@selectedClass"];
  2175. _st(self)._resetClassesList();
  2176. $2=self;
  2177. _st($2)._updateCategoriesList();
  2178. _st($2)._updateClassesList();
  2179. _st($2)._updateProtocolsList();
  2180. _st($2)._updateMethodsList();
  2181. $3=_st($2)._updateSourceAndButtons();
  2182. $3;
  2183. };
  2184. return self}, function($ctx1) {$ctx1.fill(self,"selectCategory:",{aCategory:aCategory}, smalltalk.Browser)})},
  2185. messageSends: ["ifTrue:", "resetClassesList", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "cancelChanges"]}),
  2186. smalltalk.Browser);
  2187. smalltalk.addMethod(
  2188. "_selectClass_",
  2189. smalltalk.method({
  2190. selector: "selectClass:",
  2191. fn: function (aClass){
  2192. var self=this;
  2193. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2194. $1=_st(self)._cancelChanges();
  2195. if(smalltalk.assert($1)){
  2196. self["@selectedClass"]=aClass;
  2197. self["@selectedClass"];
  2198. self["@selectedMethod"]=nil;
  2199. self["@selectedProtocol"]=self["@selectedMethod"];
  2200. self["@selectedProtocol"];
  2201. $2=self;
  2202. _st($2)._updateClassesList();
  2203. _st($2)._updateProtocolsList();
  2204. _st($2)._updateMethodsList();
  2205. $3=_st($2)._updateSourceAndButtons();
  2206. $3;
  2207. };
  2208. return self}, function($ctx1) {$ctx1.fill(self,"selectClass:",{aClass:aClass}, smalltalk.Browser)})},
  2209. messageSends: ["ifTrue:", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "cancelChanges"]}),
  2210. smalltalk.Browser);
  2211. smalltalk.addMethod(
  2212. "_selectMethod_",
  2213. smalltalk.method({
  2214. selector: "selectMethod:",
  2215. fn: function (aMethod){
  2216. var self=this;
  2217. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2218. $1=_st(self)._cancelChanges();
  2219. if(smalltalk.assert($1)){
  2220. self["@selectedMethod"]=aMethod;
  2221. self["@selectedMethod"];
  2222. $2=self;
  2223. _st($2)._updateProtocolsList();
  2224. _st($2)._updateMethodsList();
  2225. $3=_st($2)._updateSourceAndButtons();
  2226. $3;
  2227. };
  2228. return self}, function($ctx1) {$ctx1.fill(self,"selectMethod:",{aMethod:aMethod}, smalltalk.Browser)})},
  2229. messageSends: ["ifTrue:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "cancelChanges"]}),
  2230. smalltalk.Browser);
  2231. smalltalk.addMethod(
  2232. "_selectProtocol_",
  2233. smalltalk.method({
  2234. selector: "selectProtocol:",
  2235. fn: function (aString){
  2236. var self=this;
  2237. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2238. $1=_st(self)._cancelChanges();
  2239. if(smalltalk.assert($1)){
  2240. self["@selectedProtocol"]=aString;
  2241. self["@selectedProtocol"];
  2242. self["@selectedMethod"]=nil;
  2243. self["@selectedMethod"];
  2244. $2=self;
  2245. _st($2)._updateProtocolsList();
  2246. _st($2)._updateMethodsList();
  2247. $3=_st($2)._updateSourceAndButtons();
  2248. $3;
  2249. };
  2250. return self}, function($ctx1) {$ctx1.fill(self,"selectProtocol:",{aString:aString}, smalltalk.Browser)})},
  2251. messageSends: ["ifTrue:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "cancelChanges"]}),
  2252. smalltalk.Browser);
  2253. smalltalk.addMethod(
  2254. "_selectTab_",
  2255. smalltalk.method({
  2256. selector: "selectTab:",
  2257. fn: function (aString){
  2258. var self=this;
  2259. return smalltalk.withContext(function($ctx1) { var $1;
  2260. $1=_st(self)._cancelChanges();
  2261. if(smalltalk.assert($1)){
  2262. self["@selectedTab"]=aString;
  2263. self["@selectedTab"];
  2264. _st(self)._selectProtocol_(nil);
  2265. _st(self)._updateTabsList();
  2266. };
  2267. return self}, function($ctx1) {$ctx1.fill(self,"selectTab:",{aString:aString}, smalltalk.Browser)})},
  2268. messageSends: ["ifTrue:", "selectProtocol:", "updateTabsList", "cancelChanges"]}),
  2269. smalltalk.Browser);
  2270. smalltalk.addMethod(
  2271. "_selectedClass",
  2272. smalltalk.method({
  2273. selector: "selectedClass",
  2274. fn: function (){
  2275. var self=this;
  2276. return smalltalk.withContext(function($ctx1) { var $1;
  2277. $1=self["@selectedClass"];
  2278. return $1;
  2279. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{}, smalltalk.Browser)})},
  2280. messageSends: []}),
  2281. smalltalk.Browser);
  2282. smalltalk.addMethod(
  2283. "_selectedPackage",
  2284. smalltalk.method({
  2285. selector: "selectedPackage",
  2286. fn: function (){
  2287. var self=this;
  2288. return smalltalk.withContext(function($ctx1) { var $1;
  2289. $1=self["@selectedPackage"];
  2290. return $1;
  2291. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{}, smalltalk.Browser)})},
  2292. messageSends: []}),
  2293. smalltalk.Browser);
  2294. smalltalk.addMethod(
  2295. "_setMethodProtocol_",
  2296. smalltalk.method({
  2297. selector: "setMethodProtocol:",
  2298. fn: function (aString){
  2299. var self=this;
  2300. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2301. $1=_st(self)._cancelChanges();
  2302. if(smalltalk.assert($1)){
  2303. $2=_st(_st(self)._protocols())._includes_(aString);
  2304. if(smalltalk.assert($2)){
  2305. _st(self["@selectedMethod"])._category_(aString);
  2306. self["@selectedProtocol"]=aString;
  2307. self["@selectedProtocol"];
  2308. self["@selectedMethod"]=self["@selectedMethod"];
  2309. self["@selectedMethod"];
  2310. $3=self;
  2311. _st($3)._updateProtocolsList();
  2312. _st($3)._updateMethodsList();
  2313. $4=_st($3)._updateSourceAndButtons();
  2314. $4;
  2315. } else {
  2316. _st(self)._addNewProtocol();
  2317. };
  2318. };
  2319. return self}, function($ctx1) {$ctx1.fill(self,"setMethodProtocol:",{aString:aString}, smalltalk.Browser)})},
  2320. messageSends: ["ifTrue:", "ifFalse:ifTrue:", "addNewProtocol", "category:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "includes:", "protocols", "cancelChanges"]}),
  2321. smalltalk.Browser);
  2322. smalltalk.addMethod(
  2323. "_showClassButtons",
  2324. smalltalk.method({
  2325. selector: "showClassButtons",
  2326. fn: function (){
  2327. var self=this;
  2328. return smalltalk.withContext(function($ctx1) { _st(_st(self["@classButtons"])._asJQuery())._show();
  2329. return self}, function($ctx1) {$ctx1.fill(self,"showClassButtons",{}, smalltalk.Browser)})},
  2330. messageSends: ["show", "asJQuery"]}),
  2331. smalltalk.Browser);
  2332. smalltalk.addMethod(
  2333. "_showMethodButtons",
  2334. smalltalk.method({
  2335. selector: "showMethodButtons",
  2336. fn: function (){
  2337. var self=this;
  2338. return smalltalk.withContext(function($ctx1) { _st(_st(self["@methodButtons"])._asJQuery())._show();
  2339. return self}, function($ctx1) {$ctx1.fill(self,"showMethodButtons",{}, smalltalk.Browser)})},
  2340. messageSends: ["show", "asJQuery"]}),
  2341. smalltalk.Browser);
  2342. smalltalk.addMethod(
  2343. "_source",
  2344. smalltalk.method({
  2345. selector: "source",
  2346. fn: function (){
  2347. var self=this;
  2348. return smalltalk.withContext(function($ctx1) { var $1,$3,$2,$5,$4;
  2349. $1=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("comment"));
  2350. if(! smalltalk.assert($1)){
  2351. $3=_st(_st(self["@selectedProtocol"])._notNil())._or_((function(){
  2352. return smalltalk.withContext(function($ctx2) { return _st(self["@selectedMethod"])._notNil();
  2353. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2354. if(smalltalk.assert($3)){
  2355. $2=_st(self)._methodSource();
  2356. } else {
  2357. $2=_st(self)._declarationSource();
  2358. };
  2359. return $2;
  2360. };
  2361. $5=self["@selectedClass"];
  2362. if(($receiver = $5) == nil || $receiver == undefined){
  2363. $4="";
  2364. } else {
  2365. $4=_st(self)._classCommentSource();
  2366. };
  2367. return $4;
  2368. }, function($ctx1) {$ctx1.fill(self,"source",{}, smalltalk.Browser)})},
  2369. messageSends: ["ifFalse:", "ifFalse:ifTrue:", "declarationSource", "methodSource", "or:", "notNil", "=", "ifNil:ifNotNil:", "classCommentSource"]}),
  2370. smalltalk.Browser);
  2371. smalltalk.addMethod(
  2372. "_updateCategoriesList",
  2373. smalltalk.method({
  2374. selector: "updateCategoriesList",
  2375. fn: function (){
  2376. var self=this;
  2377. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2378. _st(self["@packagesList"])._contents_((function(html){
  2379. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._packages())._do_((function(each){
  2380. var li,label;
  2381. return smalltalk.withContext(function($ctx3) { $1=_st(each)._isEmpty();
  2382. if(smalltalk.assert($1)){
  2383. label="Unclassified";
  2384. label;
  2385. } else {
  2386. label=each;
  2387. label;
  2388. };
  2389. li=_st(html)._li();
  2390. li;
  2391. $2=_st(self["@selectedPackage"]).__eq(each);
  2392. if(smalltalk.assert($2)){
  2393. _st(li)._class_("selected");
  2394. };
  2395. $3=li;
  2396. _st($3)._with_(label);
  2397. $4=_st($3)._onClick_((function(){
  2398. return smalltalk.withContext(function($ctx4) { return _st(self)._selectCategory_(each);
  2399. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2400. return $4;
  2401. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li,label:label},$ctx1)})}));
  2402. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  2403. return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{}, smalltalk.Browser)})},
  2404. messageSends: ["contents:", "do:", "ifTrue:ifFalse:", "isEmpty", "li", "ifTrue:", "class:", "=", "with:", "onClick:", "selectCategory:", "packages"]}),
  2405. smalltalk.Browser);
  2406. smalltalk.addMethod(
  2407. "_updateClassesList",
  2408. smalltalk.method({
  2409. selector: "updateClassesList",
  2410. fn: function (){
  2411. var self=this;
  2412. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.TabManager || TabManager))._current())._update();
  2413. _st(self["@classesList"])._updateNodes();
  2414. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{}, smalltalk.Browser)})},
  2415. messageSends: ["update", "current", "updateNodes"]}),
  2416. smalltalk.Browser);
  2417. smalltalk.addMethod(
  2418. "_updateMethodsList",
  2419. smalltalk.method({
  2420. selector: "updateMethodsList",
  2421. fn: function (){
  2422. var self=this;
  2423. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2424. _st(self["@methodsList"])._contents_((function(html){
  2425. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._methods())._do_((function(each){
  2426. var li;
  2427. return smalltalk.withContext(function($ctx3) { li=_st(html)._li();
  2428. li;
  2429. $1=_st(self["@selectedMethod"]).__eq(each);
  2430. if(smalltalk.assert($1)){
  2431. _st(li)._class_("selected");
  2432. };
  2433. $2=li;
  2434. _st($2)._with_(_st(each)._selector());
  2435. $3=_st($2)._onClick_((function(){
  2436. return smalltalk.withContext(function($ctx4) { return _st(self)._selectMethod_(each);
  2437. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2438. return $3;
  2439. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})}));
  2440. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  2441. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{}, smalltalk.Browser)})},
  2442. messageSends: ["contents:", "do:", "li", "ifTrue:", "class:", "=", "with:", "selector", "onClick:", "selectMethod:", "methods"]}),
  2443. smalltalk.Browser);
  2444. smalltalk.addMethod(
  2445. "_updateProtocolsList",
  2446. smalltalk.method({
  2447. selector: "updateProtocolsList",
  2448. fn: function (){
  2449. var self=this;
  2450. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2451. _st(self["@protocolsList"])._contents_((function(html){
  2452. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._protocols())._do_((function(each){
  2453. var li;
  2454. return smalltalk.withContext(function($ctx3) { li=_st(html)._li();
  2455. li;
  2456. $1=_st(self["@selectedProtocol"]).__eq(each);
  2457. if(smalltalk.assert($1)){
  2458. _st(li)._class_("selected");
  2459. };
  2460. $2=li;
  2461. _st($2)._with_(each);
  2462. $3=_st($2)._onClick_((function(){
  2463. return smalltalk.withContext(function($ctx4) { return _st(self)._selectProtocol_(each);
  2464. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2465. return $3;
  2466. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})}));
  2467. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  2468. return self}, function($ctx1) {$ctx1.fill(self,"updateProtocolsList",{}, smalltalk.Browser)})},
  2469. messageSends: ["contents:", "do:", "li", "ifTrue:", "class:", "=", "with:", "onClick:", "selectProtocol:", "protocols"]}),
  2470. smalltalk.Browser);
  2471. smalltalk.addMethod(
  2472. "_updateSourceAndButtons",
  2473. smalltalk.method({
  2474. selector: "updateSourceAndButtons",
  2475. fn: function (){
  2476. var self=this;
  2477. var currentProtocol;
  2478. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$15,$16,$17,$18,$19,$20,$14,$21,$22,$24,$25,$26,$27,$23,$28,$29;
  2479. _st(self)._disableSaveButton();
  2480. _st(self["@classButtons"])._contents_((function(html){
  2481. return smalltalk.withContext(function($ctx2) { $1=_st(html)._button();
  2482. _st($1)._title_("Create a new class");
  2483. _st($1)._onClick_((function(){
  2484. return smalltalk.withContext(function($ctx3) { return _st(self)._addNewClass();
  2485. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2486. $2=_st($1)._with_("New class");
  2487. $2;
  2488. $3=_st(html)._button();
  2489. _st($3)._with_("Rename class");
  2490. $4=_st($3)._onClick_((function(){
  2491. return smalltalk.withContext(function($ctx3) { return _st(self)._renameClass();
  2492. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2493. $4;
  2494. $5=_st(html)._button();
  2495. _st($5)._with_("Copy class");
  2496. $6=_st($5)._onClick_((function(){
  2497. return smalltalk.withContext(function($ctx3) { return _st(self)._copyClass();
  2498. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2499. $6;
  2500. $7=_st(html)._button();
  2501. _st($7)._with_("Remove class");
  2502. $8=_st($7)._onClick_((function(){
  2503. return smalltalk.withContext(function($ctx3) { return _st(self)._removeClass();
  2504. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2505. $8;
  2506. $9=_st(html)._button();
  2507. _st($9)._with_("References");
  2508. $10=_st($9)._onClick_((function(){
  2509. return smalltalk.withContext(function($ctx3) { return _st(self)._searchClassReferences();
  2510. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2511. return $10;
  2512. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  2513. _st(self["@methodButtons"])._contents_((function(html){
  2514. var protocolSelect,referencesSelect;
  2515. return smalltalk.withContext(function($ctx2) { $11=_st(html)._button();
  2516. _st($11)._with_("Remove method");
  2517. $12=_st($11)._onClick_((function(){
  2518. return smalltalk.withContext(function($ctx3) { return _st(self)._removeMethod();
  2519. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2520. $12;
  2521. protocolSelect=_st(html)._select();
  2522. protocolSelect;
  2523. $13=protocolSelect;
  2524. _st($13)._onChange_((function(){
  2525. return smalltalk.withContext(function($ctx3) { return _st(self)._setMethodProtocol_(_st(_st(protocolSelect)._asJQuery())._val());
  2526. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2527. $14=_st($13)._with_((function(){
  2528. return smalltalk.withContext(function($ctx3) { $15=_st(html)._option();
  2529. _st($15)._with_("Method protocol");
  2530. $16=_st($15)._at_put_("disabled","disabled");
  2531. $16;
  2532. $17=_st(html)._option();
  2533. _st($17)._class_("important");
  2534. $18=_st($17)._with_("New...");
  2535. $18;
  2536. currentProtocol=self["@selectedProtocol"];
  2537. currentProtocol;
  2538. $19=_st(_st(currentProtocol)._isNil())._and_((function(){
  2539. return smalltalk.withContext(function($ctx4) { return _st(self["@selectedMethod"])._notNil();
  2540. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2541. if(smalltalk.assert($19)){
  2542. currentProtocol=_st(self["@selectedMethod"])._category();
  2543. currentProtocol;
  2544. };
  2545. return _st(_st(self)._protocols())._do_((function(each){
  2546. var option;
  2547. return smalltalk.withContext(function($ctx4) { option=_st(_st(html)._option())._with_(each);
  2548. option;
  2549. $20=_st(currentProtocol).__eq(each);
  2550. if(smalltalk.assert($20)){
  2551. return _st(option)._at_put_("selected","selected");
  2552. };
  2553. }, function($ctx4) {$ctx4.fillBlock({each:each,option:option},$ctx1)})}));
  2554. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2555. $14;
  2556. $21=_st(self["@selectedMethod"])._isNil();
  2557. if(! smalltalk.assert($21)){
  2558. referencesSelect=_st(html)._select();
  2559. referencesSelect;
  2560. $22=referencesSelect;
  2561. _st($22)._onChange_((function(){
  2562. return smalltalk.withContext(function($ctx3) { return _st(self)._searchReferencesOf_(_st(_st(referencesSelect)._asJQuery())._val());
  2563. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2564. $23=_st($22)._with_((function(){
  2565. var option;
  2566. return smalltalk.withContext(function($ctx3) { $24=_st(html)._option();
  2567. _st($24)._with_("References");
  2568. _st($24)._at_put_("disabled","disabled");
  2569. $25=_st($24)._at_put_("selected","selected");
  2570. $25;
  2571. $26=_st(html)._option();
  2572. _st($26)._class_("important");
  2573. $27=_st($26)._with_(_st(self["@selectedMethod"])._selector());
  2574. $27;
  2575. return _st(_st(_st(self["@selectedMethod"])._messageSends())._sorted())._do_((function(each){
  2576. return smalltalk.withContext(function($ctx4) { return _st(_st(html)._option())._with_(each);
  2577. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
  2578. }, function($ctx3) {$ctx3.fillBlock({option:option},$ctx1)})}));
  2579. return $23;
  2580. };
  2581. }, function($ctx2) {$ctx2.fillBlock({html:html,protocolSelect:protocolSelect,referencesSelect:referencesSelect},$ctx1)})}));
  2582. $28=_st(self["@selectedMethod"])._isNil();
  2583. if(smalltalk.assert($28)){
  2584. _st(self)._hideMethodButtons();
  2585. $29=_st(_st(self["@selectedClass"])._isNil())._or_((function(){
  2586. return smalltalk.withContext(function($ctx2) { return _st(self["@selectedProtocol"])._notNil();
  2587. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2588. if(smalltalk.assert($29)){
  2589. _st(self)._hideClassButtons();
  2590. } else {
  2591. _st(self)._showClassButtons();
  2592. };
  2593. } else {
  2594. _st(self)._hideClassButtons();
  2595. _st(self)._showMethodButtons();
  2596. };
  2597. _st(self["@sourceArea"])._val_(_st(self)._source());
  2598. return self}, function($ctx1) {$ctx1.fill(self,"updateSourceAndButtons",{currentProtocol:currentProtocol}, smalltalk.Browser)})},
  2599. 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"]}),
  2600. smalltalk.Browser);
  2601. smalltalk.addMethod(
  2602. "_updateStatus",
  2603. smalltalk.method({
  2604. selector: "updateStatus",
  2605. fn: function (){
  2606. var self=this;
  2607. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2608. $1=_st(_st(self["@sourceArea"])._val()).__eq(_st(self)._source());
  2609. if(smalltalk.assert($1)){
  2610. $2=self["@saveButton"];
  2611. if(($receiver = $2) == nil || $receiver == undefined){
  2612. $2;
  2613. } else {
  2614. _st(self["@saveButton"])._at_put_("disabled",true);
  2615. };
  2616. self["@unsavedChanges"]=false;
  2617. self["@unsavedChanges"];
  2618. } else {
  2619. $3=self["@saveButton"];
  2620. if(($receiver = $3) == nil || $receiver == undefined){
  2621. $3;
  2622. } else {
  2623. _st(self["@saveButton"])._removeAt_("disabled");
  2624. };
  2625. self["@unsavedChanges"]=true;
  2626. self["@unsavedChanges"];
  2627. };
  2628. return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{}, smalltalk.Browser)})},
  2629. messageSends: ["ifTrue:ifFalse:", "ifNotNil:", "at:put:", "removeAt:", "=", "source", "val"]}),
  2630. smalltalk.Browser);
  2631. smalltalk.addMethod(
  2632. "_updateTabsList",
  2633. smalltalk.method({
  2634. selector: "updateTabsList",
  2635. fn: function (){
  2636. var self=this;
  2637. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15;
  2638. _st(self["@tabsList"])._contents_((function(html){
  2639. var li;
  2640. return smalltalk.withContext(function($ctx2) { li=_st(html)._li();
  2641. li;
  2642. $1=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
  2643. if(smalltalk.assert($1)){
  2644. _st(li)._class_("selected");
  2645. };
  2646. $2=li;
  2647. _st($2)._with_((function(){
  2648. return smalltalk.withContext(function($ctx3) { _st(_st(html)._span())._class_("ltab");
  2649. $3=_st(html)._span();
  2650. _st($3)._class_("mtab");
  2651. $4=_st($3)._with_("Instance");
  2652. $4;
  2653. return _st(_st(html)._span())._class_("rtab");
  2654. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2655. $5=_st($2)._onClick_((function(){
  2656. return smalltalk.withContext(function($ctx3) { return _st(self)._selectTab_(smalltalk.symbolFor("instance"));
  2657. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2658. $5;
  2659. li=_st(html)._li();
  2660. li;
  2661. $6=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("class"));
  2662. if(smalltalk.assert($6)){
  2663. _st(li)._class_("selected");
  2664. };
  2665. $7=li;
  2666. _st($7)._with_((function(){
  2667. return smalltalk.withContext(function($ctx3) { _st(_st(html)._span())._class_("ltab");
  2668. $8=_st(html)._span();
  2669. _st($8)._class_("mtab");
  2670. $9=_st($8)._with_("Class");
  2671. $9;
  2672. return _st(_st(html)._span())._class_("rtab");
  2673. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2674. $10=_st($7)._onClick_((function(){
  2675. return smalltalk.withContext(function($ctx3) { return _st(self)._selectTab_(smalltalk.symbolFor("class"));
  2676. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2677. $10;
  2678. li=_st(html)._li();
  2679. li;
  2680. $11=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("comment"));
  2681. if(smalltalk.assert($11)){
  2682. _st(li)._class_("selected");
  2683. };
  2684. $12=li;
  2685. _st($12)._with_((function(){
  2686. return smalltalk.withContext(function($ctx3) { _st(_st(html)._span())._class_("ltab");
  2687. $13=_st(html)._span();
  2688. _st($13)._class_("mtab");
  2689. $14=_st($13)._with_("Comment");
  2690. $14;
  2691. return _st(_st(html)._span())._class_("rtab");
  2692. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2693. $15=_st($12)._onClick_((function(){
  2694. return smalltalk.withContext(function($ctx3) { return _st(self)._selectTab_(smalltalk.symbolFor("comment"));
  2695. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2696. return $15;
  2697. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1)})}));
  2698. return self}, function($ctx1) {$ctx1.fill(self,"updateTabsList",{}, smalltalk.Browser)})},
  2699. messageSends: ["contents:", "li", "ifTrue:", "class:", "=", "with:", "span", "onClick:", "selectTab:"]}),
  2700. smalltalk.Browser);
  2701. smalltalk.addMethod(
  2702. "_open",
  2703. smalltalk.method({
  2704. selector: "open",
  2705. fn: function (){
  2706. var self=this;
  2707. return smalltalk.withContext(function($ctx1) { _st(_st(self)._new())._open();
  2708. return self}, function($ctx1) {$ctx1.fill(self,"open",{}, smalltalk.Browser.klass)})},
  2709. messageSends: ["open", "new"]}),
  2710. smalltalk.Browser.klass);
  2711. smalltalk.addMethod(
  2712. "_openOn_",
  2713. smalltalk.method({
  2714. selector: "openOn:",
  2715. fn: function (aClass){
  2716. var self=this;
  2717. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2718. $2=_st(self)._new();
  2719. _st($2)._open();
  2720. _st($2)._selectCategory_(_st(aClass)._category());
  2721. $3=_st($2)._selectClass_(aClass);
  2722. $1=$3;
  2723. return $1;
  2724. }, function($ctx1) {$ctx1.fill(self,"openOn:",{aClass:aClass}, smalltalk.Browser.klass)})},
  2725. messageSends: ["open", "new", "selectCategory:", "category", "selectClass:"]}),
  2726. smalltalk.Browser.klass);
  2727. smalltalk.addClass('Debugger', smalltalk.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  2728. smalltalk.addMethod(
  2729. "_allVariables",
  2730. smalltalk.method({
  2731. selector: "allVariables",
  2732. fn: function (){
  2733. var self=this;
  2734. var all;
  2735. return smalltalk.withContext(function($ctx1) { var $1;
  2736. all=_st((smalltalk.Dictionary || Dictionary))._new();
  2737. _st(_st(_st(_st(self)._receiver())._class())._allInstanceVariableNames())._do_((function(each){
  2738. return smalltalk.withContext(function($ctx2) { return _st(all)._at_put_(each,_st(_st(self)._receiver())._instVarAt_(each));
  2739. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2740. _st(_st(self["@selectedContext"])._locals())._keysAndValuesDo_((function(key,value){
  2741. return smalltalk.withContext(function($ctx2) { return _st(all)._at_put_(key,value);
  2742. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
  2743. $1=all;
  2744. return $1;
  2745. }, function($ctx1) {$ctx1.fill(self,"allVariables",{all:all}, smalltalk.Debugger)})},
  2746. messageSends: ["new", "do:", "at:put:", "instVarAt:", "receiver", "allInstanceVariableNames", "class", "keysAndValuesDo:", "locals"]}),
  2747. smalltalk.Debugger);
  2748. smalltalk.addMethod(
  2749. "_canBeClosed",
  2750. smalltalk.method({
  2751. selector: "canBeClosed",
  2752. fn: function (){
  2753. var self=this;
  2754. return smalltalk.withContext(function($ctx1) { return true;
  2755. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{}, smalltalk.Debugger)})},
  2756. messageSends: []}),
  2757. smalltalk.Debugger);
  2758. smalltalk.addMethod(
  2759. "_error",
  2760. smalltalk.method({
  2761. selector: "error",
  2762. fn: function (){
  2763. var self=this;
  2764. return smalltalk.withContext(function($ctx1) { var $1;
  2765. $1=self["@error"];
  2766. return $1;
  2767. }, function($ctx1) {$ctx1.fill(self,"error",{}, smalltalk.Debugger)})},
  2768. messageSends: []}),
  2769. smalltalk.Debugger);
  2770. smalltalk.addMethod(
  2771. "_error_",
  2772. smalltalk.method({
  2773. selector: "error:",
  2774. fn: function (anError){
  2775. var self=this;
  2776. return smalltalk.withContext(function($ctx1) { self["@error"]=anError;
  2777. return self}, function($ctx1) {$ctx1.fill(self,"error:",{anError:anError}, smalltalk.Debugger)})},
  2778. messageSends: []}),
  2779. smalltalk.Debugger);
  2780. smalltalk.addMethod(
  2781. "_initialize",
  2782. smalltalk.method({
  2783. selector: "initialize",
  2784. fn: function (){
  2785. var self=this;
  2786. return smalltalk.withContext(function($ctx1) { smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
  2787. _st(self["@unsavedChanges"]).__eq(false);
  2788. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.Debugger)})},
  2789. messageSends: ["initialize", "="]}),
  2790. smalltalk.Debugger);
  2791. smalltalk.addMethod(
  2792. "_inspectSelectedVariable",
  2793. smalltalk.method({
  2794. selector: "inspectSelectedVariable",
  2795. fn: function (){
  2796. var self=this;
  2797. return smalltalk.withContext(function($ctx1) { _st(self["@selectedVariable"])._inspect();
  2798. return self}, function($ctx1) {$ctx1.fill(self,"inspectSelectedVariable",{}, smalltalk.Debugger)})},
  2799. messageSends: ["inspect"]}),
  2800. smalltalk.Debugger);
  2801. smalltalk.addMethod(
  2802. "_label",
  2803. smalltalk.method({
  2804. selector: "label",
  2805. fn: function (){
  2806. var self=this;
  2807. return smalltalk.withContext(function($ctx1) { return "[Debugger]";
  2808. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.Debugger)})},
  2809. messageSends: []}),
  2810. smalltalk.Debugger);
  2811. smalltalk.addMethod(
  2812. "_method",
  2813. smalltalk.method({
  2814. selector: "method",
  2815. fn: function (){
  2816. var self=this;
  2817. return smalltalk.withContext(function($ctx1) { var $1;
  2818. $1=_st(self["@selectedContext"])._method();
  2819. return $1;
  2820. }, function($ctx1) {$ctx1.fill(self,"method",{}, smalltalk.Debugger)})},
  2821. messageSends: ["method"]}),
  2822. smalltalk.Debugger);
  2823. smalltalk.addMethod(
  2824. "_proceed",
  2825. smalltalk.method({
  2826. selector: "proceed",
  2827. fn: function (){
  2828. var self=this;
  2829. return smalltalk.withContext(function($ctx1) { _st(self)._close();
  2830. _st(_st(self["@selectedContext"])._receiver())._perform_withArguments_(_st(self["@selectedContext"])._selector(),_st(self["@selectedContext"])._temps());
  2831. return self}, function($ctx1) {$ctx1.fill(self,"proceed",{}, smalltalk.Debugger)})},
  2832. messageSends: ["close", "perform:withArguments:", "selector", "temps", "receiver"]}),
  2833. smalltalk.Debugger);
  2834. smalltalk.addMethod(
  2835. "_receiver",
  2836. smalltalk.method({
  2837. selector: "receiver",
  2838. fn: function (){
  2839. var self=this;
  2840. return smalltalk.withContext(function($ctx1) { var $1;
  2841. $1=_st(self["@selectedContext"])._receiver();
  2842. return $1;
  2843. }, function($ctx1) {$ctx1.fill(self,"receiver",{}, smalltalk.Debugger)})},
  2844. messageSends: ["receiver"]}),
  2845. smalltalk.Debugger);
  2846. smalltalk.addMethod(
  2847. "_renderBottomPanelOn_",
  2848. smalltalk.method({
  2849. selector: "renderBottomPanelOn:",
  2850. fn: function (html){
  2851. var self=this;
  2852. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2853. $1=_st(html)._div();
  2854. _st($1)._class_("amber_sourceCode debugger");
  2855. $2=_st($1)._with_((function(){
  2856. return smalltalk.withContext(function($ctx2) { self["@sourceArea"]=_st((smalltalk.SourceArea || SourceArea))._new();
  2857. self["@sourceArea"];
  2858. return _st(self["@sourceArea"])._renderOn_(html);
  2859. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2860. self["@ul2"]=_st(_st(html)._ul())._class_("amber_column debugger variables");
  2861. self["@inspector"]=_st(_st(html)._div())._class_("amber_column debugger inspector");
  2862. _st(self["@sourceArea"])._onKeyUp_((function(){
  2863. return smalltalk.withContext(function($ctx2) { return _st(self)._updateStatus();
  2864. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2865. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html}, smalltalk.Debugger)})},
  2866. messageSends: ["class:", "div", "with:", "new", "renderOn:", "ul", "onKeyUp:", "updateStatus"]}),
  2867. smalltalk.Debugger);
  2868. smalltalk.addMethod(
  2869. "_renderBoxOn_",
  2870. smalltalk.method({
  2871. selector: "renderBoxOn:",
  2872. fn: function (html){
  2873. var self=this;
  2874. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2875. $1=self;
  2876. _st($1)._renderTopPanelOn_(html);
  2877. $2=_st($1)._renderBottomPanelOn_(html);
  2878. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.Debugger)})},
  2879. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"]}),
  2880. smalltalk.Debugger);
  2881. smalltalk.addMethod(
  2882. "_renderButtonsOn_",
  2883. smalltalk.method({
  2884. selector: "renderButtonsOn:",
  2885. fn: function (html){
  2886. var self=this;
  2887. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16;
  2888. $1=_st(html)._button();
  2889. _st($1)._with_("Save");
  2890. $2=_st($1)._onClick_((function(){
  2891. return smalltalk.withContext(function($ctx2) { return _st(self)._save();
  2892. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2893. self["@saveButton"]=$2;
  2894. $3=_st(html)._button();
  2895. _st($3)._with_("DoIt");
  2896. $4=_st($3)._onClick_((function(){
  2897. return smalltalk.withContext(function($ctx2) { return _st(self["@sourceArea"])._doIt();
  2898. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2899. $5=_st(html)._button();
  2900. _st($5)._with_("PrintIt");
  2901. $6=_st($5)._onClick_((function(){
  2902. return smalltalk.withContext(function($ctx2) { return _st(self["@sourceArea"])._printIt();
  2903. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2904. $7=_st(html)._button();
  2905. _st($7)._with_("InspectIt");
  2906. $8=_st($7)._onClick_((function(){
  2907. return smalltalk.withContext(function($ctx2) { return _st(self["@sourceArea"])._inspectIt();
  2908. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2909. $9=_st(html)._button();
  2910. _st($9)._with_("Proceed");
  2911. $10=_st($9)._onClick_((function(){
  2912. return smalltalk.withContext(function($ctx2) { return _st(self)._proceed();
  2913. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2914. $11=_st(html)._button();
  2915. _st($11)._with_("Abandon");
  2916. $12=_st($11)._onClick_((function(){
  2917. return smalltalk.withContext(function($ctx2) { return _st(self)._close();
  2918. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2919. $13=_st(html)._button();
  2920. _st($13)._class_("amber_button debugger inspect");
  2921. _st($13)._with_("Inspect");
  2922. $14=_st($13)._onClick_((function(){
  2923. return smalltalk.withContext(function($ctx2) { return _st(self)._inspectSelectedVariable();
  2924. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2925. self["@inspectButton"]=$14;
  2926. $15=self;
  2927. _st($15)._updateSourceArea();
  2928. _st($15)._updateStatus();
  2929. _st($15)._updateVariablesList();
  2930. $16=_st($15)._updateInspector();
  2931. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.Debugger)})},
  2932. messageSends: ["with:", "button", "onClick:", "save", "doIt", "printIt", "inspectIt", "proceed", "close", "class:", "inspectSelectedVariable", "updateSourceArea", "updateStatus", "updateVariablesList", "updateInspector"]}),
  2933. smalltalk.Debugger);
  2934. smalltalk.addMethod(
  2935. "_renderContext_on_",
  2936. smalltalk.method({
  2937. selector: "renderContext:on:",
  2938. fn: function (aContext,html){
  2939. var self=this;
  2940. var li;
  2941. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2942. li=_st(html)._li();
  2943. $1=_st(self["@selectedContext"]).__eq(aContext);
  2944. if(smalltalk.assert($1)){
  2945. _st(li)._class_("selected");
  2946. };
  2947. $2=li;
  2948. _st($2)._with_(_st(aContext)._asString());
  2949. $3=_st($2)._onClick_((function(){
  2950. return smalltalk.withContext(function($ctx2) { return _st(self)._selectContext_(aContext);
  2951. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2952. $4=_st(aContext)._outerContext();
  2953. if(($receiver = $4) == nil || $receiver == undefined){
  2954. $4;
  2955. } else {
  2956. _st(self)._renderContext_on_(_st(aContext)._outerContext(),html);
  2957. };
  2958. return self}, function($ctx1) {$ctx1.fill(self,"renderContext:on:",{aContext:aContext,html:html,li:li}, smalltalk.Debugger)})},
  2959. messageSends: ["li", "ifTrue:", "class:", "=", "with:", "asString", "onClick:", "selectContext:", "ifNotNil:", "renderContext:on:", "outerContext"]}),
  2960. smalltalk.Debugger);
  2961. smalltalk.addMethod(
  2962. "_renderTopPanelOn_",
  2963. smalltalk.method({
  2964. selector: "renderTopPanelOn:",
  2965. fn: function (html){
  2966. var self=this;
  2967. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$6,$2;
  2968. self["@selectedContext"]=_st(_st(self)._error())._context();
  2969. $1=_st(html)._div();
  2970. _st($1)._class_("top");
  2971. $2=_st($1)._with_((function(){
  2972. return smalltalk.withContext(function($ctx2) { $3=_st(html)._div();
  2973. _st($3)._class_("label");
  2974. $4=_st($3)._with_(_st(_st(self)._error())._messageText());
  2975. $4;
  2976. $5=_st(html)._ul();
  2977. _st($5)._class_("amber_column debugger contexts");
  2978. $6=_st($5)._with_((function(){
  2979. return smalltalk.withContext(function($ctx3) { return _st(self)._renderContext_on_(_st(_st(self)._error())._context(),html);
  2980. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2981. self["@ul"]=$6;
  2982. return self["@ul"];
  2983. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2984. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html}, smalltalk.Debugger)})},
  2985. messageSends: ["context", "error", "class:", "div", "with:", "messageText", "ul", "renderContext:on:"]}),
  2986. smalltalk.Debugger);
  2987. smalltalk.addMethod(
  2988. "_save",
  2989. smalltalk.method({
  2990. selector: "save",
  2991. fn: function (){
  2992. var self=this;
  2993. var protocol;
  2994. return smalltalk.withContext(function($ctx1) { protocol=_st(_st(_st(_st(_st(self["@selectedContext"])._receiver())._class())._methodDictionary())._at_(_st(self["@selectedContext"])._selector()))._category();
  2995. _st(_st(_st(self["@selectedContext"])._receiver())._class())._compile_category_(_st(self["@sourceArea"])._val(),protocol);
  2996. _st(self)._updateStatus();
  2997. return self}, function($ctx1) {$ctx1.fill(self,"save",{protocol:protocol}, smalltalk.Debugger)})},
  2998. messageSends: ["category", "at:", "selector", "methodDictionary", "class", "receiver", "compile:category:", "val", "updateStatus"]}),
  2999. smalltalk.Debugger);
  3000. smalltalk.addMethod(
  3001. "_selectContext_",
  3002. smalltalk.method({
  3003. selector: "selectContext:",
  3004. fn: function (aContext){
  3005. var self=this;
  3006. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3007. self["@selectedContext"]=aContext;
  3008. self["@selectedVariable"]=nil;
  3009. self["@selectedVariableName"]=nil;
  3010. $1=self;
  3011. _st($1)._updateContextsList();
  3012. _st($1)._updateSourceArea();
  3013. _st($1)._updateInspector();
  3014. _st($1)._updateVariablesList();
  3015. $2=_st($1)._updateStatus();
  3016. return self}, function($ctx1) {$ctx1.fill(self,"selectContext:",{aContext:aContext}, smalltalk.Debugger)})},
  3017. messageSends: ["updateContextsList", "updateSourceArea", "updateInspector", "updateVariablesList", "updateStatus"]}),
  3018. smalltalk.Debugger);
  3019. smalltalk.addMethod(
  3020. "_selectVariable_named_",
  3021. smalltalk.method({
  3022. selector: "selectVariable:named:",
  3023. fn: function (anObject,aString){
  3024. var self=this;
  3025. return smalltalk.withContext(function($ctx1) { self["@selectedVariable"]=anObject;
  3026. self["@selectedVariableName"]=aString;
  3027. _st(self["@inspector"])._contents_((function(html){
  3028. return smalltalk.withContext(function($ctx2) { return _st(html)._with_(_st(anObject)._printString());
  3029. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  3030. _st(self)._updateVariablesList();
  3031. return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:named:",{anObject:anObject,aString:aString}, smalltalk.Debugger)})},
  3032. messageSends: ["contents:", "with:", "printString", "updateVariablesList"]}),
  3033. smalltalk.Debugger);
  3034. smalltalk.addMethod(
  3035. "_source",
  3036. smalltalk.method({
  3037. selector: "source",
  3038. fn: function (){
  3039. var self=this;
  3040. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3041. $2=_st(self)._method();
  3042. if(($receiver = $2) == nil || $receiver == undefined){
  3043. $1="Method doesn't exist!";
  3044. } else {
  3045. $1=_st(_st(self)._method())._source();
  3046. };
  3047. return $1;
  3048. }, function($ctx1) {$ctx1.fill(self,"source",{}, smalltalk.Debugger)})},
  3049. messageSends: ["ifNil:ifNotNil:", "source", "method"]}),
  3050. smalltalk.Debugger);
  3051. smalltalk.addMethod(
  3052. "_updateContextsList",
  3053. smalltalk.method({
  3054. selector: "updateContextsList",
  3055. fn: function (){
  3056. var self=this;
  3057. return smalltalk.withContext(function($ctx1) { _st(self["@ul"])._contents_((function(html){
  3058. return smalltalk.withContext(function($ctx2) { return _st(self)._renderContext_on_(_st(_st(self)._error())._context(),html);
  3059. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  3060. return self}, function($ctx1) {$ctx1.fill(self,"updateContextsList",{}, smalltalk.Debugger)})},
  3061. messageSends: ["contents:", "renderContext:on:", "context", "error"]}),
  3062. smalltalk.Debugger);
  3063. smalltalk.addMethod(
  3064. "_updateInspector",
  3065. smalltalk.method({
  3066. selector: "updateInspector",
  3067. fn: function (){
  3068. var self=this;
  3069. return smalltalk.withContext(function($ctx1) { _st(self["@inspector"])._contents_((function(html){
  3070. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  3071. return self}, function($ctx1) {$ctx1.fill(self,"updateInspector",{}, smalltalk.Debugger)})},
  3072. messageSends: ["contents:"]}),
  3073. smalltalk.Debugger);
  3074. smalltalk.addMethod(
  3075. "_updateSourceArea",
  3076. smalltalk.method({
  3077. selector: "updateSourceArea",
  3078. fn: function (){
  3079. var self=this;
  3080. return smalltalk.withContext(function($ctx1) { _st(self["@sourceArea"])._val_(_st(self)._source());
  3081. return self}, function($ctx1) {$ctx1.fill(self,"updateSourceArea",{}, smalltalk.Debugger)})},
  3082. messageSends: ["val:", "source"]}),
  3083. smalltalk.Debugger);
  3084. smalltalk.addMethod(
  3085. "_updateStatus",
  3086. smalltalk.method({
  3087. selector: "updateStatus",
  3088. fn: function (){
  3089. var self=this;
  3090. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  3091. $1=_st(_st(self["@sourceArea"])._val()).__eq(_st(self)._source());
  3092. if(smalltalk.assert($1)){
  3093. $2=self["@saveButton"];
  3094. if(($receiver = $2) == nil || $receiver == undefined){
  3095. $2;
  3096. } else {
  3097. _st(self["@saveButton"])._at_put_("disabled",true);
  3098. };
  3099. self["@unsavedChanges"]=false;
  3100. self["@unsavedChanges"];
  3101. } else {
  3102. $3=self["@saveButton"];
  3103. if(($receiver = $3) == nil || $receiver == undefined){
  3104. $3;
  3105. } else {
  3106. _st(self["@saveButton"])._removeAt_("disabled");
  3107. };
  3108. self["@unsavedChanges"]=true;
  3109. self["@unsavedChanges"];
  3110. };
  3111. return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{}, smalltalk.Debugger)})},
  3112. messageSends: ["ifTrue:ifFalse:", "ifNotNil:", "at:put:", "removeAt:", "=", "source", "val"]}),
  3113. smalltalk.Debugger);
  3114. smalltalk.addMethod(
  3115. "_updateVariablesList",
  3116. smalltalk.method({
  3117. selector: "updateVariablesList",
  3118. fn: function (){
  3119. var self=this;
  3120. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7;
  3121. _st(self["@ul2"])._contents_((function(html){
  3122. var li;
  3123. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  3124. _st($1)._with_("self");
  3125. $2=_st($1)._onClick_((function(){
  3126. return smalltalk.withContext(function($ctx3) { return _st(self)._selectVariable_named_(_st(self)._receiver(),"self");
  3127. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  3128. li=$2;
  3129. li;
  3130. $3=_st(self["@selectedVariableName"]).__eq("self");
  3131. if(smalltalk.assert($3)){
  3132. _st(li)._class_("selected");
  3133. };
  3134. return _st(_st(self)._allVariables())._keysAndValuesDo_((function(key,value){
  3135. return smalltalk.withContext(function($ctx3) { $4=_st(html)._li();
  3136. _st($4)._with_(key);
  3137. $5=_st($4)._onClick_((function(){
  3138. return smalltalk.withContext(function($ctx4) { return _st(self)._selectVariable_named_(value,key);
  3139. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  3140. li=$5;
  3141. li;
  3142. $6=_st(self["@selectedVariableName"]).__eq(key);
  3143. if(smalltalk.assert($6)){
  3144. return _st(li)._class_("selected");
  3145. };
  3146. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx1)})}));
  3147. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1)})}));
  3148. $7=self["@selectedVariable"];
  3149. if(($receiver = $7) == nil || $receiver == undefined){
  3150. _st(self["@inspectButton"])._at_put_("disabled",true);
  3151. } else {
  3152. _st(self["@inspectButton"])._removeAt_("disabled");
  3153. };
  3154. return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{}, smalltalk.Debugger)})},
  3155. messageSends: ["contents:", "with:", "li", "onClick:", "selectVariable:named:", "receiver", "ifTrue:", "class:", "=", "keysAndValuesDo:", "allVariables", "ifNil:ifNotNil:", "at:put:", "removeAt:"]}),
  3156. smalltalk.Debugger);
  3157. smalltalk.addClass('IDETranscript', smalltalk.TabWidget, ['textarea'], 'IDE');
  3158. smalltalk.addMethod(
  3159. "_clear",
  3160. smalltalk.method({
  3161. selector: "clear",
  3162. fn: function (){
  3163. var self=this;
  3164. return smalltalk.withContext(function($ctx1) { _st(_st(self["@textarea"])._asJQuery())._val_("");
  3165. return self}, function($ctx1) {$ctx1.fill(self,"clear",{}, smalltalk.IDETranscript)})},
  3166. messageSends: ["val:", "asJQuery"]}),
  3167. smalltalk.IDETranscript);
  3168. smalltalk.addMethod(
  3169. "_cr",
  3170. smalltalk.method({
  3171. selector: "cr",
  3172. fn: function (){
  3173. var self=this;
  3174. return smalltalk.withContext(function($ctx1) { _st(_st(self["@textarea"])._asJQuery())._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st((smalltalk.String || String))._cr()));
  3175. return self}, function($ctx1) {$ctx1.fill(self,"cr",{}, smalltalk.IDETranscript)})},
  3176. messageSends: ["val:", ",", "cr", "val", "asJQuery"]}),
  3177. smalltalk.IDETranscript);
  3178. smalltalk.addMethod(
  3179. "_label",
  3180. smalltalk.method({
  3181. selector: "label",
  3182. fn: function (){
  3183. var self=this;
  3184. return smalltalk.withContext(function($ctx1) { return "Transcript";
  3185. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.IDETranscript)})},
  3186. messageSends: []}),
  3187. smalltalk.IDETranscript);
  3188. smalltalk.addMethod(
  3189. "_open",
  3190. smalltalk.method({
  3191. selector: "open",
  3192. fn: function (){
  3193. var self=this;
  3194. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3195. $1=_st((smalltalk.TabManager || TabManager))._current();
  3196. _st($1)._open();
  3197. $2=_st($1)._selectTab_(self);
  3198. return self}, function($ctx1) {$ctx1.fill(self,"open",{}, smalltalk.IDETranscript)})},
  3199. messageSends: ["open", "current", "selectTab:"]}),
  3200. smalltalk.IDETranscript);
  3201. smalltalk.addMethod(
  3202. "_renderBoxOn_",
  3203. smalltalk.method({
  3204. selector: "renderBoxOn:",
  3205. fn: function (html){
  3206. var self=this;
  3207. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3208. self["@textarea"]=_st(html)._textarea();
  3209. $1=self["@textarea"];
  3210. _st($1)._class_("amber_transcript");
  3211. $2=_st($1)._at_put_("spellcheck","false");
  3212. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.IDETranscript)})},
  3213. messageSends: ["textarea", "class:", "at:put:"]}),
  3214. smalltalk.IDETranscript);
  3215. smalltalk.addMethod(
  3216. "_renderButtonsOn_",
  3217. smalltalk.method({
  3218. selector: "renderButtonsOn:",
  3219. fn: function (html){
  3220. var self=this;
  3221. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3222. $1=_st(html)._button();
  3223. _st($1)._with_("Clear transcript");
  3224. $2=_st($1)._onClick_((function(){
  3225. return smalltalk.withContext(function($ctx2) { return _st(self)._clear();
  3226. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3227. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.IDETranscript)})},
  3228. messageSends: ["with:", "button", "onClick:", "clear"]}),
  3229. smalltalk.IDETranscript);
  3230. smalltalk.addMethod(
  3231. "_show_",
  3232. smalltalk.method({
  3233. selector: "show:",
  3234. fn: function (anObject){
  3235. var self=this;
  3236. return smalltalk.withContext(function($ctx1) { var $1;
  3237. $1=self["@textarea"];
  3238. if(($receiver = $1) == nil || $receiver == undefined){
  3239. _st(self)._open();
  3240. } else {
  3241. $1;
  3242. };
  3243. _st(_st(self["@textarea"])._asJQuery())._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st(anObject)._asString()));
  3244. return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject}, smalltalk.IDETranscript)})},
  3245. messageSends: ["ifNil:", "open", "val:", ",", "asString", "val", "asJQuery"]}),
  3246. smalltalk.IDETranscript);
  3247. smalltalk.IDETranscript.klass.iVarNames = ['current'];
  3248. smalltalk.addMethod(
  3249. "_current",
  3250. smalltalk.method({
  3251. selector: "current",
  3252. fn: function (){
  3253. var self=this;
  3254. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3255. $2=self["@current"];
  3256. if(($receiver = $2) == nil || $receiver == undefined){
  3257. self["@current"]=smalltalk.TabWidget.klass.fn.prototype._new.apply(_st(self), []);
  3258. $1=self["@current"];
  3259. } else {
  3260. $1=$2;
  3261. };
  3262. return $1;
  3263. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.IDETranscript.klass)})},
  3264. messageSends: ["ifNil:", "new"]}),
  3265. smalltalk.IDETranscript.klass);
  3266. smalltalk.addMethod(
  3267. "_initialize",
  3268. smalltalk.method({
  3269. selector: "initialize",
  3270. fn: function (){
  3271. var self=this;
  3272. return smalltalk.withContext(function($ctx1) { _st((smalltalk.Transcript || Transcript))._register_(_st(self)._current());
  3273. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.IDETranscript.klass)})},
  3274. messageSends: ["register:", "current"]}),
  3275. smalltalk.IDETranscript.klass);
  3276. smalltalk.addMethod(
  3277. "_new",
  3278. smalltalk.method({
  3279. selector: "new",
  3280. fn: function (){
  3281. var self=this;
  3282. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  3283. return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.IDETranscript.klass)})},
  3284. messageSends: ["shouldNotImplement"]}),
  3285. smalltalk.IDETranscript.klass);
  3286. smalltalk.addMethod(
  3287. "_open",
  3288. smalltalk.method({
  3289. selector: "open",
  3290. fn: function (){
  3291. var self=this;
  3292. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3293. $1=_st((smalltalk.TabManager || TabManager))._current();
  3294. _st($1)._open();
  3295. $2=_st($1)._selectTab_(_st(self)._current());
  3296. return self}, function($ctx1) {$ctx1.fill(self,"open",{}, smalltalk.IDETranscript.klass)})},
  3297. messageSends: ["open", "current", "selectTab:"]}),
  3298. smalltalk.IDETranscript.klass);
  3299. smalltalk.addClass('Inspector', smalltalk.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  3300. smalltalk.addMethod(
  3301. "_canBeClosed",
  3302. smalltalk.method({
  3303. selector: "canBeClosed",
  3304. fn: function (){
  3305. var self=this;
  3306. return smalltalk.withContext(function($ctx1) { return true;
  3307. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{}, smalltalk.Inspector)})},
  3308. messageSends: []}),
  3309. smalltalk.Inspector);
  3310. smalltalk.addMethod(
  3311. "_dive",
  3312. smalltalk.method({
  3313. selector: "dive",
  3314. fn: function (){
  3315. var self=this;
  3316. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._variables())._at_(_st(self)._selectedVariable()))._inspect();
  3317. return self}, function($ctx1) {$ctx1.fill(self,"dive",{}, smalltalk.Inspector)})},
  3318. messageSends: ["inspect", "at:", "selectedVariable", "variables"]}),
  3319. smalltalk.Inspector);
  3320. smalltalk.addMethod(
  3321. "_inspect_",
  3322. smalltalk.method({
  3323. selector: "inspect:",
  3324. fn: function (anObject){
  3325. var self=this;
  3326. return smalltalk.withContext(function($ctx1) { self["@object"]=anObject;
  3327. self["@variables"]=[];
  3328. _st(self["@object"])._inspectOn_(self);
  3329. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject}, smalltalk.Inspector)})},
  3330. messageSends: ["inspectOn:"]}),
  3331. smalltalk.Inspector);
  3332. smalltalk.addMethod(
  3333. "_label",
  3334. smalltalk.method({
  3335. selector: "label",
  3336. fn: function (){
  3337. var self=this;
  3338. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3339. $2=self["@label"];
  3340. if(($receiver = $2) == nil || $receiver == undefined){
  3341. $1="Inspector (nil)";
  3342. } else {
  3343. $1=$2;
  3344. };
  3345. return $1;
  3346. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.Inspector)})},
  3347. messageSends: ["ifNil:"]}),
  3348. smalltalk.Inspector);
  3349. smalltalk.addMethod(
  3350. "_refresh",
  3351. smalltalk.method({
  3352. selector: "refresh",
  3353. fn: function (){
  3354. var self=this;
  3355. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3356. $1=self;
  3357. _st($1)._inspect_(self["@object"]);
  3358. _st($1)._updateVariablesList();
  3359. $2=_st($1)._updateValueTextarea();
  3360. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{}, smalltalk.Inspector)})},
  3361. messageSends: ["inspect:", "updateVariablesList", "updateValueTextarea"]}),
  3362. smalltalk.Inspector);
  3363. smalltalk.addMethod(
  3364. "_renderBottomPanelOn_",
  3365. smalltalk.method({
  3366. selector: "renderBottomPanelOn:",
  3367. fn: function (html){
  3368. var self=this;
  3369. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  3370. $1=_st(html)._div();
  3371. _st($1)._class_("amber_sourceCode");
  3372. $2=_st($1)._with_((function(){
  3373. return smalltalk.withContext(function($ctx2) { $3=_st((smalltalk.SourceArea || SourceArea))._new();
  3374. _st($3)._receiver_(self["@object"]);
  3375. _st($3)._onDoIt_((function(){
  3376. return smalltalk.withContext(function($ctx3) { return _st(self)._refresh();
  3377. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  3378. $4=_st($3)._yourself();
  3379. self["@sourceArea"]=$4;
  3380. self["@sourceArea"];
  3381. return _st(self["@sourceArea"])._renderOn_(html);
  3382. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3383. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html}, smalltalk.Inspector)})},
  3384. messageSends: ["class:", "div", "with:", "receiver:", "new", "onDoIt:", "refresh", "yourself", "renderOn:"]}),
  3385. smalltalk.Inspector);
  3386. smalltalk.addMethod(
  3387. "_renderBoxOn_",
  3388. smalltalk.method({
  3389. selector: "renderBoxOn:",
  3390. fn: function (html){
  3391. var self=this;
  3392. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3393. $1=self;
  3394. _st($1)._renderTopPanelOn_(html);
  3395. $2=_st($1)._renderBottomPanelOn_(html);
  3396. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.Inspector)})},
  3397. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"]}),
  3398. smalltalk.Inspector);
  3399. smalltalk.addMethod(
  3400. "_renderButtonsOn_",
  3401. smalltalk.method({
  3402. selector: "renderButtonsOn:",
  3403. fn: function (html){
  3404. var self=this;
  3405. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6;
  3406. $1=_st(html)._button();
  3407. _st($1)._with_("DoIt");
  3408. $2=_st($1)._onClick_((function(){
  3409. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._sourceArea())._doIt();
  3410. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3411. $3=_st(html)._button();
  3412. _st($3)._with_("PrintIt");
  3413. $4=_st($3)._onClick_((function(){
  3414. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._sourceArea())._printIt();
  3415. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3416. $5=_st(html)._button();
  3417. _st($5)._with_("InspectIt");
  3418. $6=_st($5)._onClick_((function(){
  3419. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._sourceArea())._inspectIt();
  3420. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3421. _st(self)._updateButtons();
  3422. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.Inspector)})},
  3423. messageSends: ["with:", "button", "onClick:", "doIt", "sourceArea", "printIt", "inspectIt", "updateButtons"]}),
  3424. smalltalk.Inspector);
  3425. smalltalk.addMethod(
  3426. "_renderTopPanelOn_",
  3427. smalltalk.method({
  3428. selector: "renderTopPanelOn:",
  3429. fn: function (html){
  3430. var self=this;
  3431. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$7,$8,$9,$10,$6,$2,$11,$12;
  3432. $1=_st(html)._div();
  3433. _st($1)._class_("top");
  3434. $2=_st($1)._with_((function(){
  3435. return smalltalk.withContext(function($ctx2) { self["@variablesList"]=_st(_st(html)._ul())._class_("amber_column variables");
  3436. self["@variablesList"];
  3437. $3=_st(html)._textarea();
  3438. _st($3)._class_("amber_column value");
  3439. $4=_st($3)._at_put_("readonly","readonly");
  3440. self["@valueTextarea"]=$4;
  3441. self["@valueTextarea"];
  3442. $5=_st(html)._div();
  3443. _st($5)._class_("amber_tabs inspector");
  3444. $6=_st($5)._with_((function(){
  3445. return smalltalk.withContext(function($ctx3) { $7=_st(html)._button();
  3446. _st($7)._class_("amber_button inspector refresh");
  3447. _st($7)._with_("Refresh");
  3448. $8=_st($7)._onClick_((function(){
  3449. return smalltalk.withContext(function($ctx4) { return _st(self)._refresh();
  3450. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  3451. $8;
  3452. $9=_st(html)._button();
  3453. _st($9)._class_("amber_button inspector dive");
  3454. _st($9)._with_("Dive");
  3455. $10=_st($9)._onClick_((function(){
  3456. return smalltalk.withContext(function($ctx4) { return _st(self)._dive();
  3457. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  3458. self["@diveButton"]=$10;
  3459. return self["@diveButton"];
  3460. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  3461. $6;
  3462. return _st(_st(html)._div())._class_("amber_clear");
  3463. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3464. $11=self;
  3465. _st($11)._updateVariablesList();
  3466. $12=_st($11)._updateValueTextarea();
  3467. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html}, smalltalk.Inspector)})},
  3468. messageSends: ["class:", "div", "with:", "ul", "textarea", "at:put:", "button", "onClick:", "refresh", "dive", "updateVariablesList", "updateValueTextarea"]}),
  3469. smalltalk.Inspector);
  3470. smalltalk.addMethod(
  3471. "_selectVariable_",
  3472. smalltalk.method({
  3473. selector: "selectVariable:",
  3474. fn: function (aString){
  3475. var self=this;
  3476. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3477. _st(self)._selectedVariable_(aString);
  3478. $1=self;
  3479. _st($1)._updateVariablesList();
  3480. _st($1)._updateValueTextarea();
  3481. $2=_st($1)._updateButtons();
  3482. return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:",{aString:aString}, smalltalk.Inspector)})},
  3483. messageSends: ["selectedVariable:", "updateVariablesList", "updateValueTextarea", "updateButtons"]}),
  3484. smalltalk.Inspector);
  3485. smalltalk.addMethod(
  3486. "_selectedVariable",
  3487. smalltalk.method({
  3488. selector: "selectedVariable",
  3489. fn: function (){
  3490. var self=this;
  3491. return smalltalk.withContext(function($ctx1) { var $1;
  3492. $1=self["@selectedVariable"];
  3493. return $1;
  3494. }, function($ctx1) {$ctx1.fill(self,"selectedVariable",{}, smalltalk.Inspector)})},
  3495. messageSends: []}),
  3496. smalltalk.Inspector);
  3497. smalltalk.addMethod(
  3498. "_selectedVariable_",
  3499. smalltalk.method({
  3500. selector: "selectedVariable:",
  3501. fn: function (aString){
  3502. var self=this;
  3503. return smalltalk.withContext(function($ctx1) { self["@selectedVariable"]=aString;
  3504. return self}, function($ctx1) {$ctx1.fill(self,"selectedVariable:",{aString:aString}, smalltalk.Inspector)})},
  3505. messageSends: []}),
  3506. smalltalk.Inspector);
  3507. smalltalk.addMethod(
  3508. "_setLabel_",
  3509. smalltalk.method({
  3510. selector: "setLabel:",
  3511. fn: function (aString){
  3512. var self=this;
  3513. return smalltalk.withContext(function($ctx1) { self["@label"]=aString;
  3514. return self}, function($ctx1) {$ctx1.fill(self,"setLabel:",{aString:aString}, smalltalk.Inspector)})},
  3515. messageSends: []}),
  3516. smalltalk.Inspector);
  3517. smalltalk.addMethod(
  3518. "_setVariables_",
  3519. smalltalk.method({
  3520. selector: "setVariables:",
  3521. fn: function (aCollection){
  3522. var self=this;
  3523. return smalltalk.withContext(function($ctx1) { self["@variables"]=aCollection;
  3524. return self}, function($ctx1) {$ctx1.fill(self,"setVariables:",{aCollection:aCollection}, smalltalk.Inspector)})},
  3525. messageSends: []}),
  3526. smalltalk.Inspector);
  3527. smalltalk.addMethod(
  3528. "_sourceArea",
  3529. smalltalk.method({
  3530. selector: "sourceArea",
  3531. fn: function (){
  3532. var self=this;
  3533. return smalltalk.withContext(function($ctx1) { var $1;
  3534. $1=self["@sourceArea"];
  3535. return $1;
  3536. }, function($ctx1) {$ctx1.fill(self,"sourceArea",{}, smalltalk.Inspector)})},
  3537. messageSends: []}),
  3538. smalltalk.Inspector);
  3539. smalltalk.addMethod(
  3540. "_updateButtons",
  3541. smalltalk.method({
  3542. selector: "updateButtons",
  3543. fn: function (){
  3544. var self=this;
  3545. return smalltalk.withContext(function($ctx1) { var $1;
  3546. $1=_st(_st(_st(self)._selectedVariable())._notNil())._and_((function(){
  3547. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(self)._variables())._at_(_st(self)._selectedVariable()))._notNil();
  3548. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3549. if(smalltalk.assert($1)){
  3550. _st(self["@diveButton"])._removeAt_("disabled");
  3551. } else {
  3552. _st(self["@diveButton"])._at_put_("disabled",true);
  3553. };
  3554. return self}, function($ctx1) {$ctx1.fill(self,"updateButtons",{}, smalltalk.Inspector)})},
  3555. messageSends: ["ifFalse:ifTrue:", "at:put:", "removeAt:", "and:", "notNil", "at:", "selectedVariable", "variables"]}),
  3556. smalltalk.Inspector);
  3557. smalltalk.addMethod(
  3558. "_updateValueTextarea",
  3559. smalltalk.method({
  3560. selector: "updateValueTextarea",
  3561. fn: function (){
  3562. var self=this;
  3563. return smalltalk.withContext(function($ctx1) { var $1,$3,$2;
  3564. $1=_st(self["@valueTextarea"])._asJQuery();
  3565. $3=_st(_st(self)._selectedVariable())._isNil();
  3566. if(smalltalk.assert($3)){
  3567. $2="";
  3568. } else {
  3569. $2=_st(_st(_st(self)._variables())._at_(_st(self)._selectedVariable()))._printString();
  3570. };
  3571. _st($1)._val_($2);
  3572. return self}, function($ctx1) {$ctx1.fill(self,"updateValueTextarea",{}, smalltalk.Inspector)})},
  3573. messageSends: ["val:", "ifTrue:ifFalse:", "printString", "at:", "selectedVariable", "variables", "isNil", "asJQuery"]}),
  3574. smalltalk.Inspector);
  3575. smalltalk.addMethod(
  3576. "_updateVariablesList",
  3577. smalltalk.method({
  3578. selector: "updateVariablesList",
  3579. fn: function (){
  3580. var self=this;
  3581. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  3582. _st(self["@variablesList"])._contents_((function(html){
  3583. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(self)._variables())._keys())._do_((function(each){
  3584. var li;
  3585. return smalltalk.withContext(function($ctx3) { li=_st(html)._li();
  3586. li;
  3587. $1=li;
  3588. _st($1)._with_(each);
  3589. $2=_st($1)._onClick_((function(){
  3590. return smalltalk.withContext(function($ctx4) { return _st(self)._selectVariable_(each);
  3591. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  3592. $2;
  3593. $3=_st(_st(self)._selectedVariable()).__eq(each);
  3594. if(smalltalk.assert($3)){
  3595. return _st(li)._class_("selected");
  3596. };
  3597. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})}));
  3598. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  3599. return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{}, smalltalk.Inspector)})},
  3600. messageSends: ["contents:", "do:", "li", "with:", "onClick:", "selectVariable:", "ifTrue:", "class:", "=", "selectedVariable", "keys", "variables"]}),
  3601. smalltalk.Inspector);
  3602. smalltalk.addMethod(
  3603. "_variables",
  3604. smalltalk.method({
  3605. selector: "variables",
  3606. fn: function (){
  3607. var self=this;
  3608. return smalltalk.withContext(function($ctx1) { var $1;
  3609. $1=self["@variables"];
  3610. return $1;
  3611. }, function($ctx1) {$ctx1.fill(self,"variables",{}, smalltalk.Inspector)})},
  3612. messageSends: []}),
  3613. smalltalk.Inspector);
  3614. smalltalk.addMethod(
  3615. "_on_",
  3616. smalltalk.method({
  3617. selector: "on:",
  3618. fn: function (anObject){
  3619. var self=this;
  3620. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  3621. $2=_st(self)._new();
  3622. _st($2)._inspect_(anObject);
  3623. $3=_st($2)._yourself();
  3624. $1=$3;
  3625. return $1;
  3626. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject}, smalltalk.Inspector.klass)})},
  3627. messageSends: ["inspect:", "new", "yourself"]}),
  3628. smalltalk.Inspector.klass);
  3629. smalltalk.addClass('ProgressBar', smalltalk.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  3630. smalltalk.addMethod(
  3631. "_percent",
  3632. smalltalk.method({
  3633. selector: "percent",
  3634. fn: function (){
  3635. var self=this;
  3636. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3637. $2=self["@percent"];
  3638. if(($receiver = $2) == nil || $receiver == undefined){
  3639. $1=(0);
  3640. } else {
  3641. $1=$2;
  3642. };
  3643. return $1;
  3644. }, function($ctx1) {$ctx1.fill(self,"percent",{}, smalltalk.ProgressBar)})},
  3645. messageSends: ["ifNil:"]}),
  3646. smalltalk.ProgressBar);
  3647. smalltalk.addMethod(
  3648. "_percent_",
  3649. smalltalk.method({
  3650. selector: "percent:",
  3651. fn: function (aNumber){
  3652. var self=this;
  3653. return smalltalk.withContext(function($ctx1) { self["@percent"]=aNumber;
  3654. return self}, function($ctx1) {$ctx1.fill(self,"percent:",{aNumber:aNumber}, smalltalk.ProgressBar)})},
  3655. messageSends: []}),
  3656. smalltalk.ProgressBar);
  3657. smalltalk.addMethod(
  3658. "_renderOn_",
  3659. smalltalk.method({
  3660. selector: "renderOn:",
  3661. fn: function (html){
  3662. var self=this;
  3663. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3664. $1=_st(html)._div();
  3665. _st($1)._class_("progress_bar");
  3666. $2=_st($1)._yourself();
  3667. self["@div"]=$2;
  3668. _st(self)._renderProgressBar();
  3669. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html}, smalltalk.ProgressBar)})},
  3670. messageSends: ["class:", "div", "yourself", "renderProgressBar"]}),
  3671. smalltalk.ProgressBar);
  3672. smalltalk.addMethod(
  3673. "_renderProgressBar",
  3674. smalltalk.method({
  3675. selector: "renderProgressBar",
  3676. fn: function (){
  3677. var self=this;
  3678. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3679. _st(self["@div"])._contents_((function(html){
  3680. return smalltalk.withContext(function($ctx2) { $1=_st(html)._div();
  3681. _st($1)._class_("progress");
  3682. $2=_st($1)._style_(_st(_st("width:").__comma(_st(_st(self)._percent())._asString())).__comma("%"));
  3683. return $2;
  3684. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  3685. return self}, function($ctx1) {$ctx1.fill(self,"renderProgressBar",{}, smalltalk.ProgressBar)})},
  3686. messageSends: ["contents:", "class:", "div", "style:", ",", "asString", "percent"]}),
  3687. smalltalk.ProgressBar);
  3688. smalltalk.addMethod(
  3689. "_updatePercent_",
  3690. smalltalk.method({
  3691. selector: "updatePercent:",
  3692. fn: function (aNumber){
  3693. var self=this;
  3694. return smalltalk.withContext(function($ctx1) { _st(self)._percent_(aNumber);
  3695. _st(self)._renderProgressBar();
  3696. return self}, function($ctx1) {$ctx1.fill(self,"updatePercent:",{aNumber:aNumber}, smalltalk.ProgressBar)})},
  3697. messageSends: ["percent:", "renderProgressBar"]}),
  3698. smalltalk.ProgressBar);
  3699. smalltalk.addClass('ReferencesBrowser', smalltalk.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  3700. smalltalk.addMethod(
  3701. "_canBeClosed",
  3702. smalltalk.method({
  3703. selector: "canBeClosed",
  3704. fn: function (){
  3705. var self=this;
  3706. return smalltalk.withContext(function($ctx1) { return true;
  3707. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{}, smalltalk.ReferencesBrowser)})},
  3708. messageSends: []}),
  3709. smalltalk.ReferencesBrowser);
  3710. smalltalk.addMethod(
  3711. "_classesAndMetaclasses",
  3712. smalltalk.method({
  3713. selector: "classesAndMetaclasses",
  3714. fn: function (){
  3715. var self=this;
  3716. return smalltalk.withContext(function($ctx1) { var $1;
  3717. $1=_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes()).__comma(_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes())._collect_((function(each){
  3718. return smalltalk.withContext(function($ctx2) { return _st(each)._class();
  3719. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})));
  3720. return $1;
  3721. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{}, smalltalk.ReferencesBrowser)})},
  3722. messageSends: [",", "collect:", "class", "classes", "current"]}),
  3723. smalltalk.ReferencesBrowser);
  3724. smalltalk.addMethod(
  3725. "_implementors",
  3726. smalltalk.method({
  3727. selector: "implementors",
  3728. fn: function (){
  3729. var self=this;
  3730. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3731. $2=self["@implementors"];
  3732. if(($receiver = $2) == nil || $receiver == undefined){
  3733. self["@implementors"]=_st((smalltalk.Array || Array))._new();
  3734. $1=self["@implementors"];
  3735. } else {
  3736. $1=$2;
  3737. };
  3738. return $1;
  3739. }, function($ctx1) {$ctx1.fill(self,"implementors",{}, smalltalk.ReferencesBrowser)})},
  3740. messageSends: ["ifNil:", "new"]}),
  3741. smalltalk.ReferencesBrowser);
  3742. smalltalk.addMethod(
  3743. "_initialize",
  3744. smalltalk.method({
  3745. selector: "initialize",
  3746. fn: function (){
  3747. var self=this;
  3748. return smalltalk.withContext(function($ctx1) { smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
  3749. self["@selector"]="";
  3750. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.ReferencesBrowser)})},
  3751. messageSends: ["initialize"]}),
  3752. smalltalk.ReferencesBrowser);
  3753. smalltalk.addMethod(
  3754. "_label",
  3755. smalltalk.method({
  3756. selector: "label",
  3757. fn: function (){
  3758. var self=this;
  3759. return smalltalk.withContext(function($ctx1) { return "[References]";
  3760. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.ReferencesBrowser)})},
  3761. messageSends: []}),
  3762. smalltalk.ReferencesBrowser);
  3763. smalltalk.addMethod(
  3764. "_matches",
  3765. smalltalk.method({
  3766. selector: "matches",
  3767. fn: function (){
  3768. var self=this;
  3769. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3770. $2=self["@matches"];
  3771. if(($receiver = $2) == nil || $receiver == undefined){
  3772. self["@matches"]=_st((smalltalk.Array || Array))._new();
  3773. $1=self["@matches"];
  3774. } else {
  3775. $1=$2;
  3776. };
  3777. return $1;
  3778. }, function($ctx1) {$ctx1.fill(self,"matches",{}, smalltalk.ReferencesBrowser)})},
  3779. messageSends: ["ifNil:", "new"]}),
  3780. smalltalk.ReferencesBrowser);
  3781. smalltalk.addMethod(
  3782. "_openBrowserOn_",
  3783. smalltalk.method({
  3784. selector: "openBrowserOn:",
  3785. fn: function (aMethod){
  3786. var self=this;
  3787. var browser;
  3788. return smalltalk.withContext(function($ctx1) { var $1,$3,$2,$4,$5,$6;
  3789. $1=(smalltalk.Browser || Browser);
  3790. $3=_st(_st(aMethod)._methodClass())._isMetaclass();
  3791. if(smalltalk.assert($3)){
  3792. $2=_st(_st(aMethod)._methodClass())._instanceClass();
  3793. } else {
  3794. $2=_st(aMethod)._methodClass();
  3795. };
  3796. browser=_st($1)._openOn_($2);
  3797. $4=_st(_st(aMethod)._methodClass())._isMetaclass();
  3798. if(smalltalk.assert($4)){
  3799. _st(browser)._selectTab_(smalltalk.symbolFor("class"));
  3800. };
  3801. $5=browser;
  3802. _st($5)._selectProtocol_(_st(aMethod)._category());
  3803. $6=_st($5)._selectMethod_(aMethod);
  3804. return self}, function($ctx1) {$ctx1.fill(self,"openBrowserOn:",{aMethod:aMethod,browser:browser}, smalltalk.ReferencesBrowser)})},
  3805. messageSends: ["openOn:", "ifTrue:ifFalse:", "instanceClass", "methodClass", "isMetaclass", "ifTrue:", "selectTab:", "selectProtocol:", "category", "selectMethod:"]}),
  3806. smalltalk.ReferencesBrowser);
  3807. smalltalk.addMethod(
  3808. "_referencedClasses",
  3809. smalltalk.method({
  3810. selector: "referencedClasses",
  3811. fn: function (){
  3812. var self=this;
  3813. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3814. $2=self["@referencedClasses"];
  3815. if(($receiver = $2) == nil || $receiver == undefined){
  3816. self["@referencedClasses"]=_st((smalltalk.Array || Array))._new();
  3817. $1=self["@referencedClasses"];
  3818. } else {
  3819. $1=$2;
  3820. };
  3821. return $1;
  3822. }, function($ctx1) {$ctx1.fill(self,"referencedClasses",{}, smalltalk.ReferencesBrowser)})},
  3823. messageSends: ["ifNil:", "new"]}),
  3824. smalltalk.ReferencesBrowser);
  3825. smalltalk.addMethod(
  3826. "_renderBoxOn_",
  3827. smalltalk.method({
  3828. selector: "renderBoxOn:",
  3829. fn: function (html){
  3830. var self=this;
  3831. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3832. $1=self;
  3833. _st($1)._renderInputOn_(html);
  3834. _st($1)._renderImplementorsOn_(html);
  3835. _st($1)._renderSendersOn_(html);
  3836. _st($1)._renderReferencedClassesOn_(html);
  3837. $2=_st($1)._renderMatchesOn_(html);
  3838. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.ReferencesBrowser)})},
  3839. messageSends: ["renderInputOn:", "renderImplementorsOn:", "renderSendersOn:", "renderReferencedClassesOn:", "renderMatchesOn:"]}),
  3840. smalltalk.ReferencesBrowser);
  3841. smalltalk.addMethod(
  3842. "_renderImplementorsOn_",
  3843. smalltalk.method({
  3844. selector: "renderImplementorsOn:",
  3845. fn: function (html){
  3846. var self=this;
  3847. return smalltalk.withContext(function($ctx1) { self["@implementorsList"]=_st(_st(html)._ul())._class_("amber_column implementors");
  3848. _st(self)._updateImplementorsList();
  3849. return self}, function($ctx1) {$ctx1.fill(self,"renderImplementorsOn:",{html:html}, smalltalk.ReferencesBrowser)})},
  3850. messageSends: ["class:", "ul", "updateImplementorsList"]}),
  3851. smalltalk.ReferencesBrowser);
  3852. smalltalk.addMethod(
  3853. "_renderInputOn_",
  3854. smalltalk.method({
  3855. selector: "renderInputOn:",
  3856. fn: function (html){
  3857. var self=this;
  3858. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3859. $1=_st(html)._input();
  3860. _st($1)._class_("implementors");
  3861. $2=_st($1)._yourself();
  3862. self["@input"]=$2;
  3863. _st(_st(self["@input"])._asJQuery())._val_(self["@selector"]);
  3864. _st(self)._setInputEvents();
  3865. return self}, function($ctx1) {$ctx1.fill(self,"renderInputOn:",{html:html}, smalltalk.ReferencesBrowser)})},
  3866. messageSends: ["class:", "input", "yourself", "val:", "asJQuery", "setInputEvents"]}),
  3867. smalltalk.ReferencesBrowser);
  3868. smalltalk.addMethod(
  3869. "_renderMatchesOn_",
  3870. smalltalk.method({
  3871. selector: "renderMatchesOn:",
  3872. fn: function (html){
  3873. var self=this;
  3874. return smalltalk.withContext(function($ctx1) { self["@matchesList"]=_st(_st(html)._ul())._class_("amber_column matches");
  3875. _st(self)._updateMatchesList();
  3876. return self}, function($ctx1) {$ctx1.fill(self,"renderMatchesOn:",{html:html}, smalltalk.ReferencesBrowser)})},
  3877. messageSends: ["class:", "ul", "updateMatchesList"]}),
  3878. smalltalk.ReferencesBrowser);
  3879. smalltalk.addMethod(
  3880. "_renderReferencedClassesOn_",
  3881. smalltalk.method({
  3882. selector: "renderReferencedClassesOn:",
  3883. fn: function (html){
  3884. var self=this;
  3885. return smalltalk.withContext(function($ctx1) { self["@referencedClassesList"]=_st(_st(html)._ul())._class_("amber_column referenced_classes");
  3886. _st(self)._updateReferencedClassesList();
  3887. return self}, function($ctx1) {$ctx1.fill(self,"renderReferencedClassesOn:",{html:html}, smalltalk.ReferencesBrowser)})},
  3888. messageSends: ["class:", "ul", "updateReferencedClassesList"]}),
  3889. smalltalk.ReferencesBrowser);
  3890. smalltalk.addMethod(
  3891. "_renderSendersOn_",
  3892. smalltalk.method({
  3893. selector: "renderSendersOn:",
  3894. fn: function (html){
  3895. var self=this;
  3896. return smalltalk.withContext(function($ctx1) { self["@sendersList"]=_st(_st(html)._ul())._class_("amber_column senders");
  3897. _st(self)._updateSendersList();
  3898. return self}, function($ctx1) {$ctx1.fill(self,"renderSendersOn:",{html:html}, smalltalk.ReferencesBrowser)})},
  3899. messageSends: ["class:", "ul", "updateSendersList"]}),
  3900. smalltalk.ReferencesBrowser);
  3901. smalltalk.addMethod(
  3902. "_search_",
  3903. smalltalk.method({
  3904. selector: "search:",
  3905. fn: function (aString){
  3906. var self=this;
  3907. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3908. $1=self;
  3909. _st($1)._searchReferencesFor_(aString);
  3910. _st($1)._updateImplementorsList();
  3911. _st($1)._updateSendersList();
  3912. _st($1)._updateReferencedClassesList();
  3913. $2=_st($1)._updateMatchesList();
  3914. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString}, smalltalk.ReferencesBrowser)})},
  3915. messageSends: ["searchReferencesFor:", "updateImplementorsList", "updateSendersList", "updateReferencedClassesList", "updateMatchesList"]}),
  3916. smalltalk.ReferencesBrowser);
  3917. smalltalk.addMethod(
  3918. "_searchMethodSource",
  3919. smalltalk.method({
  3920. selector: "searchMethodSource",
  3921. fn: function (){
  3922. var self=this;
  3923. var regex;
  3924. return smalltalk.withContext(function($ctx1) { var $1;
  3925. regex=_st(self["@selector"])._allButFirst();
  3926. _st(_st(self)._classesAndMetaclasses())._do_((function(each){
  3927. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(each)._methodDictionary())._values())._do_((function(value){
  3928. return smalltalk.withContext(function($ctx3) { $1=_st(_st(value)._source())._match_(regex);
  3929. if(smalltalk.assert($1)){
  3930. return _st(_st(self)._matches())._add_(value);
  3931. };
  3932. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx1)})}));
  3933. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3934. return self}, function($ctx1) {$ctx1.fill(self,"searchMethodSource",{regex:regex}, smalltalk.ReferencesBrowser)})},
  3935. messageSends: ["allButFirst", "do:", "ifTrue:", "add:", "matches", "match:", "source", "values", "methodDictionary", "classesAndMetaclasses"]}),
  3936. smalltalk.ReferencesBrowser);
  3937. smalltalk.addMethod(
  3938. "_searchReferencedClasses",
  3939. smalltalk.method({
  3940. selector: "searchReferencedClasses",
  3941. fn: function (){
  3942. var self=this;
  3943. return smalltalk.withContext(function($ctx1) { var $1;
  3944. _st(_st(self)._classesAndMetaclasses())._do_((function(each){
  3945. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(each)._methodDictionary())._values())._do_((function(value){
  3946. return smalltalk.withContext(function($ctx3) { $1=_st(_st(value)._referencedClasses())._includes_(self["@selector"]);
  3947. if(smalltalk.assert($1)){
  3948. return _st(_st(self)._referencedClasses())._add_(value);
  3949. };
  3950. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx1)})}));
  3951. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3952. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencedClasses",{}, smalltalk.ReferencesBrowser)})},
  3953. messageSends: ["do:", "ifTrue:", "add:", "referencedClasses", "includes:", "values", "methodDictionary", "classesAndMetaclasses"]}),
  3954. smalltalk.ReferencesBrowser);
  3955. smalltalk.addMethod(
  3956. "_searchReferencesFor_",
  3957. smalltalk.method({
  3958. selector: "searchReferencesFor:",
  3959. fn: function (aString){
  3960. var self=this;
  3961. return smalltalk.withContext(function($ctx1) { var $1;
  3962. self["@selector"]=aString;
  3963. self["@implementors"]=_st((smalltalk.Array || Array))._new();
  3964. self["@senders"]=_st((smalltalk.Array || Array))._new();
  3965. self["@referencedClasses"]=_st((smalltalk.Array || Array))._new();
  3966. self["@matches"]=_st((smalltalk.Array || Array))._new();
  3967. _st(self)._searchMethodSource();
  3968. $1=_st(self["@selector"])._match_("^[A-Z]");
  3969. if(smalltalk.assert($1)){
  3970. _st(self)._searchReferencedClasses();
  3971. } else {
  3972. _st(self)._searchSelectorReferences();
  3973. };
  3974. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesFor:",{aString:aString}, smalltalk.ReferencesBrowser)})},
  3975. messageSends: ["new", "searchMethodSource", "ifFalse:ifTrue:", "searchSelectorReferences", "searchReferencedClasses", "match:"]}),
  3976. smalltalk.ReferencesBrowser);
  3977. smalltalk.addMethod(
  3978. "_searchSelectorReferences",
  3979. smalltalk.method({
  3980. selector: "searchSelectorReferences",
  3981. fn: function (){
  3982. var self=this;
  3983. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3984. _st(_st(self)._classesAndMetaclasses())._do_((function(each){
  3985. return smalltalk.withContext(function($ctx2) { return _st(_st(each)._methodDictionary())._keysAndValuesDo_((function(key,value){
  3986. return smalltalk.withContext(function($ctx3) { $1=_st(key).__eq(self["@selector"]);
  3987. if(smalltalk.assert($1)){
  3988. _st(_st(self)._implementors())._add_(value);
  3989. };
  3990. $2=_st(_st(value)._messageSends())._includes_(self["@selector"]);
  3991. if(smalltalk.assert($2)){
  3992. return _st(_st(self)._senders())._add_(value);
  3993. };
  3994. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx1)})}));
  3995. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3996. return self}, function($ctx1) {$ctx1.fill(self,"searchSelectorReferences",{}, smalltalk.ReferencesBrowser)})},
  3997. messageSends: ["do:", "keysAndValuesDo:", "ifTrue:", "add:", "implementors", "=", "senders", "includes:", "messageSends", "methodDictionary", "classesAndMetaclasses"]}),
  3998. smalltalk.ReferencesBrowser);
  3999. smalltalk.addMethod(
  4000. "_selector",
  4001. smalltalk.method({
  4002. selector: "selector",
  4003. fn: function (){
  4004. var self=this;
  4005. return smalltalk.withContext(function($ctx1) { var $1;
  4006. $1=self["@selector"];
  4007. return $1;
  4008. }, function($ctx1) {$ctx1.fill(self,"selector",{}, smalltalk.ReferencesBrowser)})},
  4009. messageSends: []}),
  4010. smalltalk.ReferencesBrowser);
  4011. smalltalk.addMethod(
  4012. "_senders",
  4013. smalltalk.method({
  4014. selector: "senders",
  4015. fn: function (){
  4016. var self=this;
  4017. return smalltalk.withContext(function($ctx1) { var $2,$1;
  4018. $2=self["@senders"];
  4019. if(($receiver = $2) == nil || $receiver == undefined){
  4020. self["@senders"]=_st((smalltalk.Array || Array))._new();
  4021. $1=self["@senders"];
  4022. } else {
  4023. $1=$2;
  4024. };
  4025. return $1;
  4026. }, function($ctx1) {$ctx1.fill(self,"senders",{}, smalltalk.ReferencesBrowser)})},
  4027. messageSends: ["ifNil:", "new"]}),
  4028. smalltalk.ReferencesBrowser);
  4029. smalltalk.addMethod(
  4030. "_setInputEvents",
  4031. smalltalk.method({
  4032. selector: "setInputEvents",
  4033. fn: function (){
  4034. var self=this;
  4035. return smalltalk.withContext(function($ctx1) { var $1,$3,$2;
  4036. $1=self["@input"];
  4037. _st($1)._onKeyUp_((function(){
  4038. return smalltalk.withContext(function($ctx2) { self["@timer"]=_st((function(){
  4039. return smalltalk.withContext(function($ctx3) { return _st(self)._search_(_st(_st(self["@input"])._asJQuery())._val());
  4040. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithTimeout_((100));
  4041. return self["@timer"];
  4042. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4043. $2=_st($1)._onKeyDown_((function(){
  4044. return smalltalk.withContext(function($ctx2) { $3=self["@timer"];
  4045. if(($receiver = $3) == nil || $receiver == undefined){
  4046. return $3;
  4047. } else {
  4048. return _st(self["@timer"])._clearTimeout();
  4049. };
  4050. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4051. return self}, function($ctx1) {$ctx1.fill(self,"setInputEvents",{}, smalltalk.ReferencesBrowser)})},
  4052. messageSends: ["onKeyUp:", "valueWithTimeout:", "search:", "val", "asJQuery", "onKeyDown:", "ifNotNil:", "clearTimeout"]}),
  4053. smalltalk.ReferencesBrowser);
  4054. smalltalk.addMethod(
  4055. "_updateImplementorsList",
  4056. smalltalk.method({
  4057. selector: "updateImplementorsList",
  4058. fn: function (){
  4059. var self=this;
  4060. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  4061. _st(self["@implementorsList"])._contents_((function(html){
  4062. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  4063. _st($1)._class_("column_label");
  4064. _st($1)._with_(_st(_st("Implementors (").__comma(_st(_st(_st(self)._implementors())._size())._asString())).__comma(")"));
  4065. $2=_st($1)._style_("font-weight: bold");
  4066. $2;
  4067. return _st(_st(self)._implementors())._do_((function(each){
  4068. var li;
  4069. return smalltalk.withContext(function($ctx3) { li=_st(html)._li();
  4070. li;
  4071. $3=li;
  4072. _st($3)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(self)._selector()));
  4073. $4=_st($3)._onClick_((function(){
  4074. return smalltalk.withContext(function($ctx4) { return _st(self)._openBrowserOn_(each);
  4075. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  4076. return $4;
  4077. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})}));
  4078. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  4079. return self}, function($ctx1) {$ctx1.fill(self,"updateImplementorsList",{}, smalltalk.ReferencesBrowser)})},
  4080. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "implementors", "style:", "do:", "selector", "methodClass", "onClick:", "openBrowserOn:"]}),
  4081. smalltalk.ReferencesBrowser);
  4082. smalltalk.addMethod(
  4083. "_updateMatchesList",
  4084. smalltalk.method({
  4085. selector: "updateMatchesList",
  4086. fn: function (){
  4087. var self=this;
  4088. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  4089. _st(self["@matchesList"])._contents_((function(html){
  4090. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  4091. _st($1)._class_("column_label");
  4092. _st($1)._with_(_st(_st("Regex matches (").__comma(_st(_st(_st(self)._matches())._size())._asString())).__comma(")"));
  4093. $2=_st($1)._style_("font-weight: bold");
  4094. $2;
  4095. return _st(_st(self)._matches())._do_((function(each){
  4096. var li;
  4097. return smalltalk.withContext(function($ctx3) { li=_st(html)._li();
  4098. li;
  4099. $3=li;
  4100. _st($3)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector()));
  4101. $4=_st($3)._onClick_((function(){
  4102. return smalltalk.withContext(function($ctx4) { return _st(self)._openBrowserOn_(each);
  4103. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  4104. return $4;
  4105. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})}));
  4106. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  4107. return self}, function($ctx1) {$ctx1.fill(self,"updateMatchesList",{}, smalltalk.ReferencesBrowser)})},
  4108. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "matches", "style:", "do:", "selector", "methodClass", "onClick:", "openBrowserOn:"]}),
  4109. smalltalk.ReferencesBrowser);
  4110. smalltalk.addMethod(
  4111. "_updateReferencedClassesList",
  4112. smalltalk.method({
  4113. selector: "updateReferencedClassesList",
  4114. fn: function (){
  4115. var self=this;
  4116. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  4117. _st(self["@referencedClassesList"])._contents_((function(html){
  4118. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  4119. _st($1)._class_("column_label");
  4120. _st($1)._with_(_st(_st("Class references (").__comma(_st(_st(_st(self)._referencedClasses())._size())._asString())).__comma(")"));
  4121. $2=_st($1)._style_("font-weight: bold");
  4122. $2;
  4123. return _st(_st(self)._referencedClasses())._do_((function(each){
  4124. return smalltalk.withContext(function($ctx3) { $3=_st(html)._li();
  4125. _st($3)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector()));
  4126. $4=_st($3)._onClick_((function(){
  4127. return smalltalk.withContext(function($ctx4) { return _st(self)._openBrowserOn_(each);
  4128. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  4129. return $4;
  4130. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  4131. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  4132. return self}, function($ctx1) {$ctx1.fill(self,"updateReferencedClassesList",{}, smalltalk.ReferencesBrowser)})},
  4133. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "referencedClasses", "style:", "do:", "selector", "methodClass", "onClick:", "openBrowserOn:"]}),
  4134. smalltalk.ReferencesBrowser);
  4135. smalltalk.addMethod(
  4136. "_updateSendersList",
  4137. smalltalk.method({
  4138. selector: "updateSendersList",
  4139. fn: function (){
  4140. var self=this;
  4141. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  4142. _st(self["@sendersList"])._contents_((function(html){
  4143. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  4144. _st($1)._class_("column_label");
  4145. _st($1)._with_(_st(_st("Senders (").__comma(_st(_st(_st(self)._senders())._size())._asString())).__comma(")"));
  4146. $2=_st($1)._style_("font-weight: bold");
  4147. $2;
  4148. return _st(_st(self)._senders())._do_((function(each){
  4149. return smalltalk.withContext(function($ctx3) { $3=_st(html)._li();
  4150. _st($3)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector()));
  4151. $4=_st($3)._onClick_((function(){
  4152. return smalltalk.withContext(function($ctx4) { return _st(self)._openBrowserOn_(each);
  4153. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  4154. return $4;
  4155. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  4156. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  4157. return self}, function($ctx1) {$ctx1.fill(self,"updateSendersList",{}, smalltalk.ReferencesBrowser)})},
  4158. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "senders", "style:", "do:", "selector", "methodClass", "onClick:", "openBrowserOn:"]}),
  4159. smalltalk.ReferencesBrowser);
  4160. smalltalk.addMethod(
  4161. "_search_",
  4162. smalltalk.method({
  4163. selector: "search:",
  4164. fn: function (aString){
  4165. var self=this;
  4166. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  4167. $2=_st(self)._new();
  4168. _st($2)._searchReferencesFor_(aString);
  4169. $3=_st($2)._open();
  4170. $1=$3;
  4171. return $1;
  4172. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString}, smalltalk.ReferencesBrowser.klass)})},
  4173. messageSends: ["searchReferencesFor:", "new", "open"]}),
  4174. smalltalk.ReferencesBrowser.klass);
  4175. smalltalk.addClass('TestRunner', smalltalk.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  4176. smalltalk.addMethod(
  4177. "_allClasses",
  4178. smalltalk.method({
  4179. selector: "allClasses",
  4180. fn: function (){
  4181. var self=this;
  4182. return smalltalk.withContext(function($ctx1) { var $1;
  4183. $1=_st(_st((smalltalk.TestCase || TestCase))._allSubclasses())._select_((function(each){
  4184. return smalltalk.withContext(function($ctx2) { return _st(_st(each)._isAbstract())._not();
  4185. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4186. return $1;
  4187. }, function($ctx1) {$ctx1.fill(self,"allClasses",{}, smalltalk.TestRunner)})},
  4188. messageSends: ["select:", "not", "isAbstract", "allSubclasses"]}),
  4189. smalltalk.TestRunner);
  4190. smalltalk.addMethod(
  4191. "_classes",
  4192. smalltalk.method({
  4193. selector: "classes",
  4194. fn: function (){
  4195. var self=this;
  4196. return smalltalk.withContext(function($ctx1) { var $1;
  4197. $1=_st(_st(_st(self)._allClasses())._select_((function(each){
  4198. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._selectedCategories())._includes_(_st(each)._category());
  4199. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._sort_((function(a,b){
  4200. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._name()).__gt(_st(b)._name());
  4201. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  4202. return $1;
  4203. }, function($ctx1) {$ctx1.fill(self,"classes",{}, smalltalk.TestRunner)})},
  4204. messageSends: ["sort:", ">", "name", "select:", "includes:", "category", "selectedCategories", "allClasses"]}),
  4205. smalltalk.TestRunner);
  4206. smalltalk.addMethod(
  4207. "_initialize",
  4208. smalltalk.method({
  4209. selector: "initialize",
  4210. fn: function (){
  4211. var self=this;
  4212. return smalltalk.withContext(function($ctx1) { smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
  4213. self["@result"]=_st((smalltalk.TestResult || TestResult))._new();
  4214. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.TestRunner)})},
  4215. messageSends: ["initialize", "new"]}),
  4216. smalltalk.TestRunner);
  4217. smalltalk.addMethod(
  4218. "_isSelectedCategory_",
  4219. smalltalk.method({
  4220. selector: "isSelectedCategory:",
  4221. fn: function (aCategory){
  4222. var self=this;
  4223. return smalltalk.withContext(function($ctx1) { var $1;
  4224. $1=_st(_st(self)._selectedCategories())._includes_(aCategory);
  4225. return $1;
  4226. }, function($ctx1) {$ctx1.fill(self,"isSelectedCategory:",{aCategory:aCategory}, smalltalk.TestRunner)})},
  4227. messageSends: ["includes:", "selectedCategories"]}),
  4228. smalltalk.TestRunner);
  4229. smalltalk.addMethod(
  4230. "_isSelectedClass_",
  4231. smalltalk.method({
  4232. selector: "isSelectedClass:",
  4233. fn: function (aClass){
  4234. var self=this;
  4235. return smalltalk.withContext(function($ctx1) { var $1;
  4236. $1=_st(_st(self)._selectedClasses())._includes_(aClass);
  4237. return $1;
  4238. }, function($ctx1) {$ctx1.fill(self,"isSelectedClass:",{aClass:aClass}, smalltalk.TestRunner)})},
  4239. messageSends: ["includes:", "selectedClasses"]}),
  4240. smalltalk.TestRunner);
  4241. smalltalk.addMethod(
  4242. "_label",
  4243. smalltalk.method({
  4244. selector: "label",
  4245. fn: function (){
  4246. var self=this;
  4247. return smalltalk.withContext(function($ctx1) { return "SUnit";
  4248. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.TestRunner)})},
  4249. messageSends: []}),
  4250. smalltalk.TestRunner);
  4251. smalltalk.addMethod(
  4252. "_packages",
  4253. smalltalk.method({
  4254. selector: "packages",
  4255. fn: function (){
  4256. var self=this;
  4257. var packages;
  4258. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4259. packages=_st((smalltalk.Array || Array))._new();
  4260. _st(_st(self)._allClasses())._do_((function(each){
  4261. return smalltalk.withContext(function($ctx2) { $1=_st(packages)._includes_(_st(each)._category());
  4262. if(! smalltalk.assert($1)){
  4263. return _st(packages)._add_(_st(each)._category());
  4264. };
  4265. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4266. $2=_st(packages)._sort();
  4267. return $2;
  4268. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages}, smalltalk.TestRunner)})},
  4269. messageSends: ["new", "do:", "ifFalse:", "add:", "category", "includes:", "allClasses", "sort"]}),
  4270. smalltalk.TestRunner);
  4271. smalltalk.addMethod(
  4272. "_performFailure_",
  4273. smalltalk.method({
  4274. selector: "performFailure:",
  4275. fn: function (aTestCase){
  4276. var self=this;
  4277. return smalltalk.withContext(function($ctx1) { _st(aTestCase)._runCase();
  4278. return self}, function($ctx1) {$ctx1.fill(self,"performFailure:",{aTestCase:aTestCase}, smalltalk.TestRunner)})},
  4279. messageSends: ["runCase"]}),
  4280. smalltalk.TestRunner);
  4281. smalltalk.addMethod(
  4282. "_printErrors",
  4283. smalltalk.method({
  4284. selector: "printErrors",
  4285. fn: function (){
  4286. var self=this;
  4287. return smalltalk.withContext(function($ctx1) { var $1;
  4288. $1=_st(_st(_st(_st(_st(self)._result())._errors())._size())._asString()).__comma(" errors, ");
  4289. return $1;
  4290. }, function($ctx1) {$ctx1.fill(self,"printErrors",{}, smalltalk.TestRunner)})},
  4291. messageSends: [",", "asString", "size", "errors", "result"]}),
  4292. smalltalk.TestRunner);
  4293. smalltalk.addMethod(
  4294. "_printFailures",
  4295. smalltalk.method({
  4296. selector: "printFailures",
  4297. fn: function (){
  4298. var self=this;
  4299. return smalltalk.withContext(function($ctx1) { var $1;
  4300. $1=_st(_st(_st(_st(_st(self)._result())._failures())._size())._asString()).__comma(" failures");
  4301. return $1;
  4302. }, function($ctx1) {$ctx1.fill(self,"printFailures",{}, smalltalk.TestRunner)})},
  4303. messageSends: [",", "asString", "size", "failures", "result"]}),
  4304. smalltalk.TestRunner);
  4305. smalltalk.addMethod(
  4306. "_printPasses",
  4307. smalltalk.method({
  4308. selector: "printPasses",
  4309. fn: function (){
  4310. var self=this;
  4311. return smalltalk.withContext(function($ctx1) { var $1;
  4312. $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, ");
  4313. return $1;
  4314. }, function($ctx1) {$ctx1.fill(self,"printPasses",{}, smalltalk.TestRunner)})},
  4315. messageSends: [",", "asString", "-", "size", "failures", "result", "errors", "runs"]}),
  4316. smalltalk.TestRunner);
  4317. smalltalk.addMethod(
  4318. "_printTotal",
  4319. smalltalk.method({
  4320. selector: "printTotal",
  4321. fn: function (){
  4322. var self=this;
  4323. return smalltalk.withContext(function($ctx1) { var $1;
  4324. $1=_st(_st(_st(_st(self)._result())._total())._asString()).__comma(" runs, ");
  4325. return $1;
  4326. }, function($ctx1) {$ctx1.fill(self,"printTotal",{}, smalltalk.TestRunner)})},
  4327. messageSends: [",", "asString", "total", "result"]}),
  4328. smalltalk.TestRunner);
  4329. smalltalk.addMethod(
  4330. "_progressBar",
  4331. smalltalk.method({
  4332. selector: "progressBar",
  4333. fn: function (){
  4334. var self=this;
  4335. return smalltalk.withContext(function($ctx1) { var $2,$1;
  4336. $2=self["@progressBar"];
  4337. if(($receiver = $2) == nil || $receiver == undefined){
  4338. self["@progressBar"]=_st((smalltalk.ProgressBar || ProgressBar))._new();
  4339. $1=self["@progressBar"];
  4340. } else {
  4341. $1=$2;
  4342. };
  4343. return $1;
  4344. }, function($ctx1) {$ctx1.fill(self,"progressBar",{}, smalltalk.TestRunner)})},
  4345. messageSends: ["ifNil:", "new"]}),
  4346. smalltalk.TestRunner);
  4347. smalltalk.addMethod(
  4348. "_renderBoxOn_",
  4349. smalltalk.method({
  4350. selector: "renderBoxOn:",
  4351. fn: function (html){
  4352. var self=this;
  4353. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4354. $1=self;
  4355. _st($1)._renderCategoriesOn_(html);
  4356. _st($1)._renderClassesOn_(html);
  4357. $2=_st($1)._renderResultsOn_(html);
  4358. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.TestRunner)})},
  4359. messageSends: ["renderCategoriesOn:", "renderClassesOn:", "renderResultsOn:"]}),
  4360. smalltalk.TestRunner);
  4361. smalltalk.addMethod(
  4362. "_renderButtonsOn_",
  4363. smalltalk.method({
  4364. selector: "renderButtonsOn:",
  4365. fn: function (html){
  4366. var self=this;
  4367. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4368. $1=_st(html)._button();
  4369. _st($1)._with_("Run selected");
  4370. $2=_st($1)._onClick_((function(){
  4371. return smalltalk.withContext(function($ctx2) { return _st(self)._run_(_st(self)._testCases());
  4372. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4373. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.TestRunner)})},
  4374. messageSends: ["with:", "button", "onClick:", "run:", "testCases"]}),
  4375. smalltalk.TestRunner);
  4376. smalltalk.addMethod(
  4377. "_renderCategoriesOn_",
  4378. smalltalk.method({
  4379. selector: "renderCategoriesOn:",
  4380. fn: function (html){
  4381. var self=this;
  4382. return smalltalk.withContext(function($ctx1) { self["@packagesList"]=_st(_st(html)._ul())._class_("amber_column sunit packages");
  4383. _st(self)._updateCategoriesList();
  4384. return self}, function($ctx1) {$ctx1.fill(self,"renderCategoriesOn:",{html:html}, smalltalk.TestRunner)})},
  4385. messageSends: ["class:", "ul", "updateCategoriesList"]}),
  4386. smalltalk.TestRunner);
  4387. smalltalk.addMethod(
  4388. "_renderClassesOn_",
  4389. smalltalk.method({
  4390. selector: "renderClassesOn:",
  4391. fn: function (html){
  4392. var self=this;
  4393. return smalltalk.withContext(function($ctx1) { self["@classesList"]=_st(_st(html)._ul())._class_("amber_column sunit classes");
  4394. _st(self)._updateClassesList();
  4395. return self}, function($ctx1) {$ctx1.fill(self,"renderClassesOn:",{html:html}, smalltalk.TestRunner)})},
  4396. messageSends: ["class:", "ul", "updateClassesList"]}),
  4397. smalltalk.TestRunner);
  4398. smalltalk.addMethod(
  4399. "_renderErrorsOn_",
  4400. smalltalk.method({
  4401. selector: "renderErrorsOn:",
  4402. fn: function (html){
  4403. var self=this;
  4404. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4405. _st(_st(_st(self)._result())._errors())._do_((function(each){
  4406. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  4407. _st($1)._class_("errors");
  4408. _st($1)._with_(_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector()));
  4409. $2=_st($1)._onClick_((function(){
  4410. return smalltalk.withContext(function($ctx3) { return _st(self)._performFailure_(each);
  4411. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  4412. return $2;
  4413. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4414. return self}, function($ctx1) {$ctx1.fill(self,"renderErrorsOn:",{html:html}, smalltalk.TestRunner)})},
  4415. messageSends: ["do:", "class:", "li", "with:", ",", "selector", "name", "class", "onClick:", "performFailure:", "errors", "result"]}),
  4416. smalltalk.TestRunner);
  4417. smalltalk.addMethod(
  4418. "_renderFailuresOn_",
  4419. smalltalk.method({
  4420. selector: "renderFailuresOn:",
  4421. fn: function (html){
  4422. var self=this;
  4423. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4424. _st(_st(_st(self)._result())._failures())._do_((function(each){
  4425. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  4426. _st($1)._class_("failures");
  4427. _st($1)._with_(_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector()));
  4428. $2=_st($1)._onClick_((function(){
  4429. return smalltalk.withContext(function($ctx3) { return _st(self)._performFailure_(each);
  4430. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  4431. return $2;
  4432. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4433. return self}, function($ctx1) {$ctx1.fill(self,"renderFailuresOn:",{html:html}, smalltalk.TestRunner)})},
  4434. messageSends: ["do:", "class:", "li", "with:", ",", "selector", "name", "class", "onClick:", "performFailure:", "failures", "result"]}),
  4435. smalltalk.TestRunner);
  4436. smalltalk.addMethod(
  4437. "_renderResultsOn_",
  4438. smalltalk.method({
  4439. selector: "renderResultsOn:",
  4440. fn: function (html){
  4441. var self=this;
  4442. return smalltalk.withContext(function($ctx1) { self["@statusDiv"]=_st(html)._div();
  4443. _st(html)._with_(_st(self)._progressBar());
  4444. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column sunit results");
  4445. _st(self)._updateMethodsList();
  4446. _st(self)._updateStatusDiv();
  4447. return self}, function($ctx1) {$ctx1.fill(self,"renderResultsOn:",{html:html}, smalltalk.TestRunner)})},
  4448. messageSends: ["div", "with:", "progressBar", "class:", "ul", "updateMethodsList", "updateStatusDiv"]}),
  4449. smalltalk.TestRunner);
  4450. smalltalk.addMethod(
  4451. "_result",
  4452. smalltalk.method({
  4453. selector: "result",
  4454. fn: function (){
  4455. var self=this;
  4456. return smalltalk.withContext(function($ctx1) { var $1;
  4457. $1=self["@result"];
  4458. return $1;
  4459. }, function($ctx1) {$ctx1.fill(self,"result",{}, smalltalk.TestRunner)})},
  4460. messageSends: []}),
  4461. smalltalk.TestRunner);
  4462. smalltalk.addMethod(
  4463. "_run_",
  4464. smalltalk.method({
  4465. selector: "run:",
  4466. fn: function (aCollection){
  4467. var self=this;
  4468. var worker;
  4469. return smalltalk.withContext(function($ctx1) { var $1;
  4470. worker=_st((smalltalk.TestSuiteRunner || TestSuiteRunner))._on_(aCollection);
  4471. self["@result"]=_st(worker)._result();
  4472. _st(_st(worker)._announcer())._on_do_((smalltalk.ResultAnnouncement || ResultAnnouncement),(function(ann){
  4473. return smalltalk.withContext(function($ctx2) { $1=_st(_st(ann)._result()).__eq_eq(self["@result"]);
  4474. if(smalltalk.assert($1)){
  4475. _st(_st(self)._progressBar())._updatePercent_(_st(_st(_st(self["@result"])._runs()).__slash(_st(self["@result"])._total())).__star((100)));
  4476. _st(self)._updateStatusDiv();
  4477. return _st(self)._updateMethodsList();
  4478. };
  4479. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  4480. _st(worker)._run();
  4481. return self}, function($ctx1) {$ctx1.fill(self,"run:",{aCollection:aCollection,worker:worker}, smalltalk.TestRunner)})},
  4482. messageSends: ["on:", "result", "on:do:", "ifTrue:", "updatePercent:", "*", "/", "total", "runs", "progressBar", "updateStatusDiv", "updateMethodsList", "==", "announcer", "run"]}),
  4483. smalltalk.TestRunner);
  4484. smalltalk.addMethod(
  4485. "_selectAllCategories",
  4486. smalltalk.method({
  4487. selector: "selectAllCategories",
  4488. fn: function (){
  4489. var self=this;
  4490. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  4491. _st(_st(self)._packages())._do_((function(each){
  4492. return smalltalk.withContext(function($ctx2) { $1=_st(self["@selectedCategories"])._includes_(each);
  4493. if(! smalltalk.assert($1)){
  4494. return _st(_st(self)._selectedCategories())._add_(each);
  4495. };
  4496. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4497. $2=self;
  4498. _st($2)._updateCategoriesList();
  4499. $3=_st($2)._updateClassesList();
  4500. return self}, function($ctx1) {$ctx1.fill(self,"selectAllCategories",{}, smalltalk.TestRunner)})},
  4501. messageSends: ["do:", "ifFalse:", "add:", "selectedCategories", "includes:", "packages", "updateCategoriesList", "updateClassesList"]}),
  4502. smalltalk.TestRunner);
  4503. smalltalk.addMethod(
  4504. "_selectAllClasses",
  4505. smalltalk.method({
  4506. selector: "selectAllClasses",
  4507. fn: function (){
  4508. var self=this;
  4509. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  4510. _st(_st(self)._classes())._do_((function(each){
  4511. return smalltalk.withContext(function($ctx2) { $1=_st(self["@selectedClasses"])._includes_(each);
  4512. if(! smalltalk.assert($1)){
  4513. return _st(_st(self)._selectedClasses())._add_(each);
  4514. };
  4515. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4516. $2=self;
  4517. _st($2)._updateCategoriesList();
  4518. $3=_st($2)._updateClassesList();
  4519. return self}, function($ctx1) {$ctx1.fill(self,"selectAllClasses",{}, smalltalk.TestRunner)})},
  4520. messageSends: ["do:", "ifFalse:", "add:", "selectedClasses", "includes:", "classes", "updateCategoriesList", "updateClassesList"]}),
  4521. smalltalk.TestRunner);
  4522. smalltalk.addMethod(
  4523. "_selectedCategories",
  4524. smalltalk.method({
  4525. selector: "selectedCategories",
  4526. fn: function (){
  4527. var self=this;
  4528. return smalltalk.withContext(function($ctx1) { var $2,$1;
  4529. $2=self["@selectedCategories"];
  4530. if(($receiver = $2) == nil || $receiver == undefined){
  4531. self["@selectedCategories"]=_st((smalltalk.Array || Array))._new();
  4532. $1=self["@selectedCategories"];
  4533. } else {
  4534. $1=$2;
  4535. };
  4536. return $1;
  4537. }, function($ctx1) {$ctx1.fill(self,"selectedCategories",{}, smalltalk.TestRunner)})},
  4538. messageSends: ["ifNil:", "new"]}),
  4539. smalltalk.TestRunner);
  4540. smalltalk.addMethod(
  4541. "_selectedClasses",
  4542. smalltalk.method({
  4543. selector: "selectedClasses",
  4544. fn: function (){
  4545. var self=this;
  4546. return smalltalk.withContext(function($ctx1) { var $2,$1;
  4547. $2=self["@selectedClasses"];
  4548. if(($receiver = $2) == nil || $receiver == undefined){
  4549. self["@selectedClasses"]=_st((smalltalk.Array || Array))._new();
  4550. $1=self["@selectedClasses"];
  4551. } else {
  4552. $1=$2;
  4553. };
  4554. return $1;
  4555. }, function($ctx1) {$ctx1.fill(self,"selectedClasses",{}, smalltalk.TestRunner)})},
  4556. messageSends: ["ifNil:", "new"]}),
  4557. smalltalk.TestRunner);
  4558. smalltalk.addMethod(
  4559. "_statusInfo",
  4560. smalltalk.method({
  4561. selector: "statusInfo",
  4562. fn: function (){
  4563. var self=this;
  4564. return smalltalk.withContext(function($ctx1) { var $1;
  4565. $1=_st(_st(_st(_st(self)._printTotal()).__comma(_st(self)._printPasses())).__comma(_st(self)._printErrors())).__comma(_st(self)._printFailures());
  4566. return $1;
  4567. }, function($ctx1) {$ctx1.fill(self,"statusInfo",{}, smalltalk.TestRunner)})},
  4568. messageSends: [",", "printFailures", "printErrors", "printPasses", "printTotal"]}),
  4569. smalltalk.TestRunner);
  4570. smalltalk.addMethod(
  4571. "_testCases",
  4572. smalltalk.method({
  4573. selector: "testCases",
  4574. fn: function (){
  4575. var self=this;
  4576. var testCases;
  4577. return smalltalk.withContext(function($ctx1) { var $1;
  4578. testCases=[];
  4579. _st(_st(_st(self)._selectedClasses())._select_((function(each){
  4580. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._selectedCategories())._includes_(_st(each)._category());
  4581. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._do_((function(each){
  4582. return smalltalk.withContext(function($ctx2) { return _st(testCases)._addAll_(_st(each)._buildSuite());
  4583. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4584. $1=testCases;
  4585. return $1;
  4586. }, function($ctx1) {$ctx1.fill(self,"testCases",{testCases:testCases}, smalltalk.TestRunner)})},
  4587. messageSends: ["do:", "addAll:", "buildSuite", "select:", "includes:", "category", "selectedCategories", "selectedClasses"]}),
  4588. smalltalk.TestRunner);
  4589. smalltalk.addMethod(
  4590. "_toggleCategory_",
  4591. smalltalk.method({
  4592. selector: "toggleCategory:",
  4593. fn: function (aCategory){
  4594. var self=this;
  4595. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  4596. $1=_st(self)._isSelectedCategory_(aCategory);
  4597. if(smalltalk.assert($1)){
  4598. _st(self["@selectedCategories"])._remove_(aCategory);
  4599. } else {
  4600. _st(self["@selectedCategories"])._add_(aCategory);
  4601. };
  4602. $2=self;
  4603. _st($2)._updateCategoriesList();
  4604. $3=_st($2)._updateClassesList();
  4605. return self}, function($ctx1) {$ctx1.fill(self,"toggleCategory:",{aCategory:aCategory}, smalltalk.TestRunner)})},
  4606. messageSends: ["ifFalse:ifTrue:", "add:", "remove:", "isSelectedCategory:", "updateCategoriesList", "updateClassesList"]}),
  4607. smalltalk.TestRunner);
  4608. smalltalk.addMethod(
  4609. "_toggleClass_",
  4610. smalltalk.method({
  4611. selector: "toggleClass:",
  4612. fn: function (aClass){
  4613. var self=this;
  4614. return smalltalk.withContext(function($ctx1) { var $1;
  4615. $1=_st(self)._isSelectedClass_(aClass);
  4616. if(smalltalk.assert($1)){
  4617. _st(self["@selectedClasses"])._remove_(aClass);
  4618. } else {
  4619. _st(self["@selectedClasses"])._add_(aClass);
  4620. };
  4621. _st(self)._updateClassesList();
  4622. return self}, function($ctx1) {$ctx1.fill(self,"toggleClass:",{aClass:aClass}, smalltalk.TestRunner)})},
  4623. messageSends: ["ifFalse:ifTrue:", "add:", "remove:", "isSelectedClass:", "updateClassesList"]}),
  4624. smalltalk.TestRunner);
  4625. smalltalk.addMethod(
  4626. "_updateCategoriesList",
  4627. smalltalk.method({
  4628. selector: "updateCategoriesList",
  4629. fn: function (){
  4630. var self=this;
  4631. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  4632. _st(self["@packagesList"])._contents_((function(html){
  4633. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  4634. _st($1)._class_("all");
  4635. _st($1)._with_("All");
  4636. $2=_st($1)._onClick_((function(){
  4637. return smalltalk.withContext(function($ctx3) { return _st(self)._selectAllCategories();
  4638. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  4639. $2;
  4640. return _st(_st(self)._packages())._do_((function(each){
  4641. var li;
  4642. return smalltalk.withContext(function($ctx3) { li=_st(html)._li();
  4643. li;
  4644. $3=_st(_st(self)._selectedCategories())._includes_(each);
  4645. if(smalltalk.assert($3)){
  4646. _st(li)._class_("selected");
  4647. };
  4648. $4=li;
  4649. _st($4)._with_(each);
  4650. $5=_st($4)._onClick_((function(){
  4651. return smalltalk.withContext(function($ctx4) { return _st(self)._toggleCategory_(each);
  4652. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  4653. return $5;
  4654. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})}));
  4655. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  4656. return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{}, smalltalk.TestRunner)})},
  4657. messageSends: ["contents:", "class:", "li", "with:", "onClick:", "selectAllCategories", "do:", "ifTrue:", "includes:", "selectedCategories", "toggleCategory:", "packages"]}),
  4658. smalltalk.TestRunner);
  4659. smalltalk.addMethod(
  4660. "_updateClassesList",
  4661. smalltalk.method({
  4662. selector: "updateClassesList",
  4663. fn: function (){
  4664. var self=this;
  4665. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6;
  4666. _st(self["@classesList"])._contents_((function(html){
  4667. return smalltalk.withContext(function($ctx2) { $1=_st(_st(self)._selectedCategories())._isEmpty();
  4668. if(! smalltalk.assert($1)){
  4669. $2=_st(html)._li();
  4670. _st($2)._class_("all");
  4671. _st($2)._with_("All");
  4672. $3=_st($2)._onClick_((function(){
  4673. return smalltalk.withContext(function($ctx3) { return _st(self)._selectAllClasses();
  4674. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  4675. $3;
  4676. };
  4677. return _st(_st(self)._classes())._do_((function(each){
  4678. var li;
  4679. return smalltalk.withContext(function($ctx3) { li=_st(html)._li();
  4680. li;
  4681. $4=_st(_st(self)._selectedClasses())._includes_(each);
  4682. if(smalltalk.assert($4)){
  4683. _st(li)._class_("selected");
  4684. };
  4685. $5=li;
  4686. _st($5)._with_(_st(each)._name());
  4687. $6=_st($5)._onClick_((function(){
  4688. return smalltalk.withContext(function($ctx4) { return _st(self)._toggleClass_(each);
  4689. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  4690. return $6;
  4691. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})}));
  4692. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  4693. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{}, smalltalk.TestRunner)})},
  4694. messageSends: ["contents:", "ifFalse:", "class:", "li", "with:", "onClick:", "selectAllClasses", "isEmpty", "selectedCategories", "do:", "ifTrue:", "includes:", "selectedClasses", "name", "toggleClass:", "classes"]}),
  4695. smalltalk.TestRunner);
  4696. smalltalk.addMethod(
  4697. "_updateMethodsList",
  4698. smalltalk.method({
  4699. selector: "updateMethodsList",
  4700. fn: function (){
  4701. var self=this;
  4702. return smalltalk.withContext(function($ctx1) { _st(self["@methodsList"])._contents_((function(html){
  4703. return smalltalk.withContext(function($ctx2) { _st(self)._renderErrorsOn_(html);
  4704. return _st(self)._renderFailuresOn_(html);
  4705. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  4706. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{}, smalltalk.TestRunner)})},
  4707. messageSends: ["contents:", "renderErrorsOn:", "renderFailuresOn:"]}),
  4708. smalltalk.TestRunner);
  4709. smalltalk.addMethod(
  4710. "_updateStatusDiv",
  4711. smalltalk.method({
  4712. selector: "updateStatusDiv",
  4713. fn: function (){
  4714. var self=this;
  4715. return smalltalk.withContext(function($ctx1) { _st(self["@statusDiv"])._class_(_st("sunit status ").__comma(_st(self["@result"])._status()));
  4716. _st(self["@statusDiv"])._contents_((function(html){
  4717. return smalltalk.withContext(function($ctx2) { return _st(_st(html)._span())._with_(_st(self)._statusInfo());
  4718. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  4719. return self}, function($ctx1) {$ctx1.fill(self,"updateStatusDiv",{}, smalltalk.TestRunner)})},
  4720. messageSends: ["class:", ",", "status", "contents:", "with:", "statusInfo", "span"]}),
  4721. smalltalk.TestRunner);
  4722. smalltalk.addClass('Workspace', smalltalk.TabWidget, ['sourceArea'], 'IDE');
  4723. smalltalk.addMethod(
  4724. "_clearWorkspace",
  4725. smalltalk.method({
  4726. selector: "clearWorkspace",
  4727. fn: function (){
  4728. var self=this;
  4729. return smalltalk.withContext(function($ctx1) { _st(self["@sourceArea"])._clear();
  4730. return self}, function($ctx1) {$ctx1.fill(self,"clearWorkspace",{}, smalltalk.Workspace)})},
  4731. messageSends: ["clear"]}),
  4732. smalltalk.Workspace);
  4733. smalltalk.addMethod(
  4734. "_doIt",
  4735. smalltalk.method({
  4736. selector: "doIt",
  4737. fn: function (){
  4738. var self=this;
  4739. return smalltalk.withContext(function($ctx1) { _st(self["@sourceArea"])._doIt();
  4740. return self}, function($ctx1) {$ctx1.fill(self,"doIt",{}, smalltalk.Workspace)})},
  4741. messageSends: ["doIt"]}),
  4742. smalltalk.Workspace);
  4743. smalltalk.addMethod(
  4744. "_fileIn",
  4745. smalltalk.method({
  4746. selector: "fileIn",
  4747. fn: function (){
  4748. var self=this;
  4749. return smalltalk.withContext(function($ctx1) { _st(self["@sourceArea"])._fileIn();
  4750. return self}, function($ctx1) {$ctx1.fill(self,"fileIn",{}, smalltalk.Workspace)})},
  4751. messageSends: ["fileIn"]}),
  4752. smalltalk.Workspace);
  4753. smalltalk.addMethod(
  4754. "_inspectIt",
  4755. smalltalk.method({
  4756. selector: "inspectIt",
  4757. fn: function (){
  4758. var self=this;
  4759. return smalltalk.withContext(function($ctx1) { _st(self["@sourceArea"])._inspectIt();
  4760. return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{}, smalltalk.Workspace)})},
  4761. messageSends: ["inspectIt"]}),
  4762. smalltalk.Workspace);
  4763. smalltalk.addMethod(
  4764. "_label",
  4765. smalltalk.method({
  4766. selector: "label",
  4767. fn: function (){
  4768. var self=this;
  4769. return smalltalk.withContext(function($ctx1) { return "Workspace";
  4770. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.Workspace)})},
  4771. messageSends: []}),
  4772. smalltalk.Workspace);
  4773. smalltalk.addMethod(
  4774. "_printIt",
  4775. smalltalk.method({
  4776. selector: "printIt",
  4777. fn: function (){
  4778. var self=this;
  4779. return smalltalk.withContext(function($ctx1) { _st(self["@sourceArea"])._printIt();
  4780. return self}, function($ctx1) {$ctx1.fill(self,"printIt",{}, smalltalk.Workspace)})},
  4781. messageSends: ["printIt"]}),
  4782. smalltalk.Workspace);
  4783. smalltalk.addMethod(
  4784. "_renderBoxOn_",
  4785. smalltalk.method({
  4786. selector: "renderBoxOn:",
  4787. fn: function (html){
  4788. var self=this;
  4789. return smalltalk.withContext(function($ctx1) { self["@sourceArea"]=_st((smalltalk.SourceArea || SourceArea))._new();
  4790. _st(self["@sourceArea"])._renderOn_(html);
  4791. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.Workspace)})},
  4792. messageSends: ["new", "renderOn:"]}),
  4793. smalltalk.Workspace);
  4794. smalltalk.addMethod(
  4795. "_renderButtonsOn_",
  4796. smalltalk.method({
  4797. selector: "renderButtonsOn:",
  4798. fn: function (html){
  4799. var self=this;
  4800. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10;
  4801. $1=_st(html)._button();
  4802. _st($1)._with_("DoIt");
  4803. _st($1)._title_("ctrl+d");
  4804. $2=_st($1)._onClick_((function(){
  4805. return smalltalk.withContext(function($ctx2) { return _st(self)._doIt();
  4806. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4807. $3=_st(html)._button();
  4808. _st($3)._with_("PrintIt");
  4809. _st($3)._title_("ctrl+p");
  4810. $4=_st($3)._onClick_((function(){
  4811. return smalltalk.withContext(function($ctx2) { return _st(self)._printIt();
  4812. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4813. $5=_st(html)._button();
  4814. _st($5)._with_("InspectIt");
  4815. _st($5)._title_("ctrl+i");
  4816. $6=_st($5)._onClick_((function(){
  4817. return smalltalk.withContext(function($ctx2) { return _st(self)._inspectIt();
  4818. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4819. $7=_st(html)._button();
  4820. _st($7)._with_("FileIn");
  4821. _st($7)._title_("ctrl+f");
  4822. $8=_st($7)._onClick_((function(){
  4823. return smalltalk.withContext(function($ctx2) { return _st(self)._fileIn();
  4824. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4825. $9=_st(html)._button();
  4826. _st($9)._with_("Clear workspace");
  4827. $10=_st($9)._onClick_((function(){
  4828. return smalltalk.withContext(function($ctx2) { return _st(self)._clearWorkspace();
  4829. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4830. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.Workspace)})},
  4831. messageSends: ["with:", "button", "title:", "onClick:", "doIt", "printIt", "inspectIt", "fileIn", "clearWorkspace"]}),
  4832. smalltalk.Workspace);
  4833. smalltalk.addMethod(
  4834. "_show",
  4835. smalltalk.method({
  4836. selector: "show",
  4837. fn: function (){
  4838. var self=this;
  4839. return smalltalk.withContext(function($ctx1) { smalltalk.TabWidget.fn.prototype._show.apply(_st(self), []);
  4840. _st(self["@sourceArea"])._focus();
  4841. return self}, function($ctx1) {$ctx1.fill(self,"show",{}, smalltalk.Workspace)})},
  4842. messageSends: ["show", "focus"]}),
  4843. smalltalk.Workspace);
  4844. smalltalk.addMethod(
  4845. "_inspect",
  4846. smalltalk.method({
  4847. selector: "inspect",
  4848. fn: function (){
  4849. var self=this;
  4850. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4851. $1=_st((smalltalk.Inspector || Inspector))._new();
  4852. _st($1)._inspect_(self);
  4853. $2=_st($1)._open();
  4854. return self}, function($ctx1) {$ctx1.fill(self,"inspect",{}, smalltalk.Object)})},
  4855. messageSends: ["inspect:", "new", "open"]}),
  4856. smalltalk.Object);
  4857. smalltalk.addMethod(
  4858. "_inspectOn_",
  4859. smalltalk.method({
  4860. selector: "inspectOn:",
  4861. fn: function (anInspector){
  4862. var self=this;
  4863. var variables;
  4864. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4865. variables=_st((smalltalk.Dictionary || Dictionary))._new();
  4866. _st(variables)._at_put_("#self",self);
  4867. _st(_st(_st(self)._class())._allInstanceVariableNames())._do_((function(each){
  4868. return smalltalk.withContext(function($ctx2) { return _st(variables)._at_put_(each,_st(self)._instVarAt_(each));
  4869. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4870. $1=anInspector;
  4871. _st($1)._setLabel_(_st(self)._printString());
  4872. $2=_st($1)._setVariables_(variables);
  4873. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables}, smalltalk.Object)})},
  4874. messageSends: ["new", "at:put:", "do:", "instVarAt:", "allInstanceVariableNames", "class", "setLabel:", "printString", "setVariables:"]}),
  4875. smalltalk.Object);
  4876. smalltalk.addMethod(
  4877. "_inspectOn_",
  4878. smalltalk.method({
  4879. selector: "inspectOn:",
  4880. fn: function (anInspector){
  4881. var self=this;
  4882. var variables;
  4883. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4884. variables=_st((smalltalk.Dictionary || Dictionary))._new();
  4885. _st(variables)._at_put_("#self",self);
  4886. _st(self)._withIndexDo_((function(each,i){
  4887. return smalltalk.withContext(function($ctx2) { return _st(variables)._at_put_(i,each);
  4888. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1)})}));
  4889. $1=anInspector;
  4890. _st($1)._setLabel_(_st(self)._printString());
  4891. $2=_st($1)._setVariables_(variables);
  4892. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables}, smalltalk.Collection)})},
  4893. messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"]}),
  4894. smalltalk.Collection);
  4895. smalltalk.addMethod(
  4896. "_inspectOn_",
  4897. smalltalk.method({
  4898. selector: "inspectOn:",
  4899. fn: function (anInspector){
  4900. var self=this;
  4901. var variables;
  4902. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4903. variables=_st((smalltalk.Dictionary || Dictionary))._new();
  4904. _st(variables)._at_put_("#self",self);
  4905. _st(variables)._at_put_("#keys",_st(self)._keys());
  4906. _st(self)._keysAndValuesDo_((function(key,value){
  4907. return smalltalk.withContext(function($ctx2) { return _st(variables)._at_put_(key,value);
  4908. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
  4909. $1=anInspector;
  4910. _st($1)._setLabel_(_st(self)._printString());
  4911. $2=_st($1)._setVariables_(variables);
  4912. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables}, smalltalk.HashedCollection)})},
  4913. messageSends: ["new", "at:put:", "keys", "keysAndValuesDo:", "setLabel:", "printString", "setVariables:"]}),
  4914. smalltalk.HashedCollection);
  4915. smalltalk.addMethod(
  4916. "_inspectOn_",
  4917. smalltalk.method({
  4918. selector: "inspectOn:",
  4919. fn: function (anInspector){
  4920. var self=this;
  4921. var label;
  4922. return smalltalk.withContext(function($ctx1) { var $1;
  4923. smalltalk.CharacterArray.fn.prototype._inspectOn_.apply(_st(self), [anInspector]);
  4924. $1=_st(_st(_st(self)._printString())._size()).__gt((30));
  4925. if(smalltalk.assert($1)){
  4926. label=_st(_st(_st(self)._printString())._copyFrom_to_((1),(30))).__comma("...'");
  4927. label;
  4928. } else {
  4929. label=_st(self)._printString();
  4930. label;
  4931. };
  4932. _st(anInspector)._setLabel_(label);
  4933. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,label:label}, smalltalk.String)})},
  4934. messageSends: ["inspectOn:", "ifTrue:ifFalse:", ",", "copyFrom:to:", "printString", ">", "size", "setLabel:"]}),
  4935. smalltalk.String);
  4936. smalltalk.addMethod(
  4937. "_inspectOn_",
  4938. smalltalk.method({
  4939. selector: "inspectOn:",
  4940. fn: function (anInspector){
  4941. var self=this;
  4942. var variables;
  4943. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4944. variables=_st((smalltalk.Dictionary || Dictionary))._new();
  4945. _st(variables)._at_put_("#self",self);
  4946. _st(self["@elements"])._withIndexDo_((function(each,i){
  4947. return smalltalk.withContext(function($ctx2) { return _st(variables)._at_put_(i,each);
  4948. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1)})}));
  4949. $1=anInspector;
  4950. _st($1)._setLabel_(_st(self)._printString());
  4951. $2=_st($1)._setVariables_(variables);
  4952. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables}, smalltalk.Set)})},
  4953. messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"]}),
  4954. smalltalk.Set);
  4955. smalltalk.addMethod(
  4956. "_inspectOn_",
  4957. smalltalk.method({
  4958. selector: "inspectOn:",
  4959. fn: function (anInspector){
  4960. var self=this;
  4961. var variables;
  4962. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4963. variables=_st((smalltalk.Dictionary || Dictionary))._new();
  4964. _st(variables)._at_put_("#self",self);
  4965. _st(variables)._at_put_("#year",_st(self)._year());
  4966. _st(variables)._at_put_("#month",_st(self)._month());
  4967. _st(variables)._at_put_("#day",_st(self)._day());
  4968. _st(variables)._at_put_("#hours",_st(self)._hours());
  4969. _st(variables)._at_put_("#minutes",_st(self)._minutes());
  4970. _st(variables)._at_put_("#seconds",_st(self)._seconds());
  4971. _st(variables)._at_put_("#milliseconds",_st(self)._milliseconds());
  4972. $1=anInspector;
  4973. _st($1)._setLabel_(_st(self)._printString());
  4974. $2=_st($1)._setVariables_(variables);
  4975. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables}, smalltalk.Date)})},
  4976. messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"]}),
  4977. smalltalk.Date);
  4978. smalltalk.addMethod(
  4979. "_inspectOn_",
  4980. smalltalk.method({
  4981. selector: "inspectOn:",
  4982. fn: function (anInspector){
  4983. var self=this;
  4984. var variables;
  4985. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4986. variables=_st((smalltalk.Dictionary || Dictionary))._new();
  4987. _st(variables)._at_put_("#self",self);
  4988. _st(variables)._at_put_("#home",_st(self)._home());
  4989. _st(variables)._at_put_("#receiver",_st(self)._receiver());
  4990. _st(variables)._at_put_("#selector",_st(self)._selector());
  4991. _st(variables)._at_put_("#temps",_st(self)._temps());
  4992. _st(_st(_st(self)._class())._instanceVariableNames())._do_((function(each){
  4993. return smalltalk.withContext(function($ctx2) { return _st(variables)._at_put_(each,_st(self)._instVarAt_(each));
  4994. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4995. $1=anInspector;
  4996. _st($1)._setLabel_(_st(self)._printString());
  4997. $2=_st($1)._setVariables_(variables);
  4998. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables}, smalltalk.MethodContext)})},
  4999. messageSends: ["new", "at:put:", "home", "receiver", "selector", "temps", "do:", "instVarAt:", "instanceVariableNames", "class", "setLabel:", "printString", "setVariables:"]}),
  5000. smalltalk.MethodContext);