1
0

IDE.deploy.js 173 KB

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