IDE.deploy.js 153 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591
  1. smalltalk.addPackage('IDE', {});
  2. smalltalk.addClass('ClassesList', smalltalk.Widget, ['browser', 'ul', 'nodes'], 'IDE');
  3. smalltalk.addMethod(
  4. "_browser",
  5. smalltalk.method({
  6. selector: "browser",
  7. fn: function () {
  8. var self = this;
  9. return self['@browser'];
  10. }
  11. }),
  12. smalltalk.ClassesList);
  13. smalltalk.addMethod(
  14. "_browser_",
  15. smalltalk.method({
  16. selector: "browser:",
  17. fn: function (aBrowser) {
  18. var self = this;
  19. self['@browser'] = aBrowser;
  20. return self;
  21. }
  22. }),
  23. smalltalk.ClassesList);
  24. smalltalk.addMethod(
  25. "_category",
  26. smalltalk.method({
  27. selector: "category",
  28. fn: function () {
  29. var self = this;
  30. var $1;
  31. $1 = smalltalk.send(smalltalk.send(self, "_browser", []), "_selectedPackage", []);
  32. return $1;
  33. }
  34. }),
  35. smalltalk.ClassesList);
  36. smalltalk.addMethod(
  37. "_getNodes",
  38. smalltalk.method({
  39. selector: "getNodes",
  40. fn: function () {
  41. var self = this;
  42. var $1, $2;
  43. var classes;
  44. var children;
  45. var others;
  46. classes = smalltalk.send(smalltalk.send(self, "_browser", []), "_classes", []);
  47. children = [];
  48. others = [];
  49. smalltalk.send(classes, "_do_", [function (each) {$1 = smalltalk.send(classes, "_includes_", [smalltalk.send(each, "_superclass", [])]);if (smalltalk.assert($1)) {return smalltalk.send(others, "_add_", [each]);} else {return smalltalk.send(children, "_add_", [each]);}}]);
  50. $2 = smalltalk.send(children, "_collect_", [function (each) {return smalltalk.send(smalltalk.ClassesListNode || ClassesListNode, "_on_browser_classes_level_", [each, smalltalk.send(self, "_browser", []), others, 0]);}]);
  51. return $2;
  52. }
  53. }),
  54. smalltalk.ClassesList);
  55. smalltalk.addMethod(
  56. "_nodes",
  57. smalltalk.method({
  58. selector: "nodes",
  59. fn: function () {
  60. var self = this;
  61. if (($receiver = self['@nodes']) == nil || $receiver == undefined) {
  62. self['@nodes'] = smalltalk.send(self, "_getNodes", []);
  63. self['@nodes'];
  64. } else {
  65. self['@nodes'];
  66. }
  67. return self['@nodes'];
  68. }
  69. }),
  70. smalltalk.ClassesList);
  71. smalltalk.addMethod(
  72. "_renderOn_",
  73. smalltalk.method({
  74. selector: "renderOn:",
  75. fn: function (html) {
  76. var self = this;
  77. var $1, $2;
  78. $1 = smalltalk.send(html, "_ul", []);
  79. smalltalk.send($1, "_class_", ["amber_column browser classes"]);
  80. $2 = smalltalk.send($1, "_yourself", []);
  81. self['@ul'] = $2;
  82. smalltalk.send(self, "_updateNodes", []);
  83. return self;
  84. }
  85. }),
  86. smalltalk.ClassesList);
  87. smalltalk.addMethod(
  88. "_resetNodes",
  89. smalltalk.method({
  90. selector: "resetNodes",
  91. fn: function () {
  92. var self = this;
  93. self['@nodes'] = nil;
  94. return self;
  95. }
  96. }),
  97. smalltalk.ClassesList);
  98. smalltalk.addMethod(
  99. "_updateNodes",
  100. smalltalk.method({
  101. selector: "updateNodes",
  102. fn: function () {
  103. var self = this;
  104. smalltalk.send(self['@ul'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(self, "_nodes", []), "_do_", [function (each) {return smalltalk.send(each, "_renderOn_", [html]);}]);}]);
  105. return self;
  106. }
  107. }),
  108. smalltalk.ClassesList);
  109. smalltalk.addMethod(
  110. "_on_",
  111. smalltalk.method({
  112. selector: "on:",
  113. fn: function (aBrowser) {
  114. var self = this;
  115. var $2, $3, $1;
  116. $2 = smalltalk.send(self, "_new", []);
  117. smalltalk.send($2, "_browser_", [aBrowser]);
  118. $3 = smalltalk.send($2, "_yourself", []);
  119. $1 = $3;
  120. return $1;
  121. }
  122. }),
  123. smalltalk.ClassesList.klass);
  124. smalltalk.addClass('ClassesListNode', smalltalk.Widget, ['browser', 'theClass', 'level', 'nodes'], 'IDE');
  125. smalltalk.addMethod(
  126. "_browser",
  127. smalltalk.method({
  128. selector: "browser",
  129. fn: function () {
  130. var self = this;
  131. return self['@browser'];
  132. }
  133. }),
  134. smalltalk.ClassesListNode);
  135. smalltalk.addMethod(
  136. "_browser_",
  137. smalltalk.method({
  138. selector: "browser:",
  139. fn: function (aBrowser) {
  140. var self = this;
  141. self['@browser'] = aBrowser;
  142. return self;
  143. }
  144. }),
  145. smalltalk.ClassesListNode);
  146. smalltalk.addMethod(
  147. "_getNodesFrom_",
  148. smalltalk.method({
  149. selector: "getNodesFrom:",
  150. fn: function (aCollection) {
  151. var self = this;
  152. var $1;
  153. var children;
  154. var others;
  155. children = [];
  156. others = [];
  157. smalltalk.send(aCollection, "_do_", [function (each) {$1 = smalltalk.send(smalltalk.send(each, "_superclass", []), "__eq", [smalltalk.send(self, "_theClass", [])]);if (smalltalk.assert($1)) {return smalltalk.send(children, "_add_", [each]);} else {return smalltalk.send(others, "_add_", [each]);}}]);
  158. self['@nodes'] = smalltalk.send(children, "_collect_", [function (each) {return smalltalk.send(smalltalk.ClassesListNode || ClassesListNode, "_on_browser_classes_level_", [each, smalltalk.send(self, "_browser", []), others, smalltalk.send(smalltalk.send(self, "_level", []), "__plus", [1])]);}]);
  159. return self;
  160. }
  161. }),
  162. smalltalk.ClassesListNode);
  163. smalltalk.addMethod(
  164. "_label",
  165. smalltalk.method({
  166. selector: "label",
  167. fn: function () {
  168. var self = this;
  169. var $1;
  170. var str;
  171. str = smalltalk.send(smalltalk.send(smalltalk.String || String, "_new", []), "_writeStream", []);
  172. smalltalk.send(smalltalk.send(self, "_level", []), "_timesRepeat_", [function () {return smalltalk.send(str, "_nextPutAll_", ["    "]);}]);
  173. smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_theClass", []), "_name", [])]);
  174. $1 = smalltalk.send(str, "_contents", []);
  175. return $1;
  176. }
  177. }),
  178. smalltalk.ClassesListNode);
  179. smalltalk.addMethod(
  180. "_level",
  181. smalltalk.method({
  182. selector: "level",
  183. fn: function () {
  184. var self = this;
  185. return self['@level'];
  186. }
  187. }),
  188. smalltalk.ClassesListNode);
  189. smalltalk.addMethod(
  190. "_level_",
  191. smalltalk.method({
  192. selector: "level:",
  193. fn: function (anInteger) {
  194. var self = this;
  195. self['@level'] = anInteger;
  196. return self;
  197. }
  198. }),
  199. smalltalk.ClassesListNode);
  200. smalltalk.addMethod(
  201. "_nodes",
  202. smalltalk.method({
  203. selector: "nodes",
  204. fn: function () {
  205. var self = this;
  206. return self['@nodes'];
  207. }
  208. }),
  209. smalltalk.ClassesListNode);
  210. smalltalk.addMethod(
  211. "_renderOn_",
  212. smalltalk.method({
  213. selector: "renderOn:",
  214. fn: function (html) {
  215. var self = this;
  216. var $1, $2;
  217. var li;
  218. var cssClass;
  219. cssClass = "";
  220. li = smalltalk.send(smalltalk.send(html, "_li", []), "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_browser", []), "_selectClass_", [smalltalk.send(self, "_theClass", [])]);}]);
  221. smalltalk.send(smalltalk.send(li, "_asJQuery", []), "_html_", [smalltalk.send(self, "_label", [])]);
  222. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_browser", []), "_selectedClass", []), "__eq", [smalltalk.send(self, "_theClass", [])]);
  223. if (smalltalk.assert($1)) {
  224. cssClass = smalltalk.send(cssClass, "__comma", [" selected"]);
  225. }
  226. $2 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_theClass", []), "_comment", []), "_isEmpty", []);
  227. if (!smalltalk.assert($2)) {
  228. cssClass = smalltalk.send(cssClass, "__comma", [" commented"]);
  229. }
  230. smalltalk.send(li, "_class_", [cssClass]);
  231. smalltalk.send(smalltalk.send(self, "_nodes", []), "_do_", [function (each) {return smalltalk.send(each, "_renderOn_", [html]);}]);
  232. return self;
  233. }
  234. }),
  235. smalltalk.ClassesListNode);
  236. smalltalk.addMethod(
  237. "_theClass",
  238. smalltalk.method({
  239. selector: "theClass",
  240. fn: function () {
  241. var self = this;
  242. return self['@theClass'];
  243. }
  244. }),
  245. smalltalk.ClassesListNode);
  246. smalltalk.addMethod(
  247. "_theClass_",
  248. smalltalk.method({
  249. selector: "theClass:",
  250. fn: function (aClass) {
  251. var self = this;
  252. self['@theClass'] = aClass;
  253. return self;
  254. }
  255. }),
  256. smalltalk.ClassesListNode);
  257. smalltalk.addMethod(
  258. "_on_browser_classes_level_",
  259. smalltalk.method({
  260. selector: "on:browser:classes:level:",
  261. fn: function (aClass, aBrowser, aCollection, anInteger) {
  262. var self = this;
  263. var $2, $3, $1;
  264. $2 = smalltalk.send(self, "_new", []);
  265. smalltalk.send($2, "_theClass_", [aClass]);
  266. smalltalk.send($2, "_browser_", [aBrowser]);
  267. smalltalk.send($2, "_level_", [anInteger]);
  268. smalltalk.send($2, "_getNodesFrom_", [aCollection]);
  269. $3 = smalltalk.send($2, "_yourself", []);
  270. $1 = $3;
  271. return $1;
  272. }
  273. }),
  274. smalltalk.ClassesListNode.klass);
  275. smalltalk.addClass('DebugErrorHandler', smalltalk.ErrorHandler, [], 'IDE');
  276. smalltalk.addMethod(
  277. "_handleError_",
  278. smalltalk.method({
  279. selector: "handleError:",
  280. fn: function (anError) {
  281. var self = this;
  282. var $1, $2;
  283. smalltalk.send(function () {$1 = smalltalk.send(smalltalk.Debugger || Debugger, "_new", []);smalltalk.send($1, "_error_", [anError]);$2 = smalltalk.send($1, "_open", []);return $2;}, "_on_do_", [smalltalk.Error || Error, function (error) {return smalltalk.send(smalltalk.send(smalltalk.ErrorHandler || ErrorHandler, "_new", []), "_handleError_", [error]);}]);
  284. return self;
  285. }
  286. }),
  287. smalltalk.DebugErrorHandler);
  288. smalltalk.addMethod(
  289. "_initialize",
  290. smalltalk.method({
  291. selector: "initialize",
  292. fn: function () {
  293. var self = this;
  294. smalltalk.send(self, "_register", []);
  295. return self;
  296. }
  297. }),
  298. smalltalk.DebugErrorHandler.klass);
  299. smalltalk.addClass('SourceArea', smalltalk.Widget, ['editor', 'div', 'receiver', 'onDoIt'], 'IDE');
  300. smalltalk.addMethod(
  301. "_clear",
  302. smalltalk.method({
  303. selector: "clear",
  304. fn: function () {
  305. var self = this;
  306. smalltalk.send(self, "_val_", [""]);
  307. return self;
  308. }
  309. }),
  310. smalltalk.SourceArea);
  311. smalltalk.addMethod(
  312. "_currentLine",
  313. smalltalk.method({
  314. selector: "currentLine",
  315. fn: function () {
  316. var self = this;
  317. var $1;
  318. $1 = smalltalk.send(self['@editor'], "_getLine_", [smalltalk.send(smalltalk.send(self['@editor'], "_getCursor", []), "_line", [])]);
  319. return $1;
  320. }
  321. }),
  322. smalltalk.SourceArea);
  323. smalltalk.addMethod(
  324. "_currentLineOrSelection",
  325. smalltalk.method({
  326. selector: "currentLineOrSelection",
  327. fn: function () {
  328. var self = this;
  329. var $2, $1;
  330. $2 = smalltalk.send(self['@editor'], "_somethingSelected", []);
  331. if (smalltalk.assert($2)) {
  332. $1 = smalltalk.send(self, "_selection", []);
  333. } else {
  334. $1 = smalltalk.send(self, "_currentLine", []);
  335. }
  336. return $1;
  337. }
  338. }),
  339. smalltalk.SourceArea);
  340. smalltalk.addMethod(
  341. "_doIt",
  342. smalltalk.method({
  343. selector: "doIt",
  344. fn: function () {
  345. var self = this;
  346. var $1;
  347. var result;
  348. result = smalltalk.send(self, "_eval_", [smalltalk.send(self, "_currentLineOrSelection", [])]);
  349. $1 = smalltalk.send(self, "_onDoIt", []);
  350. if (($receiver = $1) == nil || $receiver == undefined) {
  351. } else {
  352. smalltalk.send(smalltalk.send(self, "_onDoIt", []), "_value", []);
  353. }
  354. return result;
  355. }
  356. }),
  357. smalltalk.SourceArea);
  358. smalltalk.addMethod(
  359. "_editor",
  360. smalltalk.method({
  361. selector: "editor",
  362. fn: function () {
  363. var self = this;
  364. return self['@editor'];
  365. }
  366. }),
  367. smalltalk.SourceArea);
  368. smalltalk.addMethod(
  369. "_eval_",
  370. smalltalk.method({
  371. selector: "eval:",
  372. fn: function (aString) {
  373. var self = this;
  374. var $1, $2;
  375. var $early = {};
  376. try {
  377. var compiler;
  378. compiler = smalltalk.send(smalltalk.Compiler || Compiler, "_new", []);
  379. smalltalk.send(function () {return smalltalk.send(compiler, "_parseExpression_", [aString]);}, "_on_do_", [smalltalk.Error || Error, function (ex) {$1 = smalltalk.send(window, "_alert_", [smalltalk.send(ex, "_messageText", [])]);throw $early = [$1];}]);
  380. $2 = smalltalk.send(smalltalk.send(smalltalk.send(compiler, "_eval_", [smalltalk.send(compiler, "_compile_forClass_", [smalltalk.send(smalltalk.send("doIt ^[", "__comma", [aString]), "__comma", ["] value"]), smalltalk.DoIt || DoIt])]), "_fn", []), "_applyTo_arguments_", [smalltalk.send(self, "_receiver", []), []]);
  381. return $2;
  382. } catch (e) {
  383. if (e === $early) {
  384. return e[0];
  385. }
  386. throw e;
  387. }
  388. }
  389. }),
  390. smalltalk.SourceArea);
  391. smalltalk.addMethod(
  392. "_fileIn",
  393. smalltalk.method({
  394. selector: "fileIn",
  395. fn: function () {
  396. var self = this;
  397. smalltalk.send(smalltalk.send(smalltalk.Importer || Importer, "_new", []), "_import_", [smalltalk.send(smalltalk.send(self, "_currentLineOrSelection", []), "_readStream", [])]);
  398. return self;
  399. }
  400. }),
  401. smalltalk.SourceArea);
  402. smalltalk.addMethod(
  403. "_handleKeyDown_",
  404. smalltalk.method({
  405. selector: "handleKeyDown:",
  406. fn: function (anEvent) {
  407. var self = this;
  408. if (anEvent.ctrlKey) {
  409. if (anEvent.keyCode === 80) {
  410. self._printIt();
  411. anEvent.preventDefault();
  412. return false;
  413. }
  414. if (anEvent.keyCode === 68) {
  415. self._doIt();
  416. anEvent.preventDefault();
  417. return false;
  418. }
  419. if (anEvent.keyCode === 73) {
  420. self._inspectIt();
  421. anEvent.preventDefault();
  422. return false;
  423. }
  424. }
  425. return self;
  426. }
  427. }),
  428. smalltalk.SourceArea);
  429. smalltalk.addMethod(
  430. "_inspectIt",
  431. smalltalk.method({
  432. selector: "inspectIt",
  433. fn: function () {
  434. var self = this;
  435. smalltalk.send(smalltalk.send(self, "_doIt", []), "_inspect", []);
  436. return self;
  437. }
  438. }),
  439. smalltalk.SourceArea);
  440. smalltalk.addMethod(
  441. "_onDoIt",
  442. smalltalk.method({
  443. selector: "onDoIt",
  444. fn: function () {
  445. var self = this;
  446. return self['@onDoIt'];
  447. }
  448. }),
  449. smalltalk.SourceArea);
  450. smalltalk.addMethod(
  451. "_onDoIt_",
  452. smalltalk.method({
  453. selector: "onDoIt:",
  454. fn: function (aBlock) {
  455. var self = this;
  456. self['@onDoIt'] = aBlock;
  457. return self;
  458. }
  459. }),
  460. smalltalk.SourceArea);
  461. smalltalk.addMethod(
  462. "_onKeyDown_",
  463. smalltalk.method({
  464. selector: "onKeyDown:",
  465. fn: function (aBlock) {
  466. var self = this;
  467. smalltalk.send(self['@div'], "_onKeyDown_", [aBlock]);
  468. return self;
  469. }
  470. }),
  471. smalltalk.SourceArea);
  472. smalltalk.addMethod(
  473. "_onKeyUp_",
  474. smalltalk.method({
  475. selector: "onKeyUp:",
  476. fn: function (aBlock) {
  477. var self = this;
  478. smalltalk.send(self['@div'], "_onKeyUp_", [aBlock]);
  479. return self;
  480. }
  481. }),
  482. smalltalk.SourceArea);
  483. smalltalk.addMethod(
  484. "_print_",
  485. smalltalk.method({
  486. selector: "print:",
  487. fn: function (aString) {
  488. var self = this;
  489. var start;
  490. var stop;
  491. start = smalltalk.send(smalltalk.HashedCollection || HashedCollection, "_new", []);
  492. stop = smalltalk.send(smalltalk.HashedCollection || HashedCollection, "_new", []);
  493. smalltalk.send(start, "_at_put_", ["line", smalltalk.send(smalltalk.send(self['@editor'], "_getCursor_", [false]), "_line", [])]);
  494. smalltalk.send(start, "_at_put_", ["ch", smalltalk.send(smalltalk.send(self['@editor'], "_getCursor_", [false]), "_ch", [])]);
  495. smalltalk.send(stop, "_at_put_", ["line", smalltalk.send(start, "_at_", ["line"])]);
  496. smalltalk.send(stop, "_at_put_", ["ch", smalltalk.send(smalltalk.send(smalltalk.send(start, "_at_", ["ch"]), "__plus", [smalltalk.send(aString, "_size", [])]), "__plus", [2])]);
  497. smalltalk.send(self['@editor'], "_replaceSelection_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self['@editor'], "_getSelection", []), "__comma", [" "]), "__comma", [aString]), "__comma", [" "])]);
  498. smalltalk.send(self['@editor'], "_setCursor_", [smalltalk.send(self['@editor'], "_getCursor_", [true])]);
  499. smalltalk.send(self['@editor'], "_setSelection_end_", [stop, start]);
  500. return self;
  501. }
  502. }),
  503. smalltalk.SourceArea);
  504. smalltalk.addMethod(
  505. "_printIt",
  506. smalltalk.method({
  507. selector: "printIt",
  508. fn: function () {
  509. var self = this;
  510. smalltalk.send(self, "_print_", [smalltalk.send(smalltalk.send(self, "_doIt", []), "_printString", [])]);
  511. return self;
  512. }
  513. }),
  514. smalltalk.SourceArea);
  515. smalltalk.addMethod(
  516. "_receiver",
  517. smalltalk.method({
  518. selector: "receiver",
  519. fn: function () {
  520. var self = this;
  521. var $1;
  522. if (($receiver = self['@receiver']) == nil || $receiver == undefined) {
  523. $1 = smalltalk.send(smalltalk.DoIt || DoIt, "_new", []);
  524. } else {
  525. $1 = self['@receiver'];
  526. }
  527. return $1;
  528. }
  529. }),
  530. smalltalk.SourceArea);
  531. smalltalk.addMethod(
  532. "_receiver_",
  533. smalltalk.method({
  534. selector: "receiver:",
  535. fn: function (anObject) {
  536. var self = this;
  537. self['@receiver'] = anObject;
  538. return self;
  539. }
  540. }),
  541. smalltalk.SourceArea);
  542. smalltalk.addMethod(
  543. "_renderOn_",
  544. smalltalk.method({
  545. selector: "renderOn:",
  546. fn: function (html) {
  547. var self = this;
  548. var textarea;
  549. self['@div'] = smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["source"]);
  550. smalltalk.send(self['@div'], "_with_", [function () {textarea = smalltalk.send(html, "_textarea", []);return textarea;}]);
  551. smalltalk.send(self, "_setEditorOn_", [smalltalk.send(textarea, "_element", [])]);
  552. smalltalk.send(self['@div'], "_onKeyDown_", [function (e) {return smalltalk.send(self, "_handleKeyDown_", [e]);}]);
  553. return self;
  554. }
  555. }),
  556. smalltalk.SourceArea);
  557. smalltalk.addMethod(
  558. "_selection",
  559. smalltalk.method({
  560. selector: "selection",
  561. fn: function () {
  562. var self = this;
  563. var $1;
  564. $1 = smalltalk.send(self['@editor'], "_getSelection", []);
  565. return $1;
  566. }
  567. }),
  568. smalltalk.SourceArea);
  569. smalltalk.addMethod(
  570. "_selectionEnd",
  571. smalltalk.method({
  572. selector: "selectionEnd",
  573. fn: function () {
  574. var self = this;
  575. var $1;
  576. $1 = smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionEnd", []);
  577. return $1;
  578. }
  579. }),
  580. smalltalk.SourceArea);
  581. smalltalk.addMethod(
  582. "_selectionEnd_",
  583. smalltalk.method({
  584. selector: "selectionEnd:",
  585. fn: function (anInteger) {
  586. var self = this;
  587. smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionEnd_", [anInteger]);
  588. return self;
  589. }
  590. }),
  591. smalltalk.SourceArea);
  592. smalltalk.addMethod(
  593. "_selectionStart",
  594. smalltalk.method({
  595. selector: "selectionStart",
  596. fn: function () {
  597. var self = this;
  598. var $1;
  599. $1 = smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionStart", []);
  600. return $1;
  601. }
  602. }),
  603. smalltalk.SourceArea);
  604. smalltalk.addMethod(
  605. "_selectionStart_",
  606. smalltalk.method({
  607. selector: "selectionStart:",
  608. fn: function (anInteger) {
  609. var self = this;
  610. smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionStart_", [anInteger]);
  611. return self;
  612. }
  613. }),
  614. smalltalk.SourceArea);
  615. smalltalk.addMethod(
  616. "_setEditorOn_",
  617. smalltalk.method({
  618. selector: "setEditorOn:",
  619. fn: function (aTextarea) {
  620. var self = this;
  621. self['@editor'] = CodeMirror.fromTextArea(aTextarea, {theme: "amber", lineNumbers: true, enterMode: "flat", matchBrackets: true, electricChars: false});
  622. return self;
  623. }
  624. }),
  625. smalltalk.SourceArea);
  626. smalltalk.addMethod(
  627. "_val",
  628. smalltalk.method({
  629. selector: "val",
  630. fn: function () {
  631. var self = this;
  632. var $1;
  633. $1 = smalltalk.send(self['@editor'], "_getValue", []);
  634. return $1;
  635. }
  636. }),
  637. smalltalk.SourceArea);
  638. smalltalk.addMethod(
  639. "_val_",
  640. smalltalk.method({
  641. selector: "val:",
  642. fn: function (aString) {
  643. var self = this;
  644. smalltalk.send(self['@editor'], "_setValue_", [aString]);
  645. return self;
  646. }
  647. }),
  648. smalltalk.SourceArea);
  649. smalltalk.addClass('TabManager', smalltalk.Widget, ['selectedTab', 'tabs', 'opened', 'ul', 'input'], 'IDE');
  650. smalltalk.addMethod(
  651. "_addTab_",
  652. smalltalk.method({
  653. selector: "addTab:",
  654. fn: function (aWidget) {
  655. var self = this;
  656. smalltalk.send(smalltalk.send(self, "_tabs", []), "_add_", [aWidget]);
  657. smalltalk.send(aWidget, "_appendToJQuery_", [smalltalk.send("#amber", "_asJQuery", [])]);
  658. smalltalk.send(aWidget, "_hide", []);
  659. return self;
  660. }
  661. }),
  662. smalltalk.TabManager);
  663. smalltalk.addMethod(
  664. "_close",
  665. smalltalk.method({
  666. selector: "close",
  667. fn: function () {
  668. var self = this;
  669. if (smalltalk.assert(self['@opened'])) {
  670. smalltalk.send(smalltalk.send("#amber", "_asJQuery", []), "_hide", []);
  671. smalltalk.send(smalltalk.send(self['@ul'], "_asJQuery", []), "_hide", []);
  672. smalltalk.send(self['@selectedTab'], "_hide", []);
  673. smalltalk.send(self, "_removeBodyMargin", []);
  674. smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_removeClass_", ["amberBody"]);
  675. self['@opened'] = false;
  676. self['@opened'];
  677. }
  678. return self;
  679. }
  680. }),
  681. smalltalk.TabManager);
  682. smalltalk.addMethod(
  683. "_closeTab_",
  684. smalltalk.method({
  685. selector: "closeTab:",
  686. fn: function (aWidget) {
  687. var self = this;
  688. smalltalk.send(self, "_removeTab_", [aWidget]);
  689. smalltalk.send(self, "_selectTab_", [smalltalk.send(smalltalk.send(self, "_tabs", []), "_last", [])]);
  690. smalltalk.send(aWidget, "_remove", []);
  691. smalltalk.send(self, "_update", []);
  692. return self;
  693. }
  694. }),
  695. smalltalk.TabManager);
  696. smalltalk.addMethod(
  697. "_initialize",
  698. smalltalk.method({
  699. selector: "initialize",
  700. fn: function () {
  701. var self = this;
  702. var $1, $2, $3;
  703. smalltalk.send(self, "_initialize", [], smalltalk.Widget);
  704. self['@opened'] = true;
  705. smalltalk.send(function (html) {return smalltalk.send(smalltalk.send(html, "_div", []), "_id_", ["amber"]);}, "_appendToJQuery_", [smalltalk.send("body", "_asJQuery", [])]);
  706. smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_addClass_", ["amberBody"]);
  707. smalltalk.send(self, "_appendToJQuery_", [smalltalk.send("#amber", "_asJQuery", [])]);
  708. smalltalk.send(self, "_addTab_", [smalltalk.send(smalltalk.IDETranscript || IDETranscript, "_current", [])]);
  709. smalltalk.send(self, "_addTab_", [smalltalk.send(smalltalk.Workspace || Workspace, "_new", [])]);
  710. $1 = smalltalk.send(self, "_addTab_", [smalltalk.send(smalltalk.TestRunner || TestRunner, "_new", [])]);
  711. smalltalk.send(self, "_selectTab_", [smalltalk.send(smalltalk.send(self, "_tabs", []), "_last", [])]);
  712. smalltalk.send(self, "_onResize_", [function () {smalltalk.send(self, "_updateBodyMargin", []);$2 = smalltalk.send(self, "_updatePosition", []);return $2;}]);
  713. $3 = smalltalk.send(self, "_onWindowResize_", [function () {return smalltalk.send(self, "_updatePosition", []);}]);
  714. return self;
  715. }
  716. }),
  717. smalltalk.TabManager);
  718. smalltalk.addMethod(
  719. "_labelFor_",
  720. smalltalk.method({
  721. selector: "labelFor:",
  722. fn: function (aWidget) {
  723. var self = this;
  724. var $1;
  725. var label;
  726. var maxSize;
  727. maxSize = 15;
  728. label = smalltalk.send(smalltalk.send(aWidget, "_label", []), "_copyFrom_to_", [0, smalltalk.send(smalltalk.send(smalltalk.send(aWidget, "_label", []), "_size", []), "_min_", [maxSize])]);
  729. $1 = smalltalk.send(smalltalk.send(smalltalk.send(aWidget, "_label", []), "_size", []), "__gt", [maxSize]);
  730. if (smalltalk.assert($1)) {
  731. label = smalltalk.send(label, "__comma", ["..."]);
  732. }
  733. return label;
  734. }
  735. }),
  736. smalltalk.TabManager);
  737. smalltalk.addMethod(
  738. "_newBrowserTab",
  739. smalltalk.method({
  740. selector: "newBrowserTab",
  741. fn: function () {
  742. var self = this;
  743. smalltalk.send(smalltalk.Browser || Browser, "_open", []);
  744. return self;
  745. }
  746. }),
  747. smalltalk.TabManager);
  748. smalltalk.addMethod(
  749. "_onResize_",
  750. smalltalk.method({
  751. selector: "onResize:",
  752. fn: function (aBlock) {
  753. var self = this;
  754. jQuery("#amber").resizable({handles: "n", resize: aBlock, minHeight: 230});
  755. return self;
  756. }
  757. }),
  758. smalltalk.TabManager);
  759. smalltalk.addMethod(
  760. "_onWindowResize_",
  761. smalltalk.method({
  762. selector: "onWindowResize:",
  763. fn: function (aBlock) {
  764. var self = this;
  765. jQuery(window).resize(aBlock);
  766. return self;
  767. }
  768. }),
  769. smalltalk.TabManager);
  770. smalltalk.addMethod(
  771. "_open",
  772. smalltalk.method({
  773. selector: "open",
  774. fn: function () {
  775. var self = this;
  776. if (!smalltalk.assert(self['@opened'])) {
  777. smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_addClass_", ["amberBody"]);
  778. smalltalk.send(smalltalk.send("#amber", "_asJQuery", []), "_show", []);
  779. smalltalk.send(smalltalk.send(self['@ul'], "_asJQuery", []), "_show", []);
  780. smalltalk.send(self, "_updateBodyMargin", []);
  781. smalltalk.send(self['@selectedTab'], "_show", []);
  782. self['@opened'] = true;
  783. self['@opened'];
  784. }
  785. return self;
  786. }
  787. }),
  788. smalltalk.TabManager);
  789. smalltalk.addMethod(
  790. "_removeBodyMargin",
  791. smalltalk.method({
  792. selector: "removeBodyMargin",
  793. fn: function () {
  794. var self = this;
  795. smalltalk.send(self, "_setBodyMargin_", [0]);
  796. return self;
  797. }
  798. }),
  799. smalltalk.TabManager);
  800. smalltalk.addMethod(
  801. "_removeTab_",
  802. smalltalk.method({
  803. selector: "removeTab:",
  804. fn: function (aWidget) {
  805. var self = this;
  806. smalltalk.send(smalltalk.send(self, "_tabs", []), "_remove_", [aWidget]);
  807. smalltalk.send(self, "_update", []);
  808. return self;
  809. }
  810. }),
  811. smalltalk.TabManager);
  812. smalltalk.addMethod(
  813. "_renderOn_",
  814. smalltalk.method({
  815. selector: "renderOn:",
  816. fn: function (html) {
  817. var self = this;
  818. var $1, $2;
  819. smalltalk.send(smalltalk.send(html, "_div", []), "_id_", ["logo"]);
  820. smalltalk.send(self, "_renderToolbarOn_", [html]);
  821. $1 = smalltalk.send(html, "_ul", []);
  822. smalltalk.send($1, "_id_", ["amberTabs"]);
  823. $2 = smalltalk.send($1, "_yourself", []);
  824. self['@ul'] = $2;
  825. smalltalk.send(self, "_renderTabs", []);
  826. return self;
  827. }
  828. }),
  829. smalltalk.TabManager);
  830. smalltalk.addMethod(
  831. "_renderTabFor_on_",
  832. smalltalk.method({
  833. selector: "renderTabFor:on:",
  834. fn: function (aWidget, html) {
  835. var self = this;
  836. var $1, $2, $4, $5, $6, $3, $7;
  837. var li;
  838. li = smalltalk.send(html, "_li", []);
  839. $1 = smalltalk.send(self['@selectedTab'], "__eq", [aWidget]);
  840. if (smalltalk.assert($1)) {
  841. smalltalk.send(li, "_class_", ["selected"]);
  842. }
  843. smalltalk.send(li, "_with_", [function () {smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);$2 = smalltalk.send(html, "_span", []);smalltalk.send($2, "_class_", ["mtab"]);$3 = smalltalk.send($2, "_with_", [function () {$4 = smalltalk.send(aWidget, "_canBeClosed", []);if (smalltalk.assert($4)) {$5 = smalltalk.send(html, "_span", []);smalltalk.send($5, "_class_", ["close"]);smalltalk.send($5, "_with_", ["x"]);$6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(self, "_closeTab_", [aWidget]);}]);$6;}return smalltalk.send(smalltalk.send(html, "_span", []), "_with_", [smalltalk.send(self, "_labelFor_", [aWidget])]);}]);$3;return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);}]);
  844. $7 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectTab_", [aWidget]);}]);
  845. return self;
  846. }
  847. }),
  848. smalltalk.TabManager);
  849. smalltalk.addMethod(
  850. "_renderTabs",
  851. smalltalk.method({
  852. selector: "renderTabs",
  853. fn: function () {
  854. var self = this;
  855. var $1, $2, $3, $4;
  856. smalltalk.send(self['@ul'], "_contents_", [function (html) {smalltalk.send(smalltalk.send(self, "_tabs", []), "_do_", [function (each) {return smalltalk.send(self, "_renderTabFor_on_", [each, html]);}]);$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["newtab"]);smalltalk.send($1, "_with_", [function () {smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);$2 = smalltalk.send(html, "_span", []);smalltalk.send($2, "_class_", ["mtab"]);$3 = smalltalk.send($2, "_with_", [" + "]);$3;return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);}]);$4 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_newBrowserTab", []);}]);return $4;}]);
  857. return self;
  858. }
  859. }),
  860. smalltalk.TabManager);
  861. smalltalk.addMethod(
  862. "_renderToolbarOn_",
  863. smalltalk.method({
  864. selector: "renderToolbarOn:",
  865. fn: function (html) {
  866. var self = this;
  867. var $1, $3, $4, $5, $6, $7, $2;
  868. $1 = smalltalk.send(html, "_div", []);
  869. smalltalk.send($1, "_id_", ["amber_toolbar"]);
  870. $2 = smalltalk.send($1, "_with_", [function () {$3 = smalltalk.send(html, "_input", []);smalltalk.send($3, "_class_", ["implementors"]);$4 = smalltalk.send($3, "_yourself", []);self['@input'] = $4;self['@input'];smalltalk.send(self['@input'], "_onKeyPress_", [function (event) {$5 = smalltalk.send(smalltalk.send(event, "_keyCode", []), "__eq", [13]);if (smalltalk.assert($5)) {return smalltalk.send(self, "_search_", [smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val", [])]);}}]);$6 = smalltalk.send(html, "_div", []);smalltalk.send($6, "_id_", ["amber_close"]);$7 = smalltalk.send($6, "_onClick_", [function () {return smalltalk.send(self, "_close", []);}]);return $7;}]);
  871. return self;
  872. }
  873. }),
  874. smalltalk.TabManager);
  875. smalltalk.addMethod(
  876. "_search_",
  877. smalltalk.method({
  878. selector: "search:",
  879. fn: function (aString) {
  880. var self = this;
  881. var $1;
  882. var searchedClass;
  883. searchedClass = smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_at_", [aString]);
  884. $1 = smalltalk.send(searchedClass, "_isClass", []);
  885. if (smalltalk.assert($1)) {
  886. smalltalk.send(smalltalk.Browser || Browser, "_openOn_", [searchedClass]);
  887. } else {
  888. smalltalk.send(smalltalk.ReferencesBrowser || ReferencesBrowser, "_search_", [aString]);
  889. }
  890. return self;
  891. }
  892. }),
  893. smalltalk.TabManager);
  894. smalltalk.addMethod(
  895. "_selectTab_",
  896. smalltalk.method({
  897. selector: "selectTab:",
  898. fn: function (aWidget) {
  899. var self = this;
  900. smalltalk.send(self, "_open", []);
  901. self['@selectedTab'] = aWidget;
  902. smalltalk.send(smalltalk.send(self, "_tabs", []), "_do_", [function (each) {return smalltalk.send(each, "_hide", []);}]);
  903. smalltalk.send(aWidget, "_show", []);
  904. smalltalk.send(self, "_update", []);
  905. return self;
  906. }
  907. }),
  908. smalltalk.TabManager);
  909. smalltalk.addMethod(
  910. "_setBodyMargin_",
  911. smalltalk.method({
  912. selector: "setBodyMargin:",
  913. fn: function (anInteger) {
  914. var self = this;
  915. smalltalk.send(smalltalk.send(".amberBody", "_asJQuery", []), "_css_put_", ["margin-bottom", smalltalk.send(smalltalk.send(anInteger, "_asString", []), "__comma", ["px"])]);
  916. return self;
  917. }
  918. }),
  919. smalltalk.TabManager);
  920. smalltalk.addMethod(
  921. "_tabs",
  922. smalltalk.method({
  923. selector: "tabs",
  924. fn: function () {
  925. var self = this;
  926. var $1;
  927. if (($receiver = self['@tabs']) == nil || $receiver == undefined) {
  928. self['@tabs'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  929. $1 = self['@tabs'];
  930. } else {
  931. $1 = self['@tabs'];
  932. }
  933. return $1;
  934. }
  935. }),
  936. smalltalk.TabManager);
  937. smalltalk.addMethod(
  938. "_update",
  939. smalltalk.method({
  940. selector: "update",
  941. fn: function () {
  942. var self = this;
  943. smalltalk.send(self, "_renderTabs", []);
  944. return self;
  945. }
  946. }),
  947. smalltalk.TabManager);
  948. smalltalk.addMethod(
  949. "_updateBodyMargin",
  950. smalltalk.method({
  951. selector: "updateBodyMargin",
  952. fn: function () {
  953. var self = this;
  954. smalltalk.send(self, "_setBodyMargin_", [smalltalk.send(smalltalk.send("#amber", "_asJQuery", []), "_height", [])]);
  955. return self;
  956. }
  957. }),
  958. smalltalk.TabManager);
  959. smalltalk.addMethod(
  960. "_updatePosition",
  961. smalltalk.method({
  962. selector: "updatePosition",
  963. fn: function () {
  964. var self = this;
  965. jQuery("#amber").css("top", "").css("bottom", "0px");
  966. return self;
  967. }
  968. }),
  969. smalltalk.TabManager);
  970. smalltalk.TabManager.klass.iVarNames = ['current'];
  971. smalltalk.addMethod(
  972. "_current",
  973. smalltalk.method({
  974. selector: "current",
  975. fn: function () {
  976. var self = this;
  977. var $1;
  978. if (($receiver = self['@current']) == nil || $receiver == undefined) {
  979. self['@current'] = smalltalk.send(self, "_new", [], smalltalk.Widget.klass);
  980. $1 = self['@current'];
  981. } else {
  982. $1 = self['@current'];
  983. }
  984. return $1;
  985. }
  986. }),
  987. smalltalk.TabManager.klass);
  988. smalltalk.addMethod(
  989. "_new",
  990. smalltalk.method({
  991. selector: "new",
  992. fn: function () {
  993. var self = this;
  994. smalltalk.send(self, "_shouldNotImplement", []);
  995. return self;
  996. }
  997. }),
  998. smalltalk.TabManager.klass);
  999. smalltalk.addClass('TabWidget', smalltalk.Widget, ['div'], 'IDE');
  1000. smalltalk.addMethod(
  1001. "_canBeClosed",
  1002. smalltalk.method({
  1003. selector: "canBeClosed",
  1004. fn: function () {
  1005. var self = this;
  1006. return false;
  1007. }
  1008. }),
  1009. smalltalk.TabWidget);
  1010. smalltalk.addMethod(
  1011. "_close",
  1012. smalltalk.method({
  1013. selector: "close",
  1014. fn: function () {
  1015. var self = this;
  1016. smalltalk.send(smalltalk.send(smalltalk.TabManager || TabManager, "_current", []), "_closeTab_", [self]);
  1017. return self;
  1018. }
  1019. }),
  1020. smalltalk.TabWidget);
  1021. smalltalk.addMethod(
  1022. "_hide",
  1023. smalltalk.method({
  1024. selector: "hide",
  1025. fn: function () {
  1026. var self = this;
  1027. smalltalk.send(smalltalk.send(self['@div'], "_asJQuery", []), "_hide", []);
  1028. return self;
  1029. }
  1030. }),
  1031. smalltalk.TabWidget);
  1032. smalltalk.addMethod(
  1033. "_label",
  1034. smalltalk.method({
  1035. selector: "label",
  1036. fn: function () {
  1037. var self = this;
  1038. smalltalk.send(self, "_subclassResponsibility", []);
  1039. return self;
  1040. }
  1041. }),
  1042. smalltalk.TabWidget);
  1043. smalltalk.addMethod(
  1044. "_open",
  1045. smalltalk.method({
  1046. selector: "open",
  1047. fn: function () {
  1048. var self = this;
  1049. smalltalk.send(smalltalk.send(smalltalk.TabManager || TabManager, "_current", []), "_addTab_", [self]);
  1050. smalltalk.send(smalltalk.send(smalltalk.TabManager || TabManager, "_current", []), "_selectTab_", [self]);
  1051. return self;
  1052. }
  1053. }),
  1054. smalltalk.TabWidget);
  1055. smalltalk.addMethod(
  1056. "_remove",
  1057. smalltalk.method({
  1058. selector: "remove",
  1059. fn: function () {
  1060. var self = this;
  1061. smalltalk.send(smalltalk.send(self['@div'], "_asJQuery", []), "_remove", []);
  1062. return self;
  1063. }
  1064. }),
  1065. smalltalk.TabWidget);
  1066. smalltalk.addMethod(
  1067. "_renderBoxOn_",
  1068. smalltalk.method({
  1069. selector: "renderBoxOn:",
  1070. fn: function (html) {
  1071. var self = this;
  1072. return self;
  1073. }
  1074. }),
  1075. smalltalk.TabWidget);
  1076. smalltalk.addMethod(
  1077. "_renderButtonsOn_",
  1078. smalltalk.method({
  1079. selector: "renderButtonsOn:",
  1080. fn: function (html) {
  1081. var self = this;
  1082. return self;
  1083. }
  1084. }),
  1085. smalltalk.TabWidget);
  1086. smalltalk.addMethod(
  1087. "_renderOn_",
  1088. smalltalk.method({
  1089. selector: "renderOn:",
  1090. fn: function (html) {
  1091. var self = this;
  1092. var $1, $2;
  1093. $1 = smalltalk.send(html, "_div", []);
  1094. smalltalk.send($1, "_class_", ["amberTool"]);
  1095. $2 = smalltalk.send($1, "_yourself", []);
  1096. self['@div'] = $2;
  1097. smalltalk.send(self, "_renderTab", []);
  1098. return self;
  1099. }
  1100. }),
  1101. smalltalk.TabWidget);
  1102. smalltalk.addMethod(
  1103. "_renderTab",
  1104. smalltalk.method({
  1105. selector: "renderTab",
  1106. fn: function () {
  1107. var self = this;
  1108. var $1, $2, $3, $4;
  1109. smalltalk.send(self['@div'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_div", []);smalltalk.send($1, "_class_", ["amber_box"]);$2 = smalltalk.send($1, "_with_", [function () {return smalltalk.send(self, "_renderBoxOn_", [html]);}]);$2;$3 = smalltalk.send(html, "_div", []);smalltalk.send($3, "_class_", ["amber_buttons"]);$4 = smalltalk.send($3, "_with_", [function () {return smalltalk.send(self, "_renderButtonsOn_", [html]);}]);return $4;}]);
  1110. return self;
  1111. }
  1112. }),
  1113. smalltalk.TabWidget);
  1114. smalltalk.addMethod(
  1115. "_show",
  1116. smalltalk.method({
  1117. selector: "show",
  1118. fn: function () {
  1119. var self = this;
  1120. smalltalk.send(smalltalk.send(self['@div'], "_asJQuery", []), "_show", []);
  1121. return self;
  1122. }
  1123. }),
  1124. smalltalk.TabWidget);
  1125. smalltalk.addMethod(
  1126. "_update",
  1127. smalltalk.method({
  1128. selector: "update",
  1129. fn: function () {
  1130. var self = this;
  1131. smalltalk.send(self, "_renderTab", []);
  1132. return self;
  1133. }
  1134. }),
  1135. smalltalk.TabWidget);
  1136. smalltalk.addMethod(
  1137. "_open",
  1138. smalltalk.method({
  1139. selector: "open",
  1140. fn: function () {
  1141. var self = this;
  1142. var $1;
  1143. $1 = smalltalk.send(smalltalk.send(self, "_new", []), "_open", []);
  1144. return $1;
  1145. }
  1146. }),
  1147. smalltalk.TabWidget.klass);
  1148. smalltalk.addClass('Browser', smalltalk.TabWidget, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'packagesList', 'classesList', 'protocolsList', 'methodsList', 'sourceArea', 'tabsList', 'selectedTab', 'saveButton', 'classButtons', 'methodButtons', 'unsavedChanges'], 'IDE');
  1149. smalltalk.addMethod(
  1150. "_addInstanceVariableNamed_toClass_",
  1151. smalltalk.method({
  1152. selector: "addInstanceVariableNamed:toClass:",
  1153. fn: function (aString, aClass) {
  1154. var self = this;
  1155. var $1, $2;
  1156. $1 = smalltalk.send(smalltalk.send(aClass, "_instanceVariableNames", []), "_copy", []);
  1157. smalltalk.send($1, "_add_", [aString]);
  1158. $2 = smalltalk.send($1, "_yourself", []);
  1159. smalltalk.send(smalltalk.send(smalltalk.ClassBuilder || ClassBuilder, "_new", []), "_addSubclassOf_named_instanceVariableNames_package_", [smalltalk.send(aClass, "_superclass", []), smalltalk.send(aClass, "_name", []), $2, smalltalk.send(smalltalk.send(aClass, "_package", []), "_name", [])]);
  1160. return self;
  1161. }
  1162. }),
  1163. smalltalk.Browser);
  1164. smalltalk.addMethod(
  1165. "_addNewClass",
  1166. smalltalk.method({
  1167. selector: "addNewClass",
  1168. fn: function () {
  1169. var self = this;
  1170. var $1, $2;
  1171. var className;
  1172. className = smalltalk.send(window, "_prompt_", ["New class"]);
  1173. $1 = smalltalk.send(smalltalk.send(className, "_notNil", []), "_and_", [function () {return smalltalk.send(className, "_notEmpty", []);}]);
  1174. if (smalltalk.assert($1)) {
  1175. smalltalk.send(smalltalk.Object || Object, "_subclass_instanceVariableNames_package_", [className, "", smalltalk.send(self, "_selectedPackage", [])]);
  1176. smalltalk.send(self, "_resetClassesList", []);
  1177. $2 = smalltalk.send(self, "_updateClassesList", []);
  1178. smalltalk.send(self, "_selectClass_", [smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_at_", [className])]);
  1179. }
  1180. return self;
  1181. }
  1182. }),
  1183. smalltalk.Browser);
  1184. smalltalk.addMethod(
  1185. "_addNewProtocol",
  1186. smalltalk.method({
  1187. selector: "addNewProtocol",
  1188. fn: function () {
  1189. var self = this;
  1190. var $1;
  1191. var newProtocol;
  1192. newProtocol = smalltalk.send(window, "_prompt_", ["New method protocol"]);
  1193. $1 = smalltalk.send(smalltalk.send(newProtocol, "_notNil", []), "_and_", [function () {return smalltalk.send(newProtocol, "_notEmpty", []);}]);
  1194. if (smalltalk.assert($1)) {
  1195. smalltalk.send(self['@selectedMethod'], "_category_", [newProtocol]);
  1196. smalltalk.send(self, "_setMethodProtocol_", [newProtocol]);
  1197. }
  1198. return self;
  1199. }
  1200. }),
  1201. smalltalk.Browser);
  1202. smalltalk.addMethod(
  1203. "_ajaxPutAt_data_",
  1204. smalltalk.method({
  1205. selector: "ajaxPutAt:data:",
  1206. fn: function (anURL, aString) {
  1207. var self = this;
  1208. smalltalk.send(jQuery, "_ajax_options_", [anURL, smalltalk.HashedCollection._fromPairs_([smalltalk.send("type", "__minus_gt", ["PUT"]), smalltalk.send("data", "__minus_gt", [aString]), smalltalk.send("contentType", "__minus_gt", ["text/plain;charset=UTF-8"]), smalltalk.send("error", "__minus_gt", [function () {return smalltalk.send(window, "_alert_", [smalltalk.send("PUT request failed at: ", "__comma", [anURL])]);}])])]);
  1209. return self;
  1210. }
  1211. }),
  1212. smalltalk.Browser);
  1213. smalltalk.addMethod(
  1214. "_canBeClosed",
  1215. smalltalk.method({
  1216. selector: "canBeClosed",
  1217. fn: function () {
  1218. var self = this;
  1219. return true;
  1220. }
  1221. }),
  1222. smalltalk.Browser);
  1223. smalltalk.addMethod(
  1224. "_cancelChanges",
  1225. smalltalk.method({
  1226. selector: "cancelChanges",
  1227. fn: function () {
  1228. var self = this;
  1229. var $1;
  1230. if (smalltalk.assert(self['@unsavedChanges'])) {
  1231. $1 = smalltalk.send(window, "_confirm_", ["Cancel changes?"]);
  1232. } else {
  1233. $1 = true;
  1234. }
  1235. return $1;
  1236. }
  1237. }),
  1238. smalltalk.Browser);
  1239. smalltalk.addMethod(
  1240. "_classCommentSource",
  1241. smalltalk.method({
  1242. selector: "classCommentSource",
  1243. fn: function () {
  1244. var self = this;
  1245. var $1;
  1246. $1 = smalltalk.send(self['@selectedClass'], "_comment", []);
  1247. return $1;
  1248. }
  1249. }),
  1250. smalltalk.Browser);
  1251. smalltalk.addMethod(
  1252. "_classDeclarationSource",
  1253. smalltalk.method({
  1254. selector: "classDeclarationSource",
  1255. fn: function () {
  1256. var self = this;
  1257. var $1, $2, $3, $4;
  1258. var stream;
  1259. stream = smalltalk.send("", "_writeStream", []);
  1260. if (($receiver = self['@selectedClass']) == nil ||
  1261. $receiver == undefined) {
  1262. $1 = smalltalk.send(self, "_classDeclarationTemplate", []);
  1263. return $1;
  1264. } else {
  1265. self['@selectedClass'];
  1266. }
  1267. smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(smalltalk.send(self['@selectedClass'], "_superclass", []), "_asString", [])]);
  1268. smalltalk.send(stream, "_nextPutAll_", [" subclass: #"]);
  1269. smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self['@selectedClass'], "_name", [])]);
  1270. smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.String || String, "_lf", []), "__comma", [smalltalk.send(smalltalk.String || String, "_tab", [])])]);
  1271. $2 = smalltalk.send(stream, "_nextPutAll_", ["instanceVariableNames: '"]);
  1272. smalltalk.send(smalltalk.send(self['@selectedClass'], "_instanceVariableNames", []), "_do_separatedBy_", [function (each) {return smalltalk.send(stream, "_nextPutAll_", [each]);}, function () {return smalltalk.send(stream, "_nextPutAll_", [" "]);}]);
  1273. smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [smalltalk.send(smalltalk.String || String, "_lf", [])]), "__comma", [smalltalk.send(smalltalk.String || String, "_tab", [])])]);
  1274. smalltalk.send(stream, "_nextPutAll_", ["package: '"]);
  1275. smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self['@selectedClass'], "_category", [])]);
  1276. $3 = smalltalk.send(stream, "_nextPutAll_", ["'"]);
  1277. $4 = smalltalk.send(stream, "_contents", []);
  1278. return $4;
  1279. }
  1280. }),
  1281. smalltalk.Browser);
  1282. smalltalk.addMethod(
  1283. "_classDeclarationTemplate",
  1284. smalltalk.method({
  1285. selector: "classDeclarationTemplate",
  1286. fn: function () {
  1287. var self = this;
  1288. var $1;
  1289. $1 = smalltalk.send(smalltalk.send("Object subclass: #NameOfSubclass\n\tinstanceVariableNames: ''\n\tpackage: '", "__comma", [smalltalk.send(self, "_selectedPackage", [])]), "__comma", ["'"]);
  1290. return $1;
  1291. }
  1292. }),
  1293. smalltalk.Browser);
  1294. smalltalk.addMethod(
  1295. "_classes",
  1296. smalltalk.method({
  1297. selector: "classes",
  1298. fn: function () {
  1299. var self = this;
  1300. var $1;
  1301. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_classes", []), "_select_", [function (each) {return smalltalk.send(smalltalk.send(each, "_category", []), "__eq", [self['@selectedPackage']]);}]), "_sort_", [function (a, b) {return smalltalk.send(smalltalk.send(a, "_name", []), "__lt", [smalltalk.send(b, "_name", [])]);}]), "_asSet", []);
  1302. return $1;
  1303. }
  1304. }),
  1305. smalltalk.Browser);
  1306. smalltalk.addMethod(
  1307. "_commitPackage",
  1308. smalltalk.method({
  1309. selector: "commitPackage",
  1310. fn: function () {
  1311. var self = this;
  1312. if (($receiver = self['@selectedPackage']) == nil ||
  1313. $receiver == undefined) {
  1314. self['@selectedPackage'];
  1315. } else {
  1316. var package;
  1317. package = smalltalk.send(smalltalk.Package || Package, "_named_", [self['@selectedPackage']]);
  1318. smalltalk.send([smalltalk.send(smalltalk.Exporter || Exporter, "__minus_gt", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(package, "_commitPathJs", []), "__comma", ["/"]), "__comma", [self['@selectedPackage']]), "__comma", [".js"])]), smalltalk.send(smalltalk.StrippedExporter || StrippedExporter, "__minus_gt", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(package, "_commitPathJs", []), "__comma", ["/"]), "__comma", [self['@selectedPackage']]), "__comma", [".deploy.js"])]), smalltalk.send(smalltalk.ChunkExporter || ChunkExporter, "__minus_gt", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(package, "_commitPathSt", []), "__comma", ["/"]), "__comma", [self['@selectedPackage']]), "__comma", [".st"])])], "_do_", [function (commitStrategy) {var fileContents;fileContents = smalltalk.send(smalltalk.send(smalltalk.send(commitStrategy, "_key", []), "_new", []), "_exportPackage_", [self['@selectedPackage']]);return smalltalk.send(self, "_ajaxPutAt_data_", [smalltalk.send(commitStrategy, "_value", []), fileContents]);}]);
  1319. }
  1320. return self;
  1321. }
  1322. }),
  1323. smalltalk.Browser);
  1324. smalltalk.addMethod(
  1325. "_compile",
  1326. smalltalk.method({
  1327. selector: "compile",
  1328. fn: function () {
  1329. var self = this;
  1330. var $1, $2;
  1331. var currentEditLine;
  1332. smalltalk.send(self, "_disableSaveButton", []);
  1333. currentEditLine = smalltalk.send(smalltalk.send(self['@sourceArea'], "_editor", []), "_getCursor", []);
  1334. $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")]);
  1335. if (smalltalk.assert($1)) {
  1336. if (($receiver = self['@selectedClass']) == nil ||
  1337. $receiver == undefined) {
  1338. self['@selectedClass'];
  1339. } else {
  1340. smalltalk.send(self, "_compileClassComment", []);
  1341. }
  1342. } else {
  1343. $2 = smalltalk.send(smalltalk.send(self['@selectedProtocol'], "_notNil", []), "_or_", [function () {return smalltalk.send(self['@selectedMethod'], "_notNil", []);}]);
  1344. if (smalltalk.assert($2)) {
  1345. smalltalk.send(self, "_compileMethodDefinition", []);
  1346. } else {
  1347. smalltalk.send(self, "_compileDefinition", []);
  1348. }
  1349. }
  1350. smalltalk.send(smalltalk.send(self['@sourceArea'], "_editor", []), "_setCursor_", [currentEditLine]);
  1351. return self;
  1352. }
  1353. }),
  1354. smalltalk.Browser);
  1355. smalltalk.addMethod(
  1356. "_compileClassComment",
  1357. smalltalk.method({
  1358. selector: "compileClassComment",
  1359. fn: function () {
  1360. var self = this;
  1361. smalltalk.send(self['@selectedClass'], "_comment_", [smalltalk.send(self['@sourceArea'], "_val", [])]);
  1362. return self;
  1363. }
  1364. }),
  1365. smalltalk.Browser);
  1366. smalltalk.addMethod(
  1367. "_compileDefinition",
  1368. smalltalk.method({
  1369. selector: "compileDefinition",
  1370. fn: function () {
  1371. var self = this;
  1372. var $1;
  1373. var newClass;
  1374. newClass = smalltalk.send(smalltalk.send(smalltalk.Compiler || Compiler, "_new", []), "_evaluateExpression_", [smalltalk.send(self['@sourceArea'], "_val", [])]);
  1375. smalltalk.send(self, "_resetClassesList", []);
  1376. smalltalk.send(self, "_updateCategoriesList", []);
  1377. $1 = smalltalk.send(self, "_updateClassesList", []);
  1378. smalltalk.send(self, "_selectClass_", [newClass]);
  1379. return self;
  1380. }
  1381. }),
  1382. smalltalk.Browser);
  1383. smalltalk.addMethod(
  1384. "_compileMethodDefinition",
  1385. smalltalk.method({
  1386. selector: "compileMethodDefinition",
  1387. fn: function () {
  1388. var self = this;
  1389. var $1;
  1390. $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
  1391. if (smalltalk.assert($1)) {
  1392. smalltalk.send(self, "_compileMethodDefinitionFor_", [self['@selectedClass']]);
  1393. } else {
  1394. smalltalk.send(self, "_compileMethodDefinitionFor_", [smalltalk.send(self['@selectedClass'], "_class", [])]);
  1395. }
  1396. return self;
  1397. }
  1398. }),
  1399. smalltalk.Browser);
  1400. smalltalk.addMethod(
  1401. "_compileMethodDefinitionFor_",
  1402. smalltalk.method({
  1403. selector: "compileMethodDefinitionFor:",
  1404. fn: function (aClass) {
  1405. var self = this;
  1406. var $1, $2, $3, $4, $5;
  1407. var $early = {};
  1408. try {
  1409. var compiler;
  1410. var method;
  1411. var source;
  1412. var node;
  1413. source = smalltalk.send(self['@sourceArea'], "_val", []);
  1414. if (($receiver = self['@selectedProtocol']) == nil ||
  1415. $receiver == undefined) {
  1416. self['@selectedProtocol'] = smalltalk.send(self['@selectedMethod'], "_category", []);
  1417. self['@selectedProtocol'];
  1418. } else {
  1419. self['@selectedProtocol'];
  1420. }
  1421. compiler = smalltalk.send(smalltalk.Compiler || Compiler, "_new", []);
  1422. smalltalk.send(compiler, "_source_", [source]);
  1423. node = smalltalk.send(compiler, "_parse_", [source]);
  1424. $1 = smalltalk.send(node, "_isParseFailure", []);
  1425. if (smalltalk.assert($1)) {
  1426. $2 = smalltalk.send(window, "_alert_", [smalltalk.send(smalltalk.send(smalltalk.send("PARSE ERROR: ", "__comma", [smalltalk.send(node, "_reason", [])]), "__comma", [", position: "]), "__comma", [smalltalk.send(smalltalk.send(node, "_position", []), "_asString", [])])]);
  1427. return $2;
  1428. }
  1429. smalltalk.send(compiler, "_currentClass_", [aClass]);
  1430. method = smalltalk.send(compiler, "_eval_", [smalltalk.send(compiler, "_compileNode_", [node])]);
  1431. smalltalk.send(method, "_category_", [self['@selectedProtocol']]);
  1432. smalltalk.send(smalltalk.send(compiler, "_unknownVariables", []), "_do_", [function (each) {$3 = smalltalk.send(window, "_at_", [each]);if (($receiver = $3) == nil || $receiver == undefined) {$4 = smalltalk.send(window, "_confirm_", [smalltalk.send(smalltalk.send("Declare '", "__comma", [each]), "__comma", ["' as instance variable?"])]);if (smalltalk.assert($4)) {smalltalk.send(self, "_addInstanceVariableNamed_toClass_", [each, aClass]);$5 = smalltalk.send(self, "_compileMethodDefinitionFor_", [aClass]);throw $early = [$5];}} else {return $3;}}]);
  1433. smalltalk.send(aClass, "_addCompiledMethod_", [method]);
  1434. smalltalk.send(compiler, "_setupClass_", [aClass]);
  1435. smalltalk.send(self, "_updateMethodsList", []);
  1436. smalltalk.send(self, "_selectMethod_", [method]);
  1437. return self;
  1438. } catch (e) {
  1439. if (e === $early) {
  1440. return e[0];
  1441. }
  1442. throw e;
  1443. }
  1444. }
  1445. }),
  1446. smalltalk.Browser);
  1447. smalltalk.addMethod(
  1448. "_copyClass",
  1449. smalltalk.method({
  1450. selector: "copyClass",
  1451. fn: function () {
  1452. var self = this;
  1453. var $1, $2;
  1454. var className;
  1455. className = smalltalk.send(window, "_prompt_", ["Copy class"]);
  1456. $1 = smalltalk.send(smalltalk.send(className, "_notNil", []), "_and_", [function () {return smalltalk.send(className, "_notEmpty", []);}]);
  1457. if (smalltalk.assert($1)) {
  1458. smalltalk.send(smalltalk.send(smalltalk.ClassBuilder || ClassBuilder, "_new", []), "_copyClass_named_", [smalltalk.send(self, "_selectedClass", []), className]);
  1459. smalltalk.send(self, "_resetClassesList", []);
  1460. $2 = smalltalk.send(self, "_updateClassesList", []);
  1461. smalltalk.send(self, "_selectClass_", [smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_at_", [className])]);
  1462. }
  1463. return self;
  1464. }
  1465. }),
  1466. smalltalk.Browser);
  1467. smalltalk.addMethod(
  1468. "_declarationSource",
  1469. smalltalk.method({
  1470. selector: "declarationSource",
  1471. fn: function () {
  1472. var self = this;
  1473. var $2, $1;
  1474. $2 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
  1475. if (smalltalk.assert($2)) {
  1476. $1 = smalltalk.send(self, "_classDeclarationSource", []);
  1477. } else {
  1478. $1 = smalltalk.send(self, "_metaclassDeclarationSource", []);
  1479. }
  1480. return $1;
  1481. }
  1482. }),
  1483. smalltalk.Browser);
  1484. smalltalk.addMethod(
  1485. "_disableSaveButton",
  1486. smalltalk.method({
  1487. selector: "disableSaveButton",
  1488. fn: function () {
  1489. var self = this;
  1490. if (($receiver = self['@saveButton']) == nil || $receiver == undefined) {
  1491. self['@saveButton'];
  1492. } else {
  1493. smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);
  1494. }
  1495. self['@unsavedChanges'] = false;
  1496. return self;
  1497. }
  1498. }),
  1499. smalltalk.Browser);
  1500. smalltalk.addMethod(
  1501. "_dummyMethodSource",
  1502. smalltalk.method({
  1503. selector: "dummyMethodSource",
  1504. fn: function () {
  1505. var self = this;
  1506. return "messageSelectorAndArgumentNames\n\t\"comment stating purpose of message\"\n\n\t| temporary variable names |\n\tstatements";
  1507. }
  1508. }),
  1509. smalltalk.Browser);
  1510. smalltalk.addMethod(
  1511. "_handleSourceAreaKeyDown_",
  1512. smalltalk.method({
  1513. selector: "handleSourceAreaKeyDown:",
  1514. fn: function (anEvent) {
  1515. var self = this;
  1516. if (anEvent.ctrlKey) {
  1517. if (anEvent.keyCode === 83) {
  1518. self._compile();
  1519. anEvent.preventDefault();
  1520. return false;
  1521. }
  1522. }
  1523. return self;
  1524. }
  1525. }),
  1526. smalltalk.Browser);
  1527. smalltalk.addMethod(
  1528. "_hideClassButtons",
  1529. smalltalk.method({
  1530. selector: "hideClassButtons",
  1531. fn: function () {
  1532. var self = this;
  1533. smalltalk.send(smalltalk.send(self['@classButtons'], "_asJQuery", []), "_hide", []);
  1534. return self;
  1535. }
  1536. }),
  1537. smalltalk.Browser);
  1538. smalltalk.addMethod(
  1539. "_hideMethodButtons",
  1540. smalltalk.method({
  1541. selector: "hideMethodButtons",
  1542. fn: function () {
  1543. var self = this;
  1544. smalltalk.send(smalltalk.send(self['@methodButtons'], "_asJQuery", []), "_hide", []);
  1545. return self;
  1546. }
  1547. }),
  1548. smalltalk.Browser);
  1549. smalltalk.addMethod(
  1550. "_initialize",
  1551. smalltalk.method({
  1552. selector: "initialize",
  1553. fn: function () {
  1554. var self = this;
  1555. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  1556. self['@selectedTab'] = smalltalk.symbolFor("instance");
  1557. self['@selectedPackage'] = smalltalk.send(smalltalk.send(self, "_packages", []), "_first", []);
  1558. self['@unsavedChanges'] = false;
  1559. return self;
  1560. }
  1561. }),
  1562. smalltalk.Browser);
  1563. smalltalk.addMethod(
  1564. "_label",
  1565. smalltalk.method({
  1566. selector: "label",
  1567. fn: function () {
  1568. var self = this;
  1569. var $1;
  1570. if (($receiver = self['@selectedClass']) == nil ||
  1571. $receiver == undefined) {
  1572. $1 = "Browser (nil)";
  1573. } else {
  1574. $1 = smalltalk.send("Browser: ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])]);
  1575. }
  1576. return $1;
  1577. }
  1578. }),
  1579. smalltalk.Browser);
  1580. smalltalk.addMethod(
  1581. "_metaclassDeclarationSource",
  1582. smalltalk.method({
  1583. selector: "metaclassDeclarationSource",
  1584. fn: function () {
  1585. var self = this;
  1586. var $1, $2;
  1587. var stream;
  1588. stream = smalltalk.send("", "_writeStream", []);
  1589. if (($receiver = self['@selectedClass']) == nil ||
  1590. $receiver == undefined) {
  1591. self['@selectedClass'];
  1592. } else {
  1593. smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self['@selectedClass'], "_asString", [])]);
  1594. smalltalk.send(stream, "_nextPutAll_", [" class "]);
  1595. $1 = smalltalk.send(stream, "_nextPutAll_", ["instanceVariableNames: '"]);
  1596. 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_", [" "]);}]);
  1597. smalltalk.send(stream, "_nextPutAll_", ["'"]);
  1598. }
  1599. $2 = smalltalk.send(stream, "_contents", []);
  1600. return $2;
  1601. }
  1602. }),
  1603. smalltalk.Browser);
  1604. smalltalk.addMethod(
  1605. "_methodSource",
  1606. smalltalk.method({
  1607. selector: "methodSource",
  1608. fn: function () {
  1609. var self = this;
  1610. var $1;
  1611. if (($receiver = self['@selectedMethod']) == nil ||
  1612. $receiver == undefined) {
  1613. $1 = smalltalk.send(self, "_dummyMethodSource", []);
  1614. } else {
  1615. $1 = smalltalk.send(self['@selectedMethod'], "_source", []);
  1616. }
  1617. return $1;
  1618. }
  1619. }),
  1620. smalltalk.Browser);
  1621. smalltalk.addMethod(
  1622. "_methods",
  1623. smalltalk.method({
  1624. selector: "methods",
  1625. fn: function () {
  1626. var self = this;
  1627. var $1, $2, $4, $3;
  1628. var klass;
  1629. $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")]);
  1630. if (smalltalk.assert($1)) {
  1631. return [];
  1632. }
  1633. if (($receiver = self['@selectedClass']) == nil ||
  1634. $receiver == undefined) {
  1635. self['@selectedClass'];
  1636. } else {
  1637. $2 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
  1638. if (smalltalk.assert($2)) {
  1639. klass = self['@selectedClass'];
  1640. } else {
  1641. klass = smalltalk.send(self['@selectedClass'], "_class", []);
  1642. }
  1643. }
  1644. if (($receiver = self['@selectedProtocol']) == nil ||
  1645. $receiver == undefined) {
  1646. if (($receiver = klass) == nil || $receiver == undefined) {
  1647. $4 = [];
  1648. } else {
  1649. $4 = smalltalk.send(smalltalk.send(klass, "_methodDictionary", []), "_values", []);
  1650. }
  1651. } else {
  1652. $4 = smalltalk.send(smalltalk.send(smalltalk.send(klass, "_methodDictionary", []), "_values", []), "_select_", [function (each) {return smalltalk.send(smalltalk.send(each, "_category", []), "__eq", [self['@selectedProtocol']]);}]);
  1653. }
  1654. $3 = smalltalk.send($4, "_sort_", [function (a, b) {return smalltalk.send(smalltalk.send(a, "_selector", []), "__lt", [smalltalk.send(b, "_selector", [])]);}]);
  1655. return $3;
  1656. }
  1657. }),
  1658. smalltalk.Browser);
  1659. smalltalk.addMethod(
  1660. "_packages",
  1661. smalltalk.method({
  1662. selector: "packages",
  1663. fn: function () {
  1664. var self = this;
  1665. var $1, $2;
  1666. var packages;
  1667. packages = smalltalk.send(smalltalk.Array || Array, "_new", []);
  1668. smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_classes", []), "_do_", [function (each) {$1 = smalltalk.send(packages, "_includes_", [smalltalk.send(each, "_category", [])]);if (!smalltalk.assert($1)) {return smalltalk.send(packages, "_add_", [smalltalk.send(each, "_category", [])]);}}]);
  1669. $2 = smalltalk.send(packages, "_sort", []);
  1670. return $2;
  1671. }
  1672. }),
  1673. smalltalk.Browser);
  1674. smalltalk.addMethod(
  1675. "_protocols",
  1676. smalltalk.method({
  1677. selector: "protocols",
  1678. fn: function () {
  1679. var self = this;
  1680. var $1, $2, $3, $4, $5, $6;
  1681. var klass;
  1682. if (($receiver = self['@selectedClass']) == nil ||
  1683. $receiver == undefined) {
  1684. self['@selectedClass'];
  1685. } else {
  1686. $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")]);
  1687. if (smalltalk.assert($1)) {
  1688. return [];
  1689. }
  1690. $2 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
  1691. if (smalltalk.assert($2)) {
  1692. klass = self['@selectedClass'];
  1693. } else {
  1694. klass = smalltalk.send(self['@selectedClass'], "_class", []);
  1695. }
  1696. $3 = smalltalk.send(smalltalk.send(klass, "_methodDictionary", []), "_isEmpty", []);
  1697. if (smalltalk.assert($3)) {
  1698. $4 = smalltalk.send(smalltalk.Array || Array, "_with_", ["not yet classified"]);
  1699. return $4;
  1700. }
  1701. $5 = smalltalk.send(klass, "_protocols", []);
  1702. return $5;
  1703. }
  1704. $6 = smalltalk.send(smalltalk.Array || Array, "_new", []);
  1705. return $6;
  1706. }
  1707. }),
  1708. smalltalk.Browser);
  1709. smalltalk.addMethod(
  1710. "_removeClass",
  1711. smalltalk.method({
  1712. selector: "removeClass",
  1713. fn: function () {
  1714. var self = this;
  1715. var $1;
  1716. $1 = smalltalk.send(window, "_confirm_", [smalltalk.send(smalltalk.send("Do you really want to remove ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])]), "__comma", ["?"])]);
  1717. if (smalltalk.assert($1)) {
  1718. smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_removeClass_", [self['@selectedClass']]);
  1719. smalltalk.send(self, "_resetClassesList", []);
  1720. smalltalk.send(self, "_selectClass_", [nil]);
  1721. }
  1722. return self;
  1723. }
  1724. }),
  1725. smalltalk.Browser);
  1726. smalltalk.addMethod(
  1727. "_removeMethod",
  1728. smalltalk.method({
  1729. selector: "removeMethod",
  1730. fn: function () {
  1731. var self = this;
  1732. var $1, $2, $3;
  1733. $1 = smalltalk.send(self, "_cancelChanges", []);
  1734. if (smalltalk.assert($1)) {
  1735. $2 = smalltalk.send(window, "_confirm_", [smalltalk.send(smalltalk.send("Do you really want to remove #", "__comma", [smalltalk.send(self['@selectedMethod'], "_selector", [])]), "__comma", ["?"])]);
  1736. if (smalltalk.assert($2)) {
  1737. $3 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
  1738. if (smalltalk.assert($3)) {
  1739. smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);
  1740. } else {
  1741. smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);
  1742. }
  1743. smalltalk.send(self, "_selectMethod_", [nil]);
  1744. }
  1745. }
  1746. return self;
  1747. }
  1748. }),
  1749. smalltalk.Browser);
  1750. smalltalk.addMethod(
  1751. "_removePackage",
  1752. smalltalk.method({
  1753. selector: "removePackage",
  1754. fn: function () {
  1755. var self = this;
  1756. var $1;
  1757. $1 = smalltalk.send(window, "_confirm_", [smalltalk.send(smalltalk.send("Do you really want to remove the whole package ", "__comma", [self['@selectedPackage']]), "__comma", [" with all its classes?"])]);
  1758. if (smalltalk.assert($1)) {
  1759. smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_removePackage_", [self['@selectedPackage']]);
  1760. smalltalk.send(self, "_updateCategoriesList", []);
  1761. }
  1762. return self;
  1763. }
  1764. }),
  1765. smalltalk.Browser);
  1766. smalltalk.addMethod(
  1767. "_renameClass",
  1768. smalltalk.method({
  1769. selector: "renameClass",
  1770. fn: function () {
  1771. var self = this;
  1772. var $1, $2;
  1773. var newName;
  1774. newName = smalltalk.send(window, "_prompt_", [smalltalk.send("Rename class ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])])]);
  1775. $1 = smalltalk.send(smalltalk.send(newName, "_notNil", []), "_and_", [function () {return smalltalk.send(newName, "_notEmpty", []);}]);
  1776. if (smalltalk.assert($1)) {
  1777. smalltalk.send(self['@selectedClass'], "_rename_", [newName]);
  1778. smalltalk.send(self, "_updateClassesList", []);
  1779. $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
  1780. }
  1781. return self;
  1782. }
  1783. }),
  1784. smalltalk.Browser);
  1785. smalltalk.addMethod(
  1786. "_renamePackage",
  1787. smalltalk.method({
  1788. selector: "renamePackage",
  1789. fn: function () {
  1790. var self = this;
  1791. var $1;
  1792. var newName;
  1793. newName = smalltalk.send(window, "_prompt_", [smalltalk.send("Rename package ", "__comma", [self['@selectedPackage']])]);
  1794. if (($receiver = newName) == nil || $receiver == undefined) {
  1795. } else {
  1796. $1 = smalltalk.send(newName, "_notEmpty", []);
  1797. if (smalltalk.assert($1)) {
  1798. smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_renamePackage_to_", [self['@selectedPackage'], newName]);
  1799. smalltalk.send(self, "_updateCategoriesList", []);
  1800. }
  1801. }
  1802. return self;
  1803. }
  1804. }),
  1805. smalltalk.Browser);
  1806. smalltalk.addMethod(
  1807. "_renderBottomPanelOn_",
  1808. smalltalk.method({
  1809. selector: "renderBottomPanelOn:",
  1810. fn: function (html) {
  1811. var self = this;
  1812. var $1, $2;
  1813. $1 = smalltalk.send(html, "_div", []);
  1814. smalltalk.send($1, "_class_", ["amber_sourceCode"]);
  1815. $2 = smalltalk.send($1, "_with_", [function () {self['@sourceArea'] = smalltalk.send(smalltalk.SourceArea || SourceArea, "_new", []);self['@sourceArea'];smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);smalltalk.send(self['@sourceArea'], "_onKeyDown_", [function (e) {return smalltalk.send(self, "_handleSourceAreaKeyDown_", [e]);}]);return smalltalk.send(self['@sourceArea'], "_onKeyUp_", [function () {return smalltalk.send(self, "_updateStatus", []);}]);}]);
  1816. return self;
  1817. }
  1818. }),
  1819. smalltalk.Browser);
  1820. smalltalk.addMethod(
  1821. "_renderBoxOn_",
  1822. smalltalk.method({
  1823. selector: "renderBoxOn:",
  1824. fn: function (html) {
  1825. var self = this;
  1826. var $1;
  1827. smalltalk.send(self, "_renderTopPanelOn_", [html]);
  1828. smalltalk.send(self, "_renderTabsOn_", [html]);
  1829. $1 = smalltalk.send(self, "_renderBottomPanelOn_", [html]);
  1830. return self;
  1831. }
  1832. }),
  1833. smalltalk.Browser);
  1834. smalltalk.addMethod(
  1835. "_renderButtonsOn_",
  1836. smalltalk.method({
  1837. selector: "renderButtonsOn:",
  1838. fn: function (html) {
  1839. var self = this;
  1840. var $1, $2, $4, $5, $6, $7, $8, $9, $3;
  1841. self['@saveButton'] = smalltalk.send(html, "_button", []);
  1842. smalltalk.send(self['@saveButton'], "_with_", ["Save"]);
  1843. $1 = smalltalk.send(self['@saveButton'], "_onClick_", [function () {return smalltalk.send(self, "_compile", []);}]);
  1844. self['@methodButtons'] = smalltalk.send(html, "_span", []);
  1845. self['@classButtons'] = smalltalk.send(html, "_span", []);
  1846. $2 = smalltalk.send(html, "_div", []);
  1847. smalltalk.send($2, "_class_", ["right"]);
  1848. $3 = smalltalk.send($2, "_with_", [function () {$4 = smalltalk.send(html, "_button", []);smalltalk.send($4, "_with_", ["DoIt"]);$5 = smalltalk.send($4, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_doIt", []);}]);$5;$6 = smalltalk.send(html, "_button", []);smalltalk.send($6, "_with_", ["PrintIt"]);$7 = smalltalk.send($6, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_printIt", []);}]);$7;$8 = smalltalk.send(html, "_button", []);smalltalk.send($8, "_with_", ["InspectIt"]);$9 = smalltalk.send($8, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_inspectIt", []);}]);return $9;}]);
  1849. smalltalk.send(self, "_updateSourceAndButtons", []);
  1850. return self;
  1851. }
  1852. }),
  1853. smalltalk.Browser);
  1854. smalltalk.addMethod(
  1855. "_renderTabsOn_",
  1856. smalltalk.method({
  1857. selector: "renderTabsOn:",
  1858. fn: function (html) {
  1859. var self = this;
  1860. self['@tabsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_tabs amber_browser"]);
  1861. smalltalk.send(self, "_updateTabsList", []);
  1862. return self;
  1863. }
  1864. }),
  1865. smalltalk.Browser);
  1866. smalltalk.addMethod(
  1867. "_renderTopPanelOn_",
  1868. smalltalk.method({
  1869. selector: "renderTopPanelOn:",
  1870. fn: function (html) {
  1871. var self = this;
  1872. var $1, $3, $5, $6, $7, $8, $9, $10, $4, $11, $2;
  1873. $1 = smalltalk.send(html, "_div", []);
  1874. smalltalk.send($1, "_class_", ["top"]);
  1875. $2 = smalltalk.send($1, "_with_", [function () {self['@packagesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column browser packages"]);self['@packagesList'];$3 = smalltalk.send(html, "_div", []);smalltalk.send($3, "_class_", ["amber_packagesButtons"]);$4 = smalltalk.send($3, "_with_", [function () {$5 = smalltalk.send(html, "_button", []);smalltalk.send($5, "_title_", ["Commit classes in this package to disk"]);smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(self, "_commitPackage", []);}]);$6 = smalltalk.send($5, "_with_", ["Commit"]);$6;$7 = smalltalk.send(html, "_button", []);smalltalk.send($7, "_title_", ["Rename package"]);smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self, "_renamePackage", []);}]);$8 = smalltalk.send($7, "_with_", ["Rename"]);$8;$9 = smalltalk.send(html, "_button", []);smalltalk.send($9, "_title_", ["Remove this package from the system"]);smalltalk.send($9, "_onClick_", [function () {return smalltalk.send(self, "_removePackage", []);}]);$10 = smalltalk.send($9, "_with_", ["Remove"]);return $10;}]);$4;self['@classesList'] = smalltalk.send(smalltalk.ClassesList || ClassesList, "_on_", [self]);self['@classesList'];smalltalk.send(self['@classesList'], "_renderOn_", [html]);self['@protocolsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column browser protocols"]);self['@protocolsList'];self['@methodsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column browser methods"]);self['@methodsList'];smalltalk.send(self, "_updateCategoriesList", []);smalltalk.send(self, "_updateClassesList", []);smalltalk.send(self, "_updateProtocolsList", []);$11 = smalltalk.send(self, "_updateMethodsList", []);$11;return smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["amber_clear"]);}]);
  1876. return self;
  1877. }
  1878. }),
  1879. smalltalk.Browser);
  1880. smalltalk.addMethod(
  1881. "_resetClassesList",
  1882. smalltalk.method({
  1883. selector: "resetClassesList",
  1884. fn: function () {
  1885. var self = this;
  1886. smalltalk.send(self['@classesList'], "_resetNodes", []);
  1887. return self;
  1888. }
  1889. }),
  1890. smalltalk.Browser);
  1891. smalltalk.addMethod(
  1892. "_search_",
  1893. smalltalk.method({
  1894. selector: "search:",
  1895. fn: function (aString) {
  1896. var self = this;
  1897. var $1, $2;
  1898. $1 = smalltalk.send(self, "_cancelChanges", []);
  1899. if (smalltalk.assert($1)) {
  1900. var searchedClass;
  1901. searchedClass = smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_at_", [aString]);
  1902. $2 = smalltalk.send(searchedClass, "_isClass", []);
  1903. if (smalltalk.assert($2)) {
  1904. smalltalk.send(smalltalk.send(self, "_class", []), "_openOn_", [searchedClass]);
  1905. } else {
  1906. smalltalk.send(self, "_searchReferencesOf_", [aString]);
  1907. }
  1908. }
  1909. return self;
  1910. }
  1911. }),
  1912. smalltalk.Browser);
  1913. smalltalk.addMethod(
  1914. "_searchClassReferences",
  1915. smalltalk.method({
  1916. selector: "searchClassReferences",
  1917. fn: function () {
  1918. var self = this;
  1919. smalltalk.send(smalltalk.ReferencesBrowser || ReferencesBrowser, "_search_", [smalltalk.send(self['@selectedClass'], "_name", [])]);
  1920. return self;
  1921. }
  1922. }),
  1923. smalltalk.Browser);
  1924. smalltalk.addMethod(
  1925. "_searchReferencesOf_",
  1926. smalltalk.method({
  1927. selector: "searchReferencesOf:",
  1928. fn: function (aString) {
  1929. var self = this;
  1930. smalltalk.send(smalltalk.ReferencesBrowser || ReferencesBrowser, "_search_", [aString]);
  1931. return self;
  1932. }
  1933. }),
  1934. smalltalk.Browser);
  1935. smalltalk.addMethod(
  1936. "_selectCategory_",
  1937. smalltalk.method({
  1938. selector: "selectCategory:",
  1939. fn: function (aCategory) {
  1940. var self = this;
  1941. var $1, $2;
  1942. $1 = smalltalk.send(self, "_cancelChanges", []);
  1943. if (smalltalk.assert($1)) {
  1944. self['@selectedPackage'] = aCategory;
  1945. self['@selectedPackage'];
  1946. self['@selectedMethod'] = nil;
  1947. self['@selectedProtocol'] = self['@selectedMethod'];
  1948. self['@selectedClass'] = self['@selectedProtocol'];
  1949. self['@selectedClass'];
  1950. smalltalk.send(self, "_resetClassesList", []);
  1951. smalltalk.send(self, "_updateCategoriesList", []);
  1952. smalltalk.send(self, "_updateClassesList", []);
  1953. smalltalk.send(self, "_updateProtocolsList", []);
  1954. smalltalk.send(self, "_updateMethodsList", []);
  1955. $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
  1956. }
  1957. return self;
  1958. }
  1959. }),
  1960. smalltalk.Browser);
  1961. smalltalk.addMethod(
  1962. "_selectClass_",
  1963. smalltalk.method({
  1964. selector: "selectClass:",
  1965. fn: function (aClass) {
  1966. var self = this;
  1967. var $1, $2;
  1968. $1 = smalltalk.send(self, "_cancelChanges", []);
  1969. if (smalltalk.assert($1)) {
  1970. self['@selectedClass'] = aClass;
  1971. self['@selectedClass'];
  1972. self['@selectedMethod'] = nil;
  1973. self['@selectedProtocol'] = self['@selectedMethod'];
  1974. self['@selectedProtocol'];
  1975. smalltalk.send(self, "_updateClassesList", []);
  1976. smalltalk.send(self, "_updateProtocolsList", []);
  1977. smalltalk.send(self, "_updateMethodsList", []);
  1978. $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
  1979. }
  1980. return self;
  1981. }
  1982. }),
  1983. smalltalk.Browser);
  1984. smalltalk.addMethod(
  1985. "_selectMethod_",
  1986. smalltalk.method({
  1987. selector: "selectMethod:",
  1988. fn: function (aMethod) {
  1989. var self = this;
  1990. var $1, $2;
  1991. $1 = smalltalk.send(self, "_cancelChanges", []);
  1992. if (smalltalk.assert($1)) {
  1993. self['@selectedMethod'] = aMethod;
  1994. self['@selectedMethod'];
  1995. smalltalk.send(self, "_updateProtocolsList", []);
  1996. smalltalk.send(self, "_updateMethodsList", []);
  1997. $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
  1998. }
  1999. return self;
  2000. }
  2001. }),
  2002. smalltalk.Browser);
  2003. smalltalk.addMethod(
  2004. "_selectProtocol_",
  2005. smalltalk.method({
  2006. selector: "selectProtocol:",
  2007. fn: function (aString) {
  2008. var self = this;
  2009. var $1, $2;
  2010. $1 = smalltalk.send(self, "_cancelChanges", []);
  2011. if (smalltalk.assert($1)) {
  2012. self['@selectedProtocol'] = aString;
  2013. self['@selectedProtocol'];
  2014. self['@selectedMethod'] = nil;
  2015. self['@selectedMethod'];
  2016. smalltalk.send(self, "_updateProtocolsList", []);
  2017. smalltalk.send(self, "_updateMethodsList", []);
  2018. $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
  2019. }
  2020. return self;
  2021. }
  2022. }),
  2023. smalltalk.Browser);
  2024. smalltalk.addMethod(
  2025. "_selectTab_",
  2026. smalltalk.method({
  2027. selector: "selectTab:",
  2028. fn: function (aString) {
  2029. var self = this;
  2030. var $1;
  2031. $1 = smalltalk.send(self, "_cancelChanges", []);
  2032. if (smalltalk.assert($1)) {
  2033. self['@selectedTab'] = aString;
  2034. self['@selectedTab'];
  2035. smalltalk.send(self, "_selectProtocol_", [nil]);
  2036. smalltalk.send(self, "_updateTabsList", []);
  2037. }
  2038. return self;
  2039. }
  2040. }),
  2041. smalltalk.Browser);
  2042. smalltalk.addMethod(
  2043. "_selectedClass",
  2044. smalltalk.method({
  2045. selector: "selectedClass",
  2046. fn: function () {
  2047. var self = this;
  2048. return self['@selectedClass'];
  2049. }
  2050. }),
  2051. smalltalk.Browser);
  2052. smalltalk.addMethod(
  2053. "_selectedPackage",
  2054. smalltalk.method({
  2055. selector: "selectedPackage",
  2056. fn: function () {
  2057. var self = this;
  2058. return self['@selectedPackage'];
  2059. }
  2060. }),
  2061. smalltalk.Browser);
  2062. smalltalk.addMethod(
  2063. "_setMethodProtocol_",
  2064. smalltalk.method({
  2065. selector: "setMethodProtocol:",
  2066. fn: function (aString) {
  2067. var self = this;
  2068. var $1, $2, $3;
  2069. $1 = smalltalk.send(self, "_cancelChanges", []);
  2070. if (smalltalk.assert($1)) {
  2071. $2 = smalltalk.send(smalltalk.send(self, "_protocols", []), "_includes_", [aString]);
  2072. if (smalltalk.assert($2)) {
  2073. smalltalk.send(self['@selectedMethod'], "_category_", [aString]);
  2074. self['@selectedProtocol'] = aString;
  2075. self['@selectedProtocol'];
  2076. self['@selectedMethod'] = self['@selectedMethod'];
  2077. self['@selectedMethod'];
  2078. smalltalk.send(self, "_updateProtocolsList", []);
  2079. smalltalk.send(self, "_updateMethodsList", []);
  2080. $3 = smalltalk.send(self, "_updateSourceAndButtons", []);
  2081. } else {
  2082. smalltalk.send(self, "_addNewProtocol", []);
  2083. }
  2084. }
  2085. return self;
  2086. }
  2087. }),
  2088. smalltalk.Browser);
  2089. smalltalk.addMethod(
  2090. "_showClassButtons",
  2091. smalltalk.method({
  2092. selector: "showClassButtons",
  2093. fn: function () {
  2094. var self = this;
  2095. smalltalk.send(smalltalk.send(self['@classButtons'], "_asJQuery", []), "_show", []);
  2096. return self;
  2097. }
  2098. }),
  2099. smalltalk.Browser);
  2100. smalltalk.addMethod(
  2101. "_showMethodButtons",
  2102. smalltalk.method({
  2103. selector: "showMethodButtons",
  2104. fn: function () {
  2105. var self = this;
  2106. smalltalk.send(smalltalk.send(self['@methodButtons'], "_asJQuery", []), "_show", []);
  2107. return self;
  2108. }
  2109. }),
  2110. smalltalk.Browser);
  2111. smalltalk.addMethod(
  2112. "_source",
  2113. smalltalk.method({
  2114. selector: "source",
  2115. fn: function () {
  2116. var self = this;
  2117. var $1, $3, $2, $4;
  2118. $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")]);
  2119. if (!smalltalk.assert($1)) {
  2120. $3 = smalltalk.send(smalltalk.send(self['@selectedProtocol'], "_notNil", []), "_or_", [function () {return smalltalk.send(self['@selectedMethod'], "_notNil", []);}]);
  2121. if (smalltalk.assert($3)) {
  2122. $2 = smalltalk.send(self, "_methodSource", []);
  2123. } else {
  2124. $2 = smalltalk.send(self, "_declarationSource", []);
  2125. }
  2126. return $2;
  2127. }
  2128. if (($receiver = self['@selectedClass']) == nil ||
  2129. $receiver == undefined) {
  2130. $4 = "";
  2131. } else {
  2132. $4 = smalltalk.send(self, "_classCommentSource", []);
  2133. }
  2134. return $4;
  2135. }
  2136. }),
  2137. smalltalk.Browser);
  2138. smalltalk.addMethod(
  2139. "_updateCategoriesList",
  2140. smalltalk.method({
  2141. selector: "updateCategoriesList",
  2142. fn: function () {
  2143. var self = this;
  2144. var $1, $2, $3;
  2145. smalltalk.send(self['@packagesList'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(self, "_packages", []), "_do_", [function (each) {var li;var label;$1 = smalltalk.send(each, "_isEmpty", []);if (smalltalk.assert($1)) {label = "Unclassified";} else {label = each;}li = smalltalk.send(html, "_li", []);$2 = smalltalk.send(self['@selectedPackage'], "__eq", [each]);if (smalltalk.assert($2)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [label]);$3 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectCategory_", [each]);}]);return $3;}]);}]);
  2146. return self;
  2147. }
  2148. }),
  2149. smalltalk.Browser);
  2150. smalltalk.addMethod(
  2151. "_updateClassesList",
  2152. smalltalk.method({
  2153. selector: "updateClassesList",
  2154. fn: function () {
  2155. var self = this;
  2156. smalltalk.send(smalltalk.send(smalltalk.TabManager || TabManager, "_current", []), "_update", []);
  2157. smalltalk.send(self['@classesList'], "_updateNodes", []);
  2158. return self;
  2159. }
  2160. }),
  2161. smalltalk.Browser);
  2162. smalltalk.addMethod(
  2163. "_updateMethodsList",
  2164. smalltalk.method({
  2165. selector: "updateMethodsList",
  2166. fn: function () {
  2167. var self = this;
  2168. var $1, $2;
  2169. smalltalk.send(self['@methodsList'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(self, "_methods", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);$1 = smalltalk.send(self['@selectedMethod'], "__eq", [each]);if (smalltalk.assert($1)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [smalltalk.send(each, "_selector", [])]);$2 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectMethod_", [each]);}]);return $2;}]);}]);
  2170. return self;
  2171. }
  2172. }),
  2173. smalltalk.Browser);
  2174. smalltalk.addMethod(
  2175. "_updateProtocolsList",
  2176. smalltalk.method({
  2177. selector: "updateProtocolsList",
  2178. fn: function () {
  2179. var self = this;
  2180. var $1, $2;
  2181. smalltalk.send(self['@protocolsList'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);$1 = smalltalk.send(self['@selectedProtocol'], "__eq", [each]);if (smalltalk.assert($1)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [each]);$2 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectProtocol_", [each]);}]);return $2;}]);}]);
  2182. return self;
  2183. }
  2184. }),
  2185. smalltalk.Browser);
  2186. smalltalk.addMethod(
  2187. "_updateSourceAndButtons",
  2188. smalltalk.method({
  2189. selector: "updateSourceAndButtons",
  2190. fn: function () {
  2191. var self = this;
  2192. var $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $14, $15, $16, $17, $18, $19, $13, $20, $22, $23, $24, $25, $21, $26, $27;
  2193. var currentProtocol;
  2194. smalltalk.send(self, "_disableSaveButton", []);
  2195. smalltalk.send(self['@classButtons'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_button", []);smalltalk.send($1, "_title_", ["Create a new class"]);smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_addNewClass", []);}]);$2 = smalltalk.send($1, "_with_", ["New class"]);$2;$3 = smalltalk.send(html, "_button", []);smalltalk.send($3, "_with_", ["Rename class"]);$4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(self, "_renameClass", []);}]);$4;$5 = smalltalk.send(html, "_button", []);smalltalk.send($5, "_with_", ["Copy class"]);$6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(self, "_copyClass", []);}]);$6;$7 = smalltalk.send(html, "_button", []);smalltalk.send($7, "_with_", ["Remove class"]);$8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self, "_removeClass", []);}]);$8;$9 = smalltalk.send(html, "_button", []);smalltalk.send($9, "_with_", ["References"]);$10 = smalltalk.send($9, "_onClick_", [function () {return smalltalk.send(self, "_searchClassReferences", []);}]);return $10;}]);
  2196. smalltalk.send(self['@methodButtons'], "_contents_", [function (html) {var protocolSelect;var referencesSelect;$11 = smalltalk.send(html, "_button", []);smalltalk.send($11, "_with_", ["Remove method"]);$12 = smalltalk.send($11, "_onClick_", [function () {return smalltalk.send(self, "_removeMethod", []);}]);$12;protocolSelect = smalltalk.send(html, "_select", []);smalltalk.send(protocolSelect, "_onChange_", [function () {return smalltalk.send(self, "_setMethodProtocol_", [smalltalk.send(smalltalk.send(protocolSelect, "_asJQuery", []), "_val", [])]);}]);$13 = smalltalk.send(protocolSelect, "_with_", [function () {$14 = smalltalk.send(html, "_option", []);smalltalk.send($14, "_with_", ["Method protocol"]);$15 = smalltalk.send($14, "_at_put_", ["disabled", "disabled"]);$15;$16 = smalltalk.send(html, "_option", []);smalltalk.send($16, "_class_", ["important"]);$17 = smalltalk.send($16, "_with_", ["New..."]);$17;currentProtocol = self['@selectedProtocol'];currentProtocol;$18 = smalltalk.send(smalltalk.send(currentProtocol, "_isNil", []), "_and_", [function () {return smalltalk.send(self['@selectedMethod'], "_notNil", []);}]);if (smalltalk.assert($18)) {currentProtocol = smalltalk.send(self['@selectedMethod'], "_category", []);currentProtocol;}return smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [function (each) {option = smalltalk.send(smalltalk.send(html, "_option", []), "_with_", [each]);option;$19 = smalltalk.send(currentProtocol, "__eq", [each]);if (smalltalk.assert($19)) {return smalltalk.send(option, "_at_put_", ["selected", "selected"]);}}]);}]);$13;$20 = smalltalk.send(self['@selectedMethod'], "_isNil", []);if (!smalltalk.assert($20)) {referencesSelect = smalltalk.send(html, "_select", []);smalltalk.send(referencesSelect, "_onChange_", [function () {return smalltalk.send(self, "_searchReferencesOf_", [smalltalk.send(smalltalk.send(referencesSelect, "_asJQuery", []), "_val", [])]);}]);$21 = smalltalk.send(referencesSelect, "_with_", [function () {var option;$22 = smalltalk.send(html, "_option", []);smalltalk.send($22, "_with_", ["References"]);$23 = smalltalk.send($22, "_at_put_", ["disabled", "disabled"]);$23;$24 = smalltalk.send(html, "_option", []);smalltalk.send($24, "_class_", ["important"]);$25 = smalltalk.send($24, "_with_", [smalltalk.send(self['@selectedMethod'], "_selector", [])]);$25;return smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedMethod'], "_messageSends", []), "_sorted", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(html, "_option", []), "_with_", [each]);}]);}]);return $21;}}]);
  2197. $26 = smalltalk.send(self['@selectedMethod'], "_isNil", []);
  2198. if (smalltalk.assert($26)) {
  2199. smalltalk.send(self, "_hideMethodButtons", []);
  2200. $27 = smalltalk.send(smalltalk.send(self['@selectedClass'], "_isNil", []), "_or_", [function () {return smalltalk.send(self['@selectedProtocol'], "_notNil", []);}]);
  2201. if (smalltalk.assert($27)) {
  2202. smalltalk.send(self, "_hideClassButtons", []);
  2203. } else {
  2204. smalltalk.send(self, "_showClassButtons", []);
  2205. }
  2206. } else {
  2207. smalltalk.send(self, "_hideClassButtons", []);
  2208. smalltalk.send(self, "_showMethodButtons", []);
  2209. }
  2210. smalltalk.send(self['@sourceArea'], "_val_", [smalltalk.send(self, "_source", [])]);
  2211. return self;
  2212. }
  2213. }),
  2214. smalltalk.Browser);
  2215. smalltalk.addMethod(
  2216. "_updateStatus",
  2217. smalltalk.method({
  2218. selector: "updateStatus",
  2219. fn: function () {
  2220. var self = this;
  2221. var $1;
  2222. $1 = smalltalk.send(smalltalk.send(self['@sourceArea'], "_val", []), "__eq", [smalltalk.send(self, "_source", [])]);
  2223. if (smalltalk.assert($1)) {
  2224. if (($receiver = self['@saveButton']) == nil ||
  2225. $receiver == undefined) {
  2226. self['@saveButton'];
  2227. } else {
  2228. smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);
  2229. }
  2230. self['@unsavedChanges'] = false;
  2231. self['@unsavedChanges'];
  2232. } else {
  2233. if (($receiver = self['@saveButton']) == nil ||
  2234. $receiver == undefined) {
  2235. self['@saveButton'];
  2236. } else {
  2237. smalltalk.send(self['@saveButton'], "_removeAt_", ["disabled"]);
  2238. }
  2239. self['@unsavedChanges'] = true;
  2240. self['@unsavedChanges'];
  2241. }
  2242. return self;
  2243. }
  2244. }),
  2245. smalltalk.Browser);
  2246. smalltalk.addMethod(
  2247. "_updateTabsList",
  2248. smalltalk.method({
  2249. selector: "updateTabsList",
  2250. fn: function () {
  2251. var self = this;
  2252. var $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12;
  2253. smalltalk.send(self['@tabsList'], "_contents_", [function (html) {var li;li = smalltalk.send(html, "_li", []);$1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);if (smalltalk.assert($1)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [function () {smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);$2 = smalltalk.send(html, "_span", []);smalltalk.send($2, "_class_", ["mtab"]);$3 = smalltalk.send($2, "_with_", ["Instance"]);$3;return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);}]);$4 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectTab_", [smalltalk.symbolFor("instance")]);}]);$4;li = smalltalk.send(html, "_li", []);$5 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("class")]);if (smalltalk.assert($5)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [function () {smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);$6 = smalltalk.send(html, "_span", []);smalltalk.send($6, "_class_", ["mtab"]);$7 = smalltalk.send($6, "_with_", ["Class"]);$7;return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);}]);$8 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectTab_", [smalltalk.symbolFor("class")]);}]);$8;li = smalltalk.send(html, "_li", []);$9 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")]);if (smalltalk.assert($9)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [function () {smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);$10 = smalltalk.send(html, "_span", []);smalltalk.send($10, "_class_", ["mtab"]);$11 = smalltalk.send($10, "_with_", ["Comment"]);$11;return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);}]);$12 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectTab_", [smalltalk.symbolFor("comment")]);}]);return $12;}]);
  2254. return self;
  2255. }
  2256. }),
  2257. smalltalk.Browser);
  2258. smalltalk.addMethod(
  2259. "_commitPathJs",
  2260. smalltalk.method({
  2261. selector: "commitPathJs",
  2262. fn: function () {
  2263. var self = this;
  2264. return "js";
  2265. }
  2266. }),
  2267. smalltalk.Browser.klass);
  2268. smalltalk.addMethod(
  2269. "_commitPathSt",
  2270. smalltalk.method({
  2271. selector: "commitPathSt",
  2272. fn: function () {
  2273. var self = this;
  2274. return "st";
  2275. }
  2276. }),
  2277. smalltalk.Browser.klass);
  2278. smalltalk.addMethod(
  2279. "_open",
  2280. smalltalk.method({
  2281. selector: "open",
  2282. fn: function () {
  2283. var self = this;
  2284. smalltalk.send(smalltalk.send(self, "_new", []), "_open", []);
  2285. return self;
  2286. }
  2287. }),
  2288. smalltalk.Browser.klass);
  2289. smalltalk.addMethod(
  2290. "_openOn_",
  2291. smalltalk.method({
  2292. selector: "openOn:",
  2293. fn: function (aClass) {
  2294. var self = this;
  2295. var $2, $3, $1;
  2296. $2 = smalltalk.send(self, "_new", []);
  2297. smalltalk.send($2, "_open", []);
  2298. smalltalk.send($2, "_selectCategory_", [smalltalk.send(aClass, "_category", [])]);
  2299. $3 = smalltalk.send($2, "_selectClass_", [aClass]);
  2300. $1 = $3;
  2301. return $1;
  2302. }
  2303. }),
  2304. smalltalk.Browser.klass);
  2305. smalltalk.addClass('Debugger', smalltalk.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  2306. smalltalk.addMethod(
  2307. "_arguments",
  2308. smalltalk.method({
  2309. selector: "arguments",
  2310. fn: function () {
  2311. var self = this;
  2312. var $2, $1;
  2313. $2 = smalltalk.send(self, "_method", []);
  2314. if (($receiver = $2) == nil || $receiver == undefined) {
  2315. $1 = smalltalk.send(smalltalk.send(self['@selectedContext'], "_temps", []), "_collect_", [function (each) {return nil;}]);
  2316. } else {
  2317. $1 = smalltalk.send(smalltalk.send(self, "_method", []), "_arguments", []);
  2318. }
  2319. return $1;
  2320. }
  2321. }),
  2322. smalltalk.Debugger);
  2323. smalltalk.addMethod(
  2324. "_canBeClosed",
  2325. smalltalk.method({
  2326. selector: "canBeClosed",
  2327. fn: function () {
  2328. var self = this;
  2329. return true;
  2330. }
  2331. }),
  2332. smalltalk.Debugger);
  2333. smalltalk.addMethod(
  2334. "_error",
  2335. smalltalk.method({
  2336. selector: "error",
  2337. fn: function () {
  2338. var self = this;
  2339. return self['@error'];
  2340. }
  2341. }),
  2342. smalltalk.Debugger);
  2343. smalltalk.addMethod(
  2344. "_error_",
  2345. smalltalk.method({
  2346. selector: "error:",
  2347. fn: function (anError) {
  2348. var self = this;
  2349. self['@error'] = anError;
  2350. return self;
  2351. }
  2352. }),
  2353. smalltalk.Debugger);
  2354. smalltalk.addMethod(
  2355. "_initialize",
  2356. smalltalk.method({
  2357. selector: "initialize",
  2358. fn: function () {
  2359. var self = this;
  2360. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  2361. smalltalk.send(self['@unsavedChanges'], "__eq", [false]);
  2362. return self;
  2363. }
  2364. }),
  2365. smalltalk.Debugger);
  2366. smalltalk.addMethod(
  2367. "_inspectSelectedVariable",
  2368. smalltalk.method({
  2369. selector: "inspectSelectedVariable",
  2370. fn: function () {
  2371. var self = this;
  2372. smalltalk.send(self['@selectedVariable'], "_inspect", []);
  2373. return self;
  2374. }
  2375. }),
  2376. smalltalk.Debugger);
  2377. smalltalk.addMethod(
  2378. "_label",
  2379. smalltalk.method({
  2380. selector: "label",
  2381. fn: function () {
  2382. var self = this;
  2383. return "[Debugger]";
  2384. }
  2385. }),
  2386. smalltalk.Debugger);
  2387. smalltalk.addMethod(
  2388. "_method",
  2389. smalltalk.method({
  2390. selector: "method",
  2391. fn: function () {
  2392. var self = this;
  2393. var $1;
  2394. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_methodAt_", [smalltalk.send(self['@selectedContext'], "_selector", [])]);
  2395. return $1;
  2396. }
  2397. }),
  2398. smalltalk.Debugger);
  2399. smalltalk.addMethod(
  2400. "_proceed",
  2401. smalltalk.method({
  2402. selector: "proceed",
  2403. fn: function () {
  2404. var self = this;
  2405. smalltalk.send(self, "_close", []);
  2406. smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_perform_withArguments_", [smalltalk.send(self['@selectedContext'], "_selector", []), smalltalk.send(self['@selectedContext'], "_temps", [])]);
  2407. return self;
  2408. }
  2409. }),
  2410. smalltalk.Debugger);
  2411. smalltalk.addMethod(
  2412. "_receiver",
  2413. smalltalk.method({
  2414. selector: "receiver",
  2415. fn: function () {
  2416. var self = this;
  2417. var $1;
  2418. $1 = smalltalk.send(self['@selectedContext'], "_receiver", []);
  2419. return $1;
  2420. }
  2421. }),
  2422. smalltalk.Debugger);
  2423. smalltalk.addMethod(
  2424. "_renderBottomPanelOn_",
  2425. smalltalk.method({
  2426. selector: "renderBottomPanelOn:",
  2427. fn: function (html) {
  2428. var self = this;
  2429. var $1, $2;
  2430. $1 = smalltalk.send(html, "_div", []);
  2431. smalltalk.send($1, "_class_", ["amber_sourceCode debugger"]);
  2432. $2 = smalltalk.send($1, "_with_", [function () {self['@sourceArea'] = smalltalk.send(smalltalk.SourceArea || SourceArea, "_new", []);self['@sourceArea'];return smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);}]);
  2433. self['@ul2'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column debugger variables"]);
  2434. self['@inspector'] = smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["amber_column debugger inspector"]);
  2435. smalltalk.send(self['@sourceArea'], "_onKeyUp_", [function () {return smalltalk.send(self, "_updateStatus", []);}]);
  2436. return self;
  2437. }
  2438. }),
  2439. smalltalk.Debugger);
  2440. smalltalk.addMethod(
  2441. "_renderBoxOn_",
  2442. smalltalk.method({
  2443. selector: "renderBoxOn:",
  2444. fn: function (html) {
  2445. var self = this;
  2446. var $1;
  2447. smalltalk.send(self, "_renderTopPanelOn_", [html]);
  2448. $1 = smalltalk.send(self, "_renderBottomPanelOn_", [html]);
  2449. return self;
  2450. }
  2451. }),
  2452. smalltalk.Debugger);
  2453. smalltalk.addMethod(
  2454. "_renderButtonsOn_",
  2455. smalltalk.method({
  2456. selector: "renderButtonsOn:",
  2457. fn: function (html) {
  2458. var self = this;
  2459. var $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15;
  2460. $1 = smalltalk.send(html, "_button", []);
  2461. smalltalk.send($1, "_with_", ["Save"]);
  2462. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_save", []);}]);
  2463. self['@saveButton'] = $2;
  2464. $3 = smalltalk.send(html, "_button", []);
  2465. smalltalk.send($3, "_with_", ["DoIt"]);
  2466. $4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_doIt", []);}]);
  2467. $5 = smalltalk.send(html, "_button", []);
  2468. smalltalk.send($5, "_with_", ["PrintIt"]);
  2469. $6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_printIt", []);}]);
  2470. $7 = smalltalk.send(html, "_button", []);
  2471. smalltalk.send($7, "_with_", ["InspectIt"]);
  2472. $8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_inspectIt", []);}]);
  2473. $9 = smalltalk.send(html, "_button", []);
  2474. smalltalk.send($9, "_with_", ["Proceed"]);
  2475. $10 = smalltalk.send($9, "_onClick_", [function () {return smalltalk.send(self, "_proceed", []);}]);
  2476. $11 = smalltalk.send(html, "_button", []);
  2477. smalltalk.send($11, "_with_", ["Abandon"]);
  2478. $12 = smalltalk.send($11, "_onClick_", [function () {return smalltalk.send(self, "_close", []);}]);
  2479. $13 = smalltalk.send(html, "_button", []);
  2480. smalltalk.send($13, "_class_", ["amber_button debugger inspect"]);
  2481. smalltalk.send($13, "_with_", ["Inspect"]);
  2482. $14 = smalltalk.send($13, "_onClick_", [function () {return smalltalk.send(self, "_inspectSelectedVariable", []);}]);
  2483. self['@inspectButton'] = $14;
  2484. smalltalk.send(self, "_updateSourceArea", []);
  2485. smalltalk.send(self, "_updateStatus", []);
  2486. smalltalk.send(self, "_updateVariablesList", []);
  2487. $15 = smalltalk.send(self, "_updateInspector", []);
  2488. return self;
  2489. }
  2490. }),
  2491. smalltalk.Debugger);
  2492. smalltalk.addMethod(
  2493. "_renderContext_on_",
  2494. smalltalk.method({
  2495. selector: "renderContext:on:",
  2496. fn: function (aContext, html) {
  2497. var self = this;
  2498. var $1, $2, $3;
  2499. var li;
  2500. li = smalltalk.send(html, "_li", []);
  2501. $1 = smalltalk.send(self['@selectedContext'], "__eq", [aContext]);
  2502. if (smalltalk.assert($1)) {
  2503. smalltalk.send(li, "_class_", ["selected"]);
  2504. }
  2505. smalltalk.send(li, "_with_", [smalltalk.send(aContext, "_asString", [])]);
  2506. $2 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectContext_", [aContext]);}]);
  2507. $3 = smalltalk.send(aContext, "_home", []);
  2508. if (($receiver = $3) == nil || $receiver == undefined) {
  2509. } else {
  2510. smalltalk.send(self, "_renderContext_on_", [smalltalk.send(aContext, "_home", []), html]);
  2511. }
  2512. return self;
  2513. }
  2514. }),
  2515. smalltalk.Debugger);
  2516. smalltalk.addMethod(
  2517. "_renderTopPanelOn_",
  2518. smalltalk.method({
  2519. selector: "renderTopPanelOn:",
  2520. fn: function (html) {
  2521. var self = this;
  2522. var $1, $3, $4, $5, $6, $2;
  2523. self['@selectedContext'] = smalltalk.send(smalltalk.send(self, "_error", []), "_context", []);
  2524. $1 = smalltalk.send(html, "_div", []);
  2525. smalltalk.send($1, "_class_", ["top"]);
  2526. $2 = smalltalk.send($1, "_with_", [function () {$3 = smalltalk.send(html, "_div", []);smalltalk.send($3, "_class_", ["label"]);$4 = smalltalk.send($3, "_with_", [smalltalk.send(smalltalk.send(self, "_error", []), "_messageText", [])]);$4;$5 = smalltalk.send(html, "_ul", []);smalltalk.send($5, "_class_", ["amber_column debugger contexts"]);$6 = smalltalk.send($5, "_with_", [function () {return smalltalk.send(self, "_renderContext_on_", [smalltalk.send(smalltalk.send(self, "_error", []), "_context", []), html]);}]);self['@ul'] = $6;return self['@ul'];}]);
  2527. return self;
  2528. }
  2529. }),
  2530. smalltalk.Debugger);
  2531. smalltalk.addMethod(
  2532. "_save",
  2533. smalltalk.method({
  2534. selector: "save",
  2535. fn: function () {
  2536. var self = this;
  2537. var protocol;
  2538. protocol = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_methodDictionary", []), "_at_", [smalltalk.send(self['@selectedContext'], "_selector", [])]), "_category", []);
  2539. smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_compile_category_", [smalltalk.send(self['@sourceArea'], "_val", []), protocol]);
  2540. smalltalk.send(self, "_updateStatus", []);
  2541. return self;
  2542. }
  2543. }),
  2544. smalltalk.Debugger);
  2545. smalltalk.addMethod(
  2546. "_selectContext_",
  2547. smalltalk.method({
  2548. selector: "selectContext:",
  2549. fn: function (aContext) {
  2550. var self = this;
  2551. var $1;
  2552. self['@selectedContext'] = aContext;
  2553. self['@selectedVariable'] = nil;
  2554. self['@selectedVariableName'] = nil;
  2555. smalltalk.send(self, "_updateContextsList", []);
  2556. smalltalk.send(self, "_updateSourceArea", []);
  2557. smalltalk.send(self, "_updateInspector", []);
  2558. smalltalk.send(self, "_updateVariablesList", []);
  2559. $1 = smalltalk.send(self, "_updateStatus", []);
  2560. return self;
  2561. }
  2562. }),
  2563. smalltalk.Debugger);
  2564. smalltalk.addMethod(
  2565. "_selectVariable_named_",
  2566. smalltalk.method({
  2567. selector: "selectVariable:named:",
  2568. fn: function (anObject, aString) {
  2569. var self = this;
  2570. self['@selectedVariable'] = anObject;
  2571. self['@selectedVariableName'] = aString;
  2572. smalltalk.send(self['@inspector'], "_contents_", [function (html) {return smalltalk.send(html, "_with_", [smalltalk.send(anObject, "_printString", [])]);}]);
  2573. smalltalk.send(self, "_updateVariablesList", []);
  2574. return self;
  2575. }
  2576. }),
  2577. smalltalk.Debugger);
  2578. smalltalk.addMethod(
  2579. "_source",
  2580. smalltalk.method({
  2581. selector: "source",
  2582. fn: function () {
  2583. var self = this;
  2584. var $2, $1;
  2585. $2 = smalltalk.send(self, "_method", []);
  2586. if (($receiver = $2) == nil || $receiver == undefined) {
  2587. $1 = "Method doesn't exist!";
  2588. } else {
  2589. $1 = smalltalk.send(smalltalk.send(self, "_method", []), "_source", []);
  2590. }
  2591. return $1;
  2592. }
  2593. }),
  2594. smalltalk.Debugger);
  2595. smalltalk.addMethod(
  2596. "_updateContextsList",
  2597. smalltalk.method({
  2598. selector: "updateContextsList",
  2599. fn: function () {
  2600. var self = this;
  2601. smalltalk.send(self['@ul'], "_contents_", [function (html) {return smalltalk.send(self, "_renderContext_on_", [smalltalk.send(smalltalk.send(self, "_error", []), "_context", []), html]);}]);
  2602. return self;
  2603. }
  2604. }),
  2605. smalltalk.Debugger);
  2606. smalltalk.addMethod(
  2607. "_updateInspector",
  2608. smalltalk.method({
  2609. selector: "updateInspector",
  2610. fn: function () {
  2611. var self = this;
  2612. smalltalk.send(self['@inspector'], "_contents_", [function (html) {}]);
  2613. return self;
  2614. }
  2615. }),
  2616. smalltalk.Debugger);
  2617. smalltalk.addMethod(
  2618. "_updateSourceArea",
  2619. smalltalk.method({
  2620. selector: "updateSourceArea",
  2621. fn: function () {
  2622. var self = this;
  2623. smalltalk.send(self['@sourceArea'], "_val_", [smalltalk.send(self, "_source", [])]);
  2624. return self;
  2625. }
  2626. }),
  2627. smalltalk.Debugger);
  2628. smalltalk.addMethod(
  2629. "_updateStatus",
  2630. smalltalk.method({
  2631. selector: "updateStatus",
  2632. fn: function () {
  2633. var self = this;
  2634. var $1;
  2635. $1 = smalltalk.send(smalltalk.send(self['@sourceArea'], "_val", []), "__eq", [smalltalk.send(self, "_source", [])]);
  2636. if (smalltalk.assert($1)) {
  2637. if (($receiver = self['@saveButton']) == nil ||
  2638. $receiver == undefined) {
  2639. self['@saveButton'];
  2640. } else {
  2641. smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);
  2642. }
  2643. self['@unsavedChanges'] = false;
  2644. self['@unsavedChanges'];
  2645. } else {
  2646. if (($receiver = self['@saveButton']) == nil ||
  2647. $receiver == undefined) {
  2648. self['@saveButton'];
  2649. } else {
  2650. smalltalk.send(self['@saveButton'], "_removeAt_", ["disabled"]);
  2651. }
  2652. self['@unsavedChanges'] = true;
  2653. self['@unsavedChanges'];
  2654. }
  2655. return self;
  2656. }
  2657. }),
  2658. smalltalk.Debugger);
  2659. smalltalk.addMethod(
  2660. "_updateVariablesList",
  2661. smalltalk.method({
  2662. selector: "updateVariablesList",
  2663. fn: function () {
  2664. var self = this;
  2665. var $1, $2, $3, $4, $5, $6, $7, $8, $9;
  2666. smalltalk.send(self['@ul2'], "_contents_", [function (html) {var li;$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_with_", ["self"]);$2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_selectVariable_named_", [smalltalk.send(self, "_receiver", []), "self"]);}]);li = $2;$3 = smalltalk.send(self['@selectedVariableName'], "__eq", ["self"]);if (smalltalk.assert($3)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(smalltalk.send(self, "_arguments", []), "_withIndexDo_", [function (each, index) {var param;param = smalltalk.send(smalltalk.send(self['@selectedContext'], "_temps", []), "_at_", [index]);$4 = smalltalk.send(html, "_li", []);smalltalk.send($4, "_with_", [each]);$5 = smalltalk.send($4, "_onClick_", [function () {return smalltalk.send(self, "_selectVariable_named_", [param, each]);}]);li = $5;li;$6 = smalltalk.send(self['@selectedVariableName'], "__eq", [each]);if (smalltalk.assert($6)) {return smalltalk.send(li, "_class_", ["selected"]);}}]);return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_class", []), "_allInstanceVariableNames", []), "_do_", [function (each) {var ivar;ivar = smalltalk.send(smalltalk.send(self, "_receiver", []), "_instVarAt_", [each]);$7 = smalltalk.send(html, "_li", []);smalltalk.send($7, "_with_", [each]);$8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self, "_selectVariable_named_", [ivar, each]);}]);li = $8;li;$9 = smalltalk.send(self['@selectedVariableName'], "__eq", [each]);if (smalltalk.assert($9)) {return smalltalk.send(li, "_class_", ["selected"]);}}]);}]);
  2667. if (($receiver = self['@selectedVariable']) == nil ||
  2668. $receiver == undefined) {
  2669. smalltalk.send(self['@inspectButton'], "_at_put_", ["disabled", true]);
  2670. } else {
  2671. smalltalk.send(self['@inspectButton'], "_removeAt_", ["disabled"]);
  2672. }
  2673. return self;
  2674. }
  2675. }),
  2676. smalltalk.Debugger);
  2677. smalltalk.addClass('IDETranscript', smalltalk.TabWidget, ['textarea'], 'IDE');
  2678. smalltalk.addMethod(
  2679. "_clear",
  2680. smalltalk.method({
  2681. selector: "clear",
  2682. fn: function () {
  2683. var self = this;
  2684. smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [""]);
  2685. return self;
  2686. }
  2687. }),
  2688. smalltalk.IDETranscript);
  2689. smalltalk.addMethod(
  2690. "_cr",
  2691. smalltalk.method({
  2692. selector: "cr",
  2693. fn: function () {
  2694. var self = this;
  2695. 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", [])])]);
  2696. return self;
  2697. }
  2698. }),
  2699. smalltalk.IDETranscript);
  2700. smalltalk.addMethod(
  2701. "_label",
  2702. smalltalk.method({
  2703. selector: "label",
  2704. fn: function () {
  2705. var self = this;
  2706. return "Transcript";
  2707. }
  2708. }),
  2709. smalltalk.IDETranscript);
  2710. smalltalk.addMethod(
  2711. "_open",
  2712. smalltalk.method({
  2713. selector: "open",
  2714. fn: function () {
  2715. var self = this;
  2716. var $1, $2;
  2717. $1 = smalltalk.send(smalltalk.TabManager || TabManager, "_current", []);
  2718. smalltalk.send($1, "_open", []);
  2719. $2 = smalltalk.send($1, "_selectTab_", [self]);
  2720. return self;
  2721. }
  2722. }),
  2723. smalltalk.IDETranscript);
  2724. smalltalk.addMethod(
  2725. "_renderBoxOn_",
  2726. smalltalk.method({
  2727. selector: "renderBoxOn:",
  2728. fn: function (html) {
  2729. var self = this;
  2730. var $1;
  2731. self['@textarea'] = smalltalk.send(html, "_textarea", []);
  2732. smalltalk.send(self['@textarea'], "_class_", ["amber_transcript"]);
  2733. $1 = smalltalk.send(self['@textarea'], "_at_put_", ["spellcheck", "false"]);
  2734. return self;
  2735. }
  2736. }),
  2737. smalltalk.IDETranscript);
  2738. smalltalk.addMethod(
  2739. "_renderButtonsOn_",
  2740. smalltalk.method({
  2741. selector: "renderButtonsOn:",
  2742. fn: function (html) {
  2743. var self = this;
  2744. var $1, $2;
  2745. $1 = smalltalk.send(html, "_button", []);
  2746. smalltalk.send($1, "_with_", ["Clear transcript"]);
  2747. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_clear", []);}]);
  2748. return self;
  2749. }
  2750. }),
  2751. smalltalk.IDETranscript);
  2752. smalltalk.addMethod(
  2753. "_show_",
  2754. smalltalk.method({
  2755. selector: "show:",
  2756. fn: function (anObject) {
  2757. var self = this;
  2758. if (($receiver = self['@textarea']) == nil || $receiver == undefined) {
  2759. smalltalk.send(self, "_open", []);
  2760. } else {
  2761. self['@textarea'];
  2762. }
  2763. smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [smalltalk.send(smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val", []), "__comma", [smalltalk.send(anObject, "_asString", [])])]);
  2764. return self;
  2765. }
  2766. }),
  2767. smalltalk.IDETranscript);
  2768. smalltalk.IDETranscript.klass.iVarNames = ['current'];
  2769. smalltalk.addMethod(
  2770. "_current",
  2771. smalltalk.method({
  2772. selector: "current",
  2773. fn: function () {
  2774. var self = this;
  2775. var $1;
  2776. if (($receiver = self['@current']) == nil || $receiver == undefined) {
  2777. self['@current'] = smalltalk.send(self, "_new", [], smalltalk.TabWidget.klass);
  2778. $1 = self['@current'];
  2779. } else {
  2780. $1 = self['@current'];
  2781. }
  2782. return $1;
  2783. }
  2784. }),
  2785. smalltalk.IDETranscript.klass);
  2786. smalltalk.addMethod(
  2787. "_initialize",
  2788. smalltalk.method({
  2789. selector: "initialize",
  2790. fn: function () {
  2791. var self = this;
  2792. smalltalk.send(smalltalk.Transcript || Transcript, "_register_", [smalltalk.send(self, "_current", [])]);
  2793. return self;
  2794. }
  2795. }),
  2796. smalltalk.IDETranscript.klass);
  2797. smalltalk.addMethod(
  2798. "_new",
  2799. smalltalk.method({
  2800. selector: "new",
  2801. fn: function () {
  2802. var self = this;
  2803. smalltalk.send(self, "_shouldNotImplement", []);
  2804. return self;
  2805. }
  2806. }),
  2807. smalltalk.IDETranscript.klass);
  2808. smalltalk.addMethod(
  2809. "_open",
  2810. smalltalk.method({
  2811. selector: "open",
  2812. fn: function () {
  2813. var self = this;
  2814. var $1, $2;
  2815. $1 = smalltalk.send(smalltalk.TabManager || TabManager, "_current", []);
  2816. smalltalk.send($1, "_open", []);
  2817. $2 = smalltalk.send($1, "_selectTab_", [smalltalk.send(self, "_current", [])]);
  2818. return self;
  2819. }
  2820. }),
  2821. smalltalk.IDETranscript.klass);
  2822. smalltalk.addClass('Inspector', smalltalk.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  2823. smalltalk.addMethod(
  2824. "_canBeClosed",
  2825. smalltalk.method({
  2826. selector: "canBeClosed",
  2827. fn: function () {
  2828. var self = this;
  2829. return true;
  2830. }
  2831. }),
  2832. smalltalk.Inspector);
  2833. smalltalk.addMethod(
  2834. "_dive",
  2835. smalltalk.method({
  2836. selector: "dive",
  2837. fn: function () {
  2838. var self = this;
  2839. smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_inspect", []);
  2840. return self;
  2841. }
  2842. }),
  2843. smalltalk.Inspector);
  2844. smalltalk.addMethod(
  2845. "_inspect_",
  2846. smalltalk.method({
  2847. selector: "inspect:",
  2848. fn: function (anObject) {
  2849. var self = this;
  2850. self['@object'] = anObject;
  2851. self['@variables'] = [];
  2852. smalltalk.send(self['@object'], "_inspectOn_", [self]);
  2853. return self;
  2854. }
  2855. }),
  2856. smalltalk.Inspector);
  2857. smalltalk.addMethod(
  2858. "_label",
  2859. smalltalk.method({
  2860. selector: "label",
  2861. fn: function () {
  2862. var self = this;
  2863. var $1;
  2864. if (($receiver = self['@label']) == nil || $receiver == undefined) {
  2865. $1 = "Inspector (nil)";
  2866. } else {
  2867. $1 = self['@label'];
  2868. }
  2869. return $1;
  2870. }
  2871. }),
  2872. smalltalk.Inspector);
  2873. smalltalk.addMethod(
  2874. "_refresh",
  2875. smalltalk.method({
  2876. selector: "refresh",
  2877. fn: function () {
  2878. var self = this;
  2879. var $1;
  2880. smalltalk.send(self, "_inspect_", [self['@object']]);
  2881. smalltalk.send(self, "_updateVariablesList", []);
  2882. $1 = smalltalk.send(self, "_updateValueTextarea", []);
  2883. return self;
  2884. }
  2885. }),
  2886. smalltalk.Inspector);
  2887. smalltalk.addMethod(
  2888. "_renderBottomPanelOn_",
  2889. smalltalk.method({
  2890. selector: "renderBottomPanelOn:",
  2891. fn: function (html) {
  2892. var self = this;
  2893. var $1, $3, $4, $2;
  2894. $1 = smalltalk.send(html, "_div", []);
  2895. smalltalk.send($1, "_class_", ["amber_sourceCode"]);
  2896. $2 = smalltalk.send($1, "_with_", [function () {$3 = smalltalk.send(smalltalk.SourceArea || SourceArea, "_new", []);smalltalk.send($3, "_receiver_", [self['@object']]);smalltalk.send($3, "_onDoIt_", [function () {return smalltalk.send(self, "_refresh", []);}]);$4 = smalltalk.send($3, "_yourself", []);self['@sourceArea'] = $4;self['@sourceArea'];return smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);}]);
  2897. return self;
  2898. }
  2899. }),
  2900. smalltalk.Inspector);
  2901. smalltalk.addMethod(
  2902. "_renderBoxOn_",
  2903. smalltalk.method({
  2904. selector: "renderBoxOn:",
  2905. fn: function (html) {
  2906. var self = this;
  2907. var $1;
  2908. smalltalk.send(self, "_renderTopPanelOn_", [html]);
  2909. $1 = smalltalk.send(self, "_renderBottomPanelOn_", [html]);
  2910. return self;
  2911. }
  2912. }),
  2913. smalltalk.Inspector);
  2914. smalltalk.addMethod(
  2915. "_renderButtonsOn_",
  2916. smalltalk.method({
  2917. selector: "renderButtonsOn:",
  2918. fn: function (html) {
  2919. var self = this;
  2920. var $1, $2, $3, $4, $5, $6;
  2921. $1 = smalltalk.send(html, "_button", []);
  2922. smalltalk.send($1, "_with_", ["DoIt"]);
  2923. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_doIt", []);}]);
  2924. $3 = smalltalk.send(html, "_button", []);
  2925. smalltalk.send($3, "_with_", ["PrintIt"]);
  2926. $4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_printIt", []);}]);
  2927. $5 = smalltalk.send(html, "_button", []);
  2928. smalltalk.send($5, "_with_", ["InspectIt"]);
  2929. $6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_inspectIt", []);}]);
  2930. smalltalk.send(self, "_updateButtons", []);
  2931. return self;
  2932. }
  2933. }),
  2934. smalltalk.Inspector);
  2935. smalltalk.addMethod(
  2936. "_renderTopPanelOn_",
  2937. smalltalk.method({
  2938. selector: "renderTopPanelOn:",
  2939. fn: function (html) {
  2940. var self = this;
  2941. var $1, $3, $4, $5, $7, $8, $9, $10, $6, $2, $11;
  2942. $1 = smalltalk.send(html, "_div", []);
  2943. smalltalk.send($1, "_class_", ["top"]);
  2944. $2 = smalltalk.send($1, "_with_", [function () {self['@variablesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column variables"]);self['@variablesList'];$3 = smalltalk.send(html, "_textarea", []);smalltalk.send($3, "_class_", ["amber_column value"]);$4 = smalltalk.send($3, "_at_put_", ["readonly", "readonly"]);self['@valueTextarea'] = $4;self['@valueTextarea'];$5 = smalltalk.send(html, "_div", []);smalltalk.send($5, "_class_", ["amber_tabs inspector"]);$6 = smalltalk.send($5, "_with_", [function () {$7 = smalltalk.send(html, "_button", []);smalltalk.send($7, "_class_", ["amber_button inspector refresh"]);smalltalk.send($7, "_with_", ["Refresh"]);$8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self, "_refresh", []);}]);$8;$9 = smalltalk.send(html, "_button", []);smalltalk.send($9, "_class_", ["amber_button inspector dive"]);smalltalk.send($9, "_with_", ["Dive"]);$10 = smalltalk.send($9, "_onClick_", [function () {return smalltalk.send(self, "_dive", []);}]);self['@diveButton'] = $10;return self['@diveButton'];}]);$6;return smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["amber_clear"]);}]);
  2945. smalltalk.send(self, "_updateVariablesList", []);
  2946. $11 = smalltalk.send(self, "_updateValueTextarea", []);
  2947. return self;
  2948. }
  2949. }),
  2950. smalltalk.Inspector);
  2951. smalltalk.addMethod(
  2952. "_selectVariable_",
  2953. smalltalk.method({
  2954. selector: "selectVariable:",
  2955. fn: function (aString) {
  2956. var self = this;
  2957. var $1;
  2958. smalltalk.send(self, "_selectedVariable_", [aString]);
  2959. smalltalk.send(self, "_updateVariablesList", []);
  2960. smalltalk.send(self, "_updateValueTextarea", []);
  2961. $1 = smalltalk.send(self, "_updateButtons", []);
  2962. return self;
  2963. }
  2964. }),
  2965. smalltalk.Inspector);
  2966. smalltalk.addMethod(
  2967. "_selectedVariable",
  2968. smalltalk.method({
  2969. selector: "selectedVariable",
  2970. fn: function () {
  2971. var self = this;
  2972. return self['@selectedVariable'];
  2973. }
  2974. }),
  2975. smalltalk.Inspector);
  2976. smalltalk.addMethod(
  2977. "_selectedVariable_",
  2978. smalltalk.method({
  2979. selector: "selectedVariable:",
  2980. fn: function (aString) {
  2981. var self = this;
  2982. self['@selectedVariable'] = aString;
  2983. return self;
  2984. }
  2985. }),
  2986. smalltalk.Inspector);
  2987. smalltalk.addMethod(
  2988. "_setLabel_",
  2989. smalltalk.method({
  2990. selector: "setLabel:",
  2991. fn: function (aString) {
  2992. var self = this;
  2993. self['@label'] = aString;
  2994. return self;
  2995. }
  2996. }),
  2997. smalltalk.Inspector);
  2998. smalltalk.addMethod(
  2999. "_setVariables_",
  3000. smalltalk.method({
  3001. selector: "setVariables:",
  3002. fn: function (aCollection) {
  3003. var self = this;
  3004. self['@variables'] = aCollection;
  3005. return self;
  3006. }
  3007. }),
  3008. smalltalk.Inspector);
  3009. smalltalk.addMethod(
  3010. "_sourceArea",
  3011. smalltalk.method({
  3012. selector: "sourceArea",
  3013. fn: function () {
  3014. var self = this;
  3015. return self['@sourceArea'];
  3016. }
  3017. }),
  3018. smalltalk.Inspector);
  3019. smalltalk.addMethod(
  3020. "_updateButtons",
  3021. smalltalk.method({
  3022. selector: "updateButtons",
  3023. fn: function () {
  3024. var self = this;
  3025. var $1;
  3026. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_selectedVariable", []), "_notNil", []), "_and_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_notNil", []);}]);
  3027. if (smalltalk.assert($1)) {
  3028. smalltalk.send(self['@diveButton'], "_removeAt_", ["disabled"]);
  3029. } else {
  3030. smalltalk.send(self['@diveButton'], "_at_put_", ["disabled", true]);
  3031. }
  3032. return self;
  3033. }
  3034. }),
  3035. smalltalk.Inspector);
  3036. smalltalk.addMethod(
  3037. "_updateValueTextarea",
  3038. smalltalk.method({
  3039. selector: "updateValueTextarea",
  3040. fn: function () {
  3041. var self = this;
  3042. var $2, $1;
  3043. $2 = smalltalk.send(smalltalk.send(self, "_selectedVariable", []), "_isNil", []);
  3044. if (smalltalk.assert($2)) {
  3045. $1 = "";
  3046. } else {
  3047. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_printString", []);
  3048. }
  3049. smalltalk.send(smalltalk.send(self['@valueTextarea'], "_asJQuery", []), "_val_", [$1]);
  3050. return self;
  3051. }
  3052. }),
  3053. smalltalk.Inspector);
  3054. smalltalk.addMethod(
  3055. "_updateVariablesList",
  3056. smalltalk.method({
  3057. selector: "updateVariablesList",
  3058. fn: function () {
  3059. var self = this;
  3060. var $1, $2;
  3061. smalltalk.send(self['@variablesList'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_keys", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);smalltalk.send(li, "_with_", [each]);$1 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectVariable_", [each]);}]);$1;$2 = smalltalk.send(smalltalk.send(self, "_selectedVariable", []), "__eq", [each]);if (smalltalk.assert($2)) {return smalltalk.send(li, "_class_", ["selected"]);}}]);}]);
  3062. return self;
  3063. }
  3064. }),
  3065. smalltalk.Inspector);
  3066. smalltalk.addMethod(
  3067. "_variables",
  3068. smalltalk.method({
  3069. selector: "variables",
  3070. fn: function () {
  3071. var self = this;
  3072. return self['@variables'];
  3073. }
  3074. }),
  3075. smalltalk.Inspector);
  3076. smalltalk.addMethod(
  3077. "_on_",
  3078. smalltalk.method({
  3079. selector: "on:",
  3080. fn: function (anObject) {
  3081. var self = this;
  3082. var $2, $3, $1;
  3083. $2 = smalltalk.send(self, "_new", []);
  3084. smalltalk.send($2, "_inspect_", [anObject]);
  3085. $3 = smalltalk.send($2, "_yourself", []);
  3086. $1 = $3;
  3087. return $1;
  3088. }
  3089. }),
  3090. smalltalk.Inspector.klass);
  3091. smalltalk.addClass('ProgressBar', smalltalk.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  3092. smalltalk.addMethod(
  3093. "_percent",
  3094. smalltalk.method({
  3095. selector: "percent",
  3096. fn: function () {
  3097. var self = this;
  3098. var $1;
  3099. if (($receiver = self['@percent']) == nil || $receiver == undefined) {
  3100. $1 = 0;
  3101. } else {
  3102. $1 = self['@percent'];
  3103. }
  3104. return $1;
  3105. }
  3106. }),
  3107. smalltalk.ProgressBar);
  3108. smalltalk.addMethod(
  3109. "_percent_",
  3110. smalltalk.method({
  3111. selector: "percent:",
  3112. fn: function (aNumber) {
  3113. var self = this;
  3114. self['@percent'] = aNumber;
  3115. return self;
  3116. }
  3117. }),
  3118. smalltalk.ProgressBar);
  3119. smalltalk.addMethod(
  3120. "_renderOn_",
  3121. smalltalk.method({
  3122. selector: "renderOn:",
  3123. fn: function (html) {
  3124. var self = this;
  3125. var $1, $2;
  3126. $1 = smalltalk.send(html, "_div", []);
  3127. smalltalk.send($1, "_class_", ["progress_bar"]);
  3128. $2 = smalltalk.send($1, "_yourself", []);
  3129. self['@div'] = $2;
  3130. smalltalk.send(self, "_renderProgressBar", []);
  3131. return self;
  3132. }
  3133. }),
  3134. smalltalk.ProgressBar);
  3135. smalltalk.addMethod(
  3136. "_renderProgressBar",
  3137. smalltalk.method({
  3138. selector: "renderProgressBar",
  3139. fn: function () {
  3140. var self = this;
  3141. var $1, $2;
  3142. smalltalk.send(self['@div'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_div", []);smalltalk.send($1, "_class_", ["progress"]);$2 = smalltalk.send($1, "_style_", [smalltalk.send(smalltalk.send("width:", "__comma", [smalltalk.send(smalltalk.send(self, "_percent", []), "_asString", [])]), "__comma", ["%"])]);return $2;}]);
  3143. return self;
  3144. }
  3145. }),
  3146. smalltalk.ProgressBar);
  3147. smalltalk.addMethod(
  3148. "_updatePercent_",
  3149. smalltalk.method({
  3150. selector: "updatePercent:",
  3151. fn: function (aNumber) {
  3152. var self = this;
  3153. smalltalk.send(self, "_percent_", [aNumber]);
  3154. smalltalk.send(self, "_renderProgressBar", []);
  3155. return self;
  3156. }
  3157. }),
  3158. smalltalk.ProgressBar);
  3159. smalltalk.addClass('ReferencesBrowser', smalltalk.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  3160. smalltalk.addMethod(
  3161. "_canBeClosed",
  3162. smalltalk.method({
  3163. selector: "canBeClosed",
  3164. fn: function () {
  3165. var self = this;
  3166. return true;
  3167. }
  3168. }),
  3169. smalltalk.ReferencesBrowser);
  3170. smalltalk.addMethod(
  3171. "_classesAndMetaclasses",
  3172. smalltalk.method({
  3173. selector: "classesAndMetaclasses",
  3174. fn: function () {
  3175. var self = this;
  3176. var $1;
  3177. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_classes", []), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_classes", []), "_collect_", [function (each) {return smalltalk.send(each, "_class", []);}])]);
  3178. return $1;
  3179. }
  3180. }),
  3181. smalltalk.ReferencesBrowser);
  3182. smalltalk.addMethod(
  3183. "_implementors",
  3184. smalltalk.method({
  3185. selector: "implementors",
  3186. fn: function () {
  3187. var self = this;
  3188. var $1;
  3189. if (($receiver = self['@implementors']) == nil ||
  3190. $receiver == undefined) {
  3191. self['@implementors'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3192. $1 = self['@implementors'];
  3193. } else {
  3194. $1 = self['@implementors'];
  3195. }
  3196. return $1;
  3197. }
  3198. }),
  3199. smalltalk.ReferencesBrowser);
  3200. smalltalk.addMethod(
  3201. "_initialize",
  3202. smalltalk.method({
  3203. selector: "initialize",
  3204. fn: function () {
  3205. var self = this;
  3206. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  3207. self['@selector'] = "";
  3208. return self;
  3209. }
  3210. }),
  3211. smalltalk.ReferencesBrowser);
  3212. smalltalk.addMethod(
  3213. "_label",
  3214. smalltalk.method({
  3215. selector: "label",
  3216. fn: function () {
  3217. var self = this;
  3218. return "[References]";
  3219. }
  3220. }),
  3221. smalltalk.ReferencesBrowser);
  3222. smalltalk.addMethod(
  3223. "_matches",
  3224. smalltalk.method({
  3225. selector: "matches",
  3226. fn: function () {
  3227. var self = this;
  3228. var $1;
  3229. if (($receiver = self['@matches']) == nil || $receiver == undefined) {
  3230. self['@matches'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3231. $1 = self['@matches'];
  3232. } else {
  3233. $1 = self['@matches'];
  3234. }
  3235. return $1;
  3236. }
  3237. }),
  3238. smalltalk.ReferencesBrowser);
  3239. smalltalk.addMethod(
  3240. "_openBrowserOn_",
  3241. smalltalk.method({
  3242. selector: "openBrowserOn:",
  3243. fn: function (aMethod) {
  3244. var self = this;
  3245. var $2, $1, $3, $4;
  3246. var browser;
  3247. $2 = smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_isMetaclass", []);
  3248. if (smalltalk.assert($2)) {
  3249. $1 = smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_instanceClass", []);
  3250. } else {
  3251. $1 = smalltalk.send(aMethod, "_methodClass", []);
  3252. }
  3253. browser = smalltalk.send(smalltalk.Browser || Browser, "_openOn_", [$1]);
  3254. $3 = smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_isMetaclass", []);
  3255. if (smalltalk.assert($3)) {
  3256. smalltalk.send(browser, "_selectTab_", [smalltalk.symbolFor("class")]);
  3257. }
  3258. smalltalk.send(browser, "_selectProtocol_", [smalltalk.send(aMethod, "_category", [])]);
  3259. $4 = smalltalk.send(browser, "_selectMethod_", [aMethod]);
  3260. return self;
  3261. }
  3262. }),
  3263. smalltalk.ReferencesBrowser);
  3264. smalltalk.addMethod(
  3265. "_referencedClasses",
  3266. smalltalk.method({
  3267. selector: "referencedClasses",
  3268. fn: function () {
  3269. var self = this;
  3270. var $1;
  3271. if (($receiver = self['@referencedClasses']) == nil ||
  3272. $receiver == undefined) {
  3273. self['@referencedClasses'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3274. $1 = self['@referencedClasses'];
  3275. } else {
  3276. $1 = self['@referencedClasses'];
  3277. }
  3278. return $1;
  3279. }
  3280. }),
  3281. smalltalk.ReferencesBrowser);
  3282. smalltalk.addMethod(
  3283. "_renderBoxOn_",
  3284. smalltalk.method({
  3285. selector: "renderBoxOn:",
  3286. fn: function (html) {
  3287. var self = this;
  3288. var $1;
  3289. smalltalk.send(self, "_renderInputOn_", [html]);
  3290. smalltalk.send(self, "_renderImplementorsOn_", [html]);
  3291. smalltalk.send(self, "_renderSendersOn_", [html]);
  3292. smalltalk.send(self, "_renderReferencedClassesOn_", [html]);
  3293. $1 = smalltalk.send(self, "_renderMatchesOn_", [html]);
  3294. return self;
  3295. }
  3296. }),
  3297. smalltalk.ReferencesBrowser);
  3298. smalltalk.addMethod(
  3299. "_renderImplementorsOn_",
  3300. smalltalk.method({
  3301. selector: "renderImplementorsOn:",
  3302. fn: function (html) {
  3303. var self = this;
  3304. self['@implementorsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column implementors"]);
  3305. smalltalk.send(self, "_updateImplementorsList", []);
  3306. return self;
  3307. }
  3308. }),
  3309. smalltalk.ReferencesBrowser);
  3310. smalltalk.addMethod(
  3311. "_renderInputOn_",
  3312. smalltalk.method({
  3313. selector: "renderInputOn:",
  3314. fn: function (html) {
  3315. var self = this;
  3316. var $1, $2;
  3317. $1 = smalltalk.send(html, "_input", []);
  3318. smalltalk.send($1, "_class_", ["implementors"]);
  3319. $2 = smalltalk.send($1, "_yourself", []);
  3320. self['@input'] = $2;
  3321. smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val_", [self['@selector']]);
  3322. smalltalk.send(self, "_setInputEvents", []);
  3323. return self;
  3324. }
  3325. }),
  3326. smalltalk.ReferencesBrowser);
  3327. smalltalk.addMethod(
  3328. "_renderMatchesOn_",
  3329. smalltalk.method({
  3330. selector: "renderMatchesOn:",
  3331. fn: function (html) {
  3332. var self = this;
  3333. self['@matchesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column matches"]);
  3334. smalltalk.send(self, "_updateMatchesList", []);
  3335. return self;
  3336. }
  3337. }),
  3338. smalltalk.ReferencesBrowser);
  3339. smalltalk.addMethod(
  3340. "_renderReferencedClassesOn_",
  3341. smalltalk.method({
  3342. selector: "renderReferencedClassesOn:",
  3343. fn: function (html) {
  3344. var self = this;
  3345. self['@referencedClassesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column referenced_classes"]);
  3346. smalltalk.send(self, "_updateReferencedClassesList", []);
  3347. return self;
  3348. }
  3349. }),
  3350. smalltalk.ReferencesBrowser);
  3351. smalltalk.addMethod(
  3352. "_renderSendersOn_",
  3353. smalltalk.method({
  3354. selector: "renderSendersOn:",
  3355. fn: function (html) {
  3356. var self = this;
  3357. self['@sendersList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column senders"]);
  3358. smalltalk.send(self, "_updateSendersList", []);
  3359. return self;
  3360. }
  3361. }),
  3362. smalltalk.ReferencesBrowser);
  3363. smalltalk.addMethod(
  3364. "_search_",
  3365. smalltalk.method({
  3366. selector: "search:",
  3367. fn: function (aString) {
  3368. var self = this;
  3369. var $1;
  3370. smalltalk.send(self, "_searchReferencesFor_", [aString]);
  3371. smalltalk.send(self, "_updateImplementorsList", []);
  3372. smalltalk.send(self, "_updateSendersList", []);
  3373. smalltalk.send(self, "_updateReferencedClassesList", []);
  3374. $1 = smalltalk.send(self, "_updateMatchesList", []);
  3375. return self;
  3376. }
  3377. }),
  3378. smalltalk.ReferencesBrowser);
  3379. smalltalk.addMethod(
  3380. "_searchMethodSource",
  3381. smalltalk.method({
  3382. selector: "searchMethodSource",
  3383. fn: function () {
  3384. var self = this;
  3385. var $1;
  3386. var regex;
  3387. regex = smalltalk.send(self['@selector'], "_allButFirst", []);
  3388. smalltalk.send(smalltalk.send(self, "_classesAndMetaclasses", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodDictionary", []), "_values", []), "_do_", [function (value) {$1 = smalltalk.send(smalltalk.send(value, "_source", []), "_match_", [regex]);if (smalltalk.assert($1)) {return smalltalk.send(smalltalk.send(self, "_matches", []), "_add_", [value]);}}]);}]);
  3389. return self;
  3390. }
  3391. }),
  3392. smalltalk.ReferencesBrowser);
  3393. smalltalk.addMethod(
  3394. "_searchReferencedClasses",
  3395. smalltalk.method({
  3396. selector: "searchReferencedClasses",
  3397. fn: function () {
  3398. var self = this;
  3399. var $1;
  3400. smalltalk.send(smalltalk.send(self, "_classesAndMetaclasses", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodDictionary", []), "_values", []), "_do_", [function (value) {$1 = smalltalk.send(smalltalk.send(value, "_referencedClasses", []), "_includes_", [self['@selector']]);if (smalltalk.assert($1)) {return smalltalk.send(smalltalk.send(self, "_referencedClasses", []), "_add_", [value]);}}]);}]);
  3401. return self;
  3402. }
  3403. }),
  3404. smalltalk.ReferencesBrowser);
  3405. smalltalk.addMethod(
  3406. "_searchReferencesFor_",
  3407. smalltalk.method({
  3408. selector: "searchReferencesFor:",
  3409. fn: function (aString) {
  3410. var self = this;
  3411. var $1;
  3412. self['@selector'] = aString;
  3413. self['@implementors'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3414. self['@senders'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3415. self['@referencedClasses'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3416. self['@matches'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3417. smalltalk.send(self, "_searchMethodSource", []);
  3418. $1 = smalltalk.send(self['@selector'], "_match_", ["^[A-Z]"]);
  3419. if (smalltalk.assert($1)) {
  3420. smalltalk.send(self, "_searchReferencedClasses", []);
  3421. } else {
  3422. smalltalk.send(self, "_searchSelectorReferences", []);
  3423. }
  3424. return self;
  3425. }
  3426. }),
  3427. smalltalk.ReferencesBrowser);
  3428. smalltalk.addMethod(
  3429. "_searchSelectorReferences",
  3430. smalltalk.method({
  3431. selector: "searchSelectorReferences",
  3432. fn: function () {
  3433. var self = this;
  3434. var $1, $2;
  3435. smalltalk.send(smalltalk.send(self, "_classesAndMetaclasses", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(each, "_methodDictionary", []), "_keysAndValuesDo_", [function (key, value) {$1 = smalltalk.send(key, "__eq", [self['@selector']]);if (smalltalk.assert($1)) {smalltalk.send(smalltalk.send(self, "_implementors", []), "_add_", [value]);}$2 = smalltalk.send(smalltalk.send(value, "_messageSends", []), "_includes_", [self['@selector']]);if (smalltalk.assert($2)) {return smalltalk.send(smalltalk.send(self, "_senders", []), "_add_", [value]);}}]);}]);
  3436. return self;
  3437. }
  3438. }),
  3439. smalltalk.ReferencesBrowser);
  3440. smalltalk.addMethod(
  3441. "_selector",
  3442. smalltalk.method({
  3443. selector: "selector",
  3444. fn: function () {
  3445. var self = this;
  3446. return self['@selector'];
  3447. }
  3448. }),
  3449. smalltalk.ReferencesBrowser);
  3450. smalltalk.addMethod(
  3451. "_senders",
  3452. smalltalk.method({
  3453. selector: "senders",
  3454. fn: function () {
  3455. var self = this;
  3456. var $1;
  3457. if (($receiver = self['@senders']) == nil || $receiver == undefined) {
  3458. self['@senders'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3459. $1 = self['@senders'];
  3460. } else {
  3461. $1 = self['@senders'];
  3462. }
  3463. return $1;
  3464. }
  3465. }),
  3466. smalltalk.ReferencesBrowser);
  3467. smalltalk.addMethod(
  3468. "_setInputEvents",
  3469. smalltalk.method({
  3470. selector: "setInputEvents",
  3471. fn: function () {
  3472. var self = this;
  3473. var $1;
  3474. smalltalk.send(self['@input'], "_onKeyUp_", [function () {self['@timer'] = smalltalk.send(function () {return smalltalk.send(self, "_search_", [smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val", [])]);}, "_valueWithTimeout_", [100]);return self['@timer'];}]);
  3475. $1 = smalltalk.send(self['@input'], "_onKeyDown_", [function () {if (($receiver = self['@timer']) == nil || $receiver == undefined) {return self['@timer'];} else {return smalltalk.send(self['@timer'], "_clearTimeout", []);}}]);
  3476. return self;
  3477. }
  3478. }),
  3479. smalltalk.ReferencesBrowser);
  3480. smalltalk.addMethod(
  3481. "_updateImplementorsList",
  3482. smalltalk.method({
  3483. selector: "updateImplementorsList",
  3484. fn: function () {
  3485. var self = this;
  3486. var $1, $2, $3;
  3487. smalltalk.send(self['@implementorsList'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["column_label"]);smalltalk.send($1, "_with_", [smalltalk.send(smalltalk.send("Implementors (", "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_implementors", []), "_size", []), "_asString", [])]), "__comma", [")"])]);$2 = smalltalk.send($1, "_style_", ["font-weight: bold"]);$2;return smalltalk.send(smalltalk.send(self, "_implementors", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);smalltalk.send(li, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodClass", []), "_asString", []), "__comma", [" >> "]), "__comma", [smalltalk.send(self, "_selector", [])])]);$3 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_openBrowserOn_", [each]);}]);return $3;}]);}]);
  3488. return self;
  3489. }
  3490. }),
  3491. smalltalk.ReferencesBrowser);
  3492. smalltalk.addMethod(
  3493. "_updateMatchesList",
  3494. smalltalk.method({
  3495. selector: "updateMatchesList",
  3496. fn: function () {
  3497. var self = this;
  3498. var $1, $2, $3;
  3499. smalltalk.send(self['@matchesList'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["column_label"]);smalltalk.send($1, "_with_", [smalltalk.send(smalltalk.send("Regex matches (", "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_matches", []), "_size", []), "_asString", [])]), "__comma", [")"])]);$2 = smalltalk.send($1, "_style_", ["font-weight: bold"]);$2;return smalltalk.send(smalltalk.send(self, "_matches", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);smalltalk.send(li, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodClass", []), "_asString", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);$3 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_openBrowserOn_", [each]);}]);return $3;}]);}]);
  3500. return self;
  3501. }
  3502. }),
  3503. smalltalk.ReferencesBrowser);
  3504. smalltalk.addMethod(
  3505. "_updateReferencedClassesList",
  3506. smalltalk.method({
  3507. selector: "updateReferencedClassesList",
  3508. fn: function () {
  3509. var self = this;
  3510. var $1, $2, $3, $4;
  3511. smalltalk.send(self['@referencedClassesList'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["column_label"]);smalltalk.send($1, "_with_", [smalltalk.send(smalltalk.send("Class references (", "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_referencedClasses", []), "_size", []), "_asString", [])]), "__comma", [")"])]);$2 = smalltalk.send($1, "_style_", ["font-weight: bold"]);$2;return smalltalk.send(smalltalk.send(self, "_referencedClasses", []), "_do_", [function (each) {$3 = smalltalk.send(html, "_li", []);smalltalk.send($3, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodClass", []), "_asString", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);$4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(self, "_openBrowserOn_", [each]);}]);return $4;}]);}]);
  3512. return self;
  3513. }
  3514. }),
  3515. smalltalk.ReferencesBrowser);
  3516. smalltalk.addMethod(
  3517. "_updateSendersList",
  3518. smalltalk.method({
  3519. selector: "updateSendersList",
  3520. fn: function () {
  3521. var self = this;
  3522. var $1, $2, $3, $4;
  3523. smalltalk.send(self['@sendersList'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["column_label"]);smalltalk.send($1, "_with_", [smalltalk.send(smalltalk.send("Senders (", "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_senders", []), "_size", []), "_asString", [])]), "__comma", [")"])]);$2 = smalltalk.send($1, "_style_", ["font-weight: bold"]);$2;return smalltalk.send(smalltalk.send(self, "_senders", []), "_do_", [function (each) {$3 = smalltalk.send(html, "_li", []);smalltalk.send($3, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodClass", []), "_asString", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);$4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(self, "_openBrowserOn_", [each]);}]);return $4;}]);}]);
  3524. return self;
  3525. }
  3526. }),
  3527. smalltalk.ReferencesBrowser);
  3528. smalltalk.addMethod(
  3529. "_search_",
  3530. smalltalk.method({
  3531. selector: "search:",
  3532. fn: function (aString) {
  3533. var self = this;
  3534. var $2, $3, $1;
  3535. $2 = smalltalk.send(self, "_new", []);
  3536. smalltalk.send($2, "_searchReferencesFor_", [aString]);
  3537. $3 = smalltalk.send($2, "_open", []);
  3538. $1 = $3;
  3539. return $1;
  3540. }
  3541. }),
  3542. smalltalk.ReferencesBrowser.klass);
  3543. smalltalk.addClass('TestRunner', smalltalk.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  3544. smalltalk.addMethod(
  3545. "_allClasses",
  3546. smalltalk.method({
  3547. selector: "allClasses",
  3548. fn: function () {
  3549. var self = this;
  3550. var $1;
  3551. $1 = smalltalk.send(smalltalk.send(smalltalk.TestCase || TestCase, "_allSubclasses", []), "_select_", [function (each) {return smalltalk.send(smalltalk.send(each, "_isAbstract", []), "_not", []);}]);
  3552. return $1;
  3553. }
  3554. }),
  3555. smalltalk.TestRunner);
  3556. smalltalk.addMethod(
  3557. "_classes",
  3558. smalltalk.method({
  3559. selector: "classes",
  3560. fn: function () {
  3561. var self = this;
  3562. var $1;
  3563. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_allClasses", []), "_select_", [function (each) {return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [smalltalk.send(each, "_category", [])]);}]), "_sort_", [function (a, b) {return smalltalk.send(smalltalk.send(a, "_name", []), "__gt", [smalltalk.send(b, "_name", [])]);}]);
  3564. return $1;
  3565. }
  3566. }),
  3567. smalltalk.TestRunner);
  3568. smalltalk.addMethod(
  3569. "_initialize",
  3570. smalltalk.method({
  3571. selector: "initialize",
  3572. fn: function () {
  3573. var self = this;
  3574. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  3575. self['@result'] = smalltalk.send(smalltalk.TestResult || TestResult, "_new", []);
  3576. return self;
  3577. }
  3578. }),
  3579. smalltalk.TestRunner);
  3580. smalltalk.addMethod(
  3581. "_isSelectedCategory_",
  3582. smalltalk.method({
  3583. selector: "isSelectedCategory:",
  3584. fn: function (aCategory) {
  3585. var self = this;
  3586. var $1;
  3587. $1 = smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [aCategory]);
  3588. return $1;
  3589. }
  3590. }),
  3591. smalltalk.TestRunner);
  3592. smalltalk.addMethod(
  3593. "_isSelectedClass_",
  3594. smalltalk.method({
  3595. selector: "isSelectedClass:",
  3596. fn: function (aClass) {
  3597. var self = this;
  3598. var $1;
  3599. $1 = smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_includes_", [aClass]);
  3600. return $1;
  3601. }
  3602. }),
  3603. smalltalk.TestRunner);
  3604. smalltalk.addMethod(
  3605. "_label",
  3606. smalltalk.method({
  3607. selector: "label",
  3608. fn: function () {
  3609. var self = this;
  3610. return "SUnit";
  3611. }
  3612. }),
  3613. smalltalk.TestRunner);
  3614. smalltalk.addMethod(
  3615. "_packages",
  3616. smalltalk.method({
  3617. selector: "packages",
  3618. fn: function () {
  3619. var self = this;
  3620. var $1, $2;
  3621. var packages;
  3622. packages = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3623. smalltalk.send(smalltalk.send(self, "_allClasses", []), "_do_", [function (each) {$1 = smalltalk.send(packages, "_includes_", [smalltalk.send(each, "_category", [])]);if (!smalltalk.assert($1)) {return smalltalk.send(packages, "_add_", [smalltalk.send(each, "_category", [])]);}}]);
  3624. $2 = smalltalk.send(packages, "_sort", []);
  3625. return $2;
  3626. }
  3627. }),
  3628. smalltalk.TestRunner);
  3629. smalltalk.addMethod(
  3630. "_performFailure_",
  3631. smalltalk.method({
  3632. selector: "performFailure:",
  3633. fn: function (aTestCase) {
  3634. var self = this;
  3635. smalltalk.send(aTestCase, "_setUp", []);
  3636. smalltalk.send(function () {return smalltalk.send(aTestCase, "_perform_", [smalltalk.send(aTestCase, "_selector", [])]);}, "_ensure_", [function () {return smalltalk.send(aTestCase, "_tearDown", []);}]);
  3637. return self;
  3638. }
  3639. }),
  3640. smalltalk.TestRunner);
  3641. smalltalk.addMethod(
  3642. "_printErrors",
  3643. smalltalk.method({
  3644. selector: "printErrors",
  3645. fn: function () {
  3646. var self = this;
  3647. var $1;
  3648. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_size", []), "_asString", []), "__comma", [" errors, "]);
  3649. return $1;
  3650. }
  3651. }),
  3652. smalltalk.TestRunner);
  3653. smalltalk.addMethod(
  3654. "_printFailures",
  3655. smalltalk.method({
  3656. selector: "printFailures",
  3657. fn: function () {
  3658. var self = this;
  3659. var $1;
  3660. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_size", []), "_asString", []), "__comma", [" failures"]);
  3661. return $1;
  3662. }
  3663. }),
  3664. smalltalk.TestRunner);
  3665. smalltalk.addMethod(
  3666. "_printPasses",
  3667. smalltalk.method({
  3668. selector: "printPasses",
  3669. fn: function () {
  3670. var self = this;
  3671. var $1;
  3672. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_total", []), "__minus", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_size", [])]), "__minus", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_size", [])]), "_asString", []), "__comma", [" passes, "]);
  3673. return $1;
  3674. }
  3675. }),
  3676. smalltalk.TestRunner);
  3677. smalltalk.addMethod(
  3678. "_printTotal",
  3679. smalltalk.method({
  3680. selector: "printTotal",
  3681. fn: function () {
  3682. var self = this;
  3683. var $1;
  3684. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_total", []), "_asString", []), "__comma", [" runs, "]);
  3685. return $1;
  3686. }
  3687. }),
  3688. smalltalk.TestRunner);
  3689. smalltalk.addMethod(
  3690. "_progressBar",
  3691. smalltalk.method({
  3692. selector: "progressBar",
  3693. fn: function () {
  3694. var self = this;
  3695. var $1;
  3696. if (($receiver = self['@progressBar']) == nil || $receiver == undefined) {
  3697. self['@progressBar'] = smalltalk.send(smalltalk.ProgressBar || ProgressBar, "_new", []);
  3698. $1 = self['@progressBar'];
  3699. } else {
  3700. $1 = self['@progressBar'];
  3701. }
  3702. return $1;
  3703. }
  3704. }),
  3705. smalltalk.TestRunner);
  3706. smalltalk.addMethod(
  3707. "_renderBoxOn_",
  3708. smalltalk.method({
  3709. selector: "renderBoxOn:",
  3710. fn: function (html) {
  3711. var self = this;
  3712. var $1;
  3713. smalltalk.send(self, "_renderCategoriesOn_", [html]);
  3714. smalltalk.send(self, "_renderClassesOn_", [html]);
  3715. $1 = smalltalk.send(self, "_renderResultsOn_", [html]);
  3716. return self;
  3717. }
  3718. }),
  3719. smalltalk.TestRunner);
  3720. smalltalk.addMethod(
  3721. "_renderButtonsOn_",
  3722. smalltalk.method({
  3723. selector: "renderButtonsOn:",
  3724. fn: function (html) {
  3725. var self = this;
  3726. var $1, $2;
  3727. $1 = smalltalk.send(html, "_button", []);
  3728. smalltalk.send($1, "_with_", ["Run selected"]);
  3729. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_run_", [smalltalk.send(self, "_testCases", [])]);}]);
  3730. return self;
  3731. }
  3732. }),
  3733. smalltalk.TestRunner);
  3734. smalltalk.addMethod(
  3735. "_renderCategoriesOn_",
  3736. smalltalk.method({
  3737. selector: "renderCategoriesOn:",
  3738. fn: function (html) {
  3739. var self = this;
  3740. self['@packagesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit packages"]);
  3741. smalltalk.send(self, "_updateCategoriesList", []);
  3742. return self;
  3743. }
  3744. }),
  3745. smalltalk.TestRunner);
  3746. smalltalk.addMethod(
  3747. "_renderClassesOn_",
  3748. smalltalk.method({
  3749. selector: "renderClassesOn:",
  3750. fn: function (html) {
  3751. var self = this;
  3752. self['@classesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit classes"]);
  3753. smalltalk.send(self, "_updateClassesList", []);
  3754. return self;
  3755. }
  3756. }),
  3757. smalltalk.TestRunner);
  3758. smalltalk.addMethod(
  3759. "_renderErrorsOn_",
  3760. smalltalk.method({
  3761. selector: "renderErrorsOn:",
  3762. fn: function (html) {
  3763. var self = this;
  3764. var $1, $2;
  3765. smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_do_", [function (each) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["errors"]);smalltalk.send($1, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_class", []), "_name", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);$2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_performFailure_", [each]);}]);return $2;}]);
  3766. return self;
  3767. }
  3768. }),
  3769. smalltalk.TestRunner);
  3770. smalltalk.addMethod(
  3771. "_renderFailuresOn_",
  3772. smalltalk.method({
  3773. selector: "renderFailuresOn:",
  3774. fn: function (html) {
  3775. var self = this;
  3776. var $1, $2;
  3777. smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_do_", [function (each) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["failures"]);smalltalk.send($1, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_class", []), "_name", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);$2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_performFailure_", [each]);}]);return $2;}]);
  3778. return self;
  3779. }
  3780. }),
  3781. smalltalk.TestRunner);
  3782. smalltalk.addMethod(
  3783. "_renderResultsOn_",
  3784. smalltalk.method({
  3785. selector: "renderResultsOn:",
  3786. fn: function (html) {
  3787. var self = this;
  3788. self['@statusDiv'] = smalltalk.send(html, "_div", []);
  3789. smalltalk.send(html, "_with_", [smalltalk.send(self, "_progressBar", [])]);
  3790. self['@methodsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit results"]);
  3791. smalltalk.send(self, "_updateMethodsList", []);
  3792. smalltalk.send(self, "_updateStatusDiv", []);
  3793. return self;
  3794. }
  3795. }),
  3796. smalltalk.TestRunner);
  3797. smalltalk.addMethod(
  3798. "_result",
  3799. smalltalk.method({
  3800. selector: "result",
  3801. fn: function () {
  3802. var self = this;
  3803. return self['@result'];
  3804. }
  3805. }),
  3806. smalltalk.TestRunner);
  3807. smalltalk.addMethod(
  3808. "_run_",
  3809. smalltalk.method({
  3810. selector: "run:",
  3811. fn: function (aCollection) {
  3812. var self = this;
  3813. var $1;
  3814. self['@result'] = smalltalk.send(smalltalk.TestResult || TestResult, "_new", []);
  3815. smalltalk.send(self, "_updateStatusDiv", []);
  3816. $1 = smalltalk.send(self, "_updateMethodsList", []);
  3817. smalltalk.send(smalltalk.send(self, "_progressBar", []), "_updatePercent_", [0]);
  3818. smalltalk.send(self['@result'], "_total_", [smalltalk.send(aCollection, "_size", [])]);
  3819. smalltalk.send(aCollection, "_do_", [function (each) {return smalltalk.send(function () {smalltalk.send(each, "_runCaseFor_", [self['@result']]);smalltalk.send(smalltalk.send(self, "_progressBar", []), "_updatePercent_", [smalltalk.send(smalltalk.send(smalltalk.send(self['@result'], "_runs", []), "__slash", [smalltalk.send(self['@result'], "_total", [])]), "__star", [100])]);smalltalk.send(self, "_updateStatusDiv", []);return smalltalk.send(self, "_updateMethodsList", []);}, "_valueWithTimeout_", [100]);}]);
  3820. return self;
  3821. }
  3822. }),
  3823. smalltalk.TestRunner);
  3824. smalltalk.addMethod(
  3825. "_selectAllCategories",
  3826. smalltalk.method({
  3827. selector: "selectAllCategories",
  3828. fn: function () {
  3829. var self = this;
  3830. var $1, $2;
  3831. smalltalk.send(smalltalk.send(self, "_packages", []), "_do_", [function (each) {$1 = smalltalk.send(self['@selectedCategories'], "_includes_", [each]);if (!smalltalk.assert($1)) {return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_add_", [each]);}}]);
  3832. smalltalk.send(self, "_updateCategoriesList", []);
  3833. $2 = smalltalk.send(self, "_updateClassesList", []);
  3834. return self;
  3835. }
  3836. }),
  3837. smalltalk.TestRunner);
  3838. smalltalk.addMethod(
  3839. "_selectAllClasses",
  3840. smalltalk.method({
  3841. selector: "selectAllClasses",
  3842. fn: function () {
  3843. var self = this;
  3844. var $1, $2;
  3845. smalltalk.send(smalltalk.send(self, "_classes", []), "_do_", [function (each) {$1 = smalltalk.send(self['@selectedClasses'], "_includes_", [each]);if (!smalltalk.assert($1)) {return smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_add_", [each]);}}]);
  3846. smalltalk.send(self, "_updateCategoriesList", []);
  3847. $2 = smalltalk.send(self, "_updateClassesList", []);
  3848. return self;
  3849. }
  3850. }),
  3851. smalltalk.TestRunner);
  3852. smalltalk.addMethod(
  3853. "_selectedCategories",
  3854. smalltalk.method({
  3855. selector: "selectedCategories",
  3856. fn: function () {
  3857. var self = this;
  3858. var $1;
  3859. if (($receiver = self['@selectedCategories']) == nil ||
  3860. $receiver == undefined) {
  3861. self['@selectedCategories'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3862. $1 = self['@selectedCategories'];
  3863. } else {
  3864. $1 = self['@selectedCategories'];
  3865. }
  3866. return $1;
  3867. }
  3868. }),
  3869. smalltalk.TestRunner);
  3870. smalltalk.addMethod(
  3871. "_selectedClasses",
  3872. smalltalk.method({
  3873. selector: "selectedClasses",
  3874. fn: function () {
  3875. var self = this;
  3876. var $1;
  3877. if (($receiver = self['@selectedClasses']) == nil ||
  3878. $receiver == undefined) {
  3879. self['@selectedClasses'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3880. $1 = self['@selectedClasses'];
  3881. } else {
  3882. $1 = self['@selectedClasses'];
  3883. }
  3884. return $1;
  3885. }
  3886. }),
  3887. smalltalk.TestRunner);
  3888. smalltalk.addMethod(
  3889. "_statusInfo",
  3890. smalltalk.method({
  3891. selector: "statusInfo",
  3892. fn: function () {
  3893. var self = this;
  3894. var $1;
  3895. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_printTotal", []), "__comma", [smalltalk.send(self, "_printPasses", [])]), "__comma", [smalltalk.send(self, "_printErrors", [])]), "__comma", [smalltalk.send(self, "_printFailures", [])]);
  3896. return $1;
  3897. }
  3898. }),
  3899. smalltalk.TestRunner);
  3900. smalltalk.addMethod(
  3901. "_testCases",
  3902. smalltalk.method({
  3903. selector: "testCases",
  3904. fn: function () {
  3905. var self = this;
  3906. var testCases;
  3907. testCases = [];
  3908. smalltalk.send(smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_select_", [function (each) {return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [smalltalk.send(each, "_category", [])]);}]), "_do_", [function (each) {return smalltalk.send(testCases, "_addAll_", [smalltalk.send(each, "_buildSuite", [])]);}]);
  3909. return testCases;
  3910. }
  3911. }),
  3912. smalltalk.TestRunner);
  3913. smalltalk.addMethod(
  3914. "_toggleCategory_",
  3915. smalltalk.method({
  3916. selector: "toggleCategory:",
  3917. fn: function (aCategory) {
  3918. var self = this;
  3919. var $1, $2;
  3920. $1 = smalltalk.send(self, "_isSelectedCategory_", [aCategory]);
  3921. if (smalltalk.assert($1)) {
  3922. smalltalk.send(self['@selectedCategories'], "_remove_", [aCategory]);
  3923. } else {
  3924. smalltalk.send(self['@selectedCategories'], "_add_", [aCategory]);
  3925. }
  3926. smalltalk.send(self, "_updateCategoriesList", []);
  3927. $2 = smalltalk.send(self, "_updateClassesList", []);
  3928. return self;
  3929. }
  3930. }),
  3931. smalltalk.TestRunner);
  3932. smalltalk.addMethod(
  3933. "_toggleClass_",
  3934. smalltalk.method({
  3935. selector: "toggleClass:",
  3936. fn: function (aClass) {
  3937. var self = this;
  3938. var $1;
  3939. $1 = smalltalk.send(self, "_isSelectedClass_", [aClass]);
  3940. if (smalltalk.assert($1)) {
  3941. smalltalk.send(self['@selectedClasses'], "_remove_", [aClass]);
  3942. } else {
  3943. smalltalk.send(self['@selectedClasses'], "_add_", [aClass]);
  3944. }
  3945. smalltalk.send(self, "_updateClassesList", []);
  3946. return self;
  3947. }
  3948. }),
  3949. smalltalk.TestRunner);
  3950. smalltalk.addMethod(
  3951. "_updateCategoriesList",
  3952. smalltalk.method({
  3953. selector: "updateCategoriesList",
  3954. fn: function () {
  3955. var self = this;
  3956. var $1, $2, $3, $4;
  3957. smalltalk.send(self['@packagesList'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["all"]);smalltalk.send($1, "_with_", ["All"]);$2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_selectAllCategories", []);}]);$2;return smalltalk.send(smalltalk.send(self, "_packages", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);$3 = smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [each]);if (smalltalk.assert($3)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [each]);$4 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_toggleCategory_", [each]);}]);return $4;}]);}]);
  3958. return self;
  3959. }
  3960. }),
  3961. smalltalk.TestRunner);
  3962. smalltalk.addMethod(
  3963. "_updateClassesList",
  3964. smalltalk.method({
  3965. selector: "updateClassesList",
  3966. fn: function () {
  3967. var self = this;
  3968. var $1, $2, $3, $4, $5;
  3969. smalltalk.send(self['@classesList'], "_contents_", [function (html) {$1 = smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_isEmpty", []);if (!smalltalk.assert($1)) {$2 = smalltalk.send(html, "_li", []);smalltalk.send($2, "_class_", ["all"]);smalltalk.send($2, "_with_", ["All"]);$3 = smalltalk.send($2, "_onClick_", [function () {return smalltalk.send(self, "_selectAllClasses", []);}]);$3;}return smalltalk.send(smalltalk.send(self, "_classes", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);$4 = smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_includes_", [each]);if (smalltalk.assert($4)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [smalltalk.send(each, "_name", [])]);$5 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_toggleClass_", [each]);}]);return $5;}]);}]);
  3970. return self;
  3971. }
  3972. }),
  3973. smalltalk.TestRunner);
  3974. smalltalk.addMethod(
  3975. "_updateMethodsList",
  3976. smalltalk.method({
  3977. selector: "updateMethodsList",
  3978. fn: function () {
  3979. var self = this;
  3980. smalltalk.send(self['@methodsList'], "_contents_", [function (html) {smalltalk.send(self, "_renderErrorsOn_", [html]);return smalltalk.send(self, "_renderFailuresOn_", [html]);}]);
  3981. return self;
  3982. }
  3983. }),
  3984. smalltalk.TestRunner);
  3985. smalltalk.addMethod(
  3986. "_updateStatusDiv",
  3987. smalltalk.method({
  3988. selector: "updateStatusDiv",
  3989. fn: function () {
  3990. var self = this;
  3991. smalltalk.send(self['@statusDiv'], "_class_", [smalltalk.send("sunit status ", "__comma", [smalltalk.send(self['@result'], "_status", [])])]);
  3992. smalltalk.send(self['@statusDiv'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(html, "_span", []), "_with_", [smalltalk.send(self, "_statusInfo", [])]);}]);
  3993. return self;
  3994. }
  3995. }),
  3996. smalltalk.TestRunner);
  3997. smalltalk.addClass('Workspace', smalltalk.TabWidget, ['sourceArea'], 'IDE');
  3998. smalltalk.addMethod(
  3999. "_clearWorkspace",
  4000. smalltalk.method({
  4001. selector: "clearWorkspace",
  4002. fn: function () {
  4003. var self = this;
  4004. smalltalk.send(self['@sourceArea'], "_clear", []);
  4005. return self;
  4006. }
  4007. }),
  4008. smalltalk.Workspace);
  4009. smalltalk.addMethod(
  4010. "_doIt",
  4011. smalltalk.method({
  4012. selector: "doIt",
  4013. fn: function () {
  4014. var self = this;
  4015. smalltalk.send(self['@sourceArea'], "_doIt", []);
  4016. return self;
  4017. }
  4018. }),
  4019. smalltalk.Workspace);
  4020. smalltalk.addMethod(
  4021. "_fileIn",
  4022. smalltalk.method({
  4023. selector: "fileIn",
  4024. fn: function () {
  4025. var self = this;
  4026. smalltalk.send(self['@sourceArea'], "_fileIn", []);
  4027. return self;
  4028. }
  4029. }),
  4030. smalltalk.Workspace);
  4031. smalltalk.addMethod(
  4032. "_inspectIt",
  4033. smalltalk.method({
  4034. selector: "inspectIt",
  4035. fn: function () {
  4036. var self = this;
  4037. smalltalk.send(self['@sourceArea'], "_inspectIt", []);
  4038. return self;
  4039. }
  4040. }),
  4041. smalltalk.Workspace);
  4042. smalltalk.addMethod(
  4043. "_label",
  4044. smalltalk.method({
  4045. selector: "label",
  4046. fn: function () {
  4047. var self = this;
  4048. return "Workspace";
  4049. }
  4050. }),
  4051. smalltalk.Workspace);
  4052. smalltalk.addMethod(
  4053. "_printIt",
  4054. smalltalk.method({
  4055. selector: "printIt",
  4056. fn: function () {
  4057. var self = this;
  4058. smalltalk.send(self['@sourceArea'], "_printIt", []);
  4059. return self;
  4060. }
  4061. }),
  4062. smalltalk.Workspace);
  4063. smalltalk.addMethod(
  4064. "_renderBoxOn_",
  4065. smalltalk.method({
  4066. selector: "renderBoxOn:",
  4067. fn: function (html) {
  4068. var self = this;
  4069. self['@sourceArea'] = smalltalk.send(smalltalk.SourceArea || SourceArea, "_new", []);
  4070. smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);
  4071. return self;
  4072. }
  4073. }),
  4074. smalltalk.Workspace);
  4075. smalltalk.addMethod(
  4076. "_renderButtonsOn_",
  4077. smalltalk.method({
  4078. selector: "renderButtonsOn:",
  4079. fn: function (html) {
  4080. var self = this;
  4081. var $1, $2, $3, $4, $5, $6, $7, $8, $9, $10;
  4082. $1 = smalltalk.send(html, "_button", []);
  4083. smalltalk.send($1, "_with_", ["DoIt"]);
  4084. smalltalk.send($1, "_title_", ["ctrl+d"]);
  4085. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_doIt", []);}]);
  4086. $3 = smalltalk.send(html, "_button", []);
  4087. smalltalk.send($3, "_with_", ["PrintIt"]);
  4088. smalltalk.send($3, "_title_", ["ctrl+p"]);
  4089. $4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(self, "_printIt", []);}]);
  4090. $5 = smalltalk.send(html, "_button", []);
  4091. smalltalk.send($5, "_with_", ["InspectIt"]);
  4092. smalltalk.send($5, "_title_", ["ctrl+i"]);
  4093. $6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(self, "_inspectIt", []);}]);
  4094. $7 = smalltalk.send(html, "_button", []);
  4095. smalltalk.send($7, "_with_", ["FileIn"]);
  4096. smalltalk.send($7, "_title_", ["ctrl+f"]);
  4097. $8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self, "_fileIn", []);}]);
  4098. $9 = smalltalk.send(html, "_button", []);
  4099. smalltalk.send($9, "_with_", ["Clear workspace"]);
  4100. $10 = smalltalk.send($9, "_onClick_", [function () {return smalltalk.send(self, "_clearWorkspace", []);}]);
  4101. return self;
  4102. }
  4103. }),
  4104. smalltalk.Workspace);
  4105. smalltalk.addMethod(
  4106. "_inspect",
  4107. smalltalk.method({
  4108. selector: "inspect",
  4109. fn: function () {
  4110. var self = this;
  4111. var $1, $2;
  4112. $1 = smalltalk.send(smalltalk.Inspector || Inspector, "_new", []);
  4113. smalltalk.send($1, "_inspect_", [self]);
  4114. $2 = smalltalk.send($1, "_open", []);
  4115. return self;
  4116. }
  4117. }),
  4118. smalltalk.Object);
  4119. smalltalk.addMethod(
  4120. "_inspectOn_",
  4121. smalltalk.method({
  4122. selector: "inspectOn:",
  4123. fn: function (anInspector) {
  4124. var self = this;
  4125. var $1;
  4126. var variables;
  4127. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4128. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4129. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_allInstanceVariableNames", []), "_do_", [function (each) {return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);}]);
  4130. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4131. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4132. return self;
  4133. }
  4134. }),
  4135. smalltalk.Object);
  4136. smalltalk.addMethod(
  4137. "_inspectOn_",
  4138. smalltalk.method({
  4139. selector: "inspectOn:",
  4140. fn: function (anInspector) {
  4141. var self = this;
  4142. var $1;
  4143. var variables;
  4144. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4145. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4146. smalltalk.send(self, "_withIndexDo_", [function (each, i) {return smalltalk.send(variables, "_at_put_", [i, each]);}]);
  4147. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4148. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4149. return self;
  4150. }
  4151. }),
  4152. smalltalk.Collection);
  4153. smalltalk.addMethod(
  4154. "_inspectOn_",
  4155. smalltalk.method({
  4156. selector: "inspectOn:",
  4157. fn: function (anInspector) {
  4158. var self = this;
  4159. var $1;
  4160. var variables;
  4161. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4162. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4163. smalltalk.send(variables, "_at_put_", ["#keys", smalltalk.send(self, "_keys", [])]);
  4164. smalltalk.send(self, "_keysAndValuesDo_", [function (key, value) {return smalltalk.send(variables, "_at_put_", [key, value]);}]);
  4165. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4166. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4167. return self;
  4168. }
  4169. }),
  4170. smalltalk.HashedCollection);
  4171. smalltalk.addMethod(
  4172. "_inspectOn_",
  4173. smalltalk.method({
  4174. selector: "inspectOn:",
  4175. fn: function (anInspector) {
  4176. var self = this;
  4177. var $1;
  4178. var label;
  4179. smalltalk.send(self, "_inspectOn_", [anInspector], smalltalk.CharacterArray);
  4180. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", []), "_size", []), "__gt", [30]);
  4181. if (smalltalk.assert($1)) {
  4182. label = smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", []), "_copyFrom_to_", [1, 30]), "__comma", ["...'"]);
  4183. } else {
  4184. label = smalltalk.send(self, "_printString", []);
  4185. }
  4186. smalltalk.send(anInspector, "_setLabel_", [label]);
  4187. return self;
  4188. }
  4189. }),
  4190. smalltalk.String);
  4191. smalltalk.addMethod(
  4192. "_inspectOn_",
  4193. smalltalk.method({
  4194. selector: "inspectOn:",
  4195. fn: function (anInspector) {
  4196. var self = this;
  4197. var $1;
  4198. var variables;
  4199. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4200. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4201. smalltalk.send(self['@elements'], "_withIndexDo_", [function (each, i) {return smalltalk.send(variables, "_at_put_", [i, each]);}]);
  4202. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4203. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4204. return self;
  4205. }
  4206. }),
  4207. smalltalk.Set);
  4208. smalltalk.addMethod(
  4209. "_inspectOn_",
  4210. smalltalk.method({
  4211. selector: "inspectOn:",
  4212. fn: function (anInspector) {
  4213. var self = this;
  4214. var $1;
  4215. var variables;
  4216. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4217. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4218. smalltalk.send(variables, "_at_put_", ["#year", smalltalk.send(self, "_year", [])]);
  4219. smalltalk.send(variables, "_at_put_", ["#month", smalltalk.send(self, "_month", [])]);
  4220. smalltalk.send(variables, "_at_put_", ["#day", smalltalk.send(self, "_day", [])]);
  4221. smalltalk.send(variables, "_at_put_", ["#hours", smalltalk.send(self, "_hours", [])]);
  4222. smalltalk.send(variables, "_at_put_", ["#minutes", smalltalk.send(self, "_minutes", [])]);
  4223. smalltalk.send(variables, "_at_put_", ["#seconds", smalltalk.send(self, "_seconds", [])]);
  4224. smalltalk.send(variables, "_at_put_", ["#milliseconds", smalltalk.send(self, "_milliseconds", [])]);
  4225. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4226. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4227. return self;
  4228. }
  4229. }),
  4230. smalltalk.Date);
  4231. smalltalk.addMethod(
  4232. "_inspectOn_",
  4233. smalltalk.method({
  4234. selector: "inspectOn:",
  4235. fn: function (anInspector) {
  4236. var self = this;
  4237. var $1;
  4238. var variables;
  4239. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4240. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4241. smalltalk.send(variables, "_at_put_", ["#year", smalltalk.send(self, "_year", [])]);
  4242. smalltalk.send(variables, "_at_put_", ["#month", smalltalk.send(self, "_month", [])]);
  4243. smalltalk.send(variables, "_at_put_", ["#day", smalltalk.send(self, "_day", [])]);
  4244. smalltalk.send(variables, "_at_put_", ["#hours", smalltalk.send(self, "_hours", [])]);
  4245. smalltalk.send(variables, "_at_put_", ["#minutes", smalltalk.send(self, "_minutes", [])]);
  4246. smalltalk.send(variables, "_at_put_", ["#seconds", smalltalk.send(self, "_seconds", [])]);
  4247. smalltalk.send(variables, "_at_put_", ["#milliseconds", smalltalk.send(self, "_milliseconds", [])]);
  4248. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4249. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4250. return self;
  4251. }
  4252. }),
  4253. smalltalk.Date);
  4254. smalltalk.addMethod(
  4255. "_inspectOn_",
  4256. smalltalk.method({
  4257. selector: "inspectOn:",
  4258. fn: function (anInspector) {
  4259. var self = this;
  4260. var $1;
  4261. var variables;
  4262. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4263. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4264. smalltalk.send(variables, "_at_put_", ["#home", smalltalk.send(self, "_home", [])]);
  4265. smalltalk.send(variables, "_at_put_", ["#receiver", smalltalk.send(self, "_receiver", [])]);
  4266. smalltalk.send(variables, "_at_put_", ["#selector", smalltalk.send(self, "_selector", [])]);
  4267. smalltalk.send(variables, "_at_put_", ["#temps", smalltalk.send(self, "_temps", [])]);
  4268. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_instanceVariableNames", []), "_do_", [function (each) {return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);}]);
  4269. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4270. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4271. return self;
  4272. }
  4273. }),
  4274. smalltalk.MethodContext);