IDE.deploy.js 153 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614
  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) {$1 = smalltalk.send(html, "_button", []);smalltalk.send($1, "_title_", ["Create a new class"]);smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_addNewClass", []);}]);$2 = smalltalk.send($1, "_with_", ["New class"]);$2;$3 = smalltalk.send(html, "_button", []);smalltalk.send($3, "_with_", ["Rename class"]);$4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(self, "_renameClass", []);}]);$4;$5 = smalltalk.send(html, "_button", []);smalltalk.send($5, "_with_", ["Copy class"]);$6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(self, "_copyClass", []);}]);$6;$7 = smalltalk.send(html, "_button", []);smalltalk.send($7, "_with_", ["Remove class"]);$8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self, "_removeClass", []);}]);$8;$9 = smalltalk.send(html, "_button", []);smalltalk.send($9, "_with_", ["References"]);$10 = smalltalk.send($9, "_onClick_", [function () {return smalltalk.send(self, "_searchClassReferences", []);}]);return $10;}]);
  2206. smalltalk.send(self['@methodButtons'], "_contents_", [function (html) {var protocolSelect;var referencesSelect;$11 = smalltalk.send(html, "_button", []);smalltalk.send($11, "_with_", ["Remove method"]);$12 = smalltalk.send($11, "_onClick_", [function () {return smalltalk.send(self, "_removeMethod", []);}]);$12;protocolSelect = smalltalk.send(html, "_select", []);smalltalk.send(protocolSelect, "_onChange_", [function () {return smalltalk.send(self, "_setMethodProtocol_", [smalltalk.send(smalltalk.send(protocolSelect, "_asJQuery", []), "_val", [])]);}]);$13 = smalltalk.send(protocolSelect, "_with_", [function () {$14 = smalltalk.send(html, "_option", []);smalltalk.send($14, "_with_", ["Method protocol"]);$15 = smalltalk.send($14, "_at_put_", ["disabled", "disabled"]);$15;$16 = smalltalk.send(html, "_option", []);smalltalk.send($16, "_class_", ["important"]);$17 = smalltalk.send($16, "_with_", ["New..."]);$17;currentProtocol = self['@selectedProtocol'];currentProtocol;$18 = smalltalk.send(smalltalk.send(currentProtocol, "_isNil", []), "_and_", [function () {return smalltalk.send(self['@selectedMethod'], "_notNil", []);}]);if (smalltalk.assert($18)) {currentProtocol = smalltalk.send(self['@selectedMethod'], "_category", []);currentProtocol;}return smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [function (each) {option = smalltalk.send(smalltalk.send(html, "_option", []), "_with_", [each]);option;$19 = smalltalk.send(currentProtocol, "__eq", [each]);if (smalltalk.assert($19)) {return smalltalk.send(option, "_at_put_", ["selected", "selected"]);}}]);}]);$13;$20 = smalltalk.send(self['@selectedMethod'], "_isNil", []);if (!smalltalk.assert($20)) {referencesSelect = smalltalk.send(html, "_select", []);smalltalk.send(referencesSelect, "_onChange_", [function () {return smalltalk.send(self, "_searchReferencesOf_", [smalltalk.send(smalltalk.send(referencesSelect, "_asJQuery", []), "_val", [])]);}]);$21 = smalltalk.send(referencesSelect, "_with_", [function () {var option;$22 = smalltalk.send(html, "_option", []);smalltalk.send($22, "_with_", ["References"]);$23 = smalltalk.send($22, "_at_put_", ["disabled", "disabled"]);$23;$24 = smalltalk.send(html, "_option", []);smalltalk.send($24, "_class_", ["important"]);$25 = smalltalk.send($24, "_with_", [smalltalk.send(self['@selectedMethod'], "_selector", [])]);$25;return smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedMethod'], "_messageSends", []), "_sorted", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(html, "_option", []), "_with_", [each]);}]);}]);return $21;}}]);
  2207. $26 = smalltalk.send(self['@selectedMethod'], "_isNil", []);
  2208. if (smalltalk.assert($26)) {
  2209. smalltalk.send(self, "_hideMethodButtons", []);
  2210. $27 = smalltalk.send(smalltalk.send(self['@selectedClass'], "_isNil", []), "_or_", [function () {return smalltalk.send(self['@selectedProtocol'], "_notNil", []);}]);
  2211. if (smalltalk.assert($27)) {
  2212. smalltalk.send(self, "_hideClassButtons", []);
  2213. } else {
  2214. smalltalk.send(self, "_showClassButtons", []);
  2215. }
  2216. } else {
  2217. smalltalk.send(self, "_hideClassButtons", []);
  2218. smalltalk.send(self, "_showMethodButtons", []);
  2219. }
  2220. smalltalk.send(self['@sourceArea'], "_val_", [smalltalk.send(self, "_source", [])]);
  2221. return self;
  2222. }
  2223. }),
  2224. smalltalk.Browser);
  2225. smalltalk.addMethod(
  2226. "_updateStatus",
  2227. smalltalk.method({
  2228. selector: "updateStatus",
  2229. fn: function () {
  2230. var self = this;
  2231. var $1;
  2232. $1 = smalltalk.send(smalltalk.send(self['@sourceArea'], "_val", []), "__eq", [smalltalk.send(self, "_source", [])]);
  2233. if (smalltalk.assert($1)) {
  2234. if (($receiver = self['@saveButton']) == nil ||
  2235. $receiver == undefined) {
  2236. self['@saveButton'];
  2237. } else {
  2238. smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);
  2239. }
  2240. self['@unsavedChanges'] = false;
  2241. self['@unsavedChanges'];
  2242. } else {
  2243. if (($receiver = self['@saveButton']) == nil ||
  2244. $receiver == undefined) {
  2245. self['@saveButton'];
  2246. } else {
  2247. smalltalk.send(self['@saveButton'], "_removeAt_", ["disabled"]);
  2248. }
  2249. self['@unsavedChanges'] = true;
  2250. self['@unsavedChanges'];
  2251. }
  2252. return self;
  2253. }
  2254. }),
  2255. smalltalk.Browser);
  2256. smalltalk.addMethod(
  2257. "_updateTabsList",
  2258. smalltalk.method({
  2259. selector: "updateTabsList",
  2260. fn: function () {
  2261. var self = this;
  2262. var $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12;
  2263. 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;}]);
  2264. return self;
  2265. }
  2266. }),
  2267. smalltalk.Browser);
  2268. smalltalk.addMethod(
  2269. "_commitPathJs",
  2270. smalltalk.method({
  2271. selector: "commitPathJs",
  2272. fn: function () {
  2273. var self = this;
  2274. return "js";
  2275. }
  2276. }),
  2277. smalltalk.Browser.klass);
  2278. smalltalk.addMethod(
  2279. "_commitPathSt",
  2280. smalltalk.method({
  2281. selector: "commitPathSt",
  2282. fn: function () {
  2283. var self = this;
  2284. return "st";
  2285. }
  2286. }),
  2287. smalltalk.Browser.klass);
  2288. smalltalk.addMethod(
  2289. "_open",
  2290. smalltalk.method({
  2291. selector: "open",
  2292. fn: function () {
  2293. var self = this;
  2294. smalltalk.send(smalltalk.send(self, "_new", []), "_open", []);
  2295. return self;
  2296. }
  2297. }),
  2298. smalltalk.Browser.klass);
  2299. smalltalk.addMethod(
  2300. "_openOn_",
  2301. smalltalk.method({
  2302. selector: "openOn:",
  2303. fn: function (aClass) {
  2304. var self = this;
  2305. var $2, $3, $1;
  2306. $2 = smalltalk.send(self, "_new", []);
  2307. smalltalk.send($2, "_open", []);
  2308. smalltalk.send($2, "_selectCategory_", [smalltalk.send(aClass, "_category", [])]);
  2309. $3 = smalltalk.send($2, "_selectClass_", [aClass]);
  2310. $1 = $3;
  2311. return $1;
  2312. }
  2313. }),
  2314. smalltalk.Browser.klass);
  2315. smalltalk.addClass('Debugger', smalltalk.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  2316. smalltalk.addMethod(
  2317. "_arguments",
  2318. smalltalk.method({
  2319. selector: "arguments",
  2320. fn: function () {
  2321. var self = this;
  2322. var $2, $1;
  2323. $2 = smalltalk.send(self, "_method", []);
  2324. if (($receiver = $2) == nil || $receiver == undefined) {
  2325. $1 = smalltalk.send(smalltalk.send(self['@selectedContext'], "_temps", []), "_collect_", [function (each) {return nil;}]);
  2326. } else {
  2327. $1 = smalltalk.send(smalltalk.send(self, "_method", []), "_arguments", []);
  2328. }
  2329. return $1;
  2330. }
  2331. }),
  2332. smalltalk.Debugger);
  2333. smalltalk.addMethod(
  2334. "_canBeClosed",
  2335. smalltalk.method({
  2336. selector: "canBeClosed",
  2337. fn: function () {
  2338. var self = this;
  2339. return true;
  2340. }
  2341. }),
  2342. smalltalk.Debugger);
  2343. smalltalk.addMethod(
  2344. "_error",
  2345. smalltalk.method({
  2346. selector: "error",
  2347. fn: function () {
  2348. var self = this;
  2349. return self['@error'];
  2350. }
  2351. }),
  2352. smalltalk.Debugger);
  2353. smalltalk.addMethod(
  2354. "_error_",
  2355. smalltalk.method({
  2356. selector: "error:",
  2357. fn: function (anError) {
  2358. var self = this;
  2359. self['@error'] = anError;
  2360. return self;
  2361. }
  2362. }),
  2363. smalltalk.Debugger);
  2364. smalltalk.addMethod(
  2365. "_initialize",
  2366. smalltalk.method({
  2367. selector: "initialize",
  2368. fn: function () {
  2369. var self = this;
  2370. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  2371. smalltalk.send(self['@unsavedChanges'], "__eq", [false]);
  2372. return self;
  2373. }
  2374. }),
  2375. smalltalk.Debugger);
  2376. smalltalk.addMethod(
  2377. "_inspectSelectedVariable",
  2378. smalltalk.method({
  2379. selector: "inspectSelectedVariable",
  2380. fn: function () {
  2381. var self = this;
  2382. smalltalk.send(self['@selectedVariable'], "_inspect", []);
  2383. return self;
  2384. }
  2385. }),
  2386. smalltalk.Debugger);
  2387. smalltalk.addMethod(
  2388. "_label",
  2389. smalltalk.method({
  2390. selector: "label",
  2391. fn: function () {
  2392. var self = this;
  2393. return "[Debugger]";
  2394. }
  2395. }),
  2396. smalltalk.Debugger);
  2397. smalltalk.addMethod(
  2398. "_method",
  2399. smalltalk.method({
  2400. selector: "method",
  2401. fn: function () {
  2402. var self = this;
  2403. var $1;
  2404. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_methodAt_", [smalltalk.send(self['@selectedContext'], "_selector", [])]);
  2405. return $1;
  2406. }
  2407. }),
  2408. smalltalk.Debugger);
  2409. smalltalk.addMethod(
  2410. "_proceed",
  2411. smalltalk.method({
  2412. selector: "proceed",
  2413. fn: function () {
  2414. var self = this;
  2415. smalltalk.send(self, "_close", []);
  2416. smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_perform_withArguments_", [smalltalk.send(self['@selectedContext'], "_selector", []), smalltalk.send(self['@selectedContext'], "_temps", [])]);
  2417. return self;
  2418. }
  2419. }),
  2420. smalltalk.Debugger);
  2421. smalltalk.addMethod(
  2422. "_receiver",
  2423. smalltalk.method({
  2424. selector: "receiver",
  2425. fn: function () {
  2426. var self = this;
  2427. var $1;
  2428. $1 = smalltalk.send(self['@selectedContext'], "_receiver", []);
  2429. return $1;
  2430. }
  2431. }),
  2432. smalltalk.Debugger);
  2433. smalltalk.addMethod(
  2434. "_renderBottomPanelOn_",
  2435. smalltalk.method({
  2436. selector: "renderBottomPanelOn:",
  2437. fn: function (html) {
  2438. var self = this;
  2439. var $1, $2;
  2440. $1 = smalltalk.send(html, "_div", []);
  2441. smalltalk.send($1, "_class_", ["amber_sourceCode debugger"]);
  2442. $2 = smalltalk.send($1, "_with_", [function () {self['@sourceArea'] = smalltalk.send(smalltalk.SourceArea || SourceArea, "_new", []);self['@sourceArea'];return smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);}]);
  2443. self['@ul2'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column debugger variables"]);
  2444. self['@inspector'] = smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["amber_column debugger inspector"]);
  2445. smalltalk.send(self['@sourceArea'], "_onKeyUp_", [function () {return smalltalk.send(self, "_updateStatus", []);}]);
  2446. return self;
  2447. }
  2448. }),
  2449. smalltalk.Debugger);
  2450. smalltalk.addMethod(
  2451. "_renderBoxOn_",
  2452. smalltalk.method({
  2453. selector: "renderBoxOn:",
  2454. fn: function (html) {
  2455. var self = this;
  2456. var $1;
  2457. smalltalk.send(self, "_renderTopPanelOn_", [html]);
  2458. $1 = smalltalk.send(self, "_renderBottomPanelOn_", [html]);
  2459. return self;
  2460. }
  2461. }),
  2462. smalltalk.Debugger);
  2463. smalltalk.addMethod(
  2464. "_renderButtonsOn_",
  2465. smalltalk.method({
  2466. selector: "renderButtonsOn:",
  2467. fn: function (html) {
  2468. var self = this;
  2469. var $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15;
  2470. $1 = smalltalk.send(html, "_button", []);
  2471. smalltalk.send($1, "_with_", ["Save"]);
  2472. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_save", []);}]);
  2473. self['@saveButton'] = $2;
  2474. $3 = smalltalk.send(html, "_button", []);
  2475. smalltalk.send($3, "_with_", ["DoIt"]);
  2476. $4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_doIt", []);}]);
  2477. $5 = smalltalk.send(html, "_button", []);
  2478. smalltalk.send($5, "_with_", ["PrintIt"]);
  2479. $6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_printIt", []);}]);
  2480. $7 = smalltalk.send(html, "_button", []);
  2481. smalltalk.send($7, "_with_", ["InspectIt"]);
  2482. $8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_inspectIt", []);}]);
  2483. $9 = smalltalk.send(html, "_button", []);
  2484. smalltalk.send($9, "_with_", ["Proceed"]);
  2485. $10 = smalltalk.send($9, "_onClick_", [function () {return smalltalk.send(self, "_proceed", []);}]);
  2486. $11 = smalltalk.send(html, "_button", []);
  2487. smalltalk.send($11, "_with_", ["Abandon"]);
  2488. $12 = smalltalk.send($11, "_onClick_", [function () {return smalltalk.send(self, "_close", []);}]);
  2489. $13 = smalltalk.send(html, "_button", []);
  2490. smalltalk.send($13, "_class_", ["amber_button debugger inspect"]);
  2491. smalltalk.send($13, "_with_", ["Inspect"]);
  2492. $14 = smalltalk.send($13, "_onClick_", [function () {return smalltalk.send(self, "_inspectSelectedVariable", []);}]);
  2493. self['@inspectButton'] = $14;
  2494. smalltalk.send(self, "_updateSourceArea", []);
  2495. smalltalk.send(self, "_updateStatus", []);
  2496. smalltalk.send(self, "_updateVariablesList", []);
  2497. $15 = smalltalk.send(self, "_updateInspector", []);
  2498. return self;
  2499. }
  2500. }),
  2501. smalltalk.Debugger);
  2502. smalltalk.addMethod(
  2503. "_renderContext_on_",
  2504. smalltalk.method({
  2505. selector: "renderContext:on:",
  2506. fn: function (aContext, html) {
  2507. var self = this;
  2508. var $1, $2, $3;
  2509. var li;
  2510. li = smalltalk.send(html, "_li", []);
  2511. $1 = smalltalk.send(self['@selectedContext'], "__eq", [aContext]);
  2512. if (smalltalk.assert($1)) {
  2513. smalltalk.send(li, "_class_", ["selected"]);
  2514. }
  2515. smalltalk.send(li, "_with_", [smalltalk.send(aContext, "_asString", [])]);
  2516. $2 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectContext_", [aContext]);}]);
  2517. $3 = smalltalk.send(aContext, "_home", []);
  2518. if (($receiver = $3) == nil || $receiver == undefined) {
  2519. } else {
  2520. smalltalk.send(self, "_renderContext_on_", [smalltalk.send(aContext, "_home", []), html]);
  2521. }
  2522. return self;
  2523. }
  2524. }),
  2525. smalltalk.Debugger);
  2526. smalltalk.addMethod(
  2527. "_renderTopPanelOn_",
  2528. smalltalk.method({
  2529. selector: "renderTopPanelOn:",
  2530. fn: function (html) {
  2531. var self = this;
  2532. var $1, $3, $4, $5, $6, $2;
  2533. self['@selectedContext'] = smalltalk.send(smalltalk.send(self, "_error", []), "_context", []);
  2534. $1 = smalltalk.send(html, "_div", []);
  2535. smalltalk.send($1, "_class_", ["top"]);
  2536. $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'];}]);
  2537. return self;
  2538. }
  2539. }),
  2540. smalltalk.Debugger);
  2541. smalltalk.addMethod(
  2542. "_save",
  2543. smalltalk.method({
  2544. selector: "save",
  2545. fn: function () {
  2546. var self = this;
  2547. var protocol;
  2548. protocol = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_methodDictionary", []), "_at_", [smalltalk.send(self['@selectedContext'], "_selector", [])]), "_category", []);
  2549. smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_compile_category_", [smalltalk.send(self['@sourceArea'], "_val", []), protocol]);
  2550. smalltalk.send(self, "_updateStatus", []);
  2551. return self;
  2552. }
  2553. }),
  2554. smalltalk.Debugger);
  2555. smalltalk.addMethod(
  2556. "_selectContext_",
  2557. smalltalk.method({
  2558. selector: "selectContext:",
  2559. fn: function (aContext) {
  2560. var self = this;
  2561. var $1;
  2562. self['@selectedContext'] = aContext;
  2563. self['@selectedVariable'] = nil;
  2564. self['@selectedVariableName'] = nil;
  2565. smalltalk.send(self, "_updateContextsList", []);
  2566. smalltalk.send(self, "_updateSourceArea", []);
  2567. smalltalk.send(self, "_updateInspector", []);
  2568. smalltalk.send(self, "_updateVariablesList", []);
  2569. $1 = smalltalk.send(self, "_updateStatus", []);
  2570. return self;
  2571. }
  2572. }),
  2573. smalltalk.Debugger);
  2574. smalltalk.addMethod(
  2575. "_selectVariable_named_",
  2576. smalltalk.method({
  2577. selector: "selectVariable:named:",
  2578. fn: function (anObject, aString) {
  2579. var self = this;
  2580. self['@selectedVariable'] = anObject;
  2581. self['@selectedVariableName'] = aString;
  2582. smalltalk.send(self['@inspector'], "_contents_", [function (html) {return smalltalk.send(html, "_with_", [smalltalk.send(anObject, "_printString", [])]);}]);
  2583. smalltalk.send(self, "_updateVariablesList", []);
  2584. return self;
  2585. }
  2586. }),
  2587. smalltalk.Debugger);
  2588. smalltalk.addMethod(
  2589. "_source",
  2590. smalltalk.method({
  2591. selector: "source",
  2592. fn: function () {
  2593. var self = this;
  2594. var $2, $1;
  2595. $2 = smalltalk.send(self, "_method", []);
  2596. if (($receiver = $2) == nil || $receiver == undefined) {
  2597. $1 = "Method doesn't exist!";
  2598. } else {
  2599. $1 = smalltalk.send(smalltalk.send(self, "_method", []), "_source", []);
  2600. }
  2601. return $1;
  2602. }
  2603. }),
  2604. smalltalk.Debugger);
  2605. smalltalk.addMethod(
  2606. "_updateContextsList",
  2607. smalltalk.method({
  2608. selector: "updateContextsList",
  2609. fn: function () {
  2610. var self = this;
  2611. smalltalk.send(self['@ul'], "_contents_", [function (html) {return smalltalk.send(self, "_renderContext_on_", [smalltalk.send(smalltalk.send(self, "_error", []), "_context", []), html]);}]);
  2612. return self;
  2613. }
  2614. }),
  2615. smalltalk.Debugger);
  2616. smalltalk.addMethod(
  2617. "_updateInspector",
  2618. smalltalk.method({
  2619. selector: "updateInspector",
  2620. fn: function () {
  2621. var self = this;
  2622. smalltalk.send(self['@inspector'], "_contents_", [function (html) {}]);
  2623. return self;
  2624. }
  2625. }),
  2626. smalltalk.Debugger);
  2627. smalltalk.addMethod(
  2628. "_updateSourceArea",
  2629. smalltalk.method({
  2630. selector: "updateSourceArea",
  2631. fn: function () {
  2632. var self = this;
  2633. smalltalk.send(self['@sourceArea'], "_val_", [smalltalk.send(self, "_source", [])]);
  2634. return self;
  2635. }
  2636. }),
  2637. smalltalk.Debugger);
  2638. smalltalk.addMethod(
  2639. "_updateStatus",
  2640. smalltalk.method({
  2641. selector: "updateStatus",
  2642. fn: function () {
  2643. var self = this;
  2644. var $1;
  2645. $1 = smalltalk.send(smalltalk.send(self['@sourceArea'], "_val", []), "__eq", [smalltalk.send(self, "_source", [])]);
  2646. if (smalltalk.assert($1)) {
  2647. if (($receiver = self['@saveButton']) == nil ||
  2648. $receiver == undefined) {
  2649. self['@saveButton'];
  2650. } else {
  2651. smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);
  2652. }
  2653. self['@unsavedChanges'] = false;
  2654. self['@unsavedChanges'];
  2655. } else {
  2656. if (($receiver = self['@saveButton']) == nil ||
  2657. $receiver == undefined) {
  2658. self['@saveButton'];
  2659. } else {
  2660. smalltalk.send(self['@saveButton'], "_removeAt_", ["disabled"]);
  2661. }
  2662. self['@unsavedChanges'] = true;
  2663. self['@unsavedChanges'];
  2664. }
  2665. return self;
  2666. }
  2667. }),
  2668. smalltalk.Debugger);
  2669. smalltalk.addMethod(
  2670. "_updateVariablesList",
  2671. smalltalk.method({
  2672. selector: "updateVariablesList",
  2673. fn: function () {
  2674. var self = this;
  2675. var $1, $2, $3, $4, $5, $6, $7, $8, $9;
  2676. 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"]);}}]);}]);
  2677. if (($receiver = self['@selectedVariable']) == nil ||
  2678. $receiver == undefined) {
  2679. smalltalk.send(self['@inspectButton'], "_at_put_", ["disabled", true]);
  2680. } else {
  2681. smalltalk.send(self['@inspectButton'], "_removeAt_", ["disabled"]);
  2682. }
  2683. return self;
  2684. }
  2685. }),
  2686. smalltalk.Debugger);
  2687. smalltalk.addClass('IDETranscript', smalltalk.TabWidget, ['textarea'], 'IDE');
  2688. smalltalk.addMethod(
  2689. "_clear",
  2690. smalltalk.method({
  2691. selector: "clear",
  2692. fn: function () {
  2693. var self = this;
  2694. smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [""]);
  2695. return self;
  2696. }
  2697. }),
  2698. smalltalk.IDETranscript);
  2699. smalltalk.addMethod(
  2700. "_cr",
  2701. smalltalk.method({
  2702. selector: "cr",
  2703. fn: function () {
  2704. var self = this;
  2705. 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", [])])]);
  2706. return self;
  2707. }
  2708. }),
  2709. smalltalk.IDETranscript);
  2710. smalltalk.addMethod(
  2711. "_label",
  2712. smalltalk.method({
  2713. selector: "label",
  2714. fn: function () {
  2715. var self = this;
  2716. return "Transcript";
  2717. }
  2718. }),
  2719. smalltalk.IDETranscript);
  2720. smalltalk.addMethod(
  2721. "_open",
  2722. smalltalk.method({
  2723. selector: "open",
  2724. fn: function () {
  2725. var self = this;
  2726. var $1, $2;
  2727. $1 = smalltalk.send(smalltalk.TabManager || TabManager, "_current", []);
  2728. smalltalk.send($1, "_open", []);
  2729. $2 = smalltalk.send($1, "_selectTab_", [self]);
  2730. return self;
  2731. }
  2732. }),
  2733. smalltalk.IDETranscript);
  2734. smalltalk.addMethod(
  2735. "_renderBoxOn_",
  2736. smalltalk.method({
  2737. selector: "renderBoxOn:",
  2738. fn: function (html) {
  2739. var self = this;
  2740. var $1;
  2741. self['@textarea'] = smalltalk.send(html, "_textarea", []);
  2742. smalltalk.send(self['@textarea'], "_class_", ["amber_transcript"]);
  2743. $1 = smalltalk.send(self['@textarea'], "_at_put_", ["spellcheck", "false"]);
  2744. return self;
  2745. }
  2746. }),
  2747. smalltalk.IDETranscript);
  2748. smalltalk.addMethod(
  2749. "_renderButtonsOn_",
  2750. smalltalk.method({
  2751. selector: "renderButtonsOn:",
  2752. fn: function (html) {
  2753. var self = this;
  2754. var $1, $2;
  2755. $1 = smalltalk.send(html, "_button", []);
  2756. smalltalk.send($1, "_with_", ["Clear transcript"]);
  2757. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_clear", []);}]);
  2758. return self;
  2759. }
  2760. }),
  2761. smalltalk.IDETranscript);
  2762. smalltalk.addMethod(
  2763. "_show_",
  2764. smalltalk.method({
  2765. selector: "show:",
  2766. fn: function (anObject) {
  2767. var self = this;
  2768. if (($receiver = self['@textarea']) == nil || $receiver == undefined) {
  2769. smalltalk.send(self, "_open", []);
  2770. } else {
  2771. self['@textarea'];
  2772. }
  2773. smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [smalltalk.send(smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val", []), "__comma", [smalltalk.send(anObject, "_asString", [])])]);
  2774. return self;
  2775. }
  2776. }),
  2777. smalltalk.IDETranscript);
  2778. smalltalk.IDETranscript.klass.iVarNames = ['current'];
  2779. smalltalk.addMethod(
  2780. "_current",
  2781. smalltalk.method({
  2782. selector: "current",
  2783. fn: function () {
  2784. var self = this;
  2785. var $1;
  2786. if (($receiver = self['@current']) == nil || $receiver == undefined) {
  2787. self['@current'] = smalltalk.send(self, "_new", [], smalltalk.TabWidget.klass);
  2788. $1 = self['@current'];
  2789. } else {
  2790. $1 = self['@current'];
  2791. }
  2792. return $1;
  2793. }
  2794. }),
  2795. smalltalk.IDETranscript.klass);
  2796. smalltalk.addMethod(
  2797. "_initialize",
  2798. smalltalk.method({
  2799. selector: "initialize",
  2800. fn: function () {
  2801. var self = this;
  2802. smalltalk.send(smalltalk.Transcript || Transcript, "_register_", [smalltalk.send(self, "_current", [])]);
  2803. return self;
  2804. }
  2805. }),
  2806. smalltalk.IDETranscript.klass);
  2807. smalltalk.addMethod(
  2808. "_new",
  2809. smalltalk.method({
  2810. selector: "new",
  2811. fn: function () {
  2812. var self = this;
  2813. smalltalk.send(self, "_shouldNotImplement", []);
  2814. return self;
  2815. }
  2816. }),
  2817. smalltalk.IDETranscript.klass);
  2818. smalltalk.addMethod(
  2819. "_open",
  2820. smalltalk.method({
  2821. selector: "open",
  2822. fn: function () {
  2823. var self = this;
  2824. var $1, $2;
  2825. $1 = smalltalk.send(smalltalk.TabManager || TabManager, "_current", []);
  2826. smalltalk.send($1, "_open", []);
  2827. $2 = smalltalk.send($1, "_selectTab_", [smalltalk.send(self, "_current", [])]);
  2828. return self;
  2829. }
  2830. }),
  2831. smalltalk.IDETranscript.klass);
  2832. smalltalk.addClass('Inspector', smalltalk.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  2833. smalltalk.addMethod(
  2834. "_canBeClosed",
  2835. smalltalk.method({
  2836. selector: "canBeClosed",
  2837. fn: function () {
  2838. var self = this;
  2839. return true;
  2840. }
  2841. }),
  2842. smalltalk.Inspector);
  2843. smalltalk.addMethod(
  2844. "_dive",
  2845. smalltalk.method({
  2846. selector: "dive",
  2847. fn: function () {
  2848. var self = this;
  2849. smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_inspect", []);
  2850. return self;
  2851. }
  2852. }),
  2853. smalltalk.Inspector);
  2854. smalltalk.addMethod(
  2855. "_inspect_",
  2856. smalltalk.method({
  2857. selector: "inspect:",
  2858. fn: function (anObject) {
  2859. var self = this;
  2860. self['@object'] = anObject;
  2861. self['@variables'] = [];
  2862. smalltalk.send(self['@object'], "_inspectOn_", [self]);
  2863. return self;
  2864. }
  2865. }),
  2866. smalltalk.Inspector);
  2867. smalltalk.addMethod(
  2868. "_label",
  2869. smalltalk.method({
  2870. selector: "label",
  2871. fn: function () {
  2872. var self = this;
  2873. var $1;
  2874. if (($receiver = self['@label']) == nil || $receiver == undefined) {
  2875. $1 = "Inspector (nil)";
  2876. } else {
  2877. $1 = self['@label'];
  2878. }
  2879. return $1;
  2880. }
  2881. }),
  2882. smalltalk.Inspector);
  2883. smalltalk.addMethod(
  2884. "_refresh",
  2885. smalltalk.method({
  2886. selector: "refresh",
  2887. fn: function () {
  2888. var self = this;
  2889. var $1;
  2890. smalltalk.send(self, "_inspect_", [self['@object']]);
  2891. smalltalk.send(self, "_updateVariablesList", []);
  2892. $1 = smalltalk.send(self, "_updateValueTextarea", []);
  2893. return self;
  2894. }
  2895. }),
  2896. smalltalk.Inspector);
  2897. smalltalk.addMethod(
  2898. "_renderBottomPanelOn_",
  2899. smalltalk.method({
  2900. selector: "renderBottomPanelOn:",
  2901. fn: function (html) {
  2902. var self = this;
  2903. var $1, $3, $4, $2;
  2904. $1 = smalltalk.send(html, "_div", []);
  2905. smalltalk.send($1, "_class_", ["amber_sourceCode"]);
  2906. $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]);}]);
  2907. return self;
  2908. }
  2909. }),
  2910. smalltalk.Inspector);
  2911. smalltalk.addMethod(
  2912. "_renderBoxOn_",
  2913. smalltalk.method({
  2914. selector: "renderBoxOn:",
  2915. fn: function (html) {
  2916. var self = this;
  2917. var $1;
  2918. smalltalk.send(self, "_renderTopPanelOn_", [html]);
  2919. $1 = smalltalk.send(self, "_renderBottomPanelOn_", [html]);
  2920. return self;
  2921. }
  2922. }),
  2923. smalltalk.Inspector);
  2924. smalltalk.addMethod(
  2925. "_renderButtonsOn_",
  2926. smalltalk.method({
  2927. selector: "renderButtonsOn:",
  2928. fn: function (html) {
  2929. var self = this;
  2930. var $1, $2, $3, $4, $5, $6;
  2931. $1 = smalltalk.send(html, "_button", []);
  2932. smalltalk.send($1, "_with_", ["DoIt"]);
  2933. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_doIt", []);}]);
  2934. $3 = smalltalk.send(html, "_button", []);
  2935. smalltalk.send($3, "_with_", ["PrintIt"]);
  2936. $4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_printIt", []);}]);
  2937. $5 = smalltalk.send(html, "_button", []);
  2938. smalltalk.send($5, "_with_", ["InspectIt"]);
  2939. $6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_inspectIt", []);}]);
  2940. smalltalk.send(self, "_updateButtons", []);
  2941. return self;
  2942. }
  2943. }),
  2944. smalltalk.Inspector);
  2945. smalltalk.addMethod(
  2946. "_renderTopPanelOn_",
  2947. smalltalk.method({
  2948. selector: "renderTopPanelOn:",
  2949. fn: function (html) {
  2950. var self = this;
  2951. var $1, $3, $4, $5, $7, $8, $9, $10, $6, $2, $11;
  2952. $1 = smalltalk.send(html, "_div", []);
  2953. smalltalk.send($1, "_class_", ["top"]);
  2954. $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"]);}]);
  2955. smalltalk.send(self, "_updateVariablesList", []);
  2956. $11 = smalltalk.send(self, "_updateValueTextarea", []);
  2957. return self;
  2958. }
  2959. }),
  2960. smalltalk.Inspector);
  2961. smalltalk.addMethod(
  2962. "_selectVariable_",
  2963. smalltalk.method({
  2964. selector: "selectVariable:",
  2965. fn: function (aString) {
  2966. var self = this;
  2967. var $1;
  2968. smalltalk.send(self, "_selectedVariable_", [aString]);
  2969. smalltalk.send(self, "_updateVariablesList", []);
  2970. smalltalk.send(self, "_updateValueTextarea", []);
  2971. $1 = smalltalk.send(self, "_updateButtons", []);
  2972. return self;
  2973. }
  2974. }),
  2975. smalltalk.Inspector);
  2976. smalltalk.addMethod(
  2977. "_selectedVariable",
  2978. smalltalk.method({
  2979. selector: "selectedVariable",
  2980. fn: function () {
  2981. var self = this;
  2982. return self['@selectedVariable'];
  2983. }
  2984. }),
  2985. smalltalk.Inspector);
  2986. smalltalk.addMethod(
  2987. "_selectedVariable_",
  2988. smalltalk.method({
  2989. selector: "selectedVariable:",
  2990. fn: function (aString) {
  2991. var self = this;
  2992. self['@selectedVariable'] = aString;
  2993. return self;
  2994. }
  2995. }),
  2996. smalltalk.Inspector);
  2997. smalltalk.addMethod(
  2998. "_setLabel_",
  2999. smalltalk.method({
  3000. selector: "setLabel:",
  3001. fn: function (aString) {
  3002. var self = this;
  3003. self['@label'] = aString;
  3004. return self;
  3005. }
  3006. }),
  3007. smalltalk.Inspector);
  3008. smalltalk.addMethod(
  3009. "_setVariables_",
  3010. smalltalk.method({
  3011. selector: "setVariables:",
  3012. fn: function (aCollection) {
  3013. var self = this;
  3014. self['@variables'] = aCollection;
  3015. return self;
  3016. }
  3017. }),
  3018. smalltalk.Inspector);
  3019. smalltalk.addMethod(
  3020. "_sourceArea",
  3021. smalltalk.method({
  3022. selector: "sourceArea",
  3023. fn: function () {
  3024. var self = this;
  3025. return self['@sourceArea'];
  3026. }
  3027. }),
  3028. smalltalk.Inspector);
  3029. smalltalk.addMethod(
  3030. "_updateButtons",
  3031. smalltalk.method({
  3032. selector: "updateButtons",
  3033. fn: function () {
  3034. var self = this;
  3035. var $1;
  3036. $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", []);}]);
  3037. if (smalltalk.assert($1)) {
  3038. smalltalk.send(self['@diveButton'], "_removeAt_", ["disabled"]);
  3039. } else {
  3040. smalltalk.send(self['@diveButton'], "_at_put_", ["disabled", true]);
  3041. }
  3042. return self;
  3043. }
  3044. }),
  3045. smalltalk.Inspector);
  3046. smalltalk.addMethod(
  3047. "_updateValueTextarea",
  3048. smalltalk.method({
  3049. selector: "updateValueTextarea",
  3050. fn: function () {
  3051. var self = this;
  3052. var $2, $1;
  3053. $2 = smalltalk.send(smalltalk.send(self, "_selectedVariable", []), "_isNil", []);
  3054. if (smalltalk.assert($2)) {
  3055. $1 = "";
  3056. } else {
  3057. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_printString", []);
  3058. }
  3059. smalltalk.send(smalltalk.send(self['@valueTextarea'], "_asJQuery", []), "_val_", [$1]);
  3060. return self;
  3061. }
  3062. }),
  3063. smalltalk.Inspector);
  3064. smalltalk.addMethod(
  3065. "_updateVariablesList",
  3066. smalltalk.method({
  3067. selector: "updateVariablesList",
  3068. fn: function () {
  3069. var self = this;
  3070. var $1, $2;
  3071. 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"]);}}]);}]);
  3072. return self;
  3073. }
  3074. }),
  3075. smalltalk.Inspector);
  3076. smalltalk.addMethod(
  3077. "_variables",
  3078. smalltalk.method({
  3079. selector: "variables",
  3080. fn: function () {
  3081. var self = this;
  3082. return self['@variables'];
  3083. }
  3084. }),
  3085. smalltalk.Inspector);
  3086. smalltalk.addMethod(
  3087. "_on_",
  3088. smalltalk.method({
  3089. selector: "on:",
  3090. fn: function (anObject) {
  3091. var self = this;
  3092. var $2, $3, $1;
  3093. $2 = smalltalk.send(self, "_new", []);
  3094. smalltalk.send($2, "_inspect_", [anObject]);
  3095. $3 = smalltalk.send($2, "_yourself", []);
  3096. $1 = $3;
  3097. return $1;
  3098. }
  3099. }),
  3100. smalltalk.Inspector.klass);
  3101. smalltalk.addClass('ProgressBar', smalltalk.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  3102. smalltalk.addMethod(
  3103. "_percent",
  3104. smalltalk.method({
  3105. selector: "percent",
  3106. fn: function () {
  3107. var self = this;
  3108. var $1;
  3109. if (($receiver = self['@percent']) == nil || $receiver == undefined) {
  3110. $1 = 0;
  3111. } else {
  3112. $1 = self['@percent'];
  3113. }
  3114. return $1;
  3115. }
  3116. }),
  3117. smalltalk.ProgressBar);
  3118. smalltalk.addMethod(
  3119. "_percent_",
  3120. smalltalk.method({
  3121. selector: "percent:",
  3122. fn: function (aNumber) {
  3123. var self = this;
  3124. self['@percent'] = aNumber;
  3125. return self;
  3126. }
  3127. }),
  3128. smalltalk.ProgressBar);
  3129. smalltalk.addMethod(
  3130. "_renderOn_",
  3131. smalltalk.method({
  3132. selector: "renderOn:",
  3133. fn: function (html) {
  3134. var self = this;
  3135. var $1, $2;
  3136. $1 = smalltalk.send(html, "_div", []);
  3137. smalltalk.send($1, "_class_", ["progress_bar"]);
  3138. $2 = smalltalk.send($1, "_yourself", []);
  3139. self['@div'] = $2;
  3140. smalltalk.send(self, "_renderProgressBar", []);
  3141. return self;
  3142. }
  3143. }),
  3144. smalltalk.ProgressBar);
  3145. smalltalk.addMethod(
  3146. "_renderProgressBar",
  3147. smalltalk.method({
  3148. selector: "renderProgressBar",
  3149. fn: function () {
  3150. var self = this;
  3151. var $1, $2;
  3152. 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;}]);
  3153. return self;
  3154. }
  3155. }),
  3156. smalltalk.ProgressBar);
  3157. smalltalk.addMethod(
  3158. "_updatePercent_",
  3159. smalltalk.method({
  3160. selector: "updatePercent:",
  3161. fn: function (aNumber) {
  3162. var self = this;
  3163. smalltalk.send(self, "_percent_", [aNumber]);
  3164. smalltalk.send(self, "_renderProgressBar", []);
  3165. return self;
  3166. }
  3167. }),
  3168. smalltalk.ProgressBar);
  3169. smalltalk.addClass('ReferencesBrowser', smalltalk.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  3170. smalltalk.addMethod(
  3171. "_canBeClosed",
  3172. smalltalk.method({
  3173. selector: "canBeClosed",
  3174. fn: function () {
  3175. var self = this;
  3176. return true;
  3177. }
  3178. }),
  3179. smalltalk.ReferencesBrowser);
  3180. smalltalk.addMethod(
  3181. "_classesAndMetaclasses",
  3182. smalltalk.method({
  3183. selector: "classesAndMetaclasses",
  3184. fn: function () {
  3185. var self = this;
  3186. var $1;
  3187. $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", []);}])]);
  3188. return $1;
  3189. }
  3190. }),
  3191. smalltalk.ReferencesBrowser);
  3192. smalltalk.addMethod(
  3193. "_implementors",
  3194. smalltalk.method({
  3195. selector: "implementors",
  3196. fn: function () {
  3197. var self = this;
  3198. var $1;
  3199. if (($receiver = self['@implementors']) == nil ||
  3200. $receiver == undefined) {
  3201. self['@implementors'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3202. $1 = self['@implementors'];
  3203. } else {
  3204. $1 = self['@implementors'];
  3205. }
  3206. return $1;
  3207. }
  3208. }),
  3209. smalltalk.ReferencesBrowser);
  3210. smalltalk.addMethod(
  3211. "_initialize",
  3212. smalltalk.method({
  3213. selector: "initialize",
  3214. fn: function () {
  3215. var self = this;
  3216. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  3217. self['@selector'] = "";
  3218. return self;
  3219. }
  3220. }),
  3221. smalltalk.ReferencesBrowser);
  3222. smalltalk.addMethod(
  3223. "_label",
  3224. smalltalk.method({
  3225. selector: "label",
  3226. fn: function () {
  3227. var self = this;
  3228. return "[References]";
  3229. }
  3230. }),
  3231. smalltalk.ReferencesBrowser);
  3232. smalltalk.addMethod(
  3233. "_matches",
  3234. smalltalk.method({
  3235. selector: "matches",
  3236. fn: function () {
  3237. var self = this;
  3238. var $1;
  3239. if (($receiver = self['@matches']) == nil || $receiver == undefined) {
  3240. self['@matches'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3241. $1 = self['@matches'];
  3242. } else {
  3243. $1 = self['@matches'];
  3244. }
  3245. return $1;
  3246. }
  3247. }),
  3248. smalltalk.ReferencesBrowser);
  3249. smalltalk.addMethod(
  3250. "_openBrowserOn_",
  3251. smalltalk.method({
  3252. selector: "openBrowserOn:",
  3253. fn: function (aMethod) {
  3254. var self = this;
  3255. var $2, $1, $3, $4;
  3256. var browser;
  3257. $2 = smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_isMetaclass", []);
  3258. if (smalltalk.assert($2)) {
  3259. $1 = smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_instanceClass", []);
  3260. } else {
  3261. $1 = smalltalk.send(aMethod, "_methodClass", []);
  3262. }
  3263. browser = smalltalk.send(smalltalk.Browser || Browser, "_openOn_", [$1]);
  3264. $3 = smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_isMetaclass", []);
  3265. if (smalltalk.assert($3)) {
  3266. smalltalk.send(browser, "_selectTab_", [smalltalk.symbolFor("class")]);
  3267. }
  3268. smalltalk.send(browser, "_selectProtocol_", [smalltalk.send(aMethod, "_category", [])]);
  3269. $4 = smalltalk.send(browser, "_selectMethod_", [aMethod]);
  3270. return self;
  3271. }
  3272. }),
  3273. smalltalk.ReferencesBrowser);
  3274. smalltalk.addMethod(
  3275. "_referencedClasses",
  3276. smalltalk.method({
  3277. selector: "referencedClasses",
  3278. fn: function () {
  3279. var self = this;
  3280. var $1;
  3281. if (($receiver = self['@referencedClasses']) == nil ||
  3282. $receiver == undefined) {
  3283. self['@referencedClasses'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3284. $1 = self['@referencedClasses'];
  3285. } else {
  3286. $1 = self['@referencedClasses'];
  3287. }
  3288. return $1;
  3289. }
  3290. }),
  3291. smalltalk.ReferencesBrowser);
  3292. smalltalk.addMethod(
  3293. "_renderBoxOn_",
  3294. smalltalk.method({
  3295. selector: "renderBoxOn:",
  3296. fn: function (html) {
  3297. var self = this;
  3298. var $1;
  3299. smalltalk.send(self, "_renderInputOn_", [html]);
  3300. smalltalk.send(self, "_renderImplementorsOn_", [html]);
  3301. smalltalk.send(self, "_renderSendersOn_", [html]);
  3302. smalltalk.send(self, "_renderReferencedClassesOn_", [html]);
  3303. $1 = smalltalk.send(self, "_renderMatchesOn_", [html]);
  3304. return self;
  3305. }
  3306. }),
  3307. smalltalk.ReferencesBrowser);
  3308. smalltalk.addMethod(
  3309. "_renderImplementorsOn_",
  3310. smalltalk.method({
  3311. selector: "renderImplementorsOn:",
  3312. fn: function (html) {
  3313. var self = this;
  3314. self['@implementorsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column implementors"]);
  3315. smalltalk.send(self, "_updateImplementorsList", []);
  3316. return self;
  3317. }
  3318. }),
  3319. smalltalk.ReferencesBrowser);
  3320. smalltalk.addMethod(
  3321. "_renderInputOn_",
  3322. smalltalk.method({
  3323. selector: "renderInputOn:",
  3324. fn: function (html) {
  3325. var self = this;
  3326. var $1, $2;
  3327. $1 = smalltalk.send(html, "_input", []);
  3328. smalltalk.send($1, "_class_", ["implementors"]);
  3329. $2 = smalltalk.send($1, "_yourself", []);
  3330. self['@input'] = $2;
  3331. smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val_", [self['@selector']]);
  3332. smalltalk.send(self, "_setInputEvents", []);
  3333. return self;
  3334. }
  3335. }),
  3336. smalltalk.ReferencesBrowser);
  3337. smalltalk.addMethod(
  3338. "_renderMatchesOn_",
  3339. smalltalk.method({
  3340. selector: "renderMatchesOn:",
  3341. fn: function (html) {
  3342. var self = this;
  3343. self['@matchesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column matches"]);
  3344. smalltalk.send(self, "_updateMatchesList", []);
  3345. return self;
  3346. }
  3347. }),
  3348. smalltalk.ReferencesBrowser);
  3349. smalltalk.addMethod(
  3350. "_renderReferencedClassesOn_",
  3351. smalltalk.method({
  3352. selector: "renderReferencedClassesOn:",
  3353. fn: function (html) {
  3354. var self = this;
  3355. self['@referencedClassesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column referenced_classes"]);
  3356. smalltalk.send(self, "_updateReferencedClassesList", []);
  3357. return self;
  3358. }
  3359. }),
  3360. smalltalk.ReferencesBrowser);
  3361. smalltalk.addMethod(
  3362. "_renderSendersOn_",
  3363. smalltalk.method({
  3364. selector: "renderSendersOn:",
  3365. fn: function (html) {
  3366. var self = this;
  3367. self['@sendersList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column senders"]);
  3368. smalltalk.send(self, "_updateSendersList", []);
  3369. return self;
  3370. }
  3371. }),
  3372. smalltalk.ReferencesBrowser);
  3373. smalltalk.addMethod(
  3374. "_search_",
  3375. smalltalk.method({
  3376. selector: "search:",
  3377. fn: function (aString) {
  3378. var self = this;
  3379. var $1;
  3380. smalltalk.send(self, "_searchReferencesFor_", [aString]);
  3381. smalltalk.send(self, "_updateImplementorsList", []);
  3382. smalltalk.send(self, "_updateSendersList", []);
  3383. smalltalk.send(self, "_updateReferencedClassesList", []);
  3384. $1 = smalltalk.send(self, "_updateMatchesList", []);
  3385. return self;
  3386. }
  3387. }),
  3388. smalltalk.ReferencesBrowser);
  3389. smalltalk.addMethod(
  3390. "_searchMethodSource",
  3391. smalltalk.method({
  3392. selector: "searchMethodSource",
  3393. fn: function () {
  3394. var self = this;
  3395. var $1;
  3396. var regex;
  3397. regex = smalltalk.send(self['@selector'], "_allButFirst", []);
  3398. 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]);}}]);}]);
  3399. return self;
  3400. }
  3401. }),
  3402. smalltalk.ReferencesBrowser);
  3403. smalltalk.addMethod(
  3404. "_searchReferencedClasses",
  3405. smalltalk.method({
  3406. selector: "searchReferencedClasses",
  3407. fn: function () {
  3408. var self = this;
  3409. var $1;
  3410. 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]);}}]);}]);
  3411. return self;
  3412. }
  3413. }),
  3414. smalltalk.ReferencesBrowser);
  3415. smalltalk.addMethod(
  3416. "_searchReferencesFor_",
  3417. smalltalk.method({
  3418. selector: "searchReferencesFor:",
  3419. fn: function (aString) {
  3420. var self = this;
  3421. var $1;
  3422. self['@selector'] = aString;
  3423. self['@implementors'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3424. self['@senders'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3425. self['@referencedClasses'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3426. self['@matches'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3427. smalltalk.send(self, "_searchMethodSource", []);
  3428. $1 = smalltalk.send(self['@selector'], "_match_", ["^[A-Z]"]);
  3429. if (smalltalk.assert($1)) {
  3430. smalltalk.send(self, "_searchReferencedClasses", []);
  3431. } else {
  3432. smalltalk.send(self, "_searchSelectorReferences", []);
  3433. }
  3434. return self;
  3435. }
  3436. }),
  3437. smalltalk.ReferencesBrowser);
  3438. smalltalk.addMethod(
  3439. "_searchSelectorReferences",
  3440. smalltalk.method({
  3441. selector: "searchSelectorReferences",
  3442. fn: function () {
  3443. var self = this;
  3444. var $1, $2;
  3445. 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]);}}]);}]);
  3446. return self;
  3447. }
  3448. }),
  3449. smalltalk.ReferencesBrowser);
  3450. smalltalk.addMethod(
  3451. "_selector",
  3452. smalltalk.method({
  3453. selector: "selector",
  3454. fn: function () {
  3455. var self = this;
  3456. return self['@selector'];
  3457. }
  3458. }),
  3459. smalltalk.ReferencesBrowser);
  3460. smalltalk.addMethod(
  3461. "_senders",
  3462. smalltalk.method({
  3463. selector: "senders",
  3464. fn: function () {
  3465. var self = this;
  3466. var $1;
  3467. if (($receiver = self['@senders']) == nil || $receiver == undefined) {
  3468. self['@senders'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3469. $1 = self['@senders'];
  3470. } else {
  3471. $1 = self['@senders'];
  3472. }
  3473. return $1;
  3474. }
  3475. }),
  3476. smalltalk.ReferencesBrowser);
  3477. smalltalk.addMethod(
  3478. "_setInputEvents",
  3479. smalltalk.method({
  3480. selector: "setInputEvents",
  3481. fn: function () {
  3482. var self = this;
  3483. var $1;
  3484. 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'];}]);
  3485. $1 = smalltalk.send(self['@input'], "_onKeyDown_", [function () {if (($receiver = self['@timer']) == nil || $receiver == undefined) {return self['@timer'];} else {return smalltalk.send(self['@timer'], "_clearTimeout", []);}}]);
  3486. return self;
  3487. }
  3488. }),
  3489. smalltalk.ReferencesBrowser);
  3490. smalltalk.addMethod(
  3491. "_updateImplementorsList",
  3492. smalltalk.method({
  3493. selector: "updateImplementorsList",
  3494. fn: function () {
  3495. var self = this;
  3496. var $1, $2, $3;
  3497. 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;}]);}]);
  3498. return self;
  3499. }
  3500. }),
  3501. smalltalk.ReferencesBrowser);
  3502. smalltalk.addMethod(
  3503. "_updateMatchesList",
  3504. smalltalk.method({
  3505. selector: "updateMatchesList",
  3506. fn: function () {
  3507. var self = this;
  3508. var $1, $2, $3;
  3509. 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;}]);}]);
  3510. return self;
  3511. }
  3512. }),
  3513. smalltalk.ReferencesBrowser);
  3514. smalltalk.addMethod(
  3515. "_updateReferencedClassesList",
  3516. smalltalk.method({
  3517. selector: "updateReferencedClassesList",
  3518. fn: function () {
  3519. var self = this;
  3520. var $1, $2, $3, $4;
  3521. 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;}]);}]);
  3522. return self;
  3523. }
  3524. }),
  3525. smalltalk.ReferencesBrowser);
  3526. smalltalk.addMethod(
  3527. "_updateSendersList",
  3528. smalltalk.method({
  3529. selector: "updateSendersList",
  3530. fn: function () {
  3531. var self = this;
  3532. var $1, $2, $3, $4;
  3533. 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;}]);}]);
  3534. return self;
  3535. }
  3536. }),
  3537. smalltalk.ReferencesBrowser);
  3538. smalltalk.addMethod(
  3539. "_search_",
  3540. smalltalk.method({
  3541. selector: "search:",
  3542. fn: function (aString) {
  3543. var self = this;
  3544. var $2, $3, $1;
  3545. $2 = smalltalk.send(self, "_new", []);
  3546. smalltalk.send($2, "_searchReferencesFor_", [aString]);
  3547. $3 = smalltalk.send($2, "_open", []);
  3548. $1 = $3;
  3549. return $1;
  3550. }
  3551. }),
  3552. smalltalk.ReferencesBrowser.klass);
  3553. smalltalk.addClass('TestRunner', smalltalk.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  3554. smalltalk.addMethod(
  3555. "_allClasses",
  3556. smalltalk.method({
  3557. selector: "allClasses",
  3558. fn: function () {
  3559. var self = this;
  3560. var $1;
  3561. $1 = smalltalk.send(smalltalk.send(smalltalk.TestCase || TestCase, "_allSubclasses", []), "_select_", [function (each) {return smalltalk.send(smalltalk.send(each, "_isAbstract", []), "_not", []);}]);
  3562. return $1;
  3563. }
  3564. }),
  3565. smalltalk.TestRunner);
  3566. smalltalk.addMethod(
  3567. "_classes",
  3568. smalltalk.method({
  3569. selector: "classes",
  3570. fn: function () {
  3571. var self = this;
  3572. var $1;
  3573. $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", [])]);}]);
  3574. return $1;
  3575. }
  3576. }),
  3577. smalltalk.TestRunner);
  3578. smalltalk.addMethod(
  3579. "_initialize",
  3580. smalltalk.method({
  3581. selector: "initialize",
  3582. fn: function () {
  3583. var self = this;
  3584. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  3585. self['@result'] = smalltalk.send(smalltalk.TestResult || TestResult, "_new", []);
  3586. return self;
  3587. }
  3588. }),
  3589. smalltalk.TestRunner);
  3590. smalltalk.addMethod(
  3591. "_isSelectedCategory_",
  3592. smalltalk.method({
  3593. selector: "isSelectedCategory:",
  3594. fn: function (aCategory) {
  3595. var self = this;
  3596. var $1;
  3597. $1 = smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [aCategory]);
  3598. return $1;
  3599. }
  3600. }),
  3601. smalltalk.TestRunner);
  3602. smalltalk.addMethod(
  3603. "_isSelectedClass_",
  3604. smalltalk.method({
  3605. selector: "isSelectedClass:",
  3606. fn: function (aClass) {
  3607. var self = this;
  3608. var $1;
  3609. $1 = smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_includes_", [aClass]);
  3610. return $1;
  3611. }
  3612. }),
  3613. smalltalk.TestRunner);
  3614. smalltalk.addMethod(
  3615. "_label",
  3616. smalltalk.method({
  3617. selector: "label",
  3618. fn: function () {
  3619. var self = this;
  3620. return "SUnit";
  3621. }
  3622. }),
  3623. smalltalk.TestRunner);
  3624. smalltalk.addMethod(
  3625. "_packages",
  3626. smalltalk.method({
  3627. selector: "packages",
  3628. fn: function () {
  3629. var self = this;
  3630. var $1, $2;
  3631. var packages;
  3632. packages = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3633. 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", [])]);}}]);
  3634. $2 = smalltalk.send(packages, "_sort", []);
  3635. return $2;
  3636. }
  3637. }),
  3638. smalltalk.TestRunner);
  3639. smalltalk.addMethod(
  3640. "_performFailure_",
  3641. smalltalk.method({
  3642. selector: "performFailure:",
  3643. fn: function (aTestCase) {
  3644. var self = this;
  3645. smalltalk.send(aTestCase, "_setUp", []);
  3646. smalltalk.send(function () {return smalltalk.send(aTestCase, "_perform_", [smalltalk.send(aTestCase, "_selector", [])]);}, "_ensure_", [function () {return smalltalk.send(aTestCase, "_tearDown", []);}]);
  3647. return self;
  3648. }
  3649. }),
  3650. smalltalk.TestRunner);
  3651. smalltalk.addMethod(
  3652. "_printErrors",
  3653. smalltalk.method({
  3654. selector: "printErrors",
  3655. fn: function () {
  3656. var self = this;
  3657. var $1;
  3658. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_size", []), "_asString", []), "__comma", [" errors, "]);
  3659. return $1;
  3660. }
  3661. }),
  3662. smalltalk.TestRunner);
  3663. smalltalk.addMethod(
  3664. "_printFailures",
  3665. smalltalk.method({
  3666. selector: "printFailures",
  3667. fn: function () {
  3668. var self = this;
  3669. var $1;
  3670. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_size", []), "_asString", []), "__comma", [" failures"]);
  3671. return $1;
  3672. }
  3673. }),
  3674. smalltalk.TestRunner);
  3675. smalltalk.addMethod(
  3676. "_printPasses",
  3677. smalltalk.method({
  3678. selector: "printPasses",
  3679. fn: function () {
  3680. var self = this;
  3681. var $1;
  3682. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_total", []), "__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, "]);
  3683. return $1;
  3684. }
  3685. }),
  3686. smalltalk.TestRunner);
  3687. smalltalk.addMethod(
  3688. "_printTotal",
  3689. smalltalk.method({
  3690. selector: "printTotal",
  3691. fn: function () {
  3692. var self = this;
  3693. var $1;
  3694. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_total", []), "_asString", []), "__comma", [" runs, "]);
  3695. return $1;
  3696. }
  3697. }),
  3698. smalltalk.TestRunner);
  3699. smalltalk.addMethod(
  3700. "_progressBar",
  3701. smalltalk.method({
  3702. selector: "progressBar",
  3703. fn: function () {
  3704. var self = this;
  3705. var $1;
  3706. if (($receiver = self['@progressBar']) == nil || $receiver == undefined) {
  3707. self['@progressBar'] = smalltalk.send(smalltalk.ProgressBar || ProgressBar, "_new", []);
  3708. $1 = self['@progressBar'];
  3709. } else {
  3710. $1 = self['@progressBar'];
  3711. }
  3712. return $1;
  3713. }
  3714. }),
  3715. smalltalk.TestRunner);
  3716. smalltalk.addMethod(
  3717. "_renderBoxOn_",
  3718. smalltalk.method({
  3719. selector: "renderBoxOn:",
  3720. fn: function (html) {
  3721. var self = this;
  3722. var $1;
  3723. smalltalk.send(self, "_renderCategoriesOn_", [html]);
  3724. smalltalk.send(self, "_renderClassesOn_", [html]);
  3725. $1 = smalltalk.send(self, "_renderResultsOn_", [html]);
  3726. return self;
  3727. }
  3728. }),
  3729. smalltalk.TestRunner);
  3730. smalltalk.addMethod(
  3731. "_renderButtonsOn_",
  3732. smalltalk.method({
  3733. selector: "renderButtonsOn:",
  3734. fn: function (html) {
  3735. var self = this;
  3736. var $1, $2;
  3737. $1 = smalltalk.send(html, "_button", []);
  3738. smalltalk.send($1, "_with_", ["Run selected"]);
  3739. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_run_", [smalltalk.send(self, "_testCases", [])]);}]);
  3740. return self;
  3741. }
  3742. }),
  3743. smalltalk.TestRunner);
  3744. smalltalk.addMethod(
  3745. "_renderCategoriesOn_",
  3746. smalltalk.method({
  3747. selector: "renderCategoriesOn:",
  3748. fn: function (html) {
  3749. var self = this;
  3750. self['@packagesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit packages"]);
  3751. smalltalk.send(self, "_updateCategoriesList", []);
  3752. return self;
  3753. }
  3754. }),
  3755. smalltalk.TestRunner);
  3756. smalltalk.addMethod(
  3757. "_renderClassesOn_",
  3758. smalltalk.method({
  3759. selector: "renderClassesOn:",
  3760. fn: function (html) {
  3761. var self = this;
  3762. self['@classesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit classes"]);
  3763. smalltalk.send(self, "_updateClassesList", []);
  3764. return self;
  3765. }
  3766. }),
  3767. smalltalk.TestRunner);
  3768. smalltalk.addMethod(
  3769. "_renderErrorsOn_",
  3770. smalltalk.method({
  3771. selector: "renderErrorsOn:",
  3772. fn: function (html) {
  3773. var self = this;
  3774. var $1, $2;
  3775. 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;}]);
  3776. return self;
  3777. }
  3778. }),
  3779. smalltalk.TestRunner);
  3780. smalltalk.addMethod(
  3781. "_renderFailuresOn_",
  3782. smalltalk.method({
  3783. selector: "renderFailuresOn:",
  3784. fn: function (html) {
  3785. var self = this;
  3786. var $1, $2;
  3787. 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;}]);
  3788. return self;
  3789. }
  3790. }),
  3791. smalltalk.TestRunner);
  3792. smalltalk.addMethod(
  3793. "_renderResultsOn_",
  3794. smalltalk.method({
  3795. selector: "renderResultsOn:",
  3796. fn: function (html) {
  3797. var self = this;
  3798. self['@statusDiv'] = smalltalk.send(html, "_div", []);
  3799. smalltalk.send(html, "_with_", [smalltalk.send(self, "_progressBar", [])]);
  3800. self['@methodsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit results"]);
  3801. smalltalk.send(self, "_updateMethodsList", []);
  3802. smalltalk.send(self, "_updateStatusDiv", []);
  3803. return self;
  3804. }
  3805. }),
  3806. smalltalk.TestRunner);
  3807. smalltalk.addMethod(
  3808. "_result",
  3809. smalltalk.method({
  3810. selector: "result",
  3811. fn: function () {
  3812. var self = this;
  3813. return self['@result'];
  3814. }
  3815. }),
  3816. smalltalk.TestRunner);
  3817. smalltalk.addMethod(
  3818. "_run_",
  3819. smalltalk.method({
  3820. selector: "run:",
  3821. fn: function (aCollection) {
  3822. var self = this;
  3823. var $1;
  3824. self['@result'] = smalltalk.send(smalltalk.TestResult || TestResult, "_new", []);
  3825. smalltalk.send(self, "_updateStatusDiv", []);
  3826. $1 = smalltalk.send(self, "_updateMethodsList", []);
  3827. smalltalk.send(smalltalk.send(self, "_progressBar", []), "_updatePercent_", [0]);
  3828. smalltalk.send(self['@result'], "_total_", [smalltalk.send(aCollection, "_size", [])]);
  3829. 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]);}]);
  3830. return self;
  3831. }
  3832. }),
  3833. smalltalk.TestRunner);
  3834. smalltalk.addMethod(
  3835. "_selectAllCategories",
  3836. smalltalk.method({
  3837. selector: "selectAllCategories",
  3838. fn: function () {
  3839. var self = this;
  3840. var $1, $2;
  3841. 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]);}}]);
  3842. smalltalk.send(self, "_updateCategoriesList", []);
  3843. $2 = smalltalk.send(self, "_updateClassesList", []);
  3844. return self;
  3845. }
  3846. }),
  3847. smalltalk.TestRunner);
  3848. smalltalk.addMethod(
  3849. "_selectAllClasses",
  3850. smalltalk.method({
  3851. selector: "selectAllClasses",
  3852. fn: function () {
  3853. var self = this;
  3854. var $1, $2;
  3855. 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]);}}]);
  3856. smalltalk.send(self, "_updateCategoriesList", []);
  3857. $2 = smalltalk.send(self, "_updateClassesList", []);
  3858. return self;
  3859. }
  3860. }),
  3861. smalltalk.TestRunner);
  3862. smalltalk.addMethod(
  3863. "_selectedCategories",
  3864. smalltalk.method({
  3865. selector: "selectedCategories",
  3866. fn: function () {
  3867. var self = this;
  3868. var $1;
  3869. if (($receiver = self['@selectedCategories']) == nil ||
  3870. $receiver == undefined) {
  3871. self['@selectedCategories'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3872. $1 = self['@selectedCategories'];
  3873. } else {
  3874. $1 = self['@selectedCategories'];
  3875. }
  3876. return $1;
  3877. }
  3878. }),
  3879. smalltalk.TestRunner);
  3880. smalltalk.addMethod(
  3881. "_selectedClasses",
  3882. smalltalk.method({
  3883. selector: "selectedClasses",
  3884. fn: function () {
  3885. var self = this;
  3886. var $1;
  3887. if (($receiver = self['@selectedClasses']) == nil ||
  3888. $receiver == undefined) {
  3889. self['@selectedClasses'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3890. $1 = self['@selectedClasses'];
  3891. } else {
  3892. $1 = self['@selectedClasses'];
  3893. }
  3894. return $1;
  3895. }
  3896. }),
  3897. smalltalk.TestRunner);
  3898. smalltalk.addMethod(
  3899. "_statusInfo",
  3900. smalltalk.method({
  3901. selector: "statusInfo",
  3902. fn: function () {
  3903. var self = this;
  3904. var $1;
  3905. $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", [])]);
  3906. return $1;
  3907. }
  3908. }),
  3909. smalltalk.TestRunner);
  3910. smalltalk.addMethod(
  3911. "_testCases",
  3912. smalltalk.method({
  3913. selector: "testCases",
  3914. fn: function () {
  3915. var self = this;
  3916. var testCases;
  3917. testCases = [];
  3918. 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", [])]);}]);
  3919. return testCases;
  3920. }
  3921. }),
  3922. smalltalk.TestRunner);
  3923. smalltalk.addMethod(
  3924. "_toggleCategory_",
  3925. smalltalk.method({
  3926. selector: "toggleCategory:",
  3927. fn: function (aCategory) {
  3928. var self = this;
  3929. var $1, $2;
  3930. $1 = smalltalk.send(self, "_isSelectedCategory_", [aCategory]);
  3931. if (smalltalk.assert($1)) {
  3932. smalltalk.send(self['@selectedCategories'], "_remove_", [aCategory]);
  3933. } else {
  3934. smalltalk.send(self['@selectedCategories'], "_add_", [aCategory]);
  3935. }
  3936. smalltalk.send(self, "_updateCategoriesList", []);
  3937. $2 = smalltalk.send(self, "_updateClassesList", []);
  3938. return self;
  3939. }
  3940. }),
  3941. smalltalk.TestRunner);
  3942. smalltalk.addMethod(
  3943. "_toggleClass_",
  3944. smalltalk.method({
  3945. selector: "toggleClass:",
  3946. fn: function (aClass) {
  3947. var self = this;
  3948. var $1;
  3949. $1 = smalltalk.send(self, "_isSelectedClass_", [aClass]);
  3950. if (smalltalk.assert($1)) {
  3951. smalltalk.send(self['@selectedClasses'], "_remove_", [aClass]);
  3952. } else {
  3953. smalltalk.send(self['@selectedClasses'], "_add_", [aClass]);
  3954. }
  3955. smalltalk.send(self, "_updateClassesList", []);
  3956. return self;
  3957. }
  3958. }),
  3959. smalltalk.TestRunner);
  3960. smalltalk.addMethod(
  3961. "_updateCategoriesList",
  3962. smalltalk.method({
  3963. selector: "updateCategoriesList",
  3964. fn: function () {
  3965. var self = this;
  3966. var $1, $2, $3, $4;
  3967. 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;}]);}]);
  3968. return self;
  3969. }
  3970. }),
  3971. smalltalk.TestRunner);
  3972. smalltalk.addMethod(
  3973. "_updateClassesList",
  3974. smalltalk.method({
  3975. selector: "updateClassesList",
  3976. fn: function () {
  3977. var self = this;
  3978. var $1, $2, $3, $4, $5;
  3979. 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;}]);}]);
  3980. return self;
  3981. }
  3982. }),
  3983. smalltalk.TestRunner);
  3984. smalltalk.addMethod(
  3985. "_updateMethodsList",
  3986. smalltalk.method({
  3987. selector: "updateMethodsList",
  3988. fn: function () {
  3989. var self = this;
  3990. smalltalk.send(self['@methodsList'], "_contents_", [function (html) {smalltalk.send(self, "_renderErrorsOn_", [html]);return smalltalk.send(self, "_renderFailuresOn_", [html]);}]);
  3991. return self;
  3992. }
  3993. }),
  3994. smalltalk.TestRunner);
  3995. smalltalk.addMethod(
  3996. "_updateStatusDiv",
  3997. smalltalk.method({
  3998. selector: "updateStatusDiv",
  3999. fn: function () {
  4000. var self = this;
  4001. smalltalk.send(self['@statusDiv'], "_class_", [smalltalk.send("sunit status ", "__comma", [smalltalk.send(self['@result'], "_status", [])])]);
  4002. smalltalk.send(self['@statusDiv'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(html, "_span", []), "_with_", [smalltalk.send(self, "_statusInfo", [])]);}]);
  4003. return self;
  4004. }
  4005. }),
  4006. smalltalk.TestRunner);
  4007. smalltalk.addClass('Workspace', smalltalk.TabWidget, ['sourceArea'], 'IDE');
  4008. smalltalk.addMethod(
  4009. "_clearWorkspace",
  4010. smalltalk.method({
  4011. selector: "clearWorkspace",
  4012. fn: function () {
  4013. var self = this;
  4014. smalltalk.send(self['@sourceArea'], "_clear", []);
  4015. return self;
  4016. }
  4017. }),
  4018. smalltalk.Workspace);
  4019. smalltalk.addMethod(
  4020. "_doIt",
  4021. smalltalk.method({
  4022. selector: "doIt",
  4023. fn: function () {
  4024. var self = this;
  4025. smalltalk.send(self['@sourceArea'], "_doIt", []);
  4026. return self;
  4027. }
  4028. }),
  4029. smalltalk.Workspace);
  4030. smalltalk.addMethod(
  4031. "_fileIn",
  4032. smalltalk.method({
  4033. selector: "fileIn",
  4034. fn: function () {
  4035. var self = this;
  4036. smalltalk.send(self['@sourceArea'], "_fileIn", []);
  4037. return self;
  4038. }
  4039. }),
  4040. smalltalk.Workspace);
  4041. smalltalk.addMethod(
  4042. "_inspectIt",
  4043. smalltalk.method({
  4044. selector: "inspectIt",
  4045. fn: function () {
  4046. var self = this;
  4047. smalltalk.send(self['@sourceArea'], "_inspectIt", []);
  4048. return self;
  4049. }
  4050. }),
  4051. smalltalk.Workspace);
  4052. smalltalk.addMethod(
  4053. "_label",
  4054. smalltalk.method({
  4055. selector: "label",
  4056. fn: function () {
  4057. var self = this;
  4058. return "Workspace";
  4059. }
  4060. }),
  4061. smalltalk.Workspace);
  4062. smalltalk.addMethod(
  4063. "_printIt",
  4064. smalltalk.method({
  4065. selector: "printIt",
  4066. fn: function () {
  4067. var self = this;
  4068. smalltalk.send(self['@sourceArea'], "_printIt", []);
  4069. return self;
  4070. }
  4071. }),
  4072. smalltalk.Workspace);
  4073. smalltalk.addMethod(
  4074. "_renderBoxOn_",
  4075. smalltalk.method({
  4076. selector: "renderBoxOn:",
  4077. fn: function (html) {
  4078. var self = this;
  4079. self['@sourceArea'] = smalltalk.send(smalltalk.SourceArea || SourceArea, "_new", []);
  4080. smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);
  4081. return self;
  4082. }
  4083. }),
  4084. smalltalk.Workspace);
  4085. smalltalk.addMethod(
  4086. "_renderButtonsOn_",
  4087. smalltalk.method({
  4088. selector: "renderButtonsOn:",
  4089. fn: function (html) {
  4090. var self = this;
  4091. var $1, $2, $3, $4, $5, $6, $7, $8, $9, $10;
  4092. $1 = smalltalk.send(html, "_button", []);
  4093. smalltalk.send($1, "_with_", ["DoIt"]);
  4094. smalltalk.send($1, "_title_", ["ctrl+d"]);
  4095. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_doIt", []);}]);
  4096. $3 = smalltalk.send(html, "_button", []);
  4097. smalltalk.send($3, "_with_", ["PrintIt"]);
  4098. smalltalk.send($3, "_title_", ["ctrl+p"]);
  4099. $4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(self, "_printIt", []);}]);
  4100. $5 = smalltalk.send(html, "_button", []);
  4101. smalltalk.send($5, "_with_", ["InspectIt"]);
  4102. smalltalk.send($5, "_title_", ["ctrl+i"]);
  4103. $6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(self, "_inspectIt", []);}]);
  4104. $7 = smalltalk.send(html, "_button", []);
  4105. smalltalk.send($7, "_with_", ["FileIn"]);
  4106. smalltalk.send($7, "_title_", ["ctrl+f"]);
  4107. $8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self, "_fileIn", []);}]);
  4108. $9 = smalltalk.send(html, "_button", []);
  4109. smalltalk.send($9, "_with_", ["Clear workspace"]);
  4110. $10 = smalltalk.send($9, "_onClick_", [function () {return smalltalk.send(self, "_clearWorkspace", []);}]);
  4111. return self;
  4112. }
  4113. }),
  4114. smalltalk.Workspace);
  4115. smalltalk.addMethod(
  4116. "_show",
  4117. smalltalk.method({
  4118. selector: "show",
  4119. fn: function (){
  4120. var self=this;
  4121. smalltalk.send(self,"_show",[],smalltalk.TabWidget);
  4122. smalltalk.send(self["@sourceArea"],"_focus",[]);
  4123. return self}
  4124. }),
  4125. smalltalk.Workspace);
  4126. smalltalk.addMethod(
  4127. "_inspect",
  4128. smalltalk.method({
  4129. selector: "inspect",
  4130. fn: function () {
  4131. var self = this;
  4132. var $1, $2;
  4133. $1 = smalltalk.send(smalltalk.Inspector || Inspector, "_new", []);
  4134. smalltalk.send($1, "_inspect_", [self]);
  4135. $2 = smalltalk.send($1, "_open", []);
  4136. return self;
  4137. }
  4138. }),
  4139. smalltalk.Object);
  4140. smalltalk.addMethod(
  4141. "_inspectOn_",
  4142. smalltalk.method({
  4143. selector: "inspectOn:",
  4144. fn: function (anInspector) {
  4145. var self = this;
  4146. var $1;
  4147. var variables;
  4148. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4149. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4150. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_allInstanceVariableNames", []), "_do_", [function (each) {return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);}]);
  4151. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4152. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4153. return self;
  4154. }
  4155. }),
  4156. smalltalk.Object);
  4157. smalltalk.addMethod(
  4158. "_inspectOn_",
  4159. smalltalk.method({
  4160. selector: "inspectOn:",
  4161. fn: function (anInspector) {
  4162. var self = this;
  4163. var $1;
  4164. var variables;
  4165. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4166. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4167. smalltalk.send(self, "_withIndexDo_", [function (each, i) {return smalltalk.send(variables, "_at_put_", [i, each]);}]);
  4168. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4169. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4170. return self;
  4171. }
  4172. }),
  4173. smalltalk.Collection);
  4174. smalltalk.addMethod(
  4175. "_inspectOn_",
  4176. smalltalk.method({
  4177. selector: "inspectOn:",
  4178. fn: function (anInspector) {
  4179. var self = this;
  4180. var $1;
  4181. var variables;
  4182. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4183. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4184. smalltalk.send(variables, "_at_put_", ["#keys", smalltalk.send(self, "_keys", [])]);
  4185. smalltalk.send(self, "_keysAndValuesDo_", [function (key, value) {return smalltalk.send(variables, "_at_put_", [key, value]);}]);
  4186. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4187. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4188. return self;
  4189. }
  4190. }),
  4191. smalltalk.HashedCollection);
  4192. smalltalk.addMethod(
  4193. "_inspectOn_",
  4194. smalltalk.method({
  4195. selector: "inspectOn:",
  4196. fn: function (anInspector) {
  4197. var self = this;
  4198. var $1;
  4199. var label;
  4200. smalltalk.send(self, "_inspectOn_", [anInspector], smalltalk.CharacterArray);
  4201. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", []), "_size", []), "__gt", [30]);
  4202. if (smalltalk.assert($1)) {
  4203. label = smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", []), "_copyFrom_to_", [1, 30]), "__comma", ["...'"]);
  4204. } else {
  4205. label = smalltalk.send(self, "_printString", []);
  4206. }
  4207. smalltalk.send(anInspector, "_setLabel_", [label]);
  4208. return self;
  4209. }
  4210. }),
  4211. smalltalk.String);
  4212. smalltalk.addMethod(
  4213. "_inspectOn_",
  4214. smalltalk.method({
  4215. selector: "inspectOn:",
  4216. fn: function (anInspector) {
  4217. var self = this;
  4218. var $1;
  4219. var variables;
  4220. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4221. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4222. smalltalk.send(self['@elements'], "_withIndexDo_", [function (each, i) {return smalltalk.send(variables, "_at_put_", [i, each]);}]);
  4223. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4224. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4225. return self;
  4226. }
  4227. }),
  4228. smalltalk.Set);
  4229. smalltalk.addMethod(
  4230. "_inspectOn_",
  4231. smalltalk.method({
  4232. selector: "inspectOn:",
  4233. fn: function (anInspector) {
  4234. var self = this;
  4235. var $1;
  4236. var variables;
  4237. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4238. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4239. smalltalk.send(variables, "_at_put_", ["#year", smalltalk.send(self, "_year", [])]);
  4240. smalltalk.send(variables, "_at_put_", ["#month", smalltalk.send(self, "_month", [])]);
  4241. smalltalk.send(variables, "_at_put_", ["#day", smalltalk.send(self, "_day", [])]);
  4242. smalltalk.send(variables, "_at_put_", ["#hours", smalltalk.send(self, "_hours", [])]);
  4243. smalltalk.send(variables, "_at_put_", ["#minutes", smalltalk.send(self, "_minutes", [])]);
  4244. smalltalk.send(variables, "_at_put_", ["#seconds", smalltalk.send(self, "_seconds", [])]);
  4245. smalltalk.send(variables, "_at_put_", ["#milliseconds", smalltalk.send(self, "_milliseconds", [])]);
  4246. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4247. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4248. return self;
  4249. }
  4250. }),
  4251. smalltalk.Date);
  4252. smalltalk.addMethod(
  4253. "_inspectOn_",
  4254. smalltalk.method({
  4255. selector: "inspectOn:",
  4256. fn: function (anInspector) {
  4257. var self = this;
  4258. var $1;
  4259. var variables;
  4260. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4261. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4262. smalltalk.send(variables, "_at_put_", ["#year", smalltalk.send(self, "_year", [])]);
  4263. smalltalk.send(variables, "_at_put_", ["#month", smalltalk.send(self, "_month", [])]);
  4264. smalltalk.send(variables, "_at_put_", ["#day", smalltalk.send(self, "_day", [])]);
  4265. smalltalk.send(variables, "_at_put_", ["#hours", smalltalk.send(self, "_hours", [])]);
  4266. smalltalk.send(variables, "_at_put_", ["#minutes", smalltalk.send(self, "_minutes", [])]);
  4267. smalltalk.send(variables, "_at_put_", ["#seconds", smalltalk.send(self, "_seconds", [])]);
  4268. smalltalk.send(variables, "_at_put_", ["#milliseconds", smalltalk.send(self, "_milliseconds", [])]);
  4269. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4270. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4271. return self;
  4272. }
  4273. }),
  4274. smalltalk.Date);
  4275. smalltalk.addMethod(
  4276. "_inspectOn_",
  4277. smalltalk.method({
  4278. selector: "inspectOn:",
  4279. fn: function (anInspector) {
  4280. var self = this;
  4281. var $1;
  4282. var variables;
  4283. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4284. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4285. smalltalk.send(variables, "_at_put_", ["#home", smalltalk.send(self, "_home", [])]);
  4286. smalltalk.send(variables, "_at_put_", ["#receiver", smalltalk.send(self, "_receiver", [])]);
  4287. smalltalk.send(variables, "_at_put_", ["#selector", smalltalk.send(self, "_selector", [])]);
  4288. smalltalk.send(variables, "_at_put_", ["#temps", smalltalk.send(self, "_temps", [])]);
  4289. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_instanceVariableNames", []), "_do_", [function (each) {return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);}]);
  4290. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4291. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4292. return self;
  4293. }
  4294. }),
  4295. smalltalk.MethodContext);