1
0

IDE.deploy.js 157 KB

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