2
0

IDE.deploy.js 171 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468
  1. smalltalk.addPackage('IDE', {});
  2. smalltalk.addClass('TabManager', smalltalk.Widget, ['selectedTab', 'tabs', 'opened', 'ul', 'input'], 'IDE');
  3. smalltalk.addMethod(
  4. '_tabs',
  5. smalltalk.method({
  6. selector: 'tabs',
  7. fn: function (){
  8. var self=this;
  9. return (($receiver = self['@tabs']) == nil || $receiver == undefined) ? (function(){return self['@tabs']=smalltalk.send((smalltalk.Array || Array), "_new", []);})() : $receiver;
  10. return self;}
  11. }),
  12. smalltalk.TabManager);
  13. smalltalk.addMethod(
  14. '_labelFor_',
  15. smalltalk.method({
  16. selector: 'labelFor:',
  17. fn: function (aWidget){
  18. var self=this;
  19. var label=nil;
  20. var maxSize=nil;
  21. maxSize=(15);
  22. label=smalltalk.send(smalltalk.send(aWidget, "_label", []), "_copyFrom_to_", [(0), smalltalk.send(smalltalk.send(smalltalk.send(aWidget, "_label", []), "_size", []), "_min_", [maxSize])]);
  23. ((($receiver = ((($receiver = smalltalk.send(smalltalk.send(aWidget, "_label", []), "_size", [])).klass === smalltalk.Number) ? $receiver >maxSize : smalltalk.send($receiver, "__gt", [maxSize]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return label=smalltalk.send(label, "__comma", ["..."]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return label=smalltalk.send(label, "__comma", ["..."]);})]));
  24. return label;
  25. return self;}
  26. }),
  27. smalltalk.TabManager);
  28. smalltalk.addMethod(
  29. '_updateBodyMargin',
  30. smalltalk.method({
  31. selector: 'updateBodyMargin',
  32. fn: function (){
  33. var self=this;
  34. smalltalk.send(self, "_setBodyMargin_", [smalltalk.send(smalltalk.send(unescape("%23jtalk"), "_asJQuery", []), "_height", [])]);
  35. return self;}
  36. }),
  37. smalltalk.TabManager);
  38. smalltalk.addMethod(
  39. '_updatePosition',
  40. smalltalk.method({
  41. selector: 'updatePosition',
  42. fn: function (){
  43. var self=this;
  44. jQuery('#jtalk').css('top', '').css('bottom', '0px');
  45. return self;}
  46. }),
  47. smalltalk.TabManager);
  48. smalltalk.addMethod(
  49. '_removeBodyMargin',
  50. smalltalk.method({
  51. selector: 'removeBodyMargin',
  52. fn: function (){
  53. var self=this;
  54. smalltalk.send(self, "_setBodyMargin_", [(0)]);
  55. return self;}
  56. }),
  57. smalltalk.TabManager);
  58. smalltalk.addMethod(
  59. '_setBodyMargin_',
  60. smalltalk.method({
  61. selector: 'setBodyMargin:',
  62. fn: function (anInteger){
  63. var self=this;
  64. smalltalk.send(smalltalk.send(".jtalkBody", "_asJQuery", []), "_css_put_", [unescape("margin-bottom"), smalltalk.send(smalltalk.send(anInteger, "_asString", []), "__comma", ["px"])]);
  65. return self;}
  66. }),
  67. smalltalk.TabManager);
  68. smalltalk.addMethod(
  69. '_onResize_',
  70. smalltalk.method({
  71. selector: 'onResize:',
  72. fn: function (aBlock){
  73. var self=this;
  74. jQuery('#jtalk').resizable({
  75. handles: 'n',
  76. resize: aBlock,
  77. minHeight: 230
  78. });
  79. return self;}
  80. }),
  81. smalltalk.TabManager);
  82. smalltalk.addMethod(
  83. '_onWindowResize_',
  84. smalltalk.method({
  85. selector: 'onWindowResize:',
  86. fn: function (aBlock){
  87. var self=this;
  88. jQuery(window).resize(aBlock);
  89. return self;}
  90. }),
  91. smalltalk.TabManager);
  92. smalltalk.addMethod(
  93. '_open',
  94. smalltalk.method({
  95. selector: 'open',
  96. fn: function (){
  97. var self=this;
  98. ((($receiver = self['@opened']).klass === smalltalk.Boolean) ? (! $receiver ? (function(){smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_addClass_", ["jtalkBody"]);smalltalk.send(smalltalk.send(unescape("%23jtalk"), "_asJQuery", []), "_show", []);smalltalk.send(smalltalk.send(self['@ul'], "_asJQuery", []), "_show", []);smalltalk.send(self, "_updateBodyMargin", []);smalltalk.send(self['@selectedTab'], "_show", []);return self['@opened']=true;})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_addClass_", ["jtalkBody"]);smalltalk.send(smalltalk.send(unescape("%23jtalk"), "_asJQuery", []), "_show", []);smalltalk.send(smalltalk.send(self['@ul'], "_asJQuery", []), "_show", []);smalltalk.send(self, "_updateBodyMargin", []);smalltalk.send(self['@selectedTab'], "_show", []);return self['@opened']=true;})]));
  99. return self;}
  100. }),
  101. smalltalk.TabManager);
  102. smalltalk.addMethod(
  103. '_close',
  104. smalltalk.method({
  105. selector: 'close',
  106. fn: function (){
  107. var self=this;
  108. ((($receiver = self['@opened']).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(smalltalk.send(unescape("%23jtalk"), "_asJQuery", []), "_hide", []);smalltalk.send(smalltalk.send(self['@ul'], "_asJQuery", []), "_hide", []);smalltalk.send(self['@selectedTab'], "_hide", []);smalltalk.send(self, "_removeBodyMargin", []);smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_removeClass_", ["jtalkBody"]);return self['@opened']=false;})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(smalltalk.send(unescape("%23jtalk"), "_asJQuery", []), "_hide", []);smalltalk.send(smalltalk.send(self['@ul'], "_asJQuery", []), "_hide", []);smalltalk.send(self['@selectedTab'], "_hide", []);smalltalk.send(self, "_removeBodyMargin", []);smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_removeClass_", ["jtalkBody"]);return self['@opened']=false;})]));
  109. return self;}
  110. }),
  111. smalltalk.TabManager);
  112. smalltalk.addMethod(
  113. '_newBrowserTab',
  114. smalltalk.method({
  115. selector: 'newBrowserTab',
  116. fn: function (){
  117. var self=this;
  118. smalltalk.send((smalltalk.Browser || Browser), "_open", []);
  119. return self;}
  120. }),
  121. smalltalk.TabManager);
  122. smalltalk.addMethod(
  123. '_selectTab_',
  124. smalltalk.method({
  125. selector: 'selectTab:',
  126. fn: function (aWidget){
  127. var self=this;
  128. smalltalk.send(self, "_open", []);
  129. self['@selectedTab']=aWidget;
  130. smalltalk.send(smalltalk.send(self, "_tabs", []), "_do_", [(function(each){return smalltalk.send(each, "_hide", []);})]);
  131. smalltalk.send(aWidget, "_show", []);
  132. smalltalk.send(self, "_update", []);
  133. return self;}
  134. }),
  135. smalltalk.TabManager);
  136. smalltalk.addMethod(
  137. '_closeTab_',
  138. smalltalk.method({
  139. selector: 'closeTab:',
  140. fn: function (aWidget){
  141. var self=this;
  142. smalltalk.send(self, "_removeTab_", [aWidget]);
  143. smalltalk.send(self, "_selectTab_", [smalltalk.send(smalltalk.send(self, "_tabs", []), "_last", [])]);
  144. smalltalk.send(aWidget, "_remove", []);
  145. smalltalk.send(self, "_update", []);
  146. return self;}
  147. }),
  148. smalltalk.TabManager);
  149. smalltalk.addMethod(
  150. '_search_',
  151. smalltalk.method({
  152. selector: 'search:',
  153. fn: function (aString){
  154. var self=this;
  155. var searchedClass=nil;
  156. searchedClass=smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_at_", [aString]);
  157. ((($receiver = smalltalk.send(searchedClass, "_isClass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send((smalltalk.Browser || Browser), "_openOn_", [searchedClass]);})() : (function(){return smalltalk.send((smalltalk.ReferencesBrowser || ReferencesBrowser), "_search_", [aString]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send((smalltalk.Browser || Browser), "_openOn_", [searchedClass]);}), (function(){return smalltalk.send((smalltalk.ReferencesBrowser || ReferencesBrowser), "_search_", [aString]);})]));
  158. return self;}
  159. }),
  160. smalltalk.TabManager);
  161. smalltalk.addMethod(
  162. '_addTab_',
  163. smalltalk.method({
  164. selector: 'addTab:',
  165. fn: function (aWidget){
  166. var self=this;
  167. smalltalk.send(smalltalk.send(self, "_tabs", []), "_add_", [aWidget]);
  168. smalltalk.send(aWidget, "_appendToJQuery_", [smalltalk.send(unescape("%23jtalk"), "_asJQuery", [])]);
  169. smalltalk.send(aWidget, "_hide", []);
  170. return self;}
  171. }),
  172. smalltalk.TabManager);
  173. smalltalk.addMethod(
  174. '_removeTab_',
  175. smalltalk.method({
  176. selector: 'removeTab:',
  177. fn: function (aWidget){
  178. var self=this;
  179. smalltalk.send(smalltalk.send(self, "_tabs", []), "_remove_", [aWidget]);
  180. smalltalk.send(self, "_update", []);
  181. return self;}
  182. }),
  183. smalltalk.TabManager);
  184. smalltalk.addMethod(
  185. '_initialize',
  186. smalltalk.method({
  187. selector: 'initialize',
  188. fn: function (){
  189. var self=this;
  190. smalltalk.send(self, "_initialize", [], smalltalk.Widget);
  191. self['@opened']=true;
  192. smalltalk.send((function(html){return smalltalk.send(smalltalk.send(html, "_div", []), "_id_", ["jtalk"]);}), "_appendToJQuery_", [smalltalk.send("body", "_asJQuery", [])]);
  193. smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_addClass_", ["jtalkBody"]);
  194. smalltalk.send(self, "_appendToJQuery_", [smalltalk.send(unescape("%23jtalk"), "_asJQuery", [])]);
  195. (function($rec){smalltalk.send($rec, "_addTab_", [smalltalk.send((smalltalk.IDETranscript || IDETranscript), "_current", [])]);smalltalk.send($rec, "_addTab_", [smalltalk.send((smalltalk.Workspace || Workspace), "_new", [])]);return smalltalk.send($rec, "_addTab_", [smalltalk.send((smalltalk.TestRunner || TestRunner), "_new", [])]);})(self);
  196. smalltalk.send(self, "_selectTab_", [smalltalk.send(smalltalk.send(self, "_tabs", []), "_last", [])]);
  197. (function($rec){smalltalk.send($rec, "_onResize_", [(function(){return (function($rec){smalltalk.send($rec, "_updateBodyMargin", []);return smalltalk.send($rec, "_updatePosition", []);})(self);})]);return smalltalk.send($rec, "_onWindowResize_", [(function(){return smalltalk.send(self, "_updatePosition", []);})]);})(self);
  198. return self;}
  199. }),
  200. smalltalk.TabManager);
  201. smalltalk.addMethod(
  202. '_renderOn_',
  203. smalltalk.method({
  204. selector: 'renderOn:',
  205. fn: function (html){
  206. var self=this;
  207. smalltalk.send(smalltalk.send(html, "_div", []), "_id_", ["logo"]);
  208. smalltalk.send(self, "_renderToolbarOn_", [html]);
  209. self['@ul']=(function($rec){smalltalk.send($rec, "_id_", ["jtalkTabs"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_ul", []));
  210. smalltalk.send(self, "_renderTabs", []);
  211. return self;}
  212. }),
  213. smalltalk.TabManager);
  214. smalltalk.addMethod(
  215. '_renderTabFor_on_',
  216. smalltalk.method({
  217. selector: 'renderTabFor:on:',
  218. fn: function (aWidget, html){
  219. var self=this;
  220. var li=nil;
  221. li=smalltalk.send(html, "_li", []);
  222. ((($receiver = smalltalk.send(self['@selectedTab'], "__eq", [aWidget])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));
  223. (function($rec){smalltalk.send($rec, "_with_", [(function(){smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);(function($rec){smalltalk.send($rec, "_class_", ["mtab"]);return smalltalk.send($rec, "_with_", [(function(){((($receiver = smalltalk.send(aWidget, "_canBeClosed", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function($rec){smalltalk.send($rec, "_class_", ["close"]);smalltalk.send($rec, "_with_", ["x"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_closeTab_", [aWidget]);})]);})(smalltalk.send(html, "_span", []));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function($rec){smalltalk.send($rec, "_class_", ["close"]);smalltalk.send($rec, "_with_", ["x"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_closeTab_", [aWidget]);})]);})(smalltalk.send(html, "_span", []));})]));return smalltalk.send(smalltalk.send(html, "_span", []), "_with_", [smalltalk.send(self, "_labelFor_", [aWidget])]);})]);})(smalltalk.send(html, "_span", []));return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);})]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectTab_", [aWidget]);})]);})(li);
  224. return self;}
  225. }),
  226. smalltalk.TabManager);
  227. smalltalk.addMethod(
  228. '_renderTabs',
  229. smalltalk.method({
  230. selector: 'renderTabs',
  231. fn: function (){
  232. var self=this;
  233. smalltalk.send(self['@ul'], "_contents_", [(function(html){smalltalk.send(smalltalk.send(self, "_tabs", []), "_do_", [(function(each){return smalltalk.send(self, "_renderTabFor_on_", [each, html]);})]);return (function($rec){smalltalk.send($rec, "_class_", ["newtab"]);smalltalk.send($rec, "_with_", [(function(){smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);(function($rec){smalltalk.send($rec, "_class_", ["mtab"]);return smalltalk.send($rec, "_with_", [unescape("%20+%20")]);})(smalltalk.send(html, "_span", []));return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);})]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_newBrowserTab", []);})]);})(smalltalk.send(html, "_li", []));})]);
  234. return self;}
  235. }),
  236. smalltalk.TabManager);
  237. smalltalk.addMethod(
  238. '_renderToolbarOn_',
  239. smalltalk.method({
  240. selector: 'renderToolbarOn:',
  241. fn: function (html){
  242. var self=this;
  243. (function($rec){smalltalk.send($rec, "_id_", ["jt_toolbar"]);return smalltalk.send($rec, "_with_", [(function(){self['@input']=(function($rec){smalltalk.send($rec, "_class_", ["implementors"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_input", []));smalltalk.send(self['@input'], "_onKeyPress_", [(function(event){return ((($receiver = smalltalk.send(smalltalk.send(event, "_keyCode", []), "__eq", [(13)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_search_", [smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val", [])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_search_", [smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val", [])]);})]));})]);return (function($rec){smalltalk.send($rec, "_id_", ["jt_close"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_close", []);})]);})(smalltalk.send(html, "_div", []));})]);})(smalltalk.send(html, "_div", []));
  244. return self;}
  245. }),
  246. smalltalk.TabManager);
  247. smalltalk.addMethod(
  248. '_update',
  249. smalltalk.method({
  250. selector: 'update',
  251. fn: function (){
  252. var self=this;
  253. smalltalk.send(self, "_renderTabs", []);
  254. return self;}
  255. }),
  256. smalltalk.TabManager);
  257. smalltalk.TabManager.klass.iVarNames = ['current'];
  258. smalltalk.addMethod(
  259. '_current',
  260. smalltalk.method({
  261. selector: 'current',
  262. fn: function (){
  263. var self=this;
  264. return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return self['@current']=smalltalk.send(self, "_new", [], smalltalk.Widget.klass);})() : $receiver;
  265. return self;}
  266. }),
  267. smalltalk.TabManager.klass);
  268. smalltalk.addMethod(
  269. '_new',
  270. smalltalk.method({
  271. selector: 'new',
  272. fn: function (){
  273. var self=this;
  274. smalltalk.send(self, "_shouldNotImplement", []);
  275. return self;}
  276. }),
  277. smalltalk.TabManager.klass);
  278. smalltalk.addClass('TabWidget', smalltalk.Widget, ['div'], 'IDE');
  279. smalltalk.addMethod(
  280. '_label',
  281. smalltalk.method({
  282. selector: 'label',
  283. fn: function (){
  284. var self=this;
  285. smalltalk.send(self, "_subclassResponsibility", []);
  286. return self;}
  287. }),
  288. smalltalk.TabWidget);
  289. smalltalk.addMethod(
  290. '_open',
  291. smalltalk.method({
  292. selector: 'open',
  293. fn: function (){
  294. var self=this;
  295. smalltalk.send(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []), "_addTab_", [self]);
  296. smalltalk.send(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []), "_selectTab_", [self]);
  297. return self;}
  298. }),
  299. smalltalk.TabWidget);
  300. smalltalk.addMethod(
  301. '_show',
  302. smalltalk.method({
  303. selector: 'show',
  304. fn: function (){
  305. var self=this;
  306. smalltalk.send(smalltalk.send(self['@div'], "_asJQuery", []), "_show", []);
  307. return self;}
  308. }),
  309. smalltalk.TabWidget);
  310. smalltalk.addMethod(
  311. '_hide',
  312. smalltalk.method({
  313. selector: 'hide',
  314. fn: function (){
  315. var self=this;
  316. smalltalk.send(smalltalk.send(self['@div'], "_asJQuery", []), "_hide", []);
  317. return self;}
  318. }),
  319. smalltalk.TabWidget);
  320. smalltalk.addMethod(
  321. '_remove',
  322. smalltalk.method({
  323. selector: 'remove',
  324. fn: function (){
  325. var self=this;
  326. smalltalk.send(smalltalk.send(self['@div'], "_asJQuery", []), "_remove", []);
  327. return self;}
  328. }),
  329. smalltalk.TabWidget);
  330. smalltalk.addMethod(
  331. '_close',
  332. smalltalk.method({
  333. selector: 'close',
  334. fn: function (){
  335. var self=this;
  336. smalltalk.send(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []), "_closeTab_", [self]);
  337. return self;}
  338. }),
  339. smalltalk.TabWidget);
  340. smalltalk.addMethod(
  341. '_renderOn_',
  342. smalltalk.method({
  343. selector: 'renderOn:',
  344. fn: function (html){
  345. var self=this;
  346. self['@div']=(function($rec){smalltalk.send($rec, "_class_", ["jtalkTool"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_div", []));
  347. smalltalk.send(self, "_renderTab", []);
  348. return self;}
  349. }),
  350. smalltalk.TabWidget);
  351. smalltalk.addMethod(
  352. '_renderBoxOn_',
  353. smalltalk.method({
  354. selector: 'renderBoxOn:',
  355. fn: function (html){
  356. var self=this;
  357. return self;}
  358. }),
  359. smalltalk.TabWidget);
  360. smalltalk.addMethod(
  361. '_renderButtonsOn_',
  362. smalltalk.method({
  363. selector: 'renderButtonsOn:',
  364. fn: function (html){
  365. var self=this;
  366. return self;}
  367. }),
  368. smalltalk.TabWidget);
  369. smalltalk.addMethod(
  370. '_update',
  371. smalltalk.method({
  372. selector: 'update',
  373. fn: function (){
  374. var self=this;
  375. smalltalk.send(self, "_renderTab", []);
  376. return self;}
  377. }),
  378. smalltalk.TabWidget);
  379. smalltalk.addMethod(
  380. '_renderTab',
  381. smalltalk.method({
  382. selector: 'renderTab',
  383. fn: function (){
  384. var self=this;
  385. smalltalk.send(self['@div'], "_contents_", [(function(html){(function($rec){smalltalk.send($rec, "_class_", ["jt_box"]);return smalltalk.send($rec, "_with_", [(function(){return smalltalk.send(self, "_renderBoxOn_", [html]);})]);})(smalltalk.send(html, "_div", []));return (function($rec){smalltalk.send($rec, "_class_", ["jt_buttons"]);return smalltalk.send($rec, "_with_", [(function(){return smalltalk.send(self, "_renderButtonsOn_", [html]);})]);})(smalltalk.send(html, "_div", []));})]);
  386. return self;}
  387. }),
  388. smalltalk.TabWidget);
  389. smalltalk.addMethod(
  390. '_canBeClosed',
  391. smalltalk.method({
  392. selector: 'canBeClosed',
  393. fn: function (){
  394. var self=this;
  395. return false;
  396. return self;}
  397. }),
  398. smalltalk.TabWidget);
  399. smalltalk.addMethod(
  400. '_open',
  401. smalltalk.method({
  402. selector: 'open',
  403. fn: function (){
  404. var self=this;
  405. return smalltalk.send(smalltalk.send(self, "_new", []), "_open", []);
  406. return self;}
  407. }),
  408. smalltalk.TabWidget.klass);
  409. smalltalk.addClass('Workspace', smalltalk.TabWidget, ['sourceArea'], 'IDE');
  410. smalltalk.addMethod(
  411. '_label',
  412. smalltalk.method({
  413. selector: 'label',
  414. fn: function (){
  415. var self=this;
  416. return "Workspace";
  417. return self;}
  418. }),
  419. smalltalk.Workspace);
  420. smalltalk.addMethod(
  421. '_clearWorkspace',
  422. smalltalk.method({
  423. selector: 'clearWorkspace',
  424. fn: function (){
  425. var self=this;
  426. smalltalk.send(self['@sourceArea'], "_clear", []);
  427. return self;}
  428. }),
  429. smalltalk.Workspace);
  430. smalltalk.addMethod(
  431. '_doIt',
  432. smalltalk.method({
  433. selector: 'doIt',
  434. fn: function (){
  435. var self=this;
  436. smalltalk.send(self['@sourceArea'], "_doIt", []);
  437. return self;}
  438. }),
  439. smalltalk.Workspace);
  440. smalltalk.addMethod(
  441. '_printIt',
  442. smalltalk.method({
  443. selector: 'printIt',
  444. fn: function (){
  445. var self=this;
  446. smalltalk.send(self['@sourceArea'], "_printIt", []);
  447. return self;}
  448. }),
  449. smalltalk.Workspace);
  450. smalltalk.addMethod(
  451. '_inspectIt',
  452. smalltalk.method({
  453. selector: 'inspectIt',
  454. fn: function (){
  455. var self=this;
  456. smalltalk.send(self['@sourceArea'], "_inspectIt", []);
  457. return self;}
  458. }),
  459. smalltalk.Workspace);
  460. smalltalk.addMethod(
  461. '_fileIn',
  462. smalltalk.method({
  463. selector: 'fileIn',
  464. fn: function (){
  465. var self=this;
  466. smalltalk.send(self['@sourceArea'], "_fileIn", []);
  467. return self;}
  468. }),
  469. smalltalk.Workspace);
  470. smalltalk.addMethod(
  471. '_renderBoxOn_',
  472. smalltalk.method({
  473. selector: 'renderBoxOn:',
  474. fn: function (html){
  475. var self=this;
  476. self['@sourceArea']=smalltalk.send((smalltalk.SourceArea || SourceArea), "_new", []);
  477. smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);
  478. return self;}
  479. }),
  480. smalltalk.Workspace);
  481. smalltalk.addMethod(
  482. '_renderButtonsOn_',
  483. smalltalk.method({
  484. selector: 'renderButtonsOn:',
  485. fn: function (html){
  486. var self=this;
  487. (function($rec){smalltalk.send($rec, "_with_", ["DoIt"]);smalltalk.send($rec, "_title_", [unescape("ctrl+d")]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_doIt", []);})]);})(smalltalk.send(html, "_button", []));
  488. (function($rec){smalltalk.send($rec, "_with_", ["PrintIt"]);smalltalk.send($rec, "_title_", [unescape("ctrl+p")]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_printIt", []);})]);})(smalltalk.send(html, "_button", []));
  489. (function($rec){smalltalk.send($rec, "_with_", ["InspectIt"]);smalltalk.send($rec, "_title_", [unescape("ctrl+i")]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_inspectIt", []);})]);})(smalltalk.send(html, "_button", []));
  490. (function($rec){smalltalk.send($rec, "_with_", ["FileIn"]);smalltalk.send($rec, "_title_", [unescape("ctrl+f")]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_fileIn", []);})]);})(smalltalk.send(html, "_button", []));
  491. (function($rec){smalltalk.send($rec, "_with_", ["Clear workspace"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_clearWorkspace", []);})]);})(smalltalk.send(html, "_button", []));
  492. return self;}
  493. }),
  494. smalltalk.Workspace);
  495. smalltalk.addClass('Browser', smalltalk.TabWidget, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'packagesList', 'classesList', 'protocolsList', 'methodsList', 'sourceArea', 'tabsList', 'selectedTab', 'saveButton', 'classButtons', 'methodButtons', 'unsavedChanges'], 'IDE');
  496. smalltalk.addMethod(
  497. '_label',
  498. smalltalk.method({
  499. selector: 'label',
  500. fn: function (){
  501. var self=this;
  502. return (($receiver = self['@selectedClass']) == nil || $receiver == undefined) ? (function(){return unescape("Browser%20%28nil%29");})() : (function(){return smalltalk.send("Browser: ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])]);})();
  503. return self;}
  504. }),
  505. smalltalk.Browser);
  506. smalltalk.addMethod(
  507. '_packages',
  508. smalltalk.method({
  509. selector: 'packages',
  510. fn: function (){
  511. var self=this;
  512. var packages=nil;
  513. packages=smalltalk.send((smalltalk.Array || Array), "_new", []);
  514. smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "_do_", [(function(each){return ((($receiver = smalltalk.send(packages, "_includes_", [smalltalk.send(each, "_category", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(packages, "_add_", [smalltalk.send(each, "_category", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(packages, "_add_", [smalltalk.send(each, "_category", [])]);})]));})]);
  515. return smalltalk.send(packages, "_sort", []);
  516. return self;}
  517. }),
  518. smalltalk.Browser);
  519. smalltalk.addMethod(
  520. '_classes',
  521. smalltalk.method({
  522. selector: 'classes',
  523. fn: function (){
  524. var self=this;
  525. return 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 ((($receiver = smalltalk.send(a, "_name", [])).klass === smalltalk.Number) ? $receiver <smalltalk.send(b, "_name", []) : smalltalk.send($receiver, "__lt", [smalltalk.send(b, "_name", [])]));})]);
  526. return self;}
  527. }),
  528. smalltalk.Browser);
  529. smalltalk.addMethod(
  530. '_protocols',
  531. smalltalk.method({
  532. selector: 'protocols',
  533. fn: function (){
  534. var self=this;
  535. try{var klass=nil;
  536. (($receiver = self['@selectedClass']) != nil && $receiver != undefined) ? (function(){((($receiver = smalltalk.send(self['@selectedTab'], "__eq", ["comment"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '_protocols', fn: function(){return []}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function(){throw({name: 'stReturn', selector: '_protocols', fn: function(){return []}})})();})]));klass=((($receiver = smalltalk.send(self['@selectedTab'], "__eq", ["instance"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return self['@selectedClass'];})() : (function(){return smalltalk.send(self['@selectedClass'], "_class", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return self['@selectedClass'];}), (function(){return smalltalk.send(self['@selectedClass'], "_class", []);})]));((($receiver = smalltalk.send(smalltalk.send(klass, "_methodDictionary", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '_protocols', fn: function(){return smalltalk.send((smalltalk.Array || Array), "_with_", ["not yet classified"])}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function(){throw({name: 'stReturn', selector: '_protocols', fn: function(){return smalltalk.send((smalltalk.Array || Array), "_with_", ["not yet classified"])}})})();})]));return (function(){throw({name: 'stReturn', selector: '_protocols', fn: function(){return smalltalk.send(klass, "_protocols", [])}})})();})() : nil;
  537. (function(){throw({name: 'stReturn', selector: '_protocols', fn: function(){return smalltalk.send((smalltalk.Array || Array), "_new", [])}})})();
  538. return self;
  539. } catch(e) {if(e.name === 'stReturn' && e.selector === '_protocols'){return e.fn()} throw(e)}}
  540. }),
  541. smalltalk.Browser);
  542. smalltalk.addMethod(
  543. '_methods',
  544. smalltalk.method({
  545. selector: 'methods',
  546. fn: function (){
  547. var self=this;
  548. try{var klass=nil;
  549. ((($receiver = smalltalk.send(self['@selectedTab'], "__eq", ["comment"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '_methods', fn: function(){return []}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function(){throw({name: 'stReturn', selector: '_methods', fn: function(){return []}})})();})]));
  550. (($receiver = self['@selectedClass']) != nil && $receiver != undefined) ? (function(){return klass=((($receiver = smalltalk.send(self['@selectedTab'], "__eq", ["instance"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return self['@selectedClass'];})() : (function(){return smalltalk.send(self['@selectedClass'], "_class", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return self['@selectedClass'];}), (function(){return smalltalk.send(self['@selectedClass'], "_class", []);})]));})() : nil;
  551. (function(){throw({name: 'stReturn', selector: '_methods', fn: function(){return smalltalk.send((($receiver = self['@selectedProtocol']) == nil || $receiver == undefined) ? (function(){return (($receiver = klass) == nil || $receiver == undefined) ? (function(){return [];})() : (function(){return smalltalk.send(smalltalk.send(klass, "_methodDictionary", []), "_values", []);})();})() : (function(){return smalltalk.send(smalltalk.send(smalltalk.send(klass, "_methodDictionary", []), "_values", []), "_select_", [(function(each){return smalltalk.send(smalltalk.send(each, "_category", []), "__eq", [self['@selectedProtocol']]);})]);})(), "_sort_", [(function(a, b){return ((($receiver = smalltalk.send(a, "_selector", [])).klass === smalltalk.Number) ? $receiver <smalltalk.send(b, "_selector", []) : smalltalk.send($receiver, "__lt", [smalltalk.send(b, "_selector", [])]));})])}})})();
  552. return self;
  553. } catch(e) {if(e.name === 'stReturn' && e.selector === '_methods'){return e.fn()} throw(e)}}
  554. }),
  555. smalltalk.Browser);
  556. smalltalk.addMethod(
  557. '_source',
  558. smalltalk.method({
  559. selector: 'source',
  560. fn: function (){
  561. var self=this;
  562. try{((($receiver = smalltalk.send(self['@selectedTab'], "__eq", ["comment"])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '_source', fn: function(){return ((($receiver = smalltalk.send(smalltalk.send(self['@selectedProtocol'], "_notNil", []), "_or_", [(function(){return smalltalk.send(self['@selectedMethod'], "_notNil", []);})])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_declarationSource", []);})() : (function(){return smalltalk.send(self, "_methodSource", []);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self, "_declarationSource", []);}), (function(){return smalltalk.send(self, "_methodSource", []);})]))}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '_source', fn: function(){return ((($receiver = smalltalk.send(smalltalk.send(self['@selectedProtocol'], "_notNil", []), "_or_", [(function(){return smalltalk.send(self['@selectedMethod'], "_notNil", []);})])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_declarationSource", []);})() : (function(){return smalltalk.send(self, "_methodSource", []);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self, "_declarationSource", []);}), (function(){return smalltalk.send(self, "_methodSource", []);})]))}})})();})]));
  563. (function(){throw({name: 'stReturn', selector: '_source', fn: function(){return (($receiver = self['@selectedClass']) == nil || $receiver == undefined) ? (function(){return "";})() : (function(){return smalltalk.send(self, "_classCommentSource", []);})()}})})();
  564. return self;
  565. } catch(e) {if(e.name === 'stReturn' && e.selector === '_source'){return e.fn()} throw(e)}}
  566. }),
  567. smalltalk.Browser);
  568. smalltalk.addMethod(
  569. '_methodSource',
  570. smalltalk.method({
  571. selector: 'methodSource',
  572. fn: function (){
  573. var self=this;
  574. return (($receiver = self['@selectedMethod']) == nil || $receiver == undefined) ? (function(){return smalltalk.send(self, "_dummyMethodSource", []);})() : (function(){return smalltalk.send(self['@selectedMethod'], "_source", []);})();
  575. return self;}
  576. }),
  577. smalltalk.Browser);
  578. smalltalk.addMethod(
  579. '_dummyMethodSource',
  580. smalltalk.method({
  581. selector: 'dummyMethodSource',
  582. fn: function (){
  583. var self=this;
  584. return unescape("messageSelectorAndArgumentNames%0A%09%22comment%20stating%20purpose%20of%20message%22%0A%0A%09%7C%20temporary%20variable%20names%20%7C%0A%09statements");
  585. return self;}
  586. }),
  587. smalltalk.Browser);
  588. smalltalk.addMethod(
  589. '_declarationSource',
  590. smalltalk.method({
  591. selector: 'declarationSource',
  592. fn: function (){
  593. var self=this;
  594. return ((($receiver = smalltalk.send(self['@selectedTab'], "__eq", ["instance"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_classDeclarationSource", []);})() : (function(){return smalltalk.send(self, "_metaclassDeclarationSource", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_classDeclarationSource", []);}), (function(){return smalltalk.send(self, "_metaclassDeclarationSource", []);})]));
  595. return self;}
  596. }),
  597. smalltalk.Browser);
  598. smalltalk.addMethod(
  599. '_classDeclarationSource',
  600. smalltalk.method({
  601. selector: 'classDeclarationSource',
  602. fn: function (){
  603. var self=this;
  604. try{var stream=nil;
  605. stream=smalltalk.send("", "_writeStream", []);
  606. (($receiver = self['@selectedClass']) == nil || $receiver == undefined) ? (function(){return (function(){throw({name: 'stReturn', selector: '_classDeclarationSource', fn: function(){return smalltalk.send(self, "_classDeclarationTemplate", [])}})})();})() : $receiver;
  607. (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(self['@selectedClass'], "_superclass", []), "_asString", [])]);smalltalk.send($rec, "_nextPutAll_", [unescape("%20subclass%3A%20%23")]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self['@selectedClass'], "_name", [])]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send((smalltalk.String || String), "_lf", []), "__comma", [smalltalk.send((smalltalk.String || String), "_tab", [])])]);return smalltalk.send($rec, "_nextPutAll_", [unescape("instanceVariableNames%3A%20%27")]);})(stream);
  608. smalltalk.send(smalltalk.send(self['@selectedClass'], "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(stream, "_nextPutAll_", [each]);}), (function(){return smalltalk.send(stream, "_nextPutAll_", [" "]);})]);
  609. (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])]), "__comma", [smalltalk.send((smalltalk.String || String), "_tab", [])])]);smalltalk.send($rec, "_nextPutAll_", [unescape("package%3A%20%27")]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self['@selectedClass'], "_category", [])]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%27")]);})(stream);
  610. (function(){throw({name: 'stReturn', selector: '_classDeclarationSource', fn: function(){return smalltalk.send(stream, "_contents", [])}})})();
  611. return self;
  612. } catch(e) {if(e.name === 'stReturn' && e.selector === '_classDeclarationSource'){return e.fn()} throw(e)}}
  613. }),
  614. smalltalk.Browser);
  615. smalltalk.addMethod(
  616. '_metaclassDeclarationSource',
  617. smalltalk.method({
  618. selector: 'metaclassDeclarationSource',
  619. fn: function (){
  620. var self=this;
  621. var stream=nil;
  622. stream=smalltalk.send("", "_writeStream", []);
  623. (($receiver = self['@selectedClass']) != nil && $receiver != undefined) ? (function(){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self['@selectedClass'], "_asString", [])]);smalltalk.send($rec, "_nextPutAll_", [" class "]);return smalltalk.send($rec, "_nextPutAll_", [unescape("instanceVariableNames%3A%20%27")]);})(stream);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_", [" "]);})]);return smalltalk.send(stream, "_nextPutAll_", [unescape("%27")]);})() : nil;
  624. return smalltalk.send(stream, "_contents", []);
  625. return self;}
  626. }),
  627. smalltalk.Browser);
  628. smalltalk.addMethod(
  629. '_classCommentSource',
  630. smalltalk.method({
  631. selector: 'classCommentSource',
  632. fn: function (){
  633. var self=this;
  634. return smalltalk.send(self['@selectedClass'], "_comment", []);
  635. return self;}
  636. }),
  637. smalltalk.Browser);
  638. smalltalk.addMethod(
  639. '_selectedClass',
  640. smalltalk.method({
  641. selector: 'selectedClass',
  642. fn: function (){
  643. var self=this;
  644. return self['@selectedClass'];
  645. return self;}
  646. }),
  647. smalltalk.Browser);
  648. smalltalk.addMethod(
  649. '_classDeclarationTemplate',
  650. smalltalk.method({
  651. selector: 'classDeclarationTemplate',
  652. fn: function (){
  653. var self=this;
  654. return smalltalk.send(smalltalk.send(unescape("Object%20subclass%3A%20%23NameOfSubclass%0A%09instanceVariableNames%3A%20%27%27%0A%09package%3A%20%27"), "__comma", [smalltalk.send(self, "_selectedPackage", [])]), "__comma", [unescape("%27")]);
  655. return self;}
  656. }),
  657. smalltalk.Browser);
  658. smalltalk.addMethod(
  659. '_selectedPackage',
  660. smalltalk.method({
  661. selector: 'selectedPackage',
  662. fn: function (){
  663. var self=this;
  664. return self['@selectedPackage'];
  665. return self;}
  666. }),
  667. smalltalk.Browser);
  668. smalltalk.addMethod(
  669. '_disableSaveButton',
  670. smalltalk.method({
  671. selector: 'disableSaveButton',
  672. fn: function (){
  673. var self=this;
  674. (($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);})() : nil;
  675. self['@unsavedChanges']=false;
  676. return self;}
  677. }),
  678. smalltalk.Browser);
  679. smalltalk.addMethod(
  680. '_hideClassButtons',
  681. smalltalk.method({
  682. selector: 'hideClassButtons',
  683. fn: function (){
  684. var self=this;
  685. smalltalk.send(smalltalk.send(self['@classButtons'], "_asJQuery", []), "_hide", []);
  686. return self;}
  687. }),
  688. smalltalk.Browser);
  689. smalltalk.addMethod(
  690. '_showClassButtons',
  691. smalltalk.method({
  692. selector: 'showClassButtons',
  693. fn: function (){
  694. var self=this;
  695. smalltalk.send(smalltalk.send(self['@classButtons'], "_asJQuery", []), "_show", []);
  696. return self;}
  697. }),
  698. smalltalk.Browser);
  699. smalltalk.addMethod(
  700. '_hideMethodButtons',
  701. smalltalk.method({
  702. selector: 'hideMethodButtons',
  703. fn: function (){
  704. var self=this;
  705. smalltalk.send(smalltalk.send(self['@methodButtons'], "_asJQuery", []), "_hide", []);
  706. return self;}
  707. }),
  708. smalltalk.Browser);
  709. smalltalk.addMethod(
  710. '_showMethodButtons',
  711. smalltalk.method({
  712. selector: 'showMethodButtons',
  713. fn: function (){
  714. var self=this;
  715. smalltalk.send(smalltalk.send(self['@methodButtons'], "_asJQuery", []), "_show", []);
  716. return self;}
  717. }),
  718. smalltalk.Browser);
  719. smalltalk.addMethod(
  720. '_compile',
  721. smalltalk.method({
  722. selector: 'compile',
  723. fn: function (){
  724. var self=this;
  725. smalltalk.send(self, "_disableSaveButton", []);
  726. ((($receiver = smalltalk.send(self['@selectedTab'], "__eq", ["comment"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (($receiver = self['@selectedClass']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_compileClassComment", []);})() : nil;})() : (function(){return ((($receiver = smalltalk.send(smalltalk.send(self['@selectedProtocol'], "_notNil", []), "_or_", [(function(){return smalltalk.send(self['@selectedMethod'], "_notNil", []);})])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_compileDefinition", []);})() : (function(){return smalltalk.send(self, "_compileMethodDefinition", []);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self, "_compileDefinition", []);}), (function(){return smalltalk.send(self, "_compileMethodDefinition", []);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (($receiver = self['@selectedClass']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_compileClassComment", []);})() : nil;}), (function(){return ((($receiver = smalltalk.send(smalltalk.send(self['@selectedProtocol'], "_notNil", []), "_or_", [(function(){return smalltalk.send(self['@selectedMethod'], "_notNil", []);})])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_compileDefinition", []);})() : (function(){return smalltalk.send(self, "_compileMethodDefinition", []);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self, "_compileDefinition", []);}), (function(){return smalltalk.send(self, "_compileMethodDefinition", []);})]));})]));
  727. return self;}
  728. }),
  729. smalltalk.Browser);
  730. smalltalk.addMethod(
  731. '_compileClassComment',
  732. smalltalk.method({
  733. selector: 'compileClassComment',
  734. fn: function (){
  735. var self=this;
  736. smalltalk.send(self['@selectedClass'], "_comment_", [smalltalk.send(self['@sourceArea'], "_val", [])]);
  737. return self;}
  738. }),
  739. smalltalk.Browser);
  740. smalltalk.addMethod(
  741. '_compileMethodDefinition',
  742. smalltalk.method({
  743. selector: 'compileMethodDefinition',
  744. fn: function (){
  745. var self=this;
  746. ((($receiver = smalltalk.send(self['@selectedTab'], "__eq", ["instance"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_compileMethodDefinitionFor_", [self['@selectedClass']]);})() : (function(){return smalltalk.send(self, "_compileMethodDefinitionFor_", [smalltalk.send(self['@selectedClass'], "_class", [])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_compileMethodDefinitionFor_", [self['@selectedClass']]);}), (function(){return smalltalk.send(self, "_compileMethodDefinitionFor_", [smalltalk.send(self['@selectedClass'], "_class", [])]);})]));
  747. return self;}
  748. }),
  749. smalltalk.Browser);
  750. smalltalk.addMethod(
  751. '_compileMethodDefinitionFor_',
  752. smalltalk.method({
  753. selector: 'compileMethodDefinitionFor:',
  754. fn: function (aClass){
  755. var self=this;
  756. try{var compiler=nil;
  757. var method=nil;
  758. var source=nil;
  759. var node=nil;
  760. source=smalltalk.send(self['@sourceArea'], "_val", []);
  761. (($receiver = self['@selectedProtocol']) == nil || $receiver == undefined) ? (function(){return self['@selectedProtocol']=smalltalk.send(self['@selectedMethod'], "_category", []);})() : $receiver;
  762. compiler=smalltalk.send((smalltalk.Compiler || Compiler), "_new", []);
  763. smalltalk.send(compiler, "_source_", [source]);
  764. node=smalltalk.send(compiler, "_parse_", [source]);
  765. ((($receiver = smalltalk.send(node, "_isParseFailure", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '_compileMethodDefinitionFor_', fn: function(){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", [smalltalk.send(smalltalk.send(smalltalk.send("PARSE ERROR: ", "__comma", [smalltalk.send(node, "_reason", [])]), "__comma", [unescape("%2C%20position%3A%20")]), "__comma", [smalltalk.send(smalltalk.send(node, "_position", []), "_asString", [])])])}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function(){throw({name: 'stReturn', selector: '_compileMethodDefinitionFor_', fn: function(){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", [smalltalk.send(smalltalk.send(smalltalk.send("PARSE ERROR: ", "__comma", [smalltalk.send(node, "_reason", [])]), "__comma", [unescape("%2C%20position%3A%20")]), "__comma", [smalltalk.send(smalltalk.send(node, "_position", []), "_asString", [])])])}})})();})]));
  766. smalltalk.send(compiler, "_currentClass_", [aClass]);
  767. method=smalltalk.send(compiler, "_eval_", [smalltalk.send(compiler, "_compileNode_", [node])]);
  768. smalltalk.send(method, "_category_", [self['@selectedProtocol']]);
  769. smalltalk.send(smalltalk.send(compiler, "_unknownVariables", []), "_do_", [(function(each){return (($receiver = smalltalk.send((typeof window == 'undefined' ? nil : window), "_at_", [each])) == nil || $receiver == undefined) ? (function(){return ((($receiver = smalltalk.send((typeof window == 'undefined' ? nil : window), "_confirm_", [smalltalk.send(smalltalk.send(unescape("Declare%20%27"), "__comma", [each]), "__comma", [unescape("%27%20as%20instance%20variable%3F")])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_addInstanceVariableNamed_toClass_", [each, aClass]);return (function(){throw({name: 'stReturn', selector: '_compileMethodDefinitionFor_', fn: function(){return smalltalk.send(self, "_compileMethodDefinitionFor_", [aClass])}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_addInstanceVariableNamed_toClass_", [each, aClass]);return (function(){throw({name: 'stReturn', selector: '_compileMethodDefinitionFor_', fn: function(){return smalltalk.send(self, "_compileMethodDefinitionFor_", [aClass])}})})();})]));})() : $receiver;})]);
  770. smalltalk.send(aClass, "_addCompiledMethod_", [method]);
  771. smalltalk.send(compiler, "_setupClass_", [aClass]);
  772. smalltalk.send(self, "_updateMethodsList", []);
  773. smalltalk.send(self, "_selectMethod_", [method]);
  774. return self;
  775. } catch(e) {if(e.name === 'stReturn' && e.selector === '_compileMethodDefinitionFor_'){return e.fn()} throw(e)}}
  776. }),
  777. smalltalk.Browser);
  778. smalltalk.addMethod(
  779. '_compileDefinition',
  780. smalltalk.method({
  781. selector: 'compileDefinition',
  782. fn: function (){
  783. var self=this;
  784. var newClass=nil;
  785. newClass=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_loadExpression_", [smalltalk.send(self['@sourceArea'], "_val", [])]);
  786. (function($rec){smalltalk.send($rec, "_resetClassesList", []);smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);
  787. smalltalk.send(self, "_selectClass_", [newClass]);
  788. return self;}
  789. }),
  790. smalltalk.Browser);
  791. smalltalk.addMethod(
  792. '_cancelChanges',
  793. smalltalk.method({
  794. selector: 'cancelChanges',
  795. fn: function (){
  796. var self=this;
  797. return ((($receiver = self['@unsavedChanges']).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_confirm_", [unescape("Cancel%20changes%3F")]);})() : (function(){return true;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_confirm_", [unescape("Cancel%20changes%3F")]);}), (function(){return true;})]));
  798. return self;}
  799. }),
  800. smalltalk.Browser);
  801. smalltalk.addMethod(
  802. '_removeClass',
  803. smalltalk.method({
  804. selector: 'removeClass',
  805. fn: function (){
  806. var self=this;
  807. ((($receiver = smalltalk.send((typeof window == 'undefined' ? nil : window), "_confirm_", [smalltalk.send(smalltalk.send("Do you really want to remove ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])]), "__comma", [unescape("%3F")])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_removeClass_", [self['@selectedClass']]);smalltalk.send(self, "_resetClassesList", []);return smalltalk.send(self, "_selectClass_", [nil]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_removeClass_", [self['@selectedClass']]);smalltalk.send(self, "_resetClassesList", []);return smalltalk.send(self, "_selectClass_", [nil]);})]));
  808. return self;}
  809. }),
  810. smalltalk.Browser);
  811. smalltalk.addMethod(
  812. '_removeMethod',
  813. smalltalk.method({
  814. selector: 'removeMethod',
  815. fn: function (){
  816. var self=this;
  817. ((($receiver = smalltalk.send(self, "_cancelChanges", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send((typeof window == 'undefined' ? nil : window), "_confirm_", [smalltalk.send(smalltalk.send(unescape("Do%20you%20really%20want%20to%20remove%20%23"), "__comma", [smalltalk.send(self['@selectedMethod'], "_selector", [])]), "__comma", [unescape("%3F")])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){((($receiver = smalltalk.send(self['@selectedTab'], "__eq", ["instance"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);})() : (function(){return smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);}), (function(){return smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);})]));return smalltalk.send(self, "_selectMethod_", [nil]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){((($receiver = smalltalk.send(self['@selectedTab'], "__eq", ["instance"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);})() : (function(){return smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);}), (function(){return smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);})]));return smalltalk.send(self, "_selectMethod_", [nil]);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send((typeof window == 'undefined' ? nil : window), "_confirm_", [smalltalk.send(smalltalk.send(unescape("Do%20you%20really%20want%20to%20remove%20%23"), "__comma", [smalltalk.send(self['@selectedMethod'], "_selector", [])]), "__comma", [unescape("%3F")])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){((($receiver = smalltalk.send(self['@selectedTab'], "__eq", ["instance"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);})() : (function(){return smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);}), (function(){return smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);})]));return smalltalk.send(self, "_selectMethod_", [nil]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){((($receiver = smalltalk.send(self['@selectedTab'], "__eq", ["instance"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);})() : (function(){return smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);}), (function(){return smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);})]));return smalltalk.send(self, "_selectMethod_", [nil]);})]));})]));
  818. return self;}
  819. }),
  820. smalltalk.Browser);
  821. smalltalk.addMethod(
  822. '_setMethodProtocol_',
  823. smalltalk.method({
  824. selector: 'setMethodProtocol:',
  825. fn: function (aString){
  826. var self=this;
  827. ((($receiver = smalltalk.send(self, "_cancelChanges", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_protocols", []), "_includes_", [aString])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_addNewProtocol", []);})() : (function(){smalltalk.send(self['@selectedMethod'], "_category_", [aString]);self['@selectedProtocol']=aString;self['@selectedMethod']=self['@selectedMethod'];return (function($rec){smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self, "_addNewProtocol", []);}), (function(){smalltalk.send(self['@selectedMethod'], "_category_", [aString]);self['@selectedProtocol']=aString;self['@selectedMethod']=self['@selectedMethod'];return (function($rec){smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_protocols", []), "_includes_", [aString])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_addNewProtocol", []);})() : (function(){smalltalk.send(self['@selectedMethod'], "_category_", [aString]);self['@selectedProtocol']=aString;self['@selectedMethod']=self['@selectedMethod'];return (function($rec){smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self, "_addNewProtocol", []);}), (function(){smalltalk.send(self['@selectedMethod'], "_category_", [aString]);self['@selectedProtocol']=aString;self['@selectedMethod']=self['@selectedMethod'];return (function($rec){smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})]));})]));
  828. return self;}
  829. }),
  830. smalltalk.Browser);
  831. smalltalk.addMethod(
  832. '_addNewProtocol',
  833. smalltalk.method({
  834. selector: 'addNewProtocol',
  835. fn: function (){
  836. var self=this;
  837. var newProtocol=nil;
  838. newProtocol=smalltalk.send((typeof window == 'undefined' ? nil : window), "_prompt_", ["New method protocol"]);
  839. ((($receiver = smalltalk.send(smalltalk.send(newProtocol, "_notNil", []), "_and_", [(function(){return smalltalk.send(newProtocol, "_notEmpty", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@selectedMethod'], "_category_", [newProtocol]);return smalltalk.send(self, "_setMethodProtocol_", [newProtocol]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@selectedMethod'], "_category_", [newProtocol]);return smalltalk.send(self, "_setMethodProtocol_", [newProtocol]);})]));
  840. return self;}
  841. }),
  842. smalltalk.Browser);
  843. smalltalk.addMethod(
  844. '_selectCategory_',
  845. smalltalk.method({
  846. selector: 'selectCategory:',
  847. fn: function (aCategory){
  848. var self=this;
  849. ((($receiver = smalltalk.send(self, "_cancelChanges", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){self['@selectedPackage']=aCategory;self['@selectedClass']=self['@selectedProtocol']=self['@selectedMethod']=nil;smalltalk.send(self, "_resetClassesList", []);return (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);smalltalk.send($rec, "_updateClassesList", []);smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){self['@selectedPackage']=aCategory;self['@selectedClass']=self['@selectedProtocol']=self['@selectedMethod']=nil;smalltalk.send(self, "_resetClassesList", []);return (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);smalltalk.send($rec, "_updateClassesList", []);smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})]));
  850. return self;}
  851. }),
  852. smalltalk.Browser);
  853. smalltalk.addMethod(
  854. '_selectClass_',
  855. smalltalk.method({
  856. selector: 'selectClass:',
  857. fn: function (aClass){
  858. var self=this;
  859. ((($receiver = smalltalk.send(self, "_cancelChanges", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){self['@selectedClass']=aClass;self['@selectedProtocol']=self['@selectedMethod']=nil;return (function($rec){smalltalk.send($rec, "_updateClassesList", []);smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){self['@selectedClass']=aClass;self['@selectedProtocol']=self['@selectedMethod']=nil;return (function($rec){smalltalk.send($rec, "_updateClassesList", []);smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})]));
  860. return self;}
  861. }),
  862. smalltalk.Browser);
  863. smalltalk.addMethod(
  864. '_selectProtocol_',
  865. smalltalk.method({
  866. selector: 'selectProtocol:',
  867. fn: function (aString){
  868. var self=this;
  869. ((($receiver = smalltalk.send(self, "_cancelChanges", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){self['@selectedProtocol']=aString;self['@selectedMethod']=nil;return (function($rec){smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){self['@selectedProtocol']=aString;self['@selectedMethod']=nil;return (function($rec){smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})]));
  870. return self;}
  871. }),
  872. smalltalk.Browser);
  873. smalltalk.addMethod(
  874. '_selectMethod_',
  875. smalltalk.method({
  876. selector: 'selectMethod:',
  877. fn: function (aMethod){
  878. var self=this;
  879. ((($receiver = smalltalk.send(self, "_cancelChanges", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){self['@selectedMethod']=aMethod;return (function($rec){smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){self['@selectedMethod']=aMethod;return (function($rec){smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})]));
  880. return self;}
  881. }),
  882. smalltalk.Browser);
  883. smalltalk.addMethod(
  884. '_selectTab_',
  885. smalltalk.method({
  886. selector: 'selectTab:',
  887. fn: function (aString){
  888. var self=this;
  889. ((($receiver = smalltalk.send(self, "_cancelChanges", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){self['@selectedTab']=aString;smalltalk.send(self, "_selectProtocol_", [nil]);return smalltalk.send(self, "_updateTabsList", []);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){self['@selectedTab']=aString;smalltalk.send(self, "_selectProtocol_", [nil]);return smalltalk.send(self, "_updateTabsList", []);})]));
  890. return self;}
  891. }),
  892. smalltalk.Browser);
  893. smalltalk.addMethod(
  894. '_renameClass',
  895. smalltalk.method({
  896. selector: 'renameClass',
  897. fn: function (){
  898. var self=this;
  899. var newName=nil;
  900. newName=smalltalk.send((typeof window == 'undefined' ? nil : window), "_prompt_", [smalltalk.send("Rename class ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])])]);
  901. ((($receiver = smalltalk.send(smalltalk.send(newName, "_notNil", []), "_and_", [(function(){return smalltalk.send(newName, "_notEmpty", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@selectedClass'], "_rename_", [newName]);return (function($rec){smalltalk.send($rec, "_updateClassesList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@selectedClass'], "_rename_", [newName]);return (function($rec){smalltalk.send($rec, "_updateClassesList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})]));
  902. return self;}
  903. }),
  904. smalltalk.Browser);
  905. smalltalk.addMethod(
  906. '_addInstanceVariableNamed_toClass_',
  907. smalltalk.method({
  908. selector: 'addInstanceVariableNamed:toClass:',
  909. fn: function (aString, aClass){
  910. var self=this;
  911. smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_addSubclassOf_named_instanceVariableNames_package_", [smalltalk.send(aClass, "_superclass", []), smalltalk.send(aClass, "_name", []), (function($rec){smalltalk.send($rec, "_add_", [aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(smalltalk.send(aClass, "_instanceVariableNames", []), "_copy", [])), smalltalk.send(smalltalk.send(aClass, "_package", []), "_name", [])]);
  912. return self;}
  913. }),
  914. smalltalk.Browser);
  915. smalltalk.addMethod(
  916. '_searchReferencesOf_',
  917. smalltalk.method({
  918. selector: 'searchReferencesOf:',
  919. fn: function (aString){
  920. var self=this;
  921. smalltalk.send((smalltalk.ReferencesBrowser || ReferencesBrowser), "_search_", [aString]);
  922. return self;}
  923. }),
  924. smalltalk.Browser);
  925. smalltalk.addMethod(
  926. '_searchClassReferences',
  927. smalltalk.method({
  928. selector: 'searchClassReferences',
  929. fn: function (){
  930. var self=this;
  931. smalltalk.send((smalltalk.ReferencesBrowser || ReferencesBrowser), "_search_", [smalltalk.send(self['@selectedClass'], "_name", [])]);
  932. return self;}
  933. }),
  934. smalltalk.Browser);
  935. smalltalk.addMethod(
  936. '_search_',
  937. smalltalk.method({
  938. selector: 'search:',
  939. fn: function (aString){
  940. var self=this;
  941. ((($receiver = smalltalk.send(self, "_cancelChanges", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var searchedClass=nil;
  942. searchedClass=smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_at_", [aString]);return ((($receiver = smalltalk.send(searchedClass, "_isClass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_openOn_", [searchedClass]);})() : (function(){return smalltalk.send(self, "_searchReferencesOf_", [aString]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_openOn_", [searchedClass]);}), (function(){return smalltalk.send(self, "_searchReferencesOf_", [aString]);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var searchedClass=nil;
  943. searchedClass=smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_at_", [aString]);return ((($receiver = smalltalk.send(searchedClass, "_isClass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_openOn_", [searchedClass]);})() : (function(){return smalltalk.send(self, "_searchReferencesOf_", [aString]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_openOn_", [searchedClass]);}), (function(){return smalltalk.send(self, "_searchReferencesOf_", [aString]);})]));})]));
  944. return self;}
  945. }),
  946. smalltalk.Browser);
  947. smalltalk.addMethod(
  948. '_handleSourceAreaKeyDown_',
  949. smalltalk.method({
  950. selector: 'handleSourceAreaKeyDown:',
  951. fn: function (anEvent){
  952. var self=this;
  953. if(anEvent.ctrlKey) {
  954. if(anEvent.keyCode === 83) { //ctrl+s
  955. self._compile();
  956. anEvent.preventDefault();
  957. return false;
  958. }
  959. }
  960. ;
  961. return self;}
  962. }),
  963. smalltalk.Browser);
  964. smalltalk.addMethod(
  965. '_commitPackage',
  966. smalltalk.method({
  967. selector: 'commitPackage',
  968. fn: function (){
  969. var self=this;
  970. (($receiver = self['@selectedPackage']) != nil && $receiver != undefined) ? (function(){smalltalk.send((typeof jQuery == 'undefined' ? nil : jQuery), "_ajax_options_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_commitPathJs", []), "__comma", [unescape("/")]), "__comma", [self['@selectedPackage']]), "__comma", [".js"]), smalltalk.Dictionary._fromPairs_([smalltalk.send("type", "__minus_gt", ["PUT"]),smalltalk.send("data", "__minus_gt", [smalltalk.send(smalltalk.send((smalltalk.Exporter || Exporter), "_new", []), "_exportPackage_", [self['@selectedPackage']])]),smalltalk.send("error", "__minus_gt", [(function(){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", [unescape("Commit%20failed%21")]);})])])]);smalltalk.send((typeof jQuery == 'undefined' ? nil : jQuery), "_ajax_options_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_commitPathJs", []), "__comma", [unescape("/")]), "__comma", [self['@selectedPackage']]), "__comma", [".deploy.js"]), smalltalk.Dictionary._fromPairs_([smalltalk.send("type", "__minus_gt", ["PUT"]),smalltalk.send("data", "__minus_gt", [smalltalk.send(smalltalk.send((smalltalk.StrippedExporter || StrippedExporter), "_new", []), "_exportPackage_", [self['@selectedPackage']])]),smalltalk.send("error", "__minus_gt", [(function(){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", [unescape("Commit%20failed%21")]);})])])]);return smalltalk.send((typeof jQuery == 'undefined' ? nil : jQuery), "_ajax_options_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_commitPathSt", []), "__comma", [unescape("/")]), "__comma", [self['@selectedPackage']]), "__comma", [".st"]), smalltalk.Dictionary._fromPairs_([smalltalk.send("type", "__minus_gt", ["PUT"]),smalltalk.send("data", "__minus_gt", [smalltalk.send(smalltalk.send((smalltalk.ChunkExporter || ChunkExporter), "_new", []), "_exportPackage_", [self['@selectedPackage']])]),smalltalk.send("error", "__minus_gt", [(function(){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", [unescape("Commit%20failed%21")]);})])])]);})() : nil;
  971. return self;}
  972. }),
  973. smalltalk.Browser);
  974. smalltalk.addMethod(
  975. '_renamePackage',
  976. smalltalk.method({
  977. selector: 'renamePackage',
  978. fn: function (){
  979. var self=this;
  980. var newName=nil;
  981. newName=smalltalk.send((typeof window == 'undefined' ? nil : window), "_prompt_", [smalltalk.send("Rename package ", "__comma", [self['@selectedPackage']])]);
  982. (($receiver = newName) != nil && $receiver != undefined) ? (function(){return ((($receiver = smalltalk.send(newName, "_notEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_renamePackage_to_", [self['@selectedPackage'], newName]);return smalltalk.send(self, "_updateCategoriesList", []);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_renamePackage_to_", [self['@selectedPackage'], newName]);return smalltalk.send(self, "_updateCategoriesList", []);})]));})() : nil;
  983. return self;}
  984. }),
  985. smalltalk.Browser);
  986. smalltalk.addMethod(
  987. '_removePackage',
  988. smalltalk.method({
  989. selector: 'removePackage',
  990. fn: function (){
  991. var self=this;
  992. ((($receiver = smalltalk.send((typeof window == 'undefined' ? nil : window), "_confirm_", [smalltalk.send(smalltalk.send("Do you really want to remove the whole package ", "__comma", [self['@selectedPackage']]), "__comma", [unescape("%20with%20all%20its%20classes%3F")])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_removePackage_", [self['@selectedPackage']]);return smalltalk.send(self, "_updateCategoriesList", []);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_removePackage_", [self['@selectedPackage']]);return smalltalk.send(self, "_updateCategoriesList", []);})]));
  993. return self;}
  994. }),
  995. smalltalk.Browser);
  996. smalltalk.addMethod(
  997. '_commitPackageToLocalStorage',
  998. smalltalk.method({
  999. selector: 'commitPackageToLocalStorage',
  1000. fn: function (){
  1001. var self=this;
  1002. var key=nil;
  1003. var sourceCode=nil;
  1004. (($receiver = self['@selectedPackage']) != nil && $receiver != undefined) ? (function(){key=smalltalk.send("smalltalk.packages.", "__comma", [self['@selectedPackage']]);sourceCode=smalltalk.send(smalltalk.send((smalltalk.Exporter || Exporter), "_new", []), "_exportPackage_", [self['@selectedPackage']]);return localStorage[key] = sourceCode;})() : nil;
  1005. return self;}
  1006. }),
  1007. smalltalk.Browser);
  1008. smalltalk.addMethod(
  1009. '_addNewClass',
  1010. smalltalk.method({
  1011. selector: 'addNewClass',
  1012. fn: function (){
  1013. var self=this;
  1014. var className=nil;
  1015. className=smalltalk.send((typeof window == 'undefined' ? nil : window), "_prompt_", ["New class"]);
  1016. ((($receiver = smalltalk.send(smalltalk.send(className, "_notNil", []), "_and_", [(function(){return smalltalk.send(className, "_notEmpty", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send((smalltalk.Object || Object), "_subclass_instanceVariableNames_package_", [className, "", smalltalk.send(self, "_selectedPackage", [])]);(function($rec){smalltalk.send($rec, "_resetClassesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);return smalltalk.send(self, "_selectClass_", [smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_at_", [className])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send((smalltalk.Object || Object), "_subclass_instanceVariableNames_package_", [className, "", smalltalk.send(self, "_selectedPackage", [])]);(function($rec){smalltalk.send($rec, "_resetClassesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);return smalltalk.send(self, "_selectClass_", [smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_at_", [className])]);})]));
  1017. return self;}
  1018. }),
  1019. smalltalk.Browser);
  1020. smalltalk.addMethod(
  1021. '_initialize',
  1022. smalltalk.method({
  1023. selector: 'initialize',
  1024. fn: function (){
  1025. var self=this;
  1026. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  1027. self['@selectedTab']="instance";
  1028. self['@selectedPackage']=smalltalk.send(smalltalk.send(self, "_packages", []), "_first", []);
  1029. self['@unsavedChanges']=false;
  1030. return self;}
  1031. }),
  1032. smalltalk.Browser);
  1033. smalltalk.addMethod(
  1034. '_renderBoxOn_',
  1035. smalltalk.method({
  1036. selector: 'renderBoxOn:',
  1037. fn: function (html){
  1038. var self=this;
  1039. (function($rec){smalltalk.send($rec, "_renderTopPanelOn_", [html]);smalltalk.send($rec, "_renderTabsOn_", [html]);return smalltalk.send($rec, "_renderBottomPanelOn_", [html]);})(self);
  1040. return self;}
  1041. }),
  1042. smalltalk.Browser);
  1043. smalltalk.addMethod(
  1044. '_renderTopPanelOn_',
  1045. smalltalk.method({
  1046. selector: 'renderTopPanelOn:',
  1047. fn: function (html){
  1048. var self=this;
  1049. (function($rec){smalltalk.send($rec, "_class_", ["top"]);return smalltalk.send($rec, "_with_", [(function(){self['@packagesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column browser packages"]);(function($rec){smalltalk.send($rec, "_class_", ["jt_packagesButtons"]);return smalltalk.send($rec, "_with_", [(function(){(function($rec){smalltalk.send($rec, "_title_", ["Commit classes in this package to disk"]);smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_commitPackage", []);})]);return smalltalk.send($rec, "_with_", ["Commit"]);})(smalltalk.send(html, "_button", []));(function($rec){smalltalk.send($rec, "_title_", ["Commit classes in this package to local storage"]);smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_commitPackageToLocalStorage", []);})]);return smalltalk.send($rec, "_with_", ["Local"]);})(smalltalk.send(html, "_button", []));(function($rec){smalltalk.send($rec, "_title_", ["Rename package"]);smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_renamePackage", []);})]);return smalltalk.send($rec, "_with_", ["Rename"]);})(smalltalk.send(html, "_button", []));return (function($rec){smalltalk.send($rec, "_title_", ["Remove this package from the system"]);smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_removePackage", []);})]);return smalltalk.send($rec, "_with_", ["Remove"]);})(smalltalk.send(html, "_button", []));})]);})(smalltalk.send(html, "_div", []));self['@classesList']=smalltalk.send((smalltalk.ClassesList || ClassesList), "_on_", [self]);smalltalk.send(self['@classesList'], "_renderOn_", [html]);self['@protocolsList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column browser protocols"]);self['@methodsList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column browser methods"]);(function($rec){smalltalk.send($rec, "_updateCategoriesList", []);smalltalk.send($rec, "_updateClassesList", []);smalltalk.send($rec, "_updateProtocolsList", []);return smalltalk.send($rec, "_updateMethodsList", []);})(self);return smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["jt_clear"]);})]);})(smalltalk.send(html, "_div", []));
  1050. return self;}
  1051. }),
  1052. smalltalk.Browser);
  1053. smalltalk.addMethod(
  1054. '_renderTabsOn_',
  1055. smalltalk.method({
  1056. selector: 'renderTabsOn:',
  1057. fn: function (html){
  1058. var self=this;
  1059. self['@tabsList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_tabs jt_browser"]);
  1060. smalltalk.send(self, "_updateTabsList", []);
  1061. return self;}
  1062. }),
  1063. smalltalk.Browser);
  1064. smalltalk.addMethod(
  1065. '_renderBottomPanelOn_',
  1066. smalltalk.method({
  1067. selector: 'renderBottomPanelOn:',
  1068. fn: function (html){
  1069. var self=this;
  1070. (function($rec){smalltalk.send($rec, "_class_", ["jt_sourceCode"]);return smalltalk.send($rec, "_with_", [(function(){self['@sourceArea']=smalltalk.send((smalltalk.SourceArea || SourceArea), "_new", []);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", []);})]);})]);})(smalltalk.send(html, "_div", []));
  1071. return self;}
  1072. }),
  1073. smalltalk.Browser);
  1074. smalltalk.addMethod(
  1075. '_renderButtonsOn_',
  1076. smalltalk.method({
  1077. selector: 'renderButtonsOn:',
  1078. fn: function (html){
  1079. var self=this;
  1080. self['@saveButton']=smalltalk.send(html, "_button", []);
  1081. (function($rec){smalltalk.send($rec, "_with_", ["Save"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_compile", []);})]);})(self['@saveButton']);
  1082. self['@methodButtons']=smalltalk.send(html, "_span", []);
  1083. self['@classButtons']=smalltalk.send(html, "_span", []);
  1084. (function($rec){smalltalk.send($rec, "_class_", ["right"]);return smalltalk.send($rec, "_with_", [(function(){(function($rec){smalltalk.send($rec, "_with_", ["DoIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self['@sourceArea'], "_doIt", []);})]);})(smalltalk.send(html, "_button", []));(function($rec){smalltalk.send($rec, "_with_", ["PrintIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self['@sourceArea'], "_printIt", []);})]);})(smalltalk.send(html, "_button", []));return (function($rec){smalltalk.send($rec, "_with_", ["InspectIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self['@sourceArea'], "_inspectIt", []);})]);})(smalltalk.send(html, "_button", []));})]);})(smalltalk.send(html, "_div", []));
  1085. smalltalk.send(self, "_updateSourceAndButtons", []);
  1086. return self;}
  1087. }),
  1088. smalltalk.Browser);
  1089. smalltalk.addMethod(
  1090. '_canBeClosed',
  1091. smalltalk.method({
  1092. selector: 'canBeClosed',
  1093. fn: function (){
  1094. var self=this;
  1095. return true;
  1096. return self;}
  1097. }),
  1098. smalltalk.Browser);
  1099. smalltalk.addMethod(
  1100. '_updateCategoriesList',
  1101. smalltalk.method({
  1102. selector: 'updateCategoriesList',
  1103. fn: function (){
  1104. var self=this;
  1105. smalltalk.send(self['@packagesList'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(self, "_packages", []), "_do_", [(function(each){var li=nil;
  1106. var label=nil;
  1107. ((($receiver = smalltalk.send(each, "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return label="Unclassified";})() : (function(){return label=each;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return label="Unclassified";}), (function(){return label=each;})]));li=smalltalk.send(html, "_li", []);((($receiver = smalltalk.send(self['@selectedPackage'], "__eq", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));return (function($rec){smalltalk.send($rec, "_with_", [label]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectCategory_", [each]);})]);})(li);})]);})]);
  1108. return self;}
  1109. }),
  1110. smalltalk.Browser);
  1111. smalltalk.addMethod(
  1112. '_updateClassesList',
  1113. smalltalk.method({
  1114. selector: 'updateClassesList',
  1115. fn: function (){
  1116. var self=this;
  1117. smalltalk.send(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []), "_update", []);
  1118. smalltalk.send(self['@classesList'], "_updateNodes", []);
  1119. return self;}
  1120. }),
  1121. smalltalk.Browser);
  1122. smalltalk.addMethod(
  1123. '_updateProtocolsList',
  1124. smalltalk.method({
  1125. selector: 'updateProtocolsList',
  1126. fn: function (){
  1127. var self=this;
  1128. smalltalk.send(self['@protocolsList'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [(function(each){var li=nil;
  1129. li=smalltalk.send(html, "_li", []);((($receiver = smalltalk.send(self['@selectedProtocol'], "__eq", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));return (function($rec){smalltalk.send($rec, "_with_", [each]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectProtocol_", [each]);})]);})(li);})]);})]);
  1130. return self;}
  1131. }),
  1132. smalltalk.Browser);
  1133. smalltalk.addMethod(
  1134. '_updateMethodsList',
  1135. smalltalk.method({
  1136. selector: 'updateMethodsList',
  1137. fn: function (){
  1138. var self=this;
  1139. smalltalk.send(self['@methodsList'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(self, "_methods", []), "_do_", [(function(each){var li=nil;
  1140. li=smalltalk.send(html, "_li", []);((($receiver = smalltalk.send(self['@selectedMethod'], "__eq", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));return (function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(each, "_selector", [])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectMethod_", [each]);})]);})(li);})]);})]);
  1141. return self;}
  1142. }),
  1143. smalltalk.Browser);
  1144. smalltalk.addMethod(
  1145. '_updateTabsList',
  1146. smalltalk.method({
  1147. selector: 'updateTabsList',
  1148. fn: function (){
  1149. var self=this;
  1150. smalltalk.send(self['@tabsList'], "_contents_", [(function(html){var li=nil;
  1151. li=smalltalk.send(html, "_li", []);((($receiver = smalltalk.send(self['@selectedTab'], "__eq", ["instance"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));(function($rec){smalltalk.send($rec, "_with_", [(function(){smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);(function($rec){smalltalk.send($rec, "_class_", ["mtab"]);return smalltalk.send($rec, "_with_", ["Instance"]);})(smalltalk.send(html, "_span", []));return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);})]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectTab_", ["instance"]);})]);})(li);li=smalltalk.send(html, "_li", []);((($receiver = smalltalk.send(self['@selectedTab'], "__eq", ["class"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));(function($rec){smalltalk.send($rec, "_with_", [(function(){smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);(function($rec){smalltalk.send($rec, "_class_", ["mtab"]);return smalltalk.send($rec, "_with_", ["Class"]);})(smalltalk.send(html, "_span", []));return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);})]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectTab_", ["class"]);})]);})(li);li=smalltalk.send(html, "_li", []);((($receiver = smalltalk.send(self['@selectedTab'], "__eq", ["comment"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));return (function($rec){smalltalk.send($rec, "_with_", [(function(){smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);(function($rec){smalltalk.send($rec, "_class_", ["mtab"]);return smalltalk.send($rec, "_with_", ["Comment"]);})(smalltalk.send(html, "_span", []));return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);})]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectTab_", ["comment"]);})]);})(li);})]);
  1152. return self;}
  1153. }),
  1154. smalltalk.Browser);
  1155. smalltalk.addMethod(
  1156. '_updateSourceAndButtons',
  1157. smalltalk.method({
  1158. selector: 'updateSourceAndButtons',
  1159. fn: function (){
  1160. var self=this;
  1161. smalltalk.send(self, "_disableSaveButton", []);
  1162. smalltalk.send(self['@classButtons'], "_contents_", [(function(html){(function($rec){smalltalk.send($rec, "_title_", ["Create a new class"]);smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_addNewClass", []);})]);return smalltalk.send($rec, "_with_", ["New class"]);})(smalltalk.send(html, "_button", []));(function($rec){smalltalk.send($rec, "_with_", ["Rename class"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_renameClass", []);})]);})(smalltalk.send(html, "_button", []));(function($rec){smalltalk.send($rec, "_with_", ["Copy class"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_copyClass", []);})]);})(smalltalk.send(html, "_button", []));(function($rec){smalltalk.send($rec, "_with_", ["Remove class"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_removeClass", []);})]);})(smalltalk.send(html, "_button", []));return (function($rec){smalltalk.send($rec, "_with_", ["References"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_searchClassReferences", []);})]);})(smalltalk.send(html, "_button", []));})]);
  1163. smalltalk.send(self['@methodButtons'], "_contents_", [(function(html){var protocolSelect=nil;
  1164. var referencesSelect=nil;
  1165. (function($rec){smalltalk.send($rec, "_with_", ["Remove method"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_removeMethod", []);})]);})(smalltalk.send(html, "_button", []));protocolSelect=smalltalk.send(html, "_select", []);(function($rec){smalltalk.send($rec, "_onChange_", [(function(){return smalltalk.send(self, "_setMethodProtocol_", [smalltalk.send(smalltalk.send(protocolSelect, "_asJQuery", []), "_val", [])]);})]);return smalltalk.send($rec, "_with_", [(function(){(function($rec){smalltalk.send($rec, "_with_", ["Method protocol"]);return smalltalk.send($rec, "_at_put_", ["disabled", "disabled"]);})(smalltalk.send(html, "_option", []));(function($rec){smalltalk.send($rec, "_class_", ["important"]);return smalltalk.send($rec, "_with_", ["New..."]);})(smalltalk.send(html, "_option", []));return smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(html, "_option", []), "_with_", [each]);})]);})]);})(protocolSelect);return ((($receiver = smalltalk.send(self['@selectedMethod'], "_isNil", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){referencesSelect=smalltalk.send(html, "_select", []);return (function($rec){smalltalk.send($rec, "_onChange_", [(function(){return smalltalk.send(self, "_searchReferencesOf_", [smalltalk.send(smalltalk.send(referencesSelect, "_asJQuery", []), "_val", [])]);})]);return smalltalk.send($rec, "_with_", [(function(){(function($rec){smalltalk.send($rec, "_with_", ["References"]);return smalltalk.send($rec, "_at_put_", ["disabled", "disabled"]);})(smalltalk.send(html, "_option", []));(function($rec){smalltalk.send($rec, "_class_", ["important"]);return smalltalk.send($rec, "_with_", [smalltalk.send(self['@selectedMethod'], "_selector", [])]);})(smalltalk.send(html, "_option", []));return smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedMethod'], "_messageSends", []), "_sorted", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(html, "_option", []), "_with_", [each]);})]);})]);})(referencesSelect);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){referencesSelect=smalltalk.send(html, "_select", []);return (function($rec){smalltalk.send($rec, "_onChange_", [(function(){return smalltalk.send(self, "_searchReferencesOf_", [smalltalk.send(smalltalk.send(referencesSelect, "_asJQuery", []), "_val", [])]);})]);return smalltalk.send($rec, "_with_", [(function(){(function($rec){smalltalk.send($rec, "_with_", ["References"]);return smalltalk.send($rec, "_at_put_", ["disabled", "disabled"]);})(smalltalk.send(html, "_option", []));(function($rec){smalltalk.send($rec, "_class_", ["important"]);return smalltalk.send($rec, "_with_", [smalltalk.send(self['@selectedMethod'], "_selector", [])]);})(smalltalk.send(html, "_option", []));return smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedMethod'], "_messageSends", []), "_sorted", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(html, "_option", []), "_with_", [each]);})]);})]);})(referencesSelect);})]));})]);
  1166. ((($receiver = smalltalk.send(self['@selectedMethod'], "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_hideMethodButtons", []);return ((($receiver = smalltalk.send(smalltalk.send(self['@selectedClass'], "_isNil", []), "_or_", [(function(){return smalltalk.send(self['@selectedProtocol'], "_notNil", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_hideClassButtons", []);})() : (function(){return smalltalk.send(self, "_showClassButtons", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_hideClassButtons", []);}), (function(){return smalltalk.send(self, "_showClassButtons", []);})]));})() : (function(){smalltalk.send(self, "_hideClassButtons", []);return smalltalk.send(self, "_showMethodButtons", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(self, "_hideMethodButtons", []);return ((($receiver = smalltalk.send(smalltalk.send(self['@selectedClass'], "_isNil", []), "_or_", [(function(){return smalltalk.send(self['@selectedProtocol'], "_notNil", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_hideClassButtons", []);})() : (function(){return smalltalk.send(self, "_showClassButtons", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_hideClassButtons", []);}), (function(){return smalltalk.send(self, "_showClassButtons", []);})]));}), (function(){smalltalk.send(self, "_hideClassButtons", []);return smalltalk.send(self, "_showMethodButtons", []);})]));
  1167. smalltalk.send(self['@sourceArea'], "_val_", [smalltalk.send(self, "_source", [])]);
  1168. return self;}
  1169. }),
  1170. smalltalk.Browser);
  1171. smalltalk.addMethod(
  1172. '_updateStatus',
  1173. smalltalk.method({
  1174. selector: 'updateStatus',
  1175. fn: function (){
  1176. var self=this;
  1177. ((($receiver = smalltalk.send(smalltalk.send(self['@sourceArea'], "_val", []), "__eq", [smalltalk.send(self, "_source", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){(($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);})() : nil;return self['@unsavedChanges']=false;})() : (function(){(($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_removeAt_", ["disabled"]);})() : nil;return self['@unsavedChanges']=true;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){(($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);})() : nil;return self['@unsavedChanges']=false;}), (function(){(($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_removeAt_", ["disabled"]);})() : nil;return self['@unsavedChanges']=true;})]));
  1178. return self;}
  1179. }),
  1180. smalltalk.Browser);
  1181. smalltalk.addMethod(
  1182. '_resetClassesList',
  1183. smalltalk.method({
  1184. selector: 'resetClassesList',
  1185. fn: function (){
  1186. var self=this;
  1187. smalltalk.send(self['@classesList'], "_resetNodes", []);
  1188. return self;}
  1189. }),
  1190. smalltalk.Browser);
  1191. smalltalk.addMethod(
  1192. '_copyClass',
  1193. smalltalk.method({
  1194. selector: 'copyClass',
  1195. fn: function (){
  1196. var self=this;
  1197. var className=nil;
  1198. className=smalltalk.send((typeof window == 'undefined' ? nil : window), "_prompt_", ["Copy class"]);
  1199. ((($receiver = smalltalk.send(smalltalk.send(className, "_notNil", []), "_and_", [(function(){return smalltalk.send(className, "_notEmpty", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_copyClass_named_", [smalltalk.send(self, "_selectedClass", []), className]);(function($rec){smalltalk.send($rec, "_resetClassesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);return smalltalk.send(self, "_selectClass_", [smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_at_", [className])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_copyClass_named_", [smalltalk.send(self, "_selectedClass", []), className]);(function($rec){smalltalk.send($rec, "_resetClassesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);return smalltalk.send(self, "_selectClass_", [smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_at_", [className])]);})]));
  1200. return self;}
  1201. }),
  1202. smalltalk.Browser);
  1203. smalltalk.addMethod(
  1204. '_commitPathJs',
  1205. smalltalk.method({
  1206. selector: 'commitPathJs',
  1207. fn: function (){
  1208. var self=this;
  1209. return "js";
  1210. return self;}
  1211. }),
  1212. smalltalk.Browser.klass);
  1213. smalltalk.addMethod(
  1214. '_commitPathSt',
  1215. smalltalk.method({
  1216. selector: 'commitPathSt',
  1217. fn: function (){
  1218. var self=this;
  1219. return "st";
  1220. return self;}
  1221. }),
  1222. smalltalk.Browser.klass);
  1223. smalltalk.addMethod(
  1224. '_openOn_',
  1225. smalltalk.method({
  1226. selector: 'openOn:',
  1227. fn: function (aClass){
  1228. var self=this;
  1229. return (function($rec){smalltalk.send($rec, "_open", []);smalltalk.send($rec, "_selectCategory_", [smalltalk.send(aClass, "_category", [])]);return smalltalk.send($rec, "_selectClass_", [aClass]);})(smalltalk.send(self, "_new", []));
  1230. return self;}
  1231. }),
  1232. smalltalk.Browser.klass);
  1233. smalltalk.addMethod(
  1234. '_open',
  1235. smalltalk.method({
  1236. selector: 'open',
  1237. fn: function (){
  1238. var self=this;
  1239. smalltalk.send(smalltalk.send(self, "_new", []), "_open", []);
  1240. return self;}
  1241. }),
  1242. smalltalk.Browser.klass);
  1243. smalltalk.addClass('Inspector', smalltalk.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  1244. smalltalk.addMethod(
  1245. '_label',
  1246. smalltalk.method({
  1247. selector: 'label',
  1248. fn: function (){
  1249. var self=this;
  1250. return (($receiver = self['@label']) == nil || $receiver == undefined) ? (function(){return unescape("Inspector%20%28nil%29");})() : $receiver;
  1251. return self;}
  1252. }),
  1253. smalltalk.Inspector);
  1254. smalltalk.addMethod(
  1255. '_variables',
  1256. smalltalk.method({
  1257. selector: 'variables',
  1258. fn: function (){
  1259. var self=this;
  1260. return self['@variables'];
  1261. return self;}
  1262. }),
  1263. smalltalk.Inspector);
  1264. smalltalk.addMethod(
  1265. '_setVariables_',
  1266. smalltalk.method({
  1267. selector: 'setVariables:',
  1268. fn: function (aCollection){
  1269. var self=this;
  1270. self['@variables']=aCollection;
  1271. return self;}
  1272. }),
  1273. smalltalk.Inspector);
  1274. smalltalk.addMethod(
  1275. '_setLabel_',
  1276. smalltalk.method({
  1277. selector: 'setLabel:',
  1278. fn: function (aString){
  1279. var self=this;
  1280. self['@label']=aString;
  1281. return self;}
  1282. }),
  1283. smalltalk.Inspector);
  1284. smalltalk.addMethod(
  1285. '_selectedVariable',
  1286. smalltalk.method({
  1287. selector: 'selectedVariable',
  1288. fn: function (){
  1289. var self=this;
  1290. return self['@selectedVariable'];
  1291. return self;}
  1292. }),
  1293. smalltalk.Inspector);
  1294. smalltalk.addMethod(
  1295. '_selectedVariable_',
  1296. smalltalk.method({
  1297. selector: 'selectedVariable:',
  1298. fn: function (aString){
  1299. var self=this;
  1300. self['@selectedVariable']=aString;
  1301. return self;}
  1302. }),
  1303. smalltalk.Inspector);
  1304. smalltalk.addMethod(
  1305. '_sourceArea',
  1306. smalltalk.method({
  1307. selector: 'sourceArea',
  1308. fn: function (){
  1309. var self=this;
  1310. return self['@sourceArea'];
  1311. return self;}
  1312. }),
  1313. smalltalk.Inspector);
  1314. smalltalk.addMethod(
  1315. '_inspect_',
  1316. smalltalk.method({
  1317. selector: 'inspect:',
  1318. fn: function (anObject){
  1319. var self=this;
  1320. self['@object']=anObject;
  1321. self['@variables']=[];
  1322. smalltalk.send(self['@object'], "_inspectOn_", [self]);
  1323. return self;}
  1324. }),
  1325. smalltalk.Inspector);
  1326. smalltalk.addMethod(
  1327. '_dive',
  1328. smalltalk.method({
  1329. selector: 'dive',
  1330. fn: function (){
  1331. var self=this;
  1332. smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_inspect", []);
  1333. return self;}
  1334. }),
  1335. smalltalk.Inspector);
  1336. smalltalk.addMethod(
  1337. '_refresh',
  1338. smalltalk.method({
  1339. selector: 'refresh',
  1340. fn: function (){
  1341. var self=this;
  1342. (function($rec){smalltalk.send($rec, "_inspect_", [self['@object']]);smalltalk.send($rec, "_updateVariablesList", []);return smalltalk.send($rec, "_updateValueTextarea", []);})(self);
  1343. return self;}
  1344. }),
  1345. smalltalk.Inspector);
  1346. smalltalk.addMethod(
  1347. '_renderBoxOn_',
  1348. smalltalk.method({
  1349. selector: 'renderBoxOn:',
  1350. fn: function (html){
  1351. var self=this;
  1352. (function($rec){smalltalk.send($rec, "_renderTopPanelOn_", [html]);return smalltalk.send($rec, "_renderBottomPanelOn_", [html]);})(self);
  1353. return self;}
  1354. }),
  1355. smalltalk.Inspector);
  1356. smalltalk.addMethod(
  1357. '_renderTopPanelOn_',
  1358. smalltalk.method({
  1359. selector: 'renderTopPanelOn:',
  1360. fn: function (html){
  1361. var self=this;
  1362. (function($rec){smalltalk.send($rec, "_class_", ["top"]);return smalltalk.send($rec, "_with_", [(function(){self['@variablesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column variables"]);self['@valueTextarea']=(function($rec){smalltalk.send($rec, "_class_", ["jt_column value"]);return smalltalk.send($rec, "_at_put_", ["readonly", "readonly"]);})(smalltalk.send(html, "_textarea", []));(function($rec){smalltalk.send($rec, "_class_", ["jt_tabs inspector"]);return smalltalk.send($rec, "_with_", [(function(){(function($rec){smalltalk.send($rec, "_class_", ["jt_button inspector refresh"]);smalltalk.send($rec, "_with_", ["Refresh"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_refresh", []);})]);})(smalltalk.send(html, "_button", []));return self['@diveButton']=(function($rec){smalltalk.send($rec, "_class_", ["jt_button inspector dive"]);smalltalk.send($rec, "_with_", ["Dive"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_dive", []);})]);})(smalltalk.send(html, "_button", []));})]);})(smalltalk.send(html, "_div", []));return smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["jt_clear"]);})]);})(smalltalk.send(html, "_div", []));
  1363. (function($rec){smalltalk.send($rec, "_updateVariablesList", []);return smalltalk.send($rec, "_updateValueTextarea", []);})(self);
  1364. return self;}
  1365. }),
  1366. smalltalk.Inspector);
  1367. smalltalk.addMethod(
  1368. '_renderBottomPanelOn_',
  1369. smalltalk.method({
  1370. selector: 'renderBottomPanelOn:',
  1371. fn: function (html){
  1372. var self=this;
  1373. (function($rec){smalltalk.send($rec, "_class_", ["jt_sourceCode"]);return smalltalk.send($rec, "_with_", [(function(){self['@sourceArea']=(function($rec){smalltalk.send($rec, "_receiver_", [self['@object']]);smalltalk.send($rec, "_onDoIt_", [(function(){return smalltalk.send(self, "_refresh", []);})]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.SourceArea || SourceArea), "_new", []));return smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);})]);})(smalltalk.send(html, "_div", []));
  1374. return self;}
  1375. }),
  1376. smalltalk.Inspector);
  1377. smalltalk.addMethod(
  1378. '_renderButtonsOn_',
  1379. smalltalk.method({
  1380. selector: 'renderButtonsOn:',
  1381. fn: function (html){
  1382. var self=this;
  1383. (function($rec){smalltalk.send($rec, "_with_", ["DoIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_doIt", []);})]);})(smalltalk.send(html, "_button", []));
  1384. (function($rec){smalltalk.send($rec, "_with_", ["PrintIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_printIt", []);})]);})(smalltalk.send(html, "_button", []));
  1385. (function($rec){smalltalk.send($rec, "_with_", ["InspectIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_inspectIt", []);})]);})(smalltalk.send(html, "_button", []));
  1386. smalltalk.send(self, "_updateButtons", []);
  1387. return self;}
  1388. }),
  1389. smalltalk.Inspector);
  1390. smalltalk.addMethod(
  1391. '_canBeClosed',
  1392. smalltalk.method({
  1393. selector: 'canBeClosed',
  1394. fn: function (){
  1395. var self=this;
  1396. return true;
  1397. return self;}
  1398. }),
  1399. smalltalk.Inspector);
  1400. smalltalk.addMethod(
  1401. '_updateVariablesList',
  1402. smalltalk.method({
  1403. selector: 'updateVariablesList',
  1404. fn: function (){
  1405. var self=this;
  1406. smalltalk.send(self['@variablesList'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_keys", []), "_do_", [(function(each){var li=nil;
  1407. li=smalltalk.send(html, "_li", []);(function($rec){smalltalk.send($rec, "_with_", [each]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectVariable_", [each]);})]);})(li);return ((($receiver = smalltalk.send(smalltalk.send(self, "_selectedVariable", []), "__eq", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));})]);})]);
  1408. return self;}
  1409. }),
  1410. smalltalk.Inspector);
  1411. smalltalk.addMethod(
  1412. '_selectVariable_',
  1413. smalltalk.method({
  1414. selector: 'selectVariable:',
  1415. fn: function (aString){
  1416. var self=this;
  1417. smalltalk.send(self, "_selectedVariable_", [aString]);
  1418. (function($rec){smalltalk.send($rec, "_updateVariablesList", []);smalltalk.send($rec, "_updateValueTextarea", []);return smalltalk.send($rec, "_updateButtons", []);})(self);
  1419. return self;}
  1420. }),
  1421. smalltalk.Inspector);
  1422. smalltalk.addMethod(
  1423. '_updateValueTextarea',
  1424. smalltalk.method({
  1425. selector: 'updateValueTextarea',
  1426. fn: function (){
  1427. var self=this;
  1428. smalltalk.send(smalltalk.send(self['@valueTextarea'], "_asJQuery", []), "_val_", [((($receiver = smalltalk.send(smalltalk.send(self, "_selectedVariable", []), "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "";})() : (function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_printString", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "";}), (function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_printString", []);})]))]);
  1429. return self;}
  1430. }),
  1431. smalltalk.Inspector);
  1432. smalltalk.addMethod(
  1433. '_updateButtons',
  1434. smalltalk.method({
  1435. selector: 'updateButtons',
  1436. fn: function (){
  1437. var self=this;
  1438. ((($receiver = 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", []);})])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self['@diveButton'], "_at_put_", ["disabled", true]);})() : (function(){return smalltalk.send(self['@diveButton'], "_removeAt_", ["disabled"]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self['@diveButton'], "_at_put_", ["disabled", true]);}), (function(){return smalltalk.send(self['@diveButton'], "_removeAt_", ["disabled"]);})]));
  1439. return self;}
  1440. }),
  1441. smalltalk.Inspector);
  1442. smalltalk.addMethod(
  1443. '_on_',
  1444. smalltalk.method({
  1445. selector: 'on:',
  1446. fn: function (anObject){
  1447. var self=this;
  1448. return (function($rec){smalltalk.send($rec, "_inspect_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  1449. return self;}
  1450. }),
  1451. smalltalk.Inspector.klass);
  1452. smalltalk.addClass('ReferencesBrowser', smalltalk.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList'], 'IDE');
  1453. smalltalk.addMethod(
  1454. '_implementors',
  1455. smalltalk.method({
  1456. selector: 'implementors',
  1457. fn: function (){
  1458. var self=this;
  1459. return (($receiver = self['@implementors']) == nil || $receiver == undefined) ? (function(){return self['@implementors']=smalltalk.send((smalltalk.Array || Array), "_new", []);})() : $receiver;
  1460. return self;}
  1461. }),
  1462. smalltalk.ReferencesBrowser);
  1463. smalltalk.addMethod(
  1464. '_label',
  1465. smalltalk.method({
  1466. selector: 'label',
  1467. fn: function (){
  1468. var self=this;
  1469. return unescape("%5BReferences%5D");
  1470. return self;}
  1471. }),
  1472. smalltalk.ReferencesBrowser);
  1473. smalltalk.addMethod(
  1474. '_selector',
  1475. smalltalk.method({
  1476. selector: 'selector',
  1477. fn: function (){
  1478. var self=this;
  1479. return self['@selector'];
  1480. return self;}
  1481. }),
  1482. smalltalk.ReferencesBrowser);
  1483. smalltalk.addMethod(
  1484. '_senders',
  1485. smalltalk.method({
  1486. selector: 'senders',
  1487. fn: function (){
  1488. var self=this;
  1489. return (($receiver = self['@senders']) == nil || $receiver == undefined) ? (function(){return self['@senders']=smalltalk.send((smalltalk.Array || Array), "_new", []);})() : $receiver;
  1490. return self;}
  1491. }),
  1492. smalltalk.ReferencesBrowser);
  1493. smalltalk.addMethod(
  1494. '_classesAndMetaclasses',
  1495. smalltalk.method({
  1496. selector: 'classesAndMetaclasses',
  1497. fn: function (){
  1498. var self=this;
  1499. return 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", []);})])]);
  1500. return self;}
  1501. }),
  1502. smalltalk.ReferencesBrowser);
  1503. smalltalk.addMethod(
  1504. '_referencedClasses',
  1505. smalltalk.method({
  1506. selector: 'referencedClasses',
  1507. fn: function (){
  1508. var self=this;
  1509. return (($receiver = self['@referencedClasses']) == nil || $receiver == undefined) ? (function(){return self['@referencedClasses']=smalltalk.send((smalltalk.Array || Array), "_new", []);})() : $receiver;
  1510. return self;}
  1511. }),
  1512. smalltalk.ReferencesBrowser);
  1513. smalltalk.addMethod(
  1514. '_openBrowserOn_',
  1515. smalltalk.method({
  1516. selector: 'openBrowserOn:',
  1517. fn: function (aMethod){
  1518. var self=this;
  1519. var browser=nil;
  1520. browser=smalltalk.send((smalltalk.Browser || Browser), "_openOn_", [((($receiver = smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_instanceClass", []);})() : (function(){return smalltalk.send(aMethod, "_methodClass", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_instanceClass", []);}), (function(){return smalltalk.send(aMethod, "_methodClass", []);})]))]);
  1521. ((($receiver = smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(browser, "_selectTab_", ["class"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(browser, "_selectTab_", ["class"]);})]));
  1522. (function($rec){smalltalk.send($rec, "_selectProtocol_", [smalltalk.send(aMethod, "_category", [])]);return smalltalk.send($rec, "_selectMethod_", [aMethod]);})(browser);
  1523. return self;}
  1524. }),
  1525. smalltalk.ReferencesBrowser);
  1526. smalltalk.addMethod(
  1527. '_searchReferencesFor_',
  1528. smalltalk.method({
  1529. selector: 'searchReferencesFor:',
  1530. fn: function (aString){
  1531. var self=this;
  1532. self['@selector']=aString;
  1533. self['@implementors']=smalltalk.send((smalltalk.Array || Array), "_new", []);
  1534. self['@senders']=smalltalk.send((smalltalk.Array || Array), "_new", []);
  1535. self['@referencedClasses']=smalltalk.send((smalltalk.Array || Array), "_new", []);
  1536. ((($receiver = smalltalk.send(self['@selector'], "_match_", [unescape("%5E%5BA-Z%5D")])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_searchSelectorReferencesFor_", [self['@selector']]);})() : (function(){return smalltalk.send(self, "_searchReferencedClassesFor_", [self['@selector']]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self, "_searchSelectorReferencesFor_", [self['@selector']]);}), (function(){return smalltalk.send(self, "_searchReferencedClassesFor_", [self['@selector']]);})]));
  1537. return self;}
  1538. }),
  1539. smalltalk.ReferencesBrowser);
  1540. smalltalk.addMethod(
  1541. '_search_',
  1542. smalltalk.method({
  1543. selector: 'search:',
  1544. fn: function (aString){
  1545. var self=this;
  1546. (function($rec){smalltalk.send($rec, "_searchReferencesFor_", [aString]);smalltalk.send($rec, "_updateImplementorsList", []);smalltalk.send($rec, "_updateSendersList", []);return smalltalk.send($rec, "_updateReferencedClassesList", []);})(self);
  1547. return self;}
  1548. }),
  1549. smalltalk.ReferencesBrowser);
  1550. smalltalk.addMethod(
  1551. '_searchReferencedClassesFor_',
  1552. smalltalk.method({
  1553. selector: 'searchReferencedClassesFor:',
  1554. fn: function (aString){
  1555. var self=this;
  1556. smalltalk.send(smalltalk.send(self, "_classesAndMetaclasses", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodDictionary", []), "_values", []), "_do_", [(function(value){return ((($receiver = smalltalk.send(smalltalk.send(value, "_referencedClasses", []), "_includes_", [self['@selector']])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_referencedClasses", []), "_add_", [value]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(smalltalk.send(self, "_referencedClasses", []), "_add_", [value]);})]));})]);})]);
  1557. return self;}
  1558. }),
  1559. smalltalk.ReferencesBrowser);
  1560. smalltalk.addMethod(
  1561. '_searchSelectorReferencesFor_',
  1562. smalltalk.method({
  1563. selector: 'searchSelectorReferencesFor:',
  1564. fn: function (aString){
  1565. var self=this;
  1566. smalltalk.send(smalltalk.send(self, "_classesAndMetaclasses", []), "_do_", [(function(each){smalltalk.send(smalltalk.send(each, "_methodDictionary", []), "_keysAndValuesDo_", [(function(key, value){return ((($receiver = smalltalk.send(key, "__eq", [self['@selector']])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_implementors", []), "_add_", [value]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(smalltalk.send(self, "_implementors", []), "_add_", [value]);})]));})]);return smalltalk.send(smalltalk.send(each, "_methodDictionary", []), "_keysAndValuesDo_", [(function(key, value){return ((($receiver = smalltalk.send(smalltalk.send(value, "_messageSends", []), "_includes_", [self['@selector']])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_senders", []), "_add_", [value]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(smalltalk.send(self, "_senders", []), "_add_", [value]);})]));})]);})]);
  1567. return self;}
  1568. }),
  1569. smalltalk.ReferencesBrowser);
  1570. smalltalk.addMethod(
  1571. '_initialize',
  1572. smalltalk.method({
  1573. selector: 'initialize',
  1574. fn: function (){
  1575. var self=this;
  1576. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  1577. self['@selector']="";
  1578. return self;}
  1579. }),
  1580. smalltalk.ReferencesBrowser);
  1581. smalltalk.addMethod(
  1582. '_setInputEvents',
  1583. smalltalk.method({
  1584. selector: 'setInputEvents',
  1585. fn: function (){
  1586. var self=this;
  1587. (function($rec){smalltalk.send($rec, "_onKeyUp_", [(function(){return self['@timer']=smalltalk.send((function(){return smalltalk.send(self, "_search_", [smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val", [])]);}), "_valueWithTimeout_", [(100)]);})]);return smalltalk.send($rec, "_onKeyDown_", [(function(){return (($receiver = self['@timer']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@timer'], "_clearTimeout", []);})() : nil;})]);})(self['@input']);
  1588. return self;}
  1589. }),
  1590. smalltalk.ReferencesBrowser);
  1591. smalltalk.addMethod(
  1592. '_renderBoxOn_',
  1593. smalltalk.method({
  1594. selector: 'renderBoxOn:',
  1595. fn: function (html){
  1596. var self=this;
  1597. (function($rec){smalltalk.send($rec, "_renderInputOn_", [html]);smalltalk.send($rec, "_renderImplementorsOn_", [html]);smalltalk.send($rec, "_renderSendersOn_", [html]);return smalltalk.send($rec, "_renderReferencedClassesOn_", [html]);})(self);
  1598. return self;}
  1599. }),
  1600. smalltalk.ReferencesBrowser);
  1601. smalltalk.addMethod(
  1602. '_renderInputOn_',
  1603. smalltalk.method({
  1604. selector: 'renderInputOn:',
  1605. fn: function (html){
  1606. var self=this;
  1607. self['@input']=(function($rec){smalltalk.send($rec, "_class_", ["implementors"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_input", []));
  1608. smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val_", [self['@selector']]);
  1609. smalltalk.send(self, "_setInputEvents", []);
  1610. return self;}
  1611. }),
  1612. smalltalk.ReferencesBrowser);
  1613. smalltalk.addMethod(
  1614. '_renderImplementorsOn_',
  1615. smalltalk.method({
  1616. selector: 'renderImplementorsOn:',
  1617. fn: function (html){
  1618. var self=this;
  1619. self['@implementorsList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column implementors"]);
  1620. smalltalk.send(self, "_updateImplementorsList", []);
  1621. return self;}
  1622. }),
  1623. smalltalk.ReferencesBrowser);
  1624. smalltalk.addMethod(
  1625. '_renderSendersOn_',
  1626. smalltalk.method({
  1627. selector: 'renderSendersOn:',
  1628. fn: function (html){
  1629. var self=this;
  1630. self['@sendersList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column senders"]);
  1631. smalltalk.send(self, "_updateSendersList", []);
  1632. return self;}
  1633. }),
  1634. smalltalk.ReferencesBrowser);
  1635. smalltalk.addMethod(
  1636. '_renderReferencedClassesOn_',
  1637. smalltalk.method({
  1638. selector: 'renderReferencedClassesOn:',
  1639. fn: function (html){
  1640. var self=this;
  1641. self['@referencedClassesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column referenced_classes"]);
  1642. smalltalk.send(self, "_updateReferencedClassesList", []);
  1643. return self;}
  1644. }),
  1645. smalltalk.ReferencesBrowser);
  1646. smalltalk.addMethod(
  1647. '_canBeClosed',
  1648. smalltalk.method({
  1649. selector: 'canBeClosed',
  1650. fn: function (){
  1651. var self=this;
  1652. return true;
  1653. return self;}
  1654. }),
  1655. smalltalk.ReferencesBrowser);
  1656. smalltalk.addMethod(
  1657. '_updateImplementorsList',
  1658. smalltalk.method({
  1659. selector: 'updateImplementorsList',
  1660. fn: function (){
  1661. var self=this;
  1662. smalltalk.send(self['@implementorsList'], "_contents_", [(function(html){(function($rec){smalltalk.send($rec, "_class_", ["column_label"]);smalltalk.send($rec, "_with_", [smalltalk.send(smalltalk.send(unescape("Implementors%20%28"), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_implementors", []), "_size", []), "_asString", [])]), "__comma", [unescape("%29")])]);return smalltalk.send($rec, "_style_", [unescape("font-weight%3A%20bold")]);})(smalltalk.send(html, "_li", []));return smalltalk.send(smalltalk.send(self, "_implementors", []), "_do_", [(function(each){var li=nil;
  1663. li=smalltalk.send(html, "_li", []);return (function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodClass", []), "_asString", []), "__comma", [unescape("%20%3E%3E%20")]), "__comma", [smalltalk.send(self, "_selector", [])])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_openBrowserOn_", [each]);})]);})(li);})]);})]);
  1664. return self;}
  1665. }),
  1666. smalltalk.ReferencesBrowser);
  1667. smalltalk.addMethod(
  1668. '_updateSendersList',
  1669. smalltalk.method({
  1670. selector: 'updateSendersList',
  1671. fn: function (){
  1672. var self=this;
  1673. smalltalk.send(self['@sendersList'], "_contents_", [(function(html){(function($rec){smalltalk.send($rec, "_class_", ["column_label"]);smalltalk.send($rec, "_with_", [smalltalk.send(smalltalk.send(unescape("Senders%20%28"), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_senders", []), "_size", []), "_asString", [])]), "__comma", [unescape("%29")])]);return smalltalk.send($rec, "_style_", [unescape("font-weight%3A%20bold")]);})(smalltalk.send(html, "_li", []));return smalltalk.send(smalltalk.send(self, "_senders", []), "_do_", [(function(each){return (function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodClass", []), "_asString", []), "__comma", [unescape("%20%3E%3E%20")]), "__comma", [smalltalk.send(each, "_selector", [])])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_openBrowserOn_", [each]);})]);})(smalltalk.send(html, "_li", []));})]);})]);
  1674. return self;}
  1675. }),
  1676. smalltalk.ReferencesBrowser);
  1677. smalltalk.addMethod(
  1678. '_updateReferencedClassesList',
  1679. smalltalk.method({
  1680. selector: 'updateReferencedClassesList',
  1681. fn: function (){
  1682. var self=this;
  1683. smalltalk.send(self['@referencedClassesList'], "_contents_", [(function(html){(function($rec){smalltalk.send($rec, "_class_", ["column_label"]);smalltalk.send($rec, "_with_", [smalltalk.send(smalltalk.send(unescape("Class%20references%20%28"), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_referencedClasses", []), "_size", []), "_asString", [])]), "__comma", [unescape("%29")])]);return smalltalk.send($rec, "_style_", [unescape("font-weight%3A%20bold")]);})(smalltalk.send(html, "_li", []));return smalltalk.send(smalltalk.send(self, "_referencedClasses", []), "_do_", [(function(each){return (function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodClass", []), "_asString", []), "__comma", [unescape("%20%3E%3E%20")]), "__comma", [smalltalk.send(each, "_selector", [])])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_openBrowserOn_", [each]);})]);})(smalltalk.send(html, "_li", []));})]);})]);
  1684. return self;}
  1685. }),
  1686. smalltalk.ReferencesBrowser);
  1687. smalltalk.addMethod(
  1688. '_search_',
  1689. smalltalk.method({
  1690. selector: 'search:',
  1691. fn: function (aString){
  1692. var self=this;
  1693. return (function($rec){smalltalk.send($rec, "_searchReferencesFor_", [aString]);return smalltalk.send($rec, "_open", []);})(smalltalk.send(self, "_new", []));
  1694. return self;}
  1695. }),
  1696. smalltalk.ReferencesBrowser.klass);
  1697. smalltalk.addClass('SourceArea', smalltalk.Widget, ['editor', 'div', 'receiver', 'onDoIt'], 'IDE');
  1698. smalltalk.addMethod(
  1699. '_val',
  1700. smalltalk.method({
  1701. selector: 'val',
  1702. fn: function (){
  1703. var self=this;
  1704. return smalltalk.send(self['@editor'], "_getValue", []);
  1705. return self;}
  1706. }),
  1707. smalltalk.SourceArea);
  1708. smalltalk.addMethod(
  1709. '_val_',
  1710. smalltalk.method({
  1711. selector: 'val:',
  1712. fn: function (aString){
  1713. var self=this;
  1714. smalltalk.send(self['@editor'], "_setValue_", [aString]);
  1715. return self;}
  1716. }),
  1717. smalltalk.SourceArea);
  1718. smalltalk.addMethod(
  1719. '_currentLine',
  1720. smalltalk.method({
  1721. selector: 'currentLine',
  1722. fn: function (){
  1723. var self=this;
  1724. return smalltalk.send(self['@editor'], "_getLine_", [smalltalk.send(smalltalk.send(self['@editor'], "_getCursor", []), "_line", [])]);
  1725. return self;}
  1726. }),
  1727. smalltalk.SourceArea);
  1728. smalltalk.addMethod(
  1729. '_selection',
  1730. smalltalk.method({
  1731. selector: 'selection',
  1732. fn: function (){
  1733. var self=this;
  1734. return smalltalk.send(self['@editor'], "_getSelection", []);
  1735. return self;}
  1736. }),
  1737. smalltalk.SourceArea);
  1738. smalltalk.addMethod(
  1739. '_selectionEnd',
  1740. smalltalk.method({
  1741. selector: 'selectionEnd',
  1742. fn: function (){
  1743. var self=this;
  1744. return smalltalk.send(smalltalk.send((typeof textarea == 'undefined' ? nil : textarea), "_element", []), "_selectionEnd", []);
  1745. return self;}
  1746. }),
  1747. smalltalk.SourceArea);
  1748. smalltalk.addMethod(
  1749. '_selectionStart',
  1750. smalltalk.method({
  1751. selector: 'selectionStart',
  1752. fn: function (){
  1753. var self=this;
  1754. return smalltalk.send(smalltalk.send((typeof textarea == 'undefined' ? nil : textarea), "_element", []), "_selectionStart", []);
  1755. return self;}
  1756. }),
  1757. smalltalk.SourceArea);
  1758. smalltalk.addMethod(
  1759. '_selectionStart_',
  1760. smalltalk.method({
  1761. selector: 'selectionStart:',
  1762. fn: function (anInteger){
  1763. var self=this;
  1764. smalltalk.send(smalltalk.send((typeof textarea == 'undefined' ? nil : textarea), "_element", []), "_selectionStart_", [anInteger]);
  1765. return self;}
  1766. }),
  1767. smalltalk.SourceArea);
  1768. smalltalk.addMethod(
  1769. '_selectionEnd_',
  1770. smalltalk.method({
  1771. selector: 'selectionEnd:',
  1772. fn: function (anInteger){
  1773. var self=this;
  1774. smalltalk.send(smalltalk.send((typeof textarea == 'undefined' ? nil : textarea), "_element", []), "_selectionEnd_", [anInteger]);
  1775. return self;}
  1776. }),
  1777. smalltalk.SourceArea);
  1778. smalltalk.addMethod(
  1779. '_setEditorOn_',
  1780. smalltalk.method({
  1781. selector: 'setEditorOn:',
  1782. fn: function (aTextarea){
  1783. var self=this;
  1784. self['@editor'] = CodeMirror.fromTextArea(aTextarea, {
  1785. theme: 'jtalk',
  1786. lineNumbers: true,
  1787. enterMode: 'flat',
  1788. matchBrackets: true,
  1789. electricChars: false
  1790. });
  1791. return self;}
  1792. }),
  1793. smalltalk.SourceArea);
  1794. smalltalk.addMethod(
  1795. '_editor',
  1796. smalltalk.method({
  1797. selector: 'editor',
  1798. fn: function (){
  1799. var self=this;
  1800. return self['@editor'];
  1801. return self;}
  1802. }),
  1803. smalltalk.SourceArea);
  1804. smalltalk.addMethod(
  1805. '_receiver',
  1806. smalltalk.method({
  1807. selector: 'receiver',
  1808. fn: function (){
  1809. var self=this;
  1810. return (($receiver = self['@receiver']) == nil || $receiver == undefined) ? (function(){return smalltalk.send((smalltalk.DoIt || DoIt), "_new", []);})() : $receiver;
  1811. return self;}
  1812. }),
  1813. smalltalk.SourceArea);
  1814. smalltalk.addMethod(
  1815. '_receiver_',
  1816. smalltalk.method({
  1817. selector: 'receiver:',
  1818. fn: function (anObject){
  1819. var self=this;
  1820. self['@receiver']=anObject;
  1821. return self;}
  1822. }),
  1823. smalltalk.SourceArea);
  1824. smalltalk.addMethod(
  1825. '_onDoIt_',
  1826. smalltalk.method({
  1827. selector: 'onDoIt:',
  1828. fn: function (aBlock){
  1829. var self=this;
  1830. self['@onDoIt']=aBlock;
  1831. return self;}
  1832. }),
  1833. smalltalk.SourceArea);
  1834. smalltalk.addMethod(
  1835. '_onDoIt',
  1836. smalltalk.method({
  1837. selector: 'onDoIt',
  1838. fn: function (){
  1839. var self=this;
  1840. return self['@onDoIt'];
  1841. return self;}
  1842. }),
  1843. smalltalk.SourceArea);
  1844. smalltalk.addMethod(
  1845. '_currentLineOrSelection',
  1846. smalltalk.method({
  1847. selector: 'currentLineOrSelection',
  1848. fn: function (){
  1849. var self=this;
  1850. return ((($receiver = smalltalk.send(self['@editor'], "_somethingSelected", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_currentLine", []);})() : (function(){return smalltalk.send(self, "_selection", []);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self, "_currentLine", []);}), (function(){return smalltalk.send(self, "_selection", []);})]));
  1851. return self;}
  1852. }),
  1853. smalltalk.SourceArea);
  1854. smalltalk.addMethod(
  1855. '_clear',
  1856. smalltalk.method({
  1857. selector: 'clear',
  1858. fn: function (){
  1859. var self=this;
  1860. smalltalk.send(self, "_val_", [""]);
  1861. return self;}
  1862. }),
  1863. smalltalk.SourceArea);
  1864. smalltalk.addMethod(
  1865. '_doIt',
  1866. smalltalk.method({
  1867. selector: 'doIt',
  1868. fn: function (){
  1869. var self=this;
  1870. var result=nil;
  1871. result=smalltalk.send(self, "_eval_", [smalltalk.send(self, "_currentLineOrSelection", [])]);
  1872. (($receiver = smalltalk.send(self, "_onDoIt", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(smalltalk.send(self, "_onDoIt", []), "_value", []);})() : nil;
  1873. return result;
  1874. return self;}
  1875. }),
  1876. smalltalk.SourceArea);
  1877. smalltalk.addMethod(
  1878. '_eval_',
  1879. smalltalk.method({
  1880. selector: 'eval:',
  1881. fn: function (aString){
  1882. var self=this;
  1883. try{var compiler=nil;
  1884. compiler=smalltalk.send((smalltalk.Compiler || Compiler), "_new", []);
  1885. smalltalk.send((function(){return smalltalk.send(compiler, "_parseExpression_", [aString]);}), "_on_do_", [(smalltalk.Error || Error), (function(ex){return (function(){throw({name: 'stReturn', selector: '_eval_', fn: function(){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", [smalltalk.send(ex, "_messageText", [])])}})})();})]);
  1886. (function(){throw({name: 'stReturn', selector: '_eval_', fn: function(){return smalltalk.send(smalltalk.send(smalltalk.send(compiler, "_load_forClass_", [smalltalk.send(smalltalk.send(unescape("doIt%20%5E%5B"), "__comma", [aString]), "__comma", [unescape("%5D%20value")]), (smalltalk.DoIt || DoIt)]), "_fn", []), "_applyTo_arguments_", [smalltalk.send(self, "_receiver", []), []])}})})();
  1887. return self;
  1888. } catch(e) {if(e.name === 'stReturn' && e.selector === '_eval_'){return e.fn()} throw(e)}}
  1889. }),
  1890. smalltalk.SourceArea);
  1891. smalltalk.addMethod(
  1892. '_handleKeyDown_',
  1893. smalltalk.method({
  1894. selector: 'handleKeyDown:',
  1895. fn: function (anEvent){
  1896. var self=this;
  1897. if(anEvent.ctrlKey) {
  1898. if(anEvent.keyCode === 80) { //ctrl+p
  1899. self._printIt();
  1900. anEvent.preventDefault();
  1901. return false;
  1902. }
  1903. if(anEvent.keyCode === 68) { //ctrl+d
  1904. self._doIt();
  1905. anEvent.preventDefault();
  1906. return false;
  1907. }
  1908. if(anEvent.keyCode === 73) { //ctrl+i
  1909. self._inspectIt();
  1910. anEvent.preventDefault();
  1911. return false;
  1912. }
  1913. };
  1914. return self;}
  1915. }),
  1916. smalltalk.SourceArea);
  1917. smalltalk.addMethod(
  1918. '_inspectIt',
  1919. smalltalk.method({
  1920. selector: 'inspectIt',
  1921. fn: function (){
  1922. var self=this;
  1923. smalltalk.send(smalltalk.send(self, "_doIt", []), "_inspect", []);
  1924. return self;}
  1925. }),
  1926. smalltalk.SourceArea);
  1927. smalltalk.addMethod(
  1928. '_print_',
  1929. smalltalk.method({
  1930. selector: 'print:',
  1931. fn: function (aString){
  1932. var self=this;
  1933. var start=nil;
  1934. var stop=nil;
  1935. start=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  1936. stop=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  1937. smalltalk.send(start, "_at_put_", ["line", smalltalk.send(smalltalk.send(self['@editor'], "_getCursor_", [false]), "_line", [])]);
  1938. smalltalk.send(start, "_at_put_", ["ch", smalltalk.send(smalltalk.send(self['@editor'], "_getCursor_", [false]), "_ch", [])]);
  1939. smalltalk.send(stop, "_at_put_", ["line", smalltalk.send(start, "_at_", ["line"])]);
  1940. smalltalk.send(stop, "_at_put_", ["ch", ((($receiver = ((($receiver = smalltalk.send(start, "_at_", ["ch"])).klass === smalltalk.Number) ? $receiver +smalltalk.send(aString, "_size", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(aString, "_size", [])]))).klass === smalltalk.Number) ? $receiver +(2) : smalltalk.send($receiver, "__plus", [(2)]))]);
  1941. smalltalk.send(self['@editor'], "_replaceSelection_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self['@editor'], "_getSelection", []), "__comma", [" "]), "__comma", [aString]), "__comma", [" "])]);
  1942. smalltalk.send(self['@editor'], "_setCursor_", [smalltalk.send(self['@editor'], "_getCursor_", [true])]);
  1943. smalltalk.send(self['@editor'], "_setSelection_end_", [stop, start]);
  1944. return self;}
  1945. }),
  1946. smalltalk.SourceArea);
  1947. smalltalk.addMethod(
  1948. '_printIt',
  1949. smalltalk.method({
  1950. selector: 'printIt',
  1951. fn: function (){
  1952. var self=this;
  1953. smalltalk.send(self, "_print_", [smalltalk.send(smalltalk.send(self, "_doIt", []), "_printString", [])]);
  1954. return self;}
  1955. }),
  1956. smalltalk.SourceArea);
  1957. smalltalk.addMethod(
  1958. '_fileIn',
  1959. smalltalk.method({
  1960. selector: 'fileIn',
  1961. fn: function (){
  1962. var self=this;
  1963. smalltalk.send(smalltalk.send((smalltalk.Importer || Importer), "_new", []), "_import_", [smalltalk.send(smalltalk.send(self, "_currentLineOrSelection", []), "_readStream", [])]);
  1964. return self;}
  1965. }),
  1966. smalltalk.SourceArea);
  1967. smalltalk.addMethod(
  1968. '_onKeyUp_',
  1969. smalltalk.method({
  1970. selector: 'onKeyUp:',
  1971. fn: function (aBlock){
  1972. var self=this;
  1973. smalltalk.send(self['@div'], "_onKeyUp_", [aBlock]);
  1974. return self;}
  1975. }),
  1976. smalltalk.SourceArea);
  1977. smalltalk.addMethod(
  1978. '_onKeyDown_',
  1979. smalltalk.method({
  1980. selector: 'onKeyDown:',
  1981. fn: function (aBlock){
  1982. var self=this;
  1983. smalltalk.send(self['@div'], "_onKeyDown_", [aBlock]);
  1984. return self;}
  1985. }),
  1986. smalltalk.SourceArea);
  1987. smalltalk.addMethod(
  1988. '_renderOn_',
  1989. smalltalk.method({
  1990. selector: 'renderOn:',
  1991. fn: function (html){
  1992. var self=this;
  1993. var textarea=nil;
  1994. self['@div']=smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["source"]);
  1995. smalltalk.send(self['@div'], "_with_", [(function(){return textarea=smalltalk.send(html, "_textarea", []);})]);
  1996. smalltalk.send(self, "_setEditorOn_", [smalltalk.send(textarea, "_element", [])]);
  1997. smalltalk.send(self['@div'], "_onKeyDown_", [(function(e){return smalltalk.send(self, "_handleKeyDown_", [e]);})]);
  1998. return self;}
  1999. }),
  2000. smalltalk.SourceArea);
  2001. smalltalk.addClass('ClassesList', smalltalk.Widget, ['browser', 'ul', 'nodes'], 'IDE');
  2002. smalltalk.addMethod(
  2003. '_category',
  2004. smalltalk.method({
  2005. selector: 'category',
  2006. fn: function (){
  2007. var self=this;
  2008. return smalltalk.send(smalltalk.send(self, "_browser", []), "_selectedPackage", []);
  2009. return self;}
  2010. }),
  2011. smalltalk.ClassesList);
  2012. smalltalk.addMethod(
  2013. '_nodes',
  2014. smalltalk.method({
  2015. selector: 'nodes',
  2016. fn: function (){
  2017. var self=this;
  2018. (($receiver = self['@nodes']) == nil || $receiver == undefined) ? (function(){return self['@nodes']=smalltalk.send(self, "_getNodes", []);})() : $receiver;
  2019. return self['@nodes'];
  2020. return self;}
  2021. }),
  2022. smalltalk.ClassesList);
  2023. smalltalk.addMethod(
  2024. '_browser',
  2025. smalltalk.method({
  2026. selector: 'browser',
  2027. fn: function (){
  2028. var self=this;
  2029. return self['@browser'];
  2030. return self;}
  2031. }),
  2032. smalltalk.ClassesList);
  2033. smalltalk.addMethod(
  2034. '_browser_',
  2035. smalltalk.method({
  2036. selector: 'browser:',
  2037. fn: function (aBrowser){
  2038. var self=this;
  2039. self['@browser']=aBrowser;
  2040. return self;}
  2041. }),
  2042. smalltalk.ClassesList);
  2043. smalltalk.addMethod(
  2044. '_getNodes',
  2045. smalltalk.method({
  2046. selector: 'getNodes',
  2047. fn: function (){
  2048. var self=this;
  2049. var classes=nil;
  2050. var children=nil;
  2051. var others=nil;
  2052. classes=smalltalk.send(smalltalk.send(self, "_browser", []), "_classes", []);
  2053. children=[];
  2054. others=[];
  2055. smalltalk.send(classes, "_do_", [(function(each){return ((($receiver = smalltalk.send(classes, "_includes_", [smalltalk.send(each, "_superclass", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(children, "_add_", [each]);})() : (function(){return smalltalk.send(others, "_add_", [each]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(children, "_add_", [each]);}), (function(){return smalltalk.send(others, "_add_", [each]);})]));})]);
  2056. return smalltalk.send(children, "_collect_", [(function(each){return smalltalk.send((smalltalk.ClassesListNode || ClassesListNode), "_on_browser_classes_level_", [each, smalltalk.send(self, "_browser", []), others, (0)]);})]);
  2057. return self;}
  2058. }),
  2059. smalltalk.ClassesList);
  2060. smalltalk.addMethod(
  2061. '_resetNodes',
  2062. smalltalk.method({
  2063. selector: 'resetNodes',
  2064. fn: function (){
  2065. var self=this;
  2066. self['@nodes']=nil;
  2067. return self;}
  2068. }),
  2069. smalltalk.ClassesList);
  2070. smalltalk.addMethod(
  2071. '_renderOn_',
  2072. smalltalk.method({
  2073. selector: 'renderOn:',
  2074. fn: function (html){
  2075. var self=this;
  2076. self['@ul']=(function($rec){smalltalk.send($rec, "_class_", ["jt_column browser classes"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_ul", []));
  2077. smalltalk.send(self, "_updateNodes", []);
  2078. return self;}
  2079. }),
  2080. smalltalk.ClassesList);
  2081. smalltalk.addMethod(
  2082. '_updateNodes',
  2083. smalltalk.method({
  2084. selector: 'updateNodes',
  2085. fn: function (){
  2086. var self=this;
  2087. smalltalk.send(self['@ul'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(self, "_nodes", []), "_do_", [(function(each){return smalltalk.send(each, "_renderOn_", [html]);})]);})]);
  2088. return self;}
  2089. }),
  2090. smalltalk.ClassesList);
  2091. smalltalk.addMethod(
  2092. '_on_',
  2093. smalltalk.method({
  2094. selector: 'on:',
  2095. fn: function (aBrowser){
  2096. var self=this;
  2097. return (function($rec){smalltalk.send($rec, "_browser_", [aBrowser]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  2098. return self;}
  2099. }),
  2100. smalltalk.ClassesList.klass);
  2101. smalltalk.addClass('ClassesListNode', smalltalk.Widget, ['browser', 'theClass', 'level', 'nodes'], 'IDE');
  2102. smalltalk.addMethod(
  2103. '_renderOn_',
  2104. smalltalk.method({
  2105. selector: 'renderOn:',
  2106. fn: function (html){
  2107. var self=this;
  2108. var li=nil;
  2109. var cssClass=nil;
  2110. cssClass="";
  2111. li=smalltalk.send(smalltalk.send(html, "_li", []), "_onClick_", [(function(){return smalltalk.send(smalltalk.send(self, "_browser", []), "_selectClass_", [smalltalk.send(self, "_theClass", [])]);})]);
  2112. smalltalk.send(smalltalk.send(li, "_asJQuery", []), "_html_", [smalltalk.send(self, "_label", [])]);
  2113. ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(self, "_browser", []), "_selectedClass", []), "__eq", [smalltalk.send(self, "_theClass", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return cssClass=smalltalk.send(cssClass, "__comma", [" selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return cssClass=smalltalk.send(cssClass, "__comma", [" selected"]);})]));
  2114. ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(self, "_theClass", []), "_comment", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return cssClass=smalltalk.send(cssClass, "__comma", [" commented"]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return cssClass=smalltalk.send(cssClass, "__comma", [" commented"]);})]));
  2115. smalltalk.send(li, "_class_", [cssClass]);
  2116. smalltalk.send(smalltalk.send(self, "_nodes", []), "_do_", [(function(each){return smalltalk.send(each, "_renderOn_", [html]);})]);
  2117. return self;}
  2118. }),
  2119. smalltalk.ClassesListNode);
  2120. smalltalk.addMethod(
  2121. '_nodes',
  2122. smalltalk.method({
  2123. selector: 'nodes',
  2124. fn: function (){
  2125. var self=this;
  2126. return self['@nodes'];
  2127. return self;}
  2128. }),
  2129. smalltalk.ClassesListNode);
  2130. smalltalk.addMethod(
  2131. '_theClass',
  2132. smalltalk.method({
  2133. selector: 'theClass',
  2134. fn: function (){
  2135. var self=this;
  2136. return self['@theClass'];
  2137. return self;}
  2138. }),
  2139. smalltalk.ClassesListNode);
  2140. smalltalk.addMethod(
  2141. '_theClass_',
  2142. smalltalk.method({
  2143. selector: 'theClass:',
  2144. fn: function (aClass){
  2145. var self=this;
  2146. self['@theClass']=aClass;
  2147. return self;}
  2148. }),
  2149. smalltalk.ClassesListNode);
  2150. smalltalk.addMethod(
  2151. '_browser',
  2152. smalltalk.method({
  2153. selector: 'browser',
  2154. fn: function (){
  2155. var self=this;
  2156. return self['@browser'];
  2157. return self;}
  2158. }),
  2159. smalltalk.ClassesListNode);
  2160. smalltalk.addMethod(
  2161. '_browser_',
  2162. smalltalk.method({
  2163. selector: 'browser:',
  2164. fn: function (aBrowser){
  2165. var self=this;
  2166. self['@browser']=aBrowser;
  2167. return self;}
  2168. }),
  2169. smalltalk.ClassesListNode);
  2170. smalltalk.addMethod(
  2171. '_level',
  2172. smalltalk.method({
  2173. selector: 'level',
  2174. fn: function (){
  2175. var self=this;
  2176. return self['@level'];
  2177. return self;}
  2178. }),
  2179. smalltalk.ClassesListNode);
  2180. smalltalk.addMethod(
  2181. '_level_',
  2182. smalltalk.method({
  2183. selector: 'level:',
  2184. fn: function (anInteger){
  2185. var self=this;
  2186. self['@level']=anInteger;
  2187. return self;}
  2188. }),
  2189. smalltalk.ClassesListNode);
  2190. smalltalk.addMethod(
  2191. '_label',
  2192. smalltalk.method({
  2193. selector: 'label',
  2194. fn: function (){
  2195. var self=this;
  2196. var str=nil;
  2197. str=smalltalk.send(smalltalk.send((smalltalk.String || String), "_new", []), "_writeStream", []);
  2198. smalltalk.send(smalltalk.send(self, "_level", []), "_timesRepeat_", [(function(){return smalltalk.send(str, "_nextPutAll_", [unescape("%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B")]);})]);
  2199. smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_theClass", []), "_name", [])]);
  2200. return smalltalk.send(str, "_contents", []);
  2201. return self;}
  2202. }),
  2203. smalltalk.ClassesListNode);
  2204. smalltalk.addMethod(
  2205. '_getNodesFrom_',
  2206. smalltalk.method({
  2207. selector: 'getNodesFrom:',
  2208. fn: function (aCollection){
  2209. var self=this;
  2210. var children=nil;
  2211. var others=nil;
  2212. children=[];
  2213. others=[];
  2214. smalltalk.send(aCollection, "_do_", [(function(each){return ((($receiver = smalltalk.send(smalltalk.send(each, "_superclass", []), "__eq", [smalltalk.send(self, "_theClass", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(children, "_add_", [each]);})() : (function(){return smalltalk.send(others, "_add_", [each]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(children, "_add_", [each]);}), (function(){return smalltalk.send(others, "_add_", [each]);})]));})]);
  2215. self['@nodes']=smalltalk.send(children, "_collect_", [(function(each){return smalltalk.send((smalltalk.ClassesListNode || ClassesListNode), "_on_browser_classes_level_", [each, smalltalk.send(self, "_browser", []), others, ((($receiver = smalltalk.send(self, "_level", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);})]);
  2216. return self;}
  2217. }),
  2218. smalltalk.ClassesListNode);
  2219. smalltalk.addMethod(
  2220. '_on_browser_classes_level_',
  2221. smalltalk.method({
  2222. selector: 'on:browser:classes:level:',
  2223. fn: function (aClass, aBrowser, aCollection, anInteger){
  2224. var self=this;
  2225. return (function($rec){smalltalk.send($rec, "_theClass_", [aClass]);smalltalk.send($rec, "_browser_", [aBrowser]);smalltalk.send($rec, "_level_", [anInteger]);smalltalk.send($rec, "_getNodesFrom_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  2226. return self;}
  2227. }),
  2228. smalltalk.ClassesListNode.klass);
  2229. smalltalk.addClass('Debugger', smalltalk.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  2230. smalltalk.addMethod(
  2231. '_error',
  2232. smalltalk.method({
  2233. selector: 'error',
  2234. fn: function (){
  2235. var self=this;
  2236. return self['@error'];
  2237. return self;}
  2238. }),
  2239. smalltalk.Debugger);
  2240. smalltalk.addMethod(
  2241. '_error_',
  2242. smalltalk.method({
  2243. selector: 'error:',
  2244. fn: function (anError){
  2245. var self=this;
  2246. self['@error']=anError;
  2247. return self;}
  2248. }),
  2249. smalltalk.Debugger);
  2250. smalltalk.addMethod(
  2251. '_label',
  2252. smalltalk.method({
  2253. selector: 'label',
  2254. fn: function (){
  2255. var self=this;
  2256. return unescape("%5BDebugger%5D");
  2257. return self;}
  2258. }),
  2259. smalltalk.Debugger);
  2260. smalltalk.addMethod(
  2261. '_source',
  2262. smalltalk.method({
  2263. selector: 'source',
  2264. fn: function (){
  2265. var self=this;
  2266. return (($receiver = smalltalk.send(self, "_method", [])) == nil || $receiver == undefined) ? (function(){return unescape("Method%20doesn%27t%20exist%21");})() : (function(){return smalltalk.send(smalltalk.send(self, "_method", []), "_source", []);})();
  2267. return self;}
  2268. }),
  2269. smalltalk.Debugger);
  2270. smalltalk.addMethod(
  2271. '_method',
  2272. smalltalk.method({
  2273. selector: 'method',
  2274. fn: function (){
  2275. var self=this;
  2276. return smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_methodAt_", [smalltalk.send(self['@selectedContext'], "_selector", [])]);
  2277. return self;}
  2278. }),
  2279. smalltalk.Debugger);
  2280. smalltalk.addMethod(
  2281. '_arguments',
  2282. smalltalk.method({
  2283. selector: 'arguments',
  2284. fn: function (){
  2285. var self=this;
  2286. return (($receiver = smalltalk.send(self, "_method", [])) == nil || $receiver == undefined) ? (function(){return smalltalk.send(smalltalk.send(self['@selectedContext'], "_temps", []), "_collect_", [(function(each){return nil;})]);})() : (function(){return smalltalk.send(smalltalk.send(self, "_method", []), "_arguments", []);})();
  2287. return self;}
  2288. }),
  2289. smalltalk.Debugger);
  2290. smalltalk.addMethod(
  2291. '_receiver',
  2292. smalltalk.method({
  2293. selector: 'receiver',
  2294. fn: function (){
  2295. var self=this;
  2296. return smalltalk.send(self['@selectedContext'], "_receiver", []);
  2297. return self;}
  2298. }),
  2299. smalltalk.Debugger);
  2300. smalltalk.addMethod(
  2301. '_selectContext_',
  2302. smalltalk.method({
  2303. selector: 'selectContext:',
  2304. fn: function (aContext){
  2305. var self=this;
  2306. self['@selectedContext']=aContext;
  2307. self['@selectedVariable']=nil;
  2308. self['@selectedVariableName']=nil;
  2309. (function($rec){smalltalk.send($rec, "_updateContextsList", []);smalltalk.send($rec, "_updateSourceArea", []);smalltalk.send($rec, "_updateInspector", []);smalltalk.send($rec, "_updateVariablesList", []);return smalltalk.send($rec, "_updateStatus", []);})(self);
  2310. return self;}
  2311. }),
  2312. smalltalk.Debugger);
  2313. smalltalk.addMethod(
  2314. '_proceed',
  2315. smalltalk.method({
  2316. selector: 'proceed',
  2317. fn: function (){
  2318. var self=this;
  2319. smalltalk.send(self, "_close", []);
  2320. smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_perform_withArguments_", [smalltalk.send(self['@selectedContext'], "_selector", []), smalltalk.send(self['@selectedContext'], "_temps", [])]);
  2321. return self;}
  2322. }),
  2323. smalltalk.Debugger);
  2324. smalltalk.addMethod(
  2325. '_save',
  2326. smalltalk.method({
  2327. selector: 'save',
  2328. fn: function (){
  2329. var self=this;
  2330. var protocol=nil;
  2331. protocol=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_methodDictionary", []), "_at_", [smalltalk.send(self['@selectedContext'], "_selector", [])]), "_category", []);
  2332. smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_compile_category_", [smalltalk.send(self['@sourceArea'], "_val", []), protocol]);
  2333. smalltalk.send(self, "_updateStatus", []);
  2334. return self;}
  2335. }),
  2336. smalltalk.Debugger);
  2337. smalltalk.addMethod(
  2338. '_selectVariable_named_',
  2339. smalltalk.method({
  2340. selector: 'selectVariable:named:',
  2341. fn: function (anObject, aString){
  2342. var self=this;
  2343. self['@selectedVariable']=anObject;
  2344. self['@selectedVariableName']=aString;
  2345. smalltalk.send(self['@inspector'], "_contents_", [(function(html){return smalltalk.send(html, "_with_", [smalltalk.send(anObject, "_printString", [])]);})]);
  2346. smalltalk.send(self, "_updateVariablesList", []);
  2347. return self;}
  2348. }),
  2349. smalltalk.Debugger);
  2350. smalltalk.addMethod(
  2351. '_inspectSelectedVariable',
  2352. smalltalk.method({
  2353. selector: 'inspectSelectedVariable',
  2354. fn: function (){
  2355. var self=this;
  2356. smalltalk.send(self['@selectedVariable'], "_inspect", []);
  2357. return self;}
  2358. }),
  2359. smalltalk.Debugger);
  2360. smalltalk.addMethod(
  2361. '_initialize',
  2362. smalltalk.method({
  2363. selector: 'initialize',
  2364. fn: function (){
  2365. var self=this;
  2366. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  2367. smalltalk.send(self['@unsavedChanges'], "__eq", [false]);
  2368. return self;}
  2369. }),
  2370. smalltalk.Debugger);
  2371. smalltalk.addMethod(
  2372. '_renderTopPanelOn_',
  2373. smalltalk.method({
  2374. selector: 'renderTopPanelOn:',
  2375. fn: function (html){
  2376. var self=this;
  2377. self['@selectedContext']=smalltalk.send(smalltalk.send(self, "_error", []), "_context", []);
  2378. (function($rec){smalltalk.send($rec, "_class_", ["top"]);return smalltalk.send($rec, "_with_", [(function(){(function($rec){smalltalk.send($rec, "_class_", ["label"]);return smalltalk.send($rec, "_with_", [smalltalk.send(smalltalk.send(self, "_error", []), "_messageText", [])]);})(smalltalk.send(html, "_div", []));return self['@ul']=(function($rec){smalltalk.send($rec, "_class_", ["jt_column debugger contexts"]);return smalltalk.send($rec, "_with_", [(function(){return smalltalk.send(self, "_renderContext_on_", [smalltalk.send(smalltalk.send(self, "_error", []), "_context", []), html]);})]);})(smalltalk.send(html, "_ul", []));})]);})(smalltalk.send(html, "_div", []));
  2379. return self;}
  2380. }),
  2381. smalltalk.Debugger);
  2382. smalltalk.addMethod(
  2383. '_renderContext_on_',
  2384. smalltalk.method({
  2385. selector: 'renderContext:on:',
  2386. fn: function (aContext, html){
  2387. var self=this;
  2388. var li=nil;
  2389. li=smalltalk.send(html, "_li", []);
  2390. ((($receiver = smalltalk.send(self['@selectedContext'], "__eq", [aContext])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));
  2391. (function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(aContext, "_asString", [])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectContext_", [aContext]);})]);})(li);
  2392. (($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_renderContext_on_", [smalltalk.send(aContext, "_home", []), html]);})() : nil;
  2393. return self;}
  2394. }),
  2395. smalltalk.Debugger);
  2396. smalltalk.addMethod(
  2397. '_renderBottomPanelOn_',
  2398. smalltalk.method({
  2399. selector: 'renderBottomPanelOn:',
  2400. fn: function (html){
  2401. var self=this;
  2402. (function($rec){smalltalk.send($rec, "_class_", ["jt_sourceCode debugger"]);return smalltalk.send($rec, "_with_", [(function(){self['@sourceArea']=smalltalk.send((smalltalk.SourceArea || SourceArea), "_new", []);return smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);})]);})(smalltalk.send(html, "_div", []));
  2403. self['@ul2']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column debugger variables"]);
  2404. self['@inspector']=smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["jt_column debugger inspector"]);
  2405. smalltalk.send(self['@sourceArea'], "_onKeyUp_", [(function(){return smalltalk.send(self, "_updateStatus", []);})]);
  2406. return self;}
  2407. }),
  2408. smalltalk.Debugger);
  2409. smalltalk.addMethod(
  2410. '_renderButtonsOn_',
  2411. smalltalk.method({
  2412. selector: 'renderButtonsOn:',
  2413. fn: function (html){
  2414. var self=this;
  2415. self['@saveButton']=(function($rec){smalltalk.send($rec, "_with_", ["Save"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_save", []);})]);})(smalltalk.send(html, "_button", []));
  2416. (function($rec){smalltalk.send($rec, "_with_", ["DoIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self['@sourceArea'], "_doIt", []);})]);})(smalltalk.send(html, "_button", []));
  2417. (function($rec){smalltalk.send($rec, "_with_", ["PrintIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self['@sourceArea'], "_printIt", []);})]);})(smalltalk.send(html, "_button", []));
  2418. (function($rec){smalltalk.send($rec, "_with_", ["InspectIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self['@sourceArea'], "_inspectIt", []);})]);})(smalltalk.send(html, "_button", []));
  2419. (function($rec){smalltalk.send($rec, "_with_", ["Proceed"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_proceed", []);})]);})(smalltalk.send(html, "_button", []));
  2420. (function($rec){smalltalk.send($rec, "_with_", ["Abandon"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_close", []);})]);})(smalltalk.send(html, "_button", []));
  2421. self['@inspectButton']=(function($rec){smalltalk.send($rec, "_class_", ["jt_button debugger inspect"]);smalltalk.send($rec, "_with_", ["Inspect"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_inspectSelectedVariable", []);})]);})(smalltalk.send(html, "_button", []));
  2422. (function($rec){smalltalk.send($rec, "_updateSourceArea", []);smalltalk.send($rec, "_updateStatus", []);smalltalk.send($rec, "_updateVariablesList", []);return smalltalk.send($rec, "_updateInspector", []);})(self);
  2423. return self;}
  2424. }),
  2425. smalltalk.Debugger);
  2426. smalltalk.addMethod(
  2427. '_renderBoxOn_',
  2428. smalltalk.method({
  2429. selector: 'renderBoxOn:',
  2430. fn: function (html){
  2431. var self=this;
  2432. (function($rec){smalltalk.send($rec, "_renderTopPanelOn_", [html]);return smalltalk.send($rec, "_renderBottomPanelOn_", [html]);})(self);
  2433. return self;}
  2434. }),
  2435. smalltalk.Debugger);
  2436. smalltalk.addMethod(
  2437. '_canBeClosed',
  2438. smalltalk.method({
  2439. selector: 'canBeClosed',
  2440. fn: function (){
  2441. var self=this;
  2442. return true;
  2443. return self;}
  2444. }),
  2445. smalltalk.Debugger);
  2446. smalltalk.addMethod(
  2447. '_updateContextsList',
  2448. smalltalk.method({
  2449. selector: 'updateContextsList',
  2450. fn: function (){
  2451. var self=this;
  2452. smalltalk.send(self['@ul'], "_contents_", [(function(html){return smalltalk.send(self, "_renderContext_on_", [smalltalk.send(smalltalk.send(self, "_error", []), "_context", []), html]);})]);
  2453. return self;}
  2454. }),
  2455. smalltalk.Debugger);
  2456. smalltalk.addMethod(
  2457. '_updateSourceArea',
  2458. smalltalk.method({
  2459. selector: 'updateSourceArea',
  2460. fn: function (){
  2461. var self=this;
  2462. smalltalk.send(self['@sourceArea'], "_val_", [smalltalk.send(self, "_source", [])]);
  2463. return self;}
  2464. }),
  2465. smalltalk.Debugger);
  2466. smalltalk.addMethod(
  2467. '_updateStatus',
  2468. smalltalk.method({
  2469. selector: 'updateStatus',
  2470. fn: function (){
  2471. var self=this;
  2472. ((($receiver = smalltalk.send(smalltalk.send(self['@sourceArea'], "_val", []), "__eq", [smalltalk.send(self, "_source", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){(($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);})() : nil;return self['@unsavedChanges']=false;})() : (function(){(($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_removeAt_", ["disabled"]);})() : nil;return self['@unsavedChanges']=true;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){(($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);})() : nil;return self['@unsavedChanges']=false;}), (function(){(($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_removeAt_", ["disabled"]);})() : nil;return self['@unsavedChanges']=true;})]));
  2473. return self;}
  2474. }),
  2475. smalltalk.Debugger);
  2476. smalltalk.addMethod(
  2477. '_updateInspector',
  2478. smalltalk.method({
  2479. selector: 'updateInspector',
  2480. fn: function (){
  2481. var self=this;
  2482. smalltalk.send(self['@inspector'], "_contents_", [(function(html){return nil;})]);
  2483. return self;}
  2484. }),
  2485. smalltalk.Debugger);
  2486. smalltalk.addMethod(
  2487. '_updateVariablesList',
  2488. smalltalk.method({
  2489. selector: 'updateVariablesList',
  2490. fn: function (){
  2491. var self=this;
  2492. smalltalk.send(self['@ul2'], "_contents_", [(function(html){var li=nil;
  2493. li=(function($rec){smalltalk.send($rec, "_with_", ["self"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectVariable_named_", [smalltalk.send(self, "_receiver", []), "self"]);})]);})(smalltalk.send(html, "_li", []));((($receiver = smalltalk.send(self['@selectedVariableName'], "__eq", ["self"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));smalltalk.send(smalltalk.send(self, "_arguments", []), "_withIndexDo_", [(function(each, index){var param=nil;
  2494. param=smalltalk.send(smalltalk.send(self['@selectedContext'], "_temps", []), "_at_", [index]);li=(function($rec){smalltalk.send($rec, "_with_", [each]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectVariable_named_", [param, each]);})]);})(smalltalk.send(html, "_li", []));return ((($receiver = smalltalk.send(self['@selectedVariableName'], "__eq", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));})]);return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_class", []), "_allInstanceVariableNames", []), "_do_", [(function(each){var ivar=nil;
  2495. ivar=smalltalk.send(smalltalk.send(self, "_receiver", []), "_instVarAt_", [each]);li=(function($rec){smalltalk.send($rec, "_with_", [each]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectVariable_named_", [ivar, each]);})]);})(smalltalk.send(html, "_li", []));return ((($receiver = smalltalk.send(self['@selectedVariableName'], "__eq", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));})]);})]);
  2496. (($receiver = self['@selectedVariable']) == nil || $receiver == undefined) ? (function(){return smalltalk.send(self['@inspectButton'], "_at_put_", ["disabled", true]);})() : (function(){return smalltalk.send(self['@inspectButton'], "_removeAt_", ["disabled"]);})();
  2497. return self;}
  2498. }),
  2499. smalltalk.Debugger);
  2500. smalltalk.addClass('DebugErrorHandler', smalltalk.ErrorHandler, [], 'IDE');
  2501. smalltalk.addMethod(
  2502. '_handleError_',
  2503. smalltalk.method({
  2504. selector: 'handleError:',
  2505. fn: function (anError){
  2506. var self=this;
  2507. smalltalk.send((function(){return (function($rec){smalltalk.send($rec, "_error_", [anError]);return smalltalk.send($rec, "_open", []);})(smalltalk.send((smalltalk.Debugger || Debugger), "_new", []));}), "_on_do_", [(smalltalk.Error || Error), (function(error){return smalltalk.send(smalltalk.send((smalltalk.ErrorHandler || ErrorHandler), "_new", []), "_handleError_", [error]);})]);
  2508. return self;}
  2509. }),
  2510. smalltalk.DebugErrorHandler);
  2511. smalltalk.addMethod(
  2512. '_initialize',
  2513. smalltalk.method({
  2514. selector: 'initialize',
  2515. fn: function (){
  2516. var self=this;
  2517. smalltalk.send(self, "_register", []);
  2518. return self;}
  2519. }),
  2520. smalltalk.DebugErrorHandler.klass);
  2521. smalltalk.addClass('ProgressBar', smalltalk.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  2522. smalltalk.addMethod(
  2523. '_percent',
  2524. smalltalk.method({
  2525. selector: 'percent',
  2526. fn: function (){
  2527. var self=this;
  2528. return (($receiver = self['@percent']) == nil || $receiver == undefined) ? (function(){return (0);})() : $receiver;
  2529. return self;}
  2530. }),
  2531. smalltalk.ProgressBar);
  2532. smalltalk.addMethod(
  2533. '_percent_',
  2534. smalltalk.method({
  2535. selector: 'percent:',
  2536. fn: function (aNumber){
  2537. var self=this;
  2538. self['@percent']=aNumber;
  2539. return self;}
  2540. }),
  2541. smalltalk.ProgressBar);
  2542. smalltalk.addMethod(
  2543. '_renderOn_',
  2544. smalltalk.method({
  2545. selector: 'renderOn:',
  2546. fn: function (html){
  2547. var self=this;
  2548. self['@div']=(function($rec){smalltalk.send($rec, "_class_", ["progress_bar"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_div", []));
  2549. smalltalk.send(self, "_renderProgressBar", []);
  2550. return self;}
  2551. }),
  2552. smalltalk.ProgressBar);
  2553. smalltalk.addMethod(
  2554. '_renderProgressBar',
  2555. smalltalk.method({
  2556. selector: 'renderProgressBar',
  2557. fn: function (){
  2558. var self=this;
  2559. smalltalk.send(self['@div'], "_contents_", [(function(html){return (function($rec){smalltalk.send($rec, "_class_", ["progress"]);return smalltalk.send($rec, "_style_", [smalltalk.send(smalltalk.send("width:", "__comma", [smalltalk.send(smalltalk.send(self, "_percent", []), "_asString", [])]), "__comma", [unescape("%25")])]);})(smalltalk.send(html, "_div", []));})]);
  2560. return self;}
  2561. }),
  2562. smalltalk.ProgressBar);
  2563. smalltalk.addMethod(
  2564. '_updatePercent_',
  2565. smalltalk.method({
  2566. selector: 'updatePercent:',
  2567. fn: function (aNumber){
  2568. var self=this;
  2569. smalltalk.send(self, "_percent_", [aNumber]);
  2570. smalltalk.send(self, "_renderProgressBar", []);
  2571. return self;}
  2572. }),
  2573. smalltalk.ProgressBar);
  2574. smalltalk.addClass('TestRunner', smalltalk.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  2575. smalltalk.addMethod(
  2576. '_label',
  2577. smalltalk.method({
  2578. selector: 'label',
  2579. fn: function (){
  2580. var self=this;
  2581. return "SUnit";
  2582. return self;}
  2583. }),
  2584. smalltalk.TestRunner);
  2585. smalltalk.addMethod(
  2586. '_packages',
  2587. smalltalk.method({
  2588. selector: 'packages',
  2589. fn: function (){
  2590. var self=this;
  2591. var packages=nil;
  2592. packages=smalltalk.send((smalltalk.Array || Array), "_new", []);
  2593. smalltalk.send(smalltalk.send(self, "_allClasses", []), "_do_", [(function(each){return ((($receiver = smalltalk.send(packages, "_includes_", [smalltalk.send(each, "_category", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(packages, "_add_", [smalltalk.send(each, "_category", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(packages, "_add_", [smalltalk.send(each, "_category", [])]);})]));})]);
  2594. return smalltalk.send(packages, "_sort", []);
  2595. return self;}
  2596. }),
  2597. smalltalk.TestRunner);
  2598. smalltalk.addMethod(
  2599. '_classes',
  2600. smalltalk.method({
  2601. selector: 'classes',
  2602. fn: function (){
  2603. var self=this;
  2604. return 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 ((($receiver = smalltalk.send(a, "_name", [])).klass === smalltalk.Number) ? $receiver >smalltalk.send(b, "_name", []) : smalltalk.send($receiver, "__gt", [smalltalk.send(b, "_name", [])]));})]);
  2605. return self;}
  2606. }),
  2607. smalltalk.TestRunner);
  2608. smalltalk.addMethod(
  2609. '_selectedCategories',
  2610. smalltalk.method({
  2611. selector: 'selectedCategories',
  2612. fn: function (){
  2613. var self=this;
  2614. return (($receiver = self['@selectedCategories']) == nil || $receiver == undefined) ? (function(){return self['@selectedCategories']=smalltalk.send((smalltalk.Array || Array), "_new", []);})() : $receiver;
  2615. return self;}
  2616. }),
  2617. smalltalk.TestRunner);
  2618. smalltalk.addMethod(
  2619. '_allClasses',
  2620. smalltalk.method({
  2621. selector: 'allClasses',
  2622. fn: function (){
  2623. var self=this;
  2624. return smalltalk.send((smalltalk.TestCase || TestCase), "_allSubclasses", []);
  2625. return self;}
  2626. }),
  2627. smalltalk.TestRunner);
  2628. smalltalk.addMethod(
  2629. '_selectedClasses',
  2630. smalltalk.method({
  2631. selector: 'selectedClasses',
  2632. fn: function (){
  2633. var self=this;
  2634. return (($receiver = self['@selectedClasses']) == nil || $receiver == undefined) ? (function(){return self['@selectedClasses']=smalltalk.send((smalltalk.Array || Array), "_new", []);})() : $receiver;
  2635. return self;}
  2636. }),
  2637. smalltalk.TestRunner);
  2638. smalltalk.addMethod(
  2639. '_progressBar',
  2640. smalltalk.method({
  2641. selector: 'progressBar',
  2642. fn: function (){
  2643. var self=this;
  2644. return (($receiver = self['@progressBar']) == nil || $receiver == undefined) ? (function(){return self['@progressBar']=smalltalk.send((smalltalk.ProgressBar || ProgressBar), "_new", []);})() : $receiver;
  2645. return self;}
  2646. }),
  2647. smalltalk.TestRunner);
  2648. smalltalk.addMethod(
  2649. '_statusInfo',
  2650. smalltalk.method({
  2651. selector: 'statusInfo',
  2652. fn: function (){
  2653. var self=this;
  2654. return 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", [])]);
  2655. return self;}
  2656. }),
  2657. smalltalk.TestRunner);
  2658. smalltalk.addMethod(
  2659. '_result',
  2660. smalltalk.method({
  2661. selector: 'result',
  2662. fn: function (){
  2663. var self=this;
  2664. return self['@result'];
  2665. return self;}
  2666. }),
  2667. smalltalk.TestRunner);
  2668. smalltalk.addMethod(
  2669. '_testCases',
  2670. smalltalk.method({
  2671. selector: 'testCases',
  2672. fn: function (){
  2673. var self=this;
  2674. var testCases=nil;
  2675. testCases=[];
  2676. smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_do_", [(function(each){return smalltalk.send(testCases, "_addAll_", [smalltalk.send(each, "_buildSuite", [])]);})]);
  2677. return testCases;
  2678. return self;}
  2679. }),
  2680. smalltalk.TestRunner);
  2681. smalltalk.addMethod(
  2682. '_selectAllCategories',
  2683. smalltalk.method({
  2684. selector: 'selectAllCategories',
  2685. fn: function (){
  2686. var self=this;
  2687. smalltalk.send(smalltalk.send(self, "_packages", []), "_do_", [(function(each){return ((($receiver = smalltalk.send(self['@selectedCategories'], "_includes_", [each])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_add_", [each]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_add_", [each]);})]));})]);
  2688. (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);
  2689. return self;}
  2690. }),
  2691. smalltalk.TestRunner);
  2692. smalltalk.addMethod(
  2693. '_toggleCategory_',
  2694. smalltalk.method({
  2695. selector: 'toggleCategory:',
  2696. fn: function (aCategory){
  2697. var self=this;
  2698. ((($receiver = smalltalk.send(self, "_isSelectedCategory_", [aCategory])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self['@selectedCategories'], "_add_", [aCategory]);})() : (function(){return smalltalk.send(self['@selectedCategories'], "_remove_", [aCategory]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self['@selectedCategories'], "_add_", [aCategory]);}), (function(){return smalltalk.send(self['@selectedCategories'], "_remove_", [aCategory]);})]));
  2699. (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);
  2700. return self;}
  2701. }),
  2702. smalltalk.TestRunner);
  2703. smalltalk.addMethod(
  2704. '_toggleClass_',
  2705. smalltalk.method({
  2706. selector: 'toggleClass:',
  2707. fn: function (aClass){
  2708. var self=this;
  2709. ((($receiver = smalltalk.send(self, "_isSelectedClass_", [aClass])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self['@selectedClasses'], "_add_", [aClass]);})() : (function(){return smalltalk.send(self['@selectedClasses'], "_remove_", [aClass]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self['@selectedClasses'], "_add_", [aClass]);}), (function(){return smalltalk.send(self['@selectedClasses'], "_remove_", [aClass]);})]));
  2710. smalltalk.send(self, "_updateClassesList", []);
  2711. return self;}
  2712. }),
  2713. smalltalk.TestRunner);
  2714. smalltalk.addMethod(
  2715. '_selectAllClasses',
  2716. smalltalk.method({
  2717. selector: 'selectAllClasses',
  2718. fn: function (){
  2719. var self=this;
  2720. smalltalk.send(smalltalk.send(self, "_classes", []), "_do_", [(function(each){return ((($receiver = smalltalk.send(self['@selectedClasses'], "_includes_", [each])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_add_", [each]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_add_", [each]);})]));})]);
  2721. (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);
  2722. return self;}
  2723. }),
  2724. smalltalk.TestRunner);
  2725. smalltalk.addMethod(
  2726. '_run_',
  2727. smalltalk.method({
  2728. selector: 'run:',
  2729. fn: function (aCollection){
  2730. var self=this;
  2731. self['@result']=smalltalk.send((smalltalk.TestResult || TestResult), "_new", []);
  2732. (function($rec){smalltalk.send($rec, "_updateStatusDiv", []);return smalltalk.send($rec, "_updateMethodsList", []);})(self);
  2733. smalltalk.send(smalltalk.send(self, "_progressBar", []), "_updatePercent_", [(0)]);
  2734. smalltalk.send(self['@result'], "_total_", [smalltalk.send(aCollection, "_size", [])]);
  2735. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send((function(){smalltalk.send(each, "_runCaseFor_", [self['@result']]);smalltalk.send(smalltalk.send(self, "_progressBar", []), "_updatePercent_", [((($receiver = ((($receiver = smalltalk.send(self['@result'], "_runs", [])).klass === smalltalk.Number) ? $receiver /smalltalk.send(self['@result'], "_total", []) : smalltalk.send($receiver, "__slash", [smalltalk.send(self['@result'], "_total", [])]))).klass === smalltalk.Number) ? $receiver *(100) : smalltalk.send($receiver, "__star", [(100)]))]);smalltalk.send(self, "_updateStatusDiv", []);return smalltalk.send(self, "_updateMethodsList", []);}), "_valueWithTimeout_", [(100)]);})]);
  2736. return self;}
  2737. }),
  2738. smalltalk.TestRunner);
  2739. smalltalk.addMethod(
  2740. '_performFailure_',
  2741. smalltalk.method({
  2742. selector: 'performFailure:',
  2743. fn: function (aTestCase){
  2744. var self=this;
  2745. smalltalk.send(aTestCase, "_perform_", [smalltalk.send(aTestCase, "_selector", [])]);
  2746. return self;}
  2747. }),
  2748. smalltalk.TestRunner);
  2749. smalltalk.addMethod(
  2750. '_initialize',
  2751. smalltalk.method({
  2752. selector: 'initialize',
  2753. fn: function (){
  2754. var self=this;
  2755. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  2756. self['@result']=smalltalk.send((smalltalk.TestResult || TestResult), "_new", []);
  2757. return self;}
  2758. }),
  2759. smalltalk.TestRunner);
  2760. smalltalk.addMethod(
  2761. '_printErrors',
  2762. smalltalk.method({
  2763. selector: 'printErrors',
  2764. fn: function (){
  2765. var self=this;
  2766. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_size", []), "_asString", []), "__comma", [unescape("%20errors%2C%20")]);
  2767. return self;}
  2768. }),
  2769. smalltalk.TestRunner);
  2770. smalltalk.addMethod(
  2771. '_printFailures',
  2772. smalltalk.method({
  2773. selector: 'printFailures',
  2774. fn: function (){
  2775. var self=this;
  2776. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_size", []), "_asString", []), "__comma", [" failures"]);
  2777. return self;}
  2778. }),
  2779. smalltalk.TestRunner);
  2780. smalltalk.addMethod(
  2781. '_printPasses',
  2782. smalltalk.method({
  2783. selector: 'printPasses',
  2784. fn: function (){
  2785. var self=this;
  2786. return smalltalk.send(smalltalk.send(((($receiver = ((($receiver = smalltalk.send(smalltalk.send(self, "_result", []), "_total", [])).klass === smalltalk.Number) ? $receiver -smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_size", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_size", [])]))).klass === smalltalk.Number) ? $receiver -smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_size", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_size", [])])), "_asString", []), "__comma", [unescape("%20passes%2C%20")]);
  2787. return self;}
  2788. }),
  2789. smalltalk.TestRunner);
  2790. smalltalk.addMethod(
  2791. '_printTotal',
  2792. smalltalk.method({
  2793. selector: 'printTotal',
  2794. fn: function (){
  2795. var self=this;
  2796. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_total", []), "_asString", []), "__comma", [unescape("%20runs%2C%20")]);
  2797. return self;}
  2798. }),
  2799. smalltalk.TestRunner);
  2800. smalltalk.addMethod(
  2801. '_renderBoxOn_',
  2802. smalltalk.method({
  2803. selector: 'renderBoxOn:',
  2804. fn: function (html){
  2805. var self=this;
  2806. (function($rec){smalltalk.send($rec, "_renderCategoriesOn_", [html]);smalltalk.send($rec, "_renderClassesOn_", [html]);return smalltalk.send($rec, "_renderResultsOn_", [html]);})(self);
  2807. return self;}
  2808. }),
  2809. smalltalk.TestRunner);
  2810. smalltalk.addMethod(
  2811. '_renderButtonsOn_',
  2812. smalltalk.method({
  2813. selector: 'renderButtonsOn:',
  2814. fn: function (html){
  2815. var self=this;
  2816. (function($rec){smalltalk.send($rec, "_with_", ["Run selected"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_run_", [smalltalk.send(self, "_testCases", [])]);})]);})(smalltalk.send(html, "_button", []));
  2817. return self;}
  2818. }),
  2819. smalltalk.TestRunner);
  2820. smalltalk.addMethod(
  2821. '_renderCategoriesOn_',
  2822. smalltalk.method({
  2823. selector: 'renderCategoriesOn:',
  2824. fn: function (html){
  2825. var self=this;
  2826. self['@packagesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column sunit packages"]);
  2827. smalltalk.send(self, "_updateCategoriesList", []);
  2828. return self;}
  2829. }),
  2830. smalltalk.TestRunner);
  2831. smalltalk.addMethod(
  2832. '_renderClassesOn_',
  2833. smalltalk.method({
  2834. selector: 'renderClassesOn:',
  2835. fn: function (html){
  2836. var self=this;
  2837. self['@classesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column sunit classes"]);
  2838. smalltalk.send(self, "_updateClassesList", []);
  2839. return self;}
  2840. }),
  2841. smalltalk.TestRunner);
  2842. smalltalk.addMethod(
  2843. '_renderResultsOn_',
  2844. smalltalk.method({
  2845. selector: 'renderResultsOn:',
  2846. fn: function (html){
  2847. var self=this;
  2848. self['@statusDiv']=smalltalk.send(html, "_div", []);
  2849. smalltalk.send(html, "_with_", [smalltalk.send(self, "_progressBar", [])]);
  2850. self['@methodsList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column sunit results"]);
  2851. smalltalk.send(self, "_updateMethodsList", []);
  2852. smalltalk.send(self, "_updateStatusDiv", []);
  2853. return self;}
  2854. }),
  2855. smalltalk.TestRunner);
  2856. smalltalk.addMethod(
  2857. '_renderFailuresOn_',
  2858. smalltalk.method({
  2859. selector: 'renderFailuresOn:',
  2860. fn: function (html){
  2861. var self=this;
  2862. smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_do_", [(function(each){return (function($rec){smalltalk.send($rec, "_class_", ["failures"]);smalltalk.send($rec, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_class", []), "_name", []), "__comma", [unescape("%20%3E%3E%20")]), "__comma", [smalltalk.send(each, "_selector", [])])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_performFailure_", [each]);})]);})(smalltalk.send(html, "_li", []));})]);
  2863. return self;}
  2864. }),
  2865. smalltalk.TestRunner);
  2866. smalltalk.addMethod(
  2867. '_renderErrorsOn_',
  2868. smalltalk.method({
  2869. selector: 'renderErrorsOn:',
  2870. fn: function (html){
  2871. var self=this;
  2872. smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_do_", [(function(each){return (function($rec){smalltalk.send($rec, "_class_", ["errors"]);smalltalk.send($rec, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_class", []), "_name", []), "__comma", [unescape("%20%3E%3E%20")]), "__comma", [smalltalk.send(each, "_selector", [])])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_performFailure_", [each]);})]);})(smalltalk.send(html, "_li", []));})]);
  2873. return self;}
  2874. }),
  2875. smalltalk.TestRunner);
  2876. smalltalk.addMethod(
  2877. '_isSelectedClass_',
  2878. smalltalk.method({
  2879. selector: 'isSelectedClass:',
  2880. fn: function (aClass){
  2881. var self=this;
  2882. return smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_includes_", [aClass]);
  2883. return self;}
  2884. }),
  2885. smalltalk.TestRunner);
  2886. smalltalk.addMethod(
  2887. '_isSelectedCategory_',
  2888. smalltalk.method({
  2889. selector: 'isSelectedCategory:',
  2890. fn: function (aCategory){
  2891. var self=this;
  2892. return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [aCategory]);
  2893. return self;}
  2894. }),
  2895. smalltalk.TestRunner);
  2896. smalltalk.addMethod(
  2897. '_updateCategoriesList',
  2898. smalltalk.method({
  2899. selector: 'updateCategoriesList',
  2900. fn: function (){
  2901. var self=this;
  2902. smalltalk.send(self['@packagesList'], "_contents_", [(function(html){(function($rec){smalltalk.send($rec, "_class_", ["all"]);smalltalk.send($rec, "_with_", ["All"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectAllCategories", []);})]);})(smalltalk.send(html, "_li", []));return smalltalk.send(smalltalk.send(self, "_packages", []), "_do_", [(function(each){var li=nil;
  2903. li=smalltalk.send(html, "_li", []);((($receiver = smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));return (function($rec){smalltalk.send($rec, "_with_", [each]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_toggleCategory_", [each]);})]);})(li);})]);})]);
  2904. return self;}
  2905. }),
  2906. smalltalk.TestRunner);
  2907. smalltalk.addMethod(
  2908. '_updateClassesList',
  2909. smalltalk.method({
  2910. selector: 'updateClassesList',
  2911. fn: function (){
  2912. var self=this;
  2913. smalltalk.send(self['@classesList'], "_contents_", [(function(html){((($receiver = smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function($rec){smalltalk.send($rec, "_class_", ["all"]);smalltalk.send($rec, "_with_", ["All"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectAllClasses", []);})]);})(smalltalk.send(html, "_li", []));})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function($rec){smalltalk.send($rec, "_class_", ["all"]);smalltalk.send($rec, "_with_", ["All"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectAllClasses", []);})]);})(smalltalk.send(html, "_li", []));})]));return smalltalk.send(smalltalk.send(self, "_classes", []), "_do_", [(function(each){var li=nil;
  2914. li=smalltalk.send(html, "_li", []);((($receiver = smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_includes_", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));return (function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(each, "_name", [])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_toggleClass_", [each]);})]);})(li);})]);})]);
  2915. return self;}
  2916. }),
  2917. smalltalk.TestRunner);
  2918. smalltalk.addMethod(
  2919. '_updateMethodsList',
  2920. smalltalk.method({
  2921. selector: 'updateMethodsList',
  2922. fn: function (){
  2923. var self=this;
  2924. smalltalk.send(self['@methodsList'], "_contents_", [(function(html){smalltalk.send(self, "_renderErrorsOn_", [html]);return smalltalk.send(self, "_renderFailuresOn_", [html]);})]);
  2925. return self;}
  2926. }),
  2927. smalltalk.TestRunner);
  2928. smalltalk.addMethod(
  2929. '_updateStatusDiv',
  2930. smalltalk.method({
  2931. selector: 'updateStatusDiv',
  2932. fn: function (){
  2933. var self=this;
  2934. smalltalk.send(self['@statusDiv'], "_class_", [smalltalk.send("sunit status ", "__comma", [smalltalk.send(self['@result'], "_status", [])])]);
  2935. smalltalk.send(self['@statusDiv'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(html, "_span", []), "_with_", [smalltalk.send(self, "_statusInfo", [])]);})]);
  2936. return self;}
  2937. }),
  2938. smalltalk.TestRunner);
  2939. smalltalk.addClass('IDETranscript', smalltalk.TabWidget, ['textarea'], 'IDE');
  2940. smalltalk.addMethod(
  2941. '_label',
  2942. smalltalk.method({
  2943. selector: 'label',
  2944. fn: function (){
  2945. var self=this;
  2946. return "Transcript";
  2947. return self;}
  2948. }),
  2949. smalltalk.IDETranscript);
  2950. smalltalk.addMethod(
  2951. '_clear',
  2952. smalltalk.method({
  2953. selector: 'clear',
  2954. fn: function (){
  2955. var self=this;
  2956. smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [""]);
  2957. return self;}
  2958. }),
  2959. smalltalk.IDETranscript);
  2960. smalltalk.addMethod(
  2961. '_cr',
  2962. smalltalk.method({
  2963. selector: 'cr',
  2964. fn: function (){
  2965. var self=this;
  2966. 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", [])])]);
  2967. return self;}
  2968. }),
  2969. smalltalk.IDETranscript);
  2970. smalltalk.addMethod(
  2971. '_show_',
  2972. smalltalk.method({
  2973. selector: 'show:',
  2974. fn: function (anObject){
  2975. var self=this;
  2976. smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [smalltalk.send(smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val", []), "__comma", [smalltalk.send(anObject, "_asString", [])])]);
  2977. return self;}
  2978. }),
  2979. smalltalk.IDETranscript);
  2980. smalltalk.addMethod(
  2981. '_open',
  2982. smalltalk.method({
  2983. selector: 'open',
  2984. fn: function (){
  2985. var self=this;
  2986. (function($rec){smalltalk.send($rec, "_open", []);return smalltalk.send($rec, "_selectTab_", [self]);})(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []));
  2987. return self;}
  2988. }),
  2989. smalltalk.IDETranscript);
  2990. smalltalk.addMethod(
  2991. '_renderBoxOn_',
  2992. smalltalk.method({
  2993. selector: 'renderBoxOn:',
  2994. fn: function (html){
  2995. var self=this;
  2996. self['@textarea']=smalltalk.send(html, "_textarea", []);
  2997. (function($rec){smalltalk.send($rec, "_class_", ["jt_transcript"]);return smalltalk.send($rec, "_at_put_", ["spellcheck", "false"]);})(self['@textarea']);
  2998. return self;}
  2999. }),
  3000. smalltalk.IDETranscript);
  3001. smalltalk.addMethod(
  3002. '_renderButtonsOn_',
  3003. smalltalk.method({
  3004. selector: 'renderButtonsOn:',
  3005. fn: function (html){
  3006. var self=this;
  3007. (function($rec){smalltalk.send($rec, "_with_", ["Clear transcript"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_clear", []);})]);})(smalltalk.send(html, "_button", []));
  3008. return self;}
  3009. }),
  3010. smalltalk.IDETranscript);
  3011. smalltalk.IDETranscript.klass.iVarNames = ['current'];
  3012. smalltalk.addMethod(
  3013. '_initialize',
  3014. smalltalk.method({
  3015. selector: 'initialize',
  3016. fn: function (){
  3017. var self=this;
  3018. smalltalk.send((smalltalk.Transcript || Transcript), "_register_", [smalltalk.send(self, "_current", [])]);
  3019. return self;}
  3020. }),
  3021. smalltalk.IDETranscript.klass);
  3022. smalltalk.addMethod(
  3023. '_new',
  3024. smalltalk.method({
  3025. selector: 'new',
  3026. fn: function (){
  3027. var self=this;
  3028. smalltalk.send(self, "_shouldNotImplement", []);
  3029. return self;}
  3030. }),
  3031. smalltalk.IDETranscript.klass);
  3032. smalltalk.addMethod(
  3033. '_open',
  3034. smalltalk.method({
  3035. selector: 'open',
  3036. fn: function (){
  3037. var self=this;
  3038. (function($rec){smalltalk.send($rec, "_open", []);return smalltalk.send($rec, "_selectTab_", [smalltalk.send(self, "_current", [])]);})(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []));
  3039. return self;}
  3040. }),
  3041. smalltalk.IDETranscript.klass);
  3042. smalltalk.addMethod(
  3043. '_current',
  3044. smalltalk.method({
  3045. selector: 'current',
  3046. fn: function (){
  3047. var self=this;
  3048. return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return self['@current']=smalltalk.send(self, "_new", [], smalltalk.TabWidget.klass);})() : $receiver;
  3049. return self;}
  3050. }),
  3051. smalltalk.IDETranscript.klass);
  3052. smalltalk.addMethod(
  3053. '_inspect',
  3054. smalltalk.method({
  3055. selector: 'inspect',
  3056. fn: function (){
  3057. var self=this;
  3058. (function($rec){smalltalk.send($rec, "_inspect_", [self]);return smalltalk.send($rec, "_open", []);})(smalltalk.send((smalltalk.Inspector || Inspector), "_new", []));
  3059. return self;}
  3060. }),
  3061. smalltalk.Object);
  3062. smalltalk.addMethod(
  3063. '_inspectOn_',
  3064. smalltalk.method({
  3065. selector: 'inspectOn:',
  3066. fn: function (anInspector){
  3067. var self=this;
  3068. var variables=nil;
  3069. variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  3070. smalltalk.send(variables, "_at_put_", [unescape("%23self"), self]);
  3071. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_allInstanceVariableNames", []), "_do_", [(function(each){return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);})]);
  3072. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  3073. return self;}
  3074. }),
  3075. smalltalk.Object);
  3076. smalltalk.addMethod(
  3077. '_inspectOn_',
  3078. smalltalk.method({
  3079. selector: 'inspectOn:',
  3080. fn: function (anInspector){
  3081. var self=this;
  3082. var variables=nil;
  3083. variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  3084. smalltalk.send(variables, "_at_put_", [unescape("%23self"), self]);
  3085. smalltalk.send(variables, "_at_put_", [unescape("%23year"), smalltalk.send(self, "_year", [])]);
  3086. smalltalk.send(variables, "_at_put_", [unescape("%23month"), smalltalk.send(self, "_month", [])]);
  3087. smalltalk.send(variables, "_at_put_", [unescape("%23day"), smalltalk.send(self, "_day", [])]);
  3088. smalltalk.send(variables, "_at_put_", [unescape("%23hours"), smalltalk.send(self, "_hours", [])]);
  3089. smalltalk.send(variables, "_at_put_", [unescape("%23minutes"), smalltalk.send(self, "_minutes", [])]);
  3090. smalltalk.send(variables, "_at_put_", [unescape("%23seconds"), smalltalk.send(self, "_seconds", [])]);
  3091. smalltalk.send(variables, "_at_put_", [unescape("%23milliseconds"), smalltalk.send(self, "_milliseconds", [])]);
  3092. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  3093. return self;}
  3094. }),
  3095. smalltalk.Date);
  3096. smalltalk.addMethod(
  3097. '_inspectOn_',
  3098. smalltalk.method({
  3099. selector: 'inspectOn:',
  3100. fn: function (anInspector){
  3101. var self=this;
  3102. var variables=nil;
  3103. variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  3104. smalltalk.send(variables, "_at_put_", [unescape("%23self"), self]);
  3105. smalltalk.send(self, "_withIndexDo_", [(function(each, i){return smalltalk.send(variables, "_at_put_", [i, each]);})]);
  3106. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  3107. return self;}
  3108. }),
  3109. smalltalk.Collection);
  3110. smalltalk.addMethod(
  3111. '_inspectOn_',
  3112. smalltalk.method({
  3113. selector: 'inspectOn:',
  3114. fn: function (anInspector){
  3115. var self=this;
  3116. var label=nil;
  3117. smalltalk.send(self, "_inspectOn_", [anInspector], smalltalk.SequenceableCollection);
  3118. ((($receiver = ((($receiver = smalltalk.send(smalltalk.send(self, "_printString", []), "_size", [])).klass === smalltalk.Number) ? $receiver >(30) : smalltalk.send($receiver, "__gt", [(30)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return label=smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", []), "_copyFrom_to_", [(1), (30)]), "__comma", [unescape("...%27")]);})() : (function(){return label=smalltalk.send(self, "_printString", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return label=smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", []), "_copyFrom_to_", [(1), (30)]), "__comma", [unescape("...%27")]);}), (function(){return label=smalltalk.send(self, "_printString", []);})]));
  3119. smalltalk.send(anInspector, "_setLabel_", [label]);
  3120. return self;}
  3121. }),
  3122. smalltalk.String);
  3123. smalltalk.addMethod(
  3124. '_inspectOn_',
  3125. smalltalk.method({
  3126. selector: 'inspectOn:',
  3127. fn: function (anInspector){
  3128. var self=this;
  3129. var variables=nil;
  3130. variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  3131. smalltalk.send(variables, "_at_put_", [unescape("%23self"), self]);
  3132. smalltalk.send(variables, "_at_put_", [unescape("%23home"), smalltalk.send(self, "_home", [])]);
  3133. smalltalk.send(variables, "_at_put_", [unescape("%23receiver"), smalltalk.send(self, "_receiver", [])]);
  3134. smalltalk.send(variables, "_at_put_", [unescape("%23selector"), smalltalk.send(self, "_selector", [])]);
  3135. smalltalk.send(variables, "_at_put_", [unescape("%23temps"), smalltalk.send(self, "_temps", [])]);
  3136. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_instanceVariableNames", []), "_do_", [(function(each){return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);})]);
  3137. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  3138. return self;}
  3139. }),
  3140. smalltalk.MethodContext);
  3141. smalltalk.addMethod(
  3142. '_inspectOn_',
  3143. smalltalk.method({
  3144. selector: 'inspectOn:',
  3145. fn: function (anInspector){
  3146. var self=this;
  3147. var variables=nil;
  3148. variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  3149. smalltalk.send(variables, "_at_put_", [unescape("%23self"), self]);
  3150. smalltalk.send(variables, "_at_put_", [unescape("%23keys"), smalltalk.send(self, "_keys", [])]);
  3151. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(variables, "_at_put_", [key, value]);})]);
  3152. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  3153. return self;}
  3154. }),
  3155. smalltalk.Dictionary);