1
0

IDE.deploy.js 169 KB

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