Helios-Browser.js 169 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459
  1. smalltalk.addPackage('Helios-Browser');
  2. smalltalk.addClass('HLBrowser', smalltalk.HLWidget, ['model', 'packagesListWidget', 'classesListWidget', 'protocolsListWidget', 'methodsListWidget', 'sourceWidget'], 'Helios-Browser');
  3. smalltalk.addMethod(
  4. smalltalk.method({
  5. selector: "announcer",
  6. category: 'accessing',
  7. fn: function (){
  8. var self=this;
  9. return smalltalk.withContext(function($ctx1) {
  10. var $1;
  11. $1=_st(_st(self)._model())._announcer();
  12. return $1;
  13. }, function($ctx1) {$ctx1.fill(self,"announcer",{},smalltalk.HLBrowser)})},
  14. args: [],
  15. source: "announcer\x0a\x09^ self model announcer",
  16. messageSends: ["announcer", "model"],
  17. referencedClasses: []
  18. }),
  19. smalltalk.HLBrowser);
  20. smalltalk.addMethod(
  21. smalltalk.method({
  22. selector: "canHaveFocus",
  23. category: 'testing',
  24. fn: function (){
  25. var self=this;
  26. return smalltalk.withContext(function($ctx1) {
  27. return true;
  28. }, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLBrowser)})},
  29. args: [],
  30. source: "canHaveFocus\x0a\x09^ true",
  31. messageSends: [],
  32. referencedClasses: []
  33. }),
  34. smalltalk.HLBrowser);
  35. smalltalk.addMethod(
  36. smalltalk.method({
  37. selector: "classesListWidget",
  38. category: 'widgets',
  39. fn: function (){
  40. var self=this;
  41. function $HLClassesListWidget(){return smalltalk.HLClassesListWidget||(typeof HLClassesListWidget=="undefined"?nil:HLClassesListWidget)}
  42. return smalltalk.withContext(function($ctx1) {
  43. var $2,$1;
  44. $2=self["@classesListWidget"];
  45. if(($receiver = $2) == nil || $receiver == undefined){
  46. self["@classesListWidget"]=_st($HLClassesListWidget())._on_(_st(self)._model());
  47. self["@classesListWidget"];
  48. $1=_st(self["@classesListWidget"])._next_(_st(self)._protocolsListWidget());
  49. } else {
  50. $1=$2;
  51. };
  52. return $1;
  53. }, function($ctx1) {$ctx1.fill(self,"classesListWidget",{},smalltalk.HLBrowser)})},
  54. args: [],
  55. source: "classesListWidget\x0a\x09^ classesListWidget ifNil: [\x0a \x09classesListWidget := HLClassesListWidget on: self model.\x0a\x09\x09classesListWidget next: self protocolsListWidget ]",
  56. messageSends: ["ifNil:", "on:", "model", "next:", "protocolsListWidget"],
  57. referencedClasses: ["HLClassesListWidget"]
  58. }),
  59. smalltalk.HLBrowser);
  60. smalltalk.addMethod(
  61. smalltalk.method({
  62. selector: "environment",
  63. category: 'accessing',
  64. fn: function (){
  65. var self=this;
  66. return smalltalk.withContext(function($ctx1) {
  67. var $1;
  68. $1=_st(_st(self)._model())._environment();
  69. return $1;
  70. }, function($ctx1) {$ctx1.fill(self,"environment",{},smalltalk.HLBrowser)})},
  71. args: [],
  72. source: "environment\x0a\x09^ self model environment",
  73. messageSends: ["environment", "model"],
  74. referencedClasses: []
  75. }),
  76. smalltalk.HLBrowser);
  77. smalltalk.addMethod(
  78. smalltalk.method({
  79. selector: "focus",
  80. category: 'actions',
  81. fn: function (){
  82. var self=this;
  83. return smalltalk.withContext(function($ctx1) {
  84. var $1;
  85. $1=_st(_st(self)._packagesListWidget())._focus();
  86. return $1;
  87. }, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLBrowser)})},
  88. args: [],
  89. source: "focus\x0a\x09^ self packagesListWidget focus",
  90. messageSends: ["focus", "packagesListWidget"],
  91. referencedClasses: []
  92. }),
  93. smalltalk.HLBrowser);
  94. smalltalk.addMethod(
  95. smalltalk.method({
  96. selector: "methodsListWidget",
  97. category: 'widgets',
  98. fn: function (){
  99. var self=this;
  100. function $HLMethodsListWidget(){return smalltalk.HLMethodsListWidget||(typeof HLMethodsListWidget=="undefined"?nil:HLMethodsListWidget)}
  101. return smalltalk.withContext(function($ctx1) {
  102. var $2,$1;
  103. $2=self["@methodsListWidget"];
  104. if(($receiver = $2) == nil || $receiver == undefined){
  105. self["@methodsListWidget"]=_st($HLMethodsListWidget())._on_(_st(self)._model());
  106. self["@methodsListWidget"];
  107. $1=_st(self["@methodsListWidget"])._next_(_st(self)._sourceWidget());
  108. } else {
  109. $1=$2;
  110. };
  111. return $1;
  112. }, function($ctx1) {$ctx1.fill(self,"methodsListWidget",{},smalltalk.HLBrowser)})},
  113. args: [],
  114. source: "methodsListWidget\x0a\x09^ methodsListWidget ifNil: [\x0a \x09methodsListWidget := HLMethodsListWidget on: self model.\x0a\x09\x09methodsListWidget next: self sourceWidget]",
  115. messageSends: ["ifNil:", "on:", "model", "next:", "sourceWidget"],
  116. referencedClasses: ["HLMethodsListWidget"]
  117. }),
  118. smalltalk.HLBrowser);
  119. smalltalk.addMethod(
  120. smalltalk.method({
  121. selector: "model",
  122. category: 'accessing',
  123. fn: function (){
  124. var self=this;
  125. function $HLBrowserModel(){return smalltalk.HLBrowserModel||(typeof HLBrowserModel=="undefined"?nil:HLBrowserModel)}
  126. return smalltalk.withContext(function($ctx1) {
  127. var $2,$1;
  128. $2=self["@model"];
  129. if(($receiver = $2) == nil || $receiver == undefined){
  130. self["@model"]=_st($HLBrowserModel())._new();
  131. $1=self["@model"];
  132. } else {
  133. $1=$2;
  134. };
  135. return $1;
  136. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLBrowser)})},
  137. args: [],
  138. source: "model\x0a\x09^ model ifNil: [ model := HLBrowserModel new ]",
  139. messageSends: ["ifNil:", "new"],
  140. referencedClasses: ["HLBrowserModel"]
  141. }),
  142. smalltalk.HLBrowser);
  143. smalltalk.addMethod(
  144. smalltalk.method({
  145. selector: "model:",
  146. category: 'accessing',
  147. fn: function (aModel){
  148. var self=this;
  149. return smalltalk.withContext(function($ctx1) {
  150. self["@model"]=aModel;
  151. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLBrowser)})},
  152. args: ["aModel"],
  153. source: "model: aModel\x0a\x09model := aModel",
  154. messageSends: [],
  155. referencedClasses: []
  156. }),
  157. smalltalk.HLBrowser);
  158. smalltalk.addMethod(
  159. smalltalk.method({
  160. selector: "packagesListWidget",
  161. category: 'widgets',
  162. fn: function (){
  163. var self=this;
  164. function $HLPackagesListWidget(){return smalltalk.HLPackagesListWidget||(typeof HLPackagesListWidget=="undefined"?nil:HLPackagesListWidget)}
  165. return smalltalk.withContext(function($ctx1) {
  166. var $2,$1;
  167. $2=self["@packagesListWidget"];
  168. if(($receiver = $2) == nil || $receiver == undefined){
  169. self["@packagesListWidget"]=_st($HLPackagesListWidget())._on_(_st(self)._model());
  170. self["@packagesListWidget"];
  171. $1=_st(self["@packagesListWidget"])._next_(_st(self)._classesListWidget());
  172. } else {
  173. $1=$2;
  174. };
  175. return $1;
  176. }, function($ctx1) {$ctx1.fill(self,"packagesListWidget",{},smalltalk.HLBrowser)})},
  177. args: [],
  178. source: "packagesListWidget\x0a\x09^ packagesListWidget ifNil: [\x0a \x09packagesListWidget := HLPackagesListWidget on: self model.\x0a\x09\x09packagesListWidget next: self classesListWidget ]",
  179. messageSends: ["ifNil:", "on:", "model", "next:", "classesListWidget"],
  180. referencedClasses: ["HLPackagesListWidget"]
  181. }),
  182. smalltalk.HLBrowser);
  183. smalltalk.addMethod(
  184. smalltalk.method({
  185. selector: "protocolsListWidget",
  186. category: 'widgets',
  187. fn: function (){
  188. var self=this;
  189. function $HLProtocolsListWidget(){return smalltalk.HLProtocolsListWidget||(typeof HLProtocolsListWidget=="undefined"?nil:HLProtocolsListWidget)}
  190. return smalltalk.withContext(function($ctx1) {
  191. var $2,$1;
  192. $2=self["@protocolsListWidget"];
  193. if(($receiver = $2) == nil || $receiver == undefined){
  194. self["@protocolsListWidget"]=_st($HLProtocolsListWidget())._on_(_st(self)._model());
  195. self["@protocolsListWidget"];
  196. $1=_st(self["@protocolsListWidget"])._next_(_st(self)._methodsListWidget());
  197. } else {
  198. $1=$2;
  199. };
  200. return $1;
  201. }, function($ctx1) {$ctx1.fill(self,"protocolsListWidget",{},smalltalk.HLBrowser)})},
  202. args: [],
  203. source: "protocolsListWidget\x0a\x09^ protocolsListWidget ifNil: [\x0a \x09protocolsListWidget := HLProtocolsListWidget on: self model.\x0a\x09\x09protocolsListWidget next: self methodsListWidget ]",
  204. messageSends: ["ifNil:", "on:", "model", "next:", "methodsListWidget"],
  205. referencedClasses: ["HLProtocolsListWidget"]
  206. }),
  207. smalltalk.HLBrowser);
  208. smalltalk.addMethod(
  209. smalltalk.method({
  210. selector: "registerBindingsOn:",
  211. category: 'keybindings',
  212. fn: function (aBindingGroup){
  213. var self=this;
  214. function $HLBrowserCommand(){return smalltalk.HLBrowserCommand||(typeof HLBrowserCommand=="undefined"?nil:HLBrowserCommand)}
  215. return smalltalk.withContext(function($ctx1) {
  216. _st($HLBrowserCommand())._registerConcreteClassesOn_for_(aBindingGroup,_st(self)._model());
  217. return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup},smalltalk.HLBrowser)})},
  218. args: ["aBindingGroup"],
  219. source: "registerBindingsOn: aBindingGroup\x0a\x09HLBrowserCommand \x0a\x09\x09registerConcreteClassesOn: aBindingGroup \x0a\x09\x09for: self model",
  220. messageSends: ["registerConcreteClassesOn:for:", "model"],
  221. referencedClasses: ["HLBrowserCommand"]
  222. }),
  223. smalltalk.HLBrowser);
  224. smalltalk.addMethod(
  225. smalltalk.method({
  226. selector: "renderContentOn:",
  227. category: 'rendering',
  228. fn: function (html){
  229. var self=this;
  230. function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  231. function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  232. function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  233. return smalltalk.withContext(function($ctx1) {
  234. _st(html)._with_(_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(_st(self)._packagesListWidget(),_st(self)._classesListWidget()),_st($HLVerticalSplitter())._with_with_(_st(self)._protocolsListWidget(),_st(self)._methodsListWidget())),_st(self)._sourceWidget())));
  235. _st(_st(self)._packagesListWidget())._focus();
  236. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLBrowser)})},
  237. args: ["html"],
  238. source: "renderContentOn: html\x0a\x09html with: (HLContainer with: (HLHorizontalSplitter \x0a \x09with: (HLVerticalSplitter\x0a \x09with: (HLVerticalSplitter\x0a \x09with: self packagesListWidget\x0a with: self classesListWidget)\x0a with: (HLVerticalSplitter\x0a \x09with: self protocolsListWidget\x0a with: self methodsListWidget)) \x0a with: self sourceWidget)).\x0a\x09\x0a\x09self packagesListWidget focus",
  239. messageSends: ["with:", "with:with:", "packagesListWidget", "classesListWidget", "protocolsListWidget", "methodsListWidget", "sourceWidget", "focus"],
  240. referencedClasses: ["HLVerticalSplitter", "HLHorizontalSplitter", "HLContainer"]
  241. }),
  242. smalltalk.HLBrowser);
  243. smalltalk.addMethod(
  244. smalltalk.method({
  245. selector: "sourceWidget",
  246. category: 'widgets',
  247. fn: function (){
  248. var self=this;
  249. function $HLBrowserSourceWidget(){return smalltalk.HLBrowserSourceWidget||(typeof HLBrowserSourceWidget=="undefined"?nil:HLBrowserSourceWidget)}
  250. return smalltalk.withContext(function($ctx1) {
  251. var $2,$1;
  252. $2=self["@sourceWidget"];
  253. if(($receiver = $2) == nil || $receiver == undefined){
  254. self["@sourceWidget"]=_st($HLBrowserSourceWidget())._on_(_st(self)._model());
  255. $1=self["@sourceWidget"];
  256. } else {
  257. $1=$2;
  258. };
  259. return $1;
  260. }, function($ctx1) {$ctx1.fill(self,"sourceWidget",{},smalltalk.HLBrowser)})},
  261. args: [],
  262. source: "sourceWidget\x0a\x09^ sourceWidget ifNil: [\x0a \x09sourceWidget := HLBrowserSourceWidget on: self model ]",
  263. messageSends: ["ifNil:", "on:", "model"],
  264. referencedClasses: ["HLBrowserSourceWidget"]
  265. }),
  266. smalltalk.HLBrowser);
  267. smalltalk.HLBrowser.klass.iVarNames = ['nextId'];
  268. smalltalk.addMethod(
  269. smalltalk.method({
  270. selector: "canBeOpenAsTab",
  271. category: 'testing',
  272. fn: function (){
  273. var self=this;
  274. return smalltalk.withContext(function($ctx1) {
  275. return true;
  276. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLBrowser.klass)})},
  277. args: [],
  278. source: "canBeOpenAsTab\x0a\x09^ true",
  279. messageSends: [],
  280. referencedClasses: []
  281. }),
  282. smalltalk.HLBrowser.klass);
  283. smalltalk.addMethod(
  284. smalltalk.method({
  285. selector: "nextId",
  286. category: 'accessing',
  287. fn: function (){
  288. var self=this;
  289. return smalltalk.withContext(function($ctx1) {
  290. var $1,$2;
  291. $1=self["@nextId"];
  292. if(($receiver = $1) == nil || $receiver == undefined){
  293. self["@nextId"]=(0);
  294. self["@nextId"];
  295. } else {
  296. $1;
  297. };
  298. $2=_st("browser_").__comma(_st(_st(self["@nextId"]).__plus((1)))._asString());
  299. return $2;
  300. }, function($ctx1) {$ctx1.fill(self,"nextId",{},smalltalk.HLBrowser.klass)})},
  301. args: [],
  302. source: "nextId\x0a\x09nextId ifNil: [ nextId := 0 ].\x0a ^ 'browser_', (nextId + 1) asString",
  303. messageSends: ["ifNil:", ",", "asString", "+"],
  304. referencedClasses: []
  305. }),
  306. smalltalk.HLBrowser.klass);
  307. smalltalk.addMethod(
  308. smalltalk.method({
  309. selector: "tabLabel",
  310. category: 'accessing',
  311. fn: function (){
  312. var self=this;
  313. return smalltalk.withContext(function($ctx1) {
  314. return "Browser";
  315. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLBrowser.klass)})},
  316. args: [],
  317. source: "tabLabel\x0a\x09^ 'Browser'",
  318. messageSends: [],
  319. referencedClasses: []
  320. }),
  321. smalltalk.HLBrowser.klass);
  322. smalltalk.addMethod(
  323. smalltalk.method({
  324. selector: "tabPriority",
  325. category: 'accessing',
  326. fn: function (){
  327. var self=this;
  328. return smalltalk.withContext(function($ctx1) {
  329. var $1;
  330. $1=(0);
  331. return $1;
  332. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLBrowser.klass)})},
  333. args: [],
  334. source: "tabPriority\x0a\x09^ 0",
  335. messageSends: [],
  336. referencedClasses: []
  337. }),
  338. smalltalk.HLBrowser.klass);
  339. smalltalk.addClass('HLBrowserListWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Browser');
  340. smalltalk.addMethod(
  341. smalltalk.method({
  342. selector: "label",
  343. category: 'accessing',
  344. fn: function (){
  345. var self=this;
  346. return smalltalk.withContext(function($ctx1) {
  347. return "List";
  348. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLBrowserListWidget)})},
  349. args: [],
  350. source: "label\x0a\x09^ 'List'",
  351. messageSends: [],
  352. referencedClasses: []
  353. }),
  354. smalltalk.HLBrowserListWidget);
  355. smalltalk.addMethod(
  356. smalltalk.method({
  357. selector: "menuCommands",
  358. category: 'accessing',
  359. fn: function (){
  360. var self=this;
  361. function $HLBrowserCommand(){return smalltalk.HLBrowserCommand||(typeof HLBrowserCommand=="undefined"?nil:HLBrowserCommand)}
  362. return smalltalk.withContext(function($ctx1) {
  363. var $1;
  364. $1=_st(_st(_st($HLBrowserCommand())._concreteClasses())._select_((function(each){
  365. return smalltalk.withContext(function($ctx2) {
  366. return _st(each)._isValidFor_(_st(self)._selectedItem());
  367. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._collect_((function(each){
  368. return smalltalk.withContext(function($ctx2) {
  369. return _st(each)._for_(_st(self)._model());
  370. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  371. return $1;
  372. }, function($ctx1) {$ctx1.fill(self,"menuCommands",{},smalltalk.HLBrowserListWidget)})},
  373. args: [],
  374. source: "menuCommands\x0a\x09\x22Answer a collection of commands to be put in the cog menu\x22\x0a\x09\x0a\x09^ (HLBrowserCommand concreteClasses \x0a\x09\x09select: [ :each | each isValidFor: self selectedItem ])\x0a\x09\x09collect: [ :each | each for: self model ]",
  375. messageSends: ["collect:", "for:", "model", "select:", "isValidFor:", "selectedItem", "concreteClasses"],
  376. referencedClasses: ["HLBrowserCommand"]
  377. }),
  378. smalltalk.HLBrowserListWidget);
  379. smalltalk.addMethod(
  380. smalltalk.method({
  381. selector: "model",
  382. category: 'accessing',
  383. fn: function (){
  384. var self=this;
  385. return smalltalk.withContext(function($ctx1) {
  386. var $1;
  387. $1=self["@model"];
  388. return $1;
  389. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLBrowserListWidget)})},
  390. args: [],
  391. source: "model\x0a\x09^ model",
  392. messageSends: [],
  393. referencedClasses: []
  394. }),
  395. smalltalk.HLBrowserListWidget);
  396. smalltalk.addMethod(
  397. smalltalk.method({
  398. selector: "model:",
  399. category: 'accessing',
  400. fn: function (aBrowserModel){
  401. var self=this;
  402. return smalltalk.withContext(function($ctx1) {
  403. var $1,$2;
  404. self["@model"]=aBrowserModel;
  405. $1=self;
  406. _st($1)._observeSystem();
  407. $2=_st($1)._observeModel();
  408. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel},smalltalk.HLBrowserListWidget)})},
  409. args: ["aBrowserModel"],
  410. source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a \x0a self \x0a\x09\x09observeSystem;\x0a\x09\x09observeModel",
  411. messageSends: ["observeSystem", "observeModel"],
  412. referencedClasses: []
  413. }),
  414. smalltalk.HLBrowserListWidget);
  415. smalltalk.addMethod(
  416. smalltalk.method({
  417. selector: "observeModel",
  418. category: 'actions',
  419. fn: function (){
  420. var self=this;
  421. return smalltalk.withContext(function($ctx1) {
  422. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLBrowserListWidget)})},
  423. args: [],
  424. source: "observeModel",
  425. messageSends: [],
  426. referencedClasses: []
  427. }),
  428. smalltalk.HLBrowserListWidget);
  429. smalltalk.addMethod(
  430. smalltalk.method({
  431. selector: "observeSystem",
  432. category: 'actions',
  433. fn: function (){
  434. var self=this;
  435. return smalltalk.withContext(function($ctx1) {
  436. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLBrowserListWidget)})},
  437. args: [],
  438. source: "observeSystem",
  439. messageSends: [],
  440. referencedClasses: []
  441. }),
  442. smalltalk.HLBrowserListWidget);
  443. smalltalk.addMethod(
  444. smalltalk.method({
  445. selector: "renderContentOn:",
  446. category: 'rendering',
  447. fn: function (html){
  448. var self=this;
  449. return smalltalk.withContext(function($ctx1) {
  450. _st(self)._renderHeadOn_(html);
  451. smalltalk.HLNavigationListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  452. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLBrowserListWidget)})},
  453. args: ["html"],
  454. source: "renderContentOn: html\x0a\x09self renderHeadOn: html.\x09\x0a\x09super renderContentOn: html",
  455. messageSends: ["renderHeadOn:", "renderContentOn:"],
  456. referencedClasses: []
  457. }),
  458. smalltalk.HLBrowserListWidget);
  459. smalltalk.addMethod(
  460. smalltalk.method({
  461. selector: "renderHeadOn:",
  462. category: 'rendering',
  463. fn: function (html){
  464. var self=this;
  465. return smalltalk.withContext(function($ctx1) {
  466. var $1,$2;
  467. $1=_st(html)._div();
  468. _st($1)._class_("list-label");
  469. $2=_st($1)._with_((function(){
  470. return smalltalk.withContext(function($ctx2) {
  471. _st(html)._with_(_st(self)._label());
  472. return _st(self)._renderMenuOn_(html);
  473. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  474. return self}, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},smalltalk.HLBrowserListWidget)})},
  475. args: ["html"],
  476. source: "renderHeadOn: html\x0a\x09html div \x0a\x09\x09class: 'list-label';\x0a\x09\x09with: [\x0a\x09\x09\x09html with: self label.\x0a\x09\x09\x09self renderMenuOn: html ]",
  477. messageSends: ["class:", "div", "with:", "label", "renderMenuOn:"],
  478. referencedClasses: []
  479. }),
  480. smalltalk.HLBrowserListWidget);
  481. smalltalk.addMethod(
  482. smalltalk.method({
  483. selector: "renderMenuOn:",
  484. category: 'rendering',
  485. fn: function (html){
  486. var self=this;
  487. var commands;
  488. return smalltalk.withContext(function($ctx1) {
  489. var $1,$2,$3,$5,$6,$7,$9,$10,$8,$4;
  490. commands=_st(self)._menuCommands();
  491. $1=_st(commands)._isEmpty();
  492. if(smalltalk.assert($1)){
  493. $2=self;
  494. return $2;
  495. };
  496. $3=_st(html)._div();
  497. _st($3)._class_("btn-group cog");
  498. $4=_st($3)._with_((function(){
  499. return smalltalk.withContext(function($ctx2) {
  500. $5=_st(html)._a();
  501. _st($5)._class_("btn dropdown-toggle");
  502. _st($5)._at_put_("data-toggle","dropdown");
  503. $6=_st($5)._with_((function(){
  504. return smalltalk.withContext(function($ctx3) {
  505. return _st(_st(html)._tag_("i"))._class_("icon-cog");
  506. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  507. $6;
  508. $7=_st(html)._ul();
  509. _st($7)._class_("dropdown-menu pull-right");
  510. $8=_st($7)._with_((function(){
  511. return smalltalk.withContext(function($ctx3) {
  512. return _st(_st(self)._menuCommands())._do_((function(each){
  513. return smalltalk.withContext(function($ctx4) {
  514. return _st(_st(html)._li())._with_((function(){
  515. return smalltalk.withContext(function($ctx5) {
  516. $9=_st(html)._a();
  517. _st($9)._with_(_st(each)._menuLabel());
  518. $10=_st($9)._onClick_((function(){
  519. return smalltalk.withContext(function($ctx6) {
  520. return _st(self)._execute_(each);
  521. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  522. return $10;
  523. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  524. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
  525. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  526. return $8;
  527. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  528. return self}, function($ctx1) {$ctx1.fill(self,"renderMenuOn:",{html:html,commands:commands},smalltalk.HLBrowserListWidget)})},
  529. args: ["html"],
  530. source: "renderMenuOn: html\x0a\x09| commands |\x0a\x09\x0a\x09commands := self menuCommands.\x0a\x09commands isEmpty ifTrue: [ ^ self ].\x0a\x09\x0a\x09html div \x0a\x09\x09class: 'btn-group cog';\x0a\x09\x09with: [\x0a\x09\x09\x09html a\x0a\x09\x09\x09\x09class: 'btn dropdown-toggle';\x0a\x09\x09\x09\x09at: 'data-toggle' put: 'dropdown';\x0a\x09\x09\x09\x09with: [ (html tag: 'i') class: 'icon-cog' ].\x0a\x09\x09html ul \x0a\x09\x09\x09class: 'dropdown-menu pull-right';\x0a\x09\x09\x09with: [ \x0a\x09\x09\x09\x09self menuCommands do: [ :each | \x0a\x09\x09\x09\x09\x09html li with: [ html a \x0a\x09\x09\x09\x09\x09\x09with: each menuLabel;\x0a\x09\x09\x09\x09\x09\x09onClick: [ self execute: each ] ] ] ] ]",
  531. messageSends: ["menuCommands", "ifTrue:", "isEmpty", "class:", "div", "with:", "a", "at:put:", "tag:", "ul", "do:", "menuLabel", "onClick:", "execute:", "li"],
  532. referencedClasses: []
  533. }),
  534. smalltalk.HLBrowserListWidget);
  535. smalltalk.addMethod(
  536. smalltalk.method({
  537. selector: "selectedItem:",
  538. category: 'accessing',
  539. fn: function (anItem){
  540. var self=this;
  541. return smalltalk.withContext(function($ctx1) {
  542. smalltalk.HLNavigationListWidget.fn.prototype._selectedItem_.apply(_st(self), [anItem]);
  543. _st(self)._updateMenu();
  544. return self}, function($ctx1) {$ctx1.fill(self,"selectedItem:",{anItem:anItem},smalltalk.HLBrowserListWidget)})},
  545. args: ["anItem"],
  546. source: "selectedItem: anItem\x0a\x09\x22Selection changed, update the cog menu\x22\x0a\x09\x0a\x09super selectedItem: anItem.\x0a\x09self updateMenu",
  547. messageSends: ["selectedItem:", "updateMenu"],
  548. referencedClasses: []
  549. }),
  550. smalltalk.HLBrowserListWidget);
  551. smalltalk.addMethod(
  552. smalltalk.method({
  553. selector: "updateMenu",
  554. category: 'updating',
  555. fn: function (){
  556. var self=this;
  557. return smalltalk.withContext(function($ctx1) {
  558. _st(_st(_st(_st(self)._wrapper())._asJQuery())._find_(".cog"))._remove();
  559. _st((function(html){
  560. return smalltalk.withContext(function($ctx2) {
  561. return _st(self)._renderMenuOn_(html);
  562. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}))._appendToJQuery_(_st(_st(_st(self)._wrapper())._asJQuery())._find_(".list-label"));
  563. return self}, function($ctx1) {$ctx1.fill(self,"updateMenu",{},smalltalk.HLBrowserListWidget)})},
  564. args: [],
  565. source: "updateMenu\x0a\x09(self wrapper asJQuery find: '.cog') remove.\x0a\x09\x0a\x09[ :html | self renderMenuOn: html ] \x0a\x09\x09appendToJQuery: (self wrapper asJQuery find: '.list-label')",
  566. messageSends: ["remove", "find:", "asJQuery", "wrapper", "appendToJQuery:", "renderMenuOn:"],
  567. referencedClasses: []
  568. }),
  569. smalltalk.HLBrowserListWidget);
  570. smalltalk.addMethod(
  571. smalltalk.method({
  572. selector: "on:",
  573. category: 'instance creation',
  574. fn: function (aModel){
  575. var self=this;
  576. return smalltalk.withContext(function($ctx1) {
  577. var $2,$3,$1;
  578. $2=_st(self)._new();
  579. _st($2)._model_(aModel);
  580. $3=_st($2)._yourself();
  581. $1=$3;
  582. return $1;
  583. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel},smalltalk.HLBrowserListWidget.klass)})},
  584. args: ["aModel"],
  585. source: "on: aModel\x0a\x09^ self new \x0a \x09model: aModel;\x0a yourself",
  586. messageSends: ["model:", "new", "yourself"],
  587. referencedClasses: []
  588. }),
  589. smalltalk.HLBrowserListWidget.klass);
  590. smalltalk.addClass('HLClassesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  591. smalltalk.addMethod(
  592. smalltalk.method({
  593. selector: "focusMethodsListWidget",
  594. category: 'actions',
  595. fn: function (){
  596. var self=this;
  597. function $HLMethodsListFocus(){return smalltalk.HLMethodsListFocus||(typeof HLMethodsListFocus=="undefined"?nil:HLMethodsListFocus)}
  598. return smalltalk.withContext(function($ctx1) {
  599. _st(_st(_st(self)._model())._announcer())._announce_(_st($HLMethodsListFocus())._new());
  600. return self}, function($ctx1) {$ctx1.fill(self,"focusMethodsListWidget",{},smalltalk.HLClassesListWidget)})},
  601. args: [],
  602. source: "focusMethodsListWidget\x0a\x09self model announcer announce: HLMethodsListFocus new",
  603. messageSends: ["announce:", "new", "announcer", "model"],
  604. referencedClasses: ["HLMethodsListFocus"]
  605. }),
  606. smalltalk.HLClassesListWidget);
  607. smalltalk.addMethod(
  608. smalltalk.method({
  609. selector: "focusProtocolsListWidget",
  610. category: 'actions',
  611. fn: function (){
  612. var self=this;
  613. function $HLProtocolsListFocus(){return smalltalk.HLProtocolsListFocus||(typeof HLProtocolsListFocus=="undefined"?nil:HLProtocolsListFocus)}
  614. return smalltalk.withContext(function($ctx1) {
  615. _st(_st(_st(self)._model())._announcer())._announce_(_st($HLProtocolsListFocus())._new());
  616. return self}, function($ctx1) {$ctx1.fill(self,"focusProtocolsListWidget",{},smalltalk.HLClassesListWidget)})},
  617. args: [],
  618. source: "focusProtocolsListWidget\x0a\x09self model announcer announce: HLProtocolsListFocus new",
  619. messageSends: ["announce:", "new", "announcer", "model"],
  620. referencedClasses: ["HLProtocolsListFocus"]
  621. }),
  622. smalltalk.HLClassesListWidget);
  623. smalltalk.addMethod(
  624. smalltalk.method({
  625. selector: "getChildrenOf:",
  626. category: 'accessing',
  627. fn: function (aClass){
  628. var self=this;
  629. return smalltalk.withContext(function($ctx1) {
  630. var $1;
  631. $1=_st(_st(self)._items())._select_((function(each){
  632. return smalltalk.withContext(function($ctx2) {
  633. return _st(_st(each)._superclass()).__eq(aClass);
  634. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  635. return $1;
  636. }, function($ctx1) {$ctx1.fill(self,"getChildrenOf:",{aClass:aClass},smalltalk.HLClassesListWidget)})},
  637. args: ["aClass"],
  638. source: "getChildrenOf: aClass\x0a\x09^ self items select: [ :each | each superclass = aClass ]",
  639. messageSends: ["select:", "=", "superclass", "items"],
  640. referencedClasses: []
  641. }),
  642. smalltalk.HLClassesListWidget);
  643. smalltalk.addMethod(
  644. smalltalk.method({
  645. selector: "getRootClassesOf:",
  646. category: 'accessing',
  647. fn: function (aCollection){
  648. var self=this;
  649. return smalltalk.withContext(function($ctx1) {
  650. var $1;
  651. $1=_st(aCollection)._select_((function(each){
  652. return smalltalk.withContext(function($ctx2) {
  653. return _st(_st(aCollection)._includes_(_st(each)._superclass()))._not();
  654. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  655. return $1;
  656. }, function($ctx1) {$ctx1.fill(self,"getRootClassesOf:",{aCollection:aCollection},smalltalk.HLClassesListWidget)})},
  657. args: ["aCollection"],
  658. source: "getRootClassesOf: aCollection\x0a\x09^ aCollection select: [ :each |\x0a \x09\x09(aCollection includes: each superclass) not ]",
  659. messageSends: ["select:", "not", "includes:", "superclass"],
  660. referencedClasses: []
  661. }),
  662. smalltalk.HLClassesListWidget);
  663. smalltalk.addMethod(
  664. smalltalk.method({
  665. selector: "iconForItem:",
  666. category: 'accessing',
  667. fn: function (aClass){
  668. var self=this;
  669. return smalltalk.withContext(function($ctx1) {
  670. var $2,$1;
  671. $2=_st(_st(_st(aClass)._theNonMetaClass())._comment())._isEmpty();
  672. if(smalltalk.assert($2)){
  673. $1="icon-question-sign";
  674. } else {
  675. $1="icon-none";
  676. };
  677. return $1;
  678. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{aClass:aClass},smalltalk.HLClassesListWidget)})},
  679. args: ["aClass"],
  680. source: "iconForItem: aClass\x0a\x09^ aClass theNonMetaClass comment isEmpty\x0a \x09ifFalse: [ 'icon-none' ]\x0a \x09ifTrue: [ 'icon-question-sign' ]",
  681. messageSends: ["ifFalse:ifTrue:", "isEmpty", "comment", "theNonMetaClass"],
  682. referencedClasses: []
  683. }),
  684. smalltalk.HLClassesListWidget);
  685. smalltalk.addMethod(
  686. smalltalk.method({
  687. selector: "label",
  688. category: 'accessing',
  689. fn: function (){
  690. var self=this;
  691. return smalltalk.withContext(function($ctx1) {
  692. return "Classes";
  693. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLClassesListWidget)})},
  694. args: [],
  695. source: "label\x0a\x09^ 'Classes'",
  696. messageSends: [],
  697. referencedClasses: []
  698. }),
  699. smalltalk.HLClassesListWidget);
  700. smalltalk.addMethod(
  701. smalltalk.method({
  702. selector: "observeModel",
  703. category: 'actions',
  704. fn: function (){
  705. var self=this;
  706. function $HLPackageSelected(){return smalltalk.HLPackageSelected||(typeof HLPackageSelected=="undefined"?nil:HLPackageSelected)}
  707. function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  708. function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  709. function $HLClassesFocusRequested(){return smalltalk.HLClassesFocusRequested||(typeof HLClassesFocusRequested=="undefined"?nil:HLClassesFocusRequested)}
  710. return smalltalk.withContext(function($ctx1) {
  711. var $1,$2;
  712. $1=_st(_st(self)._model())._announcer();
  713. _st($1)._on_do_($HLPackageSelected(),(function(ann){
  714. return smalltalk.withContext(function($ctx2) {
  715. return _st(self)._onPackageSelected_(_st(ann)._item());
  716. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  717. _st($1)._on_do_($HLShowInstanceToggled(),(function(ann){
  718. return smalltalk.withContext(function($ctx2) {
  719. return _st(self)._onShowInstanceToggled();
  720. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  721. _st($1)._on_do_($HLClassSelected(),(function(ann){
  722. return smalltalk.withContext(function($ctx2) {
  723. return _st(self)._onClassSelected_(_st(ann)._item());
  724. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  725. $2=_st($1)._on_do_($HLClassesFocusRequested(),(function(ann){
  726. return smalltalk.withContext(function($ctx2) {
  727. return _st(self)._onClassesFocusRequested();
  728. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  729. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLClassesListWidget)})},
  730. args: [],
  731. source: "observeModel\x0a\x09self model announcer \x0a \x09on: HLPackageSelected do: [ :ann | self onPackageSelected: ann item ];\x0a \x09on: HLShowInstanceToggled do: [ :ann | self onShowInstanceToggled ];\x0a\x09\x09on: HLClassSelected do: [ :ann | self onClassSelected: ann item ];\x0a\x09\x09on: HLClassesFocusRequested do: [ :ann | self onClassesFocusRequested ]",
  732. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model", "onShowInstanceToggled", "onClassSelected:", "onClassesFocusRequested"],
  733. referencedClasses: ["HLPackageSelected", "HLShowInstanceToggled", "HLClassSelected", "HLClassesFocusRequested"]
  734. }),
  735. smalltalk.HLClassesListWidget);
  736. smalltalk.addMethod(
  737. smalltalk.method({
  738. selector: "observeSystem",
  739. category: 'actions',
  740. fn: function (){
  741. var self=this;
  742. function $ClassAdded(){return smalltalk.ClassAdded||(typeof ClassAdded=="undefined"?nil:ClassAdded)}
  743. function $ClassRemoved(){return smalltalk.ClassRemoved||(typeof ClassRemoved=="undefined"?nil:ClassRemoved)}
  744. return smalltalk.withContext(function($ctx1) {
  745. var $1,$2;
  746. $1=_st(_st(self)._model())._systemAnnouncer();
  747. _st($1)._on_do_($ClassAdded(),(function(ann){
  748. return smalltalk.withContext(function($ctx2) {
  749. return _st(self)._onClassAdded_(_st(ann)._theClass());
  750. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  751. $2=_st($1)._on_do_($ClassRemoved(),(function(ann){
  752. return smalltalk.withContext(function($ctx2) {
  753. return _st(self)._onClassRemoved_(_st(ann)._theClass());
  754. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  755. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLClassesListWidget)})},
  756. args: [],
  757. source: "observeSystem\x0a\x09self model systemAnnouncer\x0a \x09on: ClassAdded\x0a do: [ :ann | self onClassAdded: ann theClass ];\x0a on: ClassRemoved\x0a do: [ :ann | self onClassRemoved: ann theClass ]",
  758. messageSends: ["on:do:", "onClassAdded:", "theClass", "systemAnnouncer", "model", "onClassRemoved:"],
  759. referencedClasses: ["ClassAdded", "ClassRemoved"]
  760. }),
  761. smalltalk.HLClassesListWidget);
  762. smalltalk.addMethod(
  763. smalltalk.method({
  764. selector: "onClassAdded:",
  765. category: 'reactions',
  766. fn: function (aClass){
  767. var self=this;
  768. return smalltalk.withContext(function($ctx1) {
  769. var $1,$2;
  770. $1=_st(_st(aClass)._package()).__eq(_st(_st(self)._model())._selectedPackage());
  771. if(! smalltalk.assert($1)){
  772. $2=self;
  773. return $2;
  774. };
  775. _st(self)._setItemsForSelectedPackage();
  776. _st(self)._refresh();
  777. return self}, function($ctx1) {$ctx1.fill(self,"onClassAdded:",{aClass:aClass},smalltalk.HLClassesListWidget)})},
  778. args: ["aClass"],
  779. source: "onClassAdded: aClass\x0a\x09aClass package = self model selectedPackage ifFalse: [ ^ self ].\x0a \x0a self setItemsForSelectedPackage.\x0a self refresh",
  780. messageSends: ["ifFalse:", "=", "selectedPackage", "model", "package", "setItemsForSelectedPackage", "refresh"],
  781. referencedClasses: []
  782. }),
  783. smalltalk.HLClassesListWidget);
  784. smalltalk.addMethod(
  785. smalltalk.method({
  786. selector: "onClassRemoved:",
  787. category: 'reactions',
  788. fn: function (aClass){
  789. var self=this;
  790. return smalltalk.withContext(function($ctx1) {
  791. var $1,$2,$3;
  792. $1=_st(_st(aClass)._package()).__eq(_st(_st(self)._model())._selectedPackage());
  793. if(! smalltalk.assert($1)){
  794. $2=self;
  795. return $2;
  796. };
  797. $3=_st(aClass).__eq(_st(_st(self)._model())._selectedClass());
  798. if(smalltalk.assert($3)){
  799. _st(self)._selectItem_(nil);
  800. };
  801. _st(self)._setItemsForSelectedPackage();
  802. _st(self)._refresh();
  803. return self}, function($ctx1) {$ctx1.fill(self,"onClassRemoved:",{aClass:aClass},smalltalk.HLClassesListWidget)})},
  804. args: ["aClass"],
  805. source: "onClassRemoved: aClass\x0a\x09aClass package = self model selectedPackage ifFalse: [ ^ self ].\x0a aClass = self model selectedClass ifTrue: [ self selectItem: nil ].\x0a \x0a self setItemsForSelectedPackage.\x0a self refresh",
  806. messageSends: ["ifFalse:", "=", "selectedPackage", "model", "package", "ifTrue:", "selectItem:", "selectedClass", "setItemsForSelectedPackage", "refresh"],
  807. referencedClasses: []
  808. }),
  809. smalltalk.HLClassesListWidget);
  810. smalltalk.addMethod(
  811. smalltalk.method({
  812. selector: "onClassSelected:",
  813. category: 'reactions',
  814. fn: function (aClass){
  815. var self=this;
  816. var selectedClass;
  817. return smalltalk.withContext(function($ctx1) {
  818. var $1,$2,$3,$4,$5;
  819. $1=aClass;
  820. if(($receiver = $1) == nil || $receiver == undefined){
  821. $2=self;
  822. return $2;
  823. } else {
  824. $1;
  825. };
  826. selectedClass=_st(aClass)._theNonMetaClass();
  827. _st(self)._selectedItem_(selectedClass);
  828. $3=_st(self)._hasFocus();
  829. if(! smalltalk.assert($3)){
  830. $4=self;
  831. _st($4)._activateItem_(selectedClass);
  832. $5=_st($4)._focus();
  833. $5;
  834. };
  835. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass,selectedClass:selectedClass},smalltalk.HLClassesListWidget)})},
  836. args: ["aClass"],
  837. source: "onClassSelected: aClass\x0a\x09| selectedClass |\x0a\x09\x0a\x09aClass ifNil: [ ^ self ].\x0a\x09\x0a\x09selectedClass := aClass theNonMetaClass.\x0a\x09self selectedItem: selectedClass.\x0a\x0a\x09self hasFocus ifFalse: [\x0a\x09\x09self \x0a\x09\x09\x09activateItem: selectedClass;\x0a\x09\x09\x09focus ]",
  838. messageSends: ["ifNil:", "theNonMetaClass", "selectedItem:", "ifFalse:", "activateItem:", "focus", "hasFocus"],
  839. referencedClasses: []
  840. }),
  841. smalltalk.HLClassesListWidget);
  842. smalltalk.addMethod(
  843. smalltalk.method({
  844. selector: "onClassesFocusRequested",
  845. category: 'reactions',
  846. fn: function (){
  847. var self=this;
  848. return smalltalk.withContext(function($ctx1) {
  849. _st(self)._focus();
  850. return self}, function($ctx1) {$ctx1.fill(self,"onClassesFocusRequested",{},smalltalk.HLClassesListWidget)})},
  851. args: [],
  852. source: "onClassesFocusRequested\x0a\x09self focus",
  853. messageSends: ["focus"],
  854. referencedClasses: []
  855. }),
  856. smalltalk.HLClassesListWidget);
  857. smalltalk.addMethod(
  858. smalltalk.method({
  859. selector: "onPackageSelected:",
  860. category: 'reactions',
  861. fn: function (aPackage){
  862. var self=this;
  863. return smalltalk.withContext(function($ctx1) {
  864. _st(self)._selectedItem_(nil);
  865. _st(self)._setItemsForSelectedPackage();
  866. _st(self)._refresh();
  867. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{aPackage:aPackage},smalltalk.HLClassesListWidget)})},
  868. args: ["aPackage"],
  869. source: "onPackageSelected: aPackage\x0a self selectedItem: nil.\x0a \x0a self setItemsForSelectedPackage.\x0a self refresh",
  870. messageSends: ["selectedItem:", "setItemsForSelectedPackage", "refresh"],
  871. referencedClasses: []
  872. }),
  873. smalltalk.HLClassesListWidget);
  874. smalltalk.addMethod(
  875. smalltalk.method({
  876. selector: "onShowInstanceToggled",
  877. category: 'reactions',
  878. fn: function (){
  879. var self=this;
  880. return smalltalk.withContext(function($ctx1) {
  881. _st(self)._refresh();
  882. return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{},smalltalk.HLClassesListWidget)})},
  883. args: [],
  884. source: "onShowInstanceToggled\x0a\x09self refresh",
  885. messageSends: ["refresh"],
  886. referencedClasses: []
  887. }),
  888. smalltalk.HLClassesListWidget);
  889. smalltalk.addMethod(
  890. smalltalk.method({
  891. selector: "renderButtonsOn:",
  892. category: 'rendering',
  893. fn: function (html){
  894. var self=this;
  895. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  896. return smalltalk.withContext(function($ctx1) {
  897. var $1,$3,$4,$5,$6,$7,$8,$2;
  898. $1=_st(html)._div();
  899. _st($1)._class_("btn-group");
  900. _st($1)._at_put_("data-toggle","buttons-radio");
  901. $2=_st($1)._with_((function(){
  902. return smalltalk.withContext(function($ctx2) {
  903. $3=_st(html)._button();
  904. _st($3)._class_(_st($String())._streamContents_((function(str){
  905. return smalltalk.withContext(function($ctx3) {
  906. _st(str)._nextPutAll_("btn");
  907. $4=_st(self)._showInstance();
  908. if(smalltalk.assert($4)){
  909. return _st(str)._nextPutAll_(" active");
  910. };
  911. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  912. _st($3)._with_("Instance");
  913. $5=_st($3)._onClick_((function(){
  914. return smalltalk.withContext(function($ctx3) {
  915. return _st(self)._showInstance_(true);
  916. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  917. $5;
  918. $6=_st(html)._button();
  919. _st($6)._class_(_st($String())._streamContents_((function(str){
  920. return smalltalk.withContext(function($ctx3) {
  921. _st(str)._nextPutAll_("btn");
  922. $7=_st(_st(self)._model())._showInstance();
  923. if(! smalltalk.assert($7)){
  924. return _st(str)._nextPutAll_(" active");
  925. };
  926. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  927. _st($6)._with_("Class");
  928. $8=_st($6)._onClick_((function(){
  929. return smalltalk.withContext(function($ctx3) {
  930. return _st(_st(self)._model())._showInstance_(false);
  931. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  932. return $8;
  933. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  934. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLClassesListWidget)})},
  935. args: ["html"],
  936. source: "renderButtonsOn: html\x0a\x09html div \x0a class: 'btn-group';\x0a\x09\x09at: 'data-toggle' put: 'buttons-radio';\x0a\x09\x09with: [ \x0a \x09html button \x0a class: (String streamContents: [ :str |\x0a \x09str nextPutAll: 'btn'.\x0a self showInstance ifTrue: [ \x0a \x09str nextPutAll: ' active'] ]);\x0a \x09\x09\x09\x09with: 'Instance';\x0a onClick: [ self showInstance: true ].\x0a \x09\x09\x09html button\x0a \x09\x09\x09\x09class: (String streamContents: [ :str |\x0a \x09str nextPutAll: 'btn'.\x0a self model showInstance ifFalse: [ \x0a \x09str nextPutAll: ' active'] ]);\x0a \x09\x09\x09\x09with: 'Class';\x0a\x09\x09\x09\x09onClick: [ self model showInstance: false ] ]",
  937. messageSends: ["class:", "div", "at:put:", "with:", "streamContents:", "nextPutAll:", "ifTrue:", "showInstance", "button", "onClick:", "showInstance:", "ifFalse:", "model"],
  938. referencedClasses: ["String"]
  939. }),
  940. smalltalk.HLClassesListWidget);
  941. smalltalk.addMethod(
  942. smalltalk.method({
  943. selector: "renderItem:level:on:",
  944. category: 'rendering',
  945. fn: function (aClass,anInteger,html){
  946. var self=this;
  947. var li;
  948. return smalltalk.withContext(function($ctx1) {
  949. var $1,$3,$4,$2;
  950. li=_st(html)._li();
  951. _st(self)._registerMappingFrom_to_(aClass,li);
  952. $1=li;
  953. _st($1)._at_put_("list-data",_st(_st(self)._items())._indexOf_(aClass));
  954. _st($1)._class_(_st(self)._cssClassForItem_(aClass));
  955. $2=_st($1)._with_((function(){
  956. return smalltalk.withContext(function($ctx2) {
  957. $3=_st(html)._a();
  958. _st($3)._with_((function(){
  959. return smalltalk.withContext(function($ctx3) {
  960. _st(_st(html)._tag_("i"))._class_(_st(self)._iconForItem_(aClass));
  961. return _st(self)._renderItemLabel_level_on_(aClass,anInteger,html);
  962. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  963. $4=_st($3)._onClick_((function(){
  964. return smalltalk.withContext(function($ctx3) {
  965. return _st(self)._activateListItem_(_st(li)._asJQuery());
  966. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  967. return $4;
  968. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  969. _st(_st(self)._getChildrenOf_(aClass))._do_((function(each){
  970. return smalltalk.withContext(function($ctx2) {
  971. return _st(self)._renderItem_level_on_(each,_st(anInteger).__plus((1)),html);
  972. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  973. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:level:on:",{aClass:aClass,anInteger:anInteger,html:html,li:li},smalltalk.HLClassesListWidget)})},
  974. args: ["aClass", "anInteger", "html"],
  975. source: "renderItem: aClass level: anInteger on: html\x0a\x09| li |\x0a \x0a\x09li := html li.\x0a\x09self registerMappingFrom: aClass to: li.\x0a\x09\x0a li\x0a \x09at: 'list-data' put: (self items indexOf: aClass);\x0a \x09class: (self cssClassForItem: aClass);\x0a with: [ \x0a \x09html a\x0a \x09with: [ \x0a \x09\x09(html tag: 'i') class: (self iconForItem: aClass).\x0a \x09\x09\x09\x09\x09self renderItemLabel: aClass level: anInteger on: html ];\x0a\x09\x09\x09\x09onClick: [\x0a \x09self activateListItem: li asJQuery ] ].\x0a \x0a (self getChildrenOf: aClass) do: [ :each |\x0a \x09self renderItem: each level: anInteger + 1 on: html ]",
  976. messageSends: ["li", "registerMappingFrom:to:", "at:put:", "indexOf:", "items", "class:", "cssClassForItem:", "with:", "iconForItem:", "tag:", "renderItemLabel:level:on:", "a", "onClick:", "activateListItem:", "asJQuery", "do:", "renderItem:level:on:", "+", "getChildrenOf:"],
  977. referencedClasses: []
  978. }),
  979. smalltalk.HLClassesListWidget);
  980. smalltalk.addMethod(
  981. smalltalk.method({
  982. selector: "renderItem:on:",
  983. category: 'rendering',
  984. fn: function (aClass,html){
  985. var self=this;
  986. return smalltalk.withContext(function($ctx1) {
  987. smalltalk.HLBrowserListWidget.fn.prototype._renderItem_on_.apply(_st(self), [aClass,html]);
  988. _st(_st(self)._getChildrenOf_(aClass))._do_((function(each){
  989. return smalltalk.withContext(function($ctx2) {
  990. return _st(self)._renderItem_level_on_(each,(1),html);
  991. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  992. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{aClass:aClass,html:html},smalltalk.HLClassesListWidget)})},
  993. args: ["aClass", "html"],
  994. source: "renderItem: aClass on: html\x0a\x09super renderItem: aClass on: html.\x0a (self getChildrenOf: aClass) do: [ :each |\x0a \x09self renderItem: each level: 1 on: html ]",
  995. messageSends: ["renderItem:on:", "do:", "renderItem:level:on:", "getChildrenOf:"],
  996. referencedClasses: []
  997. }),
  998. smalltalk.HLClassesListWidget);
  999. smalltalk.addMethod(
  1000. smalltalk.method({
  1001. selector: "renderItemLabel:level:on:",
  1002. category: 'rendering',
  1003. fn: function (aClass,anInteger,html){
  1004. var self=this;
  1005. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  1006. return smalltalk.withContext(function($ctx1) {
  1007. _st(_st(_st(html)._span())._asJQuery())._html_(_st($String())._streamContents_((function(str){
  1008. return smalltalk.withContext(function($ctx2) {
  1009. _st(anInteger)._timesRepeat_((function(){
  1010. return smalltalk.withContext(function($ctx3) {
  1011. return _st(str)._nextPutAll_("    ");
  1012. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1013. return _st(str)._nextPutAll_(_st(aClass)._name());
  1014. }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1)})})));
  1015. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:level:on:",{aClass:aClass,anInteger:anInteger,html:html},smalltalk.HLClassesListWidget)})},
  1016. args: ["aClass", "anInteger", "html"],
  1017. source: "renderItemLabel: aClass level: anInteger on: html\x0a\x09html span asJQuery html: (String streamContents: [ :str |\x0a\x09\x09anInteger timesRepeat: [\x0a\x09\x09\x09str nextPutAll: '    '].\x0a\x09\x09\x09str nextPutAll: aClass name ])",
  1018. messageSends: ["html:", "streamContents:", "timesRepeat:", "nextPutAll:", "name", "asJQuery", "span"],
  1019. referencedClasses: ["String"]
  1020. }),
  1021. smalltalk.HLClassesListWidget);
  1022. smalltalk.addMethod(
  1023. smalltalk.method({
  1024. selector: "renderItemLabel:on:",
  1025. category: 'rendering',
  1026. fn: function (aClass,html){
  1027. var self=this;
  1028. return smalltalk.withContext(function($ctx1) {
  1029. _st(self)._renderItemLabel_level_on_(aClass,(0),html);
  1030. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aClass:aClass,html:html},smalltalk.HLClassesListWidget)})},
  1031. args: ["aClass", "html"],
  1032. source: "renderItemLabel: aClass on: html\x0a\x09self renderItemLabel: aClass level: 0 on: html",
  1033. messageSends: ["renderItemLabel:level:on:"],
  1034. referencedClasses: []
  1035. }),
  1036. smalltalk.HLClassesListWidget);
  1037. smalltalk.addMethod(
  1038. smalltalk.method({
  1039. selector: "renderListOn:",
  1040. category: 'rendering',
  1041. fn: function (html){
  1042. var self=this;
  1043. return smalltalk.withContext(function($ctx1) {
  1044. _st(_st(self)._getRootClassesOf_(_st(self)._items()))._do_((function(each){
  1045. return smalltalk.withContext(function($ctx2) {
  1046. return _st(self)._renderItem_on_(each,html);
  1047. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1048. return self}, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html},smalltalk.HLClassesListWidget)})},
  1049. args: ["html"],
  1050. source: "renderListOn: html\x0a\x09(self getRootClassesOf: self items)\x0a \x09do: [ :each | self renderItem: each on: html ]",
  1051. messageSends: ["do:", "renderItem:on:", "getRootClassesOf:", "items"],
  1052. referencedClasses: []
  1053. }),
  1054. smalltalk.HLClassesListWidget);
  1055. smalltalk.addMethod(
  1056. smalltalk.method({
  1057. selector: "selectItem:",
  1058. category: 'actions',
  1059. fn: function (aClass){
  1060. var self=this;
  1061. return smalltalk.withContext(function($ctx1) {
  1062. _st(_st(self)._model())._selectedClass_(aClass);
  1063. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aClass:aClass},smalltalk.HLClassesListWidget)})},
  1064. args: ["aClass"],
  1065. source: "selectItem: aClass\x0a self model selectedClass: aClass",
  1066. messageSends: ["selectedClass:", "model"],
  1067. referencedClasses: []
  1068. }),
  1069. smalltalk.HLClassesListWidget);
  1070. smalltalk.addMethod(
  1071. smalltalk.method({
  1072. selector: "setItemsForPackage:",
  1073. category: 'private',
  1074. fn: function (aPackage){
  1075. var self=this;
  1076. return smalltalk.withContext(function($ctx1) {
  1077. var $1,$3,$2;
  1078. $1=self;
  1079. $3=aPackage;
  1080. if(($receiver = $3) == nil || $receiver == undefined){
  1081. $2=[];
  1082. } else {
  1083. $2=_st(_st(_st(_st(_st(aPackage)._classes())._collect_((function(each){
  1084. return smalltalk.withContext(function($ctx2) {
  1085. return _st(each)._theNonMetaClass();
  1086. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet())._asArray())._sort_((function(a,b){
  1087. return smalltalk.withContext(function($ctx2) {
  1088. return _st(_st(a)._name()).__lt(_st(b)._name());
  1089. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  1090. };
  1091. _st($1)._items_($2);
  1092. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForPackage:",{aPackage:aPackage},smalltalk.HLClassesListWidget)})},
  1093. args: ["aPackage"],
  1094. source: "setItemsForPackage: aPackage\x0a\x09self items: (aPackage \x0a \x09ifNil: [ #() ]\x0a \x09\x09ifNotNil: [ ((aPackage classes \x0a \x09collect: [ :each | each theNonMetaClass ]) asSet asArray) \x0a \x09sort: [:a :b | a name < b name ] ]).",
  1095. messageSends: ["items:", "ifNil:ifNotNil:", "sort:", "<", "name", "asArray", "asSet", "collect:", "theNonMetaClass", "classes"],
  1096. referencedClasses: []
  1097. }),
  1098. smalltalk.HLClassesListWidget);
  1099. smalltalk.addMethod(
  1100. smalltalk.method({
  1101. selector: "setItemsForSelectedPackage",
  1102. category: 'private',
  1103. fn: function (){
  1104. var self=this;
  1105. return smalltalk.withContext(function($ctx1) {
  1106. _st(self)._setItemsForPackage_(_st(_st(self)._model())._selectedPackage());
  1107. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedPackage",{},smalltalk.HLClassesListWidget)})},
  1108. args: [],
  1109. source: "setItemsForSelectedPackage\x0a\x09self setItemsForPackage: self model selectedPackage",
  1110. messageSends: ["setItemsForPackage:", "selectedPackage", "model"],
  1111. referencedClasses: []
  1112. }),
  1113. smalltalk.HLClassesListWidget);
  1114. smalltalk.addMethod(
  1115. smalltalk.method({
  1116. selector: "showInstance",
  1117. category: 'accessing',
  1118. fn: function (){
  1119. var self=this;
  1120. return smalltalk.withContext(function($ctx1) {
  1121. var $1;
  1122. $1=_st(_st(self)._model())._showInstance();
  1123. return $1;
  1124. }, function($ctx1) {$ctx1.fill(self,"showInstance",{},smalltalk.HLClassesListWidget)})},
  1125. args: [],
  1126. source: "showInstance\x0a\x09^ self model showInstance",
  1127. messageSends: ["showInstance", "model"],
  1128. referencedClasses: []
  1129. }),
  1130. smalltalk.HLClassesListWidget);
  1131. smalltalk.addMethod(
  1132. smalltalk.method({
  1133. selector: "showInstance:",
  1134. category: 'actions',
  1135. fn: function (aBoolean){
  1136. var self=this;
  1137. return smalltalk.withContext(function($ctx1) {
  1138. _st(_st(self)._model())._showInstance_(aBoolean);
  1139. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean},smalltalk.HLClassesListWidget)})},
  1140. args: ["aBoolean"],
  1141. source: "showInstance: aBoolean\x0a\x09self model showInstance: aBoolean",
  1142. messageSends: ["showInstance:", "model"],
  1143. referencedClasses: []
  1144. }),
  1145. smalltalk.HLClassesListWidget);
  1146. smalltalk.addClass('HLMethodsListWidget', smalltalk.HLBrowserListWidget, ['selectorsCache'], 'Helios-Browser');
  1147. smalltalk.addMethod(
  1148. smalltalk.method({
  1149. selector: "allProtocol",
  1150. category: 'accessing',
  1151. fn: function (){
  1152. var self=this;
  1153. return smalltalk.withContext(function($ctx1) {
  1154. var $1;
  1155. $1=_st(_st(self)._model())._allProtocol();
  1156. return $1;
  1157. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{},smalltalk.HLMethodsListWidget)})},
  1158. args: [],
  1159. source: "allProtocol\x0a\x09^ self model allProtocol",
  1160. messageSends: ["allProtocol", "model"],
  1161. referencedClasses: []
  1162. }),
  1163. smalltalk.HLMethodsListWidget);
  1164. smalltalk.addMethod(
  1165. smalltalk.method({
  1166. selector: "iconForItem:",
  1167. category: 'accessing',
  1168. fn: function (aSelector){
  1169. var self=this;
  1170. var override,overriden,method;
  1171. return smalltalk.withContext(function($ctx1) {
  1172. var $2,$3,$4,$1;
  1173. method=_st(self)._methodForSelector_(aSelector);
  1174. override=_st(self)._isOverride_(method);
  1175. overriden=_st(self)._isOverridden_(method);
  1176. $2=override;
  1177. if(smalltalk.assert($2)){
  1178. $3=overriden;
  1179. if(smalltalk.assert($3)){
  1180. $1="icon-resize-vertical";
  1181. } else {
  1182. $1="icon-arrow-up";
  1183. };
  1184. } else {
  1185. $4=overriden;
  1186. if(smalltalk.assert($4)){
  1187. $1="icon-arrow-down";
  1188. } else {
  1189. $1="icon-none";
  1190. };
  1191. };
  1192. return $1;
  1193. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{aSelector:aSelector,override:override,overriden:overriden,method:method},smalltalk.HLMethodsListWidget)})},
  1194. args: ["aSelector"],
  1195. source: "iconForItem: aSelector\x0a\x09| override overriden method |\x0a \x0a method := self methodForSelector: aSelector.\x0a override := self isOverride: method.\x0a overriden := self isOverridden: method.\x0a \x0a\x09^ override\x0a \x09ifTrue: [ overriden\x0a\x09\x09\x09ifTrue: [ 'icon-resize-vertical' ]\x0a\x09\x09\x09ifFalse: [ 'icon-arrow-up' ] ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09overriden\x0a\x09\x09\x09ifTrue: [ 'icon-arrow-down' ]\x0a\x09\x09\x09ifFalse: [ 'icon-none' ] ]",
  1196. messageSends: ["methodForSelector:", "isOverride:", "isOverridden:", "ifTrue:ifFalse:"],
  1197. referencedClasses: []
  1198. }),
  1199. smalltalk.HLMethodsListWidget);
  1200. smalltalk.addMethod(
  1201. smalltalk.method({
  1202. selector: "isOverridden:",
  1203. category: 'testing',
  1204. fn: function (aMethod){
  1205. var self=this;
  1206. return smalltalk.withContext(function($ctx1) {
  1207. var $1;
  1208. $1=_st(_st(self)._selectorsCache())._isOverridden_(aMethod);
  1209. return $1;
  1210. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod},smalltalk.HLMethodsListWidget)})},
  1211. args: ["aMethod"],
  1212. source: "isOverridden: aMethod\x0a ^ self selectorsCache isOverridden: aMethod",
  1213. messageSends: ["isOverridden:", "selectorsCache"],
  1214. referencedClasses: []
  1215. }),
  1216. smalltalk.HLMethodsListWidget);
  1217. smalltalk.addMethod(
  1218. smalltalk.method({
  1219. selector: "isOverride:",
  1220. category: 'testing',
  1221. fn: function (aMethod){
  1222. var self=this;
  1223. return smalltalk.withContext(function($ctx1) {
  1224. var $1;
  1225. $1=_st(_st(self)._selectorsCache())._isOverride_(aMethod);
  1226. return $1;
  1227. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod},smalltalk.HLMethodsListWidget)})},
  1228. args: ["aMethod"],
  1229. source: "isOverride: aMethod\x0a ^ self selectorsCache isOverride: aMethod",
  1230. messageSends: ["isOverride:", "selectorsCache"],
  1231. referencedClasses: []
  1232. }),
  1233. smalltalk.HLMethodsListWidget);
  1234. smalltalk.addMethod(
  1235. smalltalk.method({
  1236. selector: "label",
  1237. category: 'accessing',
  1238. fn: function (){
  1239. var self=this;
  1240. return smalltalk.withContext(function($ctx1) {
  1241. return "Methods";
  1242. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMethodsListWidget)})},
  1243. args: [],
  1244. source: "label\x0a\x09^ 'Methods'",
  1245. messageSends: [],
  1246. referencedClasses: []
  1247. }),
  1248. smalltalk.HLMethodsListWidget);
  1249. smalltalk.addMethod(
  1250. smalltalk.method({
  1251. selector: "methodForSelector:",
  1252. category: 'accessing',
  1253. fn: function (aSelector){
  1254. var self=this;
  1255. return smalltalk.withContext(function($ctx1) {
  1256. var $1;
  1257. $1=_st(_st(_st(_st(self)._model())._selectedClass())._methodDictionary())._at_(aSelector);
  1258. return $1;
  1259. }, function($ctx1) {$ctx1.fill(self,"methodForSelector:",{aSelector:aSelector},smalltalk.HLMethodsListWidget)})},
  1260. args: ["aSelector"],
  1261. source: "methodForSelector: aSelector\x0a\x09^ self model selectedClass\x0a \x09methodDictionary at: aSelector",
  1262. messageSends: ["at:", "methodDictionary", "selectedClass", "model"],
  1263. referencedClasses: []
  1264. }),
  1265. smalltalk.HLMethodsListWidget);
  1266. smalltalk.addMethod(
  1267. smalltalk.method({
  1268. selector: "methodsInProtocol:",
  1269. category: 'accessing',
  1270. fn: function (aString){
  1271. var self=this;
  1272. return smalltalk.withContext(function($ctx1) {
  1273. var $1,$2,$4,$3;
  1274. $1=_st(_st(self)._model())._selectedClass();
  1275. if(($receiver = $1) == nil || $receiver == undefined){
  1276. $2=[];
  1277. return $2;
  1278. } else {
  1279. $1;
  1280. };
  1281. $4=_st(aString).__eq(_st(self)._allProtocol());
  1282. if(smalltalk.assert($4)){
  1283. $3=_st(_st(_st(self)._model())._selectedClass())._methods();
  1284. } else {
  1285. $3=_st(_st(_st(self)._model())._selectedClass())._methodsInProtocol_(aString);
  1286. };
  1287. return $3;
  1288. }, function($ctx1) {$ctx1.fill(self,"methodsInProtocol:",{aString:aString},smalltalk.HLMethodsListWidget)})},
  1289. args: ["aString"],
  1290. source: "methodsInProtocol: aString\x0a\x09self model selectedClass ifNil: [ ^ #() ].\x0a \x0a\x09^ aString = self allProtocol\x0a \x09ifTrue: [ self model selectedClass methods ]\x0a \x09ifFalse: [ self model selectedClass methodsInProtocol: aString ]",
  1291. messageSends: ["ifNil:", "selectedClass", "model", "ifTrue:ifFalse:", "methods", "methodsInProtocol:", "=", "allProtocol"],
  1292. referencedClasses: []
  1293. }),
  1294. smalltalk.HLMethodsListWidget);
  1295. smalltalk.addMethod(
  1296. smalltalk.method({
  1297. selector: "observeModel",
  1298. category: 'actions',
  1299. fn: function (){
  1300. var self=this;
  1301. function $HLProtocolSelected(){return smalltalk.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  1302. function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  1303. function $HLMethodSelected(){return smalltalk.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  1304. function $HLMethodsFocusRequested(){return smalltalk.HLMethodsFocusRequested||(typeof HLMethodsFocusRequested=="undefined"?nil:HLMethodsFocusRequested)}
  1305. return smalltalk.withContext(function($ctx1) {
  1306. var $1,$2;
  1307. $1=_st(_st(self)._model())._announcer();
  1308. _st($1)._on_do_($HLProtocolSelected(),(function(ann){
  1309. return smalltalk.withContext(function($ctx2) {
  1310. return _st(self)._onProtocolSelected_(_st(ann)._item());
  1311. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1312. _st($1)._on_do_($HLShowInstanceToggled(),(function(ann){
  1313. return smalltalk.withContext(function($ctx2) {
  1314. return _st(self)._onProtocolSelected_(nil);
  1315. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1316. _st($1)._on_do_($HLMethodSelected(),(function(ann){
  1317. return smalltalk.withContext(function($ctx2) {
  1318. return _st(self)._onMethodSelected_(_st(ann)._item());
  1319. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1320. $2=_st($1)._on_do_($HLMethodsFocusRequested(),(function(ann){
  1321. return smalltalk.withContext(function($ctx2) {
  1322. return _st(self)._onMethodsFocusRequested();
  1323. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1324. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLMethodsListWidget)})},
  1325. args: [],
  1326. source: "observeModel\x0a\x09self model announcer \x0a\x09\x09on: HLProtocolSelected \x0a\x09\x09do: [ :ann | self onProtocolSelected: ann item ];\x0a\x09\x09on: HLShowInstanceToggled \x0a\x09\x09do: [ :ann | self onProtocolSelected: nil ];\x0a\x09\x09on: HLMethodSelected \x0a\x09\x09do: [ :ann | self onMethodSelected: ann item ];\x0a\x09\x09on: HLMethodsFocusRequested \x0a\x09\x09do: [ :ann | self onMethodsFocusRequested ]",
  1327. messageSends: ["on:do:", "onProtocolSelected:", "item", "announcer", "model", "onMethodSelected:", "onMethodsFocusRequested"],
  1328. referencedClasses: ["HLProtocolSelected", "HLShowInstanceToggled", "HLMethodSelected", "HLMethodsFocusRequested"]
  1329. }),
  1330. smalltalk.HLMethodsListWidget);
  1331. smalltalk.addMethod(
  1332. smalltalk.method({
  1333. selector: "observeSystem",
  1334. category: 'actions',
  1335. fn: function (){
  1336. var self=this;
  1337. function $ProtocolAdded(){return smalltalk.ProtocolAdded||(typeof ProtocolAdded=="undefined"?nil:ProtocolAdded)}
  1338. function $ProtocolRemoved(){return smalltalk.ProtocolRemoved||(typeof ProtocolRemoved=="undefined"?nil:ProtocolRemoved)}
  1339. function $MethodAdded(){return smalltalk.MethodAdded||(typeof MethodAdded=="undefined"?nil:MethodAdded)}
  1340. function $MethodRemoved(){return smalltalk.MethodRemoved||(typeof MethodRemoved=="undefined"?nil:MethodRemoved)}
  1341. return smalltalk.withContext(function($ctx1) {
  1342. var $1,$2;
  1343. $1=_st(_st(self)._model())._systemAnnouncer();
  1344. _st($1)._on_do_($ProtocolAdded(),(function(ann){
  1345. return smalltalk.withContext(function($ctx2) {
  1346. return _st(self)._onProtocolAdded_(_st(ann)._theClass());
  1347. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1348. _st($1)._on_do_($ProtocolRemoved(),(function(ann){
  1349. return smalltalk.withContext(function($ctx2) {
  1350. return _st(self)._onProtocolRemoved_(_st(ann)._theClass());
  1351. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1352. _st($1)._on_do_($MethodAdded(),(function(ann){
  1353. return smalltalk.withContext(function($ctx2) {
  1354. return _st(self)._onMethodAdded_(_st(ann)._method());
  1355. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1356. $2=_st($1)._on_do_($MethodRemoved(),(function(ann){
  1357. return smalltalk.withContext(function($ctx2) {
  1358. return _st(self)._onMethodRemoved_(_st(ann)._method());
  1359. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1360. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLMethodsListWidget)})},
  1361. args: [],
  1362. source: "observeSystem\x0a\x09self model systemAnnouncer \x0a \x09on: ProtocolAdded\x0a do: [ :ann | self onProtocolAdded: ann theClass ];\x0a \x09on: ProtocolRemoved\x0a do: [ :ann | self onProtocolRemoved: ann theClass ];\x0a \x09on: MethodAdded \x0a do: [ :ann | self onMethodAdded: ann method ];\x0a on: MethodRemoved \x0a do: [ :ann | self onMethodRemoved: ann method ]",
  1363. messageSends: ["on:do:", "onProtocolAdded:", "theClass", "systemAnnouncer", "model", "onProtocolRemoved:", "onMethodAdded:", "method", "onMethodRemoved:"],
  1364. referencedClasses: ["ProtocolAdded", "ProtocolRemoved", "MethodAdded", "MethodRemoved"]
  1365. }),
  1366. smalltalk.HLMethodsListWidget);
  1367. smalltalk.addMethod(
  1368. smalltalk.method({
  1369. selector: "onMethodAdded:",
  1370. category: 'reactions',
  1371. fn: function (aMethod){
  1372. var self=this;
  1373. return smalltalk.withContext(function($ctx1) {
  1374. var $1,$2;
  1375. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(aMethod)._methodClass());
  1376. if(! smalltalk.assert($1)){
  1377. $2=self;
  1378. return $2;
  1379. };
  1380. _st(self)._setItemsForSelectedProtocol();
  1381. _st(self)._refresh();
  1382. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod},smalltalk.HLMethodsListWidget)})},
  1383. args: ["aMethod"],
  1384. source: "onMethodAdded: aMethod\x0a\x09self model selectedClass = aMethod methodClass ifFalse: [ ^ self ].\x0a \x0a self setItemsForSelectedProtocol.\x0a self refresh",
  1385. messageSends: ["ifFalse:", "=", "methodClass", "selectedClass", "model", "setItemsForSelectedProtocol", "refresh"],
  1386. referencedClasses: []
  1387. }),
  1388. smalltalk.HLMethodsListWidget);
  1389. smalltalk.addMethod(
  1390. smalltalk.method({
  1391. selector: "onMethodRemoved:",
  1392. category: 'reactions',
  1393. fn: function (aMethod){
  1394. var self=this;
  1395. return smalltalk.withContext(function($ctx1) {
  1396. var $1,$2,$3;
  1397. var $early={};
  1398. try {
  1399. _st(_st(self)._items())._detect_ifNone_((function(each){
  1400. return smalltalk.withContext(function($ctx2) {
  1401. return _st(each).__eq(_st(aMethod)._selector());
  1402. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  1403. return smalltalk.withContext(function($ctx2) {
  1404. $1=self;
  1405. throw $early=[$1];
  1406. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1407. $2=_st(self)._selectedItem();
  1408. if(($receiver = $2) == nil || $receiver == undefined){
  1409. $2;
  1410. } else {
  1411. $3=_st(_st(_st(aMethod)._methodClass()).__eq(_st(_st(self)._model())._selectedClass()))._and_((function(){
  1412. return smalltalk.withContext(function($ctx2) {
  1413. return _st(_st(aMethod)._selector()).__eq(_st(_st(self)._selectedItem())._selector());
  1414. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1415. if(smalltalk.assert($3)){
  1416. _st(self)._selectItem_(nil);
  1417. };
  1418. };
  1419. _st(self)._setItemsForSelectedProtocol();
  1420. _st(self)._refresh();
  1421. return self}
  1422. catch(e) {if(e===$early)return e[0]; throw e}
  1423. }, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod},smalltalk.HLMethodsListWidget)})},
  1424. args: ["aMethod"],
  1425. source: "onMethodRemoved: aMethod\x0a\x09self items detect: [ :each | each = aMethod selector ] ifNone: [ ^ self ].\x0a\x0a self selectedItem ifNotNil: [\x0a \x09(aMethod methodClass = self model selectedClass and: [ aMethod selector = self selectedItem selector ])\x0a \x09\x09\x09ifTrue: [ self selectItem: nil ] ].\x0a self setItemsForSelectedProtocol.\x0a\x0aself refresh",
  1426. messageSends: ["detect:ifNone:", "=", "selector", "items", "ifNotNil:", "ifTrue:", "selectItem:", "and:", "selectedItem", "selectedClass", "model", "methodClass", "setItemsForSelectedProtocol", "refresh"],
  1427. referencedClasses: []
  1428. }),
  1429. smalltalk.HLMethodsListWidget);
  1430. smalltalk.addMethod(
  1431. smalltalk.method({
  1432. selector: "onMethodSelected:",
  1433. category: 'reactions',
  1434. fn: function (aMethod){
  1435. var self=this;
  1436. return smalltalk.withContext(function($ctx1) {
  1437. var $1,$2,$3,$4,$5;
  1438. _st(self)._selectedItem_(aMethod);
  1439. $1=aMethod;
  1440. if(($receiver = $1) == nil || $receiver == undefined){
  1441. $2=self;
  1442. return $2;
  1443. } else {
  1444. $1;
  1445. };
  1446. $3=_st(self)._hasFocus();
  1447. if(! smalltalk.assert($3)){
  1448. $4=self;
  1449. _st($4)._activateItem_(aMethod);
  1450. $5=_st($4)._focus();
  1451. $5;
  1452. };
  1453. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aMethod:aMethod},smalltalk.HLMethodsListWidget)})},
  1454. args: ["aMethod"],
  1455. source: "onMethodSelected: aMethod\x0a\x09self selectedItem: aMethod.\x0a\x09aMethod ifNil: [ ^ self ].\x0a \x0a\x09self hasFocus ifFalse: [\x0a\x09\x09self \x0a\x09\x09\x09activateItem: aMethod;\x0a\x09\x09\x09focus ]",
  1456. messageSends: ["selectedItem:", "ifNil:", "ifFalse:", "activateItem:", "focus", "hasFocus"],
  1457. referencedClasses: []
  1458. }),
  1459. smalltalk.HLMethodsListWidget);
  1460. smalltalk.addMethod(
  1461. smalltalk.method({
  1462. selector: "onMethodsFocusRequested",
  1463. category: 'reactions',
  1464. fn: function (){
  1465. var self=this;
  1466. return smalltalk.withContext(function($ctx1) {
  1467. _st(self)._focus();
  1468. return self}, function($ctx1) {$ctx1.fill(self,"onMethodsFocusRequested",{},smalltalk.HLMethodsListWidget)})},
  1469. args: [],
  1470. source: "onMethodsFocusRequested\x0a\x09self focus",
  1471. messageSends: ["focus"],
  1472. referencedClasses: []
  1473. }),
  1474. smalltalk.HLMethodsListWidget);
  1475. smalltalk.addMethod(
  1476. smalltalk.method({
  1477. selector: "onProtocolAdded:",
  1478. category: 'reactions',
  1479. fn: function (aClass){
  1480. var self=this;
  1481. return smalltalk.withContext(function($ctx1) {
  1482. var $1,$2;
  1483. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(aClass);
  1484. if(! smalltalk.assert($1)){
  1485. $2=self;
  1486. return $2;
  1487. };
  1488. _st(self)._setItemsForSelectedProtocol();
  1489. _st(self)._refresh();
  1490. _st(self)._focus();
  1491. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolAdded:",{aClass:aClass},smalltalk.HLMethodsListWidget)})},
  1492. args: ["aClass"],
  1493. source: "onProtocolAdded: aClass\x0a\x09self model selectedClass = aClass ifFalse: [ ^ self ].\x0a\x09\x0a\x09self setItemsForSelectedProtocol.\x0a self refresh.\x0a\x09self focus",
  1494. messageSends: ["ifFalse:", "=", "selectedClass", "model", "setItemsForSelectedProtocol", "refresh", "focus"],
  1495. referencedClasses: []
  1496. }),
  1497. smalltalk.HLMethodsListWidget);
  1498. smalltalk.addMethod(
  1499. smalltalk.method({
  1500. selector: "onProtocolRemoved:",
  1501. category: 'reactions',
  1502. fn: function (aClass){
  1503. var self=this;
  1504. return smalltalk.withContext(function($ctx1) {
  1505. var $1,$2;
  1506. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(aClass);
  1507. if(! smalltalk.assert($1)){
  1508. $2=self;
  1509. return $2;
  1510. };
  1511. _st(self)._setItemsForSelectedProtocol();
  1512. _st(self)._refresh();
  1513. _st(self)._focus();
  1514. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolRemoved:",{aClass:aClass},smalltalk.HLMethodsListWidget)})},
  1515. args: ["aClass"],
  1516. source: "onProtocolRemoved: aClass\x0a\x09self model selectedClass = aClass ifFalse: [ ^ self ].\x0a\x09\x0a\x09self setItemsForSelectedProtocol.\x0a self refresh.\x0a\x09self focus",
  1517. messageSends: ["ifFalse:", "=", "selectedClass", "model", "setItemsForSelectedProtocol", "refresh", "focus"],
  1518. referencedClasses: []
  1519. }),
  1520. smalltalk.HLMethodsListWidget);
  1521. smalltalk.addMethod(
  1522. smalltalk.method({
  1523. selector: "onProtocolSelected:",
  1524. category: 'reactions',
  1525. fn: function (aString){
  1526. var self=this;
  1527. return smalltalk.withContext(function($ctx1) {
  1528. _st(self)._selectedItem_(nil);
  1529. _st(self)._setItemsForSelectedProtocol();
  1530. _st(self)._refresh();
  1531. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString},smalltalk.HLMethodsListWidget)})},
  1532. args: ["aString"],
  1533. source: "onProtocolSelected: aString\x0a self selectedItem: nil.\x0a \x0a\x09self setItemsForSelectedProtocol.\x0a self refresh",
  1534. messageSends: ["selectedItem:", "setItemsForSelectedProtocol", "refresh"],
  1535. referencedClasses: []
  1536. }),
  1537. smalltalk.HLMethodsListWidget);
  1538. smalltalk.addMethod(
  1539. smalltalk.method({
  1540. selector: "overrideSelectors",
  1541. category: 'accessing',
  1542. fn: function (){
  1543. var self=this;
  1544. function $Set(){return smalltalk.Set||(typeof Set=="undefined"?nil:Set)}
  1545. return smalltalk.withContext(function($ctx1) {
  1546. var $2,$3,$1;
  1547. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("override",(function(){
  1548. return smalltalk.withContext(function($ctx2) {
  1549. return _st(_st(_st(_st(self)._model())._selectedClass())._allSuperclasses())._inject_into_(_st($Set())._new(),(function(acc,each){
  1550. return smalltalk.withContext(function($ctx3) {
  1551. $2=acc;
  1552. _st($2)._addAll_(_st(each)._selectors());
  1553. $3=_st($2)._yourself();
  1554. return $3;
  1555. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  1556. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1557. return $1;
  1558. }, function($ctx1) {$ctx1.fill(self,"overrideSelectors",{},smalltalk.HLMethodsListWidget)})},
  1559. args: [],
  1560. source: "overrideSelectors\x0a\x09^ self selectorsCache \x0a \x09at: 'override'\x0a ifAbsentPut: [ \x0a \x09self model selectedClass allSuperclasses\x0a\x09\x09\x09\x09inject: Set new into: [ :acc :each | acc addAll: each selectors; yourself ] ]",
  1561. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSuperclasses", "selectedClass", "model", "selectorsCache"],
  1562. referencedClasses: ["Set"]
  1563. }),
  1564. smalltalk.HLMethodsListWidget);
  1565. smalltalk.addMethod(
  1566. smalltalk.method({
  1567. selector: "overridenSelectors",
  1568. category: 'accessing',
  1569. fn: function (){
  1570. var self=this;
  1571. function $Set(){return smalltalk.Set||(typeof Set=="undefined"?nil:Set)}
  1572. return smalltalk.withContext(function($ctx1) {
  1573. var $2,$3,$1;
  1574. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("overriden",(function(){
  1575. return smalltalk.withContext(function($ctx2) {
  1576. return _st(_st(_st(_st(self)._model())._selectedClass())._allSubclasses())._inject_into_(_st($Set())._new(),(function(acc,each){
  1577. return smalltalk.withContext(function($ctx3) {
  1578. $2=acc;
  1579. _st($2)._addAll_(_st(each)._selectors());
  1580. $3=_st($2)._yourself();
  1581. return $3;
  1582. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  1583. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1584. return $1;
  1585. }, function($ctx1) {$ctx1.fill(self,"overridenSelectors",{},smalltalk.HLMethodsListWidget)})},
  1586. args: [],
  1587. source: "overridenSelectors\x0a\x09^ self selectorsCache \x0a \x09at: 'overriden'\x0a ifAbsentPut: [ \x0a \x09self model selectedClass allSubclasses\x0a\x09\x09\x09\x09inject: Set new into: [ :acc :each | acc addAll: each selectors; yourself ] ]",
  1588. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSubclasses", "selectedClass", "model", "selectorsCache"],
  1589. referencedClasses: ["Set"]
  1590. }),
  1591. smalltalk.HLMethodsListWidget);
  1592. smalltalk.addMethod(
  1593. smalltalk.method({
  1594. selector: "renderContentOn:",
  1595. category: 'rendering',
  1596. fn: function (html){
  1597. var self=this;
  1598. return smalltalk.withContext(function($ctx1) {
  1599. var $1,$2,$3;
  1600. $1=_st(_st(self)._model())._showInstance();
  1601. if(smalltalk.assert($1)){
  1602. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1603. } else {
  1604. $2=_st(html)._div();
  1605. _st($2)._class_("class_side");
  1606. $3=_st($2)._with_((function(){
  1607. return smalltalk.withContext(function($ctx2) {
  1608. return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1609. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1610. $3;
  1611. };
  1612. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLMethodsListWidget)})},
  1613. args: ["html"],
  1614. source: "renderContentOn: html\x0a\x09self model showInstance\x0a \x09ifFalse: [ html div \x0a \x09class: 'class_side'; \x0a with: [ super renderContentOn: html ] ]\x0a \x09ifTrue: [ super renderContentOn: html ]",
  1615. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"],
  1616. referencedClasses: []
  1617. }),
  1618. smalltalk.HLMethodsListWidget);
  1619. smalltalk.addMethod(
  1620. smalltalk.method({
  1621. selector: "renderItemLabel:on:",
  1622. category: 'rendering',
  1623. fn: function (aSelector,html){
  1624. var self=this;
  1625. return smalltalk.withContext(function($ctx1) {
  1626. _st(html)._with_(aSelector);
  1627. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aSelector:aSelector,html:html},smalltalk.HLMethodsListWidget)})},
  1628. args: ["aSelector", "html"],
  1629. source: "renderItemLabel: aSelector on: html\x0a\x09html with: aSelector",
  1630. messageSends: ["with:"],
  1631. referencedClasses: []
  1632. }),
  1633. smalltalk.HLMethodsListWidget);
  1634. smalltalk.addMethod(
  1635. smalltalk.method({
  1636. selector: "selectItem:",
  1637. category: 'actions',
  1638. fn: function (aSelector){
  1639. var self=this;
  1640. return smalltalk.withContext(function($ctx1) {
  1641. var $1,$2;
  1642. $1=aSelector;
  1643. if(($receiver = $1) == nil || $receiver == undefined){
  1644. $2=_st(_st(self)._model())._selectedMethod_(nil);
  1645. return $2;
  1646. } else {
  1647. $1;
  1648. };
  1649. _st(_st(self)._model())._selectedMethod_(_st(self)._methodForSelector_(aSelector));
  1650. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aSelector:aSelector},smalltalk.HLMethodsListWidget)})},
  1651. args: ["aSelector"],
  1652. source: "selectItem: aSelector\x0a\x09aSelector ifNil: [ ^ self model selectedMethod: nil ].\x0a\x0a \x09self model selectedMethod: (self methodForSelector: aSelector)\x0a ",
  1653. messageSends: ["ifNil:", "selectedMethod:", "model", "methodForSelector:"],
  1654. referencedClasses: []
  1655. }),
  1656. smalltalk.HLMethodsListWidget);
  1657. smalltalk.addMethod(
  1658. smalltalk.method({
  1659. selector: "selectorsCache",
  1660. category: 'accessing',
  1661. fn: function (){
  1662. var self=this;
  1663. return smalltalk.withContext(function($ctx1) {
  1664. var $1;
  1665. $1=_st(_st(self)._class())._selectorsCache();
  1666. return $1;
  1667. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{},smalltalk.HLMethodsListWidget)})},
  1668. args: [],
  1669. source: "selectorsCache\x0a\x09^ self class selectorsCache",
  1670. messageSends: ["selectorsCache", "class"],
  1671. referencedClasses: []
  1672. }),
  1673. smalltalk.HLMethodsListWidget);
  1674. smalltalk.addMethod(
  1675. smalltalk.method({
  1676. selector: "selectorsInProtocol:",
  1677. category: 'accessing',
  1678. fn: function (aString){
  1679. var self=this;
  1680. return smalltalk.withContext(function($ctx1) {
  1681. var $1;
  1682. $1=_st(_st(self)._methodsInProtocol_(aString))._collect_((function(each){
  1683. return smalltalk.withContext(function($ctx2) {
  1684. return _st(each)._selector();
  1685. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1686. return $1;
  1687. }, function($ctx1) {$ctx1.fill(self,"selectorsInProtocol:",{aString:aString},smalltalk.HLMethodsListWidget)})},
  1688. args: ["aString"],
  1689. source: "selectorsInProtocol: aString\x0a\x09^ (self methodsInProtocol: aString)\x0a \x09collect: [ :each | each selector ]",
  1690. messageSends: ["collect:", "selector", "methodsInProtocol:"],
  1691. referencedClasses: []
  1692. }),
  1693. smalltalk.HLMethodsListWidget);
  1694. smalltalk.addMethod(
  1695. smalltalk.method({
  1696. selector: "setItemsForProtocol:",
  1697. category: 'private',
  1698. fn: function (aString){
  1699. var self=this;
  1700. return smalltalk.withContext(function($ctx1) {
  1701. var $2,$4,$3,$1;
  1702. $2=self;
  1703. $4=aString;
  1704. if(($receiver = $4) == nil || $receiver == undefined){
  1705. $3=[];
  1706. } else {
  1707. $3=_st(self)._selectorsInProtocol_(aString);
  1708. };
  1709. $1=_st($2)._items_($3);
  1710. return $1;
  1711. }, function($ctx1) {$ctx1.fill(self,"setItemsForProtocol:",{aString:aString},smalltalk.HLMethodsListWidget)})},
  1712. args: ["aString"],
  1713. source: "setItemsForProtocol: aString\x0a\x09^ self items: (aString\x0a \x09ifNil: [ #() ]\x0a \x09ifNotNil: [ self selectorsInProtocol: aString ])",
  1714. messageSends: ["items:", "ifNil:ifNotNil:", "selectorsInProtocol:"],
  1715. referencedClasses: []
  1716. }),
  1717. smalltalk.HLMethodsListWidget);
  1718. smalltalk.addMethod(
  1719. smalltalk.method({
  1720. selector: "setItemsForSelectedProtocol",
  1721. category: 'private',
  1722. fn: function (){
  1723. var self=this;
  1724. return smalltalk.withContext(function($ctx1) {
  1725. _st(self)._setItemsForProtocol_(_st(_st(self)._model())._selectedProtocol());
  1726. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedProtocol",{},smalltalk.HLMethodsListWidget)})},
  1727. args: [],
  1728. source: "setItemsForSelectedProtocol\x0a\x09self setItemsForProtocol: self model selectedProtocol",
  1729. messageSends: ["setItemsForProtocol:", "selectedProtocol", "model"],
  1730. referencedClasses: []
  1731. }),
  1732. smalltalk.HLMethodsListWidget);
  1733. smalltalk.HLMethodsListWidget.klass.iVarNames = ['selectorsCache'];
  1734. smalltalk.addMethod(
  1735. smalltalk.method({
  1736. selector: "selectorsCache",
  1737. category: 'accessing',
  1738. fn: function (){
  1739. var self=this;
  1740. function $HLSelectorsCache(){return smalltalk.HLSelectorsCache||(typeof HLSelectorsCache=="undefined"?nil:HLSelectorsCache)}
  1741. return smalltalk.withContext(function($ctx1) {
  1742. var $1;
  1743. $1=_st($HLSelectorsCache())._current();
  1744. return $1;
  1745. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{},smalltalk.HLMethodsListWidget.klass)})},
  1746. args: [],
  1747. source: "selectorsCache\x0a\x09^ HLSelectorsCache current",
  1748. messageSends: ["current"],
  1749. referencedClasses: ["HLSelectorsCache"]
  1750. }),
  1751. smalltalk.HLMethodsListWidget.klass);
  1752. smalltalk.addClass('HLPackagesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1753. smalltalk.addMethod(
  1754. smalltalk.method({
  1755. selector: "commitPackage",
  1756. category: 'actions',
  1757. fn: function (){
  1758. var self=this;
  1759. return smalltalk.withContext(function($ctx1) {
  1760. _st(_st(self)._model())._commitPackage();
  1761. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage",{},smalltalk.HLPackagesListWidget)})},
  1762. args: [],
  1763. source: "commitPackage\x0a\x09self model commitPackage",
  1764. messageSends: ["commitPackage", "model"],
  1765. referencedClasses: []
  1766. }),
  1767. smalltalk.HLPackagesListWidget);
  1768. smalltalk.addMethod(
  1769. smalltalk.method({
  1770. selector: "focusClassesListWidget",
  1771. category: 'actions',
  1772. fn: function (){
  1773. var self=this;
  1774. function $HLClassesListFocus(){return smalltalk.HLClassesListFocus||(typeof HLClassesListFocus=="undefined"?nil:HLClassesListFocus)}
  1775. return smalltalk.withContext(function($ctx1) {
  1776. _st(_st(_st(self)._model())._announcer())._announce_(_st($HLClassesListFocus())._new());
  1777. return self}, function($ctx1) {$ctx1.fill(self,"focusClassesListWidget",{},smalltalk.HLPackagesListWidget)})},
  1778. args: [],
  1779. source: "focusClassesListWidget\x0a\x09self model announcer announce: HLClassesListFocus new",
  1780. messageSends: ["announce:", "new", "announcer", "model"],
  1781. referencedClasses: ["HLClassesListFocus"]
  1782. }),
  1783. smalltalk.HLPackagesListWidget);
  1784. smalltalk.addMethod(
  1785. smalltalk.method({
  1786. selector: "initializeItems",
  1787. category: 'initialization',
  1788. fn: function (){
  1789. var self=this;
  1790. return smalltalk.withContext(function($ctx1) {
  1791. var $1;
  1792. self["@items"]=_st(_st(_st(self)._model())._packages())._sort_((function(a,b){
  1793. return smalltalk.withContext(function($ctx2) {
  1794. return _st(_st(a)._name()).__lt(_st(b)._name());
  1795. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  1796. $1=self["@items"];
  1797. return $1;
  1798. }, function($ctx1) {$ctx1.fill(self,"initializeItems",{},smalltalk.HLPackagesListWidget)})},
  1799. args: [],
  1800. source: "initializeItems\x0a\x09^ items := self model packages \x0a\x09\x09sort: [ :a :b | a name < b name ]",
  1801. messageSends: ["sort:", "<", "name", "packages", "model"],
  1802. referencedClasses: []
  1803. }),
  1804. smalltalk.HLPackagesListWidget);
  1805. smalltalk.addMethod(
  1806. smalltalk.method({
  1807. selector: "items",
  1808. category: 'accessing',
  1809. fn: function (){
  1810. var self=this;
  1811. return smalltalk.withContext(function($ctx1) {
  1812. var $2,$1;
  1813. $2=self["@items"];
  1814. if(($receiver = $2) == nil || $receiver == undefined){
  1815. $1=_st(self)._initializeItems();
  1816. } else {
  1817. $1=$2;
  1818. };
  1819. return $1;
  1820. }, function($ctx1) {$ctx1.fill(self,"items",{},smalltalk.HLPackagesListWidget)})},
  1821. args: [],
  1822. source: "items\x0a\x09^ items ifNil: [self initializeItems]",
  1823. messageSends: ["ifNil:", "initializeItems"],
  1824. referencedClasses: []
  1825. }),
  1826. smalltalk.HLPackagesListWidget);
  1827. smalltalk.addMethod(
  1828. smalltalk.method({
  1829. selector: "label",
  1830. category: 'accessing',
  1831. fn: function (){
  1832. var self=this;
  1833. return smalltalk.withContext(function($ctx1) {
  1834. return "Packages";
  1835. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLPackagesListWidget)})},
  1836. args: [],
  1837. source: "label\x0a\x09^ 'Packages'",
  1838. messageSends: [],
  1839. referencedClasses: []
  1840. }),
  1841. smalltalk.HLPackagesListWidget);
  1842. smalltalk.addMethod(
  1843. smalltalk.method({
  1844. selector: "observeModel",
  1845. category: 'actions',
  1846. fn: function (){
  1847. var self=this;
  1848. function $HLPackageSelected(){return smalltalk.HLPackageSelected||(typeof HLPackageSelected=="undefined"?nil:HLPackageSelected)}
  1849. function $HLPackagesFocusRequested(){return smalltalk.HLPackagesFocusRequested||(typeof HLPackagesFocusRequested=="undefined"?nil:HLPackagesFocusRequested)}
  1850. return smalltalk.withContext(function($ctx1) {
  1851. var $1,$2;
  1852. $1=_st(_st(self)._model())._announcer();
  1853. _st($1)._on_do_($HLPackageSelected(),(function(ann){
  1854. return smalltalk.withContext(function($ctx2) {
  1855. return _st(self)._onPackageSelected_(_st(ann)._item());
  1856. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1857. $2=_st($1)._on_do_($HLPackagesFocusRequested(),(function(ann){
  1858. return smalltalk.withContext(function($ctx2) {
  1859. return _st(self)._onPackagesFocusRequested();
  1860. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1861. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLPackagesListWidget)})},
  1862. args: [],
  1863. source: "observeModel\x0a self model announcer \x0a\x09\x09on: HLPackageSelected \x0a\x09\x09do: [ :ann | self onPackageSelected: ann item ];\x0a\x09\x09on: HLPackagesFocusRequested \x0a\x09\x09do: [ :ann | self onPackagesFocusRequested ]",
  1864. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model", "onPackagesFocusRequested"],
  1865. referencedClasses: ["HLPackageSelected", "HLPackagesFocusRequested"]
  1866. }),
  1867. smalltalk.HLPackagesListWidget);
  1868. smalltalk.addMethod(
  1869. smalltalk.method({
  1870. selector: "onPackageSelected:",
  1871. category: 'reactions',
  1872. fn: function (aPackage){
  1873. var self=this;
  1874. return smalltalk.withContext(function($ctx1) {
  1875. var $1,$2,$3;
  1876. _st(self)._selectedItem_(aPackage);
  1877. $1=_st(self)._hasFocus();
  1878. if(! smalltalk.assert($1)){
  1879. $2=self;
  1880. _st($2)._activateItem_(aPackage);
  1881. $3=_st($2)._focus();
  1882. $3;
  1883. };
  1884. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{aPackage:aPackage},smalltalk.HLPackagesListWidget)})},
  1885. args: ["aPackage"],
  1886. source: "onPackageSelected: aPackage\x0a\x09self selectedItem: aPackage.\x0a\x09self hasFocus ifFalse: [\x0a\x09\x09self\x0a\x09\x09\x09activateItem: aPackage;\x0a\x09\x09\x09focus ]",
  1887. messageSends: ["selectedItem:", "ifFalse:", "activateItem:", "focus", "hasFocus"],
  1888. referencedClasses: []
  1889. }),
  1890. smalltalk.HLPackagesListWidget);
  1891. smalltalk.addMethod(
  1892. smalltalk.method({
  1893. selector: "onPackagesFocusRequested",
  1894. category: 'reactions',
  1895. fn: function (){
  1896. var self=this;
  1897. return smalltalk.withContext(function($ctx1) {
  1898. _st(self)._focus();
  1899. return self}, function($ctx1) {$ctx1.fill(self,"onPackagesFocusRequested",{},smalltalk.HLPackagesListWidget)})},
  1900. args: [],
  1901. source: "onPackagesFocusRequested\x0a\x09self focus",
  1902. messageSends: ["focus"],
  1903. referencedClasses: []
  1904. }),
  1905. smalltalk.HLPackagesListWidget);
  1906. smalltalk.addMethod(
  1907. smalltalk.method({
  1908. selector: "renderButtonsOn:",
  1909. category: 'rendering',
  1910. fn: function (html){
  1911. var self=this;
  1912. return smalltalk.withContext(function($ctx1) {
  1913. var $1,$3,$4,$2;
  1914. $1=_st(html)._div();
  1915. _st($1)._class_("buttons");
  1916. $2=_st($1)._with_((function(){
  1917. return smalltalk.withContext(function($ctx2) {
  1918. $3=_st(html)._button();
  1919. _st($3)._class_("btn");
  1920. _st($3)._with_("Commit");
  1921. $4=_st($3)._onClick_((function(){
  1922. return smalltalk.withContext(function($ctx3) {
  1923. return _st(self)._commitPackage();
  1924. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1925. return $4;
  1926. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1927. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLPackagesListWidget)})},
  1928. args: ["html"],
  1929. source: "renderButtonsOn: html\x0a\x09html div \x0a\x09\x09class: 'buttons';\x0a\x09\x09with: [\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn';\x0a\x09\x09\x09\x09with: 'Commit';\x0a\x09\x09\x09\x09onClick: [ self commitPackage ] ]",
  1930. messageSends: ["class:", "div", "with:", "button", "onClick:", "commitPackage"],
  1931. referencedClasses: []
  1932. }),
  1933. smalltalk.HLPackagesListWidget);
  1934. smalltalk.addMethod(
  1935. smalltalk.method({
  1936. selector: "renderItemLabel:on:",
  1937. category: 'rendering',
  1938. fn: function (aPackage,html){
  1939. var self=this;
  1940. return smalltalk.withContext(function($ctx1) {
  1941. _st(html)._with_(_st(aPackage)._name());
  1942. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aPackage:aPackage,html:html},smalltalk.HLPackagesListWidget)})},
  1943. args: ["aPackage", "html"],
  1944. source: "renderItemLabel: aPackage on: html\x0a\x09html with: aPackage name",
  1945. messageSends: ["with:", "name"],
  1946. referencedClasses: []
  1947. }),
  1948. smalltalk.HLPackagesListWidget);
  1949. smalltalk.addMethod(
  1950. smalltalk.method({
  1951. selector: "selectItem:",
  1952. category: 'actions',
  1953. fn: function (aPackage){
  1954. var self=this;
  1955. return smalltalk.withContext(function($ctx1) {
  1956. _st(_st(self)._model())._selectedPackage_(aPackage);
  1957. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aPackage:aPackage},smalltalk.HLPackagesListWidget)})},
  1958. args: ["aPackage"],
  1959. source: "selectItem: aPackage\x0a\x09self model selectedPackage: aPackage",
  1960. messageSends: ["selectedPackage:", "model"],
  1961. referencedClasses: []
  1962. }),
  1963. smalltalk.HLPackagesListWidget);
  1964. smalltalk.addClass('HLProtocolsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1965. smalltalk.addMethod(
  1966. smalltalk.method({
  1967. selector: "allProtocol",
  1968. category: 'accessing',
  1969. fn: function (){
  1970. var self=this;
  1971. return smalltalk.withContext(function($ctx1) {
  1972. var $1;
  1973. $1=_st(_st(self)._model())._allProtocol();
  1974. return $1;
  1975. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{},smalltalk.HLProtocolsListWidget)})},
  1976. args: [],
  1977. source: "allProtocol\x0a\x09^ self model allProtocol",
  1978. messageSends: ["allProtocol", "model"],
  1979. referencedClasses: []
  1980. }),
  1981. smalltalk.HLProtocolsListWidget);
  1982. smalltalk.addMethod(
  1983. smalltalk.method({
  1984. selector: "label",
  1985. category: 'accessing',
  1986. fn: function (){
  1987. var self=this;
  1988. return smalltalk.withContext(function($ctx1) {
  1989. return "Protocols";
  1990. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLProtocolsListWidget)})},
  1991. args: [],
  1992. source: "label\x0a\x09^ 'Protocols'",
  1993. messageSends: [],
  1994. referencedClasses: []
  1995. }),
  1996. smalltalk.HLProtocolsListWidget);
  1997. smalltalk.addMethod(
  1998. smalltalk.method({
  1999. selector: "observeModel",
  2000. category: 'actions',
  2001. fn: function (){
  2002. var self=this;
  2003. function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  2004. function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  2005. function $HLProtocolSelected(){return smalltalk.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  2006. function $HLProtocolsFocusRequested(){return smalltalk.HLProtocolsFocusRequested||(typeof HLProtocolsFocusRequested=="undefined"?nil:HLProtocolsFocusRequested)}
  2007. return smalltalk.withContext(function($ctx1) {
  2008. var $1,$2;
  2009. $1=_st(_st(self)._model())._announcer();
  2010. _st($1)._on_do_($HLClassSelected(),(function(ann){
  2011. return smalltalk.withContext(function($ctx2) {
  2012. return _st(self)._onClassSelected_(_st(ann)._item());
  2013. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2014. _st($1)._on_do_($HLShowInstanceToggled(),(function(ann){
  2015. return smalltalk.withContext(function($ctx2) {
  2016. return _st(self)._onClassSelected_(_st(_st(self)._model())._selectedClass());
  2017. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2018. _st($1)._on_do_($HLProtocolSelected(),(function(ann){
  2019. return smalltalk.withContext(function($ctx2) {
  2020. return _st(self)._onProtocolSelected_(_st(ann)._item());
  2021. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2022. $2=_st($1)._on_do_($HLProtocolsFocusRequested(),(function(ann){
  2023. return smalltalk.withContext(function($ctx2) {
  2024. return _st(self)._onProtocolsFocusRequested();
  2025. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2026. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLProtocolsListWidget)})},
  2027. args: [],
  2028. source: "observeModel\x0a self model announcer \x0a\x09\x09on: HLClassSelected \x0a\x09\x09do: [ :ann | self onClassSelected: ann item ];\x0a \x09on: HLShowInstanceToggled \x0a\x09\x09do: [ :ann | self onClassSelected: self model selectedClass ];\x0a \x09on: HLProtocolSelected\x0a\x09\x09do: [ :ann | self onProtocolSelected: ann item ];\x0a\x09\x09on: HLProtocolsFocusRequested \x0a\x09\x09do: [ :ann | self onProtocolsFocusRequested ]",
  2029. messageSends: ["on:do:", "onClassSelected:", "item", "announcer", "model", "selectedClass", "onProtocolSelected:", "onProtocolsFocusRequested"],
  2030. referencedClasses: ["HLClassSelected", "HLShowInstanceToggled", "HLProtocolSelected", "HLProtocolsFocusRequested"]
  2031. }),
  2032. smalltalk.HLProtocolsListWidget);
  2033. smalltalk.addMethod(
  2034. smalltalk.method({
  2035. selector: "observeSystem",
  2036. category: 'actions',
  2037. fn: function (){
  2038. var self=this;
  2039. function $ProtocolAdded(){return smalltalk.ProtocolAdded||(typeof ProtocolAdded=="undefined"?nil:ProtocolAdded)}
  2040. function $ProtocolRemoved(){return smalltalk.ProtocolRemoved||(typeof ProtocolRemoved=="undefined"?nil:ProtocolRemoved)}
  2041. return smalltalk.withContext(function($ctx1) {
  2042. var $1,$2;
  2043. $1=_st(_st(self)._model())._systemAnnouncer();
  2044. _st($1)._on_do_($ProtocolAdded(),(function(ann){
  2045. return smalltalk.withContext(function($ctx2) {
  2046. return _st(self)._onProtocolAdded_to_(_st(ann)._protocol(),_st(ann)._theClass());
  2047. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2048. $2=_st($1)._on_do_($ProtocolRemoved(),(function(ann){
  2049. return smalltalk.withContext(function($ctx2) {
  2050. return _st(self)._onProtocolRemoved_from_(_st(ann)._protocol(),_st(ann)._theClass());
  2051. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2052. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLProtocolsListWidget)})},
  2053. args: [],
  2054. source: "observeSystem\x0a\x09self model systemAnnouncer\x0a\x09\x09on: ProtocolAdded \x0a\x09 do: [ :ann | self onProtocolAdded: ann protocol to: ann theClass ];\x0a\x09 on: ProtocolRemoved\x0a\x09 do: [ :ann | self onProtocolRemoved: ann protocol from: ann theClass ]",
  2055. messageSends: ["on:do:", "onProtocolAdded:to:", "protocol", "theClass", "systemAnnouncer", "model", "onProtocolRemoved:from:"],
  2056. referencedClasses: ["ProtocolAdded", "ProtocolRemoved"]
  2057. }),
  2058. smalltalk.HLProtocolsListWidget);
  2059. smalltalk.addMethod(
  2060. smalltalk.method({
  2061. selector: "onClassSelected:",
  2062. category: 'reactions',
  2063. fn: function (aClass){
  2064. var self=this;
  2065. return smalltalk.withContext(function($ctx1) {
  2066. _st(self)._selectedItem_(nil);
  2067. _st(self)._setItemsForSelectedClass();
  2068. _st(self)._refresh();
  2069. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass},smalltalk.HLProtocolsListWidget)})},
  2070. args: ["aClass"],
  2071. source: "onClassSelected: aClass\x0a self selectedItem: nil.\x0a \x0a self setItemsForSelectedClass.\x0a self refresh",
  2072. messageSends: ["selectedItem:", "setItemsForSelectedClass", "refresh"],
  2073. referencedClasses: []
  2074. }),
  2075. smalltalk.HLProtocolsListWidget);
  2076. smalltalk.addMethod(
  2077. smalltalk.method({
  2078. selector: "onProtocolAdded:to:",
  2079. category: 'reactions',
  2080. fn: function (aString,aClass){
  2081. var self=this;
  2082. return smalltalk.withContext(function($ctx1) {
  2083. var $1,$2;
  2084. $1=_st(aClass).__eq(_st(_st(self)._model())._selectedClass());
  2085. if(! smalltalk.assert($1)){
  2086. $2=self;
  2087. return $2;
  2088. };
  2089. _st(self)._setItemsForSelectedClass();
  2090. _st(self)._refresh();
  2091. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolAdded:to:",{aString:aString,aClass:aClass},smalltalk.HLProtocolsListWidget)})},
  2092. args: ["aString", "aClass"],
  2093. source: "onProtocolAdded: aString to: aClass\x0a\x09aClass = self model selectedClass ifFalse: [ ^ self ].\x0a \x0a self setItemsForSelectedClass.\x0a self refresh",
  2094. messageSends: ["ifFalse:", "=", "selectedClass", "model", "setItemsForSelectedClass", "refresh"],
  2095. referencedClasses: []
  2096. }),
  2097. smalltalk.HLProtocolsListWidget);
  2098. smalltalk.addMethod(
  2099. smalltalk.method({
  2100. selector: "onProtocolRemoved:from:",
  2101. category: 'reactions',
  2102. fn: function (aString,aClass){
  2103. var self=this;
  2104. return smalltalk.withContext(function($ctx1) {
  2105. var $1,$2,$3;
  2106. $1=_st(aClass).__eq(_st(_st(self)._model())._selectedClass());
  2107. if(! smalltalk.assert($1)){
  2108. $2=self;
  2109. return $2;
  2110. };
  2111. $3=_st(_st(_st(self)._model())._selectedProtocol()).__eq(aString);
  2112. if(smalltalk.assert($3)){
  2113. _st(self)._selectItem_(nil);
  2114. };
  2115. _st(self)._setItemsForSelectedClass();
  2116. _st(self)._refresh();
  2117. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolRemoved:from:",{aString:aString,aClass:aClass},smalltalk.HLProtocolsListWidget)})},
  2118. args: ["aString", "aClass"],
  2119. source: "onProtocolRemoved: aString from: aClass\x0a\x09aClass = self model selectedClass ifFalse: [ ^ self ].\x0a \x0a self model selectedProtocol = aString \x0a \x09ifTrue: [ self selectItem: nil ].\x0a \x0a self setItemsForSelectedClass.\x0a self refresh",
  2120. messageSends: ["ifFalse:", "=", "selectedClass", "model", "ifTrue:", "selectItem:", "selectedProtocol", "setItemsForSelectedClass", "refresh"],
  2121. referencedClasses: []
  2122. }),
  2123. smalltalk.HLProtocolsListWidget);
  2124. smalltalk.addMethod(
  2125. smalltalk.method({
  2126. selector: "onProtocolSelected:",
  2127. category: 'reactions',
  2128. fn: function (aString){
  2129. var self=this;
  2130. return smalltalk.withContext(function($ctx1) {
  2131. var $1,$2,$3,$4,$5;
  2132. _st(self)._selectedItem_(aString);
  2133. $1=aString;
  2134. if(($receiver = $1) == nil || $receiver == undefined){
  2135. $2=self;
  2136. return $2;
  2137. } else {
  2138. $1;
  2139. };
  2140. $3=_st(self)._hasFocus();
  2141. if(! smalltalk.assert($3)){
  2142. $4=self;
  2143. _st($4)._activateItem_(aString);
  2144. $5=_st($4)._focus();
  2145. $5;
  2146. };
  2147. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString},smalltalk.HLProtocolsListWidget)})},
  2148. args: ["aString"],
  2149. source: "onProtocolSelected: aString\x0a\x09self selectedItem: aString.\x0a\x09aString ifNil: [ ^ self ].\x0a \x0a\x09self hasFocus ifFalse: [\x0a\x09\x09self \x0a\x09\x09\x09activateItem: aString;\x0a\x09\x09\x09focus ]",
  2150. messageSends: ["selectedItem:", "ifNil:", "ifFalse:", "activateItem:", "focus", "hasFocus"],
  2151. referencedClasses: []
  2152. }),
  2153. smalltalk.HLProtocolsListWidget);
  2154. smalltalk.addMethod(
  2155. smalltalk.method({
  2156. selector: "onProtocolsFocusRequested",
  2157. category: 'reactions',
  2158. fn: function (){
  2159. var self=this;
  2160. return smalltalk.withContext(function($ctx1) {
  2161. _st(self)._focus();
  2162. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolsFocusRequested",{},smalltalk.HLProtocolsListWidget)})},
  2163. args: [],
  2164. source: "onProtocolsFocusRequested\x0a\x09self focus",
  2165. messageSends: ["focus"],
  2166. referencedClasses: []
  2167. }),
  2168. smalltalk.HLProtocolsListWidget);
  2169. smalltalk.addMethod(
  2170. smalltalk.method({
  2171. selector: "renderContentOn:",
  2172. category: 'rendering',
  2173. fn: function (html){
  2174. var self=this;
  2175. return smalltalk.withContext(function($ctx1) {
  2176. var $1,$2,$3;
  2177. $1=_st(_st(self)._model())._showInstance();
  2178. if(smalltalk.assert($1)){
  2179. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  2180. } else {
  2181. $2=_st(html)._div();
  2182. _st($2)._class_("class_side");
  2183. $3=_st($2)._with_((function(){
  2184. return smalltalk.withContext(function($ctx2) {
  2185. return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  2186. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2187. $3;
  2188. };
  2189. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLProtocolsListWidget)})},
  2190. args: ["html"],
  2191. source: "renderContentOn: html\x0a\x09self model showInstance\x0a \x09ifFalse: [ html div \x0a \x09class: 'class_side'; \x0a with: [ super renderContentOn: html ] ]\x0a \x09ifTrue: [ super renderContentOn: html ]",
  2192. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"],
  2193. referencedClasses: []
  2194. }),
  2195. smalltalk.HLProtocolsListWidget);
  2196. smalltalk.addMethod(
  2197. smalltalk.method({
  2198. selector: "selectItem:",
  2199. category: 'actions',
  2200. fn: function (aString){
  2201. var self=this;
  2202. return smalltalk.withContext(function($ctx1) {
  2203. _st(_st(self)._model())._selectedProtocol_(aString);
  2204. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aString:aString},smalltalk.HLProtocolsListWidget)})},
  2205. args: ["aString"],
  2206. source: "selectItem: aString\x0a self model selectedProtocol: aString",
  2207. messageSends: ["selectedProtocol:", "model"],
  2208. referencedClasses: []
  2209. }),
  2210. smalltalk.HLProtocolsListWidget);
  2211. smalltalk.addMethod(
  2212. smalltalk.method({
  2213. selector: "selectedItem",
  2214. category: 'accessing',
  2215. fn: function (){
  2216. var self=this;
  2217. return smalltalk.withContext(function($ctx1) {
  2218. var $1;
  2219. $1=smalltalk.HLBrowserListWidget.fn.prototype._selectedItem.apply(_st(self), []);
  2220. return $1;
  2221. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{},smalltalk.HLProtocolsListWidget)})},
  2222. args: [],
  2223. source: "selectedItem\x0a\x09^ super selectedItem\x22 ifNil: [ self allProtocol ]\x22",
  2224. messageSends: ["selectedItem"],
  2225. referencedClasses: []
  2226. }),
  2227. smalltalk.HLProtocolsListWidget);
  2228. smalltalk.addMethod(
  2229. smalltalk.method({
  2230. selector: "setItemsForClass:",
  2231. category: 'private',
  2232. fn: function (aClass){
  2233. var self=this;
  2234. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  2235. return smalltalk.withContext(function($ctx1) {
  2236. var $1,$3,$4,$5,$2;
  2237. $1=self;
  2238. $3=aClass;
  2239. if(($receiver = $3) == nil || $receiver == undefined){
  2240. $2=_st($Array())._with_(_st(self)._allProtocol());
  2241. } else {
  2242. $4=_st($Array())._with_(_st(self)._allProtocol());
  2243. _st($4)._addAll_(_st(aClass)._protocols());
  2244. $5=_st($4)._yourself();
  2245. $2=$5;
  2246. };
  2247. _st($1)._items_($2);
  2248. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForClass:",{aClass:aClass},smalltalk.HLProtocolsListWidget)})},
  2249. args: ["aClass"],
  2250. source: "setItemsForClass: aClass\x0a\x09self items: (aClass\x0a \x09ifNil: [ Array with: self allProtocol ]\x0a \x09ifNotNil: [ \x0a \x09(Array with: self allProtocol) \x0a \x09addAll: aClass protocols; \x0a yourself ])",
  2251. messageSends: ["items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself"],
  2252. referencedClasses: ["Array"]
  2253. }),
  2254. smalltalk.HLProtocolsListWidget);
  2255. smalltalk.addMethod(
  2256. smalltalk.method({
  2257. selector: "setItemsForSelectedClass",
  2258. category: 'private',
  2259. fn: function (){
  2260. var self=this;
  2261. return smalltalk.withContext(function($ctx1) {
  2262. _st(self)._setItemsForClass_(_st(_st(self)._model())._selectedClass());
  2263. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedClass",{},smalltalk.HLProtocolsListWidget)})},
  2264. args: [],
  2265. source: "setItemsForSelectedClass\x0a\x09self setItemsForClass: self model selectedClass",
  2266. messageSends: ["setItemsForClass:", "selectedClass", "model"],
  2267. referencedClasses: []
  2268. }),
  2269. smalltalk.HLProtocolsListWidget);
  2270. smalltalk.addClass('HLBrowserModel', smalltalk.Object, ['announcer', 'environment', 'selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedSelector', 'showInstance', 'showComment'], 'Helios-Browser');
  2271. smalltalk.addMethod(
  2272. smalltalk.method({
  2273. selector: "addInstVarNamed:",
  2274. category: 'actions',
  2275. fn: function (aString){
  2276. var self=this;
  2277. function $HLInstVarAdded(){return smalltalk.HLInstVarAdded||(typeof HLInstVarAdded=="undefined"?nil:HLInstVarAdded)}
  2278. return smalltalk.withContext(function($ctx1) {
  2279. var $1,$2;
  2280. _st(_st(self)._environment())._addInstVarNamed_to_(aString,_st(self)._selectedClass());
  2281. $1=_st($HLInstVarAdded())._new();
  2282. _st($1)._theClass_(_st(self)._selectedClass());
  2283. _st($1)._variableName_(aString);
  2284. $2=_st($1)._yourself();
  2285. _st(_st(self)._announcer())._announce_($2);
  2286. return self}, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:",{aString:aString},smalltalk.HLBrowserModel)})},
  2287. args: ["aString"],
  2288. source: "addInstVarNamed: aString\x0a\x09self environment addInstVarNamed: aString to: self selectedClass.\x0a\x09self announcer announce: (HLInstVarAdded new\x0a\x09\x09theClass: self selectedClass;\x0a\x09\x09variableName: aString;\x0a\x09\x09yourself)",
  2289. messageSends: ["addInstVarNamed:to:", "selectedClass", "environment", "announce:", "theClass:", "new", "variableName:", "yourself", "announcer"],
  2290. referencedClasses: ["HLInstVarAdded"]
  2291. }),
  2292. smalltalk.HLBrowserModel);
  2293. smalltalk.addMethod(
  2294. smalltalk.method({
  2295. selector: "allProtocol",
  2296. category: 'defaults',
  2297. fn: function (){
  2298. var self=this;
  2299. return smalltalk.withContext(function($ctx1) {
  2300. return "-- all --";
  2301. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{},smalltalk.HLBrowserModel)})},
  2302. args: [],
  2303. source: "allProtocol\x0a\x09^ '-- all --'",
  2304. messageSends: [],
  2305. referencedClasses: []
  2306. }),
  2307. smalltalk.HLBrowserModel);
  2308. smalltalk.addMethod(
  2309. smalltalk.method({
  2310. selector: "announcer",
  2311. category: 'accessing',
  2312. fn: function (){
  2313. var self=this;
  2314. function $Announcer(){return smalltalk.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
  2315. return smalltalk.withContext(function($ctx1) {
  2316. var $2,$1;
  2317. $2=self["@announcer"];
  2318. if(($receiver = $2) == nil || $receiver == undefined){
  2319. self["@announcer"]=_st($Announcer())._new();
  2320. $1=self["@announcer"];
  2321. } else {
  2322. $1=$2;
  2323. };
  2324. return $1;
  2325. }, function($ctx1) {$ctx1.fill(self,"announcer",{},smalltalk.HLBrowserModel)})},
  2326. args: [],
  2327. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  2328. messageSends: ["ifNil:", "new"],
  2329. referencedClasses: ["Announcer"]
  2330. }),
  2331. smalltalk.HLBrowserModel);
  2332. smalltalk.addMethod(
  2333. smalltalk.method({
  2334. selector: "availableClassNames",
  2335. category: 'accessing',
  2336. fn: function (){
  2337. var self=this;
  2338. return smalltalk.withContext(function($ctx1) {
  2339. var $1;
  2340. $1=_st(_st(self)._environment())._availableClassNames();
  2341. return $1;
  2342. }, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},smalltalk.HLBrowserModel)})},
  2343. args: [],
  2344. source: "availableClassNames\x0a\x09^ self environment availableClassNames",
  2345. messageSends: ["availableClassNames", "environment"],
  2346. referencedClasses: []
  2347. }),
  2348. smalltalk.HLBrowserModel);
  2349. smalltalk.addMethod(
  2350. smalltalk.method({
  2351. selector: "availableProtocols",
  2352. category: 'accessing',
  2353. fn: function (){
  2354. var self=this;
  2355. return smalltalk.withContext(function($ctx1) {
  2356. var $1;
  2357. $1=_st(_st(self)._environment())._availableProtocolsFor_(_st(self)._selectedClass());
  2358. return $1;
  2359. }, function($ctx1) {$ctx1.fill(self,"availableProtocols",{},smalltalk.HLBrowserModel)})},
  2360. args: [],
  2361. source: "availableProtocols\x0a\x09^ self environment availableProtocolsFor: self selectedClass",
  2362. messageSends: ["availableProtocolsFor:", "selectedClass", "environment"],
  2363. referencedClasses: []
  2364. }),
  2365. smalltalk.HLBrowserModel);
  2366. smalltalk.addMethod(
  2367. smalltalk.method({
  2368. selector: "commitPackage",
  2369. category: 'commands actions',
  2370. fn: function (){
  2371. var self=this;
  2372. return smalltalk.withContext(function($ctx1) {
  2373. _st(self)._withHelperLabelled_do_(_st(_st("Committing package ").__comma(_st(_st(self)._selectedPackage())._name())).__comma("..."),(function(){
  2374. return smalltalk.withContext(function($ctx2) {
  2375. return _st(_st(self)._environment())._commitPackage_(_st(self)._selectedPackage());
  2376. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2377. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage",{},smalltalk.HLBrowserModel)})},
  2378. args: [],
  2379. source: "commitPackage\x0a\x09self \x0a\x09\x09withHelperLabelled: 'Committing package ', self selectedPackage name, '...'\x0a\x09\x09do: [ self environment commitPackage: self selectedPackage ]",
  2380. messageSends: ["withHelperLabelled:do:", ",", "name", "selectedPackage", "commitPackage:", "environment"],
  2381. referencedClasses: []
  2382. }),
  2383. smalltalk.HLBrowserModel);
  2384. smalltalk.addMethod(
  2385. smalltalk.method({
  2386. selector: "compilationProtocol",
  2387. category: 'private',
  2388. fn: function (){
  2389. var self=this;
  2390. var currentProtocol;
  2391. return smalltalk.withContext(function($ctx1) {
  2392. var $1,$2,$4,$3;
  2393. currentProtocol=_st(self)._selectedProtocol();
  2394. $1=currentProtocol;
  2395. if(($receiver = $1) == nil || $receiver == undefined){
  2396. currentProtocol=_st(self)._unclassifiedProtocol();
  2397. currentProtocol;
  2398. } else {
  2399. $1;
  2400. };
  2401. $2=_st(self)._selectedMethod();
  2402. if(($receiver = $2) == nil || $receiver == undefined){
  2403. $2;
  2404. } else {
  2405. currentProtocol=_st(_st(self)._selectedMethod())._protocol();
  2406. currentProtocol;
  2407. };
  2408. $4=_st(currentProtocol).__eq(_st(self)._allProtocol());
  2409. if(smalltalk.assert($4)){
  2410. $3=_st(self)._unclassifiedProtocol();
  2411. } else {
  2412. $3=currentProtocol;
  2413. };
  2414. return $3;
  2415. }, function($ctx1) {$ctx1.fill(self,"compilationProtocol",{currentProtocol:currentProtocol},smalltalk.HLBrowserModel)})},
  2416. args: [],
  2417. source: "compilationProtocol\x0a\x09| currentProtocol |\x0a\x09\x0a\x09currentProtocol := self selectedProtocol.\x0a\x09currentProtocol ifNil: [ currentProtocol := self unclassifiedProtocol ].\x0a\x09self selectedMethod ifNotNil: [ currentProtocol := self selectedMethod protocol ].\x0a\x0a\x09^ currentProtocol = self allProtocol\x0a\x09\x09ifTrue: [ self unclassifiedProtocol ]\x0a\x09\x09ifFalse: [ currentProtocol ]",
  2418. messageSends: ["selectedProtocol", "ifNil:", "unclassifiedProtocol", "ifNotNil:", "protocol", "selectedMethod", "ifTrue:ifFalse:", "=", "allProtocol"],
  2419. referencedClasses: []
  2420. }),
  2421. smalltalk.HLBrowserModel);
  2422. smalltalk.addMethod(
  2423. smalltalk.method({
  2424. selector: "compileClassComment:",
  2425. category: 'compiling',
  2426. fn: function (aString){
  2427. var self=this;
  2428. return smalltalk.withContext(function($ctx1) {
  2429. _st(_st(self)._environment())._compileClassComment_for_(aString,_st(self)._selectedClass());
  2430. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment:",{aString:aString},smalltalk.HLBrowserModel)})},
  2431. args: ["aString"],
  2432. source: "compileClassComment: aString\x0a\x09self environment \x0a\x09\x09compileClassComment: aString \x0a\x09\x09for: self selectedClass",
  2433. messageSends: ["compileClassComment:for:", "selectedClass", "environment"],
  2434. referencedClasses: []
  2435. }),
  2436. smalltalk.HLBrowserModel);
  2437. smalltalk.addMethod(
  2438. smalltalk.method({
  2439. selector: "compileClassDefinition:",
  2440. category: 'compiling',
  2441. fn: function (aString){
  2442. var self=this;
  2443. return smalltalk.withContext(function($ctx1) {
  2444. _st(_st(self)._environment())._compileClassDefinition_(aString);
  2445. return self}, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString},smalltalk.HLBrowserModel)})},
  2446. args: ["aString"],
  2447. source: "compileClassDefinition: aString\x0a\x09self environment compileClassDefinition: aString",
  2448. messageSends: ["compileClassDefinition:", "environment"],
  2449. referencedClasses: []
  2450. }),
  2451. smalltalk.HLBrowserModel);
  2452. smalltalk.addMethod(
  2453. smalltalk.method({
  2454. selector: "compileMethod:",
  2455. category: 'compiling',
  2456. fn: function (aString){
  2457. var self=this;
  2458. return smalltalk.withContext(function($ctx1) {
  2459. _st(self)._withCompileErrorHandling_((function(){
  2460. return smalltalk.withContext(function($ctx2) {
  2461. return _st(_st(self)._environment())._compileMethod_for_protocol_(aString,_st(self)._selectedClass(),_st(self)._compilationProtocol());
  2462. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2463. return self}, function($ctx1) {$ctx1.fill(self,"compileMethod:",{aString:aString},smalltalk.HLBrowserModel)})},
  2464. args: ["aString"],
  2465. source: "compileMethod: aString\x0a\x0a\x09self withCompileErrorHandling: [ self environment \x0a\x09\x09compileMethod: aString \x0a\x09\x09for: self selectedClass\x0a\x09\x09protocol: self compilationProtocol ]",
  2466. messageSends: ["withCompileErrorHandling:", "compileMethod:for:protocol:", "selectedClass", "compilationProtocol", "environment"],
  2467. referencedClasses: []
  2468. }),
  2469. smalltalk.HLBrowserModel);
  2470. smalltalk.addMethod(
  2471. smalltalk.method({
  2472. selector: "environment",
  2473. category: 'accessing',
  2474. fn: function (){
  2475. var self=this;
  2476. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  2477. return smalltalk.withContext(function($ctx1) {
  2478. var $2,$1;
  2479. $2=self["@environment"];
  2480. if(($receiver = $2) == nil || $receiver == undefined){
  2481. $1=_st(_st($HLManager())._current())._environment();
  2482. } else {
  2483. $1=$2;
  2484. };
  2485. return $1;
  2486. }, function($ctx1) {$ctx1.fill(self,"environment",{},smalltalk.HLBrowserModel)})},
  2487. args: [],
  2488. source: "environment\x0a\x09^ environment ifNil: [ HLManager current environment ]",
  2489. messageSends: ["ifNil:", "environment", "current"],
  2490. referencedClasses: ["HLManager"]
  2491. }),
  2492. smalltalk.HLBrowserModel);
  2493. smalltalk.addMethod(
  2494. smalltalk.method({
  2495. selector: "environment:",
  2496. category: 'accessing',
  2497. fn: function (anEnvironment){
  2498. var self=this;
  2499. return smalltalk.withContext(function($ctx1) {
  2500. self["@environment"]=anEnvironment;
  2501. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment},smalltalk.HLBrowserModel)})},
  2502. args: ["anEnvironment"],
  2503. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  2504. messageSends: [],
  2505. referencedClasses: []
  2506. }),
  2507. smalltalk.HLBrowserModel);
  2508. smalltalk.addMethod(
  2509. smalltalk.method({
  2510. selector: "focusOnClasses",
  2511. category: 'actions',
  2512. fn: function (){
  2513. var self=this;
  2514. function $HLClassesFocusRequested(){return smalltalk.HLClassesFocusRequested||(typeof HLClassesFocusRequested=="undefined"?nil:HLClassesFocusRequested)}
  2515. return smalltalk.withContext(function($ctx1) {
  2516. _st(_st(self)._announcer())._announce_(_st($HLClassesFocusRequested())._new());
  2517. return self}, function($ctx1) {$ctx1.fill(self,"focusOnClasses",{},smalltalk.HLBrowserModel)})},
  2518. args: [],
  2519. source: "focusOnClasses\x0a\x09self announcer announce: HLClassesFocusRequested new",
  2520. messageSends: ["announce:", "new", "announcer"],
  2521. referencedClasses: ["HLClassesFocusRequested"]
  2522. }),
  2523. smalltalk.HLBrowserModel);
  2524. smalltalk.addMethod(
  2525. smalltalk.method({
  2526. selector: "focusOnMethods",
  2527. category: 'actions',
  2528. fn: function (){
  2529. var self=this;
  2530. function $HLMethodsFocusRequested(){return smalltalk.HLMethodsFocusRequested||(typeof HLMethodsFocusRequested=="undefined"?nil:HLMethodsFocusRequested)}
  2531. return smalltalk.withContext(function($ctx1) {
  2532. _st(_st(self)._announcer())._announce_(_st($HLMethodsFocusRequested())._new());
  2533. return self}, function($ctx1) {$ctx1.fill(self,"focusOnMethods",{},smalltalk.HLBrowserModel)})},
  2534. args: [],
  2535. source: "focusOnMethods\x0a\x09self announcer announce: HLMethodsFocusRequested new",
  2536. messageSends: ["announce:", "new", "announcer"],
  2537. referencedClasses: ["HLMethodsFocusRequested"]
  2538. }),
  2539. smalltalk.HLBrowserModel);
  2540. smalltalk.addMethod(
  2541. smalltalk.method({
  2542. selector: "focusOnPackages",
  2543. category: 'actions',
  2544. fn: function (){
  2545. var self=this;
  2546. function $HLPackagesFocusRequested(){return smalltalk.HLPackagesFocusRequested||(typeof HLPackagesFocusRequested=="undefined"?nil:HLPackagesFocusRequested)}
  2547. return smalltalk.withContext(function($ctx1) {
  2548. _st(_st(self)._announcer())._announce_(_st($HLPackagesFocusRequested())._new());
  2549. return self}, function($ctx1) {$ctx1.fill(self,"focusOnPackages",{},smalltalk.HLBrowserModel)})},
  2550. args: [],
  2551. source: "focusOnPackages\x0a\x09self announcer announce: HLPackagesFocusRequested new",
  2552. messageSends: ["announce:", "new", "announcer"],
  2553. referencedClasses: ["HLPackagesFocusRequested"]
  2554. }),
  2555. smalltalk.HLBrowserModel);
  2556. smalltalk.addMethod(
  2557. smalltalk.method({
  2558. selector: "focusOnProtocols",
  2559. category: 'actions',
  2560. fn: function (){
  2561. var self=this;
  2562. function $HLProtocolsFocusRequested(){return smalltalk.HLProtocolsFocusRequested||(typeof HLProtocolsFocusRequested=="undefined"?nil:HLProtocolsFocusRequested)}
  2563. return smalltalk.withContext(function($ctx1) {
  2564. _st(_st(self)._announcer())._announce_(_st($HLProtocolsFocusRequested())._new());
  2565. return self}, function($ctx1) {$ctx1.fill(self,"focusOnProtocols",{},smalltalk.HLBrowserModel)})},
  2566. args: [],
  2567. source: "focusOnProtocols\x0a\x09self announcer announce: HLProtocolsFocusRequested new",
  2568. messageSends: ["announce:", "new", "announcer"],
  2569. referencedClasses: ["HLProtocolsFocusRequested"]
  2570. }),
  2571. smalltalk.HLBrowserModel);
  2572. smalltalk.addMethod(
  2573. smalltalk.method({
  2574. selector: "focusOnSourceCode",
  2575. category: 'actions',
  2576. fn: function (){
  2577. var self=this;
  2578. function $HLSourceCodeFocusRequested(){return smalltalk.HLSourceCodeFocusRequested||(typeof HLSourceCodeFocusRequested=="undefined"?nil:HLSourceCodeFocusRequested)}
  2579. return smalltalk.withContext(function($ctx1) {
  2580. _st(_st(self)._announcer())._announce_(_st($HLSourceCodeFocusRequested())._new());
  2581. return self}, function($ctx1) {$ctx1.fill(self,"focusOnSourceCode",{},smalltalk.HLBrowserModel)})},
  2582. args: [],
  2583. source: "focusOnSourceCode\x0a\x09self announcer announce: HLSourceCodeFocusRequested new",
  2584. messageSends: ["announce:", "new", "announcer"],
  2585. referencedClasses: ["HLSourceCodeFocusRequested"]
  2586. }),
  2587. smalltalk.HLBrowserModel);
  2588. smalltalk.addMethod(
  2589. smalltalk.method({
  2590. selector: "handleCompileError:",
  2591. category: 'error handling',
  2592. fn: function (anError){
  2593. var self=this;
  2594. function $HLCompileErrorRaised(){return smalltalk.HLCompileErrorRaised||(typeof HLCompileErrorRaised=="undefined"?nil:HLCompileErrorRaised)}
  2595. return smalltalk.withContext(function($ctx1) {
  2596. var $1,$2;
  2597. $1=_st($HLCompileErrorRaised())._new();
  2598. _st($1)._error_(anError);
  2599. $2=_st($1)._yourself();
  2600. _st(_st(self)._announcer())._announce_($2);
  2601. return self}, function($ctx1) {$ctx1.fill(self,"handleCompileError:",{anError:anError},smalltalk.HLBrowserModel)})},
  2602. args: ["anError"],
  2603. source: "handleCompileError: anError\x0a\x09self announcer announce: (HLCompileErrorRaised new\x0a\x09\x09error: anError;\x0a\x09\x09yourself)",
  2604. messageSends: ["announce:", "error:", "new", "yourself", "announcer"],
  2605. referencedClasses: ["HLCompileErrorRaised"]
  2606. }),
  2607. smalltalk.HLBrowserModel);
  2608. smalltalk.addMethod(
  2609. smalltalk.method({
  2610. selector: "handleParseError:",
  2611. category: 'error handling',
  2612. fn: function (anError){
  2613. var self=this;
  2614. var split,line,column,messageToInsert;
  2615. function $HLParseErrorRaised(){return smalltalk.HLParseErrorRaised||(typeof HLParseErrorRaised=="undefined"?nil:HLParseErrorRaised)}
  2616. return smalltalk.withContext(function($ctx1) {
  2617. var $1,$2;
  2618. split=_st(_st(anError)._messageText())._tokenize_(" : ");
  2619. messageToInsert=_st(split)._second();
  2620. split=_st(_st(split)._first())._copyFrom_to_((21),_st(_st(split)._first())._size());
  2621. split=_st(split)._tokenize_(" column ");
  2622. line=_st(split)._first();
  2623. column=_st(split)._second();
  2624. $1=_st($HLParseErrorRaised())._new();
  2625. _st($1)._line_(_st(line)._asNumber());
  2626. _st($1)._column_(_st(column)._asNumber());
  2627. _st($1)._message_(messageToInsert);
  2628. _st($1)._error_(anError);
  2629. $2=_st($1)._yourself();
  2630. _st(_st(self)._announcer())._announce_($2);
  2631. return self}, function($ctx1) {$ctx1.fill(self,"handleParseError:",{anError:anError,split:split,line:line,column:column,messageToInsert:messageToInsert},smalltalk.HLBrowserModel)})},
  2632. args: ["anError"],
  2633. source: "handleParseError: anError\x0a\x09| split line column messageToInsert |\x0a\x09\x0a\x09split := anError messageText tokenize: ' : '.\x0a\x09messageToInsert := split second.\x0a\x0a\x09\x2221 = 'Parse error on line ' size + 1\x22\x0a\x09split := split first copyFrom: 21 to: split first size.\x0a\x09\x0a\x09split := split tokenize: ' column '.\x0a\x09line := split first.\x0a\x09column := split second.\x0a\x09\x0a\x09self announcer announce: (HLParseErrorRaised new\x0a\x09\x09line: line asNumber;\x0a\x09\x09column: column asNumber;\x0a\x09\x09message: messageToInsert;\x0a\x09\x09error: anError;\x0a\x09\x09yourself)",
  2634. messageSends: ["tokenize:", "messageText", "second", "copyFrom:to:", "size", "first", "announce:", "line:", "asNumber", "new", "column:", "message:", "error:", "yourself", "announcer"],
  2635. referencedClasses: ["HLParseErrorRaised"]
  2636. }),
  2637. smalltalk.HLBrowserModel);
  2638. smalltalk.addMethod(
  2639. smalltalk.method({
  2640. selector: "handleUnkownVariableError:",
  2641. category: 'accessing',
  2642. fn: function (anError){
  2643. var self=this;
  2644. function $HLUnknownVariableErrorRaised(){return smalltalk.HLUnknownVariableErrorRaised||(typeof HLUnknownVariableErrorRaised=="undefined"?nil:HLUnknownVariableErrorRaised)}
  2645. return smalltalk.withContext(function($ctx1) {
  2646. var $1,$2;
  2647. $1=_st($HLUnknownVariableErrorRaised())._new();
  2648. _st($1)._error_(anError);
  2649. $2=_st($1)._yourself();
  2650. _st(_st(self)._announcer())._announce_($2);
  2651. return self}, function($ctx1) {$ctx1.fill(self,"handleUnkownVariableError:",{anError:anError},smalltalk.HLBrowserModel)})},
  2652. args: ["anError"],
  2653. source: "handleUnkownVariableError: anError\x0a\x09self announcer announce: (HLUnknownVariableErrorRaised new\x0a\x09\x09error: anError;\x0a\x09\x09yourself)",
  2654. messageSends: ["announce:", "error:", "new", "yourself", "announcer"],
  2655. referencedClasses: ["HLUnknownVariableErrorRaised"]
  2656. }),
  2657. smalltalk.HLBrowserModel);
  2658. smalltalk.addMethod(
  2659. smalltalk.method({
  2660. selector: "manager",
  2661. category: 'accessing',
  2662. fn: function (){
  2663. var self=this;
  2664. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  2665. return smalltalk.withContext(function($ctx1) {
  2666. var $1;
  2667. $1=_st($HLManager())._current();
  2668. return $1;
  2669. }, function($ctx1) {$ctx1.fill(self,"manager",{},smalltalk.HLBrowserModel)})},
  2670. args: [],
  2671. source: "manager\x0a\x09^ HLManager current",
  2672. messageSends: ["current"],
  2673. referencedClasses: ["HLManager"]
  2674. }),
  2675. smalltalk.HLBrowserModel);
  2676. smalltalk.addMethod(
  2677. smalltalk.method({
  2678. selector: "moveMethodToClass:",
  2679. category: 'commands actions',
  2680. fn: function (aClassName){
  2681. var self=this;
  2682. return smalltalk.withContext(function($ctx1) {
  2683. _st(_st(self)._environment())._moveMethod_toClass_(_st(self)._selectedMethod(),aClassName);
  2684. return self}, function($ctx1) {$ctx1.fill(self,"moveMethodToClass:",{aClassName:aClassName},smalltalk.HLBrowserModel)})},
  2685. args: ["aClassName"],
  2686. source: "moveMethodToClass: aClassName\x0a\x09self environment \x0a\x09\x09moveMethod: self selectedMethod \x0a\x09\x09toClass: aClassName",
  2687. messageSends: ["moveMethod:toClass:", "selectedMethod", "environment"],
  2688. referencedClasses: []
  2689. }),
  2690. smalltalk.HLBrowserModel);
  2691. smalltalk.addMethod(
  2692. smalltalk.method({
  2693. selector: "moveMethodToProtocol:",
  2694. category: 'commands actions',
  2695. fn: function (aProtocol){
  2696. var self=this;
  2697. return smalltalk.withContext(function($ctx1) {
  2698. _st(_st(self)._environment())._moveMethod_toProtocol_(_st(self)._selectedMethod(),aProtocol);
  2699. return self}, function($ctx1) {$ctx1.fill(self,"moveMethodToProtocol:",{aProtocol:aProtocol},smalltalk.HLBrowserModel)})},
  2700. args: ["aProtocol"],
  2701. source: "moveMethodToProtocol: aProtocol\x0a\x09self environment moveMethod: self selectedMethod toProtocol: aProtocol",
  2702. messageSends: ["moveMethod:toProtocol:", "selectedMethod", "environment"],
  2703. referencedClasses: []
  2704. }),
  2705. smalltalk.HLBrowserModel);
  2706. smalltalk.addMethod(
  2707. smalltalk.method({
  2708. selector: "openClassNamed:",
  2709. category: 'commands actions',
  2710. fn: function (aString){
  2711. var self=this;
  2712. var class_;
  2713. return smalltalk.withContext(function($ctx1) {
  2714. class_=_st(_st(self)._environment())._classNamed_(aString);
  2715. _st(self)._selectedPackage_(_st(class_)._package());
  2716. _st(self)._selectedClass_(class_);
  2717. return self}, function($ctx1) {$ctx1.fill(self,"openClassNamed:",{aString:aString,class_:class_},smalltalk.HLBrowserModel)})},
  2718. args: ["aString"],
  2719. source: "openClassNamed: aString\x0a\x09| class |\x0a\x09\x0a\x09class := self environment classNamed: aString.\x0a\x09self selectedPackage: class package.\x0a\x09self selectedClass: class",
  2720. messageSends: ["classNamed:", "environment", "selectedPackage:", "package", "selectedClass:"],
  2721. referencedClasses: []
  2722. }),
  2723. smalltalk.HLBrowserModel);
  2724. smalltalk.addMethod(
  2725. smalltalk.method({
  2726. selector: "packages",
  2727. category: 'accessing',
  2728. fn: function (){
  2729. var self=this;
  2730. return smalltalk.withContext(function($ctx1) {
  2731. var $1;
  2732. $1=_st(_st(self)._environment())._packages();
  2733. return $1;
  2734. }, function($ctx1) {$ctx1.fill(self,"packages",{},smalltalk.HLBrowserModel)})},
  2735. args: [],
  2736. source: "packages\x0a\x09^ self environment packages",
  2737. messageSends: ["packages", "environment"],
  2738. referencedClasses: []
  2739. }),
  2740. smalltalk.HLBrowserModel);
  2741. smalltalk.addMethod(
  2742. smalltalk.method({
  2743. selector: "removeMethod",
  2744. category: 'commands actions',
  2745. fn: function (){
  2746. var self=this;
  2747. return smalltalk.withContext(function($ctx1) {
  2748. var $1;
  2749. $1=_st(_st(self)._manager())._confirm_(_st(_st(_st("Do you REALLY want to remove method ").__comma(_st(_st(_st(self)._selectedMethod())._methodClass())._name())).__comma(" >> #")).__comma(_st(_st(self)._selectedMethod())._selector()));
  2750. if(smalltalk.assert($1)){
  2751. _st(_st(self)._environment())._removeMethod_(_st(self)._selectedMethod());
  2752. };
  2753. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod",{},smalltalk.HLBrowserModel)})},
  2754. args: [],
  2755. source: "removeMethod\x0a\x09(self manager confirm: 'Do you REALLY want to remove method ', self selectedMethod methodClass name,' >> #', self selectedMethod selector)\x0a\x09\x09ifTrue: [ self environment removeMethod: self selectedMethod ]",
  2756. messageSends: ["ifTrue:", "removeMethod:", "selectedMethod", "environment", "confirm:", ",", "selector", "name", "methodClass", "manager"],
  2757. referencedClasses: []
  2758. }),
  2759. smalltalk.HLBrowserModel);
  2760. smalltalk.addMethod(
  2761. smalltalk.method({
  2762. selector: "save:",
  2763. category: 'actions',
  2764. fn: function (aString){
  2765. var self=this;
  2766. return smalltalk.withContext(function($ctx1) {
  2767. var $1;
  2768. $1=_st(self)._shouldCompileClassDefinition_(aString);
  2769. if(smalltalk.assert($1)){
  2770. _st(self)._compileClassDefinition_(aString);
  2771. } else {
  2772. _st(self)._compileMethod_(aString);
  2773. };
  2774. return self}, function($ctx1) {$ctx1.fill(self,"save:",{aString:aString},smalltalk.HLBrowserModel)})},
  2775. args: ["aString"],
  2776. source: "save: aString\x0a\x09(self shouldCompileClassDefinition: aString)\x0a\x09\x09ifTrue: [ self compileClassDefinition: aString ]\x0a\x09\x09ifFalse: [ self compileMethod: aString ]",
  2777. messageSends: ["ifTrue:ifFalse:", "compileClassDefinition:", "compileMethod:", "shouldCompileClassDefinition:"],
  2778. referencedClasses: []
  2779. }),
  2780. smalltalk.HLBrowserModel);
  2781. smalltalk.addMethod(
  2782. smalltalk.method({
  2783. selector: "saveSourceCode",
  2784. category: 'actions',
  2785. fn: function (){
  2786. var self=this;
  2787. function $HLSaveSourceCode(){return smalltalk.HLSaveSourceCode||(typeof HLSaveSourceCode=="undefined"?nil:HLSaveSourceCode)}
  2788. return smalltalk.withContext(function($ctx1) {
  2789. _st(_st(self)._announcer())._announce_(_st($HLSaveSourceCode())._new());
  2790. return self}, function($ctx1) {$ctx1.fill(self,"saveSourceCode",{},smalltalk.HLBrowserModel)})},
  2791. args: [],
  2792. source: "saveSourceCode\x0a\x09self announcer announce: HLSaveSourceCode new",
  2793. messageSends: ["announce:", "new", "announcer"],
  2794. referencedClasses: ["HLSaveSourceCode"]
  2795. }),
  2796. smalltalk.HLBrowserModel);
  2797. smalltalk.addMethod(
  2798. smalltalk.method({
  2799. selector: "selectedClass",
  2800. category: 'accessing',
  2801. fn: function (){
  2802. var self=this;
  2803. return smalltalk.withContext(function($ctx1) {
  2804. var $1;
  2805. $1=self["@selectedClass"];
  2806. return $1;
  2807. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{},smalltalk.HLBrowserModel)})},
  2808. args: [],
  2809. source: "selectedClass\x0a\x09^ selectedClass",
  2810. messageSends: [],
  2811. referencedClasses: []
  2812. }),
  2813. smalltalk.HLBrowserModel);
  2814. smalltalk.addMethod(
  2815. smalltalk.method({
  2816. selector: "selectedClass:",
  2817. category: 'accessing',
  2818. fn: function (aClass){
  2819. var self=this;
  2820. function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  2821. return smalltalk.withContext(function($ctx1) {
  2822. var $1,$2,$3,$4,$5;
  2823. $1=_st(self["@selectedClass"]).__eq(aClass);
  2824. if(smalltalk.assert($1)){
  2825. $2=aClass;
  2826. if(($receiver = $2) == nil || $receiver == undefined){
  2827. $3=self;
  2828. return $3;
  2829. } else {
  2830. $2;
  2831. };
  2832. _st(self)._selectedProtocol_(nil);
  2833. };
  2834. $4=aClass;
  2835. if(($receiver = $4) == nil || $receiver == undefined){
  2836. self["@selectedClass"]=nil;
  2837. self["@selectedClass"];
  2838. } else {
  2839. $5=_st(self)._showInstance();
  2840. if(smalltalk.assert($5)){
  2841. self["@selectedClass"]=_st(aClass)._theNonMetaClass();
  2842. self["@selectedClass"];
  2843. } else {
  2844. self["@selectedClass"]=_st(aClass)._theMetaClass();
  2845. self["@selectedClass"];
  2846. };
  2847. };
  2848. _st(self)._selectedProtocol_(nil);
  2849. _st(_st(self)._announcer())._announce_(_st($HLClassSelected())._on_(_st(self)._selectedClass()));
  2850. return self}, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass},smalltalk.HLBrowserModel)})},
  2851. args: ["aClass"],
  2852. source: "selectedClass: aClass\x0a\x09selectedClass = aClass ifTrue: [ \x0a\x09\x09aClass ifNil: [ ^ self ].\x0a\x09\x09self selectedProtocol: nil ].\x0a \x0a\x09aClass \x0a \x09\x09ifNil: [ selectedClass := nil ]\x0a \x09ifNotNil: [\x0a\x09\x09\x09self showInstance \x0a \x09\x09\x09\x09ifTrue: [ selectedClass := aClass theNonMetaClass ]\x0a \x09\x09\x09ifFalse: [ selectedClass := aClass theMetaClass ] ].\x0a\x09self selectedProtocol: nil.\x0a\x09self announcer announce: (HLClassSelected on: self selectedClass)",
  2853. messageSends: ["ifTrue:", "ifNil:", "selectedProtocol:", "=", "ifNil:ifNotNil:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "showInstance", "announce:", "on:", "selectedClass", "announcer"],
  2854. referencedClasses: ["HLClassSelected"]
  2855. }),
  2856. smalltalk.HLBrowserModel);
  2857. smalltalk.addMethod(
  2858. smalltalk.method({
  2859. selector: "selectedMethod",
  2860. category: 'accessing',
  2861. fn: function (){
  2862. var self=this;
  2863. return smalltalk.withContext(function($ctx1) {
  2864. var $2,$1;
  2865. $2=_st(self)._selectedClass();
  2866. if(($receiver = $2) == nil || $receiver == undefined){
  2867. $1=$2;
  2868. } else {
  2869. $1=_st(_st(_st(self)._selectedClass())._methodDictionary())._at_ifAbsent_(self["@selectedSelector"],(function(){
  2870. return smalltalk.withContext(function($ctx2) {
  2871. return nil;
  2872. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2873. };
  2874. return $1;
  2875. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{},smalltalk.HLBrowserModel)})},
  2876. args: [],
  2877. source: "selectedMethod\x0a\x09^ self selectedClass ifNotNil: [ \x0a\x09\x09\x09self selectedClass methodDictionary \x0a\x09\x09\x09\x09at: selectedSelector \x0a\x09\x09\x09\x09ifAbsent: [ nil ] ]",
  2878. messageSends: ["ifNotNil:", "at:ifAbsent:", "methodDictionary", "selectedClass"],
  2879. referencedClasses: []
  2880. }),
  2881. smalltalk.HLBrowserModel);
  2882. smalltalk.addMethod(
  2883. smalltalk.method({
  2884. selector: "selectedMethod:",
  2885. category: 'accessing',
  2886. fn: function (aCompiledMethod){
  2887. var self=this;
  2888. function $HLMethodSelected(){return smalltalk.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  2889. return smalltalk.withContext(function($ctx1) {
  2890. var $1,$2,$3,$4,$5;
  2891. $1=_st(self["@selectedSelector"]).__eq(aCompiledMethod);
  2892. if(smalltalk.assert($1)){
  2893. $2=self;
  2894. return $2;
  2895. };
  2896. $3=aCompiledMethod;
  2897. if(($receiver = $3) == nil || $receiver == undefined){
  2898. self["@selectedSelector"]=nil;
  2899. self["@selectedSelector"];
  2900. } else {
  2901. $4=_st(self["@selectedSelector"]).__eq(_st(aCompiledMethod)._selector());
  2902. if(smalltalk.assert($4)){
  2903. $5=self;
  2904. return $5;
  2905. };
  2906. self["@selectedSelector"]=_st(aCompiledMethod)._selector();
  2907. self["@selectedSelector"];
  2908. };
  2909. _st(_st(self)._announcer())._announce_(_st($HLMethodSelected())._on_(aCompiledMethod));
  2910. return self}, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aCompiledMethod:aCompiledMethod},smalltalk.HLBrowserModel)})},
  2911. args: ["aCompiledMethod"],
  2912. source: "selectedMethod: aCompiledMethod\x0a\x09selectedSelector = aCompiledMethod ifTrue: [ ^ self ].\x0a \x0a aCompiledMethod\x0a \x09ifNil: [ selectedSelector := nil ]\x0a \x09ifNotNil: [\x0a\x09\x09\x09selectedSelector = aCompiledMethod selector ifTrue: [ ^ self ].\x0a\x09\x09\x09selectedSelector := aCompiledMethod selector ].\x0a\x0a self announcer announce: (HLMethodSelected on: aCompiledMethod)",
  2913. messageSends: ["ifTrue:", "=", "ifNil:ifNotNil:", "selector", "announce:", "on:", "announcer"],
  2914. referencedClasses: ["HLMethodSelected"]
  2915. }),
  2916. smalltalk.HLBrowserModel);
  2917. smalltalk.addMethod(
  2918. smalltalk.method({
  2919. selector: "selectedPackage",
  2920. category: 'accessing',
  2921. fn: function (){
  2922. var self=this;
  2923. return smalltalk.withContext(function($ctx1) {
  2924. var $1;
  2925. $1=self["@selectedPackage"];
  2926. return $1;
  2927. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{},smalltalk.HLBrowserModel)})},
  2928. args: [],
  2929. source: "selectedPackage\x0a\x09^ selectedPackage",
  2930. messageSends: [],
  2931. referencedClasses: []
  2932. }),
  2933. smalltalk.HLBrowserModel);
  2934. smalltalk.addMethod(
  2935. smalltalk.method({
  2936. selector: "selectedPackage:",
  2937. category: 'accessing',
  2938. fn: function (aPackage){
  2939. var self=this;
  2940. function $HLPackageSelected(){return smalltalk.HLPackageSelected||(typeof HLPackageSelected=="undefined"?nil:HLPackageSelected)}
  2941. return smalltalk.withContext(function($ctx1) {
  2942. var $1,$2;
  2943. $1=_st(self["@selectedPackage"]).__eq(aPackage);
  2944. if(smalltalk.assert($1)){
  2945. $2=self;
  2946. return $2;
  2947. };
  2948. self["@selectedPackage"]=aPackage;
  2949. _st(self)._selectedClass_(nil);
  2950. _st(_st(self)._announcer())._announce_(_st($HLPackageSelected())._on_(aPackage));
  2951. return self}, function($ctx1) {$ctx1.fill(self,"selectedPackage:",{aPackage:aPackage},smalltalk.HLBrowserModel)})},
  2952. args: ["aPackage"],
  2953. source: "selectedPackage: aPackage\x0a\x09selectedPackage = aPackage ifTrue: [ ^ self ].\x0a \x0a\x09selectedPackage := aPackage.\x0a\x09self selectedClass: nil.\x0a self announcer announce: (HLPackageSelected on: aPackage)",
  2954. messageSends: ["ifTrue:", "=", "selectedClass:", "announce:", "on:", "announcer"],
  2955. referencedClasses: ["HLPackageSelected"]
  2956. }),
  2957. smalltalk.HLBrowserModel);
  2958. smalltalk.addMethod(
  2959. smalltalk.method({
  2960. selector: "selectedProtocol",
  2961. category: 'accessing',
  2962. fn: function (){
  2963. var self=this;
  2964. return smalltalk.withContext(function($ctx1) {
  2965. var $1;
  2966. $1=self["@selectedProtocol"];
  2967. return $1;
  2968. }, function($ctx1) {$ctx1.fill(self,"selectedProtocol",{},smalltalk.HLBrowserModel)})},
  2969. args: [],
  2970. source: "selectedProtocol\x0a\x09^ selectedProtocol",
  2971. messageSends: [],
  2972. referencedClasses: []
  2973. }),
  2974. smalltalk.HLBrowserModel);
  2975. smalltalk.addMethod(
  2976. smalltalk.method({
  2977. selector: "selectedProtocol:",
  2978. category: 'accessing',
  2979. fn: function (aString){
  2980. var self=this;
  2981. function $HLProtocolSelected(){return smalltalk.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  2982. return smalltalk.withContext(function($ctx1) {
  2983. var $1,$2;
  2984. $1=_st(self["@selectedProtocol"]).__eq(aString);
  2985. if(smalltalk.assert($1)){
  2986. $2=self;
  2987. return $2;
  2988. };
  2989. self["@selectedProtocol"]=aString;
  2990. _st(self)._selectedMethod_(nil);
  2991. _st(_st(self)._announcer())._announce_(_st($HLProtocolSelected())._on_(aString));
  2992. return self}, function($ctx1) {$ctx1.fill(self,"selectedProtocol:",{aString:aString},smalltalk.HLBrowserModel)})},
  2993. args: ["aString"],
  2994. source: "selectedProtocol: aString\x0a\x09selectedProtocol = aString ifTrue: [ ^ self ].\x0a \x0a\x09selectedProtocol := aString.\x0a self selectedMethod: nil.\x0a self announcer announce: (HLProtocolSelected on: aString)",
  2995. messageSends: ["ifTrue:", "=", "selectedMethod:", "announce:", "on:", "announcer"],
  2996. referencedClasses: ["HLProtocolSelected"]
  2997. }),
  2998. smalltalk.HLBrowserModel);
  2999. smalltalk.addMethod(
  3000. smalltalk.method({
  3001. selector: "shouldCompileClassDefinition:",
  3002. category: 'testing',
  3003. fn: function (aString){
  3004. var self=this;
  3005. return smalltalk.withContext(function($ctx1) {
  3006. var $1;
  3007. $1=_st(_st(_st(self)._selectedClass())._isNil())._or_((function(){
  3008. return smalltalk.withContext(function($ctx2) {
  3009. return _st(_st(_st(aString)._first())._asUppercase()).__eq(_st(aString)._first());
  3010. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3011. return $1;
  3012. }, function($ctx1) {$ctx1.fill(self,"shouldCompileClassDefinition:",{aString:aString},smalltalk.HLBrowserModel)})},
  3013. args: ["aString"],
  3014. source: "shouldCompileClassDefinition: aString\x0a\x09^ self selectedClass isNil or: [\x0a\x09\x09aString first asUppercase = aString first ]",
  3015. messageSends: ["or:", "=", "first", "asUppercase", "isNil", "selectedClass"],
  3016. referencedClasses: []
  3017. }),
  3018. smalltalk.HLBrowserModel);
  3019. smalltalk.addMethod(
  3020. smalltalk.method({
  3021. selector: "showComment",
  3022. category: 'accessing',
  3023. fn: function (){
  3024. var self=this;
  3025. return smalltalk.withContext(function($ctx1) {
  3026. var $2,$1;
  3027. $2=self["@showComment"];
  3028. if(($receiver = $2) == nil || $receiver == undefined){
  3029. $1=false;
  3030. } else {
  3031. $1=$2;
  3032. };
  3033. return $1;
  3034. }, function($ctx1) {$ctx1.fill(self,"showComment",{},smalltalk.HLBrowserModel)})},
  3035. args: [],
  3036. source: "showComment\x0a\x09^ showComment ifNil: [ false ]",
  3037. messageSends: ["ifNil:"],
  3038. referencedClasses: []
  3039. }),
  3040. smalltalk.HLBrowserModel);
  3041. smalltalk.addMethod(
  3042. smalltalk.method({
  3043. selector: "showComment:",
  3044. category: 'accessing',
  3045. fn: function (aBoolean){
  3046. var self=this;
  3047. function $HLShowCommentToggled(){return smalltalk.HLShowCommentToggled||(typeof HLShowCommentToggled=="undefined"?nil:HLShowCommentToggled)}
  3048. return smalltalk.withContext(function($ctx1) {
  3049. self["@showComment"]=aBoolean;
  3050. _st(_st(self)._announcer())._announce_(_st($HLShowCommentToggled())._new());
  3051. return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean},smalltalk.HLBrowserModel)})},
  3052. args: ["aBoolean"],
  3053. source: "showComment: aBoolean\x0a\x09showComment := aBoolean.\x0a \x0a self announcer announce: HLShowCommentToggled new",
  3054. messageSends: ["announce:", "new", "announcer"],
  3055. referencedClasses: ["HLShowCommentToggled"]
  3056. }),
  3057. smalltalk.HLBrowserModel);
  3058. smalltalk.addMethod(
  3059. smalltalk.method({
  3060. selector: "showInstance",
  3061. category: 'accessing',
  3062. fn: function (){
  3063. var self=this;
  3064. return smalltalk.withContext(function($ctx1) {
  3065. var $2,$1;
  3066. $2=self["@showInstance"];
  3067. if(($receiver = $2) == nil || $receiver == undefined){
  3068. $1=true;
  3069. } else {
  3070. $1=$2;
  3071. };
  3072. return $1;
  3073. }, function($ctx1) {$ctx1.fill(self,"showInstance",{},smalltalk.HLBrowserModel)})},
  3074. args: [],
  3075. source: "showInstance\x0a\x09^ showInstance ifNil: [ true ]",
  3076. messageSends: ["ifNil:"],
  3077. referencedClasses: []
  3078. }),
  3079. smalltalk.HLBrowserModel);
  3080. smalltalk.addMethod(
  3081. smalltalk.method({
  3082. selector: "showInstance:",
  3083. category: 'accessing',
  3084. fn: function (aBoolean){
  3085. var self=this;
  3086. function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  3087. return smalltalk.withContext(function($ctx1) {
  3088. var $1,$2,$4,$3;
  3089. self["@showInstance"]=aBoolean;
  3090. $1=_st(self)._selectedClass();
  3091. if(($receiver = $1) == nil || $receiver == undefined){
  3092. $1;
  3093. } else {
  3094. $2=self;
  3095. $4=aBoolean;
  3096. if(smalltalk.assert($4)){
  3097. $3=_st(_st(self)._selectedClass())._theNonMetaClass();
  3098. } else {
  3099. $3=_st(_st(self)._selectedClass())._theMetaClass();
  3100. };
  3101. _st($2)._selectedClass_($3);
  3102. };
  3103. _st(_st(self)._announcer())._announce_(_st($HLShowInstanceToggled())._new());
  3104. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean},smalltalk.HLBrowserModel)})},
  3105. args: ["aBoolean"],
  3106. source: "showInstance: aBoolean\x0a\x09showInstance := aBoolean.\x0a \x0a self selectedClass ifNotNil: [\x0a \x09self selectedClass: (aBoolean\x0a \x09\x09ifTrue: [self selectedClass theNonMetaClass ]\x0a \x09 \x09ifFalse: [ self selectedClass theMetaClass ]) ].\x0a \x0a self announcer announce: HLShowInstanceToggled new",
  3107. messageSends: ["ifNotNil:", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "selectedClass", "theMetaClass", "announce:", "new", "announcer"],
  3108. referencedClasses: ["HLShowInstanceToggled"]
  3109. }),
  3110. smalltalk.HLBrowserModel);
  3111. smalltalk.addMethod(
  3112. smalltalk.method({
  3113. selector: "systemAnnouncer",
  3114. category: 'accessing',
  3115. fn: function (){
  3116. var self=this;
  3117. return smalltalk.withContext(function($ctx1) {
  3118. var $1;
  3119. $1=_st(_st(self)._environment())._systemAnnouncer();
  3120. return $1;
  3121. }, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},smalltalk.HLBrowserModel)})},
  3122. args: [],
  3123. source: "systemAnnouncer\x0a\x09^ self environment systemAnnouncer",
  3124. messageSends: ["systemAnnouncer", "environment"],
  3125. referencedClasses: []
  3126. }),
  3127. smalltalk.HLBrowserModel);
  3128. smalltalk.addMethod(
  3129. smalltalk.method({
  3130. selector: "unclassifiedProtocol",
  3131. category: 'defaults',
  3132. fn: function (){
  3133. var self=this;
  3134. return smalltalk.withContext(function($ctx1) {
  3135. return "as yet unclassified";
  3136. }, function($ctx1) {$ctx1.fill(self,"unclassifiedProtocol",{},smalltalk.HLBrowserModel)})},
  3137. args: [],
  3138. source: "unclassifiedProtocol\x0a\x09^ 'as yet unclassified'",
  3139. messageSends: [],
  3140. referencedClasses: []
  3141. }),
  3142. smalltalk.HLBrowserModel);
  3143. smalltalk.addMethod(
  3144. smalltalk.method({
  3145. selector: "withCompileErrorHandling:",
  3146. category: 'error handling',
  3147. fn: function (aBlock){
  3148. var self=this;
  3149. function $CompilerError(){return smalltalk.CompilerError||(typeof CompilerError=="undefined"?nil:CompilerError)}
  3150. function $UnknownVariableError(){return smalltalk.UnknownVariableError||(typeof UnknownVariableError=="undefined"?nil:UnknownVariableError)}
  3151. function $ParseError(){return smalltalk.ParseError||(typeof ParseError=="undefined"?nil:ParseError)}
  3152. return smalltalk.withContext(function($ctx1) {
  3153. _st((function(){
  3154. return smalltalk.withContext(function($ctx2) {
  3155. return _st((function(){
  3156. return smalltalk.withContext(function($ctx3) {
  3157. return _st(aBlock)._on_do_($ParseError(),(function(ex){
  3158. return smalltalk.withContext(function($ctx4) {
  3159. return _st(self)._handleParseError_(ex);
  3160. }, function($ctx4) {$ctx4.fillBlock({ex:ex},$ctx1)})}));
  3161. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._on_do_($UnknownVariableError(),(function(ex){
  3162. return smalltalk.withContext(function($ctx3) {
  3163. return _st(self)._handleUnkownVariableError_(ex);
  3164. }, function($ctx3) {$ctx3.fillBlock({ex:ex},$ctx1)})}));
  3165. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_($CompilerError(),(function(ex){
  3166. return smalltalk.withContext(function($ctx2) {
  3167. return _st(self)._handleCompileError_(ex);
  3168. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  3169. return self}, function($ctx1) {$ctx1.fill(self,"withCompileErrorHandling:",{aBlock:aBlock},smalltalk.HLBrowserModel)})},
  3170. args: ["aBlock"],
  3171. source: "withCompileErrorHandling: aBlock\x0a\x09[\x0a\x09\x09[\x0a\x09\x09\x09aBlock \x0a\x09\x09\x09\x09on: ParseError\x0a\x09\x09\x09\x09do: [:ex | self handleParseError: ex ]\x0a\x09\x09]\x0a\x09\x09\x09on: UnknownVariableError\x0a\x09\x09\x09do: [ :ex | self handleUnkownVariableError: ex ]\x0a\x09]\x0a\x09\x09on: CompilerError\x0a\x09\x09do: [ :ex | self handleCompileError: ex ]",
  3172. messageSends: ["on:do:", "handleCompileError:", "handleUnkownVariableError:", "handleParseError:"],
  3173. referencedClasses: ["CompilerError", "UnknownVariableError", "ParseError"]
  3174. }),
  3175. smalltalk.HLBrowserModel);
  3176. smalltalk.addMethod(
  3177. smalltalk.method({
  3178. selector: "withHelperLabelled:do:",
  3179. category: 'private',
  3180. fn: function (aString,aBlock){
  3181. var self=this;
  3182. return smalltalk.withContext(function($ctx1) {
  3183. var $1,$2;
  3184. _st(_st(window)._jQuery_("#helper"))._remove();
  3185. _st((function(html){
  3186. return smalltalk.withContext(function($ctx2) {
  3187. $1=_st(html)._div();
  3188. _st($1)._id_("helper");
  3189. $2=_st($1)._with_(aString);
  3190. return $2;
  3191. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}))._appendToJQuery_(_st("body")._asJQuery());
  3192. _st((function(){
  3193. return smalltalk.withContext(function($ctx2) {
  3194. _st(aBlock)._value();
  3195. return _st(_st(window)._jQuery_("#helper"))._remove();
  3196. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithTimeout_((10));
  3197. return self}, function($ctx1) {$ctx1.fill(self,"withHelperLabelled:do:",{aString:aString,aBlock:aBlock},smalltalk.HLBrowserModel)})},
  3198. args: ["aString", "aBlock"],
  3199. source: "withHelperLabelled: aString do: aBlock\x0a\x09\x22TODO: doesn't belong here\x22\x0a\x0a\x09(window jQuery: '#helper') remove.\x0a\x0a\x09[ :html |\x0a\x09\x09html div \x0a\x09\x09\x09id: 'helper';\x0a\x09\x09\x09with: aString ] appendToJQuery: 'body' asJQuery.\x0a\x09\x0a\x09[\x0a\x09\x09aBlock value.\x0a\x09\x09(window jQuery: '#helper') remove\x0a\x09] \x0a\x09\x09valueWithTimeout: 10",
  3200. messageSends: ["remove", "jQuery:", "appendToJQuery:", "asJQuery", "id:", "div", "with:", "valueWithTimeout:", "value"],
  3201. referencedClasses: []
  3202. }),
  3203. smalltalk.HLBrowserModel);
  3204. smalltalk.addMethod(
  3205. smalltalk.method({
  3206. selector: "on:",
  3207. category: 'actions',
  3208. fn: function (anEnvironment){
  3209. var self=this;
  3210. return smalltalk.withContext(function($ctx1) {
  3211. var $2,$3,$1;
  3212. $2=_st(self)._new();
  3213. _st($2)._environment_(anEnvironment);
  3214. $3=_st($2)._yourself();
  3215. $1=$3;
  3216. return $1;
  3217. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment},smalltalk.HLBrowserModel.klass)})},
  3218. args: ["anEnvironment"],
  3219. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  3220. messageSends: ["environment:", "new", "yourself"],
  3221. referencedClasses: []
  3222. }),
  3223. smalltalk.HLBrowserModel.klass);
  3224. smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'methodContents', 'codeWidget'], 'Helios-Browser');
  3225. smalltalk.addMethod(
  3226. smalltalk.method({
  3227. selector: "codeWidget",
  3228. category: 'accessing',
  3229. fn: function (){
  3230. var self=this;
  3231. function $HLSourceCodeWidget(){return smalltalk.HLSourceCodeWidget||(typeof HLSourceCodeWidget=="undefined"?nil:HLSourceCodeWidget)}
  3232. return smalltalk.withContext(function($ctx1) {
  3233. var $2,$1;
  3234. $2=self["@codeWidget"];
  3235. if(($receiver = $2) == nil || $receiver == undefined){
  3236. self["@codeWidget"]=_st($HLSourceCodeWidget())._on_(_st(self)._model());
  3237. $1=self["@codeWidget"];
  3238. } else {
  3239. $1=$2;
  3240. };
  3241. return $1;
  3242. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{},smalltalk.HLBrowserSourceWidget)})},
  3243. args: [],
  3244. source: "codeWidget\x0a\x09^ codeWidget ifNil: [ codeWidget := HLSourceCodeWidget on: self model ]",
  3245. messageSends: ["ifNil:", "on:", "model"],
  3246. referencedClasses: ["HLSourceCodeWidget"]
  3247. }),
  3248. smalltalk.HLBrowserSourceWidget);
  3249. smalltalk.addMethod(
  3250. smalltalk.method({
  3251. selector: "contents",
  3252. category: 'accessing',
  3253. fn: function (){
  3254. var self=this;
  3255. return smalltalk.withContext(function($ctx1) {
  3256. var $1;
  3257. $1=_st(_st(self)._codeWidget())._contents();
  3258. return $1;
  3259. }, function($ctx1) {$ctx1.fill(self,"contents",{},smalltalk.HLBrowserSourceWidget)})},
  3260. args: [],
  3261. source: "contents\x0a\x09^ self codeWidget contents",
  3262. messageSends: ["contents", "codeWidget"],
  3263. referencedClasses: []
  3264. }),
  3265. smalltalk.HLBrowserSourceWidget);
  3266. smalltalk.addMethod(
  3267. smalltalk.method({
  3268. selector: "contents:",
  3269. category: 'accessing',
  3270. fn: function (aString){
  3271. var self=this;
  3272. return smalltalk.withContext(function($ctx1) {
  3273. _st(self)._methodContents_(aString);
  3274. _st(_st(self)._codeWidget())._contents_(aString);
  3275. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString},smalltalk.HLBrowserSourceWidget)})},
  3276. args: ["aString"],
  3277. source: "contents: aString\x0a\x09self methodContents: aString.\x0a\x09self codeWidget contents: aString",
  3278. messageSends: ["methodContents:", "contents:", "codeWidget"],
  3279. referencedClasses: []
  3280. }),
  3281. smalltalk.HLBrowserSourceWidget);
  3282. smalltalk.addMethod(
  3283. smalltalk.method({
  3284. selector: "focus",
  3285. category: 'actions',
  3286. fn: function (){
  3287. var self=this;
  3288. return smalltalk.withContext(function($ctx1) {
  3289. _st(_st(self)._codeWidget())._focus();
  3290. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLBrowserSourceWidget)})},
  3291. args: [],
  3292. source: "focus\x0a\x09self codeWidget focus",
  3293. messageSends: ["focus", "codeWidget"],
  3294. referencedClasses: []
  3295. }),
  3296. smalltalk.HLBrowserSourceWidget);
  3297. smalltalk.addMethod(
  3298. smalltalk.method({
  3299. selector: "hasFocus",
  3300. category: 'testing',
  3301. fn: function (){
  3302. var self=this;
  3303. return smalltalk.withContext(function($ctx1) {
  3304. var $1;
  3305. $1=_st(_st(self)._codeWidget())._hasFocus();
  3306. return $1;
  3307. }, function($ctx1) {$ctx1.fill(self,"hasFocus",{},smalltalk.HLBrowserSourceWidget)})},
  3308. args: [],
  3309. source: "hasFocus\x0a\x09^ self codeWidget hasFocus",
  3310. messageSends: ["hasFocus", "codeWidget"],
  3311. referencedClasses: []
  3312. }),
  3313. smalltalk.HLBrowserSourceWidget);
  3314. smalltalk.addMethod(
  3315. smalltalk.method({
  3316. selector: "hasModification",
  3317. category: 'testing',
  3318. fn: function (){
  3319. var self=this;
  3320. return smalltalk.withContext(function($ctx1) {
  3321. var $1;
  3322. $1=_st(_st(_st(self)._methodContents()).__eq(_st(self)._contents()))._not();
  3323. return $1;
  3324. }, function($ctx1) {$ctx1.fill(self,"hasModification",{},smalltalk.HLBrowserSourceWidget)})},
  3325. args: [],
  3326. source: "hasModification\x0a\x09^ (self methodContents = self contents) not",
  3327. messageSends: ["not", "=", "contents", "methodContents"],
  3328. referencedClasses: []
  3329. }),
  3330. smalltalk.HLBrowserSourceWidget);
  3331. smalltalk.addMethod(
  3332. smalltalk.method({
  3333. selector: "initialize",
  3334. category: 'initialization',
  3335. fn: function (){
  3336. var self=this;
  3337. return smalltalk.withContext(function($ctx1) {
  3338. smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  3339. _st(self)._observeSystem();
  3340. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLBrowserSourceWidget)})},
  3341. args: [],
  3342. source: "initialize\x0a\x09super initialize.\x0a \x0a self observeSystem",
  3343. messageSends: ["initialize", "observeSystem"],
  3344. referencedClasses: []
  3345. }),
  3346. smalltalk.HLBrowserSourceWidget);
  3347. smalltalk.addMethod(
  3348. smalltalk.method({
  3349. selector: "methodContents",
  3350. category: 'accessing',
  3351. fn: function (){
  3352. var self=this;
  3353. return smalltalk.withContext(function($ctx1) {
  3354. var $2,$1;
  3355. $2=self["@methodContents"];
  3356. if(($receiver = $2) == nil || $receiver == undefined){
  3357. self["@methodContents"]="";
  3358. $1=self["@methodContents"];
  3359. } else {
  3360. $1=$2;
  3361. };
  3362. return $1;
  3363. }, function($ctx1) {$ctx1.fill(self,"methodContents",{},smalltalk.HLBrowserSourceWidget)})},
  3364. args: [],
  3365. source: "methodContents\x0a\x09^ methodContents ifNil: [ methodContents := '' ]",
  3366. messageSends: ["ifNil:"],
  3367. referencedClasses: []
  3368. }),
  3369. smalltalk.HLBrowserSourceWidget);
  3370. smalltalk.addMethod(
  3371. smalltalk.method({
  3372. selector: "methodContents:",
  3373. category: 'accessing',
  3374. fn: function (aString){
  3375. var self=this;
  3376. return smalltalk.withContext(function($ctx1) {
  3377. self["@methodContents"]=aString;
  3378. return self}, function($ctx1) {$ctx1.fill(self,"methodContents:",{aString:aString},smalltalk.HLBrowserSourceWidget)})},
  3379. args: ["aString"],
  3380. source: "methodContents: aString\x0a\x09methodContents := aString",
  3381. messageSends: [],
  3382. referencedClasses: []
  3383. }),
  3384. smalltalk.HLBrowserSourceWidget);
  3385. smalltalk.addMethod(
  3386. smalltalk.method({
  3387. selector: "model",
  3388. category: 'accessing',
  3389. fn: function (){
  3390. var self=this;
  3391. return smalltalk.withContext(function($ctx1) {
  3392. var $1;
  3393. $1=self["@model"];
  3394. return $1;
  3395. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLBrowserSourceWidget)})},
  3396. args: [],
  3397. source: "model\x0a\x09^ model",
  3398. messageSends: [],
  3399. referencedClasses: []
  3400. }),
  3401. smalltalk.HLBrowserSourceWidget);
  3402. smalltalk.addMethod(
  3403. smalltalk.method({
  3404. selector: "model:",
  3405. category: 'accessing',
  3406. fn: function (aBrowserModel){
  3407. var self=this;
  3408. return smalltalk.withContext(function($ctx1) {
  3409. self["@model"]=aBrowserModel;
  3410. _st(self)._observeModel();
  3411. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel},smalltalk.HLBrowserSourceWidget)})},
  3412. args: ["aBrowserModel"],
  3413. source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a \x0a self observeModel",
  3414. messageSends: ["observeModel"],
  3415. referencedClasses: []
  3416. }),
  3417. smalltalk.HLBrowserSourceWidget);
  3418. smalltalk.addMethod(
  3419. smalltalk.method({
  3420. selector: "observeModel",
  3421. category: 'actions',
  3422. fn: function (){
  3423. var self=this;
  3424. function $HLMethodSelected(){return smalltalk.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  3425. function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  3426. function $HLProtocolSelected(){return smalltalk.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  3427. function $HLSourceCodeFocusRequested(){return smalltalk.HLSourceCodeFocusRequested||(typeof HLSourceCodeFocusRequested=="undefined"?nil:HLSourceCodeFocusRequested)}
  3428. return smalltalk.withContext(function($ctx1) {
  3429. var $1,$2;
  3430. $1=_st(_st(self)._model())._announcer();
  3431. _st($1)._on_do_($HLMethodSelected(),(function(ann){
  3432. return smalltalk.withContext(function($ctx2) {
  3433. return _st(self)._onMethodSelected_(_st(ann)._item());
  3434. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  3435. _st($1)._on_do_($HLClassSelected(),(function(ann){
  3436. return smalltalk.withContext(function($ctx2) {
  3437. return _st(self)._onClassSelected_(_st(ann)._item());
  3438. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  3439. _st($1)._on_do_($HLProtocolSelected(),(function(ann){
  3440. return smalltalk.withContext(function($ctx2) {
  3441. return _st(self)._onProtocolSelected_(_st(ann)._item());
  3442. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  3443. $2=_st($1)._on_do_($HLSourceCodeFocusRequested(),(function(ann){
  3444. return smalltalk.withContext(function($ctx2) {
  3445. return _st(self)._onSourceCodeFocusRequested();
  3446. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  3447. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLBrowserSourceWidget)})},
  3448. args: [],
  3449. source: "observeModel\x0a\x09self model announcer \x0a\x09\x09on: HLMethodSelected \x0a\x09\x09do: [ :ann | self onMethodSelected: ann item ];\x0a \x09on: HLClassSelected \x0a\x09\x09do: [ :ann | self onClassSelected: ann item ];\x0a \x09on: HLProtocolSelected \x0a\x09\x09do: [ :ann | self onProtocolSelected: ann item ];\x0a\x09\x09on: HLSourceCodeFocusRequested \x0a\x09\x09do: [ :ann | self onSourceCodeFocusRequested ]",
  3450. messageSends: ["on:do:", "onMethodSelected:", "item", "announcer", "model", "onClassSelected:", "onProtocolSelected:", "onSourceCodeFocusRequested"],
  3451. referencedClasses: ["HLMethodSelected", "HLClassSelected", "HLProtocolSelected", "HLSourceCodeFocusRequested"]
  3452. }),
  3453. smalltalk.HLBrowserSourceWidget);
  3454. smalltalk.addMethod(
  3455. smalltalk.method({
  3456. selector: "observeSystem",
  3457. category: 'actions',
  3458. fn: function (){
  3459. var self=this;
  3460. function $MethodModified(){return smalltalk.MethodModified||(typeof MethodModified=="undefined"?nil:MethodModified)}
  3461. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  3462. return smalltalk.withContext(function($ctx1) {
  3463. _st(_st($SystemAnnouncer())._current())._on_do_($MethodModified(),(function(ann){
  3464. return smalltalk.withContext(function($ctx2) {
  3465. return _st(self)._onMethodModified_(_st(ann)._method());
  3466. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  3467. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLBrowserSourceWidget)})},
  3468. args: [],
  3469. source: "observeSystem\x0a\x09SystemAnnouncer current\x0a \x09on: MethodModified\x0a do: [ :ann | self onMethodModified: ann method ]",
  3470. messageSends: ["on:do:", "onMethodModified:", "method", "current"],
  3471. referencedClasses: ["MethodModified", "SystemAnnouncer"]
  3472. }),
  3473. smalltalk.HLBrowserSourceWidget);
  3474. smalltalk.addMethod(
  3475. smalltalk.method({
  3476. selector: "onClassSelected:",
  3477. category: 'reactions',
  3478. fn: function (aClass){
  3479. var self=this;
  3480. return smalltalk.withContext(function($ctx1) {
  3481. var $1,$2;
  3482. $1=aClass;
  3483. if(($receiver = $1) == nil || $receiver == undefined){
  3484. $2=_st(self)._contents_("");
  3485. return $2;
  3486. } else {
  3487. $1;
  3488. };
  3489. _st(self)._contents_(_st(aClass)._definition());
  3490. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass},smalltalk.HLBrowserSourceWidget)})},
  3491. args: ["aClass"],
  3492. source: "onClassSelected: aClass\x0a\x09aClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: aClass definition",
  3493. messageSends: ["ifNil:", "contents:", "definition"],
  3494. referencedClasses: []
  3495. }),
  3496. smalltalk.HLBrowserSourceWidget);
  3497. smalltalk.addMethod(
  3498. smalltalk.method({
  3499. selector: "onMethodModified:",
  3500. category: 'reactions',
  3501. fn: function (aMethod){
  3502. var self=this;
  3503. return smalltalk.withContext(function($ctx1) {
  3504. var $1,$2,$3,$4,$5,$6;
  3505. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(aMethod)._methodClass());
  3506. if(! smalltalk.assert($1)){
  3507. $2=self;
  3508. return $2;
  3509. };
  3510. $3=_st(_st(self)._model())._selectedMethod();
  3511. if(($receiver = $3) == nil || $receiver == undefined){
  3512. $4=self;
  3513. return $4;
  3514. } else {
  3515. $3;
  3516. };
  3517. $5=_st(_st(_st(_st(self)._model())._selectedMethod())._selector()).__eq(_st(aMethod)._selector());
  3518. if(! smalltalk.assert($5)){
  3519. $6=self;
  3520. return $6;
  3521. };
  3522. _st(self)._refresh();
  3523. return self}, function($ctx1) {$ctx1.fill(self,"onMethodModified:",{aMethod:aMethod},smalltalk.HLBrowserSourceWidget)})},
  3524. args: ["aMethod"],
  3525. source: "onMethodModified: aMethod\x0a\x0a\x09self model selectedClass = aMethod methodClass ifFalse: [ ^ self ].\x0a\x09self model selectedMethod ifNil: [ ^ self ].\x0a self model selectedMethod selector = aMethod selector ifFalse: [ ^ self ].\x0a\x0a self refresh",
  3526. messageSends: ["ifFalse:", "=", "methodClass", "selectedClass", "model", "ifNil:", "selectedMethod", "selector", "refresh"],
  3527. referencedClasses: []
  3528. }),
  3529. smalltalk.HLBrowserSourceWidget);
  3530. smalltalk.addMethod(
  3531. smalltalk.method({
  3532. selector: "onMethodSelected:",
  3533. category: 'reactions',
  3534. fn: function (aCompiledMethod){
  3535. var self=this;
  3536. return smalltalk.withContext(function($ctx1) {
  3537. var $1,$2;
  3538. $1=aCompiledMethod;
  3539. if(($receiver = $1) == nil || $receiver == undefined){
  3540. $2=_st(self)._contents_("");
  3541. return $2;
  3542. } else {
  3543. $1;
  3544. };
  3545. _st(self)._contents_(_st(aCompiledMethod)._source());
  3546. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aCompiledMethod:aCompiledMethod},smalltalk.HLBrowserSourceWidget)})},
  3547. args: ["aCompiledMethod"],
  3548. source: "onMethodSelected: aCompiledMethod\x0a\x09aCompiledMethod ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: aCompiledMethod source",
  3549. messageSends: ["ifNil:", "contents:", "source"],
  3550. referencedClasses: []
  3551. }),
  3552. smalltalk.HLBrowserSourceWidget);
  3553. smalltalk.addMethod(
  3554. smalltalk.method({
  3555. selector: "onProtocolSelected:",
  3556. category: 'reactions',
  3557. fn: function (aString){
  3558. var self=this;
  3559. return smalltalk.withContext(function($ctx1) {
  3560. var $1,$2;
  3561. $1=_st(_st(self)._model())._selectedClass();
  3562. if(($receiver = $1) == nil || $receiver == undefined){
  3563. $2=_st(self)._contents_("");
  3564. return $2;
  3565. } else {
  3566. $1;
  3567. };
  3568. _st(self)._contents_(_st(_st(_st(self)._model())._selectedClass())._definition());
  3569. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString},smalltalk.HLBrowserSourceWidget)})},
  3570. args: ["aString"],
  3571. source: "onProtocolSelected: aString\x0a\x09self model selectedClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: self model selectedClass definition",
  3572. messageSends: ["ifNil:", "contents:", "selectedClass", "model", "definition"],
  3573. referencedClasses: []
  3574. }),
  3575. smalltalk.HLBrowserSourceWidget);
  3576. smalltalk.addMethod(
  3577. smalltalk.method({
  3578. selector: "onSourceCodeFocusRequested",
  3579. category: 'reactions',
  3580. fn: function (){
  3581. var self=this;
  3582. return smalltalk.withContext(function($ctx1) {
  3583. _st(self)._focus();
  3584. return self}, function($ctx1) {$ctx1.fill(self,"onSourceCodeFocusRequested",{},smalltalk.HLBrowserSourceWidget)})},
  3585. args: [],
  3586. source: "onSourceCodeFocusRequested\x0a\x09self focus",
  3587. messageSends: ["focus"],
  3588. referencedClasses: []
  3589. }),
  3590. smalltalk.HLBrowserSourceWidget);
  3591. smalltalk.addMethod(
  3592. smalltalk.method({
  3593. selector: "previous",
  3594. category: 'accessing',
  3595. fn: function (){
  3596. var self=this;
  3597. return smalltalk.withContext(function($ctx1) {
  3598. return self}, function($ctx1) {$ctx1.fill(self,"previous",{},smalltalk.HLBrowserSourceWidget)})},
  3599. args: [],
  3600. source: "previous\x0a\x09\x22for browser lists widget\x22",
  3601. messageSends: [],
  3602. referencedClasses: []
  3603. }),
  3604. smalltalk.HLBrowserSourceWidget);
  3605. smalltalk.addMethod(
  3606. smalltalk.method({
  3607. selector: "previous:",
  3608. category: 'accessing',
  3609. fn: function (aWidget){
  3610. var self=this;
  3611. return smalltalk.withContext(function($ctx1) {
  3612. return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},smalltalk.HLBrowserSourceWidget)})},
  3613. args: ["aWidget"],
  3614. source: "previous: aWidget\x0a\x09\x22for browser lists widget\x22",
  3615. messageSends: [],
  3616. referencedClasses: []
  3617. }),
  3618. smalltalk.HLBrowserSourceWidget);
  3619. smalltalk.addMethod(
  3620. smalltalk.method({
  3621. selector: "refresh",
  3622. category: 'updating',
  3623. fn: function (){
  3624. var self=this;
  3625. return smalltalk.withContext(function($ctx1) {
  3626. var $1,$2,$3,$4;
  3627. $1=_st(self)._hasModification();
  3628. if(smalltalk.assert($1)){
  3629. $2=self;
  3630. return $2;
  3631. };
  3632. $3=_st(self)._hasFocus();
  3633. if(smalltalk.assert($3)){
  3634. $4=self;
  3635. return $4;
  3636. };
  3637. _st(self)._contents_(_st(_st(_st(self)._model())._selectedMethod())._source());
  3638. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLBrowserSourceWidget)})},
  3639. args: [],
  3640. source: "refresh\x0a\x09self hasModification ifTrue: [ ^ self ].\x0a self hasFocus ifTrue: [ ^ self ].\x0a\x0a\x09self contents: self model selectedMethod source",
  3641. messageSends: ["ifTrue:", "hasModification", "hasFocus", "contents:", "source", "selectedMethod", "model"],
  3642. referencedClasses: []
  3643. }),
  3644. smalltalk.HLBrowserSourceWidget);
  3645. smalltalk.addMethod(
  3646. smalltalk.method({
  3647. selector: "renderContentOn:",
  3648. category: 'rendering',
  3649. fn: function (html){
  3650. var self=this;
  3651. return smalltalk.withContext(function($ctx1) {
  3652. _st(_st(self)._codeWidget())._renderOn_(html);
  3653. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLBrowserSourceWidget)})},
  3654. args: ["html"],
  3655. source: "renderContentOn: html\x0a\x09self codeWidget renderOn: html",
  3656. messageSends: ["renderOn:", "codeWidget"],
  3657. referencedClasses: []
  3658. }),
  3659. smalltalk.HLBrowserSourceWidget);
  3660. smalltalk.addMethod(
  3661. smalltalk.method({
  3662. selector: "on:",
  3663. category: 'instance creation',
  3664. fn: function (aBrowserModel){
  3665. var self=this;
  3666. return smalltalk.withContext(function($ctx1) {
  3667. var $2,$3,$1;
  3668. $2=_st(self)._new();
  3669. _st($2)._model_(aBrowserModel);
  3670. $3=_st($2)._yourself();
  3671. $1=$3;
  3672. return $1;
  3673. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel},smalltalk.HLBrowserSourceWidget.klass)})},
  3674. args: ["aBrowserModel"],
  3675. source: "on: aBrowserModel\x0a\x09^ self new\x0a \x09model: aBrowserModel;\x0a yourself",
  3676. messageSends: ["model:", "new", "yourself"],
  3677. referencedClasses: []
  3678. }),
  3679. smalltalk.HLBrowserSourceWidget.klass);
  3680. smalltalk.addClass('HLClassCache', smalltalk.Object, ['class', 'selectorsCache', 'overrideCache', 'overriddenCache'], 'Helios-Browser');
  3681. smalltalk.addMethod(
  3682. smalltalk.method({
  3683. selector: "invalidateChildrenSelector:",
  3684. category: 'actions',
  3685. fn: function (aSelector){
  3686. var self=this;
  3687. return smalltalk.withContext(function($ctx1) {
  3688. var $1,$2;
  3689. _st(_st(_st(self)._theClass())._subclasses())._do_((function(each){
  3690. return smalltalk.withContext(function($ctx2) {
  3691. $1=_st(_st(self)._selectorsCache())._cacheFor_(each);
  3692. _st($1)._removeSelector_(aSelector);
  3693. $2=_st($1)._invalidateChildrenSelector_(aSelector);
  3694. return $2;
  3695. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3696. return self}, function($ctx1) {$ctx1.fill(self,"invalidateChildrenSelector:",{aSelector:aSelector},smalltalk.HLClassCache)})},
  3697. args: ["aSelector"],
  3698. source: "invalidateChildrenSelector: aSelector\x0a\x09self theClass subclasses do: [ :each |\x0a \x09(self selectorsCache cacheFor: each)\x0a \x09removeSelector: aSelector;\x0a \x09invalidateChildrenSelector: aSelector ]",
  3699. messageSends: ["do:", "removeSelector:", "cacheFor:", "selectorsCache", "invalidateChildrenSelector:", "subclasses", "theClass"],
  3700. referencedClasses: []
  3701. }),
  3702. smalltalk.HLClassCache);
  3703. smalltalk.addMethod(
  3704. smalltalk.method({
  3705. selector: "invalidateParentSelector:",
  3706. category: 'actions',
  3707. fn: function (aSelector){
  3708. var self=this;
  3709. return smalltalk.withContext(function($ctx1) {
  3710. var $1,$2,$3;
  3711. $1=_st(_st(self)._theClass())._superclass();
  3712. if(($receiver = $1) == nil || $receiver == undefined){
  3713. $1;
  3714. } else {
  3715. $2=_st(_st(self)._selectorsCache())._cacheFor_(_st(_st(self)._theClass())._superclass());
  3716. _st($2)._removeSelector_(aSelector);
  3717. $3=_st($2)._invalidateParentSelector_(aSelector);
  3718. $3;
  3719. };
  3720. return self}, function($ctx1) {$ctx1.fill(self,"invalidateParentSelector:",{aSelector:aSelector},smalltalk.HLClassCache)})},
  3721. args: ["aSelector"],
  3722. source: "invalidateParentSelector: aSelector\x0a\x09self theClass superclass ifNotNil: [\x0a \x09(self selectorsCache cacheFor: self theClass superclass)\x0a \x09removeSelector: aSelector;\x0a\x09\x09\x09invalidateParentSelector: aSelector ]",
  3723. messageSends: ["ifNotNil:", "removeSelector:", "cacheFor:", "superclass", "theClass", "selectorsCache", "invalidateParentSelector:"],
  3724. referencedClasses: []
  3725. }),
  3726. smalltalk.HLClassCache);
  3727. smalltalk.addMethod(
  3728. smalltalk.method({
  3729. selector: "invalidateSelector:",
  3730. category: 'actions',
  3731. fn: function (aSelector){
  3732. var self=this;
  3733. return smalltalk.withContext(function($ctx1) {
  3734. var $1,$2;
  3735. $1=self;
  3736. _st($1)._invalidateParentSelector_(aSelector);
  3737. _st($1)._invalidateChildrenSelector_(aSelector);
  3738. $2=_st($1)._removeSelector_(aSelector);
  3739. return self}, function($ctx1) {$ctx1.fill(self,"invalidateSelector:",{aSelector:aSelector},smalltalk.HLClassCache)})},
  3740. args: ["aSelector"],
  3741. source: "invalidateSelector: aSelector\x0a\x09self \x0a \x09invalidateParentSelector: aSelector;\x0a invalidateChildrenSelector: aSelector;\x0a removeSelector: aSelector",
  3742. messageSends: ["invalidateParentSelector:", "invalidateChildrenSelector:", "removeSelector:"],
  3743. referencedClasses: []
  3744. }),
  3745. smalltalk.HLClassCache);
  3746. smalltalk.addMethod(
  3747. smalltalk.method({
  3748. selector: "isOverridden:",
  3749. category: 'testing',
  3750. fn: function (aMethod){
  3751. var self=this;
  3752. return smalltalk.withContext(function($ctx1) {
  3753. var $1;
  3754. $1=_st(_st(self)._overriddenCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  3755. return smalltalk.withContext(function($ctx2) {
  3756. return _st(aMethod)._isOverridden();
  3757. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3758. return $1;
  3759. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod},smalltalk.HLClassCache)})},
  3760. args: ["aMethod"],
  3761. source: "isOverridden: aMethod\x0a\x09^ self overriddenCache \x0a \x09at: aMethod selector\x0a \x09ifAbsentPut: [ aMethod isOverridden ]",
  3762. messageSends: ["at:ifAbsentPut:", "selector", "isOverridden", "overriddenCache"],
  3763. referencedClasses: []
  3764. }),
  3765. smalltalk.HLClassCache);
  3766. smalltalk.addMethod(
  3767. smalltalk.method({
  3768. selector: "isOverride:",
  3769. category: 'testing',
  3770. fn: function (aMethod){
  3771. var self=this;
  3772. return smalltalk.withContext(function($ctx1) {
  3773. var $1;
  3774. $1=_st(_st(self)._overrideCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  3775. return smalltalk.withContext(function($ctx2) {
  3776. return _st(aMethod)._isOverride();
  3777. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3778. return $1;
  3779. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod},smalltalk.HLClassCache)})},
  3780. args: ["aMethod"],
  3781. source: "isOverride: aMethod\x0a\x09^ self overrideCache\x0a \x09at: aMethod selector\x0a \x09ifAbsentPut: [ aMethod isOverride ]",
  3782. messageSends: ["at:ifAbsentPut:", "selector", "isOverride", "overrideCache"],
  3783. referencedClasses: []
  3784. }),
  3785. smalltalk.HLClassCache);
  3786. smalltalk.addMethod(
  3787. smalltalk.method({
  3788. selector: "overriddenCache",
  3789. category: 'accessing',
  3790. fn: function (){
  3791. var self=this;
  3792. function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  3793. return smalltalk.withContext(function($ctx1) {
  3794. var $2,$1;
  3795. $2=self["@overriddenCache"];
  3796. if(($receiver = $2) == nil || $receiver == undefined){
  3797. self["@overriddenCache"]=_st($HashedCollection())._new();
  3798. $1=self["@overriddenCache"];
  3799. } else {
  3800. $1=$2;
  3801. };
  3802. return $1;
  3803. }, function($ctx1) {$ctx1.fill(self,"overriddenCache",{},smalltalk.HLClassCache)})},
  3804. args: [],
  3805. source: "overriddenCache\x0a\x09^ overriddenCache ifNil: [ overriddenCache := HashedCollection new ]",
  3806. messageSends: ["ifNil:", "new"],
  3807. referencedClasses: ["HashedCollection"]
  3808. }),
  3809. smalltalk.HLClassCache);
  3810. smalltalk.addMethod(
  3811. smalltalk.method({
  3812. selector: "overrideCache",
  3813. category: 'accessing',
  3814. fn: function (){
  3815. var self=this;
  3816. function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  3817. return smalltalk.withContext(function($ctx1) {
  3818. var $2,$1;
  3819. $2=self["@overrideCache"];
  3820. if(($receiver = $2) == nil || $receiver == undefined){
  3821. self["@overrideCache"]=_st($HashedCollection())._new();
  3822. $1=self["@overrideCache"];
  3823. } else {
  3824. $1=$2;
  3825. };
  3826. return $1;
  3827. }, function($ctx1) {$ctx1.fill(self,"overrideCache",{},smalltalk.HLClassCache)})},
  3828. args: [],
  3829. source: "overrideCache\x0a\x09^ overrideCache ifNil: [ overrideCache := HashedCollection new ]",
  3830. messageSends: ["ifNil:", "new"],
  3831. referencedClasses: ["HashedCollection"]
  3832. }),
  3833. smalltalk.HLClassCache);
  3834. smalltalk.addMethod(
  3835. smalltalk.method({
  3836. selector: "removeSelector:",
  3837. category: 'private',
  3838. fn: function (aSelector){
  3839. var self=this;
  3840. return smalltalk.withContext(function($ctx1) {
  3841. _st(_st(self)._overriddenCache())._removeKey_ifAbsent_(aSelector,(function(){
  3842. return smalltalk.withContext(function($ctx2) {
  3843. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3844. _st(_st(self)._overrideCache())._removeKey_ifAbsent_(aSelector,(function(){
  3845. return smalltalk.withContext(function($ctx2) {
  3846. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3847. return self}, function($ctx1) {$ctx1.fill(self,"removeSelector:",{aSelector:aSelector},smalltalk.HLClassCache)})},
  3848. args: ["aSelector"],
  3849. source: "removeSelector: aSelector\x0a\x09self overriddenCache \x0a \x09removeKey: aSelector\x0a ifAbsent: [ ].\x0a self overrideCache \x0a \x09removeKey: aSelector\x0a ifAbsent: [ ]",
  3850. messageSends: ["removeKey:ifAbsent:", "overriddenCache", "overrideCache"],
  3851. referencedClasses: []
  3852. }),
  3853. smalltalk.HLClassCache);
  3854. smalltalk.addMethod(
  3855. smalltalk.method({
  3856. selector: "selectorsCache",
  3857. category: 'accessing',
  3858. fn: function (){
  3859. var self=this;
  3860. return smalltalk.withContext(function($ctx1) {
  3861. var $1;
  3862. $1=self["@selectorsCache"];
  3863. return $1;
  3864. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{},smalltalk.HLClassCache)})},
  3865. args: [],
  3866. source: "selectorsCache\x0a\x09^ selectorsCache",
  3867. messageSends: [],
  3868. referencedClasses: []
  3869. }),
  3870. smalltalk.HLClassCache);
  3871. smalltalk.addMethod(
  3872. smalltalk.method({
  3873. selector: "selectorsCache:",
  3874. category: 'accessing',
  3875. fn: function (aCache){
  3876. var self=this;
  3877. return smalltalk.withContext(function($ctx1) {
  3878. self["@selectorsCache"]=aCache;
  3879. return self}, function($ctx1) {$ctx1.fill(self,"selectorsCache:",{aCache:aCache},smalltalk.HLClassCache)})},
  3880. args: ["aCache"],
  3881. source: "selectorsCache: aCache\x0a\x09selectorsCache := aCache",
  3882. messageSends: [],
  3883. referencedClasses: []
  3884. }),
  3885. smalltalk.HLClassCache);
  3886. smalltalk.addMethod(
  3887. smalltalk.method({
  3888. selector: "theClass",
  3889. category: 'accessing',
  3890. fn: function (){
  3891. var self=this;
  3892. return smalltalk.withContext(function($ctx1) {
  3893. var $1;
  3894. $1=self["@class"];
  3895. return $1;
  3896. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.HLClassCache)})},
  3897. args: [],
  3898. source: "theClass\x0a\x09^ class",
  3899. messageSends: [],
  3900. referencedClasses: []
  3901. }),
  3902. smalltalk.HLClassCache);
  3903. smalltalk.addMethod(
  3904. smalltalk.method({
  3905. selector: "theClass:",
  3906. category: 'accessing',
  3907. fn: function (aClass){
  3908. var self=this;
  3909. return smalltalk.withContext(function($ctx1) {
  3910. self["@class"]=aClass;
  3911. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.HLClassCache)})},
  3912. args: ["aClass"],
  3913. source: "theClass: aClass\x0a\x09class := aClass",
  3914. messageSends: [],
  3915. referencedClasses: []
  3916. }),
  3917. smalltalk.HLClassCache);
  3918. smalltalk.addMethod(
  3919. smalltalk.method({
  3920. selector: "on:selectorsCache:",
  3921. category: 'instance creation',
  3922. fn: function (aClass,aSelectorsCache){
  3923. var self=this;
  3924. return smalltalk.withContext(function($ctx1) {
  3925. var $2,$3,$1;
  3926. $2=_st(self)._new();
  3927. _st($2)._theClass_(aClass);
  3928. _st($2)._selectorsCache_(aSelectorsCache);
  3929. $3=_st($2)._yourself();
  3930. $1=$3;
  3931. return $1;
  3932. }, function($ctx1) {$ctx1.fill(self,"on:selectorsCache:",{aClass:aClass,aSelectorsCache:aSelectorsCache},smalltalk.HLClassCache.klass)})},
  3933. args: ["aClass", "aSelectorsCache"],
  3934. source: "on: aClass selectorsCache: aSelectorsCache\x0a\x09^ self new\x0a \x09theClass: aClass;\x0a selectorsCache: aSelectorsCache;\x0a yourself",
  3935. messageSends: ["theClass:", "new", "selectorsCache:", "yourself"],
  3936. referencedClasses: []
  3937. }),
  3938. smalltalk.HLClassCache.klass);
  3939. smalltalk.addClass('HLSelectorsCache', smalltalk.Object, ['classesCache'], 'Helios-Browser');
  3940. smalltalk.addMethod(
  3941. smalltalk.method({
  3942. selector: "cacheFor:",
  3943. category: 'accessing',
  3944. fn: function (aClass){
  3945. var self=this;
  3946. return smalltalk.withContext(function($ctx1) {
  3947. var $1,$2;
  3948. $1=aClass;
  3949. if(($receiver = $1) == nil || $receiver == undefined){
  3950. return nil;
  3951. } else {
  3952. $1;
  3953. };
  3954. $2=_st(_st(self)._classesCache())._at_ifAbsentPut_(_st(aClass)._name(),(function(){
  3955. return smalltalk.withContext(function($ctx2) {
  3956. return _st(self)._newCacheFor_(aClass);
  3957. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3958. return $2;
  3959. }, function($ctx1) {$ctx1.fill(self,"cacheFor:",{aClass:aClass},smalltalk.HLSelectorsCache)})},
  3960. args: ["aClass"],
  3961. source: "cacheFor: aClass\x0a\x09aClass ifNil: [ ^ nil ].\x0a \x0a\x09^ self classesCache\x0a \x09at: aClass name\x0a ifAbsentPut: [ self newCacheFor: aClass ]",
  3962. messageSends: ["ifNil:", "at:ifAbsentPut:", "name", "newCacheFor:", "classesCache"],
  3963. referencedClasses: []
  3964. }),
  3965. smalltalk.HLSelectorsCache);
  3966. smalltalk.addMethod(
  3967. smalltalk.method({
  3968. selector: "classesCache",
  3969. category: 'accessing',
  3970. fn: function (){
  3971. var self=this;
  3972. function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  3973. return smalltalk.withContext(function($ctx1) {
  3974. var $2,$1;
  3975. $2=self["@classesCache"];
  3976. if(($receiver = $2) == nil || $receiver == undefined){
  3977. self["@classesCache"]=_st($HashedCollection())._new();
  3978. $1=self["@classesCache"];
  3979. } else {
  3980. $1=$2;
  3981. };
  3982. return $1;
  3983. }, function($ctx1) {$ctx1.fill(self,"classesCache",{},smalltalk.HLSelectorsCache)})},
  3984. args: [],
  3985. source: "classesCache\x0a\x09^ classesCache ifNil: [ classesCache := HashedCollection new ]",
  3986. messageSends: ["ifNil:", "new"],
  3987. referencedClasses: ["HashedCollection"]
  3988. }),
  3989. smalltalk.HLSelectorsCache);
  3990. smalltalk.addMethod(
  3991. smalltalk.method({
  3992. selector: "initialize",
  3993. category: 'initialization',
  3994. fn: function (){
  3995. var self=this;
  3996. return smalltalk.withContext(function($ctx1) {
  3997. smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  3998. _st(self)._observeSystem();
  3999. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLSelectorsCache)})},
  4000. args: [],
  4001. source: "initialize\x0a\x09super initialize.\x0a self observeSystem",
  4002. messageSends: ["initialize", "observeSystem"],
  4003. referencedClasses: []
  4004. }),
  4005. smalltalk.HLSelectorsCache);
  4006. smalltalk.addMethod(
  4007. smalltalk.method({
  4008. selector: "invalidateCacheFor:",
  4009. category: 'private',
  4010. fn: function (aMethod){
  4011. var self=this;
  4012. return smalltalk.withContext(function($ctx1) {
  4013. _st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._invalidateSelector_(_st(aMethod)._selector());
  4014. return self}, function($ctx1) {$ctx1.fill(self,"invalidateCacheFor:",{aMethod:aMethod},smalltalk.HLSelectorsCache)})},
  4015. args: ["aMethod"],
  4016. source: "invalidateCacheFor: aMethod\x0a\x09(self cacheFor: aMethod methodClass)\x0a \x09invalidateSelector: aMethod selector",
  4017. messageSends: ["invalidateSelector:", "selector", "cacheFor:", "methodClass"],
  4018. referencedClasses: []
  4019. }),
  4020. smalltalk.HLSelectorsCache);
  4021. smalltalk.addMethod(
  4022. smalltalk.method({
  4023. selector: "isOverridden:",
  4024. category: 'testing',
  4025. fn: function (aMethod){
  4026. var self=this;
  4027. return smalltalk.withContext(function($ctx1) {
  4028. var $1;
  4029. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverridden_(aMethod);
  4030. return $1;
  4031. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod},smalltalk.HLSelectorsCache)})},
  4032. args: ["aMethod"],
  4033. source: "isOverridden: aMethod\x0a\x09^ (self cacheFor: aMethod methodClass)\x0a \x09isOverridden: aMethod",
  4034. messageSends: ["isOverridden:", "cacheFor:", "methodClass"],
  4035. referencedClasses: []
  4036. }),
  4037. smalltalk.HLSelectorsCache);
  4038. smalltalk.addMethod(
  4039. smalltalk.method({
  4040. selector: "isOverride:",
  4041. category: 'testing',
  4042. fn: function (aMethod){
  4043. var self=this;
  4044. return smalltalk.withContext(function($ctx1) {
  4045. var $1;
  4046. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverride_(aMethod);
  4047. return $1;
  4048. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod},smalltalk.HLSelectorsCache)})},
  4049. args: ["aMethod"],
  4050. source: "isOverride: aMethod\x0a\x09^ (self cacheFor: aMethod methodClass)\x0a \x09isOverride: aMethod",
  4051. messageSends: ["isOverride:", "cacheFor:", "methodClass"],
  4052. referencedClasses: []
  4053. }),
  4054. smalltalk.HLSelectorsCache);
  4055. smalltalk.addMethod(
  4056. smalltalk.method({
  4057. selector: "newCacheFor:",
  4058. category: 'factory',
  4059. fn: function (aClass){
  4060. var self=this;
  4061. function $HLClassCache(){return smalltalk.HLClassCache||(typeof HLClassCache=="undefined"?nil:HLClassCache)}
  4062. return smalltalk.withContext(function($ctx1) {
  4063. var $1;
  4064. $1=_st($HLClassCache())._on_selectorsCache_(aClass,self);
  4065. return $1;
  4066. }, function($ctx1) {$ctx1.fill(self,"newCacheFor:",{aClass:aClass},smalltalk.HLSelectorsCache)})},
  4067. args: ["aClass"],
  4068. source: "newCacheFor: aClass\x0a\x09^ HLClassCache \x0a \x09on: aClass\x0a selectorsCache: self",
  4069. messageSends: ["on:selectorsCache:"],
  4070. referencedClasses: ["HLClassCache"]
  4071. }),
  4072. smalltalk.HLSelectorsCache);
  4073. smalltalk.addMethod(
  4074. smalltalk.method({
  4075. selector: "observeSystem",
  4076. category: 'actions',
  4077. fn: function (){
  4078. var self=this;
  4079. function $MethodAdded(){return smalltalk.MethodAdded||(typeof MethodAdded=="undefined"?nil:MethodAdded)}
  4080. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  4081. function $MethodRemoved(){return smalltalk.MethodRemoved||(typeof MethodRemoved=="undefined"?nil:MethodRemoved)}
  4082. return smalltalk.withContext(function($ctx1) {
  4083. var $1,$2;
  4084. $1=_st($SystemAnnouncer())._current();
  4085. _st($1)._on_do_($MethodAdded(),(function(ann){
  4086. return smalltalk.withContext(function($ctx2) {
  4087. return _st(self)._onMethodAdded_(_st(ann)._method());
  4088. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  4089. $2=_st($1)._on_do_($MethodRemoved(),(function(ann){
  4090. return smalltalk.withContext(function($ctx2) {
  4091. return _st(self)._onMethodRemoved_(_st(ann)._method());
  4092. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  4093. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLSelectorsCache)})},
  4094. args: [],
  4095. source: "observeSystem\x0a\x09SystemAnnouncer current\x0a\x09\x09on: MethodAdded\x0a do: [ :ann | self onMethodAdded: ann method ];\x0a on: MethodRemoved\x0a do: [ :ann | self onMethodRemoved: ann method ]",
  4096. messageSends: ["on:do:", "onMethodAdded:", "method", "current", "onMethodRemoved:"],
  4097. referencedClasses: ["MethodAdded", "SystemAnnouncer", "MethodRemoved"]
  4098. }),
  4099. smalltalk.HLSelectorsCache);
  4100. smalltalk.addMethod(
  4101. smalltalk.method({
  4102. selector: "onMethodAdded:",
  4103. category: 'reactions',
  4104. fn: function (aMethod){
  4105. var self=this;
  4106. return smalltalk.withContext(function($ctx1) {
  4107. _st(self)._invalidateCacheFor_(aMethod);
  4108. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod},smalltalk.HLSelectorsCache)})},
  4109. args: ["aMethod"],
  4110. source: "onMethodAdded: aMethod\x0a\x09self invalidateCacheFor: aMethod",
  4111. messageSends: ["invalidateCacheFor:"],
  4112. referencedClasses: []
  4113. }),
  4114. smalltalk.HLSelectorsCache);
  4115. smalltalk.addMethod(
  4116. smalltalk.method({
  4117. selector: "onMethodRemoved:",
  4118. category: 'reactions',
  4119. fn: function (aMethod){
  4120. var self=this;
  4121. return smalltalk.withContext(function($ctx1) {
  4122. _st(self)._invalidateCacheFor_(aMethod);
  4123. return self}, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod},smalltalk.HLSelectorsCache)})},
  4124. args: ["aMethod"],
  4125. source: "onMethodRemoved: aMethod\x0a\x09self invalidateCacheFor: aMethod",
  4126. messageSends: ["invalidateCacheFor:"],
  4127. referencedClasses: []
  4128. }),
  4129. smalltalk.HLSelectorsCache);
  4130. smalltalk.HLSelectorsCache.klass.iVarNames = ['current'];
  4131. smalltalk.addMethod(
  4132. smalltalk.method({
  4133. selector: "current",
  4134. category: 'accessing',
  4135. fn: function (){
  4136. var self=this;
  4137. return smalltalk.withContext(function($ctx1) {
  4138. var $2,$1;
  4139. $2=self["@current"];
  4140. if(($receiver = $2) == nil || $receiver == undefined){
  4141. self["@current"]=smalltalk.Object.klass.fn.prototype._new.apply(_st(self), []);
  4142. $1=self["@current"];
  4143. } else {
  4144. $1=$2;
  4145. };
  4146. return $1;
  4147. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.HLSelectorsCache.klass)})},
  4148. args: [],
  4149. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  4150. messageSends: ["ifNil:", "new"],
  4151. referencedClasses: []
  4152. }),
  4153. smalltalk.HLSelectorsCache.klass);
  4154. smalltalk.addMethod(
  4155. smalltalk.method({
  4156. selector: "flush",
  4157. category: 'accessing',
  4158. fn: function (){
  4159. var self=this;
  4160. return smalltalk.withContext(function($ctx1) {
  4161. self["@current"]=nil;
  4162. return self}, function($ctx1) {$ctx1.fill(self,"flush",{},smalltalk.HLSelectorsCache.klass)})},
  4163. args: [],
  4164. source: "flush\x0a\x09current := nil",
  4165. messageSends: [],
  4166. referencedClasses: []
  4167. }),
  4168. smalltalk.HLSelectorsCache.klass);
  4169. smalltalk.addMethod(
  4170. smalltalk.method({
  4171. selector: "new",
  4172. category: 'instance creation',
  4173. fn: function (){
  4174. var self=this;
  4175. return smalltalk.withContext(function($ctx1) {
  4176. _st(self)._shouldNotImplement();
  4177. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.HLSelectorsCache.klass)})},
  4178. args: [],
  4179. source: "new\x0a\x09self shouldNotImplement",
  4180. messageSends: ["shouldNotImplement"],
  4181. referencedClasses: []
  4182. }),
  4183. smalltalk.HLSelectorsCache.klass);
  4184. smalltalk.addMethod(
  4185. smalltalk.method({
  4186. selector: "isOverridden",
  4187. category: '*Helios-Browser',
  4188. fn: function (){
  4189. var self=this;
  4190. var selector;
  4191. return smalltalk.withContext(function($ctx1) {
  4192. var $1;
  4193. var $early={};
  4194. try {
  4195. selector=_st(self)._selector();
  4196. _st(_st(self)._methodClass())._allSubclassesDo_((function(each){
  4197. return smalltalk.withContext(function($ctx2) {
  4198. $1=_st(each)._includesSelector_(selector);
  4199. if(smalltalk.assert($1)){
  4200. throw $early=[true];
  4201. };
  4202. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4203. return false;
  4204. }
  4205. catch(e) {if(e===$early)return e[0]; throw e}
  4206. }, function($ctx1) {$ctx1.fill(self,"isOverridden",{selector:selector},smalltalk.CompiledMethod)})},
  4207. args: [],
  4208. source: "isOverridden\x0a\x09| selector |\x0a \x0a selector := self selector.\x0a self methodClass allSubclassesDo: [ :each |\x0a\x09 (each includesSelector: selector)\x0a \x09ifTrue: [ ^ true ] ].\x0a\x09^ false",
  4209. messageSends: ["selector", "allSubclassesDo:", "ifTrue:", "includesSelector:", "methodClass"],
  4210. referencedClasses: []
  4211. }),
  4212. smalltalk.CompiledMethod);
  4213. smalltalk.addMethod(
  4214. smalltalk.method({
  4215. selector: "isOverride",
  4216. category: '*Helios-Browser',
  4217. fn: function (){
  4218. var self=this;
  4219. var superclass;
  4220. return smalltalk.withContext(function($ctx1) {
  4221. var $1,$2;
  4222. superclass=_st(_st(self)._methodClass())._superclass();
  4223. $1=superclass;
  4224. if(($receiver = $1) == nil || $receiver == undefined){
  4225. return false;
  4226. } else {
  4227. $1;
  4228. };
  4229. $2=_st(_st(_st(_st(self)._methodClass())._superclass())._lookupSelector_(_st(self)._selector()))._notNil();
  4230. return $2;
  4231. }, function($ctx1) {$ctx1.fill(self,"isOverride",{superclass:superclass},smalltalk.CompiledMethod)})},
  4232. args: [],
  4233. source: "isOverride\x0a\x09| superclass |\x0a \x0a superclass := self methodClass superclass.\x0a\x09superclass ifNil: [ ^ false ].\x0a\x09\x0a ^ (self methodClass superclass lookupSelector: self selector) notNil",
  4234. messageSends: ["superclass", "methodClass", "ifNil:", "notNil", "lookupSelector:", "selector"],
  4235. referencedClasses: []
  4236. }),
  4237. smalltalk.CompiledMethod);