IDE.deploy.js 192 KB

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