IDE.deploy.js 191 KB

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