IDE.deploy.js 153 KB

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