IDE.deploy.js 153 KB

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