IDE.deploy.js 170 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455
  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']]);smalltalk.send((typeof jQuery == 'undefined' ? nil : jQuery), "_ajax_options_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(package, "_commitPathJs", []), "__comma", [unescape("/")]), "__comma", [self['@selectedPackage']]), "__comma", [".js"]), smalltalk.Dictionary._fromPairs_([smalltalk.send("type", "__minus_gt", ["PUT"]),smalltalk.send("data", "__minus_gt", [smalltalk.send(smalltalk.send((smalltalk.Exporter || Exporter), "_new", []), "_exportPackage_", [self['@selectedPackage']])]),smalltalk.send("error", "__minus_gt", [(function(){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", [unescape("Commit%20failed%21")]);})])])]);smalltalk.send((typeof jQuery == 'undefined' ? nil : jQuery), "_ajax_options_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(package, "_commitPathJs", []), "__comma", [unescape("/")]), "__comma", [self['@selectedPackage']]), "__comma", [".deploy.js"]), smalltalk.Dictionary._fromPairs_([smalltalk.send("type", "__minus_gt", ["PUT"]),smalltalk.send("data", "__minus_gt", [smalltalk.send(smalltalk.send((smalltalk.StrippedExporter || StrippedExporter), "_new", []), "_exportPackage_", [self['@selectedPackage']])]),smalltalk.send("error", "__minus_gt", [(function(){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", [unescape("Commit%20failed%21")]);})])])]);return smalltalk.send((typeof jQuery == 'undefined' ? nil : jQuery), "_ajax_options_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(package, "_commitPathSt", []), "__comma", [unescape("/")]), "__comma", [self['@selectedPackage']]), "__comma", [".st"]), smalltalk.Dictionary._fromPairs_([smalltalk.send("type", "__minus_gt", ["PUT"]),smalltalk.send("data", "__minus_gt", [smalltalk.send(smalltalk.send((smalltalk.ChunkExporter || ChunkExporter), "_new", []), "_exportPackage_", [self['@selectedPackage']])]),smalltalk.send("error", "__minus_gt", [(function(){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", [unescape("Commit%20failed%21")]);})])])]);})() : nil;
  951. return self;}
  952. }),
  953. smalltalk.Browser);
  954. smalltalk.addMethod(
  955. '_renamePackage',
  956. smalltalk.method({
  957. selector: 'renamePackage',
  958. fn: function (){
  959. var self=this;
  960. var newName=nil;
  961. newName=smalltalk.send((typeof window == 'undefined' ? nil : window), "_prompt_", [smalltalk.send("Rename package ", "__comma", [self['@selectedPackage']])]);
  962. (($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;
  963. return self;}
  964. }),
  965. smalltalk.Browser);
  966. smalltalk.addMethod(
  967. '_removePackage',
  968. smalltalk.method({
  969. selector: 'removePackage',
  970. fn: function (){
  971. var self=this;
  972. ((($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", []);})]));
  973. return self;}
  974. }),
  975. smalltalk.Browser);
  976. smalltalk.addMethod(
  977. '_initialize',
  978. smalltalk.method({
  979. selector: 'initialize',
  980. fn: function (){
  981. var self=this;
  982. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  983. self['@selectedTab']="instance";
  984. self['@selectedPackage']=smalltalk.send(smalltalk.send(self, "_packages", []), "_first", []);
  985. self['@unsavedChanges']=false;
  986. return self;}
  987. }),
  988. smalltalk.Browser);
  989. smalltalk.addMethod(
  990. '_renderBoxOn_',
  991. smalltalk.method({
  992. selector: 'renderBoxOn:',
  993. fn: function (html){
  994. var self=this;
  995. (function($rec){smalltalk.send($rec, "_renderTopPanelOn_", [html]);smalltalk.send($rec, "_renderTabsOn_", [html]);return smalltalk.send($rec, "_renderBottomPanelOn_", [html]);})(self);
  996. return self;}
  997. }),
  998. smalltalk.Browser);
  999. smalltalk.addMethod(
  1000. '_renderTopPanelOn_',
  1001. smalltalk.method({
  1002. selector: 'renderTopPanelOn:',
  1003. fn: function (html){
  1004. var self=this;
  1005. (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", []));
  1006. return self;}
  1007. }),
  1008. smalltalk.Browser);
  1009. smalltalk.addMethod(
  1010. '_renderTabsOn_',
  1011. smalltalk.method({
  1012. selector: 'renderTabsOn:',
  1013. fn: function (html){
  1014. var self=this;
  1015. self['@tabsList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_tabs jt_browser"]);
  1016. smalltalk.send(self, "_updateTabsList", []);
  1017. return self;}
  1018. }),
  1019. smalltalk.Browser);
  1020. smalltalk.addMethod(
  1021. '_renderBottomPanelOn_',
  1022. smalltalk.method({
  1023. selector: 'renderBottomPanelOn:',
  1024. fn: function (html){
  1025. var self=this;
  1026. (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", []));
  1027. return self;}
  1028. }),
  1029. smalltalk.Browser);
  1030. smalltalk.addMethod(
  1031. '_renderButtonsOn_',
  1032. smalltalk.method({
  1033. selector: 'renderButtonsOn:',
  1034. fn: function (html){
  1035. var self=this;
  1036. self['@saveButton']=smalltalk.send(html, "_button", []);
  1037. (function($rec){smalltalk.send($rec, "_with_", ["Save"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_compile", []);})]);})(self['@saveButton']);
  1038. self['@methodButtons']=smalltalk.send(html, "_span", []);
  1039. self['@classButtons']=smalltalk.send(html, "_span", []);
  1040. (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", []));
  1041. smalltalk.send(self, "_updateSourceAndButtons", []);
  1042. return self;}
  1043. }),
  1044. smalltalk.Browser);
  1045. smalltalk.addMethod(
  1046. '_canBeClosed',
  1047. smalltalk.method({
  1048. selector: 'canBeClosed',
  1049. fn: function (){
  1050. var self=this;
  1051. return true;
  1052. return self;}
  1053. }),
  1054. smalltalk.Browser);
  1055. smalltalk.addMethod(
  1056. '_updateCategoriesList',
  1057. smalltalk.method({
  1058. selector: 'updateCategoriesList',
  1059. fn: function (){
  1060. var self=this;
  1061. smalltalk.send(self['@packagesList'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(self, "_packages", []), "_do_", [(function(each){var li=nil;
  1062. var label=nil;
  1063. ((($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);})]);})]);
  1064. return self;}
  1065. }),
  1066. smalltalk.Browser);
  1067. smalltalk.addMethod(
  1068. '_updateClassesList',
  1069. smalltalk.method({
  1070. selector: 'updateClassesList',
  1071. fn: function (){
  1072. var self=this;
  1073. smalltalk.send(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []), "_update", []);
  1074. smalltalk.send(self['@classesList'], "_updateNodes", []);
  1075. return self;}
  1076. }),
  1077. smalltalk.Browser);
  1078. smalltalk.addMethod(
  1079. '_updateProtocolsList',
  1080. smalltalk.method({
  1081. selector: 'updateProtocolsList',
  1082. fn: function (){
  1083. var self=this;
  1084. smalltalk.send(self['@protocolsList'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [(function(each){var li=nil;
  1085. 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);})]);})]);
  1086. return self;}
  1087. }),
  1088. smalltalk.Browser);
  1089. smalltalk.addMethod(
  1090. '_updateMethodsList',
  1091. smalltalk.method({
  1092. selector: 'updateMethodsList',
  1093. fn: function (){
  1094. var self=this;
  1095. smalltalk.send(self['@methodsList'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(self, "_methods", []), "_do_", [(function(each){var li=nil;
  1096. 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);})]);})]);
  1097. return self;}
  1098. }),
  1099. smalltalk.Browser);
  1100. smalltalk.addMethod(
  1101. '_updateTabsList',
  1102. smalltalk.method({
  1103. selector: 'updateTabsList',
  1104. fn: function (){
  1105. var self=this;
  1106. smalltalk.send(self['@tabsList'], "_contents_", [(function(html){var li=nil;
  1107. 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);})]);
  1108. return self;}
  1109. }),
  1110. smalltalk.Browser);
  1111. smalltalk.addMethod(
  1112. '_updateSourceAndButtons',
  1113. smalltalk.method({
  1114. selector: 'updateSourceAndButtons',
  1115. fn: function (){
  1116. var self=this;
  1117. smalltalk.send(self, "_disableSaveButton", []);
  1118. 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", []));})]);
  1119. smalltalk.send(self['@methodButtons'], "_contents_", [(function(html){var protocolSelect=nil;
  1120. var referencesSelect=nil;
  1121. (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);})]));})]);
  1122. ((($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", []);})]));
  1123. smalltalk.send(self['@sourceArea'], "_val_", [smalltalk.send(self, "_source", [])]);
  1124. return self;}
  1125. }),
  1126. smalltalk.Browser);
  1127. smalltalk.addMethod(
  1128. '_updateStatus',
  1129. smalltalk.method({
  1130. selector: 'updateStatus',
  1131. fn: function (){
  1132. var self=this;
  1133. ((($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;})]));
  1134. return self;}
  1135. }),
  1136. smalltalk.Browser);
  1137. smalltalk.addMethod(
  1138. '_resetClassesList',
  1139. smalltalk.method({
  1140. selector: 'resetClassesList',
  1141. fn: function (){
  1142. var self=this;
  1143. smalltalk.send(self['@classesList'], "_resetNodes", []);
  1144. return self;}
  1145. }),
  1146. smalltalk.Browser);
  1147. smalltalk.addMethod(
  1148. '_commitPackageToLocalStorage',
  1149. smalltalk.method({
  1150. selector: 'commitPackageToLocalStorage',
  1151. fn: function (){
  1152. var self=this;
  1153. var key=nil;
  1154. var sourceCode=nil;
  1155. (($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;
  1156. return self;}
  1157. }),
  1158. smalltalk.Browser);
  1159. smalltalk.addMethod(
  1160. '_classDeclarationTemplate',
  1161. smalltalk.method({
  1162. selector: 'classDeclarationTemplate',
  1163. fn: function (){
  1164. var self=this;
  1165. 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")]);
  1166. return self;}
  1167. }),
  1168. smalltalk.Browser);
  1169. smalltalk.addMethod(
  1170. '_selectedPackage',
  1171. smalltalk.method({
  1172. selector: 'selectedPackage',
  1173. fn: function (){
  1174. var self=this;
  1175. return self['@selectedPackage'];
  1176. return self;}
  1177. }),
  1178. smalltalk.Browser);
  1179. smalltalk.addMethod(
  1180. '_addNewClass',
  1181. smalltalk.method({
  1182. selector: 'addNewClass',
  1183. fn: function (){
  1184. var self=this;
  1185. var className=nil;
  1186. className=smalltalk.send((typeof window == 'undefined' ? nil : window), "_prompt_", ["New class"]);
  1187. ((($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])]);})]));
  1188. return self;}
  1189. }),
  1190. smalltalk.Browser);
  1191. smalltalk.addMethod(
  1192. '_commitPathJs',
  1193. smalltalk.method({
  1194. selector: 'commitPathJs',
  1195. fn: function (){
  1196. var self=this;
  1197. return "js";
  1198. return self;}
  1199. }),
  1200. smalltalk.Browser.klass);
  1201. smalltalk.addMethod(
  1202. '_commitPathSt',
  1203. smalltalk.method({
  1204. selector: 'commitPathSt',
  1205. fn: function (){
  1206. var self=this;
  1207. return "st";
  1208. return self;}
  1209. }),
  1210. smalltalk.Browser.klass);
  1211. smalltalk.addMethod(
  1212. '_openOn_',
  1213. smalltalk.method({
  1214. selector: 'openOn:',
  1215. fn: function (aClass){
  1216. var self=this;
  1217. 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", []));
  1218. return self;}
  1219. }),
  1220. smalltalk.Browser.klass);
  1221. smalltalk.addMethod(
  1222. '_open',
  1223. smalltalk.method({
  1224. selector: 'open',
  1225. fn: function (){
  1226. var self=this;
  1227. smalltalk.send(smalltalk.send(self, "_new", []), "_open", []);
  1228. return self;}
  1229. }),
  1230. smalltalk.Browser.klass);
  1231. smalltalk.addClass('Inspector', smalltalk.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  1232. smalltalk.addMethod(
  1233. '_label',
  1234. smalltalk.method({
  1235. selector: 'label',
  1236. fn: function (){
  1237. var self=this;
  1238. return (($receiver = self['@label']) == nil || $receiver == undefined) ? (function(){return unescape("Inspector%20%28nil%29");})() : $receiver;
  1239. return self;}
  1240. }),
  1241. smalltalk.Inspector);
  1242. smalltalk.addMethod(
  1243. '_variables',
  1244. smalltalk.method({
  1245. selector: 'variables',
  1246. fn: function (){
  1247. var self=this;
  1248. return self['@variables'];
  1249. return self;}
  1250. }),
  1251. smalltalk.Inspector);
  1252. smalltalk.addMethod(
  1253. '_setVariables_',
  1254. smalltalk.method({
  1255. selector: 'setVariables:',
  1256. fn: function (aCollection){
  1257. var self=this;
  1258. self['@variables']=aCollection;
  1259. return self;}
  1260. }),
  1261. smalltalk.Inspector);
  1262. smalltalk.addMethod(
  1263. '_setLabel_',
  1264. smalltalk.method({
  1265. selector: 'setLabel:',
  1266. fn: function (aString){
  1267. var self=this;
  1268. self['@label']=aString;
  1269. return self;}
  1270. }),
  1271. smalltalk.Inspector);
  1272. smalltalk.addMethod(
  1273. '_selectedVariable',
  1274. smalltalk.method({
  1275. selector: 'selectedVariable',
  1276. fn: function (){
  1277. var self=this;
  1278. return self['@selectedVariable'];
  1279. return self;}
  1280. }),
  1281. smalltalk.Inspector);
  1282. smalltalk.addMethod(
  1283. '_selectedVariable_',
  1284. smalltalk.method({
  1285. selector: 'selectedVariable:',
  1286. fn: function (aString){
  1287. var self=this;
  1288. self['@selectedVariable']=aString;
  1289. return self;}
  1290. }),
  1291. smalltalk.Inspector);
  1292. smalltalk.addMethod(
  1293. '_sourceArea',
  1294. smalltalk.method({
  1295. selector: 'sourceArea',
  1296. fn: function (){
  1297. var self=this;
  1298. return self['@sourceArea'];
  1299. return self;}
  1300. }),
  1301. smalltalk.Inspector);
  1302. smalltalk.addMethod(
  1303. '_inspect_',
  1304. smalltalk.method({
  1305. selector: 'inspect:',
  1306. fn: function (anObject){
  1307. var self=this;
  1308. self['@object']=anObject;
  1309. self['@variables']=[];
  1310. smalltalk.send(self['@object'], "_inspectOn_", [self]);
  1311. return self;}
  1312. }),
  1313. smalltalk.Inspector);
  1314. smalltalk.addMethod(
  1315. '_dive',
  1316. smalltalk.method({
  1317. selector: 'dive',
  1318. fn: function (){
  1319. var self=this;
  1320. smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_inspect", []);
  1321. return self;}
  1322. }),
  1323. smalltalk.Inspector);
  1324. smalltalk.addMethod(
  1325. '_refresh',
  1326. smalltalk.method({
  1327. selector: 'refresh',
  1328. fn: function (){
  1329. var self=this;
  1330. (function($rec){smalltalk.send($rec, "_inspect_", [self['@object']]);smalltalk.send($rec, "_updateVariablesList", []);return smalltalk.send($rec, "_updateValueTextarea", []);})(self);
  1331. return self;}
  1332. }),
  1333. smalltalk.Inspector);
  1334. smalltalk.addMethod(
  1335. '_renderBoxOn_',
  1336. smalltalk.method({
  1337. selector: 'renderBoxOn:',
  1338. fn: function (html){
  1339. var self=this;
  1340. (function($rec){smalltalk.send($rec, "_renderTopPanelOn_", [html]);return smalltalk.send($rec, "_renderBottomPanelOn_", [html]);})(self);
  1341. return self;}
  1342. }),
  1343. smalltalk.Inspector);
  1344. smalltalk.addMethod(
  1345. '_renderTopPanelOn_',
  1346. smalltalk.method({
  1347. selector: 'renderTopPanelOn:',
  1348. fn: function (html){
  1349. var self=this;
  1350. (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", []));
  1351. (function($rec){smalltalk.send($rec, "_updateVariablesList", []);return smalltalk.send($rec, "_updateValueTextarea", []);})(self);
  1352. return self;}
  1353. }),
  1354. smalltalk.Inspector);
  1355. smalltalk.addMethod(
  1356. '_renderBottomPanelOn_',
  1357. smalltalk.method({
  1358. selector: 'renderBottomPanelOn:',
  1359. fn: function (html){
  1360. var self=this;
  1361. (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", []));
  1362. return self;}
  1363. }),
  1364. smalltalk.Inspector);
  1365. smalltalk.addMethod(
  1366. '_renderButtonsOn_',
  1367. smalltalk.method({
  1368. selector: 'renderButtonsOn:',
  1369. fn: function (html){
  1370. var self=this;
  1371. (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", []));
  1372. (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", []));
  1373. (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", []));
  1374. smalltalk.send(self, "_updateButtons", []);
  1375. return self;}
  1376. }),
  1377. smalltalk.Inspector);
  1378. smalltalk.addMethod(
  1379. '_canBeClosed',
  1380. smalltalk.method({
  1381. selector: 'canBeClosed',
  1382. fn: function (){
  1383. var self=this;
  1384. return true;
  1385. return self;}
  1386. }),
  1387. smalltalk.Inspector);
  1388. smalltalk.addMethod(
  1389. '_updateVariablesList',
  1390. smalltalk.method({
  1391. selector: 'updateVariablesList',
  1392. fn: function (){
  1393. var self=this;
  1394. smalltalk.send(self['@variablesList'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_keys", []), "_do_", [(function(each){var li=nil;
  1395. 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"]);})]));})]);})]);
  1396. return self;}
  1397. }),
  1398. smalltalk.Inspector);
  1399. smalltalk.addMethod(
  1400. '_selectVariable_',
  1401. smalltalk.method({
  1402. selector: 'selectVariable:',
  1403. fn: function (aString){
  1404. var self=this;
  1405. smalltalk.send(self, "_selectedVariable_", [aString]);
  1406. (function($rec){smalltalk.send($rec, "_updateVariablesList", []);smalltalk.send($rec, "_updateValueTextarea", []);return smalltalk.send($rec, "_updateButtons", []);})(self);
  1407. return self;}
  1408. }),
  1409. smalltalk.Inspector);
  1410. smalltalk.addMethod(
  1411. '_updateValueTextarea',
  1412. smalltalk.method({
  1413. selector: 'updateValueTextarea',
  1414. fn: function (){
  1415. var self=this;
  1416. 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", []);})]))]);
  1417. return self;}
  1418. }),
  1419. smalltalk.Inspector);
  1420. smalltalk.addMethod(
  1421. '_updateButtons',
  1422. smalltalk.method({
  1423. selector: 'updateButtons',
  1424. fn: function (){
  1425. var self=this;
  1426. ((($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"]);})]));
  1427. return self;}
  1428. }),
  1429. smalltalk.Inspector);
  1430. smalltalk.addMethod(
  1431. '_on_',
  1432. smalltalk.method({
  1433. selector: 'on:',
  1434. fn: function (anObject){
  1435. var self=this;
  1436. return (function($rec){smalltalk.send($rec, "_inspect_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  1437. return self;}
  1438. }),
  1439. smalltalk.Inspector.klass);
  1440. smalltalk.addClass('ReferencesBrowser', smalltalk.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList'], 'IDE');
  1441. smalltalk.addMethod(
  1442. '_implementors',
  1443. smalltalk.method({
  1444. selector: 'implementors',
  1445. fn: function (){
  1446. var self=this;
  1447. return (($receiver = self['@implementors']) == nil || $receiver == undefined) ? (function(){return self['@implementors']=smalltalk.send((smalltalk.Array || Array), "_new", []);})() : $receiver;
  1448. return self;}
  1449. }),
  1450. smalltalk.ReferencesBrowser);
  1451. smalltalk.addMethod(
  1452. '_label',
  1453. smalltalk.method({
  1454. selector: 'label',
  1455. fn: function (){
  1456. var self=this;
  1457. return unescape("%5BReferences%5D");
  1458. return self;}
  1459. }),
  1460. smalltalk.ReferencesBrowser);
  1461. smalltalk.addMethod(
  1462. '_selector',
  1463. smalltalk.method({
  1464. selector: 'selector',
  1465. fn: function (){
  1466. var self=this;
  1467. return self['@selector'];
  1468. return self;}
  1469. }),
  1470. smalltalk.ReferencesBrowser);
  1471. smalltalk.addMethod(
  1472. '_senders',
  1473. smalltalk.method({
  1474. selector: 'senders',
  1475. fn: function (){
  1476. var self=this;
  1477. return (($receiver = self['@senders']) == nil || $receiver == undefined) ? (function(){return self['@senders']=smalltalk.send((smalltalk.Array || Array), "_new", []);})() : $receiver;
  1478. return self;}
  1479. }),
  1480. smalltalk.ReferencesBrowser);
  1481. smalltalk.addMethod(
  1482. '_classesAndMetaclasses',
  1483. smalltalk.method({
  1484. selector: 'classesAndMetaclasses',
  1485. fn: function (){
  1486. var self=this;
  1487. 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", []);})])]);
  1488. return self;}
  1489. }),
  1490. smalltalk.ReferencesBrowser);
  1491. smalltalk.addMethod(
  1492. '_referencedClasses',
  1493. smalltalk.method({
  1494. selector: 'referencedClasses',
  1495. fn: function (){
  1496. var self=this;
  1497. return (($receiver = self['@referencedClasses']) == nil || $receiver == undefined) ? (function(){return self['@referencedClasses']=smalltalk.send((smalltalk.Array || Array), "_new", []);})() : $receiver;
  1498. return self;}
  1499. }),
  1500. smalltalk.ReferencesBrowser);
  1501. smalltalk.addMethod(
  1502. '_openBrowserOn_',
  1503. smalltalk.method({
  1504. selector: 'openBrowserOn:',
  1505. fn: function (aMethod){
  1506. var self=this;
  1507. var browser=nil;
  1508. 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", []);})]))]);
  1509. ((($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"]);})]));
  1510. (function($rec){smalltalk.send($rec, "_selectProtocol_", [smalltalk.send(aMethod, "_category", [])]);return smalltalk.send($rec, "_selectMethod_", [aMethod]);})(browser);
  1511. return self;}
  1512. }),
  1513. smalltalk.ReferencesBrowser);
  1514. smalltalk.addMethod(
  1515. '_searchReferencesFor_',
  1516. smalltalk.method({
  1517. selector: 'searchReferencesFor:',
  1518. fn: function (aString){
  1519. var self=this;
  1520. self['@selector']=aString;
  1521. self['@implementors']=smalltalk.send((smalltalk.Array || Array), "_new", []);
  1522. self['@senders']=smalltalk.send((smalltalk.Array || Array), "_new", []);
  1523. self['@referencedClasses']=smalltalk.send((smalltalk.Array || Array), "_new", []);
  1524. ((($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']]);})]));
  1525. return self;}
  1526. }),
  1527. smalltalk.ReferencesBrowser);
  1528. smalltalk.addMethod(
  1529. '_search_',
  1530. smalltalk.method({
  1531. selector: 'search:',
  1532. fn: function (aString){
  1533. var self=this;
  1534. (function($rec){smalltalk.send($rec, "_searchReferencesFor_", [aString]);smalltalk.send($rec, "_updateImplementorsList", []);smalltalk.send($rec, "_updateSendersList", []);return smalltalk.send($rec, "_updateReferencedClassesList", []);})(self);
  1535. return self;}
  1536. }),
  1537. smalltalk.ReferencesBrowser);
  1538. smalltalk.addMethod(
  1539. '_searchReferencedClassesFor_',
  1540. smalltalk.method({
  1541. selector: 'searchReferencedClassesFor:',
  1542. fn: function (aString){
  1543. var self=this;
  1544. 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]);})]));})]);})]);
  1545. return self;}
  1546. }),
  1547. smalltalk.ReferencesBrowser);
  1548. smalltalk.addMethod(
  1549. '_searchSelectorReferencesFor_',
  1550. smalltalk.method({
  1551. selector: 'searchSelectorReferencesFor:',
  1552. fn: function (aString){
  1553. var self=this;
  1554. 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]);})]));})]);})]);
  1555. return self;}
  1556. }),
  1557. smalltalk.ReferencesBrowser);
  1558. smalltalk.addMethod(
  1559. '_initialize',
  1560. smalltalk.method({
  1561. selector: 'initialize',
  1562. fn: function (){
  1563. var self=this;
  1564. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  1565. self['@selector']="";
  1566. return self;}
  1567. }),
  1568. smalltalk.ReferencesBrowser);
  1569. smalltalk.addMethod(
  1570. '_setInputEvents',
  1571. smalltalk.method({
  1572. selector: 'setInputEvents',
  1573. fn: function (){
  1574. var self=this;
  1575. (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']);
  1576. return self;}
  1577. }),
  1578. smalltalk.ReferencesBrowser);
  1579. smalltalk.addMethod(
  1580. '_renderBoxOn_',
  1581. smalltalk.method({
  1582. selector: 'renderBoxOn:',
  1583. fn: function (html){
  1584. var self=this;
  1585. (function($rec){smalltalk.send($rec, "_renderInputOn_", [html]);smalltalk.send($rec, "_renderImplementorsOn_", [html]);smalltalk.send($rec, "_renderSendersOn_", [html]);return smalltalk.send($rec, "_renderReferencedClassesOn_", [html]);})(self);
  1586. return self;}
  1587. }),
  1588. smalltalk.ReferencesBrowser);
  1589. smalltalk.addMethod(
  1590. '_renderInputOn_',
  1591. smalltalk.method({
  1592. selector: 'renderInputOn:',
  1593. fn: function (html){
  1594. var self=this;
  1595. self['@input']=(function($rec){smalltalk.send($rec, "_class_", ["implementors"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_input", []));
  1596. smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val_", [self['@selector']]);
  1597. smalltalk.send(self, "_setInputEvents", []);
  1598. return self;}
  1599. }),
  1600. smalltalk.ReferencesBrowser);
  1601. smalltalk.addMethod(
  1602. '_renderImplementorsOn_',
  1603. smalltalk.method({
  1604. selector: 'renderImplementorsOn:',
  1605. fn: function (html){
  1606. var self=this;
  1607. self['@implementorsList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column implementors"]);
  1608. smalltalk.send(self, "_updateImplementorsList", []);
  1609. return self;}
  1610. }),
  1611. smalltalk.ReferencesBrowser);
  1612. smalltalk.addMethod(
  1613. '_renderSendersOn_',
  1614. smalltalk.method({
  1615. selector: 'renderSendersOn:',
  1616. fn: function (html){
  1617. var self=this;
  1618. self['@sendersList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column senders"]);
  1619. smalltalk.send(self, "_updateSendersList", []);
  1620. return self;}
  1621. }),
  1622. smalltalk.ReferencesBrowser);
  1623. smalltalk.addMethod(
  1624. '_renderReferencedClassesOn_',
  1625. smalltalk.method({
  1626. selector: 'renderReferencedClassesOn:',
  1627. fn: function (html){
  1628. var self=this;
  1629. self['@referencedClassesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column referenced_classes"]);
  1630. smalltalk.send(self, "_updateReferencedClassesList", []);
  1631. return self;}
  1632. }),
  1633. smalltalk.ReferencesBrowser);
  1634. smalltalk.addMethod(
  1635. '_canBeClosed',
  1636. smalltalk.method({
  1637. selector: 'canBeClosed',
  1638. fn: function (){
  1639. var self=this;
  1640. return true;
  1641. return self;}
  1642. }),
  1643. smalltalk.ReferencesBrowser);
  1644. smalltalk.addMethod(
  1645. '_updateImplementorsList',
  1646. smalltalk.method({
  1647. selector: 'updateImplementorsList',
  1648. fn: function (){
  1649. var self=this;
  1650. 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;
  1651. 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);})]);})]);
  1652. return self;}
  1653. }),
  1654. smalltalk.ReferencesBrowser);
  1655. smalltalk.addMethod(
  1656. '_updateSendersList',
  1657. smalltalk.method({
  1658. selector: 'updateSendersList',
  1659. fn: function (){
  1660. var self=this;
  1661. 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", []));})]);})]);
  1662. return self;}
  1663. }),
  1664. smalltalk.ReferencesBrowser);
  1665. smalltalk.addMethod(
  1666. '_updateReferencedClassesList',
  1667. smalltalk.method({
  1668. selector: 'updateReferencedClassesList',
  1669. fn: function (){
  1670. var self=this;
  1671. 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", []));})]);})]);
  1672. return self;}
  1673. }),
  1674. smalltalk.ReferencesBrowser);
  1675. smalltalk.addMethod(
  1676. '_search_',
  1677. smalltalk.method({
  1678. selector: 'search:',
  1679. fn: function (aString){
  1680. var self=this;
  1681. return (function($rec){smalltalk.send($rec, "_searchReferencesFor_", [aString]);return smalltalk.send($rec, "_open", []);})(smalltalk.send(self, "_new", []));
  1682. return self;}
  1683. }),
  1684. smalltalk.ReferencesBrowser.klass);
  1685. smalltalk.addClass('SourceArea', smalltalk.Widget, ['editor', 'div', 'receiver', 'onDoIt'], 'IDE');
  1686. smalltalk.addMethod(
  1687. '_val',
  1688. smalltalk.method({
  1689. selector: 'val',
  1690. fn: function (){
  1691. var self=this;
  1692. return smalltalk.send(self['@editor'], "_getValue", []);
  1693. return self;}
  1694. }),
  1695. smalltalk.SourceArea);
  1696. smalltalk.addMethod(
  1697. '_val_',
  1698. smalltalk.method({
  1699. selector: 'val:',
  1700. fn: function (aString){
  1701. var self=this;
  1702. smalltalk.send(self['@editor'], "_setValue_", [aString]);
  1703. return self;}
  1704. }),
  1705. smalltalk.SourceArea);
  1706. smalltalk.addMethod(
  1707. '_currentLine',
  1708. smalltalk.method({
  1709. selector: 'currentLine',
  1710. fn: function (){
  1711. var self=this;
  1712. return smalltalk.send(self['@editor'], "_getLine_", [smalltalk.send(smalltalk.send(self['@editor'], "_getCursor", []), "_line", [])]);
  1713. return self;}
  1714. }),
  1715. smalltalk.SourceArea);
  1716. smalltalk.addMethod(
  1717. '_selection',
  1718. smalltalk.method({
  1719. selector: 'selection',
  1720. fn: function (){
  1721. var self=this;
  1722. return smalltalk.send(self['@editor'], "_getSelection", []);
  1723. return self;}
  1724. }),
  1725. smalltalk.SourceArea);
  1726. smalltalk.addMethod(
  1727. '_selectionEnd',
  1728. smalltalk.method({
  1729. selector: 'selectionEnd',
  1730. fn: function (){
  1731. var self=this;
  1732. return smalltalk.send(smalltalk.send((typeof textarea == 'undefined' ? nil : textarea), "_element", []), "_selectionEnd", []);
  1733. return self;}
  1734. }),
  1735. smalltalk.SourceArea);
  1736. smalltalk.addMethod(
  1737. '_selectionStart',
  1738. smalltalk.method({
  1739. selector: 'selectionStart',
  1740. fn: function (){
  1741. var self=this;
  1742. return smalltalk.send(smalltalk.send((typeof textarea == 'undefined' ? nil : textarea), "_element", []), "_selectionStart", []);
  1743. return self;}
  1744. }),
  1745. smalltalk.SourceArea);
  1746. smalltalk.addMethod(
  1747. '_selectionStart_',
  1748. smalltalk.method({
  1749. selector: 'selectionStart:',
  1750. fn: function (anInteger){
  1751. var self=this;
  1752. smalltalk.send(smalltalk.send((typeof textarea == 'undefined' ? nil : textarea), "_element", []), "_selectionStart_", [anInteger]);
  1753. return self;}
  1754. }),
  1755. smalltalk.SourceArea);
  1756. smalltalk.addMethod(
  1757. '_selectionEnd_',
  1758. smalltalk.method({
  1759. selector: 'selectionEnd:',
  1760. fn: function (anInteger){
  1761. var self=this;
  1762. smalltalk.send(smalltalk.send((typeof textarea == 'undefined' ? nil : textarea), "_element", []), "_selectionEnd_", [anInteger]);
  1763. return self;}
  1764. }),
  1765. smalltalk.SourceArea);
  1766. smalltalk.addMethod(
  1767. '_setEditorOn_',
  1768. smalltalk.method({
  1769. selector: 'setEditorOn:',
  1770. fn: function (aTextarea){
  1771. var self=this;
  1772. self['@editor'] = CodeMirror.fromTextArea(aTextarea, {
  1773. theme: 'jtalk',
  1774. lineNumbers: true,
  1775. enterMode: 'classic',
  1776. matchBrackets: true,
  1777. electricChars: false
  1778. });
  1779. return self;}
  1780. }),
  1781. smalltalk.SourceArea);
  1782. smalltalk.addMethod(
  1783. '_editor',
  1784. smalltalk.method({
  1785. selector: 'editor',
  1786. fn: function (){
  1787. var self=this;
  1788. return self['@editor'];
  1789. return self;}
  1790. }),
  1791. smalltalk.SourceArea);
  1792. smalltalk.addMethod(
  1793. '_receiver',
  1794. smalltalk.method({
  1795. selector: 'receiver',
  1796. fn: function (){
  1797. var self=this;
  1798. return (($receiver = self['@receiver']) == nil || $receiver == undefined) ? (function(){return smalltalk.send((smalltalk.DoIt || DoIt), "_new", []);})() : $receiver;
  1799. return self;}
  1800. }),
  1801. smalltalk.SourceArea);
  1802. smalltalk.addMethod(
  1803. '_receiver_',
  1804. smalltalk.method({
  1805. selector: 'receiver:',
  1806. fn: function (anObject){
  1807. var self=this;
  1808. self['@receiver']=anObject;
  1809. return self;}
  1810. }),
  1811. smalltalk.SourceArea);
  1812. smalltalk.addMethod(
  1813. '_onDoIt_',
  1814. smalltalk.method({
  1815. selector: 'onDoIt:',
  1816. fn: function (aBlock){
  1817. var self=this;
  1818. self['@onDoIt']=aBlock;
  1819. return self;}
  1820. }),
  1821. smalltalk.SourceArea);
  1822. smalltalk.addMethod(
  1823. '_onDoIt',
  1824. smalltalk.method({
  1825. selector: 'onDoIt',
  1826. fn: function (){
  1827. var self=this;
  1828. return self['@onDoIt'];
  1829. return self;}
  1830. }),
  1831. smalltalk.SourceArea);
  1832. smalltalk.addMethod(
  1833. '_currentLineOrSelection',
  1834. smalltalk.method({
  1835. selector: 'currentLineOrSelection',
  1836. fn: function (){
  1837. var self=this;
  1838. 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", []);})]));
  1839. return self;}
  1840. }),
  1841. smalltalk.SourceArea);
  1842. smalltalk.addMethod(
  1843. '_clear',
  1844. smalltalk.method({
  1845. selector: 'clear',
  1846. fn: function (){
  1847. var self=this;
  1848. smalltalk.send(self, "_val_", [""]);
  1849. return self;}
  1850. }),
  1851. smalltalk.SourceArea);
  1852. smalltalk.addMethod(
  1853. '_doIt',
  1854. smalltalk.method({
  1855. selector: 'doIt',
  1856. fn: function (){
  1857. var self=this;
  1858. var result=nil;
  1859. result=smalltalk.send(self, "_eval_", [smalltalk.send(self, "_currentLineOrSelection", [])]);
  1860. (($receiver = smalltalk.send(self, "_onDoIt", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(smalltalk.send(self, "_onDoIt", []), "_value", []);})() : nil;
  1861. return result;
  1862. return self;}
  1863. }),
  1864. smalltalk.SourceArea);
  1865. smalltalk.addMethod(
  1866. '_eval_',
  1867. smalltalk.method({
  1868. selector: 'eval:',
  1869. fn: function (aString){
  1870. var self=this;
  1871. try{var compiler=nil;
  1872. compiler=smalltalk.send((smalltalk.Compiler || Compiler), "_new", []);
  1873. 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", [])])}})})();})]);
  1874. (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", []), []])}})})();
  1875. return self;
  1876. } catch(e) {if(e.name === 'stReturn' && e.selector === '_eval_'){return e.fn()} throw(e)}}
  1877. }),
  1878. smalltalk.SourceArea);
  1879. smalltalk.addMethod(
  1880. '_handleKeyDown_',
  1881. smalltalk.method({
  1882. selector: 'handleKeyDown:',
  1883. fn: function (anEvent){
  1884. var self=this;
  1885. if(anEvent.ctrlKey) {
  1886. if(anEvent.keyCode === 80) { //ctrl+p
  1887. self._printIt();
  1888. anEvent.preventDefault();
  1889. return false;
  1890. }
  1891. if(anEvent.keyCode === 68) { //ctrl+d
  1892. self._doIt();
  1893. anEvent.preventDefault();
  1894. return false;
  1895. }
  1896. if(anEvent.keyCode === 73) { //ctrl+i
  1897. self._inspectIt();
  1898. anEvent.preventDefault();
  1899. return false;
  1900. }
  1901. };
  1902. return self;}
  1903. }),
  1904. smalltalk.SourceArea);
  1905. smalltalk.addMethod(
  1906. '_inspectIt',
  1907. smalltalk.method({
  1908. selector: 'inspectIt',
  1909. fn: function (){
  1910. var self=this;
  1911. smalltalk.send(smalltalk.send(self, "_doIt", []), "_inspect", []);
  1912. return self;}
  1913. }),
  1914. smalltalk.SourceArea);
  1915. smalltalk.addMethod(
  1916. '_print_',
  1917. smalltalk.method({
  1918. selector: 'print:',
  1919. fn: function (aString){
  1920. var self=this;
  1921. var start=nil;
  1922. var stop=nil;
  1923. start=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  1924. stop=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  1925. smalltalk.send(start, "_at_put_", ["line", smalltalk.send(smalltalk.send(self['@editor'], "_getCursor_", [false]), "_line", [])]);
  1926. smalltalk.send(start, "_at_put_", ["ch", smalltalk.send(smalltalk.send(self['@editor'], "_getCursor_", [false]), "_ch", [])]);
  1927. smalltalk.send(stop, "_at_put_", ["line", smalltalk.send(start, "_at_", ["line"])]);
  1928. 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)]))]);
  1929. smalltalk.send(self['@editor'], "_replaceSelection_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self['@editor'], "_getSelection", []), "__comma", [" "]), "__comma", [aString]), "__comma", [" "])]);
  1930. smalltalk.send(self['@editor'], "_setCursor_", [smalltalk.send(self['@editor'], "_getCursor_", [true])]);
  1931. smalltalk.send(self['@editor'], "_setSelection_end_", [stop, start]);
  1932. return self;}
  1933. }),
  1934. smalltalk.SourceArea);
  1935. smalltalk.addMethod(
  1936. '_printIt',
  1937. smalltalk.method({
  1938. selector: 'printIt',
  1939. fn: function (){
  1940. var self=this;
  1941. smalltalk.send(self, "_print_", [smalltalk.send(smalltalk.send(self, "_doIt", []), "_printString", [])]);
  1942. return self;}
  1943. }),
  1944. smalltalk.SourceArea);
  1945. smalltalk.addMethod(
  1946. '_fileIn',
  1947. smalltalk.method({
  1948. selector: 'fileIn',
  1949. fn: function (){
  1950. var self=this;
  1951. smalltalk.send(smalltalk.send((smalltalk.Importer || Importer), "_new", []), "_import_", [smalltalk.send(smalltalk.send(self, "_currentLineOrSelection", []), "_readStream", [])]);
  1952. return self;}
  1953. }),
  1954. smalltalk.SourceArea);
  1955. smalltalk.addMethod(
  1956. '_onKeyUp_',
  1957. smalltalk.method({
  1958. selector: 'onKeyUp:',
  1959. fn: function (aBlock){
  1960. var self=this;
  1961. smalltalk.send(self['@div'], "_onKeyUp_", [aBlock]);
  1962. return self;}
  1963. }),
  1964. smalltalk.SourceArea);
  1965. smalltalk.addMethod(
  1966. '_onKeyDown_',
  1967. smalltalk.method({
  1968. selector: 'onKeyDown:',
  1969. fn: function (aBlock){
  1970. var self=this;
  1971. smalltalk.send(self['@div'], "_onKeyDown_", [aBlock]);
  1972. return self;}
  1973. }),
  1974. smalltalk.SourceArea);
  1975. smalltalk.addMethod(
  1976. '_renderOn_',
  1977. smalltalk.method({
  1978. selector: 'renderOn:',
  1979. fn: function (html){
  1980. var self=this;
  1981. var textarea=nil;
  1982. self['@div']=smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["source"]);
  1983. smalltalk.send(self['@div'], "_with_", [(function(){return textarea=smalltalk.send(html, "_textarea", []);})]);
  1984. smalltalk.send(self, "_setEditorOn_", [smalltalk.send(textarea, "_element", [])]);
  1985. smalltalk.send(self['@div'], "_onKeyDown_", [(function(e){return smalltalk.send(self, "_handleKeyDown_", [e]);})]);
  1986. return self;}
  1987. }),
  1988. smalltalk.SourceArea);
  1989. smalltalk.addClass('ClassesList', smalltalk.Widget, ['browser', 'ul', 'nodes'], 'IDE');
  1990. smalltalk.addMethod(
  1991. '_category',
  1992. smalltalk.method({
  1993. selector: 'category',
  1994. fn: function (){
  1995. var self=this;
  1996. return smalltalk.send(smalltalk.send(self, "_browser", []), "_selectedPackage", []);
  1997. return self;}
  1998. }),
  1999. smalltalk.ClassesList);
  2000. smalltalk.addMethod(
  2001. '_nodes',
  2002. smalltalk.method({
  2003. selector: 'nodes',
  2004. fn: function (){
  2005. var self=this;
  2006. (($receiver = self['@nodes']) == nil || $receiver == undefined) ? (function(){return self['@nodes']=smalltalk.send(self, "_getNodes", []);})() : $receiver;
  2007. return self['@nodes'];
  2008. return self;}
  2009. }),
  2010. smalltalk.ClassesList);
  2011. smalltalk.addMethod(
  2012. '_browser',
  2013. smalltalk.method({
  2014. selector: 'browser',
  2015. fn: function (){
  2016. var self=this;
  2017. return self['@browser'];
  2018. return self;}
  2019. }),
  2020. smalltalk.ClassesList);
  2021. smalltalk.addMethod(
  2022. '_browser_',
  2023. smalltalk.method({
  2024. selector: 'browser:',
  2025. fn: function (aBrowser){
  2026. var self=this;
  2027. self['@browser']=aBrowser;
  2028. return self;}
  2029. }),
  2030. smalltalk.ClassesList);
  2031. smalltalk.addMethod(
  2032. '_getNodes',
  2033. smalltalk.method({
  2034. selector: 'getNodes',
  2035. fn: function (){
  2036. var self=this;
  2037. var classes=nil;
  2038. var children=nil;
  2039. var others=nil;
  2040. classes=smalltalk.send(smalltalk.send(self, "_browser", []), "_classes", []);
  2041. children=[];
  2042. others=[];
  2043. 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]);})]));})]);
  2044. return smalltalk.send(children, "_collect_", [(function(each){return smalltalk.send((smalltalk.ClassesListNode || ClassesListNode), "_on_browser_classes_level_", [each, smalltalk.send(self, "_browser", []), others, (0)]);})]);
  2045. return self;}
  2046. }),
  2047. smalltalk.ClassesList);
  2048. smalltalk.addMethod(
  2049. '_resetNodes',
  2050. smalltalk.method({
  2051. selector: 'resetNodes',
  2052. fn: function (){
  2053. var self=this;
  2054. self['@nodes']=nil;
  2055. return self;}
  2056. }),
  2057. smalltalk.ClassesList);
  2058. smalltalk.addMethod(
  2059. '_renderOn_',
  2060. smalltalk.method({
  2061. selector: 'renderOn:',
  2062. fn: function (html){
  2063. var self=this;
  2064. self['@ul']=(function($rec){smalltalk.send($rec, "_class_", ["jt_column browser classes"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_ul", []));
  2065. smalltalk.send(self, "_updateNodes", []);
  2066. return self;}
  2067. }),
  2068. smalltalk.ClassesList);
  2069. smalltalk.addMethod(
  2070. '_updateNodes',
  2071. smalltalk.method({
  2072. selector: 'updateNodes',
  2073. fn: function (){
  2074. var self=this;
  2075. smalltalk.send(self['@ul'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(self, "_nodes", []), "_do_", [(function(each){return smalltalk.send(each, "_renderOn_", [html]);})]);})]);
  2076. return self;}
  2077. }),
  2078. smalltalk.ClassesList);
  2079. smalltalk.addMethod(
  2080. '_on_',
  2081. smalltalk.method({
  2082. selector: 'on:',
  2083. fn: function (aBrowser){
  2084. var self=this;
  2085. return (function($rec){smalltalk.send($rec, "_browser_", [aBrowser]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  2086. return self;}
  2087. }),
  2088. smalltalk.ClassesList.klass);
  2089. smalltalk.addClass('ClassesListNode', smalltalk.Widget, ['browser', 'theClass', 'level', 'nodes'], 'IDE');
  2090. smalltalk.addMethod(
  2091. '_renderOn_',
  2092. smalltalk.method({
  2093. selector: 'renderOn:',
  2094. fn: function (html){
  2095. var self=this;
  2096. var li=nil;
  2097. var cssClass=nil;
  2098. cssClass="";
  2099. li=smalltalk.send(smalltalk.send(html, "_li", []), "_onClick_", [(function(){return smalltalk.send(smalltalk.send(self, "_browser", []), "_selectClass_", [smalltalk.send(self, "_theClass", [])]);})]);
  2100. smalltalk.send(smalltalk.send(li, "_asJQuery", []), "_html_", [smalltalk.send(self, "_label", [])]);
  2101. ((($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"]);})]));
  2102. ((($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"]);})]));
  2103. smalltalk.send(li, "_class_", [cssClass]);
  2104. smalltalk.send(smalltalk.send(self, "_nodes", []), "_do_", [(function(each){return smalltalk.send(each, "_renderOn_", [html]);})]);
  2105. return self;}
  2106. }),
  2107. smalltalk.ClassesListNode);
  2108. smalltalk.addMethod(
  2109. '_nodes',
  2110. smalltalk.method({
  2111. selector: 'nodes',
  2112. fn: function (){
  2113. var self=this;
  2114. return self['@nodes'];
  2115. return self;}
  2116. }),
  2117. smalltalk.ClassesListNode);
  2118. smalltalk.addMethod(
  2119. '_theClass',
  2120. smalltalk.method({
  2121. selector: 'theClass',
  2122. fn: function (){
  2123. var self=this;
  2124. return self['@theClass'];
  2125. return self;}
  2126. }),
  2127. smalltalk.ClassesListNode);
  2128. smalltalk.addMethod(
  2129. '_theClass_',
  2130. smalltalk.method({
  2131. selector: 'theClass:',
  2132. fn: function (aClass){
  2133. var self=this;
  2134. self['@theClass']=aClass;
  2135. return self;}
  2136. }),
  2137. smalltalk.ClassesListNode);
  2138. smalltalk.addMethod(
  2139. '_browser',
  2140. smalltalk.method({
  2141. selector: 'browser',
  2142. fn: function (){
  2143. var self=this;
  2144. return self['@browser'];
  2145. return self;}
  2146. }),
  2147. smalltalk.ClassesListNode);
  2148. smalltalk.addMethod(
  2149. '_browser_',
  2150. smalltalk.method({
  2151. selector: 'browser:',
  2152. fn: function (aBrowser){
  2153. var self=this;
  2154. self['@browser']=aBrowser;
  2155. return self;}
  2156. }),
  2157. smalltalk.ClassesListNode);
  2158. smalltalk.addMethod(
  2159. '_level',
  2160. smalltalk.method({
  2161. selector: 'level',
  2162. fn: function (){
  2163. var self=this;
  2164. return self['@level'];
  2165. return self;}
  2166. }),
  2167. smalltalk.ClassesListNode);
  2168. smalltalk.addMethod(
  2169. '_level_',
  2170. smalltalk.method({
  2171. selector: 'level:',
  2172. fn: function (anInteger){
  2173. var self=this;
  2174. self['@level']=anInteger;
  2175. return self;}
  2176. }),
  2177. smalltalk.ClassesListNode);
  2178. smalltalk.addMethod(
  2179. '_label',
  2180. smalltalk.method({
  2181. selector: 'label',
  2182. fn: function (){
  2183. var self=this;
  2184. var str=nil;
  2185. str=smalltalk.send(smalltalk.send((smalltalk.String || String), "_new", []), "_writeStream", []);
  2186. smalltalk.send(smalltalk.send(self, "_level", []), "_timesRepeat_", [(function(){return smalltalk.send(str, "_nextPutAll_", [unescape("%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B")]);})]);
  2187. smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_theClass", []), "_name", [])]);
  2188. return smalltalk.send(str, "_contents", []);
  2189. return self;}
  2190. }),
  2191. smalltalk.ClassesListNode);
  2192. smalltalk.addMethod(
  2193. '_getNodesFrom_',
  2194. smalltalk.method({
  2195. selector: 'getNodesFrom:',
  2196. fn: function (aCollection){
  2197. var self=this;
  2198. var children=nil;
  2199. var others=nil;
  2200. children=[];
  2201. others=[];
  2202. 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]);})]));})]);
  2203. 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)]))]);})]);
  2204. return self;}
  2205. }),
  2206. smalltalk.ClassesListNode);
  2207. smalltalk.addMethod(
  2208. '_on_browser_classes_level_',
  2209. smalltalk.method({
  2210. selector: 'on:browser:classes:level:',
  2211. fn: function (aClass, aBrowser, aCollection, anInteger){
  2212. var self=this;
  2213. 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", []));
  2214. return self;}
  2215. }),
  2216. smalltalk.ClassesListNode.klass);
  2217. smalltalk.addClass('Debugger', smalltalk.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  2218. smalltalk.addMethod(
  2219. '_error',
  2220. smalltalk.method({
  2221. selector: 'error',
  2222. fn: function (){
  2223. var self=this;
  2224. return self['@error'];
  2225. return self;}
  2226. }),
  2227. smalltalk.Debugger);
  2228. smalltalk.addMethod(
  2229. '_error_',
  2230. smalltalk.method({
  2231. selector: 'error:',
  2232. fn: function (anError){
  2233. var self=this;
  2234. self['@error']=anError;
  2235. return self;}
  2236. }),
  2237. smalltalk.Debugger);
  2238. smalltalk.addMethod(
  2239. '_label',
  2240. smalltalk.method({
  2241. selector: 'label',
  2242. fn: function (){
  2243. var self=this;
  2244. return unescape("%5BDebugger%5D");
  2245. return self;}
  2246. }),
  2247. smalltalk.Debugger);
  2248. smalltalk.addMethod(
  2249. '_source',
  2250. smalltalk.method({
  2251. selector: 'source',
  2252. fn: function (){
  2253. var self=this;
  2254. 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", []);})();
  2255. return self;}
  2256. }),
  2257. smalltalk.Debugger);
  2258. smalltalk.addMethod(
  2259. '_method',
  2260. smalltalk.method({
  2261. selector: 'method',
  2262. fn: function (){
  2263. var self=this;
  2264. return smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_methodAt_", [smalltalk.send(self['@selectedContext'], "_selector", [])]);
  2265. return self;}
  2266. }),
  2267. smalltalk.Debugger);
  2268. smalltalk.addMethod(
  2269. '_arguments',
  2270. smalltalk.method({
  2271. selector: 'arguments',
  2272. fn: function (){
  2273. var self=this;
  2274. 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", []);})();
  2275. return self;}
  2276. }),
  2277. smalltalk.Debugger);
  2278. smalltalk.addMethod(
  2279. '_receiver',
  2280. smalltalk.method({
  2281. selector: 'receiver',
  2282. fn: function (){
  2283. var self=this;
  2284. return smalltalk.send(self['@selectedContext'], "_receiver", []);
  2285. return self;}
  2286. }),
  2287. smalltalk.Debugger);
  2288. smalltalk.addMethod(
  2289. '_selectContext_',
  2290. smalltalk.method({
  2291. selector: 'selectContext:',
  2292. fn: function (aContext){
  2293. var self=this;
  2294. self['@selectedContext']=aContext;
  2295. self['@selectedVariable']=nil;
  2296. self['@selectedVariableName']=nil;
  2297. (function($rec){smalltalk.send($rec, "_updateContextsList", []);smalltalk.send($rec, "_updateSourceArea", []);smalltalk.send($rec, "_updateInspector", []);smalltalk.send($rec, "_updateVariablesList", []);return smalltalk.send($rec, "_updateStatus", []);})(self);
  2298. return self;}
  2299. }),
  2300. smalltalk.Debugger);
  2301. smalltalk.addMethod(
  2302. '_proceed',
  2303. smalltalk.method({
  2304. selector: 'proceed',
  2305. fn: function (){
  2306. var self=this;
  2307. smalltalk.send(self, "_close", []);
  2308. smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_perform_withArguments_", [smalltalk.send(self['@selectedContext'], "_selector", []), smalltalk.send(self['@selectedContext'], "_temps", [])]);
  2309. return self;}
  2310. }),
  2311. smalltalk.Debugger);
  2312. smalltalk.addMethod(
  2313. '_save',
  2314. smalltalk.method({
  2315. selector: 'save',
  2316. fn: function (){
  2317. var self=this;
  2318. var protocol=nil;
  2319. protocol=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_methodDictionary", []), "_at_", [smalltalk.send(self['@selectedContext'], "_selector", [])]), "_category", []);
  2320. smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_compile_category_", [smalltalk.send(self['@sourceArea'], "_val", []), protocol]);
  2321. smalltalk.send(self, "_updateStatus", []);
  2322. return self;}
  2323. }),
  2324. smalltalk.Debugger);
  2325. smalltalk.addMethod(
  2326. '_selectVariable_named_',
  2327. smalltalk.method({
  2328. selector: 'selectVariable:named:',
  2329. fn: function (anObject, aString){
  2330. var self=this;
  2331. self['@selectedVariable']=anObject;
  2332. self['@selectedVariableName']=aString;
  2333. smalltalk.send(self['@inspector'], "_contents_", [(function(html){return smalltalk.send(html, "_with_", [smalltalk.send(anObject, "_printString", [])]);})]);
  2334. smalltalk.send(self, "_updateVariablesList", []);
  2335. return self;}
  2336. }),
  2337. smalltalk.Debugger);
  2338. smalltalk.addMethod(
  2339. '_inspectSelectedVariable',
  2340. smalltalk.method({
  2341. selector: 'inspectSelectedVariable',
  2342. fn: function (){
  2343. var self=this;
  2344. smalltalk.send(self['@selectedVariable'], "_inspect", []);
  2345. return self;}
  2346. }),
  2347. smalltalk.Debugger);
  2348. smalltalk.addMethod(
  2349. '_initialize',
  2350. smalltalk.method({
  2351. selector: 'initialize',
  2352. fn: function (){
  2353. var self=this;
  2354. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  2355. smalltalk.send(self['@unsavedChanges'], "__eq", [false]);
  2356. return self;}
  2357. }),
  2358. smalltalk.Debugger);
  2359. smalltalk.addMethod(
  2360. '_renderTopPanelOn_',
  2361. smalltalk.method({
  2362. selector: 'renderTopPanelOn:',
  2363. fn: function (html){
  2364. var self=this;
  2365. self['@selectedContext']=smalltalk.send(smalltalk.send(self, "_error", []), "_context", []);
  2366. (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", []));
  2367. return self;}
  2368. }),
  2369. smalltalk.Debugger);
  2370. smalltalk.addMethod(
  2371. '_renderContext_on_',
  2372. smalltalk.method({
  2373. selector: 'renderContext:on:',
  2374. fn: function (aContext, html){
  2375. var self=this;
  2376. var li=nil;
  2377. li=smalltalk.send(html, "_li", []);
  2378. ((($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"]);})]));
  2379. (function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(aContext, "_asString", [])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectContext_", [aContext]);})]);})(li);
  2380. (($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_renderContext_on_", [smalltalk.send(aContext, "_home", []), html]);})() : nil;
  2381. return self;}
  2382. }),
  2383. smalltalk.Debugger);
  2384. smalltalk.addMethod(
  2385. '_renderBottomPanelOn_',
  2386. smalltalk.method({
  2387. selector: 'renderBottomPanelOn:',
  2388. fn: function (html){
  2389. var self=this;
  2390. (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", []));
  2391. self['@ul2']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column debugger variables"]);
  2392. self['@inspector']=smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["jt_column debugger inspector"]);
  2393. smalltalk.send(self['@sourceArea'], "_onKeyUp_", [(function(){return smalltalk.send(self, "_updateStatus", []);})]);
  2394. return self;}
  2395. }),
  2396. smalltalk.Debugger);
  2397. smalltalk.addMethod(
  2398. '_renderButtonsOn_',
  2399. smalltalk.method({
  2400. selector: 'renderButtonsOn:',
  2401. fn: function (html){
  2402. var self=this;
  2403. self['@saveButton']=(function($rec){smalltalk.send($rec, "_with_", ["Save"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_save", []);})]);})(smalltalk.send(html, "_button", []));
  2404. (function($rec){smalltalk.send($rec, "_with_", ["DoIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self['@sourceArea'], "_doIt", []);})]);})(smalltalk.send(html, "_button", []));
  2405. (function($rec){smalltalk.send($rec, "_with_", ["PrintIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self['@sourceArea'], "_printIt", []);})]);})(smalltalk.send(html, "_button", []));
  2406. (function($rec){smalltalk.send($rec, "_with_", ["InspectIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self['@sourceArea'], "_inspectIt", []);})]);})(smalltalk.send(html, "_button", []));
  2407. (function($rec){smalltalk.send($rec, "_with_", ["Proceed"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_proceed", []);})]);})(smalltalk.send(html, "_button", []));
  2408. (function($rec){smalltalk.send($rec, "_with_", ["Abandon"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_close", []);})]);})(smalltalk.send(html, "_button", []));
  2409. 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", []));
  2410. (function($rec){smalltalk.send($rec, "_updateSourceArea", []);smalltalk.send($rec, "_updateStatus", []);smalltalk.send($rec, "_updateVariablesList", []);return smalltalk.send($rec, "_updateInspector", []);})(self);
  2411. return self;}
  2412. }),
  2413. smalltalk.Debugger);
  2414. smalltalk.addMethod(
  2415. '_renderBoxOn_',
  2416. smalltalk.method({
  2417. selector: 'renderBoxOn:',
  2418. fn: function (html){
  2419. var self=this;
  2420. (function($rec){smalltalk.send($rec, "_renderTopPanelOn_", [html]);return smalltalk.send($rec, "_renderBottomPanelOn_", [html]);})(self);
  2421. return self;}
  2422. }),
  2423. smalltalk.Debugger);
  2424. smalltalk.addMethod(
  2425. '_canBeClosed',
  2426. smalltalk.method({
  2427. selector: 'canBeClosed',
  2428. fn: function (){
  2429. var self=this;
  2430. return true;
  2431. return self;}
  2432. }),
  2433. smalltalk.Debugger);
  2434. smalltalk.addMethod(
  2435. '_updateContextsList',
  2436. smalltalk.method({
  2437. selector: 'updateContextsList',
  2438. fn: function (){
  2439. var self=this;
  2440. smalltalk.send(self['@ul'], "_contents_", [(function(html){return smalltalk.send(self, "_renderContext_on_", [smalltalk.send(smalltalk.send(self, "_error", []), "_context", []), html]);})]);
  2441. return self;}
  2442. }),
  2443. smalltalk.Debugger);
  2444. smalltalk.addMethod(
  2445. '_updateSourceArea',
  2446. smalltalk.method({
  2447. selector: 'updateSourceArea',
  2448. fn: function (){
  2449. var self=this;
  2450. smalltalk.send(self['@sourceArea'], "_val_", [smalltalk.send(self, "_source", [])]);
  2451. return self;}
  2452. }),
  2453. smalltalk.Debugger);
  2454. smalltalk.addMethod(
  2455. '_updateStatus',
  2456. smalltalk.method({
  2457. selector: 'updateStatus',
  2458. fn: function (){
  2459. var self=this;
  2460. ((($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;})]));
  2461. return self;}
  2462. }),
  2463. smalltalk.Debugger);
  2464. smalltalk.addMethod(
  2465. '_updateInspector',
  2466. smalltalk.method({
  2467. selector: 'updateInspector',
  2468. fn: function (){
  2469. var self=this;
  2470. smalltalk.send(self['@inspector'], "_contents_", [(function(html){return nil;})]);
  2471. return self;}
  2472. }),
  2473. smalltalk.Debugger);
  2474. smalltalk.addMethod(
  2475. '_updateVariablesList',
  2476. smalltalk.method({
  2477. selector: 'updateVariablesList',
  2478. fn: function (){
  2479. var self=this;
  2480. smalltalk.send(self['@ul2'], "_contents_", [(function(html){var li=nil;
  2481. 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;
  2482. 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;
  2483. 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"]);})]));})]);})]);
  2484. (($receiver = self['@selectedVariable']) == nil || $receiver == undefined) ? (function(){return smalltalk.send(self['@inspectButton'], "_at_put_", ["disabled", true]);})() : (function(){return smalltalk.send(self['@inspectButton'], "_removeAt_", ["disabled"]);})();
  2485. return self;}
  2486. }),
  2487. smalltalk.Debugger);
  2488. smalltalk.addClass('DebugErrorHandler', smalltalk.ErrorHandler, [], 'IDE');
  2489. smalltalk.addMethod(
  2490. '_handleError_',
  2491. smalltalk.method({
  2492. selector: 'handleError:',
  2493. fn: function (anError){
  2494. var self=this;
  2495. 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]);})]);
  2496. return self;}
  2497. }),
  2498. smalltalk.DebugErrorHandler);
  2499. smalltalk.addMethod(
  2500. '_initialize',
  2501. smalltalk.method({
  2502. selector: 'initialize',
  2503. fn: function (){
  2504. var self=this;
  2505. smalltalk.send(self, "_register", []);
  2506. return self;}
  2507. }),
  2508. smalltalk.DebugErrorHandler.klass);
  2509. smalltalk.addClass('ProgressBar', smalltalk.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  2510. smalltalk.addMethod(
  2511. '_percent',
  2512. smalltalk.method({
  2513. selector: 'percent',
  2514. fn: function (){
  2515. var self=this;
  2516. return (($receiver = self['@percent']) == nil || $receiver == undefined) ? (function(){return (0);})() : $receiver;
  2517. return self;}
  2518. }),
  2519. smalltalk.ProgressBar);
  2520. smalltalk.addMethod(
  2521. '_percent_',
  2522. smalltalk.method({
  2523. selector: 'percent:',
  2524. fn: function (aNumber){
  2525. var self=this;
  2526. self['@percent']=aNumber;
  2527. return self;}
  2528. }),
  2529. smalltalk.ProgressBar);
  2530. smalltalk.addMethod(
  2531. '_renderOn_',
  2532. smalltalk.method({
  2533. selector: 'renderOn:',
  2534. fn: function (html){
  2535. var self=this;
  2536. self['@div']=(function($rec){smalltalk.send($rec, "_class_", ["progress_bar"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_div", []));
  2537. smalltalk.send(self, "_renderProgressBar", []);
  2538. return self;}
  2539. }),
  2540. smalltalk.ProgressBar);
  2541. smalltalk.addMethod(
  2542. '_renderProgressBar',
  2543. smalltalk.method({
  2544. selector: 'renderProgressBar',
  2545. fn: function (){
  2546. var self=this;
  2547. 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", []));})]);
  2548. return self;}
  2549. }),
  2550. smalltalk.ProgressBar);
  2551. smalltalk.addMethod(
  2552. '_updatePercent_',
  2553. smalltalk.method({
  2554. selector: 'updatePercent:',
  2555. fn: function (aNumber){
  2556. var self=this;
  2557. smalltalk.send(self, "_percent_", [aNumber]);
  2558. smalltalk.send(self, "_renderProgressBar", []);
  2559. return self;}
  2560. }),
  2561. smalltalk.ProgressBar);
  2562. smalltalk.addClass('TestRunner', smalltalk.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  2563. smalltalk.addMethod(
  2564. '_label',
  2565. smalltalk.method({
  2566. selector: 'label',
  2567. fn: function (){
  2568. var self=this;
  2569. return "SUnit";
  2570. return self;}
  2571. }),
  2572. smalltalk.TestRunner);
  2573. smalltalk.addMethod(
  2574. '_packages',
  2575. smalltalk.method({
  2576. selector: 'packages',
  2577. fn: function (){
  2578. var self=this;
  2579. var packages=nil;
  2580. packages=smalltalk.send((smalltalk.Array || Array), "_new", []);
  2581. 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", [])]);})]));})]);
  2582. return smalltalk.send(packages, "_sort", []);
  2583. return self;}
  2584. }),
  2585. smalltalk.TestRunner);
  2586. smalltalk.addMethod(
  2587. '_classes',
  2588. smalltalk.method({
  2589. selector: 'classes',
  2590. fn: function (){
  2591. var self=this;
  2592. 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", [])]));})]);
  2593. return self;}
  2594. }),
  2595. smalltalk.TestRunner);
  2596. smalltalk.addMethod(
  2597. '_selectedCategories',
  2598. smalltalk.method({
  2599. selector: 'selectedCategories',
  2600. fn: function (){
  2601. var self=this;
  2602. return (($receiver = self['@selectedCategories']) == nil || $receiver == undefined) ? (function(){return self['@selectedCategories']=smalltalk.send((smalltalk.Array || Array), "_new", []);})() : $receiver;
  2603. return self;}
  2604. }),
  2605. smalltalk.TestRunner);
  2606. smalltalk.addMethod(
  2607. '_allClasses',
  2608. smalltalk.method({
  2609. selector: 'allClasses',
  2610. fn: function (){
  2611. var self=this;
  2612. return smalltalk.send((smalltalk.TestCase || TestCase), "_allSubclasses", []);
  2613. return self;}
  2614. }),
  2615. smalltalk.TestRunner);
  2616. smalltalk.addMethod(
  2617. '_selectedClasses',
  2618. smalltalk.method({
  2619. selector: 'selectedClasses',
  2620. fn: function (){
  2621. var self=this;
  2622. return (($receiver = self['@selectedClasses']) == nil || $receiver == undefined) ? (function(){return self['@selectedClasses']=smalltalk.send((smalltalk.Array || Array), "_new", []);})() : $receiver;
  2623. return self;}
  2624. }),
  2625. smalltalk.TestRunner);
  2626. smalltalk.addMethod(
  2627. '_progressBar',
  2628. smalltalk.method({
  2629. selector: 'progressBar',
  2630. fn: function (){
  2631. var self=this;
  2632. return (($receiver = self['@progressBar']) == nil || $receiver == undefined) ? (function(){return self['@progressBar']=smalltalk.send((smalltalk.ProgressBar || ProgressBar), "_new", []);})() : $receiver;
  2633. return self;}
  2634. }),
  2635. smalltalk.TestRunner);
  2636. smalltalk.addMethod(
  2637. '_statusInfo',
  2638. smalltalk.method({
  2639. selector: 'statusInfo',
  2640. fn: function (){
  2641. var self=this;
  2642. 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", [])]);
  2643. return self;}
  2644. }),
  2645. smalltalk.TestRunner);
  2646. smalltalk.addMethod(
  2647. '_result',
  2648. smalltalk.method({
  2649. selector: 'result',
  2650. fn: function (){
  2651. var self=this;
  2652. return self['@result'];
  2653. return self;}
  2654. }),
  2655. smalltalk.TestRunner);
  2656. smalltalk.addMethod(
  2657. '_testCases',
  2658. smalltalk.method({
  2659. selector: 'testCases',
  2660. fn: function (){
  2661. var self=this;
  2662. var testCases=nil;
  2663. testCases=[];
  2664. smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_do_", [(function(each){return smalltalk.send(testCases, "_addAll_", [smalltalk.send(each, "_buildSuite", [])]);})]);
  2665. return testCases;
  2666. return self;}
  2667. }),
  2668. smalltalk.TestRunner);
  2669. smalltalk.addMethod(
  2670. '_selectAllCategories',
  2671. smalltalk.method({
  2672. selector: 'selectAllCategories',
  2673. fn: function (){
  2674. var self=this;
  2675. 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]);})]));})]);
  2676. (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);
  2677. return self;}
  2678. }),
  2679. smalltalk.TestRunner);
  2680. smalltalk.addMethod(
  2681. '_toggleCategory_',
  2682. smalltalk.method({
  2683. selector: 'toggleCategory:',
  2684. fn: function (aCategory){
  2685. var self=this;
  2686. ((($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]);})]));
  2687. (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);
  2688. return self;}
  2689. }),
  2690. smalltalk.TestRunner);
  2691. smalltalk.addMethod(
  2692. '_toggleClass_',
  2693. smalltalk.method({
  2694. selector: 'toggleClass:',
  2695. fn: function (aClass){
  2696. var self=this;
  2697. ((($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]);})]));
  2698. smalltalk.send(self, "_updateClassesList", []);
  2699. return self;}
  2700. }),
  2701. smalltalk.TestRunner);
  2702. smalltalk.addMethod(
  2703. '_selectAllClasses',
  2704. smalltalk.method({
  2705. selector: 'selectAllClasses',
  2706. fn: function (){
  2707. var self=this;
  2708. 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]);})]));})]);
  2709. (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);
  2710. return self;}
  2711. }),
  2712. smalltalk.TestRunner);
  2713. smalltalk.addMethod(
  2714. '_run_',
  2715. smalltalk.method({
  2716. selector: 'run:',
  2717. fn: function (aCollection){
  2718. var self=this;
  2719. self['@result']=smalltalk.send((smalltalk.TestResult || TestResult), "_new", []);
  2720. (function($rec){smalltalk.send($rec, "_updateStatusDiv", []);return smalltalk.send($rec, "_updateMethodsList", []);})(self);
  2721. smalltalk.send(smalltalk.send(self, "_progressBar", []), "_updatePercent_", [(0)]);
  2722. smalltalk.send(self['@result'], "_total_", [smalltalk.send(aCollection, "_size", [])]);
  2723. 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)]);})]);
  2724. return self;}
  2725. }),
  2726. smalltalk.TestRunner);
  2727. smalltalk.addMethod(
  2728. '_performFailure_',
  2729. smalltalk.method({
  2730. selector: 'performFailure:',
  2731. fn: function (aTestCase){
  2732. var self=this;
  2733. smalltalk.send(aTestCase, "_perform_", [smalltalk.send(aTestCase, "_selector", [])]);
  2734. return self;}
  2735. }),
  2736. smalltalk.TestRunner);
  2737. smalltalk.addMethod(
  2738. '_initialize',
  2739. smalltalk.method({
  2740. selector: 'initialize',
  2741. fn: function (){
  2742. var self=this;
  2743. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  2744. self['@result']=smalltalk.send((smalltalk.TestResult || TestResult), "_new", []);
  2745. return self;}
  2746. }),
  2747. smalltalk.TestRunner);
  2748. smalltalk.addMethod(
  2749. '_printErrors',
  2750. smalltalk.method({
  2751. selector: 'printErrors',
  2752. fn: function (){
  2753. var self=this;
  2754. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_size", []), "_asString", []), "__comma", [unescape("%20errors%2C%20")]);
  2755. return self;}
  2756. }),
  2757. smalltalk.TestRunner);
  2758. smalltalk.addMethod(
  2759. '_printFailures',
  2760. smalltalk.method({
  2761. selector: 'printFailures',
  2762. fn: function (){
  2763. var self=this;
  2764. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_size", []), "_asString", []), "__comma", [" failures"]);
  2765. return self;}
  2766. }),
  2767. smalltalk.TestRunner);
  2768. smalltalk.addMethod(
  2769. '_printPasses',
  2770. smalltalk.method({
  2771. selector: 'printPasses',
  2772. fn: function (){
  2773. var self=this;
  2774. 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")]);
  2775. return self;}
  2776. }),
  2777. smalltalk.TestRunner);
  2778. smalltalk.addMethod(
  2779. '_printTotal',
  2780. smalltalk.method({
  2781. selector: 'printTotal',
  2782. fn: function (){
  2783. var self=this;
  2784. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_total", []), "_asString", []), "__comma", [unescape("%20runs%2C%20")]);
  2785. return self;}
  2786. }),
  2787. smalltalk.TestRunner);
  2788. smalltalk.addMethod(
  2789. '_renderBoxOn_',
  2790. smalltalk.method({
  2791. selector: 'renderBoxOn:',
  2792. fn: function (html){
  2793. var self=this;
  2794. (function($rec){smalltalk.send($rec, "_renderCategoriesOn_", [html]);smalltalk.send($rec, "_renderClassesOn_", [html]);return smalltalk.send($rec, "_renderResultsOn_", [html]);})(self);
  2795. return self;}
  2796. }),
  2797. smalltalk.TestRunner);
  2798. smalltalk.addMethod(
  2799. '_renderButtonsOn_',
  2800. smalltalk.method({
  2801. selector: 'renderButtonsOn:',
  2802. fn: function (html){
  2803. var self=this;
  2804. (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", []));
  2805. return self;}
  2806. }),
  2807. smalltalk.TestRunner);
  2808. smalltalk.addMethod(
  2809. '_renderCategoriesOn_',
  2810. smalltalk.method({
  2811. selector: 'renderCategoriesOn:',
  2812. fn: function (html){
  2813. var self=this;
  2814. self['@packagesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column sunit packages"]);
  2815. smalltalk.send(self, "_updateCategoriesList", []);
  2816. return self;}
  2817. }),
  2818. smalltalk.TestRunner);
  2819. smalltalk.addMethod(
  2820. '_renderClassesOn_',
  2821. smalltalk.method({
  2822. selector: 'renderClassesOn:',
  2823. fn: function (html){
  2824. var self=this;
  2825. self['@classesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column sunit classes"]);
  2826. smalltalk.send(self, "_updateClassesList", []);
  2827. return self;}
  2828. }),
  2829. smalltalk.TestRunner);
  2830. smalltalk.addMethod(
  2831. '_renderResultsOn_',
  2832. smalltalk.method({
  2833. selector: 'renderResultsOn:',
  2834. fn: function (html){
  2835. var self=this;
  2836. self['@statusDiv']=smalltalk.send(html, "_div", []);
  2837. smalltalk.send(html, "_with_", [smalltalk.send(self, "_progressBar", [])]);
  2838. self['@methodsList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column sunit results"]);
  2839. smalltalk.send(self, "_updateMethodsList", []);
  2840. smalltalk.send(self, "_updateStatusDiv", []);
  2841. return self;}
  2842. }),
  2843. smalltalk.TestRunner);
  2844. smalltalk.addMethod(
  2845. '_renderFailuresOn_',
  2846. smalltalk.method({
  2847. selector: 'renderFailuresOn:',
  2848. fn: function (html){
  2849. var self=this;
  2850. 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", []));})]);
  2851. return self;}
  2852. }),
  2853. smalltalk.TestRunner);
  2854. smalltalk.addMethod(
  2855. '_renderErrorsOn_',
  2856. smalltalk.method({
  2857. selector: 'renderErrorsOn:',
  2858. fn: function (html){
  2859. var self=this;
  2860. 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", []));})]);
  2861. return self;}
  2862. }),
  2863. smalltalk.TestRunner);
  2864. smalltalk.addMethod(
  2865. '_isSelectedClass_',
  2866. smalltalk.method({
  2867. selector: 'isSelectedClass:',
  2868. fn: function (aClass){
  2869. var self=this;
  2870. return smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_includes_", [aClass]);
  2871. return self;}
  2872. }),
  2873. smalltalk.TestRunner);
  2874. smalltalk.addMethod(
  2875. '_isSelectedCategory_',
  2876. smalltalk.method({
  2877. selector: 'isSelectedCategory:',
  2878. fn: function (aCategory){
  2879. var self=this;
  2880. return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [aCategory]);
  2881. return self;}
  2882. }),
  2883. smalltalk.TestRunner);
  2884. smalltalk.addMethod(
  2885. '_updateCategoriesList',
  2886. smalltalk.method({
  2887. selector: 'updateCategoriesList',
  2888. fn: function (){
  2889. var self=this;
  2890. 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;
  2891. 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);})]);})]);
  2892. return self;}
  2893. }),
  2894. smalltalk.TestRunner);
  2895. smalltalk.addMethod(
  2896. '_updateClassesList',
  2897. smalltalk.method({
  2898. selector: 'updateClassesList',
  2899. fn: function (){
  2900. var self=this;
  2901. 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;
  2902. 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);})]);})]);
  2903. return self;}
  2904. }),
  2905. smalltalk.TestRunner);
  2906. smalltalk.addMethod(
  2907. '_updateMethodsList',
  2908. smalltalk.method({
  2909. selector: 'updateMethodsList',
  2910. fn: function (){
  2911. var self=this;
  2912. smalltalk.send(self['@methodsList'], "_contents_", [(function(html){smalltalk.send(self, "_renderErrorsOn_", [html]);return smalltalk.send(self, "_renderFailuresOn_", [html]);})]);
  2913. return self;}
  2914. }),
  2915. smalltalk.TestRunner);
  2916. smalltalk.addMethod(
  2917. '_updateStatusDiv',
  2918. smalltalk.method({
  2919. selector: 'updateStatusDiv',
  2920. fn: function (){
  2921. var self=this;
  2922. smalltalk.send(self['@statusDiv'], "_class_", [smalltalk.send("sunit status ", "__comma", [smalltalk.send(self['@result'], "_status", [])])]);
  2923. smalltalk.send(self['@statusDiv'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(html, "_span", []), "_with_", [smalltalk.send(self, "_statusInfo", [])]);})]);
  2924. return self;}
  2925. }),
  2926. smalltalk.TestRunner);
  2927. smalltalk.addClass('IDETranscript', smalltalk.TabWidget, ['textarea'], 'IDE');
  2928. smalltalk.addMethod(
  2929. '_label',
  2930. smalltalk.method({
  2931. selector: 'label',
  2932. fn: function (){
  2933. var self=this;
  2934. return "Transcript";
  2935. return self;}
  2936. }),
  2937. smalltalk.IDETranscript);
  2938. smalltalk.addMethod(
  2939. '_clear',
  2940. smalltalk.method({
  2941. selector: 'clear',
  2942. fn: function (){
  2943. var self=this;
  2944. smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [""]);
  2945. return self;}
  2946. }),
  2947. smalltalk.IDETranscript);
  2948. smalltalk.addMethod(
  2949. '_cr',
  2950. smalltalk.method({
  2951. selector: 'cr',
  2952. fn: function (){
  2953. var self=this;
  2954. 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", [])])]);
  2955. return self;}
  2956. }),
  2957. smalltalk.IDETranscript);
  2958. smalltalk.addMethod(
  2959. '_show_',
  2960. smalltalk.method({
  2961. selector: 'show:',
  2962. fn: function (anObject){
  2963. var self=this;
  2964. smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [smalltalk.send(smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val", []), "__comma", [smalltalk.send(anObject, "_asString", [])])]);
  2965. return self;}
  2966. }),
  2967. smalltalk.IDETranscript);
  2968. smalltalk.addMethod(
  2969. '_renderBoxOn_',
  2970. smalltalk.method({
  2971. selector: 'renderBoxOn:',
  2972. fn: function (html){
  2973. var self=this;
  2974. self['@textarea']=smalltalk.send(html, "_textarea", []);
  2975. (function($rec){smalltalk.send($rec, "_class_", ["jt_transcript"]);return smalltalk.send($rec, "_at_put_", ["spellcheck", "false"]);})(self['@textarea']);
  2976. return self;}
  2977. }),
  2978. smalltalk.IDETranscript);
  2979. smalltalk.addMethod(
  2980. '_renderButtonsOn_',
  2981. smalltalk.method({
  2982. selector: 'renderButtonsOn:',
  2983. fn: function (html){
  2984. var self=this;
  2985. (function($rec){smalltalk.send($rec, "_with_", ["Clear transcript"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_clear", []);})]);})(smalltalk.send(html, "_button", []));
  2986. return self;}
  2987. }),
  2988. smalltalk.IDETranscript);
  2989. smalltalk.addMethod(
  2990. '_open',
  2991. smalltalk.method({
  2992. selector: 'open',
  2993. fn: function (){
  2994. var self=this;
  2995. (function($rec){smalltalk.send($rec, "_open", []);return smalltalk.send($rec, "_selectTab_", [self]);})(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []));
  2996. return self;}
  2997. }),
  2998. smalltalk.IDETranscript);
  2999. smalltalk.IDETranscript.klass.iVarNames = ['current'];
  3000. smalltalk.addMethod(
  3001. '_new',
  3002. smalltalk.method({
  3003. selector: 'new',
  3004. fn: function (){
  3005. var self=this;
  3006. smalltalk.send(self, "_shouldNotImplement", []);
  3007. return self;}
  3008. }),
  3009. smalltalk.IDETranscript.klass);
  3010. smalltalk.addMethod(
  3011. '_open',
  3012. smalltalk.method({
  3013. selector: 'open',
  3014. fn: function (){
  3015. var self=this;
  3016. (function($rec){smalltalk.send($rec, "_open", []);return smalltalk.send($rec, "_selectTab_", [smalltalk.send(self, "_current", [])]);})(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []));
  3017. return self;}
  3018. }),
  3019. smalltalk.IDETranscript.klass);
  3020. smalltalk.addMethod(
  3021. '_current',
  3022. smalltalk.method({
  3023. selector: 'current',
  3024. fn: function (){
  3025. var self=this;
  3026. return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return self['@current']=smalltalk.send(self, "_new", [], smalltalk.TabWidget.klass);})() : $receiver;
  3027. return self;}
  3028. }),
  3029. smalltalk.IDETranscript.klass);
  3030. smalltalk.addMethod(
  3031. '_initialize',
  3032. smalltalk.method({
  3033. selector: 'initialize',
  3034. fn: function (){
  3035. var self=this;
  3036. smalltalk.send((smalltalk.Transcript || Transcript), "_register_", [smalltalk.send(self, "_current", [])]);
  3037. return self;}
  3038. }),
  3039. smalltalk.IDETranscript.klass);
  3040. smalltalk.addMethod(
  3041. '_inspect',
  3042. smalltalk.method({
  3043. selector: 'inspect',
  3044. fn: function (){
  3045. var self=this;
  3046. (function($rec){smalltalk.send($rec, "_inspect_", [self]);return smalltalk.send($rec, "_open", []);})(smalltalk.send((smalltalk.Inspector || Inspector), "_new", []));
  3047. return self;}
  3048. }),
  3049. smalltalk.Object);
  3050. smalltalk.addMethod(
  3051. '_inspectOn_',
  3052. smalltalk.method({
  3053. selector: 'inspectOn:',
  3054. fn: function (anInspector){
  3055. var self=this;
  3056. var variables=nil;
  3057. variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  3058. smalltalk.send(variables, "_at_put_", [unescape("%23self"), self]);
  3059. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_allInstanceVariableNames", []), "_do_", [(function(each){return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);})]);
  3060. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  3061. return self;}
  3062. }),
  3063. smalltalk.Object);
  3064. smalltalk.addMethod(
  3065. '_inspectOn_',
  3066. smalltalk.method({
  3067. selector: 'inspectOn:',
  3068. fn: function (anInspector){
  3069. var self=this;
  3070. var variables=nil;
  3071. variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  3072. smalltalk.send(variables, "_at_put_", [unescape("%23self"), self]);
  3073. smalltalk.send(variables, "_at_put_", [unescape("%23year"), smalltalk.send(self, "_year", [])]);
  3074. smalltalk.send(variables, "_at_put_", [unescape("%23month"), smalltalk.send(self, "_month", [])]);
  3075. smalltalk.send(variables, "_at_put_", [unescape("%23day"), smalltalk.send(self, "_day", [])]);
  3076. smalltalk.send(variables, "_at_put_", [unescape("%23hours"), smalltalk.send(self, "_hours", [])]);
  3077. smalltalk.send(variables, "_at_put_", [unescape("%23minutes"), smalltalk.send(self, "_minutes", [])]);
  3078. smalltalk.send(variables, "_at_put_", [unescape("%23seconds"), smalltalk.send(self, "_seconds", [])]);
  3079. smalltalk.send(variables, "_at_put_", [unescape("%23milliseconds"), smalltalk.send(self, "_milliseconds", [])]);
  3080. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  3081. return self;}
  3082. }),
  3083. smalltalk.Date);
  3084. smalltalk.addMethod(
  3085. '_inspectOn_',
  3086. smalltalk.method({
  3087. selector: 'inspectOn:',
  3088. fn: function (anInspector){
  3089. var self=this;
  3090. var variables=nil;
  3091. variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  3092. smalltalk.send(variables, "_at_put_", [unescape("%23self"), self]);
  3093. smalltalk.send(self, "_withIndexDo_", [(function(each, i){return smalltalk.send(variables, "_at_put_", [i, each]);})]);
  3094. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  3095. return self;}
  3096. }),
  3097. smalltalk.Collection);
  3098. smalltalk.addMethod(
  3099. '_inspectOn_',
  3100. smalltalk.method({
  3101. selector: 'inspectOn:',
  3102. fn: function (anInspector){
  3103. var self=this;
  3104. var label=nil;
  3105. smalltalk.send(self, "_inspectOn_", [anInspector], smalltalk.SequenceableCollection);
  3106. ((($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", []);})]));
  3107. smalltalk.send(anInspector, "_setLabel_", [label]);
  3108. return self;}
  3109. }),
  3110. smalltalk.String);
  3111. smalltalk.addMethod(
  3112. '_inspectOn_',
  3113. smalltalk.method({
  3114. selector: 'inspectOn:',
  3115. fn: function (anInspector){
  3116. var self=this;
  3117. var variables=nil;
  3118. variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  3119. smalltalk.send(variables, "_at_put_", [unescape("%23self"), self]);
  3120. smalltalk.send(variables, "_at_put_", [unescape("%23home"), smalltalk.send(self, "_home", [])]);
  3121. smalltalk.send(variables, "_at_put_", [unescape("%23receiver"), smalltalk.send(self, "_receiver", [])]);
  3122. smalltalk.send(variables, "_at_put_", [unescape("%23selector"), smalltalk.send(self, "_selector", [])]);
  3123. smalltalk.send(variables, "_at_put_", [unescape("%23temps"), smalltalk.send(self, "_temps", [])]);
  3124. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_instanceVariableNames", []), "_do_", [(function(each){return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);})]);
  3125. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  3126. return self;}
  3127. }),
  3128. smalltalk.MethodContext);
  3129. smalltalk.addMethod(
  3130. '_inspectOn_',
  3131. smalltalk.method({
  3132. selector: 'inspectOn:',
  3133. fn: function (anInspector){
  3134. var self=this;
  3135. var variables=nil;
  3136. variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  3137. smalltalk.send(variables, "_at_put_", [unescape("%23self"), self]);
  3138. smalltalk.send(variables, "_at_put_", [unescape("%23keys"), smalltalk.send(self, "_keys", [])]);
  3139. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(variables, "_at_put_", [key, value]);})]);
  3140. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  3141. return self;}
  3142. }),
  3143. smalltalk.Dictionary);