1
0

IDE.js 270 KB

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