IDE.deploy.js 174 KB

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