IDE.deploy.js 153 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718
  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 (anURL, aString) {
  1217. var self = this;
  1218. smalltalk.send(jQuery, "_ajax_options_", [anURL, 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 () {return smalltalk.send(window, "_alert_", [smalltalk.send("PUT request failed at: ", "__comma", [anURL])]);}])])]);
  1219. return self;
  1220. }
  1221. }),
  1222. smalltalk.Browser);
  1223. smalltalk.addMethod(
  1224. "_canBeClosed",
  1225. smalltalk.method({
  1226. selector: "canBeClosed",
  1227. fn: function () {
  1228. var self = this;
  1229. return true;
  1230. }
  1231. }),
  1232. smalltalk.Browser);
  1233. smalltalk.addMethod(
  1234. "_cancelChanges",
  1235. smalltalk.method({
  1236. selector: "cancelChanges",
  1237. fn: function () {
  1238. var self = this;
  1239. var $1;
  1240. if (smalltalk.assert(self['@unsavedChanges'])) {
  1241. $1 = smalltalk.send(window, "_confirm_", ["Cancel changes?"]);
  1242. } else {
  1243. $1 = true;
  1244. }
  1245. return $1;
  1246. }
  1247. }),
  1248. smalltalk.Browser);
  1249. smalltalk.addMethod(
  1250. "_classCommentSource",
  1251. smalltalk.method({
  1252. selector: "classCommentSource",
  1253. fn: function () {
  1254. var self = this;
  1255. var $1;
  1256. $1 = smalltalk.send(self['@selectedClass'], "_comment", []);
  1257. return $1;
  1258. }
  1259. }),
  1260. smalltalk.Browser);
  1261. smalltalk.addMethod(
  1262. "_classDeclarationSource",
  1263. smalltalk.method({
  1264. selector: "classDeclarationSource",
  1265. fn: function () {
  1266. var self = this;
  1267. var $1, $2, $3, $4;
  1268. var stream;
  1269. stream = smalltalk.send("", "_writeStream", []);
  1270. if (($receiver = self['@selectedClass']) == nil ||
  1271. $receiver == undefined) {
  1272. $1 = smalltalk.send(self, "_classDeclarationTemplate", []);
  1273. return $1;
  1274. } else {
  1275. self['@selectedClass'];
  1276. }
  1277. smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(smalltalk.send(self['@selectedClass'], "_superclass", []), "_asString", [])]);
  1278. smalltalk.send(stream, "_nextPutAll_", [" subclass: #"]);
  1279. smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self['@selectedClass'], "_name", [])]);
  1280. smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.String || String, "_lf", []), "__comma", [smalltalk.send(smalltalk.String || String, "_tab", [])])]);
  1281. $2 = smalltalk.send(stream, "_nextPutAll_", ["instanceVariableNames: '"]);
  1282. smalltalk.send(smalltalk.send(self['@selectedClass'], "_instanceVariableNames", []), "_do_separatedBy_", [function (each) {return smalltalk.send(stream, "_nextPutAll_", [each]);}, function () {return smalltalk.send(stream, "_nextPutAll_", [" "]);}]);
  1283. smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [smalltalk.send(smalltalk.String || String, "_lf", [])]), "__comma", [smalltalk.send(smalltalk.String || String, "_tab", [])])]);
  1284. smalltalk.send(stream, "_nextPutAll_", ["package: '"]);
  1285. smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self['@selectedClass'], "_category", [])]);
  1286. $3 = smalltalk.send(stream, "_nextPutAll_", ["'"]);
  1287. $4 = smalltalk.send(stream, "_contents", []);
  1288. return $4;
  1289. }
  1290. }),
  1291. smalltalk.Browser);
  1292. smalltalk.addMethod(
  1293. "_classDeclarationTemplate",
  1294. smalltalk.method({
  1295. selector: "classDeclarationTemplate",
  1296. fn: function () {
  1297. var self = this;
  1298. var $1;
  1299. $1 = smalltalk.send(smalltalk.send("Object subclass: #NameOfSubclass\n\tinstanceVariableNames: ''\n\tpackage: '", "__comma", [smalltalk.send(self, "_selectedPackage", [])]), "__comma", ["'"]);
  1300. return $1;
  1301. }
  1302. }),
  1303. smalltalk.Browser);
  1304. smalltalk.addMethod(
  1305. "_classes",
  1306. smalltalk.method({
  1307. selector: "classes",
  1308. fn: function () {
  1309. var self = this;
  1310. var $1;
  1311. $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", []);
  1312. return $1;
  1313. }
  1314. }),
  1315. smalltalk.Browser);
  1316. smalltalk.addMethod(
  1317. "_commitPackage",
  1318. smalltalk.method({
  1319. selector: "commitPackage",
  1320. fn: function () {
  1321. var self = this;
  1322. if (($receiver = self['@selectedPackage']) == nil ||
  1323. $receiver == undefined) {
  1324. self['@selectedPackage'];
  1325. } else {
  1326. var package;
  1327. package = smalltalk.send(smalltalk.Package || Package, "_named_", [self['@selectedPackage']]);
  1328. 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) {var fileContents;fileContents = smalltalk.send(smalltalk.send(smalltalk.send(commitStrategy, "_key", []), "_new", []), "_exportPackage_", [self['@selectedPackage']]);return smalltalk.send(self, "_ajaxPutAt_data_", [smalltalk.send(commitStrategy, "_value", []), fileContents]);}]);
  1329. }
  1330. return self;
  1331. }
  1332. }),
  1333. smalltalk.Browser);
  1334. smalltalk.addMethod(
  1335. "_compile",
  1336. smalltalk.method({
  1337. selector: "compile",
  1338. fn: function () {
  1339. var self = this;
  1340. var $1, $2;
  1341. var currentEditLine;
  1342. smalltalk.send(self, "_disableSaveButton", []);
  1343. currentEditLine = smalltalk.send(smalltalk.send(self['@sourceArea'], "_editor", []), "_getCursor", []);
  1344. $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")]);
  1345. if (smalltalk.assert($1)) {
  1346. if (($receiver = self['@selectedClass']) == nil ||
  1347. $receiver == undefined) {
  1348. self['@selectedClass'];
  1349. } else {
  1350. smalltalk.send(self, "_compileClassComment", []);
  1351. }
  1352. } else {
  1353. $2 = smalltalk.send(smalltalk.send(self['@selectedProtocol'], "_notNil", []), "_or_", [function () {return smalltalk.send(self['@selectedMethod'], "_notNil", []);}]);
  1354. if (smalltalk.assert($2)) {
  1355. smalltalk.send(self, "_compileMethodDefinition", []);
  1356. } else {
  1357. smalltalk.send(self, "_compileDefinition", []);
  1358. }
  1359. }
  1360. smalltalk.send(smalltalk.send(self['@sourceArea'], "_editor", []), "_setCursor_", [currentEditLine]);
  1361. return self;
  1362. }
  1363. }),
  1364. smalltalk.Browser);
  1365. smalltalk.addMethod(
  1366. "_compileClassComment",
  1367. smalltalk.method({
  1368. selector: "compileClassComment",
  1369. fn: function () {
  1370. var self = this;
  1371. smalltalk.send(self['@selectedClass'], "_comment_", [smalltalk.send(self['@sourceArea'], "_val", [])]);
  1372. return self;
  1373. }
  1374. }),
  1375. smalltalk.Browser);
  1376. smalltalk.addMethod(
  1377. "_compileDefinition",
  1378. smalltalk.method({
  1379. selector: "compileDefinition",
  1380. fn: function () {
  1381. var self = this;
  1382. var $1;
  1383. var newClass;
  1384. newClass = smalltalk.send(smalltalk.send(smalltalk.Compiler || Compiler, "_new", []), "_evaluateExpression_", [smalltalk.send(self['@sourceArea'], "_val", [])]);
  1385. smalltalk.send(self, "_resetClassesList", []);
  1386. smalltalk.send(self, "_updateCategoriesList", []);
  1387. $1 = smalltalk.send(self, "_updateClassesList", []);
  1388. smalltalk.send(self, "_selectClass_", [newClass]);
  1389. return self;
  1390. }
  1391. }),
  1392. smalltalk.Browser);
  1393. smalltalk.addMethod(
  1394. "_compileMethodDefinition",
  1395. smalltalk.method({
  1396. selector: "compileMethodDefinition",
  1397. fn: function () {
  1398. var self = this;
  1399. var $1;
  1400. $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
  1401. if (smalltalk.assert($1)) {
  1402. smalltalk.send(self, "_compileMethodDefinitionFor_", [self['@selectedClass']]);
  1403. } else {
  1404. smalltalk.send(self, "_compileMethodDefinitionFor_", [smalltalk.send(self['@selectedClass'], "_class", [])]);
  1405. }
  1406. return self;
  1407. }
  1408. }),
  1409. smalltalk.Browser);
  1410. smalltalk.addMethod(
  1411. "_compileMethodDefinitionFor_",
  1412. smalltalk.method({
  1413. selector: "compileMethodDefinitionFor:",
  1414. fn: function (aClass) {
  1415. var self = this;
  1416. var $1, $2, $3, $4, $5;
  1417. var $early = {};
  1418. try {
  1419. var compiler;
  1420. var method;
  1421. var source;
  1422. var node;
  1423. source = smalltalk.send(self['@sourceArea'], "_val", []);
  1424. if (($receiver = self['@selectedProtocol']) == nil ||
  1425. $receiver == undefined) {
  1426. self['@selectedProtocol'] = smalltalk.send(self['@selectedMethod'], "_category", []);
  1427. self['@selectedProtocol'];
  1428. } else {
  1429. self['@selectedProtocol'];
  1430. }
  1431. compiler = smalltalk.send(smalltalk.Compiler || Compiler, "_new", []);
  1432. smalltalk.send(compiler, "_source_", [source]);
  1433. node = smalltalk.send(compiler, "_parse_", [source]);
  1434. $1 = smalltalk.send(node, "_isParseFailure", []);
  1435. if (smalltalk.assert($1)) {
  1436. $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", [])])]);
  1437. return $2;
  1438. }
  1439. smalltalk.send(compiler, "_currentClass_", [aClass]);
  1440. method = smalltalk.send(compiler, "_eval_", [smalltalk.send(compiler, "_compileNode_", [node])]);
  1441. smalltalk.send(method, "_category_", [self['@selectedProtocol']]);
  1442. 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;}}]);
  1443. smalltalk.send(aClass, "_addCompiledMethod_", [method]);
  1444. smalltalk.send(compiler, "_setupClass_", [aClass]);
  1445. smalltalk.send(self, "_updateMethodsList", []);
  1446. smalltalk.send(self, "_selectMethod_", [method]);
  1447. return self;
  1448. } catch (e) {
  1449. if (e === $early) {
  1450. return e[0];
  1451. }
  1452. throw e;
  1453. }
  1454. }
  1455. }),
  1456. smalltalk.Browser);
  1457. smalltalk.addMethod(
  1458. "_copyClass",
  1459. smalltalk.method({
  1460. selector: "copyClass",
  1461. fn: function () {
  1462. var self = this;
  1463. var $1, $2;
  1464. var className;
  1465. className = smalltalk.send(window, "_prompt_", ["Copy class"]);
  1466. $1 = smalltalk.send(smalltalk.send(className, "_notNil", []), "_and_", [function () {return smalltalk.send(className, "_notEmpty", []);}]);
  1467. if (smalltalk.assert($1)) {
  1468. smalltalk.send(smalltalk.send(smalltalk.ClassBuilder || ClassBuilder, "_new", []), "_copyClass_named_", [smalltalk.send(self, "_selectedClass", []), className]);
  1469. smalltalk.send(self, "_resetClassesList", []);
  1470. $2 = smalltalk.send(self, "_updateClassesList", []);
  1471. smalltalk.send(self, "_selectClass_", [smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_at_", [className])]);
  1472. }
  1473. return self;
  1474. }
  1475. }),
  1476. smalltalk.Browser);
  1477. smalltalk.addMethod(
  1478. "_declarationSource",
  1479. smalltalk.method({
  1480. selector: "declarationSource",
  1481. fn: function () {
  1482. var self = this;
  1483. var $2, $1;
  1484. $2 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
  1485. if (smalltalk.assert($2)) {
  1486. $1 = smalltalk.send(self, "_classDeclarationSource", []);
  1487. } else {
  1488. $1 = smalltalk.send(self, "_metaclassDeclarationSource", []);
  1489. }
  1490. return $1;
  1491. }
  1492. }),
  1493. smalltalk.Browser);
  1494. smalltalk.addMethod(
  1495. "_disableSaveButton",
  1496. smalltalk.method({
  1497. selector: "disableSaveButton",
  1498. fn: function () {
  1499. var self = this;
  1500. if (($receiver = self['@saveButton']) == nil || $receiver == undefined) {
  1501. self['@saveButton'];
  1502. } else {
  1503. smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);
  1504. }
  1505. self['@unsavedChanges'] = false;
  1506. return self;
  1507. }
  1508. }),
  1509. smalltalk.Browser);
  1510. smalltalk.addMethod(
  1511. "_dummyMethodSource",
  1512. smalltalk.method({
  1513. selector: "dummyMethodSource",
  1514. fn: function () {
  1515. var self = this;
  1516. return "messageSelectorAndArgumentNames\n\t\"comment stating purpose of message\"\n\n\t| temporary variable names |\n\tstatements";
  1517. }
  1518. }),
  1519. smalltalk.Browser);
  1520. smalltalk.addMethod(
  1521. "_handleSourceAreaKeyDown_",
  1522. smalltalk.method({
  1523. selector: "handleSourceAreaKeyDown:",
  1524. fn: function (anEvent) {
  1525. var self = this;
  1526. if (anEvent.ctrlKey) {
  1527. if (anEvent.keyCode === 83) {
  1528. self._compile();
  1529. anEvent.preventDefault();
  1530. return false;
  1531. }
  1532. }
  1533. return self;
  1534. }
  1535. }),
  1536. smalltalk.Browser);
  1537. smalltalk.addMethod(
  1538. "_hideClassButtons",
  1539. smalltalk.method({
  1540. selector: "hideClassButtons",
  1541. fn: function () {
  1542. var self = this;
  1543. smalltalk.send(smalltalk.send(self['@classButtons'], "_asJQuery", []), "_hide", []);
  1544. return self;
  1545. }
  1546. }),
  1547. smalltalk.Browser);
  1548. smalltalk.addMethod(
  1549. "_hideMethodButtons",
  1550. smalltalk.method({
  1551. selector: "hideMethodButtons",
  1552. fn: function () {
  1553. var self = this;
  1554. smalltalk.send(smalltalk.send(self['@methodButtons'], "_asJQuery", []), "_hide", []);
  1555. return self;
  1556. }
  1557. }),
  1558. smalltalk.Browser);
  1559. smalltalk.addMethod(
  1560. "_initialize",
  1561. smalltalk.method({
  1562. selector: "initialize",
  1563. fn: function () {
  1564. var self = this;
  1565. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  1566. self['@selectedTab'] = smalltalk.symbolFor("instance");
  1567. self['@selectedPackage'] = smalltalk.send(smalltalk.send(self, "_packages", []), "_first", []);
  1568. self['@unsavedChanges'] = false;
  1569. return self;
  1570. }
  1571. }),
  1572. smalltalk.Browser);
  1573. smalltalk.addMethod(
  1574. "_label",
  1575. smalltalk.method({
  1576. selector: "label",
  1577. fn: function () {
  1578. var self = this;
  1579. var $1;
  1580. if (($receiver = self['@selectedClass']) == nil ||
  1581. $receiver == undefined) {
  1582. $1 = "Browser (nil)";
  1583. } else {
  1584. $1 = smalltalk.send("Browser: ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])]);
  1585. }
  1586. return $1;
  1587. }
  1588. }),
  1589. smalltalk.Browser);
  1590. smalltalk.addMethod(
  1591. "_metaclassDeclarationSource",
  1592. smalltalk.method({
  1593. selector: "metaclassDeclarationSource",
  1594. fn: function () {
  1595. var self = this;
  1596. var $1, $2;
  1597. var stream;
  1598. stream = smalltalk.send("", "_writeStream", []);
  1599. if (($receiver = self['@selectedClass']) == nil ||
  1600. $receiver == undefined) {
  1601. self['@selectedClass'];
  1602. } else {
  1603. smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self['@selectedClass'], "_asString", [])]);
  1604. smalltalk.send(stream, "_nextPutAll_", [" class "]);
  1605. $1 = smalltalk.send(stream, "_nextPutAll_", ["instanceVariableNames: '"]);
  1606. 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_", [" "]);}]);
  1607. smalltalk.send(stream, "_nextPutAll_", ["'"]);
  1608. }
  1609. $2 = smalltalk.send(stream, "_contents", []);
  1610. return $2;
  1611. }
  1612. }),
  1613. smalltalk.Browser);
  1614. smalltalk.addMethod(
  1615. "_methodSource",
  1616. smalltalk.method({
  1617. selector: "methodSource",
  1618. fn: function () {
  1619. var self = this;
  1620. var $1;
  1621. if (($receiver = self['@selectedMethod']) == nil ||
  1622. $receiver == undefined) {
  1623. $1 = smalltalk.send(self, "_dummyMethodSource", []);
  1624. } else {
  1625. $1 = smalltalk.send(self['@selectedMethod'], "_source", []);
  1626. }
  1627. return $1;
  1628. }
  1629. }),
  1630. smalltalk.Browser);
  1631. smalltalk.addMethod(
  1632. "_methods",
  1633. smalltalk.method({
  1634. selector: "methods",
  1635. fn: function () {
  1636. var self = this;
  1637. var $1, $2, $4, $3;
  1638. var klass;
  1639. $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")]);
  1640. if (smalltalk.assert($1)) {
  1641. return [];
  1642. }
  1643. if (($receiver = self['@selectedClass']) == nil ||
  1644. $receiver == undefined) {
  1645. self['@selectedClass'];
  1646. } else {
  1647. $2 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
  1648. if (smalltalk.assert($2)) {
  1649. klass = self['@selectedClass'];
  1650. } else {
  1651. klass = smalltalk.send(self['@selectedClass'], "_class", []);
  1652. }
  1653. }
  1654. if (($receiver = self['@selectedProtocol']) == nil ||
  1655. $receiver == undefined) {
  1656. if (($receiver = klass) == nil || $receiver == undefined) {
  1657. $4 = [];
  1658. } else {
  1659. $4 = smalltalk.send(smalltalk.send(klass, "_methodDictionary", []), "_values", []);
  1660. }
  1661. } else {
  1662. $4 = smalltalk.send(smalltalk.send(smalltalk.send(klass, "_methodDictionary", []), "_values", []), "_select_", [function (each) {return smalltalk.send(smalltalk.send(each, "_category", []), "__eq", [self['@selectedProtocol']]);}]);
  1663. }
  1664. $3 = smalltalk.send($4, "_sort_", [function (a, b) {return smalltalk.send(smalltalk.send(a, "_selector", []), "__lt", [smalltalk.send(b, "_selector", [])]);}]);
  1665. return $3;
  1666. }
  1667. }),
  1668. smalltalk.Browser);
  1669. smalltalk.addMethod(
  1670. "_packages",
  1671. smalltalk.method({
  1672. selector: "packages",
  1673. fn: function () {
  1674. var self = this;
  1675. var $1, $2;
  1676. var packages;
  1677. packages = smalltalk.send(smalltalk.Array || Array, "_new", []);
  1678. 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", [])]);}}]);
  1679. $2 = smalltalk.send(packages, "_sort", []);
  1680. return $2;
  1681. }
  1682. }),
  1683. smalltalk.Browser);
  1684. smalltalk.addMethod(
  1685. "_protocols",
  1686. smalltalk.method({
  1687. selector: "protocols",
  1688. fn: function () {
  1689. var self = this;
  1690. var $1, $2, $3, $4, $5, $6;
  1691. var klass;
  1692. if (($receiver = self['@selectedClass']) == nil ||
  1693. $receiver == undefined) {
  1694. self['@selectedClass'];
  1695. } else {
  1696. $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")]);
  1697. if (smalltalk.assert($1)) {
  1698. return [];
  1699. }
  1700. $2 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
  1701. if (smalltalk.assert($2)) {
  1702. klass = self['@selectedClass'];
  1703. } else {
  1704. klass = smalltalk.send(self['@selectedClass'], "_class", []);
  1705. }
  1706. $3 = smalltalk.send(smalltalk.send(klass, "_methodDictionary", []), "_isEmpty", []);
  1707. if (smalltalk.assert($3)) {
  1708. $4 = smalltalk.send(smalltalk.Array || Array, "_with_", ["not yet classified"]);
  1709. return $4;
  1710. }
  1711. $5 = smalltalk.send(klass, "_protocols", []);
  1712. return $5;
  1713. }
  1714. $6 = smalltalk.send(smalltalk.Array || Array, "_new", []);
  1715. return $6;
  1716. }
  1717. }),
  1718. smalltalk.Browser);
  1719. smalltalk.addMethod(
  1720. "_removeClass",
  1721. smalltalk.method({
  1722. selector: "removeClass",
  1723. fn: function () {
  1724. var self = this;
  1725. var $1;
  1726. $1 = smalltalk.send(window, "_confirm_", [smalltalk.send(smalltalk.send("Do you really want to remove ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])]), "__comma", ["?"])]);
  1727. if (smalltalk.assert($1)) {
  1728. smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_removeClass_", [self['@selectedClass']]);
  1729. smalltalk.send(self, "_resetClassesList", []);
  1730. smalltalk.send(self, "_selectClass_", [nil]);
  1731. }
  1732. return self;
  1733. }
  1734. }),
  1735. smalltalk.Browser);
  1736. smalltalk.addMethod(
  1737. "_removeMethod",
  1738. smalltalk.method({
  1739. selector: "removeMethod",
  1740. fn: function () {
  1741. var self = this;
  1742. var $1, $2, $3;
  1743. $1 = smalltalk.send(self, "_cancelChanges", []);
  1744. if (smalltalk.assert($1)) {
  1745. $2 = smalltalk.send(window, "_confirm_", [smalltalk.send(smalltalk.send("Do you really want to remove #", "__comma", [smalltalk.send(self['@selectedMethod'], "_selector", [])]), "__comma", ["?"])]);
  1746. if (smalltalk.assert($2)) {
  1747. $3 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
  1748. if (smalltalk.assert($3)) {
  1749. smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);
  1750. } else {
  1751. smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);
  1752. }
  1753. smalltalk.send(self, "_selectMethod_", [nil]);
  1754. }
  1755. }
  1756. return self;
  1757. }
  1758. }),
  1759. smalltalk.Browser);
  1760. smalltalk.addMethod(
  1761. "_removePackage",
  1762. smalltalk.method({
  1763. selector: "removePackage",
  1764. fn: function () {
  1765. var self = this;
  1766. var $1;
  1767. $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?"])]);
  1768. if (smalltalk.assert($1)) {
  1769. smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_removePackage_", [self['@selectedPackage']]);
  1770. smalltalk.send(self, "_updateCategoriesList", []);
  1771. }
  1772. return self;
  1773. }
  1774. }),
  1775. smalltalk.Browser);
  1776. smalltalk.addMethod(
  1777. "_renameClass",
  1778. smalltalk.method({
  1779. selector: "renameClass",
  1780. fn: function () {
  1781. var self = this;
  1782. var $1, $2;
  1783. var newName;
  1784. newName = smalltalk.send(window, "_prompt_", [smalltalk.send("Rename class ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])])]);
  1785. $1 = smalltalk.send(smalltalk.send(newName, "_notNil", []), "_and_", [function () {return smalltalk.send(newName, "_notEmpty", []);}]);
  1786. if (smalltalk.assert($1)) {
  1787. smalltalk.send(self['@selectedClass'], "_rename_", [newName]);
  1788. smalltalk.send(self, "_updateClassesList", []);
  1789. $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
  1790. }
  1791. return self;
  1792. }
  1793. }),
  1794. smalltalk.Browser);
  1795. smalltalk.addMethod(
  1796. "_renamePackage",
  1797. smalltalk.method({
  1798. selector: "renamePackage",
  1799. fn: function () {
  1800. var self = this;
  1801. var $1;
  1802. var newName;
  1803. newName = smalltalk.send(window, "_prompt_", [smalltalk.send("Rename package ", "__comma", [self['@selectedPackage']])]);
  1804. if (($receiver = newName) == nil || $receiver == undefined) {
  1805. } else {
  1806. $1 = smalltalk.send(newName, "_notEmpty", []);
  1807. if (smalltalk.assert($1)) {
  1808. smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_renamePackage_to_", [self['@selectedPackage'], newName]);
  1809. smalltalk.send(self, "_updateCategoriesList", []);
  1810. }
  1811. }
  1812. return self;
  1813. }
  1814. }),
  1815. smalltalk.Browser);
  1816. smalltalk.addMethod(
  1817. "_renderBottomPanelOn_",
  1818. smalltalk.method({
  1819. selector: "renderBottomPanelOn:",
  1820. fn: function (html) {
  1821. var self = this;
  1822. var $1, $2;
  1823. $1 = smalltalk.send(html, "_div", []);
  1824. smalltalk.send($1, "_class_", ["amber_sourceCode"]);
  1825. $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", []);}]);}]);
  1826. return self;
  1827. }
  1828. }),
  1829. smalltalk.Browser);
  1830. smalltalk.addMethod(
  1831. "_renderBoxOn_",
  1832. smalltalk.method({
  1833. selector: "renderBoxOn:",
  1834. fn: function (html) {
  1835. var self = this;
  1836. var $1;
  1837. smalltalk.send(self, "_renderTopPanelOn_", [html]);
  1838. smalltalk.send(self, "_renderTabsOn_", [html]);
  1839. $1 = smalltalk.send(self, "_renderBottomPanelOn_", [html]);
  1840. return self;
  1841. }
  1842. }),
  1843. smalltalk.Browser);
  1844. smalltalk.addMethod(
  1845. "_renderButtonsOn_",
  1846. smalltalk.method({
  1847. selector: "renderButtonsOn:",
  1848. fn: function (html) {
  1849. var self = this;
  1850. var $1, $2, $4, $5, $6, $7, $8, $9, $3;
  1851. self['@saveButton'] = smalltalk.send(html, "_button", []);
  1852. smalltalk.send(self['@saveButton'], "_with_", ["Save"]);
  1853. $1 = smalltalk.send(self['@saveButton'], "_onClick_", [function () {return smalltalk.send(self, "_compile", []);}]);
  1854. self['@methodButtons'] = smalltalk.send(html, "_span", []);
  1855. self['@classButtons'] = smalltalk.send(html, "_span", []);
  1856. $2 = smalltalk.send(html, "_div", []);
  1857. smalltalk.send($2, "_class_", ["right"]);
  1858. $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;}]);
  1859. smalltalk.send(self, "_updateSourceAndButtons", []);
  1860. return self;
  1861. }
  1862. }),
  1863. smalltalk.Browser);
  1864. smalltalk.addMethod(
  1865. "_renderTabsOn_",
  1866. smalltalk.method({
  1867. selector: "renderTabsOn:",
  1868. fn: function (html) {
  1869. var self = this;
  1870. self['@tabsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_tabs amber_browser"]);
  1871. smalltalk.send(self, "_updateTabsList", []);
  1872. return self;
  1873. }
  1874. }),
  1875. smalltalk.Browser);
  1876. smalltalk.addMethod(
  1877. "_renderTopPanelOn_",
  1878. smalltalk.method({
  1879. selector: "renderTopPanelOn:",
  1880. fn: function (html) {
  1881. var self = this;
  1882. var $1, $3, $5, $6, $7, $8, $9, $10, $4, $11, $2;
  1883. $1 = smalltalk.send(html, "_div", []);
  1884. smalltalk.send($1, "_class_", ["top"]);
  1885. $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"]);}]);
  1886. return self;
  1887. }
  1888. }),
  1889. smalltalk.Browser);
  1890. smalltalk.addMethod(
  1891. "_resetClassesList",
  1892. smalltalk.method({
  1893. selector: "resetClassesList",
  1894. fn: function () {
  1895. var self = this;
  1896. smalltalk.send(self['@classesList'], "_resetNodes", []);
  1897. return self;
  1898. }
  1899. }),
  1900. smalltalk.Browser);
  1901. smalltalk.addMethod(
  1902. "_search_",
  1903. smalltalk.method({
  1904. selector: "search:",
  1905. fn: function (aString) {
  1906. var self = this;
  1907. var $1, $2;
  1908. $1 = smalltalk.send(self, "_cancelChanges", []);
  1909. if (smalltalk.assert($1)) {
  1910. var searchedClass;
  1911. searchedClass = smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_at_", [aString]);
  1912. $2 = smalltalk.send(searchedClass, "_isClass", []);
  1913. if (smalltalk.assert($2)) {
  1914. smalltalk.send(smalltalk.send(self, "_class", []), "_openOn_", [searchedClass]);
  1915. } else {
  1916. smalltalk.send(self, "_searchReferencesOf_", [aString]);
  1917. }
  1918. }
  1919. return self;
  1920. }
  1921. }),
  1922. smalltalk.Browser);
  1923. smalltalk.addMethod(
  1924. "_searchClassReferences",
  1925. smalltalk.method({
  1926. selector: "searchClassReferences",
  1927. fn: function () {
  1928. var self = this;
  1929. smalltalk.send(smalltalk.ReferencesBrowser || ReferencesBrowser, "_search_", [smalltalk.send(self['@selectedClass'], "_name", [])]);
  1930. return self;
  1931. }
  1932. }),
  1933. smalltalk.Browser);
  1934. smalltalk.addMethod(
  1935. "_searchReferencesOf_",
  1936. smalltalk.method({
  1937. selector: "searchReferencesOf:",
  1938. fn: function (aString) {
  1939. var self = this;
  1940. smalltalk.send(smalltalk.ReferencesBrowser || ReferencesBrowser, "_search_", [aString]);
  1941. return self;
  1942. }
  1943. }),
  1944. smalltalk.Browser);
  1945. smalltalk.addMethod(
  1946. "_selectCategory_",
  1947. smalltalk.method({
  1948. selector: "selectCategory:",
  1949. fn: function (aCategory) {
  1950. var self = this;
  1951. var $1, $2;
  1952. $1 = smalltalk.send(self, "_cancelChanges", []);
  1953. if (smalltalk.assert($1)) {
  1954. self['@selectedPackage'] = aCategory;
  1955. self['@selectedPackage'];
  1956. self['@selectedMethod'] = nil;
  1957. self['@selectedProtocol'] = self['@selectedMethod'];
  1958. self['@selectedClass'] = self['@selectedProtocol'];
  1959. self['@selectedClass'];
  1960. smalltalk.send(self, "_resetClassesList", []);
  1961. smalltalk.send(self, "_updateCategoriesList", []);
  1962. smalltalk.send(self, "_updateClassesList", []);
  1963. smalltalk.send(self, "_updateProtocolsList", []);
  1964. smalltalk.send(self, "_updateMethodsList", []);
  1965. $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
  1966. }
  1967. return self;
  1968. }
  1969. }),
  1970. smalltalk.Browser);
  1971. smalltalk.addMethod(
  1972. "_selectClass_",
  1973. smalltalk.method({
  1974. selector: "selectClass:",
  1975. fn: function (aClass) {
  1976. var self = this;
  1977. var $1, $2;
  1978. $1 = smalltalk.send(self, "_cancelChanges", []);
  1979. if (smalltalk.assert($1)) {
  1980. self['@selectedClass'] = aClass;
  1981. self['@selectedClass'];
  1982. self['@selectedMethod'] = nil;
  1983. self['@selectedProtocol'] = self['@selectedMethod'];
  1984. self['@selectedProtocol'];
  1985. smalltalk.send(self, "_updateClassesList", []);
  1986. smalltalk.send(self, "_updateProtocolsList", []);
  1987. smalltalk.send(self, "_updateMethodsList", []);
  1988. $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
  1989. }
  1990. return self;
  1991. }
  1992. }),
  1993. smalltalk.Browser);
  1994. smalltalk.addMethod(
  1995. "_selectMethod_",
  1996. smalltalk.method({
  1997. selector: "selectMethod:",
  1998. fn: function (aMethod) {
  1999. var self = this;
  2000. var $1, $2;
  2001. $1 = smalltalk.send(self, "_cancelChanges", []);
  2002. if (smalltalk.assert($1)) {
  2003. self['@selectedMethod'] = aMethod;
  2004. self['@selectedMethod'];
  2005. smalltalk.send(self, "_updateProtocolsList", []);
  2006. smalltalk.send(self, "_updateMethodsList", []);
  2007. $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
  2008. }
  2009. return self;
  2010. }
  2011. }),
  2012. smalltalk.Browser);
  2013. smalltalk.addMethod(
  2014. "_selectProtocol_",
  2015. smalltalk.method({
  2016. selector: "selectProtocol:",
  2017. fn: function (aString) {
  2018. var self = this;
  2019. var $1, $2;
  2020. $1 = smalltalk.send(self, "_cancelChanges", []);
  2021. if (smalltalk.assert($1)) {
  2022. self['@selectedProtocol'] = aString;
  2023. self['@selectedProtocol'];
  2024. self['@selectedMethod'] = nil;
  2025. self['@selectedMethod'];
  2026. smalltalk.send(self, "_updateProtocolsList", []);
  2027. smalltalk.send(self, "_updateMethodsList", []);
  2028. $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
  2029. }
  2030. return self;
  2031. }
  2032. }),
  2033. smalltalk.Browser);
  2034. smalltalk.addMethod(
  2035. "_selectTab_",
  2036. smalltalk.method({
  2037. selector: "selectTab:",
  2038. fn: function (aString) {
  2039. var self = this;
  2040. var $1;
  2041. $1 = smalltalk.send(self, "_cancelChanges", []);
  2042. if (smalltalk.assert($1)) {
  2043. self['@selectedTab'] = aString;
  2044. self['@selectedTab'];
  2045. smalltalk.send(self, "_selectProtocol_", [nil]);
  2046. smalltalk.send(self, "_updateTabsList", []);
  2047. }
  2048. return self;
  2049. }
  2050. }),
  2051. smalltalk.Browser);
  2052. smalltalk.addMethod(
  2053. "_selectedClass",
  2054. smalltalk.method({
  2055. selector: "selectedClass",
  2056. fn: function () {
  2057. var self = this;
  2058. return self['@selectedClass'];
  2059. }
  2060. }),
  2061. smalltalk.Browser);
  2062. smalltalk.addMethod(
  2063. "_selectedPackage",
  2064. smalltalk.method({
  2065. selector: "selectedPackage",
  2066. fn: function () {
  2067. var self = this;
  2068. return self['@selectedPackage'];
  2069. }
  2070. }),
  2071. smalltalk.Browser);
  2072. smalltalk.addMethod(
  2073. "_setMethodProtocol_",
  2074. smalltalk.method({
  2075. selector: "setMethodProtocol:",
  2076. fn: function (aString) {
  2077. var self = this;
  2078. var $1, $2, $3;
  2079. $1 = smalltalk.send(self, "_cancelChanges", []);
  2080. if (smalltalk.assert($1)) {
  2081. $2 = smalltalk.send(smalltalk.send(self, "_protocols", []), "_includes_", [aString]);
  2082. if (smalltalk.assert($2)) {
  2083. smalltalk.send(self['@selectedMethod'], "_category_", [aString]);
  2084. self['@selectedProtocol'] = aString;
  2085. self['@selectedProtocol'];
  2086. self['@selectedMethod'] = self['@selectedMethod'];
  2087. self['@selectedMethod'];
  2088. smalltalk.send(self, "_updateProtocolsList", []);
  2089. smalltalk.send(self, "_updateMethodsList", []);
  2090. $3 = smalltalk.send(self, "_updateSourceAndButtons", []);
  2091. } else {
  2092. smalltalk.send(self, "_addNewProtocol", []);
  2093. }
  2094. }
  2095. return self;
  2096. }
  2097. }),
  2098. smalltalk.Browser);
  2099. smalltalk.addMethod(
  2100. "_showClassButtons",
  2101. smalltalk.method({
  2102. selector: "showClassButtons",
  2103. fn: function () {
  2104. var self = this;
  2105. smalltalk.send(smalltalk.send(self['@classButtons'], "_asJQuery", []), "_show", []);
  2106. return self;
  2107. }
  2108. }),
  2109. smalltalk.Browser);
  2110. smalltalk.addMethod(
  2111. "_showMethodButtons",
  2112. smalltalk.method({
  2113. selector: "showMethodButtons",
  2114. fn: function () {
  2115. var self = this;
  2116. smalltalk.send(smalltalk.send(self['@methodButtons'], "_asJQuery", []), "_show", []);
  2117. return self;
  2118. }
  2119. }),
  2120. smalltalk.Browser);
  2121. smalltalk.addMethod(
  2122. "_source",
  2123. smalltalk.method({
  2124. selector: "source",
  2125. fn: function () {
  2126. var self = this;
  2127. var $1, $3, $2, $4;
  2128. $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")]);
  2129. if (!smalltalk.assert($1)) {
  2130. $3 = smalltalk.send(smalltalk.send(self['@selectedProtocol'], "_notNil", []), "_or_", [function () {return smalltalk.send(self['@selectedMethod'], "_notNil", []);}]);
  2131. if (smalltalk.assert($3)) {
  2132. $2 = smalltalk.send(self, "_methodSource", []);
  2133. } else {
  2134. $2 = smalltalk.send(self, "_declarationSource", []);
  2135. }
  2136. return $2;
  2137. }
  2138. if (($receiver = self['@selectedClass']) == nil ||
  2139. $receiver == undefined) {
  2140. $4 = "";
  2141. } else {
  2142. $4 = smalltalk.send(self, "_classCommentSource", []);
  2143. }
  2144. return $4;
  2145. }
  2146. }),
  2147. smalltalk.Browser);
  2148. smalltalk.addMethod(
  2149. "_updateCategoriesList",
  2150. smalltalk.method({
  2151. selector: "updateCategoriesList",
  2152. fn: function () {
  2153. var self = this;
  2154. var $1, $2, $3;
  2155. 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;}]);}]);
  2156. return self;
  2157. }
  2158. }),
  2159. smalltalk.Browser);
  2160. smalltalk.addMethod(
  2161. "_updateClassesList",
  2162. smalltalk.method({
  2163. selector: "updateClassesList",
  2164. fn: function () {
  2165. var self = this;
  2166. smalltalk.send(smalltalk.send(smalltalk.TabManager || TabManager, "_current", []), "_update", []);
  2167. smalltalk.send(self['@classesList'], "_updateNodes", []);
  2168. return self;
  2169. }
  2170. }),
  2171. smalltalk.Browser);
  2172. smalltalk.addMethod(
  2173. "_updateMethodsList",
  2174. smalltalk.method({
  2175. selector: "updateMethodsList",
  2176. fn: function () {
  2177. var self = this;
  2178. var $1, $2;
  2179. 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;}]);}]);
  2180. return self;
  2181. }
  2182. }),
  2183. smalltalk.Browser);
  2184. smalltalk.addMethod(
  2185. "_updateProtocolsList",
  2186. smalltalk.method({
  2187. selector: "updateProtocolsList",
  2188. fn: function () {
  2189. var self = this;
  2190. var $1, $2;
  2191. 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;}]);}]);
  2192. return self;
  2193. }
  2194. }),
  2195. smalltalk.Browser);
  2196. smalltalk.addMethod(
  2197. "_updateSourceAndButtons",
  2198. smalltalk.method({
  2199. selector: "updateSourceAndButtons",
  2200. fn: function (){
  2201. var self=this;
  2202. 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;
  2203. var currentProtocol;
  2204. smalltalk.send(self,"_disableSaveButton",[]);
  2205. smalltalk.send(self["@classButtons"],"_contents_",[(function(html){
  2206. $1=smalltalk.send(html,"_button",[]);
  2207. smalltalk.send($1,"_title_",["Create a new class"]);
  2208. smalltalk.send($1,"_onClick_",[(function(){
  2209. return smalltalk.send(self,"_addNewClass",[]);
  2210. })]);
  2211. $2=smalltalk.send($1,"_with_",["New class"]);
  2212. $2;
  2213. $3=smalltalk.send(html,"_button",[]);
  2214. smalltalk.send($3,"_with_",["Rename class"]);
  2215. $4=smalltalk.send($3,"_onClick_",[(function(){
  2216. return smalltalk.send(self,"_renameClass",[]);
  2217. })]);
  2218. $4;
  2219. $5=smalltalk.send(html,"_button",[]);
  2220. smalltalk.send($5,"_with_",["Copy class"]);
  2221. $6=smalltalk.send($5,"_onClick_",[(function(){
  2222. return smalltalk.send(self,"_copyClass",[]);
  2223. })]);
  2224. $6;
  2225. $7=smalltalk.send(html,"_button",[]);
  2226. smalltalk.send($7,"_with_",["Remove class"]);
  2227. $8=smalltalk.send($7,"_onClick_",[(function(){
  2228. return smalltalk.send(self,"_removeClass",[]);
  2229. })]);
  2230. $8;
  2231. $9=smalltalk.send(html,"_button",[]);
  2232. smalltalk.send($9,"_with_",["References"]);
  2233. $10=smalltalk.send($9,"_onClick_",[(function(){
  2234. return smalltalk.send(self,"_searchClassReferences",[]);
  2235. })]);
  2236. return $10;
  2237. })]);
  2238. smalltalk.send(self["@methodButtons"],"_contents_",[(function(html){
  2239. var protocolSelect;
  2240. var referencesSelect;
  2241. $11=smalltalk.send(html,"_button",[]);
  2242. smalltalk.send($11,"_with_",["Remove method"]);
  2243. $12=smalltalk.send($11,"_onClick_",[(function(){
  2244. return smalltalk.send(self,"_removeMethod",[]);
  2245. })]);
  2246. $12;
  2247. protocolSelect=smalltalk.send(html,"_select",[]);
  2248. protocolSelect;
  2249. smalltalk.send(protocolSelect,"_onChange_",[(function(){
  2250. return smalltalk.send(self,"_setMethodProtocol_",[smalltalk.send(smalltalk.send(protocolSelect,"_asJQuery",[]),"_val",[])]);
  2251. })]);
  2252. $13=smalltalk.send(protocolSelect,"_with_",[(function(){
  2253. $14=smalltalk.send(html,"_option",[]);
  2254. smalltalk.send($14,"_with_",["Method protocol"]);
  2255. $15=smalltalk.send($14,"_at_put_",["disabled","disabled"]);
  2256. $15;
  2257. $16=smalltalk.send(html,"_option",[]);
  2258. smalltalk.send($16,"_class_",["important"]);
  2259. $17=smalltalk.send($16,"_with_",["New..."]);
  2260. $17;
  2261. currentProtocol=self["@selectedProtocol"];
  2262. currentProtocol;
  2263. $18=smalltalk.send(smalltalk.send(currentProtocol,"_isNil",[]),"_and_",[(function(){
  2264. return smalltalk.send(self["@selectedMethod"],"_notNil",[]);
  2265. })]);
  2266. if(smalltalk.assert($18)){
  2267. currentProtocol=smalltalk.send(self["@selectedMethod"],"_category",[]);
  2268. currentProtocol;
  2269. };
  2270. return smalltalk.send(smalltalk.send(self,"_protocols",[]),"_do_",[(function(each){
  2271. option=smalltalk.send(smalltalk.send(html,"_option",[]),"_with_",[each]);
  2272. option;
  2273. $19=smalltalk.send(currentProtocol,"__eq",[each]);
  2274. if(smalltalk.assert($19)){
  2275. return smalltalk.send(option,"_at_put_",["selected","selected"]);
  2276. };
  2277. })]);
  2278. })]);
  2279. $13;
  2280. $20=smalltalk.send(self["@selectedMethod"],"_isNil",[]);
  2281. if(! smalltalk.assert($20)){
  2282. referencesSelect=smalltalk.send(html,"_select",[]);
  2283. referencesSelect;
  2284. smalltalk.send(referencesSelect,"_onChange_",[(function(){
  2285. return smalltalk.send(self,"_searchReferencesOf_",[smalltalk.send(smalltalk.send(referencesSelect,"_asJQuery",[]),"_val",[])]);
  2286. })]);
  2287. $21=smalltalk.send(referencesSelect,"_with_",[(function(){
  2288. var option;
  2289. $22=smalltalk.send(html,"_option",[]);
  2290. smalltalk.send($22,"_with_",["References"]);
  2291. smalltalk.send($22,"_at_put_",["disabled","disabled"]);
  2292. $23=smalltalk.send($22,"_at_put_",["selected","selected"]);
  2293. $23;
  2294. $24=smalltalk.send(html,"_option",[]);
  2295. smalltalk.send($24,"_class_",["important"]);
  2296. $25=smalltalk.send($24,"_with_",[smalltalk.send(self["@selectedMethod"],"_selector",[])]);
  2297. $25;
  2298. return smalltalk.send(smalltalk.send(smalltalk.send(self["@selectedMethod"],"_messageSends",[]),"_sorted",[]),"_do_",[(function(each){
  2299. return smalltalk.send(smalltalk.send(html,"_option",[]),"_with_",[each]);
  2300. })]);
  2301. })]);
  2302. return $21;
  2303. };
  2304. })]);
  2305. $26=smalltalk.send(self["@selectedMethod"],"_isNil",[]);
  2306. if(smalltalk.assert($26)){
  2307. smalltalk.send(self,"_hideMethodButtons",[]);
  2308. $27=smalltalk.send(smalltalk.send(self["@selectedClass"],"_isNil",[]),"_or_",[(function(){
  2309. return smalltalk.send(self["@selectedProtocol"],"_notNil",[]);
  2310. })]);
  2311. if(smalltalk.assert($27)){
  2312. smalltalk.send(self,"_hideClassButtons",[]);
  2313. } else {
  2314. smalltalk.send(self,"_showClassButtons",[]);
  2315. };
  2316. } else {
  2317. smalltalk.send(self,"_hideClassButtons",[]);
  2318. smalltalk.send(self,"_showMethodButtons",[]);
  2319. };
  2320. smalltalk.send(self["@sourceArea"],"_val_",[smalltalk.send(self,"_source",[])]);
  2321. return self}
  2322. }),
  2323. smalltalk.Browser);
  2324. smalltalk.addMethod(
  2325. "_updateStatus",
  2326. smalltalk.method({
  2327. selector: "updateStatus",
  2328. fn: function () {
  2329. var self = this;
  2330. var $1;
  2331. $1 = smalltalk.send(smalltalk.send(self['@sourceArea'], "_val", []), "__eq", [smalltalk.send(self, "_source", [])]);
  2332. if (smalltalk.assert($1)) {
  2333. if (($receiver = self['@saveButton']) == nil ||
  2334. $receiver == undefined) {
  2335. self['@saveButton'];
  2336. } else {
  2337. smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);
  2338. }
  2339. self['@unsavedChanges'] = false;
  2340. self['@unsavedChanges'];
  2341. } else {
  2342. if (($receiver = self['@saveButton']) == nil ||
  2343. $receiver == undefined) {
  2344. self['@saveButton'];
  2345. } else {
  2346. smalltalk.send(self['@saveButton'], "_removeAt_", ["disabled"]);
  2347. }
  2348. self['@unsavedChanges'] = true;
  2349. self['@unsavedChanges'];
  2350. }
  2351. return self;
  2352. }
  2353. }),
  2354. smalltalk.Browser);
  2355. smalltalk.addMethod(
  2356. "_updateTabsList",
  2357. smalltalk.method({
  2358. selector: "updateTabsList",
  2359. fn: function () {
  2360. var self = this;
  2361. var $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12;
  2362. 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;}]);
  2363. return self;
  2364. }
  2365. }),
  2366. smalltalk.Browser);
  2367. smalltalk.addMethod(
  2368. "_commitPathJs",
  2369. smalltalk.method({
  2370. selector: "commitPathJs",
  2371. fn: function () {
  2372. var self = this;
  2373. return "js";
  2374. }
  2375. }),
  2376. smalltalk.Browser.klass);
  2377. smalltalk.addMethod(
  2378. "_commitPathSt",
  2379. smalltalk.method({
  2380. selector: "commitPathSt",
  2381. fn: function () {
  2382. var self = this;
  2383. return "st";
  2384. }
  2385. }),
  2386. smalltalk.Browser.klass);
  2387. smalltalk.addMethod(
  2388. "_open",
  2389. smalltalk.method({
  2390. selector: "open",
  2391. fn: function () {
  2392. var self = this;
  2393. smalltalk.send(smalltalk.send(self, "_new", []), "_open", []);
  2394. return self;
  2395. }
  2396. }),
  2397. smalltalk.Browser.klass);
  2398. smalltalk.addMethod(
  2399. "_openOn_",
  2400. smalltalk.method({
  2401. selector: "openOn:",
  2402. fn: function (aClass) {
  2403. var self = this;
  2404. var $2, $3, $1;
  2405. $2 = smalltalk.send(self, "_new", []);
  2406. smalltalk.send($2, "_open", []);
  2407. smalltalk.send($2, "_selectCategory_", [smalltalk.send(aClass, "_category", [])]);
  2408. $3 = smalltalk.send($2, "_selectClass_", [aClass]);
  2409. $1 = $3;
  2410. return $1;
  2411. }
  2412. }),
  2413. smalltalk.Browser.klass);
  2414. smalltalk.addClass('Debugger', smalltalk.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  2415. smalltalk.addMethod(
  2416. "_arguments",
  2417. smalltalk.method({
  2418. selector: "arguments",
  2419. fn: function () {
  2420. var self = this;
  2421. var $2, $1;
  2422. $2 = smalltalk.send(self, "_method", []);
  2423. if (($receiver = $2) == nil || $receiver == undefined) {
  2424. $1 = smalltalk.send(smalltalk.send(self['@selectedContext'], "_temps", []), "_collect_", [function (each) {return nil;}]);
  2425. } else {
  2426. $1 = smalltalk.send(smalltalk.send(self, "_method", []), "_arguments", []);
  2427. }
  2428. return $1;
  2429. }
  2430. }),
  2431. smalltalk.Debugger);
  2432. smalltalk.addMethod(
  2433. "_canBeClosed",
  2434. smalltalk.method({
  2435. selector: "canBeClosed",
  2436. fn: function () {
  2437. var self = this;
  2438. return true;
  2439. }
  2440. }),
  2441. smalltalk.Debugger);
  2442. smalltalk.addMethod(
  2443. "_error",
  2444. smalltalk.method({
  2445. selector: "error",
  2446. fn: function () {
  2447. var self = this;
  2448. return self['@error'];
  2449. }
  2450. }),
  2451. smalltalk.Debugger);
  2452. smalltalk.addMethod(
  2453. "_error_",
  2454. smalltalk.method({
  2455. selector: "error:",
  2456. fn: function (anError) {
  2457. var self = this;
  2458. self['@error'] = anError;
  2459. return self;
  2460. }
  2461. }),
  2462. smalltalk.Debugger);
  2463. smalltalk.addMethod(
  2464. "_initialize",
  2465. smalltalk.method({
  2466. selector: "initialize",
  2467. fn: function () {
  2468. var self = this;
  2469. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  2470. smalltalk.send(self['@unsavedChanges'], "__eq", [false]);
  2471. return self;
  2472. }
  2473. }),
  2474. smalltalk.Debugger);
  2475. smalltalk.addMethod(
  2476. "_inspectSelectedVariable",
  2477. smalltalk.method({
  2478. selector: "inspectSelectedVariable",
  2479. fn: function () {
  2480. var self = this;
  2481. smalltalk.send(self['@selectedVariable'], "_inspect", []);
  2482. return self;
  2483. }
  2484. }),
  2485. smalltalk.Debugger);
  2486. smalltalk.addMethod(
  2487. "_label",
  2488. smalltalk.method({
  2489. selector: "label",
  2490. fn: function () {
  2491. var self = this;
  2492. return "[Debugger]";
  2493. }
  2494. }),
  2495. smalltalk.Debugger);
  2496. smalltalk.addMethod(
  2497. "_method",
  2498. smalltalk.method({
  2499. selector: "method",
  2500. fn: function () {
  2501. var self = this;
  2502. var $1;
  2503. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_methodAt_", [smalltalk.send(self['@selectedContext'], "_selector", [])]);
  2504. return $1;
  2505. }
  2506. }),
  2507. smalltalk.Debugger);
  2508. smalltalk.addMethod(
  2509. "_proceed",
  2510. smalltalk.method({
  2511. selector: "proceed",
  2512. fn: function () {
  2513. var self = this;
  2514. smalltalk.send(self, "_close", []);
  2515. smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_perform_withArguments_", [smalltalk.send(self['@selectedContext'], "_selector", []), smalltalk.send(self['@selectedContext'], "_temps", [])]);
  2516. return self;
  2517. }
  2518. }),
  2519. smalltalk.Debugger);
  2520. smalltalk.addMethod(
  2521. "_receiver",
  2522. smalltalk.method({
  2523. selector: "receiver",
  2524. fn: function () {
  2525. var self = this;
  2526. var $1;
  2527. $1 = smalltalk.send(self['@selectedContext'], "_receiver", []);
  2528. return $1;
  2529. }
  2530. }),
  2531. smalltalk.Debugger);
  2532. smalltalk.addMethod(
  2533. "_renderBottomPanelOn_",
  2534. smalltalk.method({
  2535. selector: "renderBottomPanelOn:",
  2536. fn: function (html) {
  2537. var self = this;
  2538. var $1, $2;
  2539. $1 = smalltalk.send(html, "_div", []);
  2540. smalltalk.send($1, "_class_", ["amber_sourceCode debugger"]);
  2541. $2 = smalltalk.send($1, "_with_", [function () {self['@sourceArea'] = smalltalk.send(smalltalk.SourceArea || SourceArea, "_new", []);self['@sourceArea'];return smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);}]);
  2542. self['@ul2'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column debugger variables"]);
  2543. self['@inspector'] = smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["amber_column debugger inspector"]);
  2544. smalltalk.send(self['@sourceArea'], "_onKeyUp_", [function () {return smalltalk.send(self, "_updateStatus", []);}]);
  2545. return self;
  2546. }
  2547. }),
  2548. smalltalk.Debugger);
  2549. smalltalk.addMethod(
  2550. "_renderBoxOn_",
  2551. smalltalk.method({
  2552. selector: "renderBoxOn:",
  2553. fn: function (html) {
  2554. var self = this;
  2555. var $1;
  2556. smalltalk.send(self, "_renderTopPanelOn_", [html]);
  2557. $1 = smalltalk.send(self, "_renderBottomPanelOn_", [html]);
  2558. return self;
  2559. }
  2560. }),
  2561. smalltalk.Debugger);
  2562. smalltalk.addMethod(
  2563. "_renderButtonsOn_",
  2564. smalltalk.method({
  2565. selector: "renderButtonsOn:",
  2566. fn: function (html) {
  2567. var self = this;
  2568. var $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15;
  2569. $1 = smalltalk.send(html, "_button", []);
  2570. smalltalk.send($1, "_with_", ["Save"]);
  2571. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_save", []);}]);
  2572. self['@saveButton'] = $2;
  2573. $3 = smalltalk.send(html, "_button", []);
  2574. smalltalk.send($3, "_with_", ["DoIt"]);
  2575. $4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_doIt", []);}]);
  2576. $5 = smalltalk.send(html, "_button", []);
  2577. smalltalk.send($5, "_with_", ["PrintIt"]);
  2578. $6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_printIt", []);}]);
  2579. $7 = smalltalk.send(html, "_button", []);
  2580. smalltalk.send($7, "_with_", ["InspectIt"]);
  2581. $8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_inspectIt", []);}]);
  2582. $9 = smalltalk.send(html, "_button", []);
  2583. smalltalk.send($9, "_with_", ["Proceed"]);
  2584. $10 = smalltalk.send($9, "_onClick_", [function () {return smalltalk.send(self, "_proceed", []);}]);
  2585. $11 = smalltalk.send(html, "_button", []);
  2586. smalltalk.send($11, "_with_", ["Abandon"]);
  2587. $12 = smalltalk.send($11, "_onClick_", [function () {return smalltalk.send(self, "_close", []);}]);
  2588. $13 = smalltalk.send(html, "_button", []);
  2589. smalltalk.send($13, "_class_", ["amber_button debugger inspect"]);
  2590. smalltalk.send($13, "_with_", ["Inspect"]);
  2591. $14 = smalltalk.send($13, "_onClick_", [function () {return smalltalk.send(self, "_inspectSelectedVariable", []);}]);
  2592. self['@inspectButton'] = $14;
  2593. smalltalk.send(self, "_updateSourceArea", []);
  2594. smalltalk.send(self, "_updateStatus", []);
  2595. smalltalk.send(self, "_updateVariablesList", []);
  2596. $15 = smalltalk.send(self, "_updateInspector", []);
  2597. return self;
  2598. }
  2599. }),
  2600. smalltalk.Debugger);
  2601. smalltalk.addMethod(
  2602. "_renderContext_on_",
  2603. smalltalk.method({
  2604. selector: "renderContext:on:",
  2605. fn: function (aContext, html) {
  2606. var self = this;
  2607. var $1, $2, $3;
  2608. var li;
  2609. li = smalltalk.send(html, "_li", []);
  2610. $1 = smalltalk.send(self['@selectedContext'], "__eq", [aContext]);
  2611. if (smalltalk.assert($1)) {
  2612. smalltalk.send(li, "_class_", ["selected"]);
  2613. }
  2614. smalltalk.send(li, "_with_", [smalltalk.send(aContext, "_asString", [])]);
  2615. $2 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectContext_", [aContext]);}]);
  2616. $3 = smalltalk.send(aContext, "_home", []);
  2617. if (($receiver = $3) == nil || $receiver == undefined) {
  2618. } else {
  2619. smalltalk.send(self, "_renderContext_on_", [smalltalk.send(aContext, "_home", []), html]);
  2620. }
  2621. return self;
  2622. }
  2623. }),
  2624. smalltalk.Debugger);
  2625. smalltalk.addMethod(
  2626. "_renderTopPanelOn_",
  2627. smalltalk.method({
  2628. selector: "renderTopPanelOn:",
  2629. fn: function (html) {
  2630. var self = this;
  2631. var $1, $3, $4, $5, $6, $2;
  2632. self['@selectedContext'] = smalltalk.send(smalltalk.send(self, "_error", []), "_context", []);
  2633. $1 = smalltalk.send(html, "_div", []);
  2634. smalltalk.send($1, "_class_", ["top"]);
  2635. $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'];}]);
  2636. return self;
  2637. }
  2638. }),
  2639. smalltalk.Debugger);
  2640. smalltalk.addMethod(
  2641. "_save",
  2642. smalltalk.method({
  2643. selector: "save",
  2644. fn: function () {
  2645. var self = this;
  2646. var protocol;
  2647. protocol = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_methodDictionary", []), "_at_", [smalltalk.send(self['@selectedContext'], "_selector", [])]), "_category", []);
  2648. smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_compile_category_", [smalltalk.send(self['@sourceArea'], "_val", []), protocol]);
  2649. smalltalk.send(self, "_updateStatus", []);
  2650. return self;
  2651. }
  2652. }),
  2653. smalltalk.Debugger);
  2654. smalltalk.addMethod(
  2655. "_selectContext_",
  2656. smalltalk.method({
  2657. selector: "selectContext:",
  2658. fn: function (aContext) {
  2659. var self = this;
  2660. var $1;
  2661. self['@selectedContext'] = aContext;
  2662. self['@selectedVariable'] = nil;
  2663. self['@selectedVariableName'] = nil;
  2664. smalltalk.send(self, "_updateContextsList", []);
  2665. smalltalk.send(self, "_updateSourceArea", []);
  2666. smalltalk.send(self, "_updateInspector", []);
  2667. smalltalk.send(self, "_updateVariablesList", []);
  2668. $1 = smalltalk.send(self, "_updateStatus", []);
  2669. return self;
  2670. }
  2671. }),
  2672. smalltalk.Debugger);
  2673. smalltalk.addMethod(
  2674. "_selectVariable_named_",
  2675. smalltalk.method({
  2676. selector: "selectVariable:named:",
  2677. fn: function (anObject, aString) {
  2678. var self = this;
  2679. self['@selectedVariable'] = anObject;
  2680. self['@selectedVariableName'] = aString;
  2681. smalltalk.send(self['@inspector'], "_contents_", [function (html) {return smalltalk.send(html, "_with_", [smalltalk.send(anObject, "_printString", [])]);}]);
  2682. smalltalk.send(self, "_updateVariablesList", []);
  2683. return self;
  2684. }
  2685. }),
  2686. smalltalk.Debugger);
  2687. smalltalk.addMethod(
  2688. "_source",
  2689. smalltalk.method({
  2690. selector: "source",
  2691. fn: function () {
  2692. var self = this;
  2693. var $2, $1;
  2694. $2 = smalltalk.send(self, "_method", []);
  2695. if (($receiver = $2) == nil || $receiver == undefined) {
  2696. $1 = "Method doesn't exist!";
  2697. } else {
  2698. $1 = smalltalk.send(smalltalk.send(self, "_method", []), "_source", []);
  2699. }
  2700. return $1;
  2701. }
  2702. }),
  2703. smalltalk.Debugger);
  2704. smalltalk.addMethod(
  2705. "_updateContextsList",
  2706. smalltalk.method({
  2707. selector: "updateContextsList",
  2708. fn: function () {
  2709. var self = this;
  2710. smalltalk.send(self['@ul'], "_contents_", [function (html) {return smalltalk.send(self, "_renderContext_on_", [smalltalk.send(smalltalk.send(self, "_error", []), "_context", []), html]);}]);
  2711. return self;
  2712. }
  2713. }),
  2714. smalltalk.Debugger);
  2715. smalltalk.addMethod(
  2716. "_updateInspector",
  2717. smalltalk.method({
  2718. selector: "updateInspector",
  2719. fn: function () {
  2720. var self = this;
  2721. smalltalk.send(self['@inspector'], "_contents_", [function (html) {}]);
  2722. return self;
  2723. }
  2724. }),
  2725. smalltalk.Debugger);
  2726. smalltalk.addMethod(
  2727. "_updateSourceArea",
  2728. smalltalk.method({
  2729. selector: "updateSourceArea",
  2730. fn: function () {
  2731. var self = this;
  2732. smalltalk.send(self['@sourceArea'], "_val_", [smalltalk.send(self, "_source", [])]);
  2733. return self;
  2734. }
  2735. }),
  2736. smalltalk.Debugger);
  2737. smalltalk.addMethod(
  2738. "_updateStatus",
  2739. smalltalk.method({
  2740. selector: "updateStatus",
  2741. fn: function () {
  2742. var self = this;
  2743. var $1;
  2744. $1 = smalltalk.send(smalltalk.send(self['@sourceArea'], "_val", []), "__eq", [smalltalk.send(self, "_source", [])]);
  2745. if (smalltalk.assert($1)) {
  2746. if (($receiver = self['@saveButton']) == nil ||
  2747. $receiver == undefined) {
  2748. self['@saveButton'];
  2749. } else {
  2750. smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);
  2751. }
  2752. self['@unsavedChanges'] = false;
  2753. self['@unsavedChanges'];
  2754. } else {
  2755. if (($receiver = self['@saveButton']) == nil ||
  2756. $receiver == undefined) {
  2757. self['@saveButton'];
  2758. } else {
  2759. smalltalk.send(self['@saveButton'], "_removeAt_", ["disabled"]);
  2760. }
  2761. self['@unsavedChanges'] = true;
  2762. self['@unsavedChanges'];
  2763. }
  2764. return self;
  2765. }
  2766. }),
  2767. smalltalk.Debugger);
  2768. smalltalk.addMethod(
  2769. "_updateVariablesList",
  2770. smalltalk.method({
  2771. selector: "updateVariablesList",
  2772. fn: function () {
  2773. var self = this;
  2774. var $1, $2, $3, $4, $5, $6, $7, $8, $9;
  2775. 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"]);}}]);}]);
  2776. if (($receiver = self['@selectedVariable']) == nil ||
  2777. $receiver == undefined) {
  2778. smalltalk.send(self['@inspectButton'], "_at_put_", ["disabled", true]);
  2779. } else {
  2780. smalltalk.send(self['@inspectButton'], "_removeAt_", ["disabled"]);
  2781. }
  2782. return self;
  2783. }
  2784. }),
  2785. smalltalk.Debugger);
  2786. smalltalk.addClass('IDETranscript', smalltalk.TabWidget, ['textarea'], 'IDE');
  2787. smalltalk.addMethod(
  2788. "_clear",
  2789. smalltalk.method({
  2790. selector: "clear",
  2791. fn: function () {
  2792. var self = this;
  2793. smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [""]);
  2794. return self;
  2795. }
  2796. }),
  2797. smalltalk.IDETranscript);
  2798. smalltalk.addMethod(
  2799. "_cr",
  2800. smalltalk.method({
  2801. selector: "cr",
  2802. fn: function () {
  2803. var self = this;
  2804. 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", [])])]);
  2805. return self;
  2806. }
  2807. }),
  2808. smalltalk.IDETranscript);
  2809. smalltalk.addMethod(
  2810. "_label",
  2811. smalltalk.method({
  2812. selector: "label",
  2813. fn: function () {
  2814. var self = this;
  2815. return "Transcript";
  2816. }
  2817. }),
  2818. smalltalk.IDETranscript);
  2819. smalltalk.addMethod(
  2820. "_open",
  2821. smalltalk.method({
  2822. selector: "open",
  2823. fn: function () {
  2824. var self = this;
  2825. var $1, $2;
  2826. $1 = smalltalk.send(smalltalk.TabManager || TabManager, "_current", []);
  2827. smalltalk.send($1, "_open", []);
  2828. $2 = smalltalk.send($1, "_selectTab_", [self]);
  2829. return self;
  2830. }
  2831. }),
  2832. smalltalk.IDETranscript);
  2833. smalltalk.addMethod(
  2834. "_renderBoxOn_",
  2835. smalltalk.method({
  2836. selector: "renderBoxOn:",
  2837. fn: function (html) {
  2838. var self = this;
  2839. var $1;
  2840. self['@textarea'] = smalltalk.send(html, "_textarea", []);
  2841. smalltalk.send(self['@textarea'], "_class_", ["amber_transcript"]);
  2842. $1 = smalltalk.send(self['@textarea'], "_at_put_", ["spellcheck", "false"]);
  2843. return self;
  2844. }
  2845. }),
  2846. smalltalk.IDETranscript);
  2847. smalltalk.addMethod(
  2848. "_renderButtonsOn_",
  2849. smalltalk.method({
  2850. selector: "renderButtonsOn:",
  2851. fn: function (html) {
  2852. var self = this;
  2853. var $1, $2;
  2854. $1 = smalltalk.send(html, "_button", []);
  2855. smalltalk.send($1, "_with_", ["Clear transcript"]);
  2856. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_clear", []);}]);
  2857. return self;
  2858. }
  2859. }),
  2860. smalltalk.IDETranscript);
  2861. smalltalk.addMethod(
  2862. "_show_",
  2863. smalltalk.method({
  2864. selector: "show:",
  2865. fn: function (anObject) {
  2866. var self = this;
  2867. if (($receiver = self['@textarea']) == nil || $receiver == undefined) {
  2868. smalltalk.send(self, "_open", []);
  2869. } else {
  2870. self['@textarea'];
  2871. }
  2872. smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [smalltalk.send(smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val", []), "__comma", [smalltalk.send(anObject, "_asString", [])])]);
  2873. return self;
  2874. }
  2875. }),
  2876. smalltalk.IDETranscript);
  2877. smalltalk.IDETranscript.klass.iVarNames = ['current'];
  2878. smalltalk.addMethod(
  2879. "_current",
  2880. smalltalk.method({
  2881. selector: "current",
  2882. fn: function () {
  2883. var self = this;
  2884. var $1;
  2885. if (($receiver = self['@current']) == nil || $receiver == undefined) {
  2886. self['@current'] = smalltalk.send(self, "_new", [], smalltalk.TabWidget.klass);
  2887. $1 = self['@current'];
  2888. } else {
  2889. $1 = self['@current'];
  2890. }
  2891. return $1;
  2892. }
  2893. }),
  2894. smalltalk.IDETranscript.klass);
  2895. smalltalk.addMethod(
  2896. "_initialize",
  2897. smalltalk.method({
  2898. selector: "initialize",
  2899. fn: function () {
  2900. var self = this;
  2901. smalltalk.send(smalltalk.Transcript || Transcript, "_register_", [smalltalk.send(self, "_current", [])]);
  2902. return self;
  2903. }
  2904. }),
  2905. smalltalk.IDETranscript.klass);
  2906. smalltalk.addMethod(
  2907. "_new",
  2908. smalltalk.method({
  2909. selector: "new",
  2910. fn: function () {
  2911. var self = this;
  2912. smalltalk.send(self, "_shouldNotImplement", []);
  2913. return self;
  2914. }
  2915. }),
  2916. smalltalk.IDETranscript.klass);
  2917. smalltalk.addMethod(
  2918. "_open",
  2919. smalltalk.method({
  2920. selector: "open",
  2921. fn: function () {
  2922. var self = this;
  2923. var $1, $2;
  2924. $1 = smalltalk.send(smalltalk.TabManager || TabManager, "_current", []);
  2925. smalltalk.send($1, "_open", []);
  2926. $2 = smalltalk.send($1, "_selectTab_", [smalltalk.send(self, "_current", [])]);
  2927. return self;
  2928. }
  2929. }),
  2930. smalltalk.IDETranscript.klass);
  2931. smalltalk.addClass('Inspector', smalltalk.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  2932. smalltalk.addMethod(
  2933. "_canBeClosed",
  2934. smalltalk.method({
  2935. selector: "canBeClosed",
  2936. fn: function () {
  2937. var self = this;
  2938. return true;
  2939. }
  2940. }),
  2941. smalltalk.Inspector);
  2942. smalltalk.addMethod(
  2943. "_dive",
  2944. smalltalk.method({
  2945. selector: "dive",
  2946. fn: function () {
  2947. var self = this;
  2948. smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_inspect", []);
  2949. return self;
  2950. }
  2951. }),
  2952. smalltalk.Inspector);
  2953. smalltalk.addMethod(
  2954. "_inspect_",
  2955. smalltalk.method({
  2956. selector: "inspect:",
  2957. fn: function (anObject) {
  2958. var self = this;
  2959. self['@object'] = anObject;
  2960. self['@variables'] = [];
  2961. smalltalk.send(self['@object'], "_inspectOn_", [self]);
  2962. return self;
  2963. }
  2964. }),
  2965. smalltalk.Inspector);
  2966. smalltalk.addMethod(
  2967. "_label",
  2968. smalltalk.method({
  2969. selector: "label",
  2970. fn: function () {
  2971. var self = this;
  2972. var $1;
  2973. if (($receiver = self['@label']) == nil || $receiver == undefined) {
  2974. $1 = "Inspector (nil)";
  2975. } else {
  2976. $1 = self['@label'];
  2977. }
  2978. return $1;
  2979. }
  2980. }),
  2981. smalltalk.Inspector);
  2982. smalltalk.addMethod(
  2983. "_refresh",
  2984. smalltalk.method({
  2985. selector: "refresh",
  2986. fn: function () {
  2987. var self = this;
  2988. var $1;
  2989. smalltalk.send(self, "_inspect_", [self['@object']]);
  2990. smalltalk.send(self, "_updateVariablesList", []);
  2991. $1 = smalltalk.send(self, "_updateValueTextarea", []);
  2992. return self;
  2993. }
  2994. }),
  2995. smalltalk.Inspector);
  2996. smalltalk.addMethod(
  2997. "_renderBottomPanelOn_",
  2998. smalltalk.method({
  2999. selector: "renderBottomPanelOn:",
  3000. fn: function (html) {
  3001. var self = this;
  3002. var $1, $3, $4, $2;
  3003. $1 = smalltalk.send(html, "_div", []);
  3004. smalltalk.send($1, "_class_", ["amber_sourceCode"]);
  3005. $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]);}]);
  3006. return self;
  3007. }
  3008. }),
  3009. smalltalk.Inspector);
  3010. smalltalk.addMethod(
  3011. "_renderBoxOn_",
  3012. smalltalk.method({
  3013. selector: "renderBoxOn:",
  3014. fn: function (html) {
  3015. var self = this;
  3016. var $1;
  3017. smalltalk.send(self, "_renderTopPanelOn_", [html]);
  3018. $1 = smalltalk.send(self, "_renderBottomPanelOn_", [html]);
  3019. return self;
  3020. }
  3021. }),
  3022. smalltalk.Inspector);
  3023. smalltalk.addMethod(
  3024. "_renderButtonsOn_",
  3025. smalltalk.method({
  3026. selector: "renderButtonsOn:",
  3027. fn: function (html) {
  3028. var self = this;
  3029. var $1, $2, $3, $4, $5, $6;
  3030. $1 = smalltalk.send(html, "_button", []);
  3031. smalltalk.send($1, "_with_", ["DoIt"]);
  3032. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_doIt", []);}]);
  3033. $3 = smalltalk.send(html, "_button", []);
  3034. smalltalk.send($3, "_with_", ["PrintIt"]);
  3035. $4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_printIt", []);}]);
  3036. $5 = smalltalk.send(html, "_button", []);
  3037. smalltalk.send($5, "_with_", ["InspectIt"]);
  3038. $6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_inspectIt", []);}]);
  3039. smalltalk.send(self, "_updateButtons", []);
  3040. return self;
  3041. }
  3042. }),
  3043. smalltalk.Inspector);
  3044. smalltalk.addMethod(
  3045. "_renderTopPanelOn_",
  3046. smalltalk.method({
  3047. selector: "renderTopPanelOn:",
  3048. fn: function (html) {
  3049. var self = this;
  3050. var $1, $3, $4, $5, $7, $8, $9, $10, $6, $2, $11;
  3051. $1 = smalltalk.send(html, "_div", []);
  3052. smalltalk.send($1, "_class_", ["top"]);
  3053. $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"]);}]);
  3054. smalltalk.send(self, "_updateVariablesList", []);
  3055. $11 = smalltalk.send(self, "_updateValueTextarea", []);
  3056. return self;
  3057. }
  3058. }),
  3059. smalltalk.Inspector);
  3060. smalltalk.addMethod(
  3061. "_selectVariable_",
  3062. smalltalk.method({
  3063. selector: "selectVariable:",
  3064. fn: function (aString) {
  3065. var self = this;
  3066. var $1;
  3067. smalltalk.send(self, "_selectedVariable_", [aString]);
  3068. smalltalk.send(self, "_updateVariablesList", []);
  3069. smalltalk.send(self, "_updateValueTextarea", []);
  3070. $1 = smalltalk.send(self, "_updateButtons", []);
  3071. return self;
  3072. }
  3073. }),
  3074. smalltalk.Inspector);
  3075. smalltalk.addMethod(
  3076. "_selectedVariable",
  3077. smalltalk.method({
  3078. selector: "selectedVariable",
  3079. fn: function () {
  3080. var self = this;
  3081. return self['@selectedVariable'];
  3082. }
  3083. }),
  3084. smalltalk.Inspector);
  3085. smalltalk.addMethod(
  3086. "_selectedVariable_",
  3087. smalltalk.method({
  3088. selector: "selectedVariable:",
  3089. fn: function (aString) {
  3090. var self = this;
  3091. self['@selectedVariable'] = aString;
  3092. return self;
  3093. }
  3094. }),
  3095. smalltalk.Inspector);
  3096. smalltalk.addMethod(
  3097. "_setLabel_",
  3098. smalltalk.method({
  3099. selector: "setLabel:",
  3100. fn: function (aString) {
  3101. var self = this;
  3102. self['@label'] = aString;
  3103. return self;
  3104. }
  3105. }),
  3106. smalltalk.Inspector);
  3107. smalltalk.addMethod(
  3108. "_setVariables_",
  3109. smalltalk.method({
  3110. selector: "setVariables:",
  3111. fn: function (aCollection) {
  3112. var self = this;
  3113. self['@variables'] = aCollection;
  3114. return self;
  3115. }
  3116. }),
  3117. smalltalk.Inspector);
  3118. smalltalk.addMethod(
  3119. "_sourceArea",
  3120. smalltalk.method({
  3121. selector: "sourceArea",
  3122. fn: function () {
  3123. var self = this;
  3124. return self['@sourceArea'];
  3125. }
  3126. }),
  3127. smalltalk.Inspector);
  3128. smalltalk.addMethod(
  3129. "_updateButtons",
  3130. smalltalk.method({
  3131. selector: "updateButtons",
  3132. fn: function () {
  3133. var self = this;
  3134. var $1;
  3135. $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", []);}]);
  3136. if (smalltalk.assert($1)) {
  3137. smalltalk.send(self['@diveButton'], "_removeAt_", ["disabled"]);
  3138. } else {
  3139. smalltalk.send(self['@diveButton'], "_at_put_", ["disabled", true]);
  3140. }
  3141. return self;
  3142. }
  3143. }),
  3144. smalltalk.Inspector);
  3145. smalltalk.addMethod(
  3146. "_updateValueTextarea",
  3147. smalltalk.method({
  3148. selector: "updateValueTextarea",
  3149. fn: function () {
  3150. var self = this;
  3151. var $2, $1;
  3152. $2 = smalltalk.send(smalltalk.send(self, "_selectedVariable", []), "_isNil", []);
  3153. if (smalltalk.assert($2)) {
  3154. $1 = "";
  3155. } else {
  3156. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_printString", []);
  3157. }
  3158. smalltalk.send(smalltalk.send(self['@valueTextarea'], "_asJQuery", []), "_val_", [$1]);
  3159. return self;
  3160. }
  3161. }),
  3162. smalltalk.Inspector);
  3163. smalltalk.addMethod(
  3164. "_updateVariablesList",
  3165. smalltalk.method({
  3166. selector: "updateVariablesList",
  3167. fn: function () {
  3168. var self = this;
  3169. var $1, $2;
  3170. 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"]);}}]);}]);
  3171. return self;
  3172. }
  3173. }),
  3174. smalltalk.Inspector);
  3175. smalltalk.addMethod(
  3176. "_variables",
  3177. smalltalk.method({
  3178. selector: "variables",
  3179. fn: function () {
  3180. var self = this;
  3181. return self['@variables'];
  3182. }
  3183. }),
  3184. smalltalk.Inspector);
  3185. smalltalk.addMethod(
  3186. "_on_",
  3187. smalltalk.method({
  3188. selector: "on:",
  3189. fn: function (anObject) {
  3190. var self = this;
  3191. var $2, $3, $1;
  3192. $2 = smalltalk.send(self, "_new", []);
  3193. smalltalk.send($2, "_inspect_", [anObject]);
  3194. $3 = smalltalk.send($2, "_yourself", []);
  3195. $1 = $3;
  3196. return $1;
  3197. }
  3198. }),
  3199. smalltalk.Inspector.klass);
  3200. smalltalk.addClass('ProgressBar', smalltalk.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  3201. smalltalk.addMethod(
  3202. "_percent",
  3203. smalltalk.method({
  3204. selector: "percent",
  3205. fn: function () {
  3206. var self = this;
  3207. var $1;
  3208. if (($receiver = self['@percent']) == nil || $receiver == undefined) {
  3209. $1 = 0;
  3210. } else {
  3211. $1 = self['@percent'];
  3212. }
  3213. return $1;
  3214. }
  3215. }),
  3216. smalltalk.ProgressBar);
  3217. smalltalk.addMethod(
  3218. "_percent_",
  3219. smalltalk.method({
  3220. selector: "percent:",
  3221. fn: function (aNumber) {
  3222. var self = this;
  3223. self['@percent'] = aNumber;
  3224. return self;
  3225. }
  3226. }),
  3227. smalltalk.ProgressBar);
  3228. smalltalk.addMethod(
  3229. "_renderOn_",
  3230. smalltalk.method({
  3231. selector: "renderOn:",
  3232. fn: function (html) {
  3233. var self = this;
  3234. var $1, $2;
  3235. $1 = smalltalk.send(html, "_div", []);
  3236. smalltalk.send($1, "_class_", ["progress_bar"]);
  3237. $2 = smalltalk.send($1, "_yourself", []);
  3238. self['@div'] = $2;
  3239. smalltalk.send(self, "_renderProgressBar", []);
  3240. return self;
  3241. }
  3242. }),
  3243. smalltalk.ProgressBar);
  3244. smalltalk.addMethod(
  3245. "_renderProgressBar",
  3246. smalltalk.method({
  3247. selector: "renderProgressBar",
  3248. fn: function () {
  3249. var self = this;
  3250. var $1, $2;
  3251. 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;}]);
  3252. return self;
  3253. }
  3254. }),
  3255. smalltalk.ProgressBar);
  3256. smalltalk.addMethod(
  3257. "_updatePercent_",
  3258. smalltalk.method({
  3259. selector: "updatePercent:",
  3260. fn: function (aNumber) {
  3261. var self = this;
  3262. smalltalk.send(self, "_percent_", [aNumber]);
  3263. smalltalk.send(self, "_renderProgressBar", []);
  3264. return self;
  3265. }
  3266. }),
  3267. smalltalk.ProgressBar);
  3268. smalltalk.addClass('ReferencesBrowser', smalltalk.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  3269. smalltalk.addMethod(
  3270. "_canBeClosed",
  3271. smalltalk.method({
  3272. selector: "canBeClosed",
  3273. fn: function () {
  3274. var self = this;
  3275. return true;
  3276. }
  3277. }),
  3278. smalltalk.ReferencesBrowser);
  3279. smalltalk.addMethod(
  3280. "_classesAndMetaclasses",
  3281. smalltalk.method({
  3282. selector: "classesAndMetaclasses",
  3283. fn: function () {
  3284. var self = this;
  3285. var $1;
  3286. $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", []);}])]);
  3287. return $1;
  3288. }
  3289. }),
  3290. smalltalk.ReferencesBrowser);
  3291. smalltalk.addMethod(
  3292. "_implementors",
  3293. smalltalk.method({
  3294. selector: "implementors",
  3295. fn: function () {
  3296. var self = this;
  3297. var $1;
  3298. if (($receiver = self['@implementors']) == nil ||
  3299. $receiver == undefined) {
  3300. self['@implementors'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3301. $1 = self['@implementors'];
  3302. } else {
  3303. $1 = self['@implementors'];
  3304. }
  3305. return $1;
  3306. }
  3307. }),
  3308. smalltalk.ReferencesBrowser);
  3309. smalltalk.addMethod(
  3310. "_initialize",
  3311. smalltalk.method({
  3312. selector: "initialize",
  3313. fn: function () {
  3314. var self = this;
  3315. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  3316. self['@selector'] = "";
  3317. return self;
  3318. }
  3319. }),
  3320. smalltalk.ReferencesBrowser);
  3321. smalltalk.addMethod(
  3322. "_label",
  3323. smalltalk.method({
  3324. selector: "label",
  3325. fn: function () {
  3326. var self = this;
  3327. return "[References]";
  3328. }
  3329. }),
  3330. smalltalk.ReferencesBrowser);
  3331. smalltalk.addMethod(
  3332. "_matches",
  3333. smalltalk.method({
  3334. selector: "matches",
  3335. fn: function () {
  3336. var self = this;
  3337. var $1;
  3338. if (($receiver = self['@matches']) == nil || $receiver == undefined) {
  3339. self['@matches'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3340. $1 = self['@matches'];
  3341. } else {
  3342. $1 = self['@matches'];
  3343. }
  3344. return $1;
  3345. }
  3346. }),
  3347. smalltalk.ReferencesBrowser);
  3348. smalltalk.addMethod(
  3349. "_openBrowserOn_",
  3350. smalltalk.method({
  3351. selector: "openBrowserOn:",
  3352. fn: function (aMethod) {
  3353. var self = this;
  3354. var $2, $1, $3, $4;
  3355. var browser;
  3356. $2 = smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_isMetaclass", []);
  3357. if (smalltalk.assert($2)) {
  3358. $1 = smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_instanceClass", []);
  3359. } else {
  3360. $1 = smalltalk.send(aMethod, "_methodClass", []);
  3361. }
  3362. browser = smalltalk.send(smalltalk.Browser || Browser, "_openOn_", [$1]);
  3363. $3 = smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_isMetaclass", []);
  3364. if (smalltalk.assert($3)) {
  3365. smalltalk.send(browser, "_selectTab_", [smalltalk.symbolFor("class")]);
  3366. }
  3367. smalltalk.send(browser, "_selectProtocol_", [smalltalk.send(aMethod, "_category", [])]);
  3368. $4 = smalltalk.send(browser, "_selectMethod_", [aMethod]);
  3369. return self;
  3370. }
  3371. }),
  3372. smalltalk.ReferencesBrowser);
  3373. smalltalk.addMethod(
  3374. "_referencedClasses",
  3375. smalltalk.method({
  3376. selector: "referencedClasses",
  3377. fn: function () {
  3378. var self = this;
  3379. var $1;
  3380. if (($receiver = self['@referencedClasses']) == nil ||
  3381. $receiver == undefined) {
  3382. self['@referencedClasses'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3383. $1 = self['@referencedClasses'];
  3384. } else {
  3385. $1 = self['@referencedClasses'];
  3386. }
  3387. return $1;
  3388. }
  3389. }),
  3390. smalltalk.ReferencesBrowser);
  3391. smalltalk.addMethod(
  3392. "_renderBoxOn_",
  3393. smalltalk.method({
  3394. selector: "renderBoxOn:",
  3395. fn: function (html) {
  3396. var self = this;
  3397. var $1;
  3398. smalltalk.send(self, "_renderInputOn_", [html]);
  3399. smalltalk.send(self, "_renderImplementorsOn_", [html]);
  3400. smalltalk.send(self, "_renderSendersOn_", [html]);
  3401. smalltalk.send(self, "_renderReferencedClassesOn_", [html]);
  3402. $1 = smalltalk.send(self, "_renderMatchesOn_", [html]);
  3403. return self;
  3404. }
  3405. }),
  3406. smalltalk.ReferencesBrowser);
  3407. smalltalk.addMethod(
  3408. "_renderImplementorsOn_",
  3409. smalltalk.method({
  3410. selector: "renderImplementorsOn:",
  3411. fn: function (html) {
  3412. var self = this;
  3413. self['@implementorsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column implementors"]);
  3414. smalltalk.send(self, "_updateImplementorsList", []);
  3415. return self;
  3416. }
  3417. }),
  3418. smalltalk.ReferencesBrowser);
  3419. smalltalk.addMethod(
  3420. "_renderInputOn_",
  3421. smalltalk.method({
  3422. selector: "renderInputOn:",
  3423. fn: function (html) {
  3424. var self = this;
  3425. var $1, $2;
  3426. $1 = smalltalk.send(html, "_input", []);
  3427. smalltalk.send($1, "_class_", ["implementors"]);
  3428. $2 = smalltalk.send($1, "_yourself", []);
  3429. self['@input'] = $2;
  3430. smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val_", [self['@selector']]);
  3431. smalltalk.send(self, "_setInputEvents", []);
  3432. return self;
  3433. }
  3434. }),
  3435. smalltalk.ReferencesBrowser);
  3436. smalltalk.addMethod(
  3437. "_renderMatchesOn_",
  3438. smalltalk.method({
  3439. selector: "renderMatchesOn:",
  3440. fn: function (html) {
  3441. var self = this;
  3442. self['@matchesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column matches"]);
  3443. smalltalk.send(self, "_updateMatchesList", []);
  3444. return self;
  3445. }
  3446. }),
  3447. smalltalk.ReferencesBrowser);
  3448. smalltalk.addMethod(
  3449. "_renderReferencedClassesOn_",
  3450. smalltalk.method({
  3451. selector: "renderReferencedClassesOn:",
  3452. fn: function (html) {
  3453. var self = this;
  3454. self['@referencedClassesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column referenced_classes"]);
  3455. smalltalk.send(self, "_updateReferencedClassesList", []);
  3456. return self;
  3457. }
  3458. }),
  3459. smalltalk.ReferencesBrowser);
  3460. smalltalk.addMethod(
  3461. "_renderSendersOn_",
  3462. smalltalk.method({
  3463. selector: "renderSendersOn:",
  3464. fn: function (html) {
  3465. var self = this;
  3466. self['@sendersList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column senders"]);
  3467. smalltalk.send(self, "_updateSendersList", []);
  3468. return self;
  3469. }
  3470. }),
  3471. smalltalk.ReferencesBrowser);
  3472. smalltalk.addMethod(
  3473. "_search_",
  3474. smalltalk.method({
  3475. selector: "search:",
  3476. fn: function (aString) {
  3477. var self = this;
  3478. var $1;
  3479. smalltalk.send(self, "_searchReferencesFor_", [aString]);
  3480. smalltalk.send(self, "_updateImplementorsList", []);
  3481. smalltalk.send(self, "_updateSendersList", []);
  3482. smalltalk.send(self, "_updateReferencedClassesList", []);
  3483. $1 = smalltalk.send(self, "_updateMatchesList", []);
  3484. return self;
  3485. }
  3486. }),
  3487. smalltalk.ReferencesBrowser);
  3488. smalltalk.addMethod(
  3489. "_searchMethodSource",
  3490. smalltalk.method({
  3491. selector: "searchMethodSource",
  3492. fn: function () {
  3493. var self = this;
  3494. var $1;
  3495. var regex;
  3496. regex = smalltalk.send(self['@selector'], "_allButFirst", []);
  3497. 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]);}}]);}]);
  3498. return self;
  3499. }
  3500. }),
  3501. smalltalk.ReferencesBrowser);
  3502. smalltalk.addMethod(
  3503. "_searchReferencedClasses",
  3504. smalltalk.method({
  3505. selector: "searchReferencedClasses",
  3506. fn: function () {
  3507. var self = this;
  3508. var $1;
  3509. 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]);}}]);}]);
  3510. return self;
  3511. }
  3512. }),
  3513. smalltalk.ReferencesBrowser);
  3514. smalltalk.addMethod(
  3515. "_searchReferencesFor_",
  3516. smalltalk.method({
  3517. selector: "searchReferencesFor:",
  3518. fn: function (aString) {
  3519. var self = this;
  3520. var $1;
  3521. self['@selector'] = aString;
  3522. self['@implementors'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3523. self['@senders'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3524. self['@referencedClasses'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3525. self['@matches'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3526. smalltalk.send(self, "_searchMethodSource", []);
  3527. $1 = smalltalk.send(self['@selector'], "_match_", ["^[A-Z]"]);
  3528. if (smalltalk.assert($1)) {
  3529. smalltalk.send(self, "_searchReferencedClasses", []);
  3530. } else {
  3531. smalltalk.send(self, "_searchSelectorReferences", []);
  3532. }
  3533. return self;
  3534. }
  3535. }),
  3536. smalltalk.ReferencesBrowser);
  3537. smalltalk.addMethod(
  3538. "_searchSelectorReferences",
  3539. smalltalk.method({
  3540. selector: "searchSelectorReferences",
  3541. fn: function () {
  3542. var self = this;
  3543. var $1, $2;
  3544. 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]);}}]);}]);
  3545. return self;
  3546. }
  3547. }),
  3548. smalltalk.ReferencesBrowser);
  3549. smalltalk.addMethod(
  3550. "_selector",
  3551. smalltalk.method({
  3552. selector: "selector",
  3553. fn: function () {
  3554. var self = this;
  3555. return self['@selector'];
  3556. }
  3557. }),
  3558. smalltalk.ReferencesBrowser);
  3559. smalltalk.addMethod(
  3560. "_senders",
  3561. smalltalk.method({
  3562. selector: "senders",
  3563. fn: function () {
  3564. var self = this;
  3565. var $1;
  3566. if (($receiver = self['@senders']) == nil || $receiver == undefined) {
  3567. self['@senders'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3568. $1 = self['@senders'];
  3569. } else {
  3570. $1 = self['@senders'];
  3571. }
  3572. return $1;
  3573. }
  3574. }),
  3575. smalltalk.ReferencesBrowser);
  3576. smalltalk.addMethod(
  3577. "_setInputEvents",
  3578. smalltalk.method({
  3579. selector: "setInputEvents",
  3580. fn: function () {
  3581. var self = this;
  3582. var $1;
  3583. 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'];}]);
  3584. $1 = smalltalk.send(self['@input'], "_onKeyDown_", [function () {if (($receiver = self['@timer']) == nil || $receiver == undefined) {return self['@timer'];} else {return smalltalk.send(self['@timer'], "_clearTimeout", []);}}]);
  3585. return self;
  3586. }
  3587. }),
  3588. smalltalk.ReferencesBrowser);
  3589. smalltalk.addMethod(
  3590. "_updateImplementorsList",
  3591. smalltalk.method({
  3592. selector: "updateImplementorsList",
  3593. fn: function () {
  3594. var self = this;
  3595. var $1, $2, $3;
  3596. 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;}]);}]);
  3597. return self;
  3598. }
  3599. }),
  3600. smalltalk.ReferencesBrowser);
  3601. smalltalk.addMethod(
  3602. "_updateMatchesList",
  3603. smalltalk.method({
  3604. selector: "updateMatchesList",
  3605. fn: function () {
  3606. var self = this;
  3607. var $1, $2, $3;
  3608. 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;}]);}]);
  3609. return self;
  3610. }
  3611. }),
  3612. smalltalk.ReferencesBrowser);
  3613. smalltalk.addMethod(
  3614. "_updateReferencedClassesList",
  3615. smalltalk.method({
  3616. selector: "updateReferencedClassesList",
  3617. fn: function () {
  3618. var self = this;
  3619. var $1, $2, $3, $4;
  3620. 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;}]);}]);
  3621. return self;
  3622. }
  3623. }),
  3624. smalltalk.ReferencesBrowser);
  3625. smalltalk.addMethod(
  3626. "_updateSendersList",
  3627. smalltalk.method({
  3628. selector: "updateSendersList",
  3629. fn: function () {
  3630. var self = this;
  3631. var $1, $2, $3, $4;
  3632. 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;}]);}]);
  3633. return self;
  3634. }
  3635. }),
  3636. smalltalk.ReferencesBrowser);
  3637. smalltalk.addMethod(
  3638. "_search_",
  3639. smalltalk.method({
  3640. selector: "search:",
  3641. fn: function (aString) {
  3642. var self = this;
  3643. var $2, $3, $1;
  3644. $2 = smalltalk.send(self, "_new", []);
  3645. smalltalk.send($2, "_searchReferencesFor_", [aString]);
  3646. $3 = smalltalk.send($2, "_open", []);
  3647. $1 = $3;
  3648. return $1;
  3649. }
  3650. }),
  3651. smalltalk.ReferencesBrowser.klass);
  3652. smalltalk.addClass('TestRunner', smalltalk.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  3653. smalltalk.addMethod(
  3654. "_allClasses",
  3655. smalltalk.method({
  3656. selector: "allClasses",
  3657. fn: function () {
  3658. var self = this;
  3659. var $1;
  3660. $1 = smalltalk.send(smalltalk.send(smalltalk.TestCase || TestCase, "_allSubclasses", []), "_select_", [function (each) {return smalltalk.send(smalltalk.send(each, "_isAbstract", []), "_not", []);}]);
  3661. return $1;
  3662. }
  3663. }),
  3664. smalltalk.TestRunner);
  3665. smalltalk.addMethod(
  3666. "_classes",
  3667. smalltalk.method({
  3668. selector: "classes",
  3669. fn: function () {
  3670. var self = this;
  3671. var $1;
  3672. $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", [])]);}]);
  3673. return $1;
  3674. }
  3675. }),
  3676. smalltalk.TestRunner);
  3677. smalltalk.addMethod(
  3678. "_initialize",
  3679. smalltalk.method({
  3680. selector: "initialize",
  3681. fn: function () {
  3682. var self = this;
  3683. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  3684. self['@result'] = smalltalk.send(smalltalk.TestResult || TestResult, "_new", []);
  3685. return self;
  3686. }
  3687. }),
  3688. smalltalk.TestRunner);
  3689. smalltalk.addMethod(
  3690. "_isSelectedCategory_",
  3691. smalltalk.method({
  3692. selector: "isSelectedCategory:",
  3693. fn: function (aCategory) {
  3694. var self = this;
  3695. var $1;
  3696. $1 = smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [aCategory]);
  3697. return $1;
  3698. }
  3699. }),
  3700. smalltalk.TestRunner);
  3701. smalltalk.addMethod(
  3702. "_isSelectedClass_",
  3703. smalltalk.method({
  3704. selector: "isSelectedClass:",
  3705. fn: function (aClass) {
  3706. var self = this;
  3707. var $1;
  3708. $1 = smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_includes_", [aClass]);
  3709. return $1;
  3710. }
  3711. }),
  3712. smalltalk.TestRunner);
  3713. smalltalk.addMethod(
  3714. "_label",
  3715. smalltalk.method({
  3716. selector: "label",
  3717. fn: function () {
  3718. var self = this;
  3719. return "SUnit";
  3720. }
  3721. }),
  3722. smalltalk.TestRunner);
  3723. smalltalk.addMethod(
  3724. "_packages",
  3725. smalltalk.method({
  3726. selector: "packages",
  3727. fn: function () {
  3728. var self = this;
  3729. var $1, $2;
  3730. var packages;
  3731. packages = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3732. 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", [])]);}}]);
  3733. $2 = smalltalk.send(packages, "_sort", []);
  3734. return $2;
  3735. }
  3736. }),
  3737. smalltalk.TestRunner);
  3738. smalltalk.addMethod(
  3739. "_performFailure_",
  3740. smalltalk.method({
  3741. selector: "performFailure:",
  3742. fn: function (aTestCase) {
  3743. var self = this;
  3744. smalltalk.send(aTestCase, "_setUp", []);
  3745. smalltalk.send(function () {return smalltalk.send(aTestCase, "_perform_", [smalltalk.send(aTestCase, "_selector", [])]);}, "_ensure_", [function () {return smalltalk.send(aTestCase, "_tearDown", []);}]);
  3746. return self;
  3747. }
  3748. }),
  3749. smalltalk.TestRunner);
  3750. smalltalk.addMethod(
  3751. "_printErrors",
  3752. smalltalk.method({
  3753. selector: "printErrors",
  3754. fn: function () {
  3755. var self = this;
  3756. var $1;
  3757. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_size", []), "_asString", []), "__comma", [" errors, "]);
  3758. return $1;
  3759. }
  3760. }),
  3761. smalltalk.TestRunner);
  3762. smalltalk.addMethod(
  3763. "_printFailures",
  3764. smalltalk.method({
  3765. selector: "printFailures",
  3766. fn: function () {
  3767. var self = this;
  3768. var $1;
  3769. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_size", []), "_asString", []), "__comma", [" failures"]);
  3770. return $1;
  3771. }
  3772. }),
  3773. smalltalk.TestRunner);
  3774. smalltalk.addMethod(
  3775. "_printPasses",
  3776. smalltalk.method({
  3777. selector: "printPasses",
  3778. fn: function (){
  3779. var self=this;
  3780. var $1;
  3781. $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, "]);
  3782. return $1;
  3783. }
  3784. }),
  3785. smalltalk.TestRunner);
  3786. smalltalk.addMethod(
  3787. "_printTotal",
  3788. smalltalk.method({
  3789. selector: "printTotal",
  3790. fn: function () {
  3791. var self = this;
  3792. var $1;
  3793. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_total", []), "_asString", []), "__comma", [" runs, "]);
  3794. return $1;
  3795. }
  3796. }),
  3797. smalltalk.TestRunner);
  3798. smalltalk.addMethod(
  3799. "_progressBar",
  3800. smalltalk.method({
  3801. selector: "progressBar",
  3802. fn: function () {
  3803. var self = this;
  3804. var $1;
  3805. if (($receiver = self['@progressBar']) == nil || $receiver == undefined) {
  3806. self['@progressBar'] = smalltalk.send(smalltalk.ProgressBar || ProgressBar, "_new", []);
  3807. $1 = self['@progressBar'];
  3808. } else {
  3809. $1 = self['@progressBar'];
  3810. }
  3811. return $1;
  3812. }
  3813. }),
  3814. smalltalk.TestRunner);
  3815. smalltalk.addMethod(
  3816. "_renderBoxOn_",
  3817. smalltalk.method({
  3818. selector: "renderBoxOn:",
  3819. fn: function (html) {
  3820. var self = this;
  3821. var $1;
  3822. smalltalk.send(self, "_renderCategoriesOn_", [html]);
  3823. smalltalk.send(self, "_renderClassesOn_", [html]);
  3824. $1 = smalltalk.send(self, "_renderResultsOn_", [html]);
  3825. return self;
  3826. }
  3827. }),
  3828. smalltalk.TestRunner);
  3829. smalltalk.addMethod(
  3830. "_renderButtonsOn_",
  3831. smalltalk.method({
  3832. selector: "renderButtonsOn:",
  3833. fn: function (html) {
  3834. var self = this;
  3835. var $1, $2;
  3836. $1 = smalltalk.send(html, "_button", []);
  3837. smalltalk.send($1, "_with_", ["Run selected"]);
  3838. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_run_", [smalltalk.send(self, "_testCases", [])]);}]);
  3839. return self;
  3840. }
  3841. }),
  3842. smalltalk.TestRunner);
  3843. smalltalk.addMethod(
  3844. "_renderCategoriesOn_",
  3845. smalltalk.method({
  3846. selector: "renderCategoriesOn:",
  3847. fn: function (html) {
  3848. var self = this;
  3849. self['@packagesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit packages"]);
  3850. smalltalk.send(self, "_updateCategoriesList", []);
  3851. return self;
  3852. }
  3853. }),
  3854. smalltalk.TestRunner);
  3855. smalltalk.addMethod(
  3856. "_renderClassesOn_",
  3857. smalltalk.method({
  3858. selector: "renderClassesOn:",
  3859. fn: function (html) {
  3860. var self = this;
  3861. self['@classesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit classes"]);
  3862. smalltalk.send(self, "_updateClassesList", []);
  3863. return self;
  3864. }
  3865. }),
  3866. smalltalk.TestRunner);
  3867. smalltalk.addMethod(
  3868. "_renderErrorsOn_",
  3869. smalltalk.method({
  3870. selector: "renderErrorsOn:",
  3871. fn: function (html) {
  3872. var self = this;
  3873. var $1, $2;
  3874. 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;}]);
  3875. return self;
  3876. }
  3877. }),
  3878. smalltalk.TestRunner);
  3879. smalltalk.addMethod(
  3880. "_renderFailuresOn_",
  3881. smalltalk.method({
  3882. selector: "renderFailuresOn:",
  3883. fn: function (html) {
  3884. var self = this;
  3885. var $1, $2;
  3886. 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;}]);
  3887. return self;
  3888. }
  3889. }),
  3890. smalltalk.TestRunner);
  3891. smalltalk.addMethod(
  3892. "_renderResultsOn_",
  3893. smalltalk.method({
  3894. selector: "renderResultsOn:",
  3895. fn: function (html) {
  3896. var self = this;
  3897. self['@statusDiv'] = smalltalk.send(html, "_div", []);
  3898. smalltalk.send(html, "_with_", [smalltalk.send(self, "_progressBar", [])]);
  3899. self['@methodsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit results"]);
  3900. smalltalk.send(self, "_updateMethodsList", []);
  3901. smalltalk.send(self, "_updateStatusDiv", []);
  3902. return self;
  3903. }
  3904. }),
  3905. smalltalk.TestRunner);
  3906. smalltalk.addMethod(
  3907. "_result",
  3908. smalltalk.method({
  3909. selector: "result",
  3910. fn: function () {
  3911. var self = this;
  3912. return self['@result'];
  3913. }
  3914. }),
  3915. smalltalk.TestRunner);
  3916. smalltalk.addMethod(
  3917. "_run_",
  3918. smalltalk.method({
  3919. selector: "run:",
  3920. fn: function (aCollection){
  3921. var self=this;
  3922. var $1;
  3923. var worker;
  3924. worker=smalltalk.send((smalltalk.TestSuiteRunner || TestSuiteRunner),"_on_",[aCollection]);
  3925. self["@result"]=smalltalk.send(worker,"_result",[]);
  3926. smalltalk.send(smalltalk.send(worker,"_announcer",[]),"_on_do_",[(smalltalk.ResultAnnouncement || ResultAnnouncement),(function(ann){
  3927. $1=smalltalk.send(smalltalk.send(ann,"_result",[]),"__eq_eq",[self["@result"]]);
  3928. if(smalltalk.assert($1)){
  3929. smalltalk.send(smalltalk.send(self,"_progressBar",[]),"_updatePercent_",[smalltalk.send(smalltalk.send(smalltalk.send(self["@result"],"_runs",[]),"__slash",[smalltalk.send(self["@result"],"_total",[])]),"__star",[(100)])]);
  3930. smalltalk.send(self,"_updateStatusDiv",[]);
  3931. return smalltalk.send(self,"_updateMethodsList",[]);
  3932. };
  3933. })]);
  3934. smalltalk.send(worker,"_run",[]);
  3935. return self}
  3936. }),
  3937. smalltalk.TestRunner);
  3938. smalltalk.addMethod(
  3939. "_selectAllCategories",
  3940. smalltalk.method({
  3941. selector: "selectAllCategories",
  3942. fn: function () {
  3943. var self = this;
  3944. var $1, $2;
  3945. 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]);}}]);
  3946. smalltalk.send(self, "_updateCategoriesList", []);
  3947. $2 = smalltalk.send(self, "_updateClassesList", []);
  3948. return self;
  3949. }
  3950. }),
  3951. smalltalk.TestRunner);
  3952. smalltalk.addMethod(
  3953. "_selectAllClasses",
  3954. smalltalk.method({
  3955. selector: "selectAllClasses",
  3956. fn: function () {
  3957. var self = this;
  3958. var $1, $2;
  3959. 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]);}}]);
  3960. smalltalk.send(self, "_updateCategoriesList", []);
  3961. $2 = smalltalk.send(self, "_updateClassesList", []);
  3962. return self;
  3963. }
  3964. }),
  3965. smalltalk.TestRunner);
  3966. smalltalk.addMethod(
  3967. "_selectedCategories",
  3968. smalltalk.method({
  3969. selector: "selectedCategories",
  3970. fn: function () {
  3971. var self = this;
  3972. var $1;
  3973. if (($receiver = self['@selectedCategories']) == nil ||
  3974. $receiver == undefined) {
  3975. self['@selectedCategories'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3976. $1 = self['@selectedCategories'];
  3977. } else {
  3978. $1 = self['@selectedCategories'];
  3979. }
  3980. return $1;
  3981. }
  3982. }),
  3983. smalltalk.TestRunner);
  3984. smalltalk.addMethod(
  3985. "_selectedClasses",
  3986. smalltalk.method({
  3987. selector: "selectedClasses",
  3988. fn: function () {
  3989. var self = this;
  3990. var $1;
  3991. if (($receiver = self['@selectedClasses']) == nil ||
  3992. $receiver == undefined) {
  3993. self['@selectedClasses'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3994. $1 = self['@selectedClasses'];
  3995. } else {
  3996. $1 = self['@selectedClasses'];
  3997. }
  3998. return $1;
  3999. }
  4000. }),
  4001. smalltalk.TestRunner);
  4002. smalltalk.addMethod(
  4003. "_statusInfo",
  4004. smalltalk.method({
  4005. selector: "statusInfo",
  4006. fn: function () {
  4007. var self = this;
  4008. var $1;
  4009. $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", [])]);
  4010. return $1;
  4011. }
  4012. }),
  4013. smalltalk.TestRunner);
  4014. smalltalk.addMethod(
  4015. "_testCases",
  4016. smalltalk.method({
  4017. selector: "testCases",
  4018. fn: function () {
  4019. var self = this;
  4020. var testCases;
  4021. testCases = [];
  4022. 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", [])]);}]);
  4023. return testCases;
  4024. }
  4025. }),
  4026. smalltalk.TestRunner);
  4027. smalltalk.addMethod(
  4028. "_toggleCategory_",
  4029. smalltalk.method({
  4030. selector: "toggleCategory:",
  4031. fn: function (aCategory) {
  4032. var self = this;
  4033. var $1, $2;
  4034. $1 = smalltalk.send(self, "_isSelectedCategory_", [aCategory]);
  4035. if (smalltalk.assert($1)) {
  4036. smalltalk.send(self['@selectedCategories'], "_remove_", [aCategory]);
  4037. } else {
  4038. smalltalk.send(self['@selectedCategories'], "_add_", [aCategory]);
  4039. }
  4040. smalltalk.send(self, "_updateCategoriesList", []);
  4041. $2 = smalltalk.send(self, "_updateClassesList", []);
  4042. return self;
  4043. }
  4044. }),
  4045. smalltalk.TestRunner);
  4046. smalltalk.addMethod(
  4047. "_toggleClass_",
  4048. smalltalk.method({
  4049. selector: "toggleClass:",
  4050. fn: function (aClass) {
  4051. var self = this;
  4052. var $1;
  4053. $1 = smalltalk.send(self, "_isSelectedClass_", [aClass]);
  4054. if (smalltalk.assert($1)) {
  4055. smalltalk.send(self['@selectedClasses'], "_remove_", [aClass]);
  4056. } else {
  4057. smalltalk.send(self['@selectedClasses'], "_add_", [aClass]);
  4058. }
  4059. smalltalk.send(self, "_updateClassesList", []);
  4060. return self;
  4061. }
  4062. }),
  4063. smalltalk.TestRunner);
  4064. smalltalk.addMethod(
  4065. "_updateCategoriesList",
  4066. smalltalk.method({
  4067. selector: "updateCategoriesList",
  4068. fn: function () {
  4069. var self = this;
  4070. var $1, $2, $3, $4;
  4071. 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;}]);}]);
  4072. return self;
  4073. }
  4074. }),
  4075. smalltalk.TestRunner);
  4076. smalltalk.addMethod(
  4077. "_updateClassesList",
  4078. smalltalk.method({
  4079. selector: "updateClassesList",
  4080. fn: function () {
  4081. var self = this;
  4082. var $1, $2, $3, $4, $5;
  4083. 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;}]);}]);
  4084. return self;
  4085. }
  4086. }),
  4087. smalltalk.TestRunner);
  4088. smalltalk.addMethod(
  4089. "_updateMethodsList",
  4090. smalltalk.method({
  4091. selector: "updateMethodsList",
  4092. fn: function () {
  4093. var self = this;
  4094. smalltalk.send(self['@methodsList'], "_contents_", [function (html) {smalltalk.send(self, "_renderErrorsOn_", [html]);return smalltalk.send(self, "_renderFailuresOn_", [html]);}]);
  4095. return self;
  4096. }
  4097. }),
  4098. smalltalk.TestRunner);
  4099. smalltalk.addMethod(
  4100. "_updateStatusDiv",
  4101. smalltalk.method({
  4102. selector: "updateStatusDiv",
  4103. fn: function () {
  4104. var self = this;
  4105. smalltalk.send(self['@statusDiv'], "_class_", [smalltalk.send("sunit status ", "__comma", [smalltalk.send(self['@result'], "_status", [])])]);
  4106. smalltalk.send(self['@statusDiv'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(html, "_span", []), "_with_", [smalltalk.send(self, "_statusInfo", [])]);}]);
  4107. return self;
  4108. }
  4109. }),
  4110. smalltalk.TestRunner);
  4111. smalltalk.addClass('Workspace', smalltalk.TabWidget, ['sourceArea'], 'IDE');
  4112. smalltalk.addMethod(
  4113. "_clearWorkspace",
  4114. smalltalk.method({
  4115. selector: "clearWorkspace",
  4116. fn: function () {
  4117. var self = this;
  4118. smalltalk.send(self['@sourceArea'], "_clear", []);
  4119. return self;
  4120. }
  4121. }),
  4122. smalltalk.Workspace);
  4123. smalltalk.addMethod(
  4124. "_doIt",
  4125. smalltalk.method({
  4126. selector: "doIt",
  4127. fn: function () {
  4128. var self = this;
  4129. smalltalk.send(self['@sourceArea'], "_doIt", []);
  4130. return self;
  4131. }
  4132. }),
  4133. smalltalk.Workspace);
  4134. smalltalk.addMethod(
  4135. "_fileIn",
  4136. smalltalk.method({
  4137. selector: "fileIn",
  4138. fn: function () {
  4139. var self = this;
  4140. smalltalk.send(self['@sourceArea'], "_fileIn", []);
  4141. return self;
  4142. }
  4143. }),
  4144. smalltalk.Workspace);
  4145. smalltalk.addMethod(
  4146. "_inspectIt",
  4147. smalltalk.method({
  4148. selector: "inspectIt",
  4149. fn: function () {
  4150. var self = this;
  4151. smalltalk.send(self['@sourceArea'], "_inspectIt", []);
  4152. return self;
  4153. }
  4154. }),
  4155. smalltalk.Workspace);
  4156. smalltalk.addMethod(
  4157. "_label",
  4158. smalltalk.method({
  4159. selector: "label",
  4160. fn: function () {
  4161. var self = this;
  4162. return "Workspace";
  4163. }
  4164. }),
  4165. smalltalk.Workspace);
  4166. smalltalk.addMethod(
  4167. "_printIt",
  4168. smalltalk.method({
  4169. selector: "printIt",
  4170. fn: function () {
  4171. var self = this;
  4172. smalltalk.send(self['@sourceArea'], "_printIt", []);
  4173. return self;
  4174. }
  4175. }),
  4176. smalltalk.Workspace);
  4177. smalltalk.addMethod(
  4178. "_renderBoxOn_",
  4179. smalltalk.method({
  4180. selector: "renderBoxOn:",
  4181. fn: function (html) {
  4182. var self = this;
  4183. self['@sourceArea'] = smalltalk.send(smalltalk.SourceArea || SourceArea, "_new", []);
  4184. smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);
  4185. return self;
  4186. }
  4187. }),
  4188. smalltalk.Workspace);
  4189. smalltalk.addMethod(
  4190. "_renderButtonsOn_",
  4191. smalltalk.method({
  4192. selector: "renderButtonsOn:",
  4193. fn: function (html) {
  4194. var self = this;
  4195. var $1, $2, $3, $4, $5, $6, $7, $8, $9, $10;
  4196. $1 = smalltalk.send(html, "_button", []);
  4197. smalltalk.send($1, "_with_", ["DoIt"]);
  4198. smalltalk.send($1, "_title_", ["ctrl+d"]);
  4199. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_doIt", []);}]);
  4200. $3 = smalltalk.send(html, "_button", []);
  4201. smalltalk.send($3, "_with_", ["PrintIt"]);
  4202. smalltalk.send($3, "_title_", ["ctrl+p"]);
  4203. $4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(self, "_printIt", []);}]);
  4204. $5 = smalltalk.send(html, "_button", []);
  4205. smalltalk.send($5, "_with_", ["InspectIt"]);
  4206. smalltalk.send($5, "_title_", ["ctrl+i"]);
  4207. $6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(self, "_inspectIt", []);}]);
  4208. $7 = smalltalk.send(html, "_button", []);
  4209. smalltalk.send($7, "_with_", ["FileIn"]);
  4210. smalltalk.send($7, "_title_", ["ctrl+f"]);
  4211. $8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self, "_fileIn", []);}]);
  4212. $9 = smalltalk.send(html, "_button", []);
  4213. smalltalk.send($9, "_with_", ["Clear workspace"]);
  4214. $10 = smalltalk.send($9, "_onClick_", [function () {return smalltalk.send(self, "_clearWorkspace", []);}]);
  4215. return self;
  4216. }
  4217. }),
  4218. smalltalk.Workspace);
  4219. smalltalk.addMethod(
  4220. "_show",
  4221. smalltalk.method({
  4222. selector: "show",
  4223. fn: function (){
  4224. var self=this;
  4225. smalltalk.send(self,"_show",[],smalltalk.TabWidget);
  4226. smalltalk.send(self["@sourceArea"],"_focus",[]);
  4227. return self}
  4228. }),
  4229. smalltalk.Workspace);
  4230. smalltalk.addMethod(
  4231. "_inspect",
  4232. smalltalk.method({
  4233. selector: "inspect",
  4234. fn: function () {
  4235. var self = this;
  4236. var $1, $2;
  4237. $1 = smalltalk.send(smalltalk.Inspector || Inspector, "_new", []);
  4238. smalltalk.send($1, "_inspect_", [self]);
  4239. $2 = smalltalk.send($1, "_open", []);
  4240. return self;
  4241. }
  4242. }),
  4243. smalltalk.Object);
  4244. smalltalk.addMethod(
  4245. "_inspectOn_",
  4246. smalltalk.method({
  4247. selector: "inspectOn:",
  4248. fn: function (anInspector) {
  4249. var self = this;
  4250. var $1;
  4251. var variables;
  4252. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4253. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4254. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_allInstanceVariableNames", []), "_do_", [function (each) {return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);}]);
  4255. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4256. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4257. return self;
  4258. }
  4259. }),
  4260. smalltalk.Object);
  4261. smalltalk.addMethod(
  4262. "_inspectOn_",
  4263. smalltalk.method({
  4264. selector: "inspectOn:",
  4265. fn: function (anInspector) {
  4266. var self = this;
  4267. var $1;
  4268. var variables;
  4269. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4270. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4271. smalltalk.send(self, "_withIndexDo_", [function (each, i) {return smalltalk.send(variables, "_at_put_", [i, each]);}]);
  4272. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4273. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4274. return self;
  4275. }
  4276. }),
  4277. smalltalk.Collection);
  4278. smalltalk.addMethod(
  4279. "_inspectOn_",
  4280. smalltalk.method({
  4281. selector: "inspectOn:",
  4282. fn: function (anInspector) {
  4283. var self = this;
  4284. var $1;
  4285. var variables;
  4286. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4287. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4288. smalltalk.send(variables, "_at_put_", ["#keys", smalltalk.send(self, "_keys", [])]);
  4289. smalltalk.send(self, "_keysAndValuesDo_", [function (key, value) {return smalltalk.send(variables, "_at_put_", [key, value]);}]);
  4290. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4291. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4292. return self;
  4293. }
  4294. }),
  4295. smalltalk.HashedCollection);
  4296. smalltalk.addMethod(
  4297. "_inspectOn_",
  4298. smalltalk.method({
  4299. selector: "inspectOn:",
  4300. fn: function (anInspector) {
  4301. var self = this;
  4302. var $1;
  4303. var label;
  4304. smalltalk.send(self, "_inspectOn_", [anInspector], smalltalk.CharacterArray);
  4305. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", []), "_size", []), "__gt", [30]);
  4306. if (smalltalk.assert($1)) {
  4307. label = smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", []), "_copyFrom_to_", [1, 30]), "__comma", ["...'"]);
  4308. } else {
  4309. label = smalltalk.send(self, "_printString", []);
  4310. }
  4311. smalltalk.send(anInspector, "_setLabel_", [label]);
  4312. return self;
  4313. }
  4314. }),
  4315. smalltalk.String);
  4316. smalltalk.addMethod(
  4317. "_inspectOn_",
  4318. smalltalk.method({
  4319. selector: "inspectOn:",
  4320. fn: function (anInspector) {
  4321. var self = this;
  4322. var $1;
  4323. var variables;
  4324. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4325. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4326. smalltalk.send(self['@elements'], "_withIndexDo_", [function (each, i) {return smalltalk.send(variables, "_at_put_", [i, each]);}]);
  4327. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4328. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4329. return self;
  4330. }
  4331. }),
  4332. smalltalk.Set);
  4333. smalltalk.addMethod(
  4334. "_inspectOn_",
  4335. smalltalk.method({
  4336. selector: "inspectOn:",
  4337. fn: function (anInspector) {
  4338. var self = this;
  4339. var $1;
  4340. var variables;
  4341. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4342. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4343. smalltalk.send(variables, "_at_put_", ["#year", smalltalk.send(self, "_year", [])]);
  4344. smalltalk.send(variables, "_at_put_", ["#month", smalltalk.send(self, "_month", [])]);
  4345. smalltalk.send(variables, "_at_put_", ["#day", smalltalk.send(self, "_day", [])]);
  4346. smalltalk.send(variables, "_at_put_", ["#hours", smalltalk.send(self, "_hours", [])]);
  4347. smalltalk.send(variables, "_at_put_", ["#minutes", smalltalk.send(self, "_minutes", [])]);
  4348. smalltalk.send(variables, "_at_put_", ["#seconds", smalltalk.send(self, "_seconds", [])]);
  4349. smalltalk.send(variables, "_at_put_", ["#milliseconds", smalltalk.send(self, "_milliseconds", [])]);
  4350. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4351. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4352. return self;
  4353. }
  4354. }),
  4355. smalltalk.Date);
  4356. smalltalk.addMethod(
  4357. "_inspectOn_",
  4358. smalltalk.method({
  4359. selector: "inspectOn:",
  4360. fn: function (anInspector) {
  4361. var self = this;
  4362. var $1;
  4363. var variables;
  4364. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4365. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4366. smalltalk.send(variables, "_at_put_", ["#year", smalltalk.send(self, "_year", [])]);
  4367. smalltalk.send(variables, "_at_put_", ["#month", smalltalk.send(self, "_month", [])]);
  4368. smalltalk.send(variables, "_at_put_", ["#day", smalltalk.send(self, "_day", [])]);
  4369. smalltalk.send(variables, "_at_put_", ["#hours", smalltalk.send(self, "_hours", [])]);
  4370. smalltalk.send(variables, "_at_put_", ["#minutes", smalltalk.send(self, "_minutes", [])]);
  4371. smalltalk.send(variables, "_at_put_", ["#seconds", smalltalk.send(self, "_seconds", [])]);
  4372. smalltalk.send(variables, "_at_put_", ["#milliseconds", smalltalk.send(self, "_milliseconds", [])]);
  4373. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4374. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4375. return self;
  4376. }
  4377. }),
  4378. smalltalk.Date);
  4379. smalltalk.addMethod(
  4380. "_inspectOn_",
  4381. smalltalk.method({
  4382. selector: "inspectOn:",
  4383. fn: function (anInspector) {
  4384. var self = this;
  4385. var $1;
  4386. var variables;
  4387. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4388. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4389. smalltalk.send(variables, "_at_put_", ["#home", smalltalk.send(self, "_home", [])]);
  4390. smalltalk.send(variables, "_at_put_", ["#receiver", smalltalk.send(self, "_receiver", [])]);
  4391. smalltalk.send(variables, "_at_put_", ["#selector", smalltalk.send(self, "_selector", [])]);
  4392. smalltalk.send(variables, "_at_put_", ["#temps", smalltalk.send(self, "_temps", [])]);
  4393. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_instanceVariableNames", []), "_do_", [function (each) {return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);}]);
  4394. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4395. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4396. return self;
  4397. }
  4398. }),
  4399. smalltalk.MethodContext);