1
0

IDE.js 271 KB

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