1
0

IDE.js 269 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008
  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: 'jtalk',
  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: 'jtalk',\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. smalltalk.send(self, "_disableSaveButton", []);
  1576. ((($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", []);})]));})]));
  1577. return self;},
  1578. args: [],
  1579. source: "compile\x0a self disableSaveButton.\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]]",
  1580. messageSends: ["disableSaveButton", "ifTrue:ifFalse:", "=", "ifNotNil:", "compileClassComment", "ifFalse:ifTrue:", "or:", "notNil", "compileDefinition", "compileMethodDefinition"],
  1581. referencedClasses: []
  1582. }),
  1583. smalltalk.Browser);
  1584. smalltalk.addMethod(
  1585. "_compileClassComment",
  1586. smalltalk.method({
  1587. selector: "compileClassComment",
  1588. category: 'actions',
  1589. fn: function (){
  1590. var self=this;
  1591. smalltalk.send(self['@selectedClass'], "_comment_", [smalltalk.send(self['@sourceArea'], "_val", [])]);
  1592. return self;},
  1593. args: [],
  1594. source: "compileClassComment\x0a selectedClass comment: sourceArea val",
  1595. messageSends: ["comment:", "val"],
  1596. referencedClasses: []
  1597. }),
  1598. smalltalk.Browser);
  1599. smalltalk.addMethod(
  1600. "_compileDefinition",
  1601. smalltalk.method({
  1602. selector: "compileDefinition",
  1603. category: 'actions',
  1604. fn: function (){
  1605. var self=this;
  1606. var newClass=nil;
  1607. (newClass=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_evaluateExpression_", [smalltalk.send(self['@sourceArea'], "_val", [])]));
  1608. (function($rec){smalltalk.send($rec, "_resetClassesList", []);smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);
  1609. smalltalk.send(self, "_selectClass_", [newClass]);
  1610. return self;},
  1611. args: [],
  1612. source: "compileDefinition\x0a | newClass |\x0a newClass := Compiler new evaluateExpression: sourceArea val.\x0a self \x0a\x09resetClassesList;\x0a\x09updateCategoriesList;\x0a\x09updateClassesList.\x0a self selectClass: newClass",
  1613. messageSends: ["evaluateExpression:", "new", "val", "resetClassesList", "updateCategoriesList", "updateClassesList", "selectClass:"],
  1614. referencedClasses: ["Compiler"]
  1615. }),
  1616. smalltalk.Browser);
  1617. smalltalk.addMethod(
  1618. "_compileMethodDefinition",
  1619. smalltalk.method({
  1620. selector: "compileMethodDefinition",
  1621. category: 'actions',
  1622. fn: function (){
  1623. var self=this;
  1624. ((($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", [])]);})]));
  1625. return self;},
  1626. args: [],
  1627. source: "compileMethodDefinition\x0a selectedTab = #instance\x0a\x09ifTrue: [self compileMethodDefinitionFor: selectedClass]\x0a\x09ifFalse: [self compileMethodDefinitionFor: selectedClass class]",
  1628. messageSends: ["ifTrue:ifFalse:", "=", "compileMethodDefinitionFor:", "class"],
  1629. referencedClasses: []
  1630. }),
  1631. smalltalk.Browser);
  1632. smalltalk.addMethod(
  1633. "_compileMethodDefinitionFor_",
  1634. smalltalk.method({
  1635. selector: "compileMethodDefinitionFor:",
  1636. category: 'actions',
  1637. fn: function (aClass){
  1638. var self=this;
  1639. var $early={};
  1640. try{var compiler=nil;
  1641. var method=nil;
  1642. var source=nil;
  1643. var node=nil;
  1644. (source=smalltalk.send(self['@sourceArea'], "_val", []));
  1645. (($receiver = self['@selectedProtocol']) == nil || $receiver == undefined) ? (function(){return (self['@selectedProtocol']=smalltalk.send(self['@selectedMethod'], "_category", []));})() : $receiver;
  1646. (compiler=smalltalk.send((smalltalk.Compiler || Compiler), "_new", []));
  1647. smalltalk.send(compiler, "_source_", [source]);
  1648. (node=smalltalk.send(compiler, "_parse_", [source]));
  1649. ((($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", [])])])]})();})]));
  1650. smalltalk.send(compiler, "_currentClass_", [aClass]);
  1651. (method=smalltalk.send(compiler, "_eval_", [smalltalk.send(compiler, "_compileNode_", [node])]));
  1652. smalltalk.send(method, "_category_", [self['@selectedProtocol']]);
  1653. 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;})]);
  1654. smalltalk.send(aClass, "_addCompiledMethod_", [method]);
  1655. smalltalk.send(compiler, "_setupClass_", [aClass]);
  1656. smalltalk.send(self, "_updateMethodsList", []);
  1657. smalltalk.send(self, "_selectMethod_", [method]);
  1658. return self;
  1659. } catch(e) {if(e===$early)return e[0]; throw e}},
  1660. args: ["aClass"],
  1661. 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",
  1662. 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:"],
  1663. referencedClasses: ["Compiler"]
  1664. }),
  1665. smalltalk.Browser);
  1666. smalltalk.addMethod(
  1667. "_copyClass",
  1668. smalltalk.method({
  1669. selector: "copyClass",
  1670. category: 'actions',
  1671. fn: function (){
  1672. var self=this;
  1673. var className=nil;
  1674. (className=smalltalk.send((typeof window == 'undefined' ? nil : window), "_prompt_", ["Copy class"]));
  1675. ((($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])]);})]));
  1676. return self;},
  1677. args: [],
  1678. 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)]",
  1679. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "copyClass:named:", "new", "selectedClass", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current"],
  1680. referencedClasses: ["ClassBuilder", "Smalltalk"]
  1681. }),
  1682. smalltalk.Browser);
  1683. smalltalk.addMethod(
  1684. "_declarationSource",
  1685. smalltalk.method({
  1686. selector: "declarationSource",
  1687. category: 'accessing',
  1688. fn: function (){
  1689. var self=this;
  1690. 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", []);})]));
  1691. return self;},
  1692. args: [],
  1693. source: "declarationSource\x0a ^selectedTab = #instance\x0a\x09ifTrue: [self classDeclarationSource]\x0a\x09ifFalse: [self metaclassDeclarationSource]",
  1694. messageSends: ["ifTrue:ifFalse:", "=", "classDeclarationSource", "metaclassDeclarationSource"],
  1695. referencedClasses: []
  1696. }),
  1697. smalltalk.Browser);
  1698. smalltalk.addMethod(
  1699. "_disableSaveButton",
  1700. smalltalk.method({
  1701. selector: "disableSaveButton",
  1702. category: 'actions',
  1703. fn: function (){
  1704. var self=this;
  1705. (($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);})() : nil;
  1706. (self['@unsavedChanges']=false);
  1707. return self;},
  1708. args: [],
  1709. source: "disableSaveButton\x0a saveButton ifNotNil: [\x0a\x09saveButton at: 'disabled' put: true].\x0a unsavedChanges := false",
  1710. messageSends: ["ifNotNil:", "at:put:"],
  1711. referencedClasses: []
  1712. }),
  1713. smalltalk.Browser);
  1714. smalltalk.addMethod(
  1715. "_dummyMethodSource",
  1716. smalltalk.method({
  1717. selector: "dummyMethodSource",
  1718. category: 'accessing',
  1719. fn: function (){
  1720. var self=this;
  1721. return "messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements";
  1722. return self;},
  1723. args: [],
  1724. source: "dummyMethodSource\x0a ^'messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements'",
  1725. messageSends: [],
  1726. referencedClasses: []
  1727. }),
  1728. smalltalk.Browser);
  1729. smalltalk.addMethod(
  1730. "_handleSourceAreaKeyDown_",
  1731. smalltalk.method({
  1732. selector: "handleSourceAreaKeyDown:",
  1733. category: 'actions',
  1734. fn: function (anEvent){
  1735. var self=this;
  1736. if(anEvent.ctrlKey) {
  1737. if(anEvent.keyCode === 83) { //ctrl+s
  1738. self._compile();
  1739. anEvent.preventDefault();
  1740. return false;
  1741. }
  1742. }
  1743. ;
  1744. return self;},
  1745. args: ["anEvent"],
  1746. 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>",
  1747. messageSends: [],
  1748. referencedClasses: []
  1749. }),
  1750. smalltalk.Browser);
  1751. smalltalk.addMethod(
  1752. "_hideClassButtons",
  1753. smalltalk.method({
  1754. selector: "hideClassButtons",
  1755. category: 'actions',
  1756. fn: function (){
  1757. var self=this;
  1758. smalltalk.send(smalltalk.send(self['@classButtons'], "_asJQuery", []), "_hide", []);
  1759. return self;},
  1760. args: [],
  1761. source: "hideClassButtons\x0a classButtons asJQuery hide",
  1762. messageSends: ["hide", "asJQuery"],
  1763. referencedClasses: []
  1764. }),
  1765. smalltalk.Browser);
  1766. smalltalk.addMethod(
  1767. "_hideMethodButtons",
  1768. smalltalk.method({
  1769. selector: "hideMethodButtons",
  1770. category: 'actions',
  1771. fn: function (){
  1772. var self=this;
  1773. smalltalk.send(smalltalk.send(self['@methodButtons'], "_asJQuery", []), "_hide", []);
  1774. return self;},
  1775. args: [],
  1776. source: "hideMethodButtons\x0a methodButtons asJQuery hide",
  1777. messageSends: ["hide", "asJQuery"],
  1778. referencedClasses: []
  1779. }),
  1780. smalltalk.Browser);
  1781. smalltalk.addMethod(
  1782. "_initialize",
  1783. smalltalk.method({
  1784. selector: "initialize",
  1785. category: 'initialization',
  1786. fn: function (){
  1787. var self=this;
  1788. smalltalk.send(self, "_initialize", [], smalltalk.Browser.superclass || nil);
  1789. (self['@selectedTab']=smalltalk.symbolFor("instance"));
  1790. (self['@selectedPackage']=smalltalk.send(smalltalk.send(self, "_packages", []), "_first", []));
  1791. (self['@unsavedChanges']=false);
  1792. return self;},
  1793. args: [],
  1794. source: "initialize\x0a super initialize.\x0a selectedTab := #instance.\x0a selectedPackage := self packages first.\x0a unsavedChanges := false",
  1795. messageSends: ["initialize", "first", "packages"],
  1796. referencedClasses: []
  1797. }),
  1798. smalltalk.Browser);
  1799. smalltalk.addMethod(
  1800. "_label",
  1801. smalltalk.method({
  1802. selector: "label",
  1803. category: 'accessing',
  1804. fn: function (){
  1805. var self=this;
  1806. return (($receiver = self['@selectedClass']) == nil || $receiver == undefined) ? (function(){return "Browser (nil)";})() : (function(){return smalltalk.send("Browser: ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])]);})();
  1807. return self;},
  1808. args: [],
  1809. source: "label\x0a ^selectedClass \x0a\x09ifNil: ['Browser (nil)']\x0a\x09ifNotNil: ['Browser: ', selectedClass name]",
  1810. messageSends: ["ifNil:ifNotNil:", ",", "name"],
  1811. referencedClasses: []
  1812. }),
  1813. smalltalk.Browser);
  1814. smalltalk.addMethod(
  1815. "_metaclassDeclarationSource",
  1816. smalltalk.method({
  1817. selector: "metaclassDeclarationSource",
  1818. category: 'accessing',
  1819. fn: function (){
  1820. var self=this;
  1821. var stream=nil;
  1822. (stream=smalltalk.send("", "_writeStream", []));
  1823. (($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;
  1824. return smalltalk.send(stream, "_contents", []);
  1825. return self;},
  1826. args: [],
  1827. 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",
  1828. messageSends: ["writeStream", "ifNotNil:", "nextPutAll:", "asString", "do:separatedBy:", "instanceVariableNames", "class", "contents"],
  1829. referencedClasses: []
  1830. }),
  1831. smalltalk.Browser);
  1832. smalltalk.addMethod(
  1833. "_methodSource",
  1834. smalltalk.method({
  1835. selector: "methodSource",
  1836. category: 'accessing',
  1837. fn: function (){
  1838. var self=this;
  1839. return (($receiver = self['@selectedMethod']) == nil || $receiver == undefined) ? (function(){return smalltalk.send(self, "_dummyMethodSource", []);})() : (function(){return smalltalk.send(self['@selectedMethod'], "_source", []);})();
  1840. return self;},
  1841. args: [],
  1842. source: "methodSource\x0a ^selectedMethod\x0a\x09ifNil: [self dummyMethodSource]\x0a\x09ifNotNil: [selectedMethod source]",
  1843. messageSends: ["ifNil:ifNotNil:", "dummyMethodSource", "source"],
  1844. referencedClasses: []
  1845. }),
  1846. smalltalk.Browser);
  1847. smalltalk.addMethod(
  1848. "_methods",
  1849. smalltalk.method({
  1850. selector: "methods",
  1851. category: 'accessing',
  1852. fn: function (){
  1853. var self=this;
  1854. var $early={};
  1855. try{var klass=nil;
  1856. ((($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=[[]]})();})]));
  1857. (($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;
  1858. 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", [])]));})]);
  1859. return self;
  1860. } catch(e) {if(e===$early)return e[0]; throw e}},
  1861. args: [],
  1862. 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]",
  1863. messageSends: ["ifTrue:", "=", "ifNotNil:", "ifTrue:ifFalse:", "class", "sort:", "ifNil:ifNotNil:", "values", "methodDictionary", "select:", "category", "<", "selector"],
  1864. referencedClasses: []
  1865. }),
  1866. smalltalk.Browser);
  1867. smalltalk.addMethod(
  1868. "_packages",
  1869. smalltalk.method({
  1870. selector: "packages",
  1871. category: 'accessing',
  1872. fn: function (){
  1873. var self=this;
  1874. var packages=nil;
  1875. (packages=smalltalk.send((smalltalk.Array || Array), "_new", []));
  1876. 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", [])]);})]));})]);
  1877. return smalltalk.send(packages, "_sort", []);
  1878. return self;},
  1879. args: [],
  1880. 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",
  1881. messageSends: ["new", "do:", "classes", "current", "ifFalse:", "includes:", "category", "add:", "sort"],
  1882. referencedClasses: ["Array", "Smalltalk"]
  1883. }),
  1884. smalltalk.Browser);
  1885. smalltalk.addMethod(
  1886. "_protocols",
  1887. smalltalk.method({
  1888. selector: "protocols",
  1889. category: 'accessing',
  1890. fn: function (){
  1891. var self=this;
  1892. var $early={};
  1893. try{var klass=nil;
  1894. (($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;
  1895. return smalltalk.send((smalltalk.Array || Array), "_new", []);
  1896. return self;
  1897. } catch(e) {if(e===$early)return e[0]; throw e}},
  1898. args: [],
  1899. 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",
  1900. messageSends: ["ifNotNil:", "ifTrue:", "=", "ifTrue:ifFalse:", "class", "isEmpty", "methodDictionary", "with:", "protocols", "new"],
  1901. referencedClasses: ["Array"]
  1902. }),
  1903. smalltalk.Browser);
  1904. smalltalk.addMethod(
  1905. "_removeClass",
  1906. smalltalk.method({
  1907. selector: "removeClass",
  1908. category: 'actions',
  1909. fn: function (){
  1910. var self=this;
  1911. ((($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]);})]));
  1912. return self;},
  1913. args: [],
  1914. 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]",
  1915. messageSends: ["ifTrue:", "confirm:", ",", "name", "removeClass:", "current", "resetClassesList", "selectClass:"],
  1916. referencedClasses: ["Smalltalk"]
  1917. }),
  1918. smalltalk.Browser);
  1919. smalltalk.addMethod(
  1920. "_removeMethod",
  1921. smalltalk.method({
  1922. selector: "removeMethod",
  1923. category: 'actions',
  1924. fn: function (){
  1925. var self=this;
  1926. ((($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]);})]));})]));
  1927. return self;},
  1928. args: [],
  1929. 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]]",
  1930. messageSends: ["ifTrue:", "cancelChanges", "confirm:", ",", "selector", "ifTrue:ifFalse:", "=", "removeCompiledMethod:", "class", "selectMethod:"],
  1931. referencedClasses: []
  1932. }),
  1933. smalltalk.Browser);
  1934. smalltalk.addMethod(
  1935. "_removePackage",
  1936. smalltalk.method({
  1937. selector: "removePackage",
  1938. category: 'actions',
  1939. fn: function (){
  1940. var self=this;
  1941. ((($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", []);})]));
  1942. return self;},
  1943. args: [],
  1944. 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]",
  1945. messageSends: ["ifTrue:", "confirm:", ",", "removePackage:", "current", "updateCategoriesList"],
  1946. referencedClasses: ["Smalltalk"]
  1947. }),
  1948. smalltalk.Browser);
  1949. smalltalk.addMethod(
  1950. "_renameClass",
  1951. smalltalk.method({
  1952. selector: "renameClass",
  1953. category: 'actions',
  1954. fn: function (){
  1955. var self=this;
  1956. var newName=nil;
  1957. (newName=smalltalk.send((typeof window == 'undefined' ? nil : window), "_prompt_", [smalltalk.send("Rename class ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])])]));
  1958. ((($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);})]));
  1959. return self;},
  1960. args: [],
  1961. 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]",
  1962. messageSends: ["prompt:", ",", "name", "ifTrue:", "and:", "notNil", "notEmpty", "rename:", "updateClassesList", "updateSourceAndButtons"],
  1963. referencedClasses: []
  1964. }),
  1965. smalltalk.Browser);
  1966. smalltalk.addMethod(
  1967. "_renamePackage",
  1968. smalltalk.method({
  1969. selector: "renamePackage",
  1970. category: 'actions',
  1971. fn: function (){
  1972. var self=this;
  1973. var newName=nil;
  1974. (newName=smalltalk.send((typeof window == 'undefined' ? nil : window), "_prompt_", [smalltalk.send("Rename package ", "__comma", [self['@selectedPackage']])]));
  1975. (($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;
  1976. return self;},
  1977. args: [],
  1978. 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]]",
  1979. messageSends: ["prompt:", ",", "ifNotNil:", "ifTrue:", "notEmpty", "renamePackage:to:", "current", "updateCategoriesList"],
  1980. referencedClasses: ["Smalltalk"]
  1981. }),
  1982. smalltalk.Browser);
  1983. smalltalk.addMethod(
  1984. "_renderBottomPanelOn_",
  1985. smalltalk.method({
  1986. selector: "renderBottomPanelOn:",
  1987. category: 'rendering',
  1988. fn: function (html){
  1989. var self=this;
  1990. (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", []));
  1991. return self;},
  1992. args: ["html"],
  1993. 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]]",
  1994. messageSends: ["class:", "with:", "new", "renderOn:", "onKeyDown:", "handleSourceAreaKeyDown:", "onKeyUp:", "updateStatus", "div"],
  1995. referencedClasses: ["SourceArea"]
  1996. }),
  1997. smalltalk.Browser);
  1998. smalltalk.addMethod(
  1999. "_renderBoxOn_",
  2000. smalltalk.method({
  2001. selector: "renderBoxOn:",
  2002. category: 'rendering',
  2003. fn: function (html){
  2004. var self=this;
  2005. (function($rec){smalltalk.send($rec, "_renderTopPanelOn_", [html]);smalltalk.send($rec, "_renderTabsOn_", [html]);return smalltalk.send($rec, "_renderBottomPanelOn_", [html]);})(self);
  2006. return self;},
  2007. args: ["html"],
  2008. source: "renderBoxOn: html\x0a self \x0a\x09renderTopPanelOn: html;\x0a\x09renderTabsOn: html;\x0a\x09renderBottomPanelOn: html",
  2009. messageSends: ["renderTopPanelOn:", "renderTabsOn:", "renderBottomPanelOn:"],
  2010. referencedClasses: []
  2011. }),
  2012. smalltalk.Browser);
  2013. smalltalk.addMethod(
  2014. "_renderButtonsOn_",
  2015. smalltalk.method({
  2016. selector: "renderButtonsOn:",
  2017. category: 'rendering',
  2018. fn: function (html){
  2019. var self=this;
  2020. (self['@saveButton']=smalltalk.send(html, "_button", []));
  2021. (function($rec){smalltalk.send($rec, "_with_", ["Save"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_compile", []);})]);})(self['@saveButton']);
  2022. (self['@methodButtons']=smalltalk.send(html, "_span", []));
  2023. (self['@classButtons']=smalltalk.send(html, "_span", []));
  2024. (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", []));
  2025. smalltalk.send(self, "_updateSourceAndButtons", []);
  2026. return self;},
  2027. args: ["html"],
  2028. 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",
  2029. messageSends: ["button", "with:", "onClick:", "compile", "span", "class:", "doIt", "printIt", "inspectIt", "div", "updateSourceAndButtons"],
  2030. referencedClasses: []
  2031. }),
  2032. smalltalk.Browser);
  2033. smalltalk.addMethod(
  2034. "_renderTabsOn_",
  2035. smalltalk.method({
  2036. selector: "renderTabsOn:",
  2037. category: 'rendering',
  2038. fn: function (html){
  2039. var self=this;
  2040. (self['@tabsList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_tabs amber_browser"]));
  2041. smalltalk.send(self, "_updateTabsList", []);
  2042. return self;},
  2043. args: ["html"],
  2044. source: "renderTabsOn: html\x0a tabsList := html ul class: 'amber_tabs amber_browser'.\x0a self updateTabsList.",
  2045. messageSends: ["class:", "ul", "updateTabsList"],
  2046. referencedClasses: []
  2047. }),
  2048. smalltalk.Browser);
  2049. smalltalk.addMethod(
  2050. "_renderTopPanelOn_",
  2051. smalltalk.method({
  2052. selector: "renderTopPanelOn:",
  2053. category: 'rendering',
  2054. fn: function (html){
  2055. var self=this;
  2056. (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", []));
  2057. return self;},
  2058. args: ["html"],
  2059. 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']",
  2060. messageSends: ["class:", "with:", "ul", "title:", "onClick:", "commitPackage", "button", "renamePackage", "removePackage", "div", "on:", "renderOn:", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList"],
  2061. referencedClasses: ["ClassesList"]
  2062. }),
  2063. smalltalk.Browser);
  2064. smalltalk.addMethod(
  2065. "_resetClassesList",
  2066. smalltalk.method({
  2067. selector: "resetClassesList",
  2068. category: 'updating',
  2069. fn: function (){
  2070. var self=this;
  2071. smalltalk.send(self['@classesList'], "_resetNodes", []);
  2072. return self;},
  2073. args: [],
  2074. source: "resetClassesList\x0a\x09classesList resetNodes",
  2075. messageSends: ["resetNodes"],
  2076. referencedClasses: []
  2077. }),
  2078. smalltalk.Browser);
  2079. smalltalk.addMethod(
  2080. "_search_",
  2081. smalltalk.method({
  2082. selector: "search:",
  2083. category: 'actions',
  2084. fn: function (aString){
  2085. var self=this;
  2086. ((($receiver = smalltalk.send(self, "_cancelChanges", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var searchedClass=nil;
  2087. (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;
  2088. (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]);})]));})]));
  2089. return self;},
  2090. args: ["aString"],
  2091. 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]]",
  2092. messageSends: ["ifTrue:", "cancelChanges", "at:", "current", "ifTrue:ifFalse:", "isClass", "openOn:", "class", "searchReferencesOf:"],
  2093. referencedClasses: ["Smalltalk"]
  2094. }),
  2095. smalltalk.Browser);
  2096. smalltalk.addMethod(
  2097. "_searchClassReferences",
  2098. smalltalk.method({
  2099. selector: "searchClassReferences",
  2100. category: 'actions',
  2101. fn: function (){
  2102. var self=this;
  2103. smalltalk.send((smalltalk.ReferencesBrowser || ReferencesBrowser), "_search_", [smalltalk.send(self['@selectedClass'], "_name", [])]);
  2104. return self;},
  2105. args: [],
  2106. source: "searchClassReferences\x0a\x09ReferencesBrowser search: selectedClass name",
  2107. messageSends: ["search:", "name"],
  2108. referencedClasses: ["ReferencesBrowser"]
  2109. }),
  2110. smalltalk.Browser);
  2111. smalltalk.addMethod(
  2112. "_searchReferencesOf_",
  2113. smalltalk.method({
  2114. selector: "searchReferencesOf:",
  2115. category: 'actions',
  2116. fn: function (aString){
  2117. var self=this;
  2118. smalltalk.send((smalltalk.ReferencesBrowser || ReferencesBrowser), "_search_", [aString]);
  2119. return self;},
  2120. args: ["aString"],
  2121. source: "searchReferencesOf: aString\x0a\x09ReferencesBrowser search: aString",
  2122. messageSends: ["search:"],
  2123. referencedClasses: ["ReferencesBrowser"]
  2124. }),
  2125. smalltalk.Browser);
  2126. smalltalk.addMethod(
  2127. "_selectCategory_",
  2128. smalltalk.method({
  2129. selector: "selectCategory:",
  2130. category: 'actions',
  2131. fn: function (aCategory){
  2132. var self=this;
  2133. ((($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);})]));
  2134. return self;},
  2135. args: ["aCategory"],
  2136. 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]",
  2137. messageSends: ["ifTrue:", "cancelChanges", "resetClassesList", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  2138. referencedClasses: []
  2139. }),
  2140. smalltalk.Browser);
  2141. smalltalk.addMethod(
  2142. "_selectClass_",
  2143. smalltalk.method({
  2144. selector: "selectClass:",
  2145. category: 'actions',
  2146. fn: function (aClass){
  2147. var self=this;
  2148. ((($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);})]));
  2149. return self;},
  2150. args: ["aClass"],
  2151. 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]",
  2152. messageSends: ["ifTrue:", "cancelChanges", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  2153. referencedClasses: []
  2154. }),
  2155. smalltalk.Browser);
  2156. smalltalk.addMethod(
  2157. "_selectMethod_",
  2158. smalltalk.method({
  2159. selector: "selectMethod:",
  2160. category: 'actions',
  2161. fn: function (aMethod){
  2162. var self=this;
  2163. ((($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);})]));
  2164. return self;},
  2165. args: ["aMethod"],
  2166. source: "selectMethod: aMethod\x0a self cancelChanges ifTrue: [\x0a\x09selectedMethod := aMethod.\x0a\x09self \x0a\x09 updateProtocolsList;\x0a\x09 updateMethodsList;\x0a\x09 updateSourceAndButtons]",
  2167. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  2168. referencedClasses: []
  2169. }),
  2170. smalltalk.Browser);
  2171. smalltalk.addMethod(
  2172. "_selectProtocol_",
  2173. smalltalk.method({
  2174. selector: "selectProtocol:",
  2175. category: 'actions',
  2176. fn: function (aString){
  2177. var self=this;
  2178. ((($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);})]));
  2179. return self;},
  2180. args: ["aString"],
  2181. source: "selectProtocol: aString\x0a self cancelChanges ifTrue: [\x0a\x09selectedProtocol := aString.\x0a\x09selectedMethod := nil.\x0a\x09self \x0a\x09 updateProtocolsList;\x0a\x09 updateMethodsList;\x0a\x09 updateSourceAndButtons]",
  2182. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  2183. referencedClasses: []
  2184. }),
  2185. smalltalk.Browser);
  2186. smalltalk.addMethod(
  2187. "_selectTab_",
  2188. smalltalk.method({
  2189. selector: "selectTab:",
  2190. category: 'actions',
  2191. fn: function (aString){
  2192. var self=this;
  2193. ((($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", []);})]));
  2194. return self;},
  2195. args: ["aString"],
  2196. source: "selectTab: aString\x0a self cancelChanges ifTrue: [\x0a\x09selectedTab := aString.\x0a\x09self selectProtocol: nil.\x0a\x09self updateTabsList]",
  2197. messageSends: ["ifTrue:", "cancelChanges", "selectProtocol:", "updateTabsList"],
  2198. referencedClasses: []
  2199. }),
  2200. smalltalk.Browser);
  2201. smalltalk.addMethod(
  2202. "_selectedClass",
  2203. smalltalk.method({
  2204. selector: "selectedClass",
  2205. category: 'accessing',
  2206. fn: function (){
  2207. var self=this;
  2208. return self['@selectedClass'];
  2209. return self;},
  2210. args: [],
  2211. source: "selectedClass\x0a\x09^selectedClass",
  2212. messageSends: [],
  2213. referencedClasses: []
  2214. }),
  2215. smalltalk.Browser);
  2216. smalltalk.addMethod(
  2217. "_selectedPackage",
  2218. smalltalk.method({
  2219. selector: "selectedPackage",
  2220. category: 'accessing',
  2221. fn: function (){
  2222. var self=this;
  2223. return self['@selectedPackage'];
  2224. return self;},
  2225. args: [],
  2226. source: "selectedPackage\x0a\x09^selectedPackage",
  2227. messageSends: [],
  2228. referencedClasses: []
  2229. }),
  2230. smalltalk.Browser);
  2231. smalltalk.addMethod(
  2232. "_setMethodProtocol_",
  2233. smalltalk.method({
  2234. selector: "setMethodProtocol:",
  2235. category: 'actions',
  2236. fn: function (aString){
  2237. var self=this;
  2238. ((($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);})]));})]));
  2239. return self;},
  2240. args: ["aString"],
  2241. 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]]",
  2242. messageSends: ["ifTrue:", "cancelChanges", "ifFalse:ifTrue:", "includes:", "protocols", "addNewProtocol", "category:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  2243. referencedClasses: []
  2244. }),
  2245. smalltalk.Browser);
  2246. smalltalk.addMethod(
  2247. "_showClassButtons",
  2248. smalltalk.method({
  2249. selector: "showClassButtons",
  2250. category: 'actions',
  2251. fn: function (){
  2252. var self=this;
  2253. smalltalk.send(smalltalk.send(self['@classButtons'], "_asJQuery", []), "_show", []);
  2254. return self;},
  2255. args: [],
  2256. source: "showClassButtons\x0a classButtons asJQuery show",
  2257. messageSends: ["show", "asJQuery"],
  2258. referencedClasses: []
  2259. }),
  2260. smalltalk.Browser);
  2261. smalltalk.addMethod(
  2262. "_showMethodButtons",
  2263. smalltalk.method({
  2264. selector: "showMethodButtons",
  2265. category: 'actions',
  2266. fn: function (){
  2267. var self=this;
  2268. smalltalk.send(smalltalk.send(self['@methodButtons'], "_asJQuery", []), "_show", []);
  2269. return self;},
  2270. args: [],
  2271. source: "showMethodButtons\x0a methodButtons asJQuery show",
  2272. messageSends: ["show", "asJQuery"],
  2273. referencedClasses: []
  2274. }),
  2275. smalltalk.Browser);
  2276. smalltalk.addMethod(
  2277. "_source",
  2278. smalltalk.method({
  2279. selector: "source",
  2280. category: 'accessing',
  2281. fn: function (){
  2282. var self=this;
  2283. var $early={};
  2284. 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", []);})]))]})();})]));
  2285. return (($receiver = self['@selectedClass']) == nil || $receiver == undefined) ? (function(){return "";})() : (function(){return smalltalk.send(self, "_classCommentSource", []);})();
  2286. return self;
  2287. } catch(e) {if(e===$early)return e[0]; throw e}},
  2288. args: [],
  2289. 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]",
  2290. messageSends: ["ifFalse:", "=", "ifFalse:ifTrue:", "or:", "notNil", "declarationSource", "methodSource", "ifNil:ifNotNil:", "classCommentSource"],
  2291. referencedClasses: []
  2292. }),
  2293. smalltalk.Browser);
  2294. smalltalk.addMethod(
  2295. "_updateCategoriesList",
  2296. smalltalk.method({
  2297. selector: "updateCategoriesList",
  2298. category: 'updating',
  2299. fn: function (){
  2300. var self=this;
  2301. smalltalk.send(self['@packagesList'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(self, "_packages", []), "_do_", [(function(each){var li=nil;
  2302. var label=nil;
  2303. ((($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);})]);})]);
  2304. return self;},
  2305. args: [],
  2306. 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]]]",
  2307. messageSends: ["contents:", "do:", "packages", "ifTrue:ifFalse:", "isEmpty", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectCategory:"],
  2308. referencedClasses: []
  2309. }),
  2310. smalltalk.Browser);
  2311. smalltalk.addMethod(
  2312. "_updateClassesList",
  2313. smalltalk.method({
  2314. selector: "updateClassesList",
  2315. category: 'updating',
  2316. fn: function (){
  2317. var self=this;
  2318. smalltalk.send(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []), "_update", []);
  2319. smalltalk.send(self['@classesList'], "_updateNodes", []);
  2320. return self;},
  2321. args: [],
  2322. source: "updateClassesList\x0a TabManager current update.\x0a classesList updateNodes",
  2323. messageSends: ["update", "current", "updateNodes"],
  2324. referencedClasses: ["TabManager"]
  2325. }),
  2326. smalltalk.Browser);
  2327. smalltalk.addMethod(
  2328. "_updateMethodsList",
  2329. smalltalk.method({
  2330. selector: "updateMethodsList",
  2331. category: 'updating',
  2332. fn: function (){
  2333. var self=this;
  2334. smalltalk.send(self['@methodsList'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(self, "_methods", []), "_do_", [(function(each){var li=nil;
  2335. (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);})]);})]);
  2336. return self;},
  2337. args: [],
  2338. 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]]]",
  2339. messageSends: ["contents:", "do:", "methods", "li", "ifTrue:", "=", "class:", "with:", "selector", "onClick:", "selectMethod:"],
  2340. referencedClasses: []
  2341. }),
  2342. smalltalk.Browser);
  2343. smalltalk.addMethod(
  2344. "_updateProtocolsList",
  2345. smalltalk.method({
  2346. selector: "updateProtocolsList",
  2347. category: 'updating',
  2348. fn: function (){
  2349. var self=this;
  2350. smalltalk.send(self['@protocolsList'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [(function(each){var li=nil;
  2351. (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);})]);})]);
  2352. return self;},
  2353. args: [],
  2354. 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]]]",
  2355. messageSends: ["contents:", "do:", "protocols", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectProtocol:"],
  2356. referencedClasses: []
  2357. }),
  2358. smalltalk.Browser);
  2359. smalltalk.addMethod(
  2360. "_updateSourceAndButtons",
  2361. smalltalk.method({
  2362. selector: "updateSourceAndButtons",
  2363. category: 'updating',
  2364. fn: function (){
  2365. var self=this;
  2366. smalltalk.send(self, "_disableSaveButton", []);
  2367. 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", []));})]);
  2368. smalltalk.send(self['@methodButtons'], "_contents_", [(function(html){var protocolSelect=nil;
  2369. var referencesSelect=nil;
  2370. (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;
  2371. (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;
  2372. (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);})]));})]);
  2373. ((($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", []);})]));
  2374. smalltalk.send(self['@sourceArea'], "_val_", [smalltalk.send(self, "_source", [])]);
  2375. return self;},
  2376. args: [],
  2377. 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",
  2378. 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"],
  2379. referencedClasses: []
  2380. }),
  2381. smalltalk.Browser);
  2382. smalltalk.addMethod(
  2383. "_updateStatus",
  2384. smalltalk.method({
  2385. selector: "updateStatus",
  2386. category: 'updating',
  2387. fn: function (){
  2388. var self=this;
  2389. ((($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);})]));
  2390. return self;},
  2391. args: [],
  2392. 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]",
  2393. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"],
  2394. referencedClasses: []
  2395. }),
  2396. smalltalk.Browser);
  2397. smalltalk.addMethod(
  2398. "_updateTabsList",
  2399. smalltalk.method({
  2400. selector: "updateTabsList",
  2401. category: 'updating',
  2402. fn: function (){
  2403. var self=this;
  2404. smalltalk.send(self['@tabsList'], "_contents_", [(function(html){var li=nil;
  2405. (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);})]);
  2406. return self;},
  2407. args: [],
  2408. 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]]",
  2409. messageSends: ["contents:", "li", "ifTrue:", "=", "class:", "with:", "span", "onClick:", "selectTab:"],
  2410. referencedClasses: []
  2411. }),
  2412. smalltalk.Browser);
  2413. smalltalk.addMethod(
  2414. "_commitPathJs",
  2415. smalltalk.method({
  2416. selector: "commitPathJs",
  2417. category: 'accessing',
  2418. fn: function (){
  2419. var self=this;
  2420. return "js";
  2421. return self;},
  2422. args: [],
  2423. source: "commitPathJs\x0a\x09^'js'",
  2424. messageSends: [],
  2425. referencedClasses: []
  2426. }),
  2427. smalltalk.Browser.klass);
  2428. smalltalk.addMethod(
  2429. "_commitPathSt",
  2430. smalltalk.method({
  2431. selector: "commitPathSt",
  2432. category: 'accessing',
  2433. fn: function (){
  2434. var self=this;
  2435. return "st";
  2436. return self;},
  2437. args: [],
  2438. source: "commitPathSt\x0a\x09^'st'",
  2439. messageSends: [],
  2440. referencedClasses: []
  2441. }),
  2442. smalltalk.Browser.klass);
  2443. smalltalk.addMethod(
  2444. "_open",
  2445. smalltalk.method({
  2446. selector: "open",
  2447. category: 'convenience',
  2448. fn: function (){
  2449. var self=this;
  2450. smalltalk.send(smalltalk.send(self, "_new", []), "_open", []);
  2451. return self;},
  2452. args: [],
  2453. source: "open\x0a self new open",
  2454. messageSends: ["open", "new"],
  2455. referencedClasses: []
  2456. }),
  2457. smalltalk.Browser.klass);
  2458. smalltalk.addMethod(
  2459. "_openOn_",
  2460. smalltalk.method({
  2461. selector: "openOn:",
  2462. category: 'convenience',
  2463. fn: function (aClass){
  2464. var self=this;
  2465. 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", []));
  2466. return self;},
  2467. args: ["aClass"],
  2468. source: "openOn: aClass\x0a ^self new\x0a\x09open;\x0a\x09selectCategory: aClass category;\x0a\x09selectClass: aClass",
  2469. messageSends: ["open", "selectCategory:", "category", "selectClass:", "new"],
  2470. referencedClasses: []
  2471. }),
  2472. smalltalk.Browser.klass);
  2473. smalltalk.addClass('Debugger', smalltalk.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  2474. smalltalk.addMethod(
  2475. "_arguments",
  2476. smalltalk.method({
  2477. selector: "arguments",
  2478. category: 'accessing',
  2479. fn: function (){
  2480. var self=this;
  2481. 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", []);})();
  2482. return self;},
  2483. args: [],
  2484. source: "arguments\x0a\x09^self method \x0a\x09\x09ifNil: [selectedContext temps collect: [:each | nil]]\x0a\x09\x09ifNotNil: [self method arguments]",
  2485. messageSends: ["ifNil:ifNotNil:", "method", "collect:", "temps", "arguments"],
  2486. referencedClasses: []
  2487. }),
  2488. smalltalk.Debugger);
  2489. smalltalk.addMethod(
  2490. "_canBeClosed",
  2491. smalltalk.method({
  2492. selector: "canBeClosed",
  2493. category: 'testing',
  2494. fn: function (){
  2495. var self=this;
  2496. return true;
  2497. return self;},
  2498. args: [],
  2499. source: "canBeClosed\x0a ^true",
  2500. messageSends: [],
  2501. referencedClasses: []
  2502. }),
  2503. smalltalk.Debugger);
  2504. smalltalk.addMethod(
  2505. "_error",
  2506. smalltalk.method({
  2507. selector: "error",
  2508. category: 'accessing',
  2509. fn: function (){
  2510. var self=this;
  2511. return self['@error'];
  2512. return self;},
  2513. args: [],
  2514. source: "error\x0a\x09^error",
  2515. messageSends: [],
  2516. referencedClasses: []
  2517. }),
  2518. smalltalk.Debugger);
  2519. smalltalk.addMethod(
  2520. "_error_",
  2521. smalltalk.method({
  2522. selector: "error:",
  2523. category: 'accessing',
  2524. fn: function (anError){
  2525. var self=this;
  2526. (self['@error']=anError);
  2527. return self;},
  2528. args: ["anError"],
  2529. source: "error: anError\x0a\x09error := anError",
  2530. messageSends: [],
  2531. referencedClasses: []
  2532. }),
  2533. smalltalk.Debugger);
  2534. smalltalk.addMethod(
  2535. "_initialize",
  2536. smalltalk.method({
  2537. selector: "initialize",
  2538. category: 'initialization',
  2539. fn: function (){
  2540. var self=this;
  2541. smalltalk.send(self, "_initialize", [], smalltalk.Debugger.superclass || nil);
  2542. smalltalk.send(self['@unsavedChanges'], "__eq", [false]);
  2543. return self;},
  2544. args: [],
  2545. source: "initialize\x0a\x09super initialize.\x0a\x09unsavedChanges = false",
  2546. messageSends: ["initialize", "="],
  2547. referencedClasses: []
  2548. }),
  2549. smalltalk.Debugger);
  2550. smalltalk.addMethod(
  2551. "_inspectSelectedVariable",
  2552. smalltalk.method({
  2553. selector: "inspectSelectedVariable",
  2554. category: 'actions',
  2555. fn: function (){
  2556. var self=this;
  2557. smalltalk.send(self['@selectedVariable'], "_inspect", []);
  2558. return self;},
  2559. args: [],
  2560. source: "inspectSelectedVariable\x0a\x09selectedVariable inspect",
  2561. messageSends: ["inspect"],
  2562. referencedClasses: []
  2563. }),
  2564. smalltalk.Debugger);
  2565. smalltalk.addMethod(
  2566. "_label",
  2567. smalltalk.method({
  2568. selector: "label",
  2569. category: 'accessing',
  2570. fn: function (){
  2571. var self=this;
  2572. return "[Debugger]";
  2573. return self;},
  2574. args: [],
  2575. source: "label\x0a\x09^'[Debugger]'",
  2576. messageSends: [],
  2577. referencedClasses: []
  2578. }),
  2579. smalltalk.Debugger);
  2580. smalltalk.addMethod(
  2581. "_method",
  2582. smalltalk.method({
  2583. selector: "method",
  2584. category: 'accessing',
  2585. fn: function (){
  2586. var self=this;
  2587. return smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_methodAt_", [smalltalk.send(self['@selectedContext'], "_selector", [])]);
  2588. return self;},
  2589. args: [],
  2590. source: "method\x0a\x09^selectedContext receiver class methodAt: selectedContext selector",
  2591. messageSends: ["methodAt:", "class", "receiver", "selector"],
  2592. referencedClasses: []
  2593. }),
  2594. smalltalk.Debugger);
  2595. smalltalk.addMethod(
  2596. "_proceed",
  2597. smalltalk.method({
  2598. selector: "proceed",
  2599. category: 'actions',
  2600. fn: function (){
  2601. var self=this;
  2602. smalltalk.send(self, "_close", []);
  2603. smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_perform_withArguments_", [smalltalk.send(self['@selectedContext'], "_selector", []), smalltalk.send(self['@selectedContext'], "_temps", [])]);
  2604. return self;},
  2605. args: [],
  2606. source: "proceed\x0a\x09self close.\x0a\x09selectedContext receiver perform: selectedContext selector withArguments: selectedContext temps",
  2607. messageSends: ["close", "perform:withArguments:", "receiver", "selector", "temps"],
  2608. referencedClasses: []
  2609. }),
  2610. smalltalk.Debugger);
  2611. smalltalk.addMethod(
  2612. "_receiver",
  2613. smalltalk.method({
  2614. selector: "receiver",
  2615. category: 'accessing',
  2616. fn: function (){
  2617. var self=this;
  2618. return smalltalk.send(self['@selectedContext'], "_receiver", []);
  2619. return self;},
  2620. args: [],
  2621. source: "receiver\x0a\x09^selectedContext receiver",
  2622. messageSends: ["receiver"],
  2623. referencedClasses: []
  2624. }),
  2625. smalltalk.Debugger);
  2626. smalltalk.addMethod(
  2627. "_renderBottomPanelOn_",
  2628. smalltalk.method({
  2629. selector: "renderBottomPanelOn:",
  2630. category: 'rendering',
  2631. fn: function (html){
  2632. var self=this;
  2633. (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", []));
  2634. (self['@ul2']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column debugger variables"]));
  2635. (self['@inspector']=smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["amber_column debugger inspector"]));
  2636. smalltalk.send(self['@sourceArea'], "_onKeyUp_", [(function(){return smalltalk.send(self, "_updateStatus", []);})]);
  2637. return self;},
  2638. args: ["html"],
  2639. 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]",
  2640. messageSends: ["class:", "with:", "new", "renderOn:", "div", "ul", "onKeyUp:", "updateStatus"],
  2641. referencedClasses: ["SourceArea"]
  2642. }),
  2643. smalltalk.Debugger);
  2644. smalltalk.addMethod(
  2645. "_renderBoxOn_",
  2646. smalltalk.method({
  2647. selector: "renderBoxOn:",
  2648. category: 'rendering',
  2649. fn: function (html){
  2650. var self=this;
  2651. (function($rec){smalltalk.send($rec, "_renderTopPanelOn_", [html]);return smalltalk.send($rec, "_renderBottomPanelOn_", [html]);})(self);
  2652. return self;},
  2653. args: ["html"],
  2654. source: "renderBoxOn: html\x0a self \x0a\x09renderTopPanelOn: html;\x0a\x09renderBottomPanelOn: html",
  2655. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"],
  2656. referencedClasses: []
  2657. }),
  2658. smalltalk.Debugger);
  2659. smalltalk.addMethod(
  2660. "_renderButtonsOn_",
  2661. smalltalk.method({
  2662. selector: "renderButtonsOn:",
  2663. category: 'rendering',
  2664. fn: function (html){
  2665. var self=this;
  2666. (self['@saveButton']=(function($rec){smalltalk.send($rec, "_with_", ["Save"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_save", []);})]);})(smalltalk.send(html, "_button", [])));
  2667. (function($rec){smalltalk.send($rec, "_with_", ["DoIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self['@sourceArea'], "_doIt", []);})]);})(smalltalk.send(html, "_button", []));
  2668. (function($rec){smalltalk.send($rec, "_with_", ["PrintIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self['@sourceArea'], "_printIt", []);})]);})(smalltalk.send(html, "_button", []));
  2669. (function($rec){smalltalk.send($rec, "_with_", ["InspectIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self['@sourceArea'], "_inspectIt", []);})]);})(smalltalk.send(html, "_button", []));
  2670. (function($rec){smalltalk.send($rec, "_with_", ["Proceed"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_proceed", []);})]);})(smalltalk.send(html, "_button", []));
  2671. (function($rec){smalltalk.send($rec, "_with_", ["Abandon"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_close", []);})]);})(smalltalk.send(html, "_button", []));
  2672. (self['@inspectButton']=(function($rec){smalltalk.send($rec, "_class_", ["jt_button debugger inspect"]);smalltalk.send($rec, "_with_", ["Inspect"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_inspectSelectedVariable", []);})]);})(smalltalk.send(html, "_button", [])));
  2673. (function($rec){smalltalk.send($rec, "_updateSourceArea", []);smalltalk.send($rec, "_updateStatus", []);smalltalk.send($rec, "_updateVariablesList", []);return smalltalk.send($rec, "_updateInspector", []);})(self);
  2674. return self;},
  2675. args: ["html"],
  2676. 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: 'jt_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",
  2677. messageSends: ["with:", "onClick:", "save", "button", "doIt", "printIt", "inspectIt", "proceed", "close", "class:", "inspectSelectedVariable", "updateSourceArea", "updateStatus", "updateVariablesList", "updateInspector"],
  2678. referencedClasses: []
  2679. }),
  2680. smalltalk.Debugger);
  2681. smalltalk.addMethod(
  2682. "_renderContext_on_",
  2683. smalltalk.method({
  2684. selector: "renderContext:on:",
  2685. category: 'rendering',
  2686. fn: function (aContext, html){
  2687. var self=this;
  2688. var li=nil;
  2689. (li=smalltalk.send(html, "_li", []));
  2690. ((($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"]);})]));
  2691. (function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(aContext, "_asString", [])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectContext_", [aContext]);})]);})(li);
  2692. (($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_renderContext_on_", [smalltalk.send(aContext, "_home", []), html]);})() : nil;
  2693. return self;},
  2694. args: ["aContext", "html"],
  2695. 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]",
  2696. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "asString", "onClick:", "selectContext:", "ifNotNil:", "home", "renderContext:on:"],
  2697. referencedClasses: []
  2698. }),
  2699. smalltalk.Debugger);
  2700. smalltalk.addMethod(
  2701. "_renderTopPanelOn_",
  2702. smalltalk.method({
  2703. selector: "renderTopPanelOn:",
  2704. category: 'rendering',
  2705. fn: function (html){
  2706. var self=this;
  2707. (self['@selectedContext']=smalltalk.send(smalltalk.send(self, "_error", []), "_context", []));
  2708. (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", []));
  2709. return self;},
  2710. args: ["html"],
  2711. 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]]",
  2712. messageSends: ["context", "error", "class:", "with:", "messageText", "div", "renderContext:on:", "ul"],
  2713. referencedClasses: []
  2714. }),
  2715. smalltalk.Debugger);
  2716. smalltalk.addMethod(
  2717. "_save",
  2718. smalltalk.method({
  2719. selector: "save",
  2720. category: 'actions',
  2721. fn: function (){
  2722. var self=this;
  2723. var protocol=nil;
  2724. (protocol=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_methodDictionary", []), "_at_", [smalltalk.send(self['@selectedContext'], "_selector", [])]), "_category", []));
  2725. smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_compile_category_", [smalltalk.send(self['@sourceArea'], "_val", []), protocol]);
  2726. smalltalk.send(self, "_updateStatus", []);
  2727. return self;},
  2728. args: [],
  2729. 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",
  2730. messageSends: ["category", "at:", "methodDictionary", "class", "receiver", "selector", "compile:category:", "val", "updateStatus"],
  2731. referencedClasses: []
  2732. }),
  2733. smalltalk.Debugger);
  2734. smalltalk.addMethod(
  2735. "_selectContext_",
  2736. smalltalk.method({
  2737. selector: "selectContext:",
  2738. category: 'actions',
  2739. fn: function (aContext){
  2740. var self=this;
  2741. (self['@selectedContext']=aContext);
  2742. (self['@selectedVariable']=nil);
  2743. (self['@selectedVariableName']=nil);
  2744. (function($rec){smalltalk.send($rec, "_updateContextsList", []);smalltalk.send($rec, "_updateSourceArea", []);smalltalk.send($rec, "_updateInspector", []);smalltalk.send($rec, "_updateVariablesList", []);return smalltalk.send($rec, "_updateStatus", []);})(self);
  2745. return self;},
  2746. args: ["aContext"],
  2747. 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",
  2748. messageSends: ["updateContextsList", "updateSourceArea", "updateInspector", "updateVariablesList", "updateStatus"],
  2749. referencedClasses: []
  2750. }),
  2751. smalltalk.Debugger);
  2752. smalltalk.addMethod(
  2753. "_selectVariable_named_",
  2754. smalltalk.method({
  2755. selector: "selectVariable:named:",
  2756. category: 'actions',
  2757. fn: function (anObject, aString){
  2758. var self=this;
  2759. (self['@selectedVariable']=anObject);
  2760. (self['@selectedVariableName']=aString);
  2761. smalltalk.send(self['@inspector'], "_contents_", [(function(html){return smalltalk.send(html, "_with_", [smalltalk.send(anObject, "_printString", [])]);})]);
  2762. smalltalk.send(self, "_updateVariablesList", []);
  2763. return self;},
  2764. args: ["anObject", "aString"],
  2765. source: "selectVariable: anObject named: aString\x0a\x09selectedVariable := anObject.\x0a\x09selectedVariableName := aString.\x0a\x09inspector contents: [:html | html with: anObject printString].\x0a\x09self updateVariablesList",
  2766. messageSends: ["contents:", "with:", "printString", "updateVariablesList"],
  2767. referencedClasses: []
  2768. }),
  2769. smalltalk.Debugger);
  2770. smalltalk.addMethod(
  2771. "_source",
  2772. smalltalk.method({
  2773. selector: "source",
  2774. category: 'accessing',
  2775. fn: function (){
  2776. var self=this;
  2777. return (($receiver = smalltalk.send(self, "_method", [])) == nil || $receiver == undefined) ? (function(){return "Method doesn't exist!";})() : (function(){return smalltalk.send(smalltalk.send(self, "_method", []), "_source", []);})();
  2778. return self;},
  2779. args: [],
  2780. source: "source\x0a\x09^self method \x0a\x09\x09ifNil: ['Method doesn''t exist!']\x0a\x09\x09ifNotNil: [self method source]",
  2781. messageSends: ["ifNil:ifNotNil:", "method", "source"],
  2782. referencedClasses: []
  2783. }),
  2784. smalltalk.Debugger);
  2785. smalltalk.addMethod(
  2786. "_updateContextsList",
  2787. smalltalk.method({
  2788. selector: "updateContextsList",
  2789. category: 'updating',
  2790. fn: function (){
  2791. var self=this;
  2792. smalltalk.send(self['@ul'], "_contents_", [(function(html){return smalltalk.send(self, "_renderContext_on_", [smalltalk.send(smalltalk.send(self, "_error", []), "_context", []), html]);})]);
  2793. return self;},
  2794. args: [],
  2795. source: "updateContextsList\x0a\x09ul contents: [:html |\x0a\x09\x09self renderContext: self error context on: html]",
  2796. messageSends: ["contents:", "renderContext:on:", "context", "error"],
  2797. referencedClasses: []
  2798. }),
  2799. smalltalk.Debugger);
  2800. smalltalk.addMethod(
  2801. "_updateInspector",
  2802. smalltalk.method({
  2803. selector: "updateInspector",
  2804. category: 'updating',
  2805. fn: function (){
  2806. var self=this;
  2807. smalltalk.send(self['@inspector'], "_contents_", [(function(html){return nil;})]);
  2808. return self;},
  2809. args: [],
  2810. source: "updateInspector\x0a\x09inspector contents: [:html |]",
  2811. messageSends: ["contents:"],
  2812. referencedClasses: []
  2813. }),
  2814. smalltalk.Debugger);
  2815. smalltalk.addMethod(
  2816. "_updateSourceArea",
  2817. smalltalk.method({
  2818. selector: "updateSourceArea",
  2819. category: 'updating',
  2820. fn: function (){
  2821. var self=this;
  2822. smalltalk.send(self['@sourceArea'], "_val_", [smalltalk.send(self, "_source", [])]);
  2823. return self;},
  2824. args: [],
  2825. source: "updateSourceArea\x0a\x09 sourceArea val: self source",
  2826. messageSends: ["val:", "source"],
  2827. referencedClasses: []
  2828. }),
  2829. smalltalk.Debugger);
  2830. smalltalk.addMethod(
  2831. "_updateStatus",
  2832. smalltalk.method({
  2833. selector: "updateStatus",
  2834. category: 'updating',
  2835. fn: function (){
  2836. var self=this;
  2837. ((($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);})]));
  2838. return self;},
  2839. args: [],
  2840. 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]",
  2841. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"],
  2842. referencedClasses: []
  2843. }),
  2844. smalltalk.Debugger);
  2845. smalltalk.addMethod(
  2846. "_updateVariablesList",
  2847. smalltalk.method({
  2848. selector: "updateVariablesList",
  2849. category: 'updating',
  2850. fn: function (){
  2851. var self=this;
  2852. smalltalk.send(self['@ul2'], "_contents_", [(function(html){var li=nil;
  2853. (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;
  2854. (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;
  2855. (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"]);})]));})]);})]);
  2856. (($receiver = self['@selectedVariable']) == nil || $receiver == undefined) ? (function(){return smalltalk.send(self['@inspectButton'], "_at_put_", ["disabled", true]);})() : (function(){return smalltalk.send(self['@inspectButton'], "_removeAt_", ["disabled"]);})();
  2857. return self;},
  2858. args: [],
  2859. 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']",
  2860. messageSends: ["contents:", "with:", "onClick:", "selectVariable:named:", "receiver", "li", "ifTrue:", "=", "class:", "withIndexDo:", "arguments", "at:", "temps", "do:", "allInstanceVariableNames", "class", "instVarAt:", "ifNil:ifNotNil:", "at:put:", "removeAt:"],
  2861. referencedClasses: []
  2862. }),
  2863. smalltalk.Debugger);
  2864. smalltalk.addClass('IDETranscript', smalltalk.TabWidget, ['textarea'], 'IDE');
  2865. smalltalk.addMethod(
  2866. "_clear",
  2867. smalltalk.method({
  2868. selector: "clear",
  2869. category: 'actions',
  2870. fn: function (){
  2871. var self=this;
  2872. smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [""]);
  2873. return self;},
  2874. args: [],
  2875. source: "clear\x0a textarea asJQuery val: ''",
  2876. messageSends: ["val:", "asJQuery"],
  2877. referencedClasses: []
  2878. }),
  2879. smalltalk.IDETranscript);
  2880. smalltalk.addMethod(
  2881. "_cr",
  2882. smalltalk.method({
  2883. selector: "cr",
  2884. category: 'actions',
  2885. fn: function (){
  2886. var self=this;
  2887. 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", [])])]);
  2888. return self;},
  2889. args: [],
  2890. source: "cr\x0a textarea asJQuery val: textarea asJQuery val, String cr.",
  2891. messageSends: ["val:", "asJQuery", ",", "val", "cr"],
  2892. referencedClasses: ["String"]
  2893. }),
  2894. smalltalk.IDETranscript);
  2895. smalltalk.addMethod(
  2896. "_label",
  2897. smalltalk.method({
  2898. selector: "label",
  2899. category: 'accessing',
  2900. fn: function (){
  2901. var self=this;
  2902. return "Transcript";
  2903. return self;},
  2904. args: [],
  2905. source: "label\x0a ^'Transcript'",
  2906. messageSends: [],
  2907. referencedClasses: []
  2908. }),
  2909. smalltalk.IDETranscript);
  2910. smalltalk.addMethod(
  2911. "_open",
  2912. smalltalk.method({
  2913. selector: "open",
  2914. category: 'actions',
  2915. fn: function (){
  2916. var self=this;
  2917. (function($rec){smalltalk.send($rec, "_open", []);return smalltalk.send($rec, "_selectTab_", [self]);})(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []));
  2918. return self;},
  2919. args: [],
  2920. source: "open\x0a TabManager current \x0a\x09open;\x0a\x09selectTab: self",
  2921. messageSends: ["open", "selectTab:", "current"],
  2922. referencedClasses: ["TabManager"]
  2923. }),
  2924. smalltalk.IDETranscript);
  2925. smalltalk.addMethod(
  2926. "_renderBoxOn_",
  2927. smalltalk.method({
  2928. selector: "renderBoxOn:",
  2929. category: 'rendering',
  2930. fn: function (html){
  2931. var self=this;
  2932. (self['@textarea']=smalltalk.send(html, "_textarea", []));
  2933. (function($rec){smalltalk.send($rec, "_class_", ["amber_transcript"]);return smalltalk.send($rec, "_at_put_", ["spellcheck", "false"]);})(self['@textarea']);
  2934. return self;},
  2935. args: ["html"],
  2936. source: "renderBoxOn: html\x0a textarea := html textarea.\x0a textarea \x0a\x09class: 'amber_transcript';\x0a\x09at: 'spellcheck' put: 'false'",
  2937. messageSends: ["textarea", "class:", "at:put:"],
  2938. referencedClasses: []
  2939. }),
  2940. smalltalk.IDETranscript);
  2941. smalltalk.addMethod(
  2942. "_renderButtonsOn_",
  2943. smalltalk.method({
  2944. selector: "renderButtonsOn:",
  2945. category: 'rendering',
  2946. fn: function (html){
  2947. var self=this;
  2948. (function($rec){smalltalk.send($rec, "_with_", ["Clear transcript"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_clear", []);})]);})(smalltalk.send(html, "_button", []));
  2949. return self;},
  2950. args: ["html"],
  2951. source: "renderButtonsOn: html\x0a html button\x0a\x09with: 'Clear transcript';\x0a\x09onClick: [self clear]",
  2952. messageSends: ["with:", "onClick:", "clear", "button"],
  2953. referencedClasses: []
  2954. }),
  2955. smalltalk.IDETranscript);
  2956. smalltalk.addMethod(
  2957. "_show_",
  2958. smalltalk.method({
  2959. selector: "show:",
  2960. category: 'actions',
  2961. fn: function (anObject){
  2962. var self=this;
  2963. (($receiver = self['@textarea']) == nil || $receiver == undefined) ? (function(){return smalltalk.send(self, "_open", []);})() : $receiver;
  2964. smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [smalltalk.send(smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val", []), "__comma", [smalltalk.send(anObject, "_asString", [])])]);
  2965. return self;},
  2966. args: ["anObject"],
  2967. source: "show: anObject\x0a textarea ifNil: [self open].\x0a textarea asJQuery val: textarea asJQuery val, anObject asString.",
  2968. messageSends: ["ifNil:", "open", "val:", "asJQuery", ",", "val", "asString"],
  2969. referencedClasses: []
  2970. }),
  2971. smalltalk.IDETranscript);
  2972. smalltalk.IDETranscript.klass.iVarNames = ['current'];
  2973. smalltalk.addMethod(
  2974. "_current",
  2975. smalltalk.method({
  2976. selector: "current",
  2977. category: 'instance creation',
  2978. fn: function (){
  2979. var self=this;
  2980. return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return (self['@current']=smalltalk.send(self, "_new", [], smalltalk.IDETranscript.klass.superclass || nil));})() : $receiver;
  2981. return self;},
  2982. args: [],
  2983. source: "current\x0a\x09^current ifNil: [current := super new]",
  2984. messageSends: ["ifNil:", "new"],
  2985. referencedClasses: []
  2986. }),
  2987. smalltalk.IDETranscript.klass);
  2988. smalltalk.addMethod(
  2989. "_initialize",
  2990. smalltalk.method({
  2991. selector: "initialize",
  2992. category: 'initialization',
  2993. fn: function (){
  2994. var self=this;
  2995. smalltalk.send((smalltalk.Transcript || Transcript), "_register_", [smalltalk.send(self, "_current", [])]);
  2996. return self;},
  2997. args: [],
  2998. source: "initialize\x0a\x09Transcript register: self current",
  2999. messageSends: ["register:", "current"],
  3000. referencedClasses: ["Transcript"]
  3001. }),
  3002. smalltalk.IDETranscript.klass);
  3003. smalltalk.addMethod(
  3004. "_new",
  3005. smalltalk.method({
  3006. selector: "new",
  3007. category: 'instance creation',
  3008. fn: function (){
  3009. var self=this;
  3010. smalltalk.send(self, "_shouldNotImplement", []);
  3011. return self;},
  3012. args: [],
  3013. source: "new\x0a self shouldNotImplement",
  3014. messageSends: ["shouldNotImplement"],
  3015. referencedClasses: []
  3016. }),
  3017. smalltalk.IDETranscript.klass);
  3018. smalltalk.addMethod(
  3019. "_open",
  3020. smalltalk.method({
  3021. selector: "open",
  3022. category: 'instance creation',
  3023. fn: function (){
  3024. var self=this;
  3025. (function($rec){smalltalk.send($rec, "_open", []);return smalltalk.send($rec, "_selectTab_", [smalltalk.send(self, "_current", [])]);})(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []));
  3026. return self;},
  3027. args: [],
  3028. source: "open\x0a TabManager current \x0a\x09open;\x0a\x09selectTab: self current",
  3029. messageSends: ["open", "selectTab:", "current"],
  3030. referencedClasses: ["TabManager"]
  3031. }),
  3032. smalltalk.IDETranscript.klass);
  3033. smalltalk.addClass('Inspector', smalltalk.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  3034. smalltalk.addMethod(
  3035. "_canBeClosed",
  3036. smalltalk.method({
  3037. selector: "canBeClosed",
  3038. category: 'testing',
  3039. fn: function (){
  3040. var self=this;
  3041. return true;
  3042. return self;},
  3043. args: [],
  3044. source: "canBeClosed\x0a\x09^true",
  3045. messageSends: [],
  3046. referencedClasses: []
  3047. }),
  3048. smalltalk.Inspector);
  3049. smalltalk.addMethod(
  3050. "_dive",
  3051. smalltalk.method({
  3052. selector: "dive",
  3053. category: 'actions',
  3054. fn: function (){
  3055. var self=this;
  3056. smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_inspect", []);
  3057. return self;},
  3058. args: [],
  3059. source: "dive\x0a\x09(self variables at: self selectedVariable) inspect",
  3060. messageSends: ["inspect", "at:", "variables", "selectedVariable"],
  3061. referencedClasses: []
  3062. }),
  3063. smalltalk.Inspector);
  3064. smalltalk.addMethod(
  3065. "_inspect_",
  3066. smalltalk.method({
  3067. selector: "inspect:",
  3068. category: 'actions',
  3069. fn: function (anObject){
  3070. var self=this;
  3071. (self['@object']=anObject);
  3072. (self['@variables']=[]);
  3073. smalltalk.send(self['@object'], "_inspectOn_", [self]);
  3074. return self;},
  3075. args: ["anObject"],
  3076. source: "inspect: anObject\x0a\x09object := anObject.\x0a\x09variables := #().\x0a\x09object inspectOn: self",
  3077. messageSends: ["inspectOn:"],
  3078. referencedClasses: []
  3079. }),
  3080. smalltalk.Inspector);
  3081. smalltalk.addMethod(
  3082. "_label",
  3083. smalltalk.method({
  3084. selector: "label",
  3085. category: 'accessing',
  3086. fn: function (){
  3087. var self=this;
  3088. return (($receiver = self['@label']) == nil || $receiver == undefined) ? (function(){return "Inspector (nil)";})() : $receiver;
  3089. return self;},
  3090. args: [],
  3091. source: "label\x0a\x09^label ifNil: ['Inspector (nil)']",
  3092. messageSends: ["ifNil:"],
  3093. referencedClasses: []
  3094. }),
  3095. smalltalk.Inspector);
  3096. smalltalk.addMethod(
  3097. "_refresh",
  3098. smalltalk.method({
  3099. selector: "refresh",
  3100. category: 'actions',
  3101. fn: function (){
  3102. var self=this;
  3103. (function($rec){smalltalk.send($rec, "_inspect_", [self['@object']]);smalltalk.send($rec, "_updateVariablesList", []);return smalltalk.send($rec, "_updateValueTextarea", []);})(self);
  3104. return self;},
  3105. args: [],
  3106. source: "refresh\x0a\x09self \x0a\x09\x09inspect: object; \x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea",
  3107. messageSends: ["inspect:", "updateVariablesList", "updateValueTextarea"],
  3108. referencedClasses: []
  3109. }),
  3110. smalltalk.Inspector);
  3111. smalltalk.addMethod(
  3112. "_renderBottomPanelOn_",
  3113. smalltalk.method({
  3114. selector: "renderBottomPanelOn:",
  3115. category: 'rendering',
  3116. fn: function (html){
  3117. var self=this;
  3118. (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", []));
  3119. return self;},
  3120. args: ["html"],
  3121. 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]",
  3122. messageSends: ["class:", "with:", "receiver:", "onDoIt:", "refresh", "yourself", "new", "renderOn:", "div"],
  3123. referencedClasses: ["SourceArea"]
  3124. }),
  3125. smalltalk.Inspector);
  3126. smalltalk.addMethod(
  3127. "_renderBoxOn_",
  3128. smalltalk.method({
  3129. selector: "renderBoxOn:",
  3130. category: 'rendering',
  3131. fn: function (html){
  3132. var self=this;
  3133. (function($rec){smalltalk.send($rec, "_renderTopPanelOn_", [html]);return smalltalk.send($rec, "_renderBottomPanelOn_", [html]);})(self);
  3134. return self;},
  3135. args: ["html"],
  3136. source: "renderBoxOn: html\x0a\x09self \x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
  3137. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"],
  3138. referencedClasses: []
  3139. }),
  3140. smalltalk.Inspector);
  3141. smalltalk.addMethod(
  3142. "_renderButtonsOn_",
  3143. smalltalk.method({
  3144. selector: "renderButtonsOn:",
  3145. category: 'rendering',
  3146. fn: function (html){
  3147. var self=this;
  3148. (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", []));
  3149. (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", []));
  3150. (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", []));
  3151. smalltalk.send(self, "_updateButtons", []);
  3152. return self;},
  3153. args: ["html"],
  3154. 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",
  3155. messageSends: ["with:", "onClick:", "doIt", "sourceArea", "button", "printIt", "inspectIt", "updateButtons"],
  3156. referencedClasses: []
  3157. }),
  3158. smalltalk.Inspector);
  3159. smalltalk.addMethod(
  3160. "_renderTopPanelOn_",
  3161. smalltalk.method({
  3162. selector: "renderTopPanelOn:",
  3163. category: 'rendering',
  3164. fn: function (html){
  3165. var self=this;
  3166. (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_", ["jt_button inspector refresh"]);smalltalk.send($rec, "_with_", ["Refresh"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_refresh", []);})]);})(smalltalk.send(html, "_button", []));return (self['@diveButton']=(function($rec){smalltalk.send($rec, "_class_", ["jt_button inspector dive"]);smalltalk.send($rec, "_with_", ["Dive"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_dive", []);})]);})(smalltalk.send(html, "_button", [])));})]);})(smalltalk.send(html, "_div", []));return smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["amber_clear"]);})]);})(smalltalk.send(html, "_div", []));
  3167. (function($rec){smalltalk.send($rec, "_updateVariablesList", []);return smalltalk.send($rec, "_updateValueTextarea", []);})(self);
  3168. return self;},
  3169. args: ["html"],
  3170. 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: 'jt_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: 'jt_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.",
  3171. messageSends: ["class:", "with:", "ul", "at:put:", "textarea", "onClick:", "refresh", "button", "dive", "div", "updateVariablesList", "updateValueTextarea"],
  3172. referencedClasses: []
  3173. }),
  3174. smalltalk.Inspector);
  3175. smalltalk.addMethod(
  3176. "_selectVariable_",
  3177. smalltalk.method({
  3178. selector: "selectVariable:",
  3179. category: 'updating',
  3180. fn: function (aString){
  3181. var self=this;
  3182. smalltalk.send(self, "_selectedVariable_", [aString]);
  3183. (function($rec){smalltalk.send($rec, "_updateVariablesList", []);smalltalk.send($rec, "_updateValueTextarea", []);return smalltalk.send($rec, "_updateButtons", []);})(self);
  3184. return self;},
  3185. args: ["aString"],
  3186. source: "selectVariable: aString\x0a\x09self selectedVariable: aString.\x0a\x09self \x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea;\x0a\x09\x09updateButtons",
  3187. messageSends: ["selectedVariable:", "updateVariablesList", "updateValueTextarea", "updateButtons"],
  3188. referencedClasses: []
  3189. }),
  3190. smalltalk.Inspector);
  3191. smalltalk.addMethod(
  3192. "_selectedVariable",
  3193. smalltalk.method({
  3194. selector: "selectedVariable",
  3195. category: 'accessing',
  3196. fn: function (){
  3197. var self=this;
  3198. return self['@selectedVariable'];
  3199. return self;},
  3200. args: [],
  3201. source: "selectedVariable\x0a\x09^selectedVariable",
  3202. messageSends: [],
  3203. referencedClasses: []
  3204. }),
  3205. smalltalk.Inspector);
  3206. smalltalk.addMethod(
  3207. "_selectedVariable_",
  3208. smalltalk.method({
  3209. selector: "selectedVariable:",
  3210. category: 'accessing',
  3211. fn: function (aString){
  3212. var self=this;
  3213. (self['@selectedVariable']=aString);
  3214. return self;},
  3215. args: ["aString"],
  3216. source: "selectedVariable: aString\x0a\x09selectedVariable := aString",
  3217. messageSends: [],
  3218. referencedClasses: []
  3219. }),
  3220. smalltalk.Inspector);
  3221. smalltalk.addMethod(
  3222. "_setLabel_",
  3223. smalltalk.method({
  3224. selector: "setLabel:",
  3225. category: 'accessing',
  3226. fn: function (aString){
  3227. var self=this;
  3228. (self['@label']=aString);
  3229. return self;},
  3230. args: ["aString"],
  3231. source: "setLabel: aString\x0a\x09label := aString",
  3232. messageSends: [],
  3233. referencedClasses: []
  3234. }),
  3235. smalltalk.Inspector);
  3236. smalltalk.addMethod(
  3237. "_setVariables_",
  3238. smalltalk.method({
  3239. selector: "setVariables:",
  3240. category: 'accessing',
  3241. fn: function (aCollection){
  3242. var self=this;
  3243. (self['@variables']=aCollection);
  3244. return self;},
  3245. args: ["aCollection"],
  3246. source: "setVariables: aCollection\x0a\x09variables := aCollection",
  3247. messageSends: [],
  3248. referencedClasses: []
  3249. }),
  3250. smalltalk.Inspector);
  3251. smalltalk.addMethod(
  3252. "_sourceArea",
  3253. smalltalk.method({
  3254. selector: "sourceArea",
  3255. category: 'accessing',
  3256. fn: function (){
  3257. var self=this;
  3258. return self['@sourceArea'];
  3259. return self;},
  3260. args: [],
  3261. source: "sourceArea\x0a\x09^sourceArea",
  3262. messageSends: [],
  3263. referencedClasses: []
  3264. }),
  3265. smalltalk.Inspector);
  3266. smalltalk.addMethod(
  3267. "_updateButtons",
  3268. smalltalk.method({
  3269. selector: "updateButtons",
  3270. category: 'updating',
  3271. fn: function (){
  3272. var self=this;
  3273. ((($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"]);})]));
  3274. return self;},
  3275. args: [],
  3276. 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']",
  3277. messageSends: ["ifFalse:ifTrue:", "and:", "notNil", "selectedVariable", "at:", "variables", "at:put:", "removeAt:"],
  3278. referencedClasses: []
  3279. }),
  3280. smalltalk.Inspector);
  3281. smalltalk.addMethod(
  3282. "_updateValueTextarea",
  3283. smalltalk.method({
  3284. selector: "updateValueTextarea",
  3285. category: 'updating',
  3286. fn: function (){
  3287. var self=this;
  3288. 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", []);})]))]);
  3289. return self;},
  3290. args: [],
  3291. source: "updateValueTextarea\x0a\x09valueTextarea asJQuery val: (self selectedVariable isNil\x0a\x09\x09ifTrue: ['']\x0a\x09\x09ifFalse: [(self variables at: self selectedVariable) printString])",
  3292. messageSends: ["val:", "asJQuery", "ifTrue:ifFalse:", "isNil", "selectedVariable", "printString", "at:", "variables"],
  3293. referencedClasses: []
  3294. }),
  3295. smalltalk.Inspector);
  3296. smalltalk.addMethod(
  3297. "_updateVariablesList",
  3298. smalltalk.method({
  3299. selector: "updateVariablesList",
  3300. category: 'updating',
  3301. fn: function (){
  3302. var self=this;
  3303. smalltalk.send(self['@variablesList'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_keys", []), "_do_", [(function(each){var li=nil;
  3304. (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"]);})]));})]);})]);
  3305. return self;},
  3306. args: [],
  3307. 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']]]",
  3308. messageSends: ["contents:", "do:", "keys", "variables", "li", "with:", "onClick:", "selectVariable:", "ifTrue:", "=", "selectedVariable", "class:"],
  3309. referencedClasses: []
  3310. }),
  3311. smalltalk.Inspector);
  3312. smalltalk.addMethod(
  3313. "_variables",
  3314. smalltalk.method({
  3315. selector: "variables",
  3316. category: 'accessing',
  3317. fn: function (){
  3318. var self=this;
  3319. return self['@variables'];
  3320. return self;},
  3321. args: [],
  3322. source: "variables\x0a\x09^variables",
  3323. messageSends: [],
  3324. referencedClasses: []
  3325. }),
  3326. smalltalk.Inspector);
  3327. smalltalk.addMethod(
  3328. "_on_",
  3329. smalltalk.method({
  3330. selector: "on:",
  3331. category: 'instance creation',
  3332. fn: function (anObject){
  3333. var self=this;
  3334. return (function($rec){smalltalk.send($rec, "_inspect_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  3335. return self;},
  3336. args: ["anObject"],
  3337. source: "on: anObject\x0a\x09^self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09yourself",
  3338. messageSends: ["inspect:", "yourself", "new"],
  3339. referencedClasses: []
  3340. }),
  3341. smalltalk.Inspector.klass);
  3342. smalltalk.addClass('ProgressBar', smalltalk.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  3343. smalltalk.addMethod(
  3344. "_percent",
  3345. smalltalk.method({
  3346. selector: "percent",
  3347. category: 'accessing',
  3348. fn: function (){
  3349. var self=this;
  3350. return (($receiver = self['@percent']) == nil || $receiver == undefined) ? (function(){return (0);})() : $receiver;
  3351. return self;},
  3352. args: [],
  3353. source: "percent\x0a\x09^percent ifNil: [0]",
  3354. messageSends: ["ifNil:"],
  3355. referencedClasses: []
  3356. }),
  3357. smalltalk.ProgressBar);
  3358. smalltalk.addMethod(
  3359. "_percent_",
  3360. smalltalk.method({
  3361. selector: "percent:",
  3362. category: 'accessing',
  3363. fn: function (aNumber){
  3364. var self=this;
  3365. (self['@percent']=aNumber);
  3366. return self;},
  3367. args: ["aNumber"],
  3368. source: "percent: aNumber\x0a\x09percent := aNumber",
  3369. messageSends: [],
  3370. referencedClasses: []
  3371. }),
  3372. smalltalk.ProgressBar);
  3373. smalltalk.addMethod(
  3374. "_renderOn_",
  3375. smalltalk.method({
  3376. selector: "renderOn:",
  3377. category: 'rendering',
  3378. fn: function (html){
  3379. var self=this;
  3380. (self['@div']=(function($rec){smalltalk.send($rec, "_class_", ["progress_bar"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_div", [])));
  3381. smalltalk.send(self, "_renderProgressBar", []);
  3382. return self;},
  3383. args: ["html"],
  3384. source: "renderOn: html \x0a\x09div := html div \x0a\x09\x09class: 'progress_bar';\x0a\x09\x09yourself.\x0a\x09self renderProgressBar",
  3385. messageSends: ["class:", "yourself", "div", "renderProgressBar"],
  3386. referencedClasses: []
  3387. }),
  3388. smalltalk.ProgressBar);
  3389. smalltalk.addMethod(
  3390. "_renderProgressBar",
  3391. smalltalk.method({
  3392. selector: "renderProgressBar",
  3393. category: 'rendering',
  3394. fn: function (){
  3395. var self=this;
  3396. 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", []));})]);
  3397. return self;},
  3398. args: [],
  3399. source: "renderProgressBar\x0a\x09div contents: [:html |\x0a\x09\x09html div \x0a\x09\x09\x09class: 'progress';\x0a\x09\x09\x09style: 'width:', self percent asString, '%']",
  3400. messageSends: ["contents:", "class:", "style:", ",", "asString", "percent", "div"],
  3401. referencedClasses: []
  3402. }),
  3403. smalltalk.ProgressBar);
  3404. smalltalk.addMethod(
  3405. "_updatePercent_",
  3406. smalltalk.method({
  3407. selector: "updatePercent:",
  3408. category: 'updating',
  3409. fn: function (aNumber){
  3410. var self=this;
  3411. smalltalk.send(self, "_percent_", [aNumber]);
  3412. smalltalk.send(self, "_renderProgressBar", []);
  3413. return self;},
  3414. args: ["aNumber"],
  3415. source: "updatePercent: aNumber\x0a\x09self percent: aNumber.\x0a\x09self renderProgressBar",
  3416. messageSends: ["percent:", "renderProgressBar"],
  3417. referencedClasses: []
  3418. }),
  3419. smalltalk.ProgressBar);
  3420. smalltalk.addClass('ReferencesBrowser', smalltalk.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  3421. smalltalk.addMethod(
  3422. "_canBeClosed",
  3423. smalltalk.method({
  3424. selector: "canBeClosed",
  3425. category: 'testing',
  3426. fn: function (){
  3427. var self=this;
  3428. return true;
  3429. return self;},
  3430. args: [],
  3431. source: "canBeClosed\x0a\x09^true",
  3432. messageSends: [],
  3433. referencedClasses: []
  3434. }),
  3435. smalltalk.ReferencesBrowser);
  3436. smalltalk.addMethod(
  3437. "_classesAndMetaclasses",
  3438. smalltalk.method({
  3439. selector: "classesAndMetaclasses",
  3440. category: 'accessing',
  3441. fn: function (){
  3442. var self=this;
  3443. 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", []);})])]);
  3444. return self;},
  3445. args: [],
  3446. source: "classesAndMetaclasses\x0a\x09^Smalltalk current classes, (Smalltalk current classes collect: [:each | each class])",
  3447. messageSends: [",", "classes", "current", "collect:", "class"],
  3448. referencedClasses: ["Smalltalk"]
  3449. }),
  3450. smalltalk.ReferencesBrowser);
  3451. smalltalk.addMethod(
  3452. "_implementors",
  3453. smalltalk.method({
  3454. selector: "implementors",
  3455. category: 'accessing',
  3456. fn: function (){
  3457. var self=this;
  3458. return (($receiver = self['@implementors']) == nil || $receiver == undefined) ? (function(){return (self['@implementors']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver;
  3459. return self;},
  3460. args: [],
  3461. source: "implementors\x0a\x09^implementors ifNil: [implementors := Array new]",
  3462. messageSends: ["ifNil:", "new"],
  3463. referencedClasses: ["Array"]
  3464. }),
  3465. smalltalk.ReferencesBrowser);
  3466. smalltalk.addMethod(
  3467. "_initialize",
  3468. smalltalk.method({
  3469. selector: "initialize",
  3470. category: 'initialization',
  3471. fn: function (){
  3472. var self=this;
  3473. smalltalk.send(self, "_initialize", [], smalltalk.ReferencesBrowser.superclass || nil);
  3474. (self['@selector']="");
  3475. return self;},
  3476. args: [],
  3477. source: "initialize\x0a\x09super initialize.\x0a\x09selector := ''",
  3478. messageSends: ["initialize"],
  3479. referencedClasses: []
  3480. }),
  3481. smalltalk.ReferencesBrowser);
  3482. smalltalk.addMethod(
  3483. "_label",
  3484. smalltalk.method({
  3485. selector: "label",
  3486. category: 'accessing',
  3487. fn: function (){
  3488. var self=this;
  3489. return "[References]";
  3490. return self;},
  3491. args: [],
  3492. source: "label\x0a\x09^'[References]'",
  3493. messageSends: [],
  3494. referencedClasses: []
  3495. }),
  3496. smalltalk.ReferencesBrowser);
  3497. smalltalk.addMethod(
  3498. "_matches",
  3499. smalltalk.method({
  3500. selector: "matches",
  3501. category: 'accessing',
  3502. fn: function (){
  3503. var self=this;
  3504. return (($receiver = self['@matches']) == nil || $receiver == undefined) ? (function(){return (self['@matches']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver;
  3505. return self;},
  3506. args: [],
  3507. source: "matches\x0a\x09^matches ifNil: [matches := Array new]",
  3508. messageSends: ["ifNil:", "new"],
  3509. referencedClasses: ["Array"]
  3510. }),
  3511. smalltalk.ReferencesBrowser);
  3512. smalltalk.addMethod(
  3513. "_openBrowserOn_",
  3514. smalltalk.method({
  3515. selector: "openBrowserOn:",
  3516. category: 'actions',
  3517. fn: function (aMethod){
  3518. var self=this;
  3519. var browser=nil;
  3520. (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", []);})]))]));
  3521. ((($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")]);})]));
  3522. (function($rec){smalltalk.send($rec, "_selectProtocol_", [smalltalk.send(aMethod, "_category", [])]);return smalltalk.send($rec, "_selectMethod_", [aMethod]);})(browser);
  3523. return self;},
  3524. args: ["aMethod"],
  3525. 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",
  3526. messageSends: ["openOn:", "ifTrue:ifFalse:", "isMetaclass", "methodClass", "instanceClass", "ifTrue:", "selectTab:", "selectProtocol:", "category", "selectMethod:"],
  3527. referencedClasses: ["Browser"]
  3528. }),
  3529. smalltalk.ReferencesBrowser);
  3530. smalltalk.addMethod(
  3531. "_referencedClasses",
  3532. smalltalk.method({
  3533. selector: "referencedClasses",
  3534. category: 'accessing',
  3535. fn: function (){
  3536. var self=this;
  3537. return (($receiver = self['@referencedClasses']) == nil || $receiver == undefined) ? (function(){return (self['@referencedClasses']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver;
  3538. return self;},
  3539. args: [],
  3540. source: "referencedClasses\x0a\x09^referencedClasses ifNil: [referencedClasses := Array new]",
  3541. messageSends: ["ifNil:", "new"],
  3542. referencedClasses: ["Array"]
  3543. }),
  3544. smalltalk.ReferencesBrowser);
  3545. smalltalk.addMethod(
  3546. "_renderBoxOn_",
  3547. smalltalk.method({
  3548. selector: "renderBoxOn:",
  3549. category: 'rendering',
  3550. fn: function (html){
  3551. var self=this;
  3552. (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);
  3553. return self;},
  3554. args: ["html"],
  3555. 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",
  3556. messageSends: ["renderInputOn:", "renderImplementorsOn:", "renderSendersOn:", "renderReferencedClassesOn:", "renderMatchesOn:"],
  3557. referencedClasses: []
  3558. }),
  3559. smalltalk.ReferencesBrowser);
  3560. smalltalk.addMethod(
  3561. "_renderImplementorsOn_",
  3562. smalltalk.method({
  3563. selector: "renderImplementorsOn:",
  3564. category: 'rendering',
  3565. fn: function (html){
  3566. var self=this;
  3567. (self['@implementorsList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column implementors"]));
  3568. smalltalk.send(self, "_updateImplementorsList", []);
  3569. return self;},
  3570. args: ["html"],
  3571. source: "renderImplementorsOn: html\x0a\x09implementorsList := html ul class: 'amber_column implementors'.\x0a\x09self updateImplementorsList",
  3572. messageSends: ["class:", "ul", "updateImplementorsList"],
  3573. referencedClasses: []
  3574. }),
  3575. smalltalk.ReferencesBrowser);
  3576. smalltalk.addMethod(
  3577. "_renderInputOn_",
  3578. smalltalk.method({
  3579. selector: "renderInputOn:",
  3580. category: 'rendering',
  3581. fn: function (html){
  3582. var self=this;
  3583. (self['@input']=(function($rec){smalltalk.send($rec, "_class_", ["implementors"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_input", [])));
  3584. smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val_", [self['@selector']]);
  3585. smalltalk.send(self, "_setInputEvents", []);
  3586. return self;},
  3587. args: ["html"],
  3588. source: "renderInputOn: html\x0a\x09input := html input \x0a\x09\x09class: 'implementors';\x0a\x09\x09yourself.\x0a\x09input asJQuery val: selector.\x0a\x09self setInputEvents",
  3589. messageSends: ["class:", "yourself", "input", "val:", "asJQuery", "setInputEvents"],
  3590. referencedClasses: []
  3591. }),
  3592. smalltalk.ReferencesBrowser);
  3593. smalltalk.addMethod(
  3594. "_renderMatchesOn_",
  3595. smalltalk.method({
  3596. selector: "renderMatchesOn:",
  3597. category: 'rendering',
  3598. fn: function (html){
  3599. var self=this;
  3600. (self['@matchesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column matches"]));
  3601. smalltalk.send(self, "_updateMatchesList", []);
  3602. return self;},
  3603. args: ["html"],
  3604. source: "renderMatchesOn: html\x0a\x09matchesList := html ul class: 'amber_column matches'.\x0a\x09self updateMatchesList",
  3605. messageSends: ["class:", "ul", "updateMatchesList"],
  3606. referencedClasses: []
  3607. }),
  3608. smalltalk.ReferencesBrowser);
  3609. smalltalk.addMethod(
  3610. "_renderReferencedClassesOn_",
  3611. smalltalk.method({
  3612. selector: "renderReferencedClassesOn:",
  3613. category: 'rendering',
  3614. fn: function (html){
  3615. var self=this;
  3616. (self['@referencedClassesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column referenced_classes"]));
  3617. smalltalk.send(self, "_updateReferencedClassesList", []);
  3618. return self;},
  3619. args: ["html"],
  3620. source: "renderReferencedClassesOn: html\x0a\x09referencedClassesList := html ul class: 'amber_column referenced_classes'.\x0a\x09self updateReferencedClassesList",
  3621. messageSends: ["class:", "ul", "updateReferencedClassesList"],
  3622. referencedClasses: []
  3623. }),
  3624. smalltalk.ReferencesBrowser);
  3625. smalltalk.addMethod(
  3626. "_renderSendersOn_",
  3627. smalltalk.method({
  3628. selector: "renderSendersOn:",
  3629. category: 'rendering',
  3630. fn: function (html){
  3631. var self=this;
  3632. (self['@sendersList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column senders"]));
  3633. smalltalk.send(self, "_updateSendersList", []);
  3634. return self;},
  3635. args: ["html"],
  3636. source: "renderSendersOn: html\x0a\x09sendersList := html ul class: 'amber_column senders'.\x0a\x09self updateSendersList",
  3637. messageSends: ["class:", "ul", "updateSendersList"],
  3638. referencedClasses: []
  3639. }),
  3640. smalltalk.ReferencesBrowser);
  3641. smalltalk.addMethod(
  3642. "_search_",
  3643. smalltalk.method({
  3644. selector: "search:",
  3645. category: 'actions',
  3646. fn: function (aString){
  3647. var self=this;
  3648. (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);
  3649. return self;},
  3650. args: ["aString"],
  3651. source: "search: aString\x0a\x09self \x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09updateImplementorsList;\x0a\x09\x09updateSendersList;\x0a\x09\x09updateReferencedClassesList;\x0a\x09\x09updateMatchesList",
  3652. messageSends: ["searchReferencesFor:", "updateImplementorsList", "updateSendersList", "updateReferencedClassesList", "updateMatchesList"],
  3653. referencedClasses: []
  3654. }),
  3655. smalltalk.ReferencesBrowser);
  3656. smalltalk.addMethod(
  3657. "_searchMethodSource",
  3658. smalltalk.method({
  3659. selector: "searchMethodSource",
  3660. category: 'actions',
  3661. fn: function (){
  3662. var self=this;
  3663. var regex=nil;
  3664. (regex=smalltalk.send(self['@selector'], "_allButFirst", []));
  3665. 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]);})]));})]);})]);
  3666. return self;},
  3667. args: [],
  3668. 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]]]",
  3669. messageSends: ["allButFirst", "do:", "classesAndMetaclasses", "values", "methodDictionary", "ifTrue:", "match:", "source", "add:", "matches"],
  3670. referencedClasses: []
  3671. }),
  3672. smalltalk.ReferencesBrowser);
  3673. smalltalk.addMethod(
  3674. "_searchReferencedClasses",
  3675. smalltalk.method({
  3676. selector: "searchReferencedClasses",
  3677. category: 'actions',
  3678. fn: function (){
  3679. var self=this;
  3680. 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]);})]));})]);})]);
  3681. return self;},
  3682. args: [],
  3683. 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]]]",
  3684. messageSends: ["do:", "classesAndMetaclasses", "values", "methodDictionary", "ifTrue:", "includes:", "referencedClasses", "add:"],
  3685. referencedClasses: []
  3686. }),
  3687. smalltalk.ReferencesBrowser);
  3688. smalltalk.addMethod(
  3689. "_searchReferencesFor_",
  3690. smalltalk.method({
  3691. selector: "searchReferencesFor:",
  3692. category: 'actions',
  3693. fn: function (aString){
  3694. var self=this;
  3695. (self['@selector']=aString);
  3696. (self['@implementors']=smalltalk.send((smalltalk.Array || Array), "_new", []));
  3697. (self['@senders']=smalltalk.send((smalltalk.Array || Array), "_new", []));
  3698. (self['@referencedClasses']=smalltalk.send((smalltalk.Array || Array), "_new", []));
  3699. (self['@matches']=smalltalk.send((smalltalk.Array || Array), "_new", []));
  3700. smalltalk.send(self, "_searchMethodSource", []);
  3701. ((($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", []);})]));
  3702. return self;},
  3703. args: ["aString"],
  3704. 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]",
  3705. messageSends: ["new", "searchMethodSource", "ifFalse:ifTrue:", "match:", "searchSelectorReferences", "searchReferencedClasses"],
  3706. referencedClasses: ["Array"]
  3707. }),
  3708. smalltalk.ReferencesBrowser);
  3709. smalltalk.addMethod(
  3710. "_searchSelectorReferences",
  3711. smalltalk.method({
  3712. selector: "searchSelectorReferences",
  3713. category: 'actions',
  3714. fn: function (){
  3715. var self=this;
  3716. 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]);})]));})]);})]);
  3717. return self;},
  3718. args: [],
  3719. 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]]]",
  3720. messageSends: ["do:", "classesAndMetaclasses", "keysAndValuesDo:", "methodDictionary", "ifTrue:", "=", "add:", "implementors", "includes:", "messageSends", "senders"],
  3721. referencedClasses: []
  3722. }),
  3723. smalltalk.ReferencesBrowser);
  3724. smalltalk.addMethod(
  3725. "_selector",
  3726. smalltalk.method({
  3727. selector: "selector",
  3728. category: 'accessing',
  3729. fn: function (){
  3730. var self=this;
  3731. return self['@selector'];
  3732. return self;},
  3733. args: [],
  3734. source: "selector\x0a\x09^selector",
  3735. messageSends: [],
  3736. referencedClasses: []
  3737. }),
  3738. smalltalk.ReferencesBrowser);
  3739. smalltalk.addMethod(
  3740. "_senders",
  3741. smalltalk.method({
  3742. selector: "senders",
  3743. category: 'accessing',
  3744. fn: function (){
  3745. var self=this;
  3746. return (($receiver = self['@senders']) == nil || $receiver == undefined) ? (function(){return (self['@senders']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver;
  3747. return self;},
  3748. args: [],
  3749. source: "senders\x0a\x09^senders ifNil: [senders := Array new]",
  3750. messageSends: ["ifNil:", "new"],
  3751. referencedClasses: ["Array"]
  3752. }),
  3753. smalltalk.ReferencesBrowser);
  3754. smalltalk.addMethod(
  3755. "_setInputEvents",
  3756. smalltalk.method({
  3757. selector: "setInputEvents",
  3758. category: 'private',
  3759. fn: function (){
  3760. var self=this;
  3761. (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']);
  3762. return self;},
  3763. args: [],
  3764. source: "setInputEvents\x0a\x09input\x0a\x09\x09onKeyUp: [timer := [self search: input asJQuery val] valueWithTimeout: 100];\x0a\x09\x09onKeyDown: [timer ifNotNil: [timer clearTimeout]]",
  3765. messageSends: ["onKeyUp:", "valueWithTimeout:", "search:", "val", "asJQuery", "onKeyDown:", "ifNotNil:", "clearTimeout"],
  3766. referencedClasses: []
  3767. }),
  3768. smalltalk.ReferencesBrowser);
  3769. smalltalk.addMethod(
  3770. "_updateImplementorsList",
  3771. smalltalk.method({
  3772. selector: "updateImplementorsList",
  3773. category: 'updating',
  3774. fn: function (){
  3775. var self=this;
  3776. 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;
  3777. (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);})]);})]);
  3778. return self;},
  3779. args: [],
  3780. 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]]]",
  3781. messageSends: ["contents:", "class:", "with:", ",", "asString", "size", "implementors", "style:", "li", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  3782. referencedClasses: []
  3783. }),
  3784. smalltalk.ReferencesBrowser);
  3785. smalltalk.addMethod(
  3786. "_updateMatchesList",
  3787. smalltalk.method({
  3788. selector: "updateMatchesList",
  3789. category: 'updating',
  3790. fn: function (){
  3791. var self=this;
  3792. 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;
  3793. (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);})]);})]);
  3794. return self;},
  3795. args: [],
  3796. 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]]]",
  3797. messageSends: ["contents:", "class:", "with:", ",", "asString", "size", "matches", "style:", "li", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  3798. referencedClasses: []
  3799. }),
  3800. smalltalk.ReferencesBrowser);
  3801. smalltalk.addMethod(
  3802. "_updateReferencedClassesList",
  3803. smalltalk.method({
  3804. selector: "updateReferencedClassesList",
  3805. category: 'updating',
  3806. fn: function (){
  3807. var self=this;
  3808. 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", []));})]);})]);
  3809. return self;},
  3810. args: [],
  3811. 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]]]",
  3812. messageSends: ["contents:", "class:", "with:", ",", "asString", "size", "referencedClasses", "style:", "li", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  3813. referencedClasses: []
  3814. }),
  3815. smalltalk.ReferencesBrowser);
  3816. smalltalk.addMethod(
  3817. "_updateSendersList",
  3818. smalltalk.method({
  3819. selector: "updateSendersList",
  3820. category: 'updating',
  3821. fn: function (){
  3822. var self=this;
  3823. 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", []));})]);})]);
  3824. return self;},
  3825. args: [],
  3826. 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]]]",
  3827. messageSends: ["contents:", "class:", "with:", ",", "asString", "size", "senders", "style:", "li", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  3828. referencedClasses: []
  3829. }),
  3830. smalltalk.ReferencesBrowser);
  3831. smalltalk.addMethod(
  3832. "_search_",
  3833. smalltalk.method({
  3834. selector: "search:",
  3835. category: 'instance creation',
  3836. fn: function (aString){
  3837. var self=this;
  3838. return (function($rec){smalltalk.send($rec, "_searchReferencesFor_", [aString]);return smalltalk.send($rec, "_open", []);})(smalltalk.send(self, "_new", []));
  3839. return self;},
  3840. args: ["aString"],
  3841. source: "search: aString\x0a\x09^self new\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09open",
  3842. messageSends: ["searchReferencesFor:", "open", "new"],
  3843. referencedClasses: []
  3844. }),
  3845. smalltalk.ReferencesBrowser.klass);
  3846. smalltalk.addClass('TestRunner', smalltalk.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  3847. smalltalk.addMethod(
  3848. "_allClasses",
  3849. smalltalk.method({
  3850. selector: "allClasses",
  3851. category: 'accessing',
  3852. fn: function (){
  3853. var self=this;
  3854. return smalltalk.send((smalltalk.TestCase || TestCase), "_allSubclasses", []);
  3855. return self;},
  3856. args: [],
  3857. source: "allClasses\x0a\x09^TestCase allSubclasses",
  3858. messageSends: ["allSubclasses"],
  3859. referencedClasses: ["TestCase"]
  3860. }),
  3861. smalltalk.TestRunner);
  3862. smalltalk.addMethod(
  3863. "_classes",
  3864. smalltalk.method({
  3865. selector: "classes",
  3866. category: 'accessing',
  3867. fn: function (){
  3868. var self=this;
  3869. 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", [])]));})]);
  3870. return self;},
  3871. args: [],
  3872. source: "classes\x0a ^(self allClasses \x0a\x09select: [:each | self selectedCategories includes: each category])\x0a\x09sort: [:a :b | a name > b name]",
  3873. messageSends: ["sort:", "select:", "allClasses", "includes:", "selectedCategories", "category", ">", "name"],
  3874. referencedClasses: []
  3875. }),
  3876. smalltalk.TestRunner);
  3877. smalltalk.addMethod(
  3878. "_initialize",
  3879. smalltalk.method({
  3880. selector: "initialize",
  3881. category: 'initialization',
  3882. fn: function (){
  3883. var self=this;
  3884. smalltalk.send(self, "_initialize", [], smalltalk.TestRunner.superclass || nil);
  3885. (self['@result']=smalltalk.send((smalltalk.TestResult || TestResult), "_new", []));
  3886. return self;},
  3887. args: [],
  3888. source: "initialize\x0a\x09super initialize.\x0a\x09result := TestResult new",
  3889. messageSends: ["initialize", "new"],
  3890. referencedClasses: ["TestResult"]
  3891. }),
  3892. smalltalk.TestRunner);
  3893. smalltalk.addMethod(
  3894. "_isSelectedCategory_",
  3895. smalltalk.method({
  3896. selector: "isSelectedCategory:",
  3897. category: 'testing',
  3898. fn: function (aCategory){
  3899. var self=this;
  3900. return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [aCategory]);
  3901. return self;},
  3902. args: ["aCategory"],
  3903. source: "isSelectedCategory: aCategory\x0a\x09^(self selectedCategories includes: aCategory)",
  3904. messageSends: ["includes:", "selectedCategories"],
  3905. referencedClasses: []
  3906. }),
  3907. smalltalk.TestRunner);
  3908. smalltalk.addMethod(
  3909. "_isSelectedClass_",
  3910. smalltalk.method({
  3911. selector: "isSelectedClass:",
  3912. category: 'testing',
  3913. fn: function (aClass){
  3914. var self=this;
  3915. return smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_includes_", [aClass]);
  3916. return self;},
  3917. args: ["aClass"],
  3918. source: "isSelectedClass: aClass\x0a\x09^(self selectedClasses includes: aClass)",
  3919. messageSends: ["includes:", "selectedClasses"],
  3920. referencedClasses: []
  3921. }),
  3922. smalltalk.TestRunner);
  3923. smalltalk.addMethod(
  3924. "_label",
  3925. smalltalk.method({
  3926. selector: "label",
  3927. category: 'accessing',
  3928. fn: function (){
  3929. var self=this;
  3930. return "SUnit";
  3931. return self;},
  3932. args: [],
  3933. source: "label\x0a ^'SUnit'",
  3934. messageSends: [],
  3935. referencedClasses: []
  3936. }),
  3937. smalltalk.TestRunner);
  3938. smalltalk.addMethod(
  3939. "_packages",
  3940. smalltalk.method({
  3941. selector: "packages",
  3942. category: 'accessing',
  3943. fn: function (){
  3944. var self=this;
  3945. var packages=nil;
  3946. (packages=smalltalk.send((smalltalk.Array || Array), "_new", []));
  3947. 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", [])]);})]));})]);
  3948. return smalltalk.send(packages, "_sort", []);
  3949. return self;},
  3950. args: [],
  3951. 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",
  3952. messageSends: ["new", "do:", "allClasses", "ifFalse:", "includes:", "category", "add:", "sort"],
  3953. referencedClasses: ["Array"]
  3954. }),
  3955. smalltalk.TestRunner);
  3956. smalltalk.addMethod(
  3957. "_performFailure_",
  3958. smalltalk.method({
  3959. selector: "performFailure:",
  3960. category: 'actions',
  3961. fn: function (aTestCase){
  3962. var self=this;
  3963. smalltalk.send(aTestCase, "_perform_", [smalltalk.send(aTestCase, "_selector", [])]);
  3964. return self;},
  3965. args: ["aTestCase"],
  3966. source: "performFailure: aTestCase\x0a\x09aTestCase perform: aTestCase selector",
  3967. messageSends: ["perform:", "selector"],
  3968. referencedClasses: []
  3969. }),
  3970. smalltalk.TestRunner);
  3971. smalltalk.addMethod(
  3972. "_printErrors",
  3973. smalltalk.method({
  3974. selector: "printErrors",
  3975. category: 'printing',
  3976. fn: function (){
  3977. var self=this;
  3978. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_size", []), "_asString", []), "__comma", [" errors, "]);
  3979. return self;},
  3980. args: [],
  3981. source: "printErrors\x0a\x09^self result errors size asString , ' errors, '",
  3982. messageSends: [",", "asString", "size", "errors", "result"],
  3983. referencedClasses: []
  3984. }),
  3985. smalltalk.TestRunner);
  3986. smalltalk.addMethod(
  3987. "_printFailures",
  3988. smalltalk.method({
  3989. selector: "printFailures",
  3990. category: 'printing',
  3991. fn: function (){
  3992. var self=this;
  3993. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_size", []), "_asString", []), "__comma", [" failures"]);
  3994. return self;},
  3995. args: [],
  3996. source: "printFailures\x0a\x09^self result failures size asString, ' failures'",
  3997. messageSends: [",", "asString", "size", "failures", "result"],
  3998. referencedClasses: []
  3999. }),
  4000. smalltalk.TestRunner);
  4001. smalltalk.addMethod(
  4002. "_printPasses",
  4003. smalltalk.method({
  4004. selector: "printPasses",
  4005. category: 'printing',
  4006. fn: function (){
  4007. var self=this;
  4008. 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, "]);
  4009. return self;},
  4010. args: [],
  4011. source: "printPasses\x0a\x09^(self result total - self result errors size - self result failures size) asString , ' passes, '",
  4012. messageSends: [",", "asString", "-", "total", "result", "size", "errors", "failures"],
  4013. referencedClasses: []
  4014. }),
  4015. smalltalk.TestRunner);
  4016. smalltalk.addMethod(
  4017. "_printTotal",
  4018. smalltalk.method({
  4019. selector: "printTotal",
  4020. category: 'printing',
  4021. fn: function (){
  4022. var self=this;
  4023. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_total", []), "_asString", []), "__comma", [" runs, "]);
  4024. return self;},
  4025. args: [],
  4026. source: "printTotal\x0a\x09^self result total asString, ' runs, '",
  4027. messageSends: [",", "asString", "total", "result"],
  4028. referencedClasses: []
  4029. }),
  4030. smalltalk.TestRunner);
  4031. smalltalk.addMethod(
  4032. "_progressBar",
  4033. smalltalk.method({
  4034. selector: "progressBar",
  4035. category: 'accessing',
  4036. fn: function (){
  4037. var self=this;
  4038. return (($receiver = self['@progressBar']) == nil || $receiver == undefined) ? (function(){return (self['@progressBar']=smalltalk.send((smalltalk.ProgressBar || ProgressBar), "_new", []));})() : $receiver;
  4039. return self;},
  4040. args: [],
  4041. source: "progressBar\x0a\x09^progressBar ifNil: [progressBar := ProgressBar new]",
  4042. messageSends: ["ifNil:", "new"],
  4043. referencedClasses: ["ProgressBar"]
  4044. }),
  4045. smalltalk.TestRunner);
  4046. smalltalk.addMethod(
  4047. "_renderBoxOn_",
  4048. smalltalk.method({
  4049. selector: "renderBoxOn:",
  4050. category: 'rendering',
  4051. fn: function (html){
  4052. var self=this;
  4053. (function($rec){smalltalk.send($rec, "_renderCategoriesOn_", [html]);smalltalk.send($rec, "_renderClassesOn_", [html]);return smalltalk.send($rec, "_renderResultsOn_", [html]);})(self);
  4054. return self;},
  4055. args: ["html"],
  4056. source: "renderBoxOn: html\x0a self \x0a\x09renderCategoriesOn: html;\x0a\x09renderClassesOn: html;\x0a\x09renderResultsOn: html",
  4057. messageSends: ["renderCategoriesOn:", "renderClassesOn:", "renderResultsOn:"],
  4058. referencedClasses: []
  4059. }),
  4060. smalltalk.TestRunner);
  4061. smalltalk.addMethod(
  4062. "_renderButtonsOn_",
  4063. smalltalk.method({
  4064. selector: "renderButtonsOn:",
  4065. category: 'rendering',
  4066. fn: function (html){
  4067. var self=this;
  4068. (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", []));
  4069. return self;},
  4070. args: ["html"],
  4071. source: "renderButtonsOn: html\x0a html button\x0a\x09with: 'Run selected';\x0a\x09onClick: [self run: self testCases]",
  4072. messageSends: ["with:", "onClick:", "run:", "testCases", "button"],
  4073. referencedClasses: []
  4074. }),
  4075. smalltalk.TestRunner);
  4076. smalltalk.addMethod(
  4077. "_renderCategoriesOn_",
  4078. smalltalk.method({
  4079. selector: "renderCategoriesOn:",
  4080. category: 'rendering',
  4081. fn: function (html){
  4082. var self=this;
  4083. (self['@packagesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit packages"]));
  4084. smalltalk.send(self, "_updateCategoriesList", []);
  4085. return self;},
  4086. args: ["html"],
  4087. source: "renderCategoriesOn: html\x0a\x09packagesList := html ul class: 'amber_column sunit packages'.\x0a\x09self updateCategoriesList",
  4088. messageSends: ["class:", "ul", "updateCategoriesList"],
  4089. referencedClasses: []
  4090. }),
  4091. smalltalk.TestRunner);
  4092. smalltalk.addMethod(
  4093. "_renderClassesOn_",
  4094. smalltalk.method({
  4095. selector: "renderClassesOn:",
  4096. category: 'rendering',
  4097. fn: function (html){
  4098. var self=this;
  4099. (self['@classesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit classes"]));
  4100. smalltalk.send(self, "_updateClassesList", []);
  4101. return self;},
  4102. args: ["html"],
  4103. source: "renderClassesOn: html\x0a\x09classesList := html ul class: 'amber_column sunit classes'.\x0a\x09self updateClassesList",
  4104. messageSends: ["class:", "ul", "updateClassesList"],
  4105. referencedClasses: []
  4106. }),
  4107. smalltalk.TestRunner);
  4108. smalltalk.addMethod(
  4109. "_renderErrorsOn_",
  4110. smalltalk.method({
  4111. selector: "renderErrorsOn:",
  4112. category: 'rendering',
  4113. fn: function (html){
  4114. var self=this;
  4115. 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", []));})]);
  4116. return self;},
  4117. args: ["html"],
  4118. 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]]",
  4119. messageSends: ["do:", "errors", "result", "class:", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:", "li"],
  4120. referencedClasses: []
  4121. }),
  4122. smalltalk.TestRunner);
  4123. smalltalk.addMethod(
  4124. "_renderFailuresOn_",
  4125. smalltalk.method({
  4126. selector: "renderFailuresOn:",
  4127. category: 'rendering',
  4128. fn: function (html){
  4129. var self=this;
  4130. 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", []));})]);
  4131. return self;},
  4132. args: ["html"],
  4133. 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]]",
  4134. messageSends: ["do:", "failures", "result", "class:", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:", "li"],
  4135. referencedClasses: []
  4136. }),
  4137. smalltalk.TestRunner);
  4138. smalltalk.addMethod(
  4139. "_renderResultsOn_",
  4140. smalltalk.method({
  4141. selector: "renderResultsOn:",
  4142. category: 'rendering',
  4143. fn: function (html){
  4144. var self=this;
  4145. (self['@statusDiv']=smalltalk.send(html, "_div", []));
  4146. smalltalk.send(html, "_with_", [smalltalk.send(self, "_progressBar", [])]);
  4147. (self['@methodsList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit results"]));
  4148. smalltalk.send(self, "_updateMethodsList", []);
  4149. smalltalk.send(self, "_updateStatusDiv", []);
  4150. return self;},
  4151. args: ["html"],
  4152. 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",
  4153. messageSends: ["div", "with:", "progressBar", "class:", "ul", "updateMethodsList", "updateStatusDiv"],
  4154. referencedClasses: []
  4155. }),
  4156. smalltalk.TestRunner);
  4157. smalltalk.addMethod(
  4158. "_result",
  4159. smalltalk.method({
  4160. selector: "result",
  4161. category: 'accessing',
  4162. fn: function (){
  4163. var self=this;
  4164. return self['@result'];
  4165. return self;},
  4166. args: [],
  4167. source: "result\x0a\x09^result",
  4168. messageSends: [],
  4169. referencedClasses: []
  4170. }),
  4171. smalltalk.TestRunner);
  4172. smalltalk.addMethod(
  4173. "_run_",
  4174. smalltalk.method({
  4175. selector: "run:",
  4176. category: 'actions',
  4177. fn: function (aCollection){
  4178. var self=this;
  4179. (self['@result']=smalltalk.send((smalltalk.TestResult || TestResult), "_new", []));
  4180. (function($rec){smalltalk.send($rec, "_updateStatusDiv", []);return smalltalk.send($rec, "_updateMethodsList", []);})(self);
  4181. smalltalk.send(smalltalk.send(self, "_progressBar", []), "_updatePercent_", [(0)]);
  4182. smalltalk.send(self['@result'], "_total_", [smalltalk.send(aCollection, "_size", [])]);
  4183. 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)]);})]);
  4184. return self;},
  4185. args: ["aCollection"],
  4186. 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].",
  4187. messageSends: ["new", "updateStatusDiv", "updateMethodsList", "updatePercent:", "progressBar", "total:", "size", "do:", "valueWithTimeout:", "runCaseFor:", "*", "/", "runs", "total"],
  4188. referencedClasses: ["TestResult"]
  4189. }),
  4190. smalltalk.TestRunner);
  4191. smalltalk.addMethod(
  4192. "_selectAllCategories",
  4193. smalltalk.method({
  4194. selector: "selectAllCategories",
  4195. category: 'actions',
  4196. fn: function (){
  4197. var self=this;
  4198. 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]);})]));})]);
  4199. (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);
  4200. return self;},
  4201. args: [],
  4202. 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",
  4203. messageSends: ["do:", "packages", "ifFalse:", "includes:", "add:", "selectedCategories", "updateCategoriesList", "updateClassesList"],
  4204. referencedClasses: []
  4205. }),
  4206. smalltalk.TestRunner);
  4207. smalltalk.addMethod(
  4208. "_selectAllClasses",
  4209. smalltalk.method({
  4210. selector: "selectAllClasses",
  4211. category: 'actions',
  4212. fn: function (){
  4213. var self=this;
  4214. 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]);})]));})]);
  4215. (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);
  4216. return self;},
  4217. args: [],
  4218. 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",
  4219. messageSends: ["do:", "classes", "ifFalse:", "includes:", "add:", "selectedClasses", "updateCategoriesList", "updateClassesList"],
  4220. referencedClasses: []
  4221. }),
  4222. smalltalk.TestRunner);
  4223. smalltalk.addMethod(
  4224. "_selectedCategories",
  4225. smalltalk.method({
  4226. selector: "selectedCategories",
  4227. category: 'accessing',
  4228. fn: function (){
  4229. var self=this;
  4230. return (($receiver = self['@selectedCategories']) == nil || $receiver == undefined) ? (function(){return (self['@selectedCategories']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver;
  4231. return self;},
  4232. args: [],
  4233. source: "selectedCategories\x0a\x09^selectedCategories ifNil: [selectedCategories := Array new]",
  4234. messageSends: ["ifNil:", "new"],
  4235. referencedClasses: ["Array"]
  4236. }),
  4237. smalltalk.TestRunner);
  4238. smalltalk.addMethod(
  4239. "_selectedClasses",
  4240. smalltalk.method({
  4241. selector: "selectedClasses",
  4242. category: 'accessing',
  4243. fn: function (){
  4244. var self=this;
  4245. return (($receiver = self['@selectedClasses']) == nil || $receiver == undefined) ? (function(){return (self['@selectedClasses']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver;
  4246. return self;},
  4247. args: [],
  4248. source: "selectedClasses\x0a\x09^selectedClasses ifNil: [selectedClasses := Array new]",
  4249. messageSends: ["ifNil:", "new"],
  4250. referencedClasses: ["Array"]
  4251. }),
  4252. smalltalk.TestRunner);
  4253. smalltalk.addMethod(
  4254. "_statusInfo",
  4255. smalltalk.method({
  4256. selector: "statusInfo",
  4257. category: 'accessing',
  4258. fn: function (){
  4259. var self=this;
  4260. 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", [])]);
  4261. return self;},
  4262. args: [],
  4263. source: "statusInfo\x0a\x09^self printTotal, self printPasses, self printErrors, self printFailures",
  4264. messageSends: [",", "printTotal", "printPasses", "printErrors", "printFailures"],
  4265. referencedClasses: []
  4266. }),
  4267. smalltalk.TestRunner);
  4268. smalltalk.addMethod(
  4269. "_testCases",
  4270. smalltalk.method({
  4271. selector: "testCases",
  4272. category: 'accessing',
  4273. fn: function (){
  4274. var self=this;
  4275. var testCases=nil;
  4276. (testCases=[]);
  4277. smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_do_", [(function(each){return smalltalk.send(testCases, "_addAll_", [smalltalk.send(each, "_buildSuite", [])]);})]);
  4278. return testCases;
  4279. return self;},
  4280. args: [],
  4281. source: "testCases\x0a\x09| testCases |\x0a\x09testCases := #().\x0a\x09self selectedClasses do: [:each | testCases addAll: each buildSuite].\x0a\x09^testCases",
  4282. messageSends: ["do:", "selectedClasses", "addAll:", "buildSuite"],
  4283. referencedClasses: []
  4284. }),
  4285. smalltalk.TestRunner);
  4286. smalltalk.addMethod(
  4287. "_toggleCategory_",
  4288. smalltalk.method({
  4289. selector: "toggleCategory:",
  4290. category: 'actions',
  4291. fn: function (aCategory){
  4292. var self=this;
  4293. ((($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]);})]));
  4294. (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);
  4295. return self;},
  4296. args: ["aCategory"],
  4297. 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",
  4298. messageSends: ["ifFalse:ifTrue:", "isSelectedCategory:", "add:", "remove:", "updateCategoriesList", "updateClassesList"],
  4299. referencedClasses: []
  4300. }),
  4301. smalltalk.TestRunner);
  4302. smalltalk.addMethod(
  4303. "_toggleClass_",
  4304. smalltalk.method({
  4305. selector: "toggleClass:",
  4306. category: 'actions',
  4307. fn: function (aClass){
  4308. var self=this;
  4309. ((($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]);})]));
  4310. smalltalk.send(self, "_updateClassesList", []);
  4311. return self;},
  4312. args: ["aClass"],
  4313. 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",
  4314. messageSends: ["ifFalse:ifTrue:", "isSelectedClass:", "add:", "remove:", "updateClassesList"],
  4315. referencedClasses: []
  4316. }),
  4317. smalltalk.TestRunner);
  4318. smalltalk.addMethod(
  4319. "_updateCategoriesList",
  4320. smalltalk.method({
  4321. selector: "updateCategoriesList",
  4322. category: 'updating',
  4323. fn: function (){
  4324. var self=this;
  4325. 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;
  4326. (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);})]);})]);
  4327. return self;},
  4328. args: [],
  4329. 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]]]",
  4330. messageSends: ["contents:", "class:", "with:", "onClick:", "selectAllCategories", "li", "do:", "packages", "ifTrue:", "includes:", "selectedCategories", "toggleCategory:"],
  4331. referencedClasses: []
  4332. }),
  4333. smalltalk.TestRunner);
  4334. smalltalk.addMethod(
  4335. "_updateClassesList",
  4336. smalltalk.method({
  4337. selector: "updateClassesList",
  4338. category: 'updating',
  4339. fn: function (){
  4340. var self=this;
  4341. 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;
  4342. (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);})]);})]);
  4343. return self;},
  4344. args: [],
  4345. 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]]]",
  4346. messageSends: ["contents:", "ifFalse:", "isEmpty", "selectedCategories", "class:", "with:", "onClick:", "selectAllClasses", "li", "do:", "classes", "ifTrue:", "includes:", "selectedClasses", "name", "toggleClass:"],
  4347. referencedClasses: []
  4348. }),
  4349. smalltalk.TestRunner);
  4350. smalltalk.addMethod(
  4351. "_updateMethodsList",
  4352. smalltalk.method({
  4353. selector: "updateMethodsList",
  4354. category: 'updating',
  4355. fn: function (){
  4356. var self=this;
  4357. smalltalk.send(self['@methodsList'], "_contents_", [(function(html){smalltalk.send(self, "_renderErrorsOn_", [html]);return smalltalk.send(self, "_renderFailuresOn_", [html]);})]);
  4358. return self;},
  4359. args: [],
  4360. source: "updateMethodsList\x0a\x09methodsList contents: [:html |\x0a\x09\x09self renderErrorsOn: html.\x0a self renderFailuresOn: html]",
  4361. messageSends: ["contents:", "renderErrorsOn:", "renderFailuresOn:"],
  4362. referencedClasses: []
  4363. }),
  4364. smalltalk.TestRunner);
  4365. smalltalk.addMethod(
  4366. "_updateStatusDiv",
  4367. smalltalk.method({
  4368. selector: "updateStatusDiv",
  4369. category: 'updating',
  4370. fn: function (){
  4371. var self=this;
  4372. smalltalk.send(self['@statusDiv'], "_class_", [smalltalk.send("sunit status ", "__comma", [smalltalk.send(self['@result'], "_status", [])])]);
  4373. smalltalk.send(self['@statusDiv'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(html, "_span", []), "_with_", [smalltalk.send(self, "_statusInfo", [])]);})]);
  4374. return self;},
  4375. args: [],
  4376. source: "updateStatusDiv\x0a\x09statusDiv class: 'sunit status ', result status.\x0a\x09statusDiv contents: [:html |\x0a\x09\x09html span with: self statusInfo]",
  4377. messageSends: ["class:", ",", "status", "contents:", "with:", "span", "statusInfo"],
  4378. referencedClasses: []
  4379. }),
  4380. smalltalk.TestRunner);
  4381. smalltalk.addClass('Workspace', smalltalk.TabWidget, ['sourceArea'], 'IDE');
  4382. smalltalk.addMethod(
  4383. "_clearWorkspace",
  4384. smalltalk.method({
  4385. selector: "clearWorkspace",
  4386. category: 'actions',
  4387. fn: function (){
  4388. var self=this;
  4389. smalltalk.send(self['@sourceArea'], "_clear", []);
  4390. return self;},
  4391. args: [],
  4392. source: "clearWorkspace\x0a sourceArea clear",
  4393. messageSends: ["clear"],
  4394. referencedClasses: []
  4395. }),
  4396. smalltalk.Workspace);
  4397. smalltalk.addMethod(
  4398. "_doIt",
  4399. smalltalk.method({
  4400. selector: "doIt",
  4401. category: 'actions',
  4402. fn: function (){
  4403. var self=this;
  4404. smalltalk.send(self['@sourceArea'], "_doIt", []);
  4405. return self;},
  4406. args: [],
  4407. source: "doIt\x0a sourceArea doIt",
  4408. messageSends: ["doIt"],
  4409. referencedClasses: []
  4410. }),
  4411. smalltalk.Workspace);
  4412. smalltalk.addMethod(
  4413. "_fileIn",
  4414. smalltalk.method({
  4415. selector: "fileIn",
  4416. category: 'actions',
  4417. fn: function (){
  4418. var self=this;
  4419. smalltalk.send(self['@sourceArea'], "_fileIn", []);
  4420. return self;},
  4421. args: [],
  4422. source: "fileIn\x0a sourceArea fileIn",
  4423. messageSends: ["fileIn"],
  4424. referencedClasses: []
  4425. }),
  4426. smalltalk.Workspace);
  4427. smalltalk.addMethod(
  4428. "_inspectIt",
  4429. smalltalk.method({
  4430. selector: "inspectIt",
  4431. category: 'actions',
  4432. fn: function (){
  4433. var self=this;
  4434. smalltalk.send(self['@sourceArea'], "_inspectIt", []);
  4435. return self;},
  4436. args: [],
  4437. source: "inspectIt\x0a sourceArea inspectIt",
  4438. messageSends: ["inspectIt"],
  4439. referencedClasses: []
  4440. }),
  4441. smalltalk.Workspace);
  4442. smalltalk.addMethod(
  4443. "_label",
  4444. smalltalk.method({
  4445. selector: "label",
  4446. category: 'accessing',
  4447. fn: function (){
  4448. var self=this;
  4449. return "Workspace";
  4450. return self;},
  4451. args: [],
  4452. source: "label\x0a ^'Workspace'",
  4453. messageSends: [],
  4454. referencedClasses: []
  4455. }),
  4456. smalltalk.Workspace);
  4457. smalltalk.addMethod(
  4458. "_printIt",
  4459. smalltalk.method({
  4460. selector: "printIt",
  4461. category: 'actions',
  4462. fn: function (){
  4463. var self=this;
  4464. smalltalk.send(self['@sourceArea'], "_printIt", []);
  4465. return self;},
  4466. args: [],
  4467. source: "printIt\x0a\x09sourceArea printIt",
  4468. messageSends: ["printIt"],
  4469. referencedClasses: []
  4470. }),
  4471. smalltalk.Workspace);
  4472. smalltalk.addMethod(
  4473. "_renderBoxOn_",
  4474. smalltalk.method({
  4475. selector: "renderBoxOn:",
  4476. category: 'rendering',
  4477. fn: function (html){
  4478. var self=this;
  4479. (self['@sourceArea']=smalltalk.send((smalltalk.SourceArea || SourceArea), "_new", []));
  4480. smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);
  4481. return self;},
  4482. args: ["html"],
  4483. source: "renderBoxOn: html\x0a sourceArea := SourceArea new.\x0a sourceArea renderOn: html",
  4484. messageSends: ["new", "renderOn:"],
  4485. referencedClasses: ["SourceArea"]
  4486. }),
  4487. smalltalk.Workspace);
  4488. smalltalk.addMethod(
  4489. "_renderButtonsOn_",
  4490. smalltalk.method({
  4491. selector: "renderButtonsOn:",
  4492. category: 'rendering',
  4493. fn: function (html){
  4494. var self=this;
  4495. (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", []));
  4496. (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", []));
  4497. (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", []));
  4498. (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", []));
  4499. (function($rec){smalltalk.send($rec, "_with_", ["Clear workspace"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_clearWorkspace", []);})]);})(smalltalk.send(html, "_button", []));
  4500. return self;},
  4501. args: ["html"],
  4502. 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]",
  4503. messageSends: ["with:", "title:", "onClick:", "doIt", "button", "printIt", "inspectIt", "fileIn", "clearWorkspace"],
  4504. referencedClasses: []
  4505. }),
  4506. smalltalk.Workspace);
  4507. smalltalk.addMethod(
  4508. "_inspect",
  4509. smalltalk.method({
  4510. selector: "inspect",
  4511. category: '*IDE',
  4512. fn: function (){
  4513. var self=this;
  4514. (function($rec){smalltalk.send($rec, "_inspect_", [self]);return smalltalk.send($rec, "_open", []);})(smalltalk.send((smalltalk.Inspector || Inspector), "_new", []));
  4515. return self;},
  4516. args: [],
  4517. source: "inspect\x0a\x09Inspector new \x0a\x09\x09inspect: self;\x0a\x09\x09open",
  4518. messageSends: ["inspect:", "open", "new"],
  4519. referencedClasses: ["Inspector"]
  4520. }),
  4521. smalltalk.Object);
  4522. smalltalk.addMethod(
  4523. "_inspectOn_",
  4524. smalltalk.method({
  4525. selector: "inspectOn:",
  4526. category: '*IDE',
  4527. fn: function (anInspector){
  4528. var self=this;
  4529. var variables=nil;
  4530. (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
  4531. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4532. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_allInstanceVariableNames", []), "_do_", [(function(each){return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);})]);
  4533. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  4534. return self;},
  4535. args: ["anInspector"],
  4536. 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",
  4537. messageSends: ["new", "at:put:", "do:", "allInstanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"],
  4538. referencedClasses: ["Dictionary"]
  4539. }),
  4540. smalltalk.Object);
  4541. smalltalk.addMethod(
  4542. "_inspectOn_",
  4543. smalltalk.method({
  4544. selector: "inspectOn:",
  4545. category: '*IDE',
  4546. fn: function (anInspector){
  4547. var self=this;
  4548. var variables=nil;
  4549. (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
  4550. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4551. smalltalk.send(self, "_withIndexDo_", [(function(each, i){return smalltalk.send(variables, "_at_put_", [i, each]);})]);
  4552. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  4553. return self;},
  4554. args: ["anInspector"],
  4555. 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",
  4556. messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"],
  4557. referencedClasses: ["Dictionary"]
  4558. }),
  4559. smalltalk.Collection);
  4560. smalltalk.addMethod(
  4561. "_inspectOn_",
  4562. smalltalk.method({
  4563. selector: "inspectOn:",
  4564. category: '*IDE',
  4565. fn: function (anInspector){
  4566. var self=this;
  4567. var variables=nil;
  4568. (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
  4569. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4570. smalltalk.send(variables, "_at_put_", ["#keys", smalltalk.send(self, "_keys", [])]);
  4571. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(variables, "_at_put_", [key, value]);})]);
  4572. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  4573. return self;},
  4574. args: ["anInspector"],
  4575. 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",
  4576. messageSends: ["new", "at:put:", "keys", "keysAndValuesDo:", "setLabel:", "printString", "setVariables:"],
  4577. referencedClasses: ["Dictionary"]
  4578. }),
  4579. smalltalk.HashedCollection);
  4580. smalltalk.addMethod(
  4581. "_inspectOn_",
  4582. smalltalk.method({
  4583. selector: "inspectOn:",
  4584. category: '*IDE',
  4585. fn: function (anInspector){
  4586. var self=this;
  4587. var label=nil;
  4588. smalltalk.send(self, "_inspectOn_", [anInspector], smalltalk.String.superclass || nil);
  4589. ((($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", []));})]));
  4590. smalltalk.send(anInspector, "_setLabel_", [label]);
  4591. return self;},
  4592. args: ["anInspector"],
  4593. 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",
  4594. messageSends: ["inspectOn:", "ifTrue:ifFalse:", ">", "size", "printString", ",", "copyFrom:to:", "setLabel:"],
  4595. referencedClasses: []
  4596. }),
  4597. smalltalk.String);
  4598. smalltalk.addMethod(
  4599. "_inspectOn_",
  4600. smalltalk.method({
  4601. selector: "inspectOn:",
  4602. category: '*IDE',
  4603. fn: function (anInspector){
  4604. var self=this;
  4605. var variables=nil;
  4606. (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
  4607. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4608. smalltalk.send(self['@elements'], "_withIndexDo_", [(function(each, i){return smalltalk.send(variables, "_at_put_", [i, each]);})]);
  4609. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  4610. return self;},
  4611. args: ["anInspector"],
  4612. 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",
  4613. messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"],
  4614. referencedClasses: ["Dictionary"]
  4615. }),
  4616. smalltalk.Set);
  4617. smalltalk.addMethod(
  4618. "_inspectOn_",
  4619. smalltalk.method({
  4620. selector: "inspectOn:",
  4621. category: '*IDE',
  4622. fn: function (anInspector){
  4623. var self=this;
  4624. var variables=nil;
  4625. (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
  4626. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4627. smalltalk.send(variables, "_at_put_", ["#year", smalltalk.send(self, "_year", [])]);
  4628. smalltalk.send(variables, "_at_put_", ["#month", smalltalk.send(self, "_month", [])]);
  4629. smalltalk.send(variables, "_at_put_", ["#day", smalltalk.send(self, "_day", [])]);
  4630. smalltalk.send(variables, "_at_put_", ["#hours", smalltalk.send(self, "_hours", [])]);
  4631. smalltalk.send(variables, "_at_put_", ["#minutes", smalltalk.send(self, "_minutes", [])]);
  4632. smalltalk.send(variables, "_at_put_", ["#seconds", smalltalk.send(self, "_seconds", [])]);
  4633. smalltalk.send(variables, "_at_put_", ["#milliseconds", smalltalk.send(self, "_milliseconds", [])]);
  4634. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  4635. return self;},
  4636. args: ["anInspector"],
  4637. 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",
  4638. messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"],
  4639. referencedClasses: ["Dictionary"]
  4640. }),
  4641. smalltalk.Date);
  4642. smalltalk.addMethod(
  4643. "_inspectOn_",
  4644. smalltalk.method({
  4645. selector: "inspectOn:",
  4646. category: '*IDE',
  4647. fn: function (anInspector){
  4648. var self=this;
  4649. var variables=nil;
  4650. (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
  4651. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4652. smalltalk.send(variables, "_at_put_", ["#year", smalltalk.send(self, "_year", [])]);
  4653. smalltalk.send(variables, "_at_put_", ["#month", smalltalk.send(self, "_month", [])]);
  4654. smalltalk.send(variables, "_at_put_", ["#day", smalltalk.send(self, "_day", [])]);
  4655. smalltalk.send(variables, "_at_put_", ["#hours", smalltalk.send(self, "_hours", [])]);
  4656. smalltalk.send(variables, "_at_put_", ["#minutes", smalltalk.send(self, "_minutes", [])]);
  4657. smalltalk.send(variables, "_at_put_", ["#seconds", smalltalk.send(self, "_seconds", [])]);
  4658. smalltalk.send(variables, "_at_put_", ["#milliseconds", smalltalk.send(self, "_milliseconds", [])]);
  4659. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  4660. return self;},
  4661. args: ["anInspector"],
  4662. 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",
  4663. messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"],
  4664. referencedClasses: ["Dictionary"]
  4665. }),
  4666. smalltalk.Date);
  4667. smalltalk.addMethod(
  4668. "_inspectOn_",
  4669. smalltalk.method({
  4670. selector: "inspectOn:",
  4671. category: '*IDE',
  4672. fn: function (anInspector){
  4673. var self=this;
  4674. var variables=nil;
  4675. (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
  4676. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4677. smalltalk.send(variables, "_at_put_", ["#home", smalltalk.send(self, "_home", [])]);
  4678. smalltalk.send(variables, "_at_put_", ["#receiver", smalltalk.send(self, "_receiver", [])]);
  4679. smalltalk.send(variables, "_at_put_", ["#selector", smalltalk.send(self, "_selector", [])]);
  4680. smalltalk.send(variables, "_at_put_", ["#temps", smalltalk.send(self, "_temps", [])]);
  4681. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_instanceVariableNames", []), "_do_", [(function(each){return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);})]);
  4682. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  4683. return self;},
  4684. args: ["anInspector"],
  4685. 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",
  4686. messageSends: ["new", "at:put:", "home", "receiver", "selector", "temps", "do:", "instanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"],
  4687. referencedClasses: ["Dictionary"]
  4688. }),
  4689. smalltalk.MethodContext);