IDE.deploy.js 153 KB

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