Helios-Browser.js 118 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106
  1. smalltalk.addPackage('Helios-Browser');
  2. smalltalk.addClass('HLBrowser', smalltalk.HLWidget, ['model', 'packagesListWidget', 'classesListWidget', 'protocolsListWidget', 'methodsListWidget', 'sourceWidget'], 'Helios-Browser');
  3. smalltalk.addMethod(
  4. "_announcer",
  5. smalltalk.method({
  6. selector: "announcer",
  7. category: 'accessing',
  8. fn: function (){
  9. var self=this;
  10. return smalltalk.withContext(function($ctx1) { 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. "_classesListWidget",
  22. smalltalk.method({
  23. selector: "classesListWidget",
  24. category: 'widgets',
  25. fn: function (){
  26. var self=this;
  27. return smalltalk.withContext(function($ctx1) { var $2,$1;
  28. $2=self["@classesListWidget"];
  29. if(($receiver = $2) == nil || $receiver == undefined){
  30. self["@classesListWidget"]=_st((smalltalk.HLClassesListWidget || HLClassesListWidget))._on_(_st(self)._model());
  31. self["@classesListWidget"];
  32. $1=_st(self["@classesListWidget"])._next_(_st(self)._protocolsListWidget());
  33. } else {
  34. $1=$2;
  35. };
  36. return $1;
  37. }, function($ctx1) {$ctx1.fill(self,"classesListWidget",{}, smalltalk.HLBrowser)})},
  38. args: [],
  39. source: "classesListWidget\x0a\x09^ classesListWidget ifNil: [\x0a \x09classesListWidget := HLClassesListWidget on: self model.\x0a\x09\x09classesListWidget next: self protocolsListWidget ]",
  40. messageSends: ["ifNil:", "on:", "model", "next:", "protocolsListWidget"],
  41. referencedClasses: ["HLClassesListWidget"]
  42. }),
  43. smalltalk.HLBrowser);
  44. smalltalk.addMethod(
  45. "_environment",
  46. smalltalk.method({
  47. selector: "environment",
  48. category: 'accessing',
  49. fn: function (){
  50. var self=this;
  51. return smalltalk.withContext(function($ctx1) { var $1;
  52. $1=_st(_st(self)._model())._environment();
  53. return $1;
  54. }, function($ctx1) {$ctx1.fill(self,"environment",{}, smalltalk.HLBrowser)})},
  55. args: [],
  56. source: "environment\x0a\x09^ self model environment",
  57. messageSends: ["environment", "model"],
  58. referencedClasses: []
  59. }),
  60. smalltalk.HLBrowser);
  61. smalltalk.addMethod(
  62. "_methodsListWidget",
  63. smalltalk.method({
  64. selector: "methodsListWidget",
  65. category: 'widgets',
  66. fn: function (){
  67. var self=this;
  68. return smalltalk.withContext(function($ctx1) { var $2,$1;
  69. $2=self["@methodsListWidget"];
  70. if(($receiver = $2) == nil || $receiver == undefined){
  71. self["@methodsListWidget"]=_st((smalltalk.HLMethodsListWidget || HLMethodsListWidget))._on_(_st(self)._model());
  72. $1=self["@methodsListWidget"];
  73. } else {
  74. $1=$2;
  75. };
  76. return $1;
  77. }, function($ctx1) {$ctx1.fill(self,"methodsListWidget",{}, smalltalk.HLBrowser)})},
  78. args: [],
  79. source: "methodsListWidget\x0a\x09^ methodsListWidget ifNil: [\x0a \x09methodsListWidget := HLMethodsListWidget on: self model ]",
  80. messageSends: ["ifNil:", "on:", "model"],
  81. referencedClasses: ["HLMethodsListWidget"]
  82. }),
  83. smalltalk.HLBrowser);
  84. smalltalk.addMethod(
  85. "_model",
  86. smalltalk.method({
  87. selector: "model",
  88. category: 'accessing',
  89. fn: function (){
  90. var self=this;
  91. return smalltalk.withContext(function($ctx1) { var $2,$1;
  92. $2=self["@model"];
  93. if(($receiver = $2) == nil || $receiver == undefined){
  94. self["@model"]=_st((smalltalk.HLBrowserModel || HLBrowserModel))._new();
  95. $1=self["@model"];
  96. } else {
  97. $1=$2;
  98. };
  99. return $1;
  100. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLBrowser)})},
  101. args: [],
  102. source: "model\x0a\x09^ model ifNil: [ model := HLBrowserModel new ]",
  103. messageSends: ["ifNil:", "new"],
  104. referencedClasses: ["HLBrowserModel"]
  105. }),
  106. smalltalk.HLBrowser);
  107. smalltalk.addMethod(
  108. "_model_",
  109. smalltalk.method({
  110. selector: "model:",
  111. category: 'accessing',
  112. fn: function (aModel){
  113. var self=this;
  114. return smalltalk.withContext(function($ctx1) { self["@model"]=aModel;
  115. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel}, smalltalk.HLBrowser)})},
  116. args: ["aModel"],
  117. source: "model: aModel\x0a\x09model := aModel",
  118. messageSends: [],
  119. referencedClasses: []
  120. }),
  121. smalltalk.HLBrowser);
  122. smalltalk.addMethod(
  123. "_packagesListWidget",
  124. smalltalk.method({
  125. selector: "packagesListWidget",
  126. category: 'widgets',
  127. fn: function (){
  128. var self=this;
  129. return smalltalk.withContext(function($ctx1) { var $2,$1;
  130. $2=self["@packagesListWidget"];
  131. if(($receiver = $2) == nil || $receiver == undefined){
  132. self["@packagesListWidget"]=_st((smalltalk.HLPackagesListWidget || HLPackagesListWidget))._on_(_st(self)._model());
  133. self["@packagesListWidget"];
  134. $1=_st(self["@packagesListWidget"])._next_(_st(self)._classesListWidget());
  135. } else {
  136. $1=$2;
  137. };
  138. return $1;
  139. }, function($ctx1) {$ctx1.fill(self,"packagesListWidget",{}, smalltalk.HLBrowser)})},
  140. args: [],
  141. source: "packagesListWidget\x0a\x09^ packagesListWidget ifNil: [\x0a \x09packagesListWidget := HLPackagesListWidget on: self model.\x0a\x09\x09packagesListWidget next: self classesListWidget ]",
  142. messageSends: ["ifNil:", "on:", "model", "next:", "classesListWidget"],
  143. referencedClasses: ["HLPackagesListWidget"]
  144. }),
  145. smalltalk.HLBrowser);
  146. smalltalk.addMethod(
  147. "_protocolsListWidget",
  148. smalltalk.method({
  149. selector: "protocolsListWidget",
  150. category: 'widgets',
  151. fn: function (){
  152. var self=this;
  153. return smalltalk.withContext(function($ctx1) { var $2,$1;
  154. $2=self["@protocolsListWidget"];
  155. if(($receiver = $2) == nil || $receiver == undefined){
  156. self["@protocolsListWidget"]=_st((smalltalk.HLProtocolsListWidget || HLProtocolsListWidget))._on_(_st(self)._model());
  157. self["@protocolsListWidget"];
  158. $1=_st(self["@protocolsListWidget"])._next_(_st(self)._methodsListWidget());
  159. } else {
  160. $1=$2;
  161. };
  162. return $1;
  163. }, function($ctx1) {$ctx1.fill(self,"protocolsListWidget",{}, smalltalk.HLBrowser)})},
  164. args: [],
  165. source: "protocolsListWidget\x0a\x09^ protocolsListWidget ifNil: [\x0a \x09protocolsListWidget := HLProtocolsListWidget on: self model.\x0a\x09\x09protocolsListWidget next: self methodsListWidget ]",
  166. messageSends: ["ifNil:", "on:", "model", "next:", "methodsListWidget"],
  167. referencedClasses: ["HLProtocolsListWidget"]
  168. }),
  169. smalltalk.HLBrowser);
  170. smalltalk.addMethod(
  171. "_registerBindingsOn_",
  172. smalltalk.method({
  173. selector: "registerBindingsOn:",
  174. category: 'keybindings',
  175. fn: function (aBindingGroup){
  176. var self=this;
  177. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  178. $1=aBindingGroup;
  179. _st($1)._addGroupKey_labelled_((66),"Browse");
  180. _st($1)._addGroupKey_labelled_((71),"Go to");
  181. $2=_st($1)._addGroupKey_labelled_((84),"Toggle");
  182. _st(_st((smalltalk.HLBrowserCommand || HLBrowserCommand))._withAllSubclasses())._do_((function(each){
  183. return smalltalk.withContext(function($ctx2) { $3=_st(each)._key();
  184. if(($receiver = $3) == nil || $receiver == undefined){
  185. return $3;
  186. } else {
  187. return _st(_st(aBindingGroup)._at_(_st(each)._bindingGroup()))._add_(_st(_st(each)._on_(_st(self)._model()))._asBinding());
  188. };
  189. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  190. return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup}, smalltalk.HLBrowser)})},
  191. args: ["aBindingGroup"],
  192. source: "registerBindingsOn: aBindingGroup\x0a\x09aBindingGroup \x0a \x09addGroupKey: 66 labelled: 'Browse';\x0a addGroupKey: 71 labelled: 'Go to';\x0a addGroupKey: 84 labelled: 'Toggle'.\x0a \x0a \x09HLBrowserCommand withAllSubclasses do: [ :each |\x0a \x09\x09each key ifNotNil: [\x0a \x09\x09\x09(aBindingGroup at: each bindingGroup) \x0a \x09\x09\x09\x09add: (each on: self model) asBinding ] ]",
  193. messageSends: ["addGroupKey:labelled:", "do:", "ifNotNil:", "add:", "asBinding", "on:", "model", "at:", "bindingGroup", "key", "withAllSubclasses"],
  194. referencedClasses: ["HLBrowserCommand"]
  195. }),
  196. smalltalk.HLBrowser);
  197. smalltalk.addMethod(
  198. "_renderContentOn_",
  199. smalltalk.method({
  200. selector: "renderContentOn:",
  201. category: 'rendering',
  202. fn: function (html){
  203. var self=this;
  204. return smalltalk.withContext(function($ctx1) { _st(html)._with_(_st((smalltalk.HLContainer || HLContainer))._with_(_st((smalltalk.HLHorizontalSplitter || HLHorizontalSplitter))._with_with_(_st((smalltalk.HLVerticalSplitter || HLVerticalSplitter))._with_with_(_st((smalltalk.HLVerticalSplitter || HLVerticalSplitter))._with_with_(_st(self)._packagesListWidget(),_st(self)._classesListWidget()),_st((smalltalk.HLVerticalSplitter || HLVerticalSplitter))._with_with_(_st(self)._protocolsListWidget(),_st(self)._methodsListWidget())),_st(self)._sourceWidget())));
  205. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLBrowser)})},
  206. args: ["html"],
  207. 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))",
  208. messageSends: ["with:", "with:with:", "packagesListWidget", "classesListWidget", "protocolsListWidget", "methodsListWidget", "sourceWidget"],
  209. referencedClasses: ["HLVerticalSplitter", "HLHorizontalSplitter", "HLContainer"]
  210. }),
  211. smalltalk.HLBrowser);
  212. smalltalk.addMethod(
  213. "_sourceWidget",
  214. smalltalk.method({
  215. selector: "sourceWidget",
  216. category: 'widgets',
  217. fn: function (){
  218. var self=this;
  219. return smalltalk.withContext(function($ctx1) { var $2,$1;
  220. $2=self["@sourceWidget"];
  221. if(($receiver = $2) == nil || $receiver == undefined){
  222. self["@sourceWidget"]=_st((smalltalk.HLBrowserSourceWidget || HLBrowserSourceWidget))._on_(_st(self)._model());
  223. $1=self["@sourceWidget"];
  224. } else {
  225. $1=$2;
  226. };
  227. return $1;
  228. }, function($ctx1) {$ctx1.fill(self,"sourceWidget",{}, smalltalk.HLBrowser)})},
  229. args: [],
  230. source: "sourceWidget\x0a\x09^ sourceWidget ifNil: [\x0a \x09sourceWidget := HLBrowserSourceWidget on: self model ]",
  231. messageSends: ["ifNil:", "on:", "model"],
  232. referencedClasses: ["HLBrowserSourceWidget"]
  233. }),
  234. smalltalk.HLBrowser);
  235. smalltalk.HLBrowser.klass.iVarNames = ['nextId'];
  236. smalltalk.addMethod(
  237. "_canBeOpenAsTab",
  238. smalltalk.method({
  239. selector: "canBeOpenAsTab",
  240. category: 'testing',
  241. fn: function (){
  242. var self=this;
  243. return smalltalk.withContext(function($ctx1) { return true;
  244. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{}, smalltalk.HLBrowser.klass)})},
  245. args: [],
  246. source: "canBeOpenAsTab\x0a\x09^ true",
  247. messageSends: [],
  248. referencedClasses: []
  249. }),
  250. smalltalk.HLBrowser.klass);
  251. smalltalk.addMethod(
  252. "_nextId",
  253. smalltalk.method({
  254. selector: "nextId",
  255. category: 'accessing',
  256. fn: function (){
  257. var self=this;
  258. return smalltalk.withContext(function($ctx1) { var $1,$2;
  259. $1=self["@nextId"];
  260. if(($receiver = $1) == nil || $receiver == undefined){
  261. self["@nextId"]=(0);
  262. self["@nextId"];
  263. } else {
  264. $1;
  265. };
  266. $2=_st("browser_").__comma(_st(_st(self["@nextId"]).__plus((1)))._asString());
  267. return $2;
  268. }, function($ctx1) {$ctx1.fill(self,"nextId",{}, smalltalk.HLBrowser.klass)})},
  269. args: [],
  270. source: "nextId\x0a\x09nextId ifNil: [ nextId := 0 ].\x0a ^ 'browser_', (nextId + 1) asString",
  271. messageSends: ["ifNil:", ",", "asString", "+"],
  272. referencedClasses: []
  273. }),
  274. smalltalk.HLBrowser.klass);
  275. smalltalk.addMethod(
  276. "_tabLabel",
  277. smalltalk.method({
  278. selector: "tabLabel",
  279. category: 'accessing',
  280. fn: function (){
  281. var self=this;
  282. return smalltalk.withContext(function($ctx1) { return "Browser";
  283. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{}, smalltalk.HLBrowser.klass)})},
  284. args: [],
  285. source: "tabLabel\x0a\x09^ 'Browser'",
  286. messageSends: [],
  287. referencedClasses: []
  288. }),
  289. smalltalk.HLBrowser.klass);
  290. smalltalk.addMethod(
  291. "_tabPriority",
  292. smalltalk.method({
  293. selector: "tabPriority",
  294. category: 'accessing',
  295. fn: function (){
  296. var self=this;
  297. return smalltalk.withContext(function($ctx1) { return (0);
  298. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{}, smalltalk.HLBrowser.klass)})},
  299. args: [],
  300. source: "tabPriority\x0a\x09^ 0",
  301. messageSends: [],
  302. referencedClasses: []
  303. }),
  304. smalltalk.HLBrowser.klass);
  305. smalltalk.addClass('HLBrowserListWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Browser');
  306. smalltalk.addMethod(
  307. "_initialize",
  308. smalltalk.method({
  309. selector: "initialize",
  310. category: 'initialization',
  311. fn: function (){
  312. var self=this;
  313. return smalltalk.withContext(function($ctx1) { smalltalk.HLNavigationListWidget.fn.prototype._initialize.apply(_st(self), []);
  314. _st(self)._observeSystem();
  315. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLBrowserListWidget)})},
  316. args: [],
  317. source: "initialize\x0a\x09super initialize.\x0a \x0a self observeSystem",
  318. messageSends: ["initialize", "observeSystem"],
  319. referencedClasses: []
  320. }),
  321. smalltalk.HLBrowserListWidget);
  322. smalltalk.addMethod(
  323. "_model",
  324. smalltalk.method({
  325. selector: "model",
  326. category: 'accessing',
  327. fn: function (){
  328. var self=this;
  329. return smalltalk.withContext(function($ctx1) { var $1;
  330. $1=self["@model"];
  331. return $1;
  332. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLBrowserListWidget)})},
  333. args: [],
  334. source: "model\x0a\x09^ model",
  335. messageSends: [],
  336. referencedClasses: []
  337. }),
  338. smalltalk.HLBrowserListWidget);
  339. smalltalk.addMethod(
  340. "_model_",
  341. smalltalk.method({
  342. selector: "model:",
  343. category: 'accessing',
  344. fn: function (aBrowserModel){
  345. var self=this;
  346. return smalltalk.withContext(function($ctx1) { self["@model"]=aBrowserModel;
  347. _st(self)._observeModel();
  348. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserListWidget)})},
  349. args: ["aBrowserModel"],
  350. source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a \x0a self observeModel",
  351. messageSends: ["observeModel"],
  352. referencedClasses: []
  353. }),
  354. smalltalk.HLBrowserListWidget);
  355. smalltalk.addMethod(
  356. "_observeModel",
  357. smalltalk.method({
  358. selector: "observeModel",
  359. category: 'actions',
  360. fn: function (){
  361. var self=this;
  362. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLBrowserListWidget)})},
  363. args: [],
  364. source: "observeModel",
  365. messageSends: [],
  366. referencedClasses: []
  367. }),
  368. smalltalk.HLBrowserListWidget);
  369. smalltalk.addMethod(
  370. "_observeSystem",
  371. smalltalk.method({
  372. selector: "observeSystem",
  373. category: 'actions',
  374. fn: function (){
  375. var self=this;
  376. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLBrowserListWidget)})},
  377. args: [],
  378. source: "observeSystem",
  379. messageSends: [],
  380. referencedClasses: []
  381. }),
  382. smalltalk.HLBrowserListWidget);
  383. smalltalk.addMethod(
  384. "_on_",
  385. smalltalk.method({
  386. selector: "on:",
  387. category: 'instance creation',
  388. fn: function (aModel){
  389. var self=this;
  390. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  391. $2=_st(self)._new();
  392. _st($2)._model_(aModel);
  393. $3=_st($2)._yourself();
  394. $1=$3;
  395. return $1;
  396. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel}, smalltalk.HLBrowserListWidget.klass)})},
  397. args: ["aModel"],
  398. source: "on: aModel\x0a\x09^ self new \x0a \x09model: aModel;\x0a yourself",
  399. messageSends: ["model:", "new", "yourself"],
  400. referencedClasses: []
  401. }),
  402. smalltalk.HLBrowserListWidget.klass);
  403. smalltalk.addClass('HLClassesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  404. smalltalk.addMethod(
  405. "_focusMethodsListWidget",
  406. smalltalk.method({
  407. selector: "focusMethodsListWidget",
  408. category: 'actions',
  409. fn: function (){
  410. var self=this;
  411. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._announce_(_st((smalltalk.HLMethodsListFocus || HLMethodsListFocus))._new());
  412. return self}, function($ctx1) {$ctx1.fill(self,"focusMethodsListWidget",{}, smalltalk.HLClassesListWidget)})},
  413. args: [],
  414. source: "focusMethodsListWidget\x0a\x09self model announcer announce: HLMethodsListFocus new",
  415. messageSends: ["announce:", "new", "announcer", "model"],
  416. referencedClasses: ["HLMethodsListFocus"]
  417. }),
  418. smalltalk.HLClassesListWidget);
  419. smalltalk.addMethod(
  420. "_focusProtocolsListWidget",
  421. smalltalk.method({
  422. selector: "focusProtocolsListWidget",
  423. category: 'actions',
  424. fn: function (){
  425. var self=this;
  426. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._announce_(_st((smalltalk.HLProtocolsListFocus || HLProtocolsListFocus))._new());
  427. return self}, function($ctx1) {$ctx1.fill(self,"focusProtocolsListWidget",{}, smalltalk.HLClassesListWidget)})},
  428. args: [],
  429. source: "focusProtocolsListWidget\x0a\x09self model announcer announce: HLProtocolsListFocus new",
  430. messageSends: ["announce:", "new", "announcer", "model"],
  431. referencedClasses: ["HLProtocolsListFocus"]
  432. }),
  433. smalltalk.HLClassesListWidget);
  434. smalltalk.addMethod(
  435. "_getChildrenOf_",
  436. smalltalk.method({
  437. selector: "getChildrenOf:",
  438. category: 'accessing',
  439. fn: function (aClass){
  440. var self=this;
  441. return smalltalk.withContext(function($ctx1) { var $1;
  442. $1=_st(_st(self)._items())._select_((function(each){
  443. return smalltalk.withContext(function($ctx2) { return _st(_st(each)._superclass()).__eq(aClass);
  444. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  445. return $1;
  446. }, function($ctx1) {$ctx1.fill(self,"getChildrenOf:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  447. args: ["aClass"],
  448. source: "getChildrenOf: aClass\x0a\x09^ self items select: [ :each | each superclass = aClass ]",
  449. messageSends: ["select:", "=", "superclass", "items"],
  450. referencedClasses: []
  451. }),
  452. smalltalk.HLClassesListWidget);
  453. smalltalk.addMethod(
  454. "_getRootClassesOf_",
  455. smalltalk.method({
  456. selector: "getRootClassesOf:",
  457. category: 'accessing',
  458. fn: function (aCollection){
  459. var self=this;
  460. return smalltalk.withContext(function($ctx1) { var $1;
  461. $1=_st(aCollection)._select_((function(each){
  462. return smalltalk.withContext(function($ctx2) { return _st(_st(aCollection)._includes_(_st(each)._superclass()))._not();
  463. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  464. return $1;
  465. }, function($ctx1) {$ctx1.fill(self,"getRootClassesOf:",{aCollection:aCollection}, smalltalk.HLClassesListWidget)})},
  466. args: ["aCollection"],
  467. source: "getRootClassesOf: aCollection\x0a\x09^ aCollection select: [ :each |\x0a \x09\x09(aCollection includes: each superclass) not ]",
  468. messageSends: ["select:", "not", "includes:", "superclass"],
  469. referencedClasses: []
  470. }),
  471. smalltalk.HLClassesListWidget);
  472. smalltalk.addMethod(
  473. "_iconForItem_",
  474. smalltalk.method({
  475. selector: "iconForItem:",
  476. category: 'accessing',
  477. fn: function (aClass){
  478. var self=this;
  479. return smalltalk.withContext(function($ctx1) { var $2,$1;
  480. $2=_st(_st(_st(aClass)._theNonMetaClass())._comment())._isEmpty();
  481. if(smalltalk.assert($2)){
  482. $1="icon-question-sign";
  483. } else {
  484. $1="icon-none";
  485. };
  486. return $1;
  487. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  488. args: ["aClass"],
  489. source: "iconForItem: aClass\x0a\x09^ aClass theNonMetaClass comment isEmpty\x0a \x09ifFalse: [ 'icon-none' ]\x0a \x09ifTrue: [ 'icon-question-sign' ]",
  490. messageSends: ["ifFalse:ifTrue:", "isEmpty", "comment", "theNonMetaClass"],
  491. referencedClasses: []
  492. }),
  493. smalltalk.HLClassesListWidget);
  494. smalltalk.addMethod(
  495. "_observeModel",
  496. smalltalk.method({
  497. selector: "observeModel",
  498. category: 'actions',
  499. fn: function (){
  500. var self=this;
  501. return smalltalk.withContext(function($ctx1) { var $1,$2;
  502. $1=_st(_st(self)._model())._announcer();
  503. _st($1)._on_do_((smalltalk.HLPackageSelected || HLPackageSelected),(function(ann){
  504. return smalltalk.withContext(function($ctx2) { return _st(self)._onPackageSelected_(_st(ann)._item());
  505. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  506. _st($1)._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  507. return smalltalk.withContext(function($ctx2) { return _st(self)._onShowInstanceToggled();
  508. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  509. $2=_st($1)._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  510. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  511. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  512. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLClassesListWidget)})},
  513. args: [],
  514. 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 ]",
  515. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model", "onShowInstanceToggled", "onClassSelected:"],
  516. referencedClasses: ["HLPackageSelected", "HLShowInstanceToggled", "HLClassSelected"]
  517. }),
  518. smalltalk.HLClassesListWidget);
  519. smalltalk.addMethod(
  520. "_observeSystem",
  521. smalltalk.method({
  522. selector: "observeSystem",
  523. category: 'actions',
  524. fn: function (){
  525. var self=this;
  526. return smalltalk.withContext(function($ctx1) { var $1,$2;
  527. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  528. _st($1)._on_do_((smalltalk.ClassAdded || ClassAdded),(function(ann){
  529. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassAdded_(_st(ann)._theClass());
  530. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  531. $2=_st($1)._on_do_((smalltalk.ClassRemoved || ClassRemoved),(function(ann){
  532. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassRemoved_(_st(ann)._theClass());
  533. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  534. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLClassesListWidget)})},
  535. args: [],
  536. source: "observeSystem\x0a\x09SystemAnnouncer current\x0a \x09on: ClassAdded\x0a do: [ :ann | self onClassAdded: ann theClass ];\x0a on: ClassRemoved\x0a do: [ :ann | self onClassRemoved: ann theClass ]",
  537. messageSends: ["on:do:", "onClassAdded:", "theClass", "current", "onClassRemoved:"],
  538. referencedClasses: ["ClassAdded", "SystemAnnouncer", "ClassRemoved"]
  539. }),
  540. smalltalk.HLClassesListWidget);
  541. smalltalk.addMethod(
  542. "_onClassAdded_",
  543. smalltalk.method({
  544. selector: "onClassAdded:",
  545. category: 'reactions',
  546. fn: function (aClass){
  547. var self=this;
  548. return smalltalk.withContext(function($ctx1) { var $1,$2;
  549. $1=_st(_st(aClass)._package()).__eq(_st(_st(self)._model())._selectedPackage());
  550. if(! smalltalk.assert($1)){
  551. $2=self;
  552. return $2;
  553. };
  554. _st(self)._setItemsForSelectedPackage();
  555. _st(self)._refresh();
  556. return self}, function($ctx1) {$ctx1.fill(self,"onClassAdded:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  557. args: ["aClass"],
  558. source: "onClassAdded: aClass\x0a\x09aClass package = self model selectedPackage ifFalse: [ ^ self ].\x0a \x0a self setItemsForSelectedPackage.\x0a self refresh",
  559. messageSends: ["ifFalse:", "=", "selectedPackage", "model", "package", "setItemsForSelectedPackage", "refresh"],
  560. referencedClasses: []
  561. }),
  562. smalltalk.HLClassesListWidget);
  563. smalltalk.addMethod(
  564. "_onClassRemoved_",
  565. smalltalk.method({
  566. selector: "onClassRemoved:",
  567. category: 'reactions',
  568. fn: function (aClass){
  569. var self=this;
  570. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  571. $1=_st(_st(aClass)._package()).__eq(_st(_st(self)._model())._selectedPackage());
  572. if(! smalltalk.assert($1)){
  573. $2=self;
  574. return $2;
  575. };
  576. $3=_st(aClass).__eq(_st(_st(self)._model())._selectedClass());
  577. if(smalltalk.assert($3)){
  578. _st(self)._selectItem_(nil);
  579. };
  580. _st(self)._setItemsForSelectedPackage();
  581. _st(self)._refresh();
  582. return self}, function($ctx1) {$ctx1.fill(self,"onClassRemoved:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  583. args: ["aClass"],
  584. 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",
  585. messageSends: ["ifFalse:", "=", "selectedPackage", "model", "package", "ifTrue:", "selectItem:", "selectedClass", "setItemsForSelectedPackage", "refresh"],
  586. referencedClasses: []
  587. }),
  588. smalltalk.HLClassesListWidget);
  589. smalltalk.addMethod(
  590. "_onClassSelected_",
  591. smalltalk.method({
  592. selector: "onClassSelected:",
  593. category: 'reactions',
  594. fn: function (aClass){
  595. var self=this;
  596. return smalltalk.withContext(function($ctx1) { var $1,$2;
  597. _st(self)._selectedItem_(aClass);
  598. $1=aClass;
  599. if(($receiver = $1) == nil || $receiver == undefined){
  600. $2=self;
  601. return $2;
  602. } else {
  603. $1;
  604. };
  605. _st(self)._focus();
  606. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  607. args: ["aClass"],
  608. source: "onClassSelected: aClass\x0a\x09self selectedItem: aClass.\x0a\x09aClass ifNil: [ ^ self ].\x0a \x0a self focus",
  609. messageSends: ["selectedItem:", "ifNil:", "focus"],
  610. referencedClasses: []
  611. }),
  612. smalltalk.HLClassesListWidget);
  613. smalltalk.addMethod(
  614. "_onPackageSelected_",
  615. smalltalk.method({
  616. selector: "onPackageSelected:",
  617. category: 'reactions',
  618. fn: function (aPackage){
  619. var self=this;
  620. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(nil);
  621. _st(self)._setItemsForSelectedPackage();
  622. _st(self)._refresh();
  623. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{aPackage:aPackage}, smalltalk.HLClassesListWidget)})},
  624. args: ["aPackage"],
  625. source: "onPackageSelected: aPackage\x0a self selectedItem: nil.\x0a \x0a self setItemsForSelectedPackage.\x0a self refresh",
  626. messageSends: ["selectedItem:", "setItemsForSelectedPackage", "refresh"],
  627. referencedClasses: []
  628. }),
  629. smalltalk.HLClassesListWidget);
  630. smalltalk.addMethod(
  631. "_onShowInstanceToggled",
  632. smalltalk.method({
  633. selector: "onShowInstanceToggled",
  634. category: 'reactions',
  635. fn: function (){
  636. var self=this;
  637. return smalltalk.withContext(function($ctx1) { _st(self)._refresh();
  638. return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{}, smalltalk.HLClassesListWidget)})},
  639. args: [],
  640. source: "onShowInstanceToggled\x0a\x09self refresh",
  641. messageSends: ["refresh"],
  642. referencedClasses: []
  643. }),
  644. smalltalk.HLClassesListWidget);
  645. smalltalk.addMethod(
  646. "_renderButtonsOn_",
  647. smalltalk.method({
  648. selector: "renderButtonsOn:",
  649. category: 'rendering',
  650. fn: function (html){
  651. var self=this;
  652. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$6,$7,$8,$2,$9,$10;
  653. $1=_st(html)._div();
  654. _st($1)._class_("btn-group");
  655. _st($1)._at_put_("data-toggle","buttons-radio");
  656. $2=_st($1)._with_((function(){
  657. return smalltalk.withContext(function($ctx2) { $3=_st(html)._button();
  658. _st($3)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  659. return smalltalk.withContext(function($ctx3) { _st(str)._nextPutAll_("btn");
  660. $4=_st(self)._showInstance();
  661. if(smalltalk.assert($4)){
  662. return _st(str)._nextPutAll_(" active");
  663. };
  664. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  665. _st($3)._with_("Instance");
  666. $5=_st($3)._onClick_((function(){
  667. return smalltalk.withContext(function($ctx3) { return _st(self)._showInstance_(true);
  668. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  669. $5;
  670. $6=_st(html)._button();
  671. _st($6)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  672. return smalltalk.withContext(function($ctx3) { _st(str)._nextPutAll_("btn");
  673. $7=_st(_st(self)._model())._showInstance();
  674. if(! smalltalk.assert($7)){
  675. return _st(str)._nextPutAll_(" active");
  676. };
  677. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  678. _st($6)._with_("Class");
  679. $8=_st($6)._onClick_((function(){
  680. return smalltalk.withContext(function($ctx3) { return _st(_st(self)._model())._showInstance_(false);
  681. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  682. return $8;
  683. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  684. $9=_st(html)._button();
  685. _st($9)._class_("btn");
  686. _st($9)._at_put_("data-toggle","button");
  687. $10=_st($9)._with_("Comment");
  688. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.HLClassesListWidget)})},
  689. args: ["html"],
  690. 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 ] ].\x0a \x0a \x09html button \x0a \x09class: 'btn';\x0a at: 'data-toggle' put: 'button';\x0a \x09\x09\x09with: 'Comment'",
  691. messageSends: ["class:", "div", "at:put:", "with:", "streamContents:", "nextPutAll:", "ifTrue:", "showInstance", "button", "onClick:", "showInstance:", "ifFalse:", "model"],
  692. referencedClasses: ["String"]
  693. }),
  694. smalltalk.HLClassesListWidget);
  695. smalltalk.addMethod(
  696. "_renderItem_level_on_",
  697. smalltalk.method({
  698. selector: "renderItem:level:on:",
  699. category: 'rendering',
  700. fn: function (aClass,anInteger,html){
  701. var self=this;
  702. var li;
  703. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  704. li=_st(html)._li();
  705. $1=li;
  706. _st($1)._at_put_("list-data",_st(_st(self)._items())._indexOf_(aClass));
  707. _st($1)._class_(_st(self)._cssClassForItem_(aClass));
  708. $2=_st($1)._with_((function(){
  709. return smalltalk.withContext(function($ctx2) { $3=_st(html)._a();
  710. _st($3)._with_((function(){
  711. return smalltalk.withContext(function($ctx3) { _st(_st(html)._tag_("i"))._class_(_st(self)._iconForItem_(aClass));
  712. return _st(self)._renderItemLabel_level_on_(aClass,anInteger,html);
  713. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  714. $4=_st($3)._onClick_((function(){
  715. return smalltalk.withContext(function($ctx3) { return _st(self)._activateListItem_(_st(li)._asJQuery());
  716. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  717. return $4;
  718. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  719. _st(_st(self)._getChildrenOf_(aClass))._do_((function(each){
  720. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_level_on_(each,_st(anInteger).__plus((1)),html);
  721. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  722. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:level:on:",{aClass:aClass,anInteger:anInteger,html:html,li:li}, smalltalk.HLClassesListWidget)})},
  723. args: ["aClass", "anInteger", "html"],
  724. source: "renderItem: aClass level: anInteger on: html\x0a\x09| li |\x0a \x0a\x09li := html li.\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 ]",
  725. messageSends: ["li", "at:put:", "indexOf:", "items", "class:", "cssClassForItem:", "with:", "iconForItem:", "tag:", "renderItemLabel:level:on:", "a", "onClick:", "activateListItem:", "asJQuery", "do:", "renderItem:level:on:", "+", "getChildrenOf:"],
  726. referencedClasses: []
  727. }),
  728. smalltalk.HLClassesListWidget);
  729. smalltalk.addMethod(
  730. "_renderItem_on_",
  731. smalltalk.method({
  732. selector: "renderItem:on:",
  733. category: 'rendering',
  734. fn: function (aClass,html){
  735. var self=this;
  736. return smalltalk.withContext(function($ctx1) { smalltalk.HLBrowserListWidget.fn.prototype._renderItem_on_.apply(_st(self), [aClass,html]);
  737. _st(_st(self)._getChildrenOf_(aClass))._do_((function(each){
  738. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_level_on_(each,(1),html);
  739. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  740. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{aClass:aClass,html:html}, smalltalk.HLClassesListWidget)})},
  741. args: ["aClass", "html"],
  742. 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 ]",
  743. messageSends: ["renderItem:on:", "do:", "renderItem:level:on:", "getChildrenOf:"],
  744. referencedClasses: []
  745. }),
  746. smalltalk.HLClassesListWidget);
  747. smalltalk.addMethod(
  748. "_renderItemLabel_level_on_",
  749. smalltalk.method({
  750. selector: "renderItemLabel:level:on:",
  751. category: 'rendering',
  752. fn: function (aClass,anInteger,html){
  753. var self=this;
  754. return smalltalk.withContext(function($ctx1) { _st(_st(_st(html)._span())._asJQuery())._html_(_st((smalltalk.String || String))._streamContents_((function(str){
  755. return smalltalk.withContext(function($ctx2) { _st(anInteger)._timesRepeat_((function(){
  756. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("    ");
  757. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  758. return _st(str)._nextPutAll_(_st(aClass)._name());
  759. }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1)})})));
  760. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:level:on:",{aClass:aClass,anInteger:anInteger,html:html}, smalltalk.HLClassesListWidget)})},
  761. args: ["aClass", "anInteger", "html"],
  762. 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 ])",
  763. messageSends: ["html:", "streamContents:", "timesRepeat:", "nextPutAll:", "name", "asJQuery", "span"],
  764. referencedClasses: ["String"]
  765. }),
  766. smalltalk.HLClassesListWidget);
  767. smalltalk.addMethod(
  768. "_renderItemLabel_on_",
  769. smalltalk.method({
  770. selector: "renderItemLabel:on:",
  771. category: 'rendering',
  772. fn: function (aClass,html){
  773. var self=this;
  774. return smalltalk.withContext(function($ctx1) { _st(self)._renderItemLabel_level_on_(aClass,(0),html);
  775. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aClass:aClass,html:html}, smalltalk.HLClassesListWidget)})},
  776. args: ["aClass", "html"],
  777. source: "renderItemLabel: aClass on: html\x0a\x09self renderItemLabel: aClass level: 0 on: html",
  778. messageSends: ["renderItemLabel:level:on:"],
  779. referencedClasses: []
  780. }),
  781. smalltalk.HLClassesListWidget);
  782. smalltalk.addMethod(
  783. "_renderListOn_",
  784. smalltalk.method({
  785. selector: "renderListOn:",
  786. category: 'rendering',
  787. fn: function (html){
  788. var self=this;
  789. return smalltalk.withContext(function($ctx1) { _st(_st(self)._getRootClassesOf_(_st(self)._items()))._do_((function(each){
  790. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_on_(each,html);
  791. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  792. return self}, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html}, smalltalk.HLClassesListWidget)})},
  793. args: ["html"],
  794. source: "renderListOn: html\x0a\x09(self getRootClassesOf: self items)\x0a \x09do: [ :each | self renderItem: each on: html ]",
  795. messageSends: ["do:", "renderItem:on:", "getRootClassesOf:", "items"],
  796. referencedClasses: []
  797. }),
  798. smalltalk.HLClassesListWidget);
  799. smalltalk.addMethod(
  800. "_selectItem_",
  801. smalltalk.method({
  802. selector: "selectItem:",
  803. category: 'actions',
  804. fn: function (aClass){
  805. var self=this;
  806. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedClass_(aClass);
  807. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  808. args: ["aClass"],
  809. source: "selectItem: aClass\x0a self model selectedClass: aClass",
  810. messageSends: ["selectedClass:", "model"],
  811. referencedClasses: []
  812. }),
  813. smalltalk.HLClassesListWidget);
  814. smalltalk.addMethod(
  815. "_setItemsForPackage_",
  816. smalltalk.method({
  817. selector: "setItemsForPackage:",
  818. category: 'private',
  819. fn: function (aPackage){
  820. var self=this;
  821. return smalltalk.withContext(function($ctx1) { var $1,$3,$2;
  822. $1=self;
  823. $3=aPackage;
  824. if(($receiver = $3) == nil || $receiver == undefined){
  825. $2=[];
  826. } else {
  827. $2=_st(_st(_st(_st(_st(aPackage)._classes())._collect_((function(each){
  828. return smalltalk.withContext(function($ctx2) { return _st(each)._theNonMetaClass();
  829. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet())._asArray())._sort_((function(a,b){
  830. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._name()).__lt(_st(b)._name());
  831. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  832. };
  833. _st($1)._items_($2);
  834. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForPackage:",{aPackage:aPackage}, smalltalk.HLClassesListWidget)})},
  835. args: ["aPackage"],
  836. 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 ] ]).",
  837. messageSends: ["items:", "ifNil:ifNotNil:", "sort:", "<", "name", "asArray", "asSet", "collect:", "theNonMetaClass", "classes"],
  838. referencedClasses: []
  839. }),
  840. smalltalk.HLClassesListWidget);
  841. smalltalk.addMethod(
  842. "_setItemsForSelectedPackage",
  843. smalltalk.method({
  844. selector: "setItemsForSelectedPackage",
  845. category: 'private',
  846. fn: function (){
  847. var self=this;
  848. return smalltalk.withContext(function($ctx1) { _st(self)._setItemsForPackage_(_st(_st(self)._model())._selectedPackage());
  849. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedPackage",{}, smalltalk.HLClassesListWidget)})},
  850. args: [],
  851. source: "setItemsForSelectedPackage\x0a\x09self setItemsForPackage: self model selectedPackage",
  852. messageSends: ["setItemsForPackage:", "selectedPackage", "model"],
  853. referencedClasses: []
  854. }),
  855. smalltalk.HLClassesListWidget);
  856. smalltalk.addMethod(
  857. "_showInstance",
  858. smalltalk.method({
  859. selector: "showInstance",
  860. category: 'accessing',
  861. fn: function (){
  862. var self=this;
  863. return smalltalk.withContext(function($ctx1) { var $1;
  864. $1=_st(_st(self)._model())._showInstance();
  865. return $1;
  866. }, function($ctx1) {$ctx1.fill(self,"showInstance",{}, smalltalk.HLClassesListWidget)})},
  867. args: [],
  868. source: "showInstance\x0a\x09^ self model showInstance",
  869. messageSends: ["showInstance", "model"],
  870. referencedClasses: []
  871. }),
  872. smalltalk.HLClassesListWidget);
  873. smalltalk.addMethod(
  874. "_showInstance_",
  875. smalltalk.method({
  876. selector: "showInstance:",
  877. category: 'actions',
  878. fn: function (aBoolean){
  879. var self=this;
  880. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._showInstance_(aBoolean);
  881. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean}, smalltalk.HLClassesListWidget)})},
  882. args: ["aBoolean"],
  883. source: "showInstance: aBoolean\x0a\x09self model showInstance: aBoolean",
  884. messageSends: ["showInstance:", "model"],
  885. referencedClasses: []
  886. }),
  887. smalltalk.HLClassesListWidget);
  888. smalltalk.addClass('HLMethodsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  889. smalltalk.addMethod(
  890. "_allProtocol",
  891. smalltalk.method({
  892. selector: "allProtocol",
  893. category: 'accessing',
  894. fn: function (){
  895. var self=this;
  896. return smalltalk.withContext(function($ctx1) { var $1;
  897. $1=_st(_st(self)._model())._allProtocol();
  898. return $1;
  899. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLMethodsListWidget)})},
  900. args: [],
  901. source: "allProtocol\x0a\x09^ self model allProtocol",
  902. messageSends: ["allProtocol", "model"],
  903. referencedClasses: []
  904. }),
  905. smalltalk.HLMethodsListWidget);
  906. smalltalk.addMethod(
  907. "_flushSelectorsCache",
  908. smalltalk.method({
  909. selector: "flushSelectorsCache",
  910. category: 'cache',
  911. fn: function (){
  912. var self=this;
  913. return smalltalk.withContext(function($ctx1) { self["@selectorsCache"]=_st((smalltalk.Dictionary || Dictionary))._new();
  914. return self}, function($ctx1) {$ctx1.fill(self,"flushSelectorsCache",{}, smalltalk.HLMethodsListWidget)})},
  915. args: [],
  916. source: "flushSelectorsCache\x0a\x09selectorsCache := Dictionary new",
  917. messageSends: ["new"],
  918. referencedClasses: ["Dictionary"]
  919. }),
  920. smalltalk.HLMethodsListWidget);
  921. smalltalk.addMethod(
  922. "_iconForItem_",
  923. smalltalk.method({
  924. selector: "iconForItem:",
  925. category: 'accessing',
  926. fn: function (aSelector){
  927. var self=this;
  928. var override,overriden,method;
  929. return smalltalk.withContext(function($ctx1) { var $2,$3,$4,$1;
  930. method=_st(self)._methodForSelector_(aSelector);
  931. override=_st(self)._isOverride_(method);
  932. overriden=_st(self)._isOverridden_(method);
  933. $2=override;
  934. if(smalltalk.assert($2)){
  935. $3=overriden;
  936. if(smalltalk.assert($3)){
  937. $1="icon-resize-vertical";
  938. } else {
  939. $1="icon-arrow-up";
  940. };
  941. } else {
  942. $4=overriden;
  943. if(smalltalk.assert($4)){
  944. $1="icon-arrow-down";
  945. } else {
  946. $1="icon-none";
  947. };
  948. };
  949. return $1;
  950. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{aSelector:aSelector,override:override,overriden:overriden,method:method}, smalltalk.HLMethodsListWidget)})},
  951. args: ["aSelector"],
  952. 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' ] ]",
  953. messageSends: ["methodForSelector:", "isOverride:", "isOverridden:", "ifTrue:ifFalse:"],
  954. referencedClasses: []
  955. }),
  956. smalltalk.HLMethodsListWidget);
  957. smalltalk.addMethod(
  958. "_initialize",
  959. smalltalk.method({
  960. selector: "initialize",
  961. category: 'initialization',
  962. fn: function (){
  963. var self=this;
  964. return smalltalk.withContext(function($ctx1) { smalltalk.HLBrowserListWidget.fn.prototype._initialize.apply(_st(self), []);
  965. _st(self)._flushSelectorsCache();
  966. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLMethodsListWidget)})},
  967. args: [],
  968. source: "initialize\x0a\x09super initialize.\x0a self flushSelectorsCache",
  969. messageSends: ["initialize", "flushSelectorsCache"],
  970. referencedClasses: []
  971. }),
  972. smalltalk.HLMethodsListWidget);
  973. smalltalk.addMethod(
  974. "_isOverridden_",
  975. smalltalk.method({
  976. selector: "isOverridden:",
  977. category: 'testing',
  978. fn: function (aMethod){
  979. var self=this;
  980. return smalltalk.withContext(function($ctx1) { var $1;
  981. $1=_st(_st(self)._selectorsCache())._isOverridden_(aMethod);
  982. return $1;
  983. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  984. args: ["aMethod"],
  985. source: "isOverridden: aMethod\x0a ^ self selectorsCache isOverridden: aMethod",
  986. messageSends: ["isOverridden:", "selectorsCache"],
  987. referencedClasses: []
  988. }),
  989. smalltalk.HLMethodsListWidget);
  990. smalltalk.addMethod(
  991. "_isOverride_",
  992. smalltalk.method({
  993. selector: "isOverride:",
  994. category: 'testing',
  995. fn: function (aMethod){
  996. var self=this;
  997. return smalltalk.withContext(function($ctx1) { var $1;
  998. $1=_st(_st(self)._selectorsCache())._isOverride_(aMethod);
  999. return $1;
  1000. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  1001. args: ["aMethod"],
  1002. source: "isOverride: aMethod\x0a ^ self selectorsCache isOverride: aMethod",
  1003. messageSends: ["isOverride:", "selectorsCache"],
  1004. referencedClasses: []
  1005. }),
  1006. smalltalk.HLMethodsListWidget);
  1007. smalltalk.addMethod(
  1008. "_methodForSelector_",
  1009. smalltalk.method({
  1010. selector: "methodForSelector:",
  1011. category: 'accessing',
  1012. fn: function (aSelector){
  1013. var self=this;
  1014. return smalltalk.withContext(function($ctx1) { var $1;
  1015. $1=_st(_st(_st(_st(self)._model())._selectedClass())._methodDictionary())._at_(aSelector);
  1016. return $1;
  1017. }, function($ctx1) {$ctx1.fill(self,"methodForSelector:",{aSelector:aSelector}, smalltalk.HLMethodsListWidget)})},
  1018. args: ["aSelector"],
  1019. source: "methodForSelector: aSelector\x0a\x09^ self model selectedClass\x0a \x09methodDictionary at: aSelector",
  1020. messageSends: ["at:", "methodDictionary", "selectedClass", "model"],
  1021. referencedClasses: []
  1022. }),
  1023. smalltalk.HLMethodsListWidget);
  1024. smalltalk.addMethod(
  1025. "_methodsInProtocol_",
  1026. smalltalk.method({
  1027. selector: "methodsInProtocol:",
  1028. category: 'accessing',
  1029. fn: function (aString){
  1030. var self=this;
  1031. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1032. $2=_st(aString).__eq(_st(self)._allProtocol());
  1033. if(smalltalk.assert($2)){
  1034. $1=_st(_st(_st(self)._model())._selectedClass())._methods();
  1035. } else {
  1036. $1=_st(_st(_st(self)._model())._selectedClass())._methodsInProtocol_(aString);
  1037. };
  1038. return $1;
  1039. }, function($ctx1) {$ctx1.fill(self,"methodsInProtocol:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  1040. args: ["aString"],
  1041. source: "methodsInProtocol: aString\x0a\x09^ aString = self allProtocol\x0a \x09ifTrue: [ self model selectedClass methods ]\x0a \x09ifFalse: [ self model selectedClass methodsInProtocol: aString ]",
  1042. messageSends: ["ifTrue:ifFalse:", "methods", "selectedClass", "model", "methodsInProtocol:", "=", "allProtocol"],
  1043. referencedClasses: []
  1044. }),
  1045. smalltalk.HLMethodsListWidget);
  1046. smalltalk.addMethod(
  1047. "_observeModel",
  1048. smalltalk.method({
  1049. selector: "observeModel",
  1050. category: 'actions',
  1051. fn: function (){
  1052. var self=this;
  1053. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  1054. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  1055. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1056. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  1057. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(nil);
  1058. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1059. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLMethodSelected || HLMethodSelected),(function(ann){
  1060. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodSelected_(_st(ann)._item());
  1061. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1062. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLMethodsListWidget)})},
  1063. args: [],
  1064. source: "observeModel\x0a\x09self model announcer on: HLProtocolSelected do: [ :ann |\x0a \x09self onProtocolSelected: ann item ].\x0a self model announcer on: HLShowInstanceToggled do: [ :ann |\x0a \x09self onProtocolSelected: nil ].\x0a self model announcer on: HLMethodSelected do: [ :ann |\x0a \x09self onMethodSelected: ann item ]",
  1065. messageSends: ["on:do:", "onProtocolSelected:", "item", "announcer", "model", "onMethodSelected:"],
  1066. referencedClasses: ["HLProtocolSelected", "HLShowInstanceToggled", "HLMethodSelected"]
  1067. }),
  1068. smalltalk.HLMethodsListWidget);
  1069. smalltalk.addMethod(
  1070. "_observeSystem",
  1071. smalltalk.method({
  1072. selector: "observeSystem",
  1073. category: 'actions',
  1074. fn: function (){
  1075. var self=this;
  1076. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1077. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  1078. _st($1)._on_do_((smalltalk.MethodAdded || MethodAdded),(function(ann){
  1079. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodAdded_(_st(ann)._method());
  1080. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1081. $2=_st($1)._on_do_((smalltalk.MethodRemoved || MethodRemoved),(function(ann){
  1082. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodRemoved_(_st(ann)._method());
  1083. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1084. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLMethodsListWidget)})},
  1085. args: [],
  1086. source: "observeSystem\x0a\x09SystemAnnouncer current \x0a \x09on: MethodAdded \x0a do: [ :ann | self onMethodAdded: ann method ];\x0a on: MethodRemoved \x0a do: [ :ann | self onMethodRemoved: ann method ]",
  1087. messageSends: ["on:do:", "onMethodAdded:", "method", "current", "onMethodRemoved:"],
  1088. referencedClasses: ["MethodAdded", "SystemAnnouncer", "MethodRemoved"]
  1089. }),
  1090. smalltalk.HLMethodsListWidget);
  1091. smalltalk.addMethod(
  1092. "_onMethodAdded_",
  1093. smalltalk.method({
  1094. selector: "onMethodAdded:",
  1095. category: 'reactions',
  1096. fn: function (aMethod){
  1097. var self=this;
  1098. return smalltalk.withContext(function($ctx1) { var $1;
  1099. var $early={};
  1100. try {
  1101. _st(_st(self)._items())._detect_ifNone_((function(each){
  1102. return smalltalk.withContext(function($ctx2) { return _st(each).__eq(_st(aMethod)._selector());
  1103. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  1104. return smalltalk.withContext(function($ctx2) { $1=self;
  1105. throw $early=[$1];
  1106. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1107. _st(self)._refresh();
  1108. return self}
  1109. catch(e) {if(e===$early)return e[0]; throw e}
  1110. }, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  1111. args: ["aMethod"],
  1112. source: "onMethodAdded: aMethod\x0a\x09self items detect: [ :each | each = aMethod selector ] ifNone: [ ^ self ].\x0a \x0a self refresh",
  1113. messageSends: ["detect:ifNone:", "=", "selector", "items", "refresh"],
  1114. referencedClasses: []
  1115. }),
  1116. smalltalk.HLMethodsListWidget);
  1117. smalltalk.addMethod(
  1118. "_onMethodRemoved_",
  1119. smalltalk.method({
  1120. selector: "onMethodRemoved:",
  1121. category: 'reactions',
  1122. fn: function (aMethod){
  1123. var self=this;
  1124. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1125. var $early={};
  1126. try {
  1127. _st(_st(self)._items())._detect_ifNone_((function(each){
  1128. return smalltalk.withContext(function($ctx2) { return _st(each).__eq(_st(aMethod)._selector());
  1129. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  1130. return smalltalk.withContext(function($ctx2) { $1=self;
  1131. throw $early=[$1];
  1132. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1133. $2=_st(_st(_st(aMethod)._methodClass()).__eq(_st(_st(self)._model())._selectedClass()))._and_((function(){
  1134. return smalltalk.withContext(function($ctx2) { return _st(_st(aMethod)._selector()).__eq(_st(self)._selectedItem());
  1135. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1136. if(smalltalk.assert($2)){
  1137. _st(self)._selectItem_(nil);
  1138. };
  1139. _st(self)._refresh();
  1140. return self}
  1141. catch(e) {if(e===$early)return e[0]; throw e}
  1142. }, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  1143. args: ["aMethod"],
  1144. source: "onMethodRemoved: aMethod\x0a\x09self items detect: [ :each | each = aMethod selector ] ifNone: [ ^ self ].\x0a \x0a (aMethod methodClass = self model selectedClass and: [ aMethod selector = self selectedItem ])\x0a \x09\x09ifTrue: [ self selectItem: nil ].\x0a \x0a self refresh",
  1145. messageSends: ["detect:ifNone:", "=", "selector", "items", "ifTrue:", "selectItem:", "and:", "selectedItem", "selectedClass", "model", "methodClass", "refresh"],
  1146. referencedClasses: []
  1147. }),
  1148. smalltalk.HLMethodsListWidget);
  1149. smalltalk.addMethod(
  1150. "_onMethodSelected_",
  1151. smalltalk.method({
  1152. selector: "onMethodSelected:",
  1153. category: 'reactions',
  1154. fn: function (aMethod){
  1155. var self=this;
  1156. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1157. _st(self)._selectedItem_(aMethod);
  1158. $1=aMethod;
  1159. if(($receiver = $1) == nil || $receiver == undefined){
  1160. $2=self;
  1161. return $2;
  1162. } else {
  1163. $1;
  1164. };
  1165. _st(self)._focus();
  1166. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  1167. args: ["aMethod"],
  1168. source: "onMethodSelected: aMethod\x0a\x09self selectedItem: aMethod.\x0a\x09aMethod ifNil: [ ^ self ].\x0a \x0a self focus",
  1169. messageSends: ["selectedItem:", "ifNil:", "focus"],
  1170. referencedClasses: []
  1171. }),
  1172. smalltalk.HLMethodsListWidget);
  1173. smalltalk.addMethod(
  1174. "_onProtocolSelected_",
  1175. smalltalk.method({
  1176. selector: "onProtocolSelected:",
  1177. category: 'reactions',
  1178. fn: function (aString){
  1179. var self=this;
  1180. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  1181. _st(self)._selectedItem_(nil);
  1182. $1=self;
  1183. $3=_st(_st(self)._model())._selectedClass();
  1184. if(($receiver = $3) == nil || $receiver == undefined){
  1185. $2=[];
  1186. } else {
  1187. $4=aString;
  1188. if(($receiver = $4) == nil || $receiver == undefined){
  1189. $2=[];
  1190. } else {
  1191. $2=_st(self)._selectorsInProtocol_(aString);
  1192. };
  1193. };
  1194. _st($1)._items_($2);
  1195. _st(self)._refresh();
  1196. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  1197. args: ["aString"],
  1198. source: "onProtocolSelected: aString\x0a self selectedItem: nil.\x0a \x0a self items: (self model selectedClass \x0a \x09ifNil: [ #() ]\x0a \x09ifNotNil: [ aString\x0a \x09\x09ifNil: [ #() ]\x0a \x09\x09ifNotNil: [ self selectorsInProtocol: aString ] ]).\x0a \x0a self refresh",
  1199. messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "selectorsInProtocol:", "selectedClass", "model", "refresh"],
  1200. referencedClasses: []
  1201. }),
  1202. smalltalk.HLMethodsListWidget);
  1203. smalltalk.addMethod(
  1204. "_overrideSelectors",
  1205. smalltalk.method({
  1206. selector: "overrideSelectors",
  1207. category: 'accessing',
  1208. fn: function (){
  1209. var self=this;
  1210. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1211. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("override",(function(){
  1212. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(_st(self)._model())._selectedClass())._allSuperclasses())._inject_into_(_st((smalltalk.Set || Set))._new(),(function(acc,each){
  1213. return smalltalk.withContext(function($ctx3) { $2=acc;
  1214. _st($2)._addAll_(_st(each)._selectors());
  1215. $3=_st($2)._yourself();
  1216. return $3;
  1217. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  1218. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1219. return $1;
  1220. }, function($ctx1) {$ctx1.fill(self,"overrideSelectors",{}, smalltalk.HLMethodsListWidget)})},
  1221. args: [],
  1222. 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 ] ]",
  1223. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSuperclasses", "selectedClass", "model", "selectorsCache"],
  1224. referencedClasses: ["Set"]
  1225. }),
  1226. smalltalk.HLMethodsListWidget);
  1227. smalltalk.addMethod(
  1228. "_overridenSelectors",
  1229. smalltalk.method({
  1230. selector: "overridenSelectors",
  1231. category: 'accessing',
  1232. fn: function (){
  1233. var self=this;
  1234. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1235. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("overriden",(function(){
  1236. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(_st(self)._model())._selectedClass())._allSubclasses())._inject_into_(_st((smalltalk.Set || Set))._new(),(function(acc,each){
  1237. return smalltalk.withContext(function($ctx3) { $2=acc;
  1238. _st($2)._addAll_(_st(each)._selectors());
  1239. $3=_st($2)._yourself();
  1240. return $3;
  1241. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  1242. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1243. return $1;
  1244. }, function($ctx1) {$ctx1.fill(self,"overridenSelectors",{}, smalltalk.HLMethodsListWidget)})},
  1245. args: [],
  1246. 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 ] ]",
  1247. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSubclasses", "selectedClass", "model", "selectorsCache"],
  1248. referencedClasses: ["Set"]
  1249. }),
  1250. smalltalk.HLMethodsListWidget);
  1251. smalltalk.addMethod(
  1252. "_renderContentOn_",
  1253. smalltalk.method({
  1254. selector: "renderContentOn:",
  1255. category: 'rendering',
  1256. fn: function (html){
  1257. var self=this;
  1258. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1259. $1=_st(_st(self)._model())._showInstance();
  1260. if(smalltalk.assert($1)){
  1261. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1262. } else {
  1263. $2=_st(html)._div();
  1264. _st($2)._class_("class_side");
  1265. $3=_st($2)._with_((function(){
  1266. return smalltalk.withContext(function($ctx2) { return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1267. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1268. $3;
  1269. };
  1270. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLMethodsListWidget)})},
  1271. args: ["html"],
  1272. 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 ]",
  1273. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"],
  1274. referencedClasses: []
  1275. }),
  1276. smalltalk.HLMethodsListWidget);
  1277. smalltalk.addMethod(
  1278. "_renderItemLabel_on_",
  1279. smalltalk.method({
  1280. selector: "renderItemLabel:on:",
  1281. category: 'rendering',
  1282. fn: function (aSelector,html){
  1283. var self=this;
  1284. return smalltalk.withContext(function($ctx1) { _st(html)._with_(aSelector);
  1285. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aSelector:aSelector,html:html}, smalltalk.HLMethodsListWidget)})},
  1286. args: ["aSelector", "html"],
  1287. source: "renderItemLabel: aSelector on: html\x0a\x09html with: aSelector",
  1288. messageSends: ["with:"],
  1289. referencedClasses: []
  1290. }),
  1291. smalltalk.HLMethodsListWidget);
  1292. smalltalk.addMethod(
  1293. "_selectItem_",
  1294. smalltalk.method({
  1295. selector: "selectItem:",
  1296. category: 'actions',
  1297. fn: function (aSelector){
  1298. var self=this;
  1299. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedMethod_(_st(self)._methodForSelector_(aSelector));
  1300. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aSelector:aSelector}, smalltalk.HLMethodsListWidget)})},
  1301. args: ["aSelector"],
  1302. source: "selectItem: aSelector\x0a \x09self model selectedMethod: (self methodForSelector: aSelector)\x0a ",
  1303. messageSends: ["selectedMethod:", "methodForSelector:", "model"],
  1304. referencedClasses: []
  1305. }),
  1306. smalltalk.HLMethodsListWidget);
  1307. smalltalk.addMethod(
  1308. "_selectorsCache",
  1309. smalltalk.method({
  1310. selector: "selectorsCache",
  1311. category: 'accessing',
  1312. fn: function (){
  1313. var self=this;
  1314. return smalltalk.withContext(function($ctx1) { var $1;
  1315. $1=_st(_st(self)._class())._selectorsCache();
  1316. return $1;
  1317. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLMethodsListWidget)})},
  1318. args: [],
  1319. source: "selectorsCache\x0a\x09^ self class selectorsCache",
  1320. messageSends: ["selectorsCache", "class"],
  1321. referencedClasses: []
  1322. }),
  1323. smalltalk.HLMethodsListWidget);
  1324. smalltalk.addMethod(
  1325. "_selectorsInProtocol_",
  1326. smalltalk.method({
  1327. selector: "selectorsInProtocol:",
  1328. category: 'accessing',
  1329. fn: function (aString){
  1330. var self=this;
  1331. return smalltalk.withContext(function($ctx1) { var $1;
  1332. $1=_st(_st(self)._methodsInProtocol_(aString))._collect_((function(each){
  1333. return smalltalk.withContext(function($ctx2) { return _st(each)._selector();
  1334. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1335. return $1;
  1336. }, function($ctx1) {$ctx1.fill(self,"selectorsInProtocol:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  1337. args: ["aString"],
  1338. source: "selectorsInProtocol: aString\x0a\x09^ (self methodsInProtocol: aString)\x0a \x09collect: [ :each | each selector ]",
  1339. messageSends: ["collect:", "selector", "methodsInProtocol:"],
  1340. referencedClasses: []
  1341. }),
  1342. smalltalk.HLMethodsListWidget);
  1343. smalltalk.HLMethodsListWidget.klass.iVarNames = ['selectorsCache'];
  1344. smalltalk.addMethod(
  1345. "_selectorsCache",
  1346. smalltalk.method({
  1347. selector: "selectorsCache",
  1348. category: 'accessing',
  1349. fn: function (){
  1350. var self=this;
  1351. return smalltalk.withContext(function($ctx1) { var $1;
  1352. $1=_st((smalltalk.HLSelectorsCache || HLSelectorsCache))._current();
  1353. return $1;
  1354. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLMethodsListWidget.klass)})},
  1355. args: [],
  1356. source: "selectorsCache\x0a\x09^ HLSelectorsCache current",
  1357. messageSends: ["current"],
  1358. referencedClasses: ["HLSelectorsCache"]
  1359. }),
  1360. smalltalk.HLMethodsListWidget.klass);
  1361. smalltalk.addClass('HLPackagesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1362. smalltalk.addMethod(
  1363. "_focusClassesListWidget",
  1364. smalltalk.method({
  1365. selector: "focusClassesListWidget",
  1366. category: 'actions',
  1367. fn: function (){
  1368. var self=this;
  1369. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._announce_(_st((smalltalk.HLClassesListFocus || HLClassesListFocus))._new());
  1370. return self}, function($ctx1) {$ctx1.fill(self,"focusClassesListWidget",{}, smalltalk.HLPackagesListWidget)})},
  1371. args: [],
  1372. source: "focusClassesListWidget\x0a\x09self model announcer announce: HLClassesListFocus new",
  1373. messageSends: ["announce:", "new", "announcer", "model"],
  1374. referencedClasses: ["HLClassesListFocus"]
  1375. }),
  1376. smalltalk.HLPackagesListWidget);
  1377. smalltalk.addMethod(
  1378. "_initializeItems",
  1379. smalltalk.method({
  1380. selector: "initializeItems",
  1381. category: 'accessing',
  1382. fn: function (){
  1383. var self=this;
  1384. return smalltalk.withContext(function($ctx1) { var $1;
  1385. self["@items"]=_st(_st(_st(self)._model())._packages())._sort_((function(a,b){
  1386. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._name()).__lt(_st(b)._name());
  1387. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  1388. $1=self["@items"];
  1389. return $1;
  1390. }, function($ctx1) {$ctx1.fill(self,"initializeItems",{}, smalltalk.HLPackagesListWidget)})},
  1391. args: [],
  1392. source: "initializeItems\x0a\x09^ items := self model packages sort:[:a :b|\x0a\x09\x09\x09\x09\x09\x09a name < b name]",
  1393. messageSends: ["sort:", "<", "name", "packages", "model"],
  1394. referencedClasses: []
  1395. }),
  1396. smalltalk.HLPackagesListWidget);
  1397. smalltalk.addMethod(
  1398. "_items",
  1399. smalltalk.method({
  1400. selector: "items",
  1401. category: 'accessing',
  1402. fn: function (){
  1403. var self=this;
  1404. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1405. $2=self["@items"];
  1406. if(($receiver = $2) == nil || $receiver == undefined){
  1407. $1=_st(self)._initializeItems();
  1408. } else {
  1409. $1=$2;
  1410. };
  1411. return $1;
  1412. }, function($ctx1) {$ctx1.fill(self,"items",{}, smalltalk.HLPackagesListWidget)})},
  1413. args: [],
  1414. source: "items\x0a\x09^ items ifNil: [self initializeItems]",
  1415. messageSends: ["ifNil:", "initializeItems"],
  1416. referencedClasses: []
  1417. }),
  1418. smalltalk.HLPackagesListWidget);
  1419. smalltalk.addMethod(
  1420. "_observeModel",
  1421. smalltalk.method({
  1422. selector: "observeModel",
  1423. category: 'actions',
  1424. fn: function (){
  1425. var self=this;
  1426. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLPackageSelected || HLPackageSelected),(function(ann){
  1427. return smalltalk.withContext(function($ctx2) { return _st(self)._onPackageSelected_(_st(ann)._item());
  1428. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1429. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLPackagesListWidget)})},
  1430. args: [],
  1431. source: "observeModel\x0a self model announcer on: HLPackageSelected do: [ :ann |\x0a \x09self onPackageSelected: ann item ]",
  1432. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model"],
  1433. referencedClasses: ["HLPackageSelected"]
  1434. }),
  1435. smalltalk.HLPackagesListWidget);
  1436. smalltalk.addMethod(
  1437. "_onPackageSelected_",
  1438. smalltalk.method({
  1439. selector: "onPackageSelected:",
  1440. category: 'reactions',
  1441. fn: function (aPackage){
  1442. var self=this;
  1443. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(aPackage);
  1444. _st(self)._focus();
  1445. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{aPackage:aPackage}, smalltalk.HLPackagesListWidget)})},
  1446. args: ["aPackage"],
  1447. source: "onPackageSelected: aPackage\x0a\x09self selectedItem: aPackage.\x0a\x09self focus",
  1448. messageSends: ["selectedItem:", "focus"],
  1449. referencedClasses: []
  1450. }),
  1451. smalltalk.HLPackagesListWidget);
  1452. smalltalk.addMethod(
  1453. "_renderButtonsOn_",
  1454. smalltalk.method({
  1455. selector: "renderButtonsOn:",
  1456. category: 'rendering',
  1457. fn: function (html){
  1458. var self=this;
  1459. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$5,$6,$7,$8,$4,$9,$10;
  1460. $1=_st(html)._span();
  1461. _st($1)._class_("info");
  1462. $2=_st($1)._with_("Auto commit");
  1463. $3=_st(html)._div();
  1464. _st($3)._class_("btn-group switch");
  1465. _st($3)._at_put_("data-toggle","buttons-radio");
  1466. $4=_st($3)._with_((function(){
  1467. return smalltalk.withContext(function($ctx2) { $5=_st(html)._button();
  1468. _st($5)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  1469. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("btn");
  1470. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1471. $6=_st($5)._with_("On");
  1472. $6;
  1473. $7=_st(html)._button();
  1474. _st($7)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  1475. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("btn active");
  1476. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1477. $8=_st($7)._with_("Off");
  1478. return $8;
  1479. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1480. $9=_st(html)._a();
  1481. _st($9)._class_("btn");
  1482. $10=_st($9)._with_("Commit");
  1483. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.HLPackagesListWidget)})},
  1484. args: ["html"],
  1485. source: "renderButtonsOn: html\x0a\x0a\x09html span class: 'info'; with: 'Auto commit'.\x0a\x09html div \x0a class: 'btn-group switch';\x0a\x09\x09at: 'data-toggle' put: 'buttons-radio';\x0a\x09\x09with: [ \x0a \x09html button \x0a class: (String streamContents: [ :str |\x0a \x09str nextPutAll: 'btn' ]);\x0a \x09\x09\x09\x09with: 'On'.\x0a \x09\x09\x09html button\x0a \x09\x09\x09\x09class: (String streamContents: [ :str |\x0a \x09str nextPutAll: 'btn active' ]);\x0a \x09\x09\x09\x09with: 'Off' ].\x0a \x0a html a \x0a \x09class: 'btn';\x0a\x09\x09\x09with: 'Commit'.",
  1486. messageSends: ["class:", "span", "with:", "div", "at:put:", "streamContents:", "nextPutAll:", "button", "a"],
  1487. referencedClasses: ["String"]
  1488. }),
  1489. smalltalk.HLPackagesListWidget);
  1490. smalltalk.addMethod(
  1491. "_selectItem_",
  1492. smalltalk.method({
  1493. selector: "selectItem:",
  1494. category: 'actions',
  1495. fn: function (aPackage){
  1496. var self=this;
  1497. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedPackage_(aPackage);
  1498. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aPackage:aPackage}, smalltalk.HLPackagesListWidget)})},
  1499. args: ["aPackage"],
  1500. source: "selectItem: aPackage\x0a\x09self model selectedPackage: aPackage",
  1501. messageSends: ["selectedPackage:", "model"],
  1502. referencedClasses: []
  1503. }),
  1504. smalltalk.HLPackagesListWidget);
  1505. smalltalk.addClass('HLProtocolsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1506. smalltalk.addMethod(
  1507. "_allProtocol",
  1508. smalltalk.method({
  1509. selector: "allProtocol",
  1510. category: 'accessing',
  1511. fn: function (){
  1512. var self=this;
  1513. return smalltalk.withContext(function($ctx1) { var $1;
  1514. $1=_st(_st(self)._model())._allProtocol();
  1515. return $1;
  1516. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLProtocolsListWidget)})},
  1517. args: [],
  1518. source: "allProtocol\x0a\x09^ self model allProtocol",
  1519. messageSends: ["allProtocol", "model"],
  1520. referencedClasses: []
  1521. }),
  1522. smalltalk.HLProtocolsListWidget);
  1523. smalltalk.addMethod(
  1524. "_observeModel",
  1525. smalltalk.method({
  1526. selector: "observeModel",
  1527. category: 'actions',
  1528. fn: function (){
  1529. var self=this;
  1530. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  1531. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  1532. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1533. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  1534. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(_st(self)._model())._selectedClass());
  1535. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1536. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  1537. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  1538. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1539. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLProtocolsListWidget)})},
  1540. args: [],
  1541. source: "observeModel\x0a self model announcer on: HLClassSelected do: [ :ann |\x0a \x09self onClassSelected: ann item ].\x0a self model announcer on: HLShowInstanceToggled do: [ :ann |\x0a \x09self onClassSelected: self model selectedClass ].\x0a self model announcer on: HLProtocolSelected do: [ :ann |\x0a \x09self onProtocolSelected: ann item ]",
  1542. messageSends: ["on:do:", "onClassSelected:", "item", "announcer", "model", "selectedClass", "onProtocolSelected:"],
  1543. referencedClasses: ["HLClassSelected", "HLShowInstanceToggled", "HLProtocolSelected"]
  1544. }),
  1545. smalltalk.HLProtocolsListWidget);
  1546. smalltalk.addMethod(
  1547. "_onClassSelected_",
  1548. smalltalk.method({
  1549. selector: "onClassSelected:",
  1550. category: 'reactions',
  1551. fn: function (aClass){
  1552. var self=this;
  1553. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$2;
  1554. _st(self)._selectedItem_(nil);
  1555. $1=self;
  1556. $3=aClass;
  1557. if(($receiver = $3) == nil || $receiver == undefined){
  1558. $2=_st((smalltalk.Array || Array))._with_(_st(self)._allProtocol());
  1559. } else {
  1560. $4=_st((smalltalk.Array || Array))._with_(_st(self)._allProtocol());
  1561. _st($4)._addAll_(_st(aClass)._protocols());
  1562. $5=_st($4)._yourself();
  1563. $2=$5;
  1564. };
  1565. _st($1)._items_($2);
  1566. _st(self)._refresh();
  1567. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLProtocolsListWidget)})},
  1568. args: ["aClass"],
  1569. source: "onClassSelected: aClass\x0a self selectedItem: nil.\x0a \x0a self items: (aClass\x0a \x09ifNil: [ Array with: self allProtocol ]\x0a \x09ifNotNil: [ \x0a \x09(Array with: self allProtocol) \x0a \x09addAll: aClass protocols; \x0a yourself ]).\x0a\x0a self refresh",
  1570. messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself", "refresh"],
  1571. referencedClasses: ["Array"]
  1572. }),
  1573. smalltalk.HLProtocolsListWidget);
  1574. smalltalk.addMethod(
  1575. "_onProtocolSelected_",
  1576. smalltalk.method({
  1577. selector: "onProtocolSelected:",
  1578. category: 'reactions',
  1579. fn: function (aString){
  1580. var self=this;
  1581. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1582. _st(self)._selectedItem_(aString);
  1583. $1=aString;
  1584. if(($receiver = $1) == nil || $receiver == undefined){
  1585. $2=self;
  1586. return $2;
  1587. } else {
  1588. $1;
  1589. };
  1590. _st(self)._focus();
  1591. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLProtocolsListWidget)})},
  1592. args: ["aString"],
  1593. source: "onProtocolSelected: aString\x0a\x09self selectedItem: aString.\x0a\x09aString ifNil: [ ^ self ].\x0a \x0a self focus",
  1594. messageSends: ["selectedItem:", "ifNil:", "focus"],
  1595. referencedClasses: []
  1596. }),
  1597. smalltalk.HLProtocolsListWidget);
  1598. smalltalk.addMethod(
  1599. "_renderContentOn_",
  1600. smalltalk.method({
  1601. selector: "renderContentOn:",
  1602. category: 'rendering',
  1603. fn: function (html){
  1604. var self=this;
  1605. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1606. $1=_st(_st(self)._model())._showInstance();
  1607. if(smalltalk.assert($1)){
  1608. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1609. } else {
  1610. $2=_st(html)._div();
  1611. _st($2)._class_("class_side");
  1612. $3=_st($2)._with_((function(){
  1613. return smalltalk.withContext(function($ctx2) { return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1614. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1615. $3;
  1616. };
  1617. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLProtocolsListWidget)})},
  1618. args: ["html"],
  1619. 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 ]",
  1620. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"],
  1621. referencedClasses: []
  1622. }),
  1623. smalltalk.HLProtocolsListWidget);
  1624. smalltalk.addMethod(
  1625. "_selectItem_",
  1626. smalltalk.method({
  1627. selector: "selectItem:",
  1628. category: 'actions',
  1629. fn: function (aString){
  1630. var self=this;
  1631. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedProtocol_(aString);
  1632. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aString:aString}, smalltalk.HLProtocolsListWidget)})},
  1633. args: ["aString"],
  1634. source: "selectItem: aString\x0a self model selectedProtocol: aString",
  1635. messageSends: ["selectedProtocol:", "model"],
  1636. referencedClasses: []
  1637. }),
  1638. smalltalk.HLProtocolsListWidget);
  1639. smalltalk.addMethod(
  1640. "_selectedItem",
  1641. smalltalk.method({
  1642. selector: "selectedItem",
  1643. category: 'accessing',
  1644. fn: function (){
  1645. var self=this;
  1646. return smalltalk.withContext(function($ctx1) { var $1;
  1647. $1=smalltalk.HLBrowserListWidget.fn.prototype._selectedItem.apply(_st(self), []);
  1648. return $1;
  1649. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{}, smalltalk.HLProtocolsListWidget)})},
  1650. args: [],
  1651. source: "selectedItem\x0a\x09^ super selectedItem\x22 ifNil: [ self allProtocol ]\x22",
  1652. messageSends: ["selectedItem"],
  1653. referencedClasses: []
  1654. }),
  1655. smalltalk.HLProtocolsListWidget);
  1656. smalltalk.addClass('HLBrowserModel', smalltalk.Object, ['announcer', 'environment', 'selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedSelector', 'showInstance', 'showComment'], 'Helios-Browser');
  1657. smalltalk.addMethod(
  1658. "_allProtocol",
  1659. smalltalk.method({
  1660. selector: "allProtocol",
  1661. category: 'accessing',
  1662. fn: function (){
  1663. var self=this;
  1664. return smalltalk.withContext(function($ctx1) { return "-- All --";
  1665. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLBrowserModel)})},
  1666. args: [],
  1667. source: "allProtocol\x0a\x09^ '-- All --'",
  1668. messageSends: [],
  1669. referencedClasses: []
  1670. }),
  1671. smalltalk.HLBrowserModel);
  1672. smalltalk.addMethod(
  1673. "_announcer",
  1674. smalltalk.method({
  1675. selector: "announcer",
  1676. category: 'accessing',
  1677. fn: function (){
  1678. var self=this;
  1679. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1680. $2=self["@announcer"];
  1681. if(($receiver = $2) == nil || $receiver == undefined){
  1682. self["@announcer"]=_st((smalltalk.Announcer || Announcer))._new();
  1683. $1=self["@announcer"];
  1684. } else {
  1685. $1=$2;
  1686. };
  1687. return $1;
  1688. }, function($ctx1) {$ctx1.fill(self,"announcer",{}, smalltalk.HLBrowserModel)})},
  1689. args: [],
  1690. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  1691. messageSends: ["ifNil:", "new"],
  1692. referencedClasses: ["Announcer"]
  1693. }),
  1694. smalltalk.HLBrowserModel);
  1695. smalltalk.addMethod(
  1696. "_environment",
  1697. smalltalk.method({
  1698. selector: "environment",
  1699. category: 'accessing',
  1700. fn: function (){
  1701. var self=this;
  1702. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1703. $2=self["@environment"];
  1704. if(($receiver = $2) == nil || $receiver == undefined){
  1705. $1=_st(_st((smalltalk.HLManager || HLManager))._current())._environment();
  1706. } else {
  1707. $1=$2;
  1708. };
  1709. return $1;
  1710. }, function($ctx1) {$ctx1.fill(self,"environment",{}, smalltalk.HLBrowserModel)})},
  1711. args: [],
  1712. source: "environment\x0a\x09^ environment ifNil: [ HLManager current environment ]",
  1713. messageSends: ["ifNil:", "environment", "current"],
  1714. referencedClasses: ["HLManager"]
  1715. }),
  1716. smalltalk.HLBrowserModel);
  1717. smalltalk.addMethod(
  1718. "_environment_",
  1719. smalltalk.method({
  1720. selector: "environment:",
  1721. category: 'accessing',
  1722. fn: function (anEnvironment){
  1723. var self=this;
  1724. return smalltalk.withContext(function($ctx1) { self["@environment"]=anEnvironment;
  1725. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel)})},
  1726. args: ["anEnvironment"],
  1727. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  1728. messageSends: [],
  1729. referencedClasses: []
  1730. }),
  1731. smalltalk.HLBrowserModel);
  1732. smalltalk.addMethod(
  1733. "_packages",
  1734. smalltalk.method({
  1735. selector: "packages",
  1736. category: 'accessing',
  1737. fn: function (){
  1738. var self=this;
  1739. return smalltalk.withContext(function($ctx1) { var $1;
  1740. $1=_st(_st(self)._environment())._packages();
  1741. return $1;
  1742. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLBrowserModel)})},
  1743. args: [],
  1744. source: "packages\x0a\x09^ self environment packages",
  1745. messageSends: ["packages", "environment"],
  1746. referencedClasses: []
  1747. }),
  1748. smalltalk.HLBrowserModel);
  1749. smalltalk.addMethod(
  1750. "_selectedClass",
  1751. smalltalk.method({
  1752. selector: "selectedClass",
  1753. category: 'accessing',
  1754. fn: function (){
  1755. var self=this;
  1756. return smalltalk.withContext(function($ctx1) { var $1;
  1757. $1=self["@selectedClass"];
  1758. return $1;
  1759. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{}, smalltalk.HLBrowserModel)})},
  1760. args: [],
  1761. source: "selectedClass\x0a\x09^ selectedClass",
  1762. messageSends: [],
  1763. referencedClasses: []
  1764. }),
  1765. smalltalk.HLBrowserModel);
  1766. smalltalk.addMethod(
  1767. "_selectedClass_",
  1768. smalltalk.method({
  1769. selector: "selectedClass:",
  1770. category: 'accessing',
  1771. fn: function (aClass){
  1772. var self=this;
  1773. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  1774. $1=_st(self["@selectedClass"]).__eq(aClass);
  1775. if(smalltalk.assert($1)){
  1776. $2=self;
  1777. return $2;
  1778. };
  1779. $3=aClass;
  1780. if(($receiver = $3) == nil || $receiver == undefined){
  1781. self["@selectedClass"]=nil;
  1782. self["@selectedClass"];
  1783. } else {
  1784. $4=_st(self)._showInstance();
  1785. if(smalltalk.assert($4)){
  1786. self["@selectedClass"]=_st(aClass)._theNonMetaClass();
  1787. self["@selectedClass"];
  1788. } else {
  1789. self["@selectedClass"]=_st(aClass)._theMetaClass();
  1790. self["@selectedClass"];
  1791. };
  1792. };
  1793. _st(self)._selectedProtocol_(nil);
  1794. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLClassSelected || HLClassSelected))._on_(_st(self)._selectedClass()));
  1795. return self}, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass}, smalltalk.HLBrowserModel)})},
  1796. args: ["aClass"],
  1797. source: "selectedClass: aClass\x0a\x09selectedClass = aClass ifTrue: [ ^ self ].\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)",
  1798. messageSends: ["ifTrue:", "=", "ifNil:ifNotNil:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "showInstance", "selectedProtocol:", "announce:", "on:", "selectedClass", "announcer"],
  1799. referencedClasses: ["HLClassSelected"]
  1800. }),
  1801. smalltalk.HLBrowserModel);
  1802. smalltalk.addMethod(
  1803. "_selectedMethod",
  1804. smalltalk.method({
  1805. selector: "selectedMethod",
  1806. category: 'accessing',
  1807. fn: function (){
  1808. var self=this;
  1809. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1810. $2=_st(self)._selectedClass();
  1811. if(($receiver = $2) == nil || $receiver == undefined){
  1812. $1=$2;
  1813. } else {
  1814. $1=_st(_st(_st(self)._selectedClass())._methodDictionary())._at_(self["@selectedSelector"]);
  1815. };
  1816. return $1;
  1817. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{}, smalltalk.HLBrowserModel)})},
  1818. args: [],
  1819. source: "selectedMethod\x0a\x09^ self selectedClass\x0a \x09ifNotNil: [ self selectedClass methodDictionary at: selectedSelector ]",
  1820. messageSends: ["ifNotNil:", "at:", "methodDictionary", "selectedClass"],
  1821. referencedClasses: []
  1822. }),
  1823. smalltalk.HLBrowserModel);
  1824. smalltalk.addMethod(
  1825. "_selectedMethod_",
  1826. smalltalk.method({
  1827. selector: "selectedMethod:",
  1828. category: 'accessing',
  1829. fn: function (aCompiledMethod){
  1830. var self=this;
  1831. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  1832. $1=_st(self["@selectedSelector"]).__eq(aCompiledMethod);
  1833. if(smalltalk.assert($1)){
  1834. $2=self;
  1835. return $2;
  1836. };
  1837. $3=aCompiledMethod;
  1838. if(($receiver = $3) == nil || $receiver == undefined){
  1839. self["@selectedSelector"]=nil;
  1840. self["@selectedSelector"];
  1841. } else {
  1842. $4=_st(self["@selectedSelector"]).__eq(_st(aCompiledMethod)._selector());
  1843. if(smalltalk.assert($4)){
  1844. $5=self;
  1845. return $5;
  1846. };
  1847. self["@selectedSelector"]=_st(aCompiledMethod)._selector();
  1848. self["@selectedSelector"];
  1849. };
  1850. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLMethodSelected || HLMethodSelected))._on_(aCompiledMethod));
  1851. return self}, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserModel)})},
  1852. args: ["aCompiledMethod"],
  1853. 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)",
  1854. messageSends: ["ifTrue:", "=", "ifNil:ifNotNil:", "selector", "announce:", "on:", "announcer"],
  1855. referencedClasses: ["HLMethodSelected"]
  1856. }),
  1857. smalltalk.HLBrowserModel);
  1858. smalltalk.addMethod(
  1859. "_selectedPackage",
  1860. smalltalk.method({
  1861. selector: "selectedPackage",
  1862. category: 'accessing',
  1863. fn: function (){
  1864. var self=this;
  1865. return smalltalk.withContext(function($ctx1) { var $1;
  1866. $1=self["@selectedPackage"];
  1867. return $1;
  1868. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{}, smalltalk.HLBrowserModel)})},
  1869. args: [],
  1870. source: "selectedPackage\x0a\x09^ selectedPackage",
  1871. messageSends: [],
  1872. referencedClasses: []
  1873. }),
  1874. smalltalk.HLBrowserModel);
  1875. smalltalk.addMethod(
  1876. "_selectedPackage_",
  1877. smalltalk.method({
  1878. selector: "selectedPackage:",
  1879. category: 'accessing',
  1880. fn: function (aPackage){
  1881. var self=this;
  1882. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1883. $1=_st(self["@selectedPackage"]).__eq(aPackage);
  1884. if(smalltalk.assert($1)){
  1885. $2=self;
  1886. return $2;
  1887. };
  1888. self["@selectedPackage"]=aPackage;
  1889. _st(self)._selectedClass_(nil);
  1890. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLPackageSelected || HLPackageSelected))._on_(aPackage));
  1891. return self}, function($ctx1) {$ctx1.fill(self,"selectedPackage:",{aPackage:aPackage}, smalltalk.HLBrowserModel)})},
  1892. args: ["aPackage"],
  1893. source: "selectedPackage: aPackage\x0a\x09selectedPackage = aPackage ifTrue: [ ^ self ].\x0a \x0a\x09selectedPackage := aPackage.\x0a\x09self selectedClass: nil.\x0a self announcer announce: (HLPackageSelected on: aPackage)",
  1894. messageSends: ["ifTrue:", "=", "selectedClass:", "announce:", "on:", "announcer"],
  1895. referencedClasses: ["HLPackageSelected"]
  1896. }),
  1897. smalltalk.HLBrowserModel);
  1898. smalltalk.addMethod(
  1899. "_selectedProtocol",
  1900. smalltalk.method({
  1901. selector: "selectedProtocol",
  1902. category: 'accessing',
  1903. fn: function (){
  1904. var self=this;
  1905. return smalltalk.withContext(function($ctx1) { var $1;
  1906. $1=self["@selectedProtocol"];
  1907. return $1;
  1908. }, function($ctx1) {$ctx1.fill(self,"selectedProtocol",{}, smalltalk.HLBrowserModel)})},
  1909. args: [],
  1910. source: "selectedProtocol\x0a\x09^ selectedProtocol",
  1911. messageSends: [],
  1912. referencedClasses: []
  1913. }),
  1914. smalltalk.HLBrowserModel);
  1915. smalltalk.addMethod(
  1916. "_selectedProtocol_",
  1917. smalltalk.method({
  1918. selector: "selectedProtocol:",
  1919. category: 'accessing',
  1920. fn: function (aString){
  1921. var self=this;
  1922. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1923. $1=_st(self["@selectedProtocol"]).__eq(aString);
  1924. if(smalltalk.assert($1)){
  1925. $2=self;
  1926. return $2;
  1927. };
  1928. self["@selectedProtocol"]=aString;
  1929. _st(self)._selectedMethod_(nil);
  1930. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLProtocolSelected || HLProtocolSelected))._on_(aString));
  1931. return self}, function($ctx1) {$ctx1.fill(self,"selectedProtocol:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1932. args: ["aString"],
  1933. source: "selectedProtocol: aString\x0a\x09selectedProtocol = aString ifTrue: [ ^ self ].\x0a \x0a\x09selectedProtocol := aString.\x0a self selectedMethod: nil.\x0a self announcer announce: (HLProtocolSelected on: aString)",
  1934. messageSends: ["ifTrue:", "=", "selectedMethod:", "announce:", "on:", "announcer"],
  1935. referencedClasses: ["HLProtocolSelected"]
  1936. }),
  1937. smalltalk.HLBrowserModel);
  1938. smalltalk.addMethod(
  1939. "_showComment",
  1940. smalltalk.method({
  1941. selector: "showComment",
  1942. category: 'accessing',
  1943. fn: function (){
  1944. var self=this;
  1945. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1946. $2=self["@showComment"];
  1947. if(($receiver = $2) == nil || $receiver == undefined){
  1948. $1=false;
  1949. } else {
  1950. $1=$2;
  1951. };
  1952. return $1;
  1953. }, function($ctx1) {$ctx1.fill(self,"showComment",{}, smalltalk.HLBrowserModel)})},
  1954. args: [],
  1955. source: "showComment\x0a\x09^ showComment ifNil: [ false ]",
  1956. messageSends: ["ifNil:"],
  1957. referencedClasses: []
  1958. }),
  1959. smalltalk.HLBrowserModel);
  1960. smalltalk.addMethod(
  1961. "_showComment_",
  1962. smalltalk.method({
  1963. selector: "showComment:",
  1964. category: 'accessing',
  1965. fn: function (aBoolean){
  1966. var self=this;
  1967. return smalltalk.withContext(function($ctx1) { self["@showComment"]=aBoolean;
  1968. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowCommentToggled || HLShowCommentToggled))._new());
  1969. return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  1970. args: ["aBoolean"],
  1971. source: "showComment: aBoolean\x0a\x09showComment := aBoolean.\x0a \x0a self announcer announce: HLShowCommentToggled new",
  1972. messageSends: ["announce:", "new", "announcer"],
  1973. referencedClasses: ["HLShowCommentToggled"]
  1974. }),
  1975. smalltalk.HLBrowserModel);
  1976. smalltalk.addMethod(
  1977. "_showInstance",
  1978. smalltalk.method({
  1979. selector: "showInstance",
  1980. category: 'accessing',
  1981. fn: function (){
  1982. var self=this;
  1983. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1984. $2=self["@showInstance"];
  1985. if(($receiver = $2) == nil || $receiver == undefined){
  1986. $1=true;
  1987. } else {
  1988. $1=$2;
  1989. };
  1990. return $1;
  1991. }, function($ctx1) {$ctx1.fill(self,"showInstance",{}, smalltalk.HLBrowserModel)})},
  1992. args: [],
  1993. source: "showInstance\x0a\x09^ showInstance ifNil: [ true ]",
  1994. messageSends: ["ifNil:"],
  1995. referencedClasses: []
  1996. }),
  1997. smalltalk.HLBrowserModel);
  1998. smalltalk.addMethod(
  1999. "_showInstance_",
  2000. smalltalk.method({
  2001. selector: "showInstance:",
  2002. category: 'accessing',
  2003. fn: function (aBoolean){
  2004. var self=this;
  2005. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$3;
  2006. self["@showInstance"]=aBoolean;
  2007. $1=_st(self)._selectedClass();
  2008. if(($receiver = $1) == nil || $receiver == undefined){
  2009. $1;
  2010. } else {
  2011. $2=self;
  2012. $4=aBoolean;
  2013. if(smalltalk.assert($4)){
  2014. $3=_st(_st(self)._selectedClass())._theNonMetaClass();
  2015. } else {
  2016. $3=_st(_st(self)._selectedClass())._theMetaClass();
  2017. };
  2018. _st($2)._selectedClass_($3);
  2019. };
  2020. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled))._new());
  2021. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  2022. args: ["aBoolean"],
  2023. 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",
  2024. messageSends: ["ifNotNil:", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "selectedClass", "theMetaClass", "announce:", "new", "announcer"],
  2025. referencedClasses: ["HLShowInstanceToggled"]
  2026. }),
  2027. smalltalk.HLBrowserModel);
  2028. smalltalk.addMethod(
  2029. "_on_",
  2030. smalltalk.method({
  2031. selector: "on:",
  2032. category: 'actions',
  2033. fn: function (anEnvironment){
  2034. var self=this;
  2035. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2036. $2=_st(self)._new();
  2037. _st($2)._environment_(anEnvironment);
  2038. $3=_st($2)._yourself();
  2039. $1=$3;
  2040. return $1;
  2041. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel.klass)})},
  2042. args: ["anEnvironment"],
  2043. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  2044. messageSends: ["environment:", "new", "yourself"],
  2045. referencedClasses: []
  2046. }),
  2047. smalltalk.HLBrowserModel.klass);
  2048. smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'methodContents', 'codeWidget'], 'Helios-Browser');
  2049. smalltalk.addMethod(
  2050. "_codeWidget",
  2051. smalltalk.method({
  2052. selector: "codeWidget",
  2053. category: 'accessing',
  2054. fn: function (){
  2055. var self=this;
  2056. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2057. $2=self["@codeWidget"];
  2058. if(($receiver = $2) == nil || $receiver == undefined){
  2059. self["@codeWidget"]=_st((smalltalk.HLCodeWidget || HLCodeWidget))._new();
  2060. $1=self["@codeWidget"];
  2061. } else {
  2062. $1=$2;
  2063. };
  2064. return $1;
  2065. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{}, smalltalk.HLBrowserSourceWidget)})},
  2066. args: [],
  2067. source: "codeWidget\x0a\x09^ codeWidget ifNil: [ codeWidget := HLCodeWidget new ]",
  2068. messageSends: ["ifNil:", "new"],
  2069. referencedClasses: ["HLCodeWidget"]
  2070. }),
  2071. smalltalk.HLBrowserSourceWidget);
  2072. smalltalk.addMethod(
  2073. "_contents",
  2074. smalltalk.method({
  2075. selector: "contents",
  2076. category: 'accessing',
  2077. fn: function (){
  2078. var self=this;
  2079. return smalltalk.withContext(function($ctx1) { var $1;
  2080. $1=_st(_st(self)._codeWidget())._contents();
  2081. return $1;
  2082. }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.HLBrowserSourceWidget)})},
  2083. args: [],
  2084. source: "contents\x0a\x09^ self codeWidget contents",
  2085. messageSends: ["contents", "codeWidget"],
  2086. referencedClasses: []
  2087. }),
  2088. smalltalk.HLBrowserSourceWidget);
  2089. smalltalk.addMethod(
  2090. "_contents_",
  2091. smalltalk.method({
  2092. selector: "contents:",
  2093. category: 'accessing',
  2094. fn: function (aString){
  2095. var self=this;
  2096. return smalltalk.withContext(function($ctx1) { _st(self)._methodContents_(aString);
  2097. _st(_st(self)._codeWidget())._contents_(aString);
  2098. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2099. args: ["aString"],
  2100. source: "contents: aString\x0a\x09self methodContents: aString.\x0a\x09self codeWidget contents: aString",
  2101. messageSends: ["methodContents:", "contents:", "codeWidget"],
  2102. referencedClasses: []
  2103. }),
  2104. smalltalk.HLBrowserSourceWidget);
  2105. smalltalk.addMethod(
  2106. "_hasModification",
  2107. smalltalk.method({
  2108. selector: "hasModification",
  2109. category: 'testing',
  2110. fn: function (){
  2111. var self=this;
  2112. return smalltalk.withContext(function($ctx1) { var $1;
  2113. $1=_st(_st(_st(self)._methodContents()).__eq(_st(self)._contents()))._not();
  2114. return $1;
  2115. }, function($ctx1) {$ctx1.fill(self,"hasModification",{}, smalltalk.HLBrowserSourceWidget)})},
  2116. args: [],
  2117. source: "hasModification\x0a\x09^ (self methodContents = self contents) not",
  2118. messageSends: ["not", "=", "contents", "methodContents"],
  2119. referencedClasses: []
  2120. }),
  2121. smalltalk.HLBrowserSourceWidget);
  2122. smalltalk.addMethod(
  2123. "_initialize",
  2124. smalltalk.method({
  2125. selector: "initialize",
  2126. category: 'initialization',
  2127. fn: function (){
  2128. var self=this;
  2129. return smalltalk.withContext(function($ctx1) { smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  2130. _st(self)._observeSystem();
  2131. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLBrowserSourceWidget)})},
  2132. args: [],
  2133. source: "initialize\x0a\x09super initialize.\x0a \x0a self observeSystem",
  2134. messageSends: ["initialize", "observeSystem"],
  2135. referencedClasses: []
  2136. }),
  2137. smalltalk.HLBrowserSourceWidget);
  2138. smalltalk.addMethod(
  2139. "_methodContents",
  2140. smalltalk.method({
  2141. selector: "methodContents",
  2142. category: 'accessing',
  2143. fn: function (){
  2144. var self=this;
  2145. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2146. $2=self["@methodContents"];
  2147. if(($receiver = $2) == nil || $receiver == undefined){
  2148. self["@methodContents"]="";
  2149. $1=self["@methodContents"];
  2150. } else {
  2151. $1=$2;
  2152. };
  2153. return $1;
  2154. }, function($ctx1) {$ctx1.fill(self,"methodContents",{}, smalltalk.HLBrowserSourceWidget)})},
  2155. args: [],
  2156. source: "methodContents\x0a\x09^ methodContents ifNil: [ methodContents := '' ]",
  2157. messageSends: ["ifNil:"],
  2158. referencedClasses: []
  2159. }),
  2160. smalltalk.HLBrowserSourceWidget);
  2161. smalltalk.addMethod(
  2162. "_methodContents_",
  2163. smalltalk.method({
  2164. selector: "methodContents:",
  2165. category: 'accessing',
  2166. fn: function (aString){
  2167. var self=this;
  2168. return smalltalk.withContext(function($ctx1) { self["@methodContents"]=aString;
  2169. return self}, function($ctx1) {$ctx1.fill(self,"methodContents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2170. args: ["aString"],
  2171. source: "methodContents: aString\x0a\x09methodContents := aString",
  2172. messageSends: [],
  2173. referencedClasses: []
  2174. }),
  2175. smalltalk.HLBrowserSourceWidget);
  2176. smalltalk.addMethod(
  2177. "_model",
  2178. smalltalk.method({
  2179. selector: "model",
  2180. category: 'accessing',
  2181. fn: function (){
  2182. var self=this;
  2183. return smalltalk.withContext(function($ctx1) { var $1;
  2184. $1=self["@model"];
  2185. return $1;
  2186. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLBrowserSourceWidget)})},
  2187. args: [],
  2188. source: "model\x0a\x09^ model",
  2189. messageSends: [],
  2190. referencedClasses: []
  2191. }),
  2192. smalltalk.HLBrowserSourceWidget);
  2193. smalltalk.addMethod(
  2194. "_model_",
  2195. smalltalk.method({
  2196. selector: "model:",
  2197. category: 'accessing',
  2198. fn: function (aBrowserModel){
  2199. var self=this;
  2200. return smalltalk.withContext(function($ctx1) { self["@model"]=aBrowserModel;
  2201. _st(self)._observeModel();
  2202. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget)})},
  2203. args: ["aBrowserModel"],
  2204. source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a \x0a self observeModel",
  2205. messageSends: ["observeModel"],
  2206. referencedClasses: []
  2207. }),
  2208. smalltalk.HLBrowserSourceWidget);
  2209. smalltalk.addMethod(
  2210. "_observeModel",
  2211. smalltalk.method({
  2212. selector: "observeModel",
  2213. category: 'actions',
  2214. fn: function (){
  2215. var self=this;
  2216. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLMethodSelected || HLMethodSelected),(function(ann){
  2217. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodSelected_(_st(ann)._item());
  2218. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2219. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  2220. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  2221. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2222. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  2223. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  2224. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2225. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLBrowserSourceWidget)})},
  2226. args: [],
  2227. source: "observeModel\x0a\x09self model announcer on: HLMethodSelected do: [ :ann |\x0a \x09self onMethodSelected: ann item ].\x0a self model announcer on: HLClassSelected do: [ :ann |\x0a \x09self onClassSelected: ann item ].\x0a self model announcer on: HLProtocolSelected do: [ :ann |\x0a \x09self onProtocolSelected: ann item ]",
  2228. messageSends: ["on:do:", "onMethodSelected:", "item", "announcer", "model", "onClassSelected:", "onProtocolSelected:"],
  2229. referencedClasses: ["HLMethodSelected", "HLClassSelected", "HLProtocolSelected"]
  2230. }),
  2231. smalltalk.HLBrowserSourceWidget);
  2232. smalltalk.addMethod(
  2233. "_observeSystem",
  2234. smalltalk.method({
  2235. selector: "observeSystem",
  2236. category: 'actions',
  2237. fn: function (){
  2238. var self=this;
  2239. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._on_do_((smalltalk.MethodModified || MethodModified),(function(ann){
  2240. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodModified_(_st(ann)._method());
  2241. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2242. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLBrowserSourceWidget)})},
  2243. args: [],
  2244. source: "observeSystem\x0a\x09SystemAnnouncer current\x0a \x09on: MethodModified\x0a do: [ :ann | self onMethodModified: ann method ]",
  2245. messageSends: ["on:do:", "onMethodModified:", "method", "current"],
  2246. referencedClasses: ["MethodModified", "SystemAnnouncer"]
  2247. }),
  2248. smalltalk.HLBrowserSourceWidget);
  2249. smalltalk.addMethod(
  2250. "_onClassSelected_",
  2251. smalltalk.method({
  2252. selector: "onClassSelected:",
  2253. category: 'reactions',
  2254. fn: function (aClass){
  2255. var self=this;
  2256. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2257. $1=aClass;
  2258. if(($receiver = $1) == nil || $receiver == undefined){
  2259. $2=_st(self)._contents_("");
  2260. return $2;
  2261. } else {
  2262. $1;
  2263. };
  2264. _st(self)._contents_(_st(aClass)._definition());
  2265. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLBrowserSourceWidget)})},
  2266. args: ["aClass"],
  2267. source: "onClassSelected: aClass\x0a\x09aClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: aClass definition",
  2268. messageSends: ["ifNil:", "contents:", "definition"],
  2269. referencedClasses: []
  2270. }),
  2271. smalltalk.HLBrowserSourceWidget);
  2272. smalltalk.addMethod(
  2273. "_onMethodModified_",
  2274. smalltalk.method({
  2275. selector: "onMethodModified:",
  2276. category: 'reactions',
  2277. fn: function (aMethod){
  2278. var self=this;
  2279. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2280. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(aMethod)._methodClass());
  2281. if(! smalltalk.assert($1)){
  2282. $2=self;
  2283. return $2;
  2284. };
  2285. $3=_st(_st(_st(_st(self)._model())._selectedMethod())._selector()).__eq(_st(aMethod)._selector());
  2286. if(! smalltalk.assert($3)){
  2287. $4=self;
  2288. return $4;
  2289. };
  2290. _st(self)._refresh();
  2291. return self}, function($ctx1) {$ctx1.fill(self,"onMethodModified:",{aMethod:aMethod}, smalltalk.HLBrowserSourceWidget)})},
  2292. args: ["aMethod"],
  2293. source: "onMethodModified: aMethod\x0a\x0a\x09self model selectedClass = aMethod methodClass ifFalse: [ ^ self ].\x0a self model selectedMethod selector = aMethod selector ifFalse: [ ^ self ].\x0a\x0a self refresh",
  2294. messageSends: ["ifFalse:", "=", "methodClass", "selectedClass", "model", "selector", "selectedMethod", "refresh"],
  2295. referencedClasses: []
  2296. }),
  2297. smalltalk.HLBrowserSourceWidget);
  2298. smalltalk.addMethod(
  2299. "_onMethodSelected_",
  2300. smalltalk.method({
  2301. selector: "onMethodSelected:",
  2302. category: 'reactions',
  2303. fn: function (aCompiledMethod){
  2304. var self=this;
  2305. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2306. $1=aCompiledMethod;
  2307. if(($receiver = $1) == nil || $receiver == undefined){
  2308. $2=_st(self)._contents_("");
  2309. return $2;
  2310. } else {
  2311. $1;
  2312. };
  2313. _st(self)._contents_(_st(aCompiledMethod)._source());
  2314. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserSourceWidget)})},
  2315. args: ["aCompiledMethod"],
  2316. source: "onMethodSelected: aCompiledMethod\x0a\x09aCompiledMethod ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: aCompiledMethod source",
  2317. messageSends: ["ifNil:", "contents:", "source"],
  2318. referencedClasses: []
  2319. }),
  2320. smalltalk.HLBrowserSourceWidget);
  2321. smalltalk.addMethod(
  2322. "_onProtocolSelected_",
  2323. smalltalk.method({
  2324. selector: "onProtocolSelected:",
  2325. category: 'reactions',
  2326. fn: function (aString){
  2327. var self=this;
  2328. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2329. $1=_st(_st(self)._model())._selectedClass();
  2330. if(($receiver = $1) == nil || $receiver == undefined){
  2331. $2=_st(self)._contents_("");
  2332. return $2;
  2333. } else {
  2334. $1;
  2335. };
  2336. _st(self)._contents_(_st(_st(_st(self)._model())._selectedClass())._definition());
  2337. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2338. args: ["aString"],
  2339. source: "onProtocolSelected: aString\x0a\x09self model selectedClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: self model selectedClass definition",
  2340. messageSends: ["ifNil:", "contents:", "selectedClass", "model", "definition"],
  2341. referencedClasses: []
  2342. }),
  2343. smalltalk.HLBrowserSourceWidget);
  2344. smalltalk.addMethod(
  2345. "_refresh",
  2346. smalltalk.method({
  2347. selector: "refresh",
  2348. category: 'updating',
  2349. fn: function (){
  2350. var self=this;
  2351. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2352. $1=_st(self)._hasModification();
  2353. if(smalltalk.assert($1)){
  2354. $2=self;
  2355. return $2;
  2356. };
  2357. _st(self)._contents_(_st(_st(_st(self)._model())._selectedMethod())._source());
  2358. smalltalk.HLWidget.fn.prototype._refresh.apply(_st(self), []);
  2359. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{}, smalltalk.HLBrowserSourceWidget)})},
  2360. args: [],
  2361. source: "refresh\x0a\x09self hasModification ifTrue: [ ^ self ].\x0a \x0a\x09self contents: self model selectedMethod source.\x0a super refresh",
  2362. messageSends: ["ifTrue:", "hasModification", "contents:", "source", "selectedMethod", "model", "refresh"],
  2363. referencedClasses: []
  2364. }),
  2365. smalltalk.HLBrowserSourceWidget);
  2366. smalltalk.addMethod(
  2367. "_renderContentOn_",
  2368. smalltalk.method({
  2369. selector: "renderContentOn:",
  2370. category: 'rendering',
  2371. fn: function (html){
  2372. var self=this;
  2373. return smalltalk.withContext(function($ctx1) { _st(_st(self)._codeWidget())._renderOn_(html);
  2374. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLBrowserSourceWidget)})},
  2375. args: ["html"],
  2376. source: "renderContentOn: html\x0a\x09self codeWidget renderOn: html",
  2377. messageSends: ["renderOn:", "codeWidget"],
  2378. referencedClasses: []
  2379. }),
  2380. smalltalk.HLBrowserSourceWidget);
  2381. smalltalk.addMethod(
  2382. "_on_",
  2383. smalltalk.method({
  2384. selector: "on:",
  2385. category: 'instance creation',
  2386. fn: function (aBrowserModel){
  2387. var self=this;
  2388. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2389. $2=_st(self)._new();
  2390. _st($2)._model_(aBrowserModel);
  2391. $3=_st($2)._yourself();
  2392. $1=$3;
  2393. return $1;
  2394. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget.klass)})},
  2395. args: ["aBrowserModel"],
  2396. source: "on: aBrowserModel\x0a\x09^ self new\x0a \x09model: aBrowserModel;\x0a yourself",
  2397. messageSends: ["model:", "new", "yourself"],
  2398. referencedClasses: []
  2399. }),
  2400. smalltalk.HLBrowserSourceWidget.klass);
  2401. smalltalk.addClass('HLClassCache', smalltalk.Object, ['class', 'selectorsCache', 'overrideCache', 'overriddenCache'], 'Helios-Browser');
  2402. smalltalk.addMethod(
  2403. "_invalidateChildrenSelector_",
  2404. smalltalk.method({
  2405. selector: "invalidateChildrenSelector:",
  2406. category: 'actions',
  2407. fn: function (aSelector){
  2408. var self=this;
  2409. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2410. _st(_st(_st(self)._theClass())._subclasses())._do_((function(each){
  2411. return smalltalk.withContext(function($ctx2) { $1=_st(_st(self)._selectorsCache())._cacheFor_(each);
  2412. _st($1)._removeSelector_(aSelector);
  2413. $2=_st($1)._invalidateChildrenSelector_(aSelector);
  2414. return $2;
  2415. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2416. return self}, function($ctx1) {$ctx1.fill(self,"invalidateChildrenSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2417. args: ["aSelector"],
  2418. source: "invalidateChildrenSelector: aSelector\x0a\x09self theClass subclasses do: [ :each |\x0a \x09(self selectorsCache cacheFor: each)\x0a \x09removeSelector: aSelector;\x0a \x09invalidateChildrenSelector: aSelector ]",
  2419. messageSends: ["do:", "removeSelector:", "cacheFor:", "selectorsCache", "invalidateChildrenSelector:", "subclasses", "theClass"],
  2420. referencedClasses: []
  2421. }),
  2422. smalltalk.HLClassCache);
  2423. smalltalk.addMethod(
  2424. "_invalidateParentSelector_",
  2425. smalltalk.method({
  2426. selector: "invalidateParentSelector:",
  2427. category: 'actions',
  2428. fn: function (aSelector){
  2429. var self=this;
  2430. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2431. $1=_st(_st(self)._theClass())._superclass();
  2432. if(($receiver = $1) == nil || $receiver == undefined){
  2433. $1;
  2434. } else {
  2435. $2=_st(_st(self)._selectorsCache())._cacheFor_(_st(_st(self)._theClass())._superclass());
  2436. _st($2)._removeSelector_(aSelector);
  2437. $3=_st($2)._invalidateParentSelector_(aSelector);
  2438. $3;
  2439. };
  2440. return self}, function($ctx1) {$ctx1.fill(self,"invalidateParentSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2441. args: ["aSelector"],
  2442. source: "invalidateParentSelector: aSelector\x0a\x09self theClass superclass ifNotNil: [\x0a \x09(self selectorsCache cacheFor: self theClass superclass)\x0a \x09removeSelector: aSelector;\x0a\x09\x09\x09invalidateParentSelector: aSelector ]",
  2443. messageSends: ["ifNotNil:", "removeSelector:", "cacheFor:", "superclass", "theClass", "selectorsCache", "invalidateParentSelector:"],
  2444. referencedClasses: []
  2445. }),
  2446. smalltalk.HLClassCache);
  2447. smalltalk.addMethod(
  2448. "_invalidateSelector_",
  2449. smalltalk.method({
  2450. selector: "invalidateSelector:",
  2451. category: 'actions',
  2452. fn: function (aSelector){
  2453. var self=this;
  2454. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2455. $1=self;
  2456. _st($1)._invalidateParentSelector_(aSelector);
  2457. _st($1)._invalidateChildrenSelector_(aSelector);
  2458. $2=_st($1)._removeSelector_(aSelector);
  2459. return self}, function($ctx1) {$ctx1.fill(self,"invalidateSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2460. args: ["aSelector"],
  2461. source: "invalidateSelector: aSelector\x0a\x09self \x0a \x09invalidateParentSelector: aSelector;\x0a invalidateChildrenSelector: aSelector;\x0a removeSelector: aSelector",
  2462. messageSends: ["invalidateParentSelector:", "invalidateChildrenSelector:", "removeSelector:"],
  2463. referencedClasses: []
  2464. }),
  2465. smalltalk.HLClassCache);
  2466. smalltalk.addMethod(
  2467. "_isOverridden_",
  2468. smalltalk.method({
  2469. selector: "isOverridden:",
  2470. category: 'testing',
  2471. fn: function (aMethod){
  2472. var self=this;
  2473. return smalltalk.withContext(function($ctx1) { var $1;
  2474. $1=_st(_st(self)._overriddenCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  2475. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverridden();
  2476. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2477. return $1;
  2478. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  2479. args: ["aMethod"],
  2480. source: "isOverridden: aMethod\x0a\x09^ self overriddenCache \x0a \x09at: aMethod selector\x0a \x09ifAbsentPut: [ aMethod isOverridden ]",
  2481. messageSends: ["at:ifAbsentPut:", "selector", "isOverridden", "overriddenCache"],
  2482. referencedClasses: []
  2483. }),
  2484. smalltalk.HLClassCache);
  2485. smalltalk.addMethod(
  2486. "_isOverride_",
  2487. smalltalk.method({
  2488. selector: "isOverride:",
  2489. category: 'testing',
  2490. fn: function (aMethod){
  2491. var self=this;
  2492. return smalltalk.withContext(function($ctx1) { var $1;
  2493. $1=_st(_st(self)._overrideCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  2494. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverride();
  2495. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2496. return $1;
  2497. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  2498. args: ["aMethod"],
  2499. source: "isOverride: aMethod\x0a\x09^ self overrideCache\x0a \x09at: aMethod selector\x0a \x09ifAbsentPut: [ aMethod isOverride ]",
  2500. messageSends: ["at:ifAbsentPut:", "selector", "isOverride", "overrideCache"],
  2501. referencedClasses: []
  2502. }),
  2503. smalltalk.HLClassCache);
  2504. smalltalk.addMethod(
  2505. "_overriddenCache",
  2506. smalltalk.method({
  2507. selector: "overriddenCache",
  2508. category: 'accessing',
  2509. fn: function (){
  2510. var self=this;
  2511. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2512. $2=self["@overriddenCache"];
  2513. if(($receiver = $2) == nil || $receiver == undefined){
  2514. self["@overriddenCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2515. $1=self["@overriddenCache"];
  2516. } else {
  2517. $1=$2;
  2518. };
  2519. return $1;
  2520. }, function($ctx1) {$ctx1.fill(self,"overriddenCache",{}, smalltalk.HLClassCache)})},
  2521. args: [],
  2522. source: "overriddenCache\x0a\x09^ overriddenCache ifNil: [ overriddenCache := HashedCollection new ]",
  2523. messageSends: ["ifNil:", "new"],
  2524. referencedClasses: ["HashedCollection"]
  2525. }),
  2526. smalltalk.HLClassCache);
  2527. smalltalk.addMethod(
  2528. "_overrideCache",
  2529. smalltalk.method({
  2530. selector: "overrideCache",
  2531. category: 'accessing',
  2532. fn: function (){
  2533. var self=this;
  2534. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2535. $2=self["@overrideCache"];
  2536. if(($receiver = $2) == nil || $receiver == undefined){
  2537. self["@overrideCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2538. $1=self["@overrideCache"];
  2539. } else {
  2540. $1=$2;
  2541. };
  2542. return $1;
  2543. }, function($ctx1) {$ctx1.fill(self,"overrideCache",{}, smalltalk.HLClassCache)})},
  2544. args: [],
  2545. source: "overrideCache\x0a\x09^ overrideCache ifNil: [ overrideCache := HashedCollection new ]",
  2546. messageSends: ["ifNil:", "new"],
  2547. referencedClasses: ["HashedCollection"]
  2548. }),
  2549. smalltalk.HLClassCache);
  2550. smalltalk.addMethod(
  2551. "_removeSelector_",
  2552. smalltalk.method({
  2553. selector: "removeSelector:",
  2554. category: 'private',
  2555. fn: function (aSelector){
  2556. var self=this;
  2557. return smalltalk.withContext(function($ctx1) { _st(_st(self)._overriddenCache())._removeKey_ifAbsent_(aSelector,(function(){
  2558. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2559. _st(_st(self)._overrideCache())._removeKey_ifAbsent_(aSelector,(function(){
  2560. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2561. return self}, function($ctx1) {$ctx1.fill(self,"removeSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2562. args: ["aSelector"],
  2563. source: "removeSelector: aSelector\x0a\x09self overriddenCache \x0a \x09removeKey: aSelector\x0a ifAbsent: [ ].\x0a self overrideCache \x0a \x09removeKey: aSelector\x0a ifAbsent: [ ]",
  2564. messageSends: ["removeKey:ifAbsent:", "overriddenCache", "overrideCache"],
  2565. referencedClasses: []
  2566. }),
  2567. smalltalk.HLClassCache);
  2568. smalltalk.addMethod(
  2569. "_selectorsCache",
  2570. smalltalk.method({
  2571. selector: "selectorsCache",
  2572. category: 'accessing',
  2573. fn: function (){
  2574. var self=this;
  2575. return smalltalk.withContext(function($ctx1) { var $1;
  2576. $1=self["@selectorsCache"];
  2577. return $1;
  2578. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLClassCache)})},
  2579. args: [],
  2580. source: "selectorsCache\x0a\x09^ selectorsCache",
  2581. messageSends: [],
  2582. referencedClasses: []
  2583. }),
  2584. smalltalk.HLClassCache);
  2585. smalltalk.addMethod(
  2586. "_selectorsCache_",
  2587. smalltalk.method({
  2588. selector: "selectorsCache:",
  2589. category: 'accessing',
  2590. fn: function (aCache){
  2591. var self=this;
  2592. return smalltalk.withContext(function($ctx1) { self["@selectorsCache"]=aCache;
  2593. return self}, function($ctx1) {$ctx1.fill(self,"selectorsCache:",{aCache:aCache}, smalltalk.HLClassCache)})},
  2594. args: ["aCache"],
  2595. source: "selectorsCache: aCache\x0a\x09selectorsCache := aCache",
  2596. messageSends: [],
  2597. referencedClasses: []
  2598. }),
  2599. smalltalk.HLClassCache);
  2600. smalltalk.addMethod(
  2601. "_theClass",
  2602. smalltalk.method({
  2603. selector: "theClass",
  2604. category: 'accessing',
  2605. fn: function (){
  2606. var self=this;
  2607. return smalltalk.withContext(function($ctx1) { var $1;
  2608. $1=self["@class"];
  2609. return $1;
  2610. }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.HLClassCache)})},
  2611. args: [],
  2612. source: "theClass\x0a\x09^ class",
  2613. messageSends: [],
  2614. referencedClasses: []
  2615. }),
  2616. smalltalk.HLClassCache);
  2617. smalltalk.addMethod(
  2618. "_theClass_",
  2619. smalltalk.method({
  2620. selector: "theClass:",
  2621. category: 'accessing',
  2622. fn: function (aClass){
  2623. var self=this;
  2624. return smalltalk.withContext(function($ctx1) { self["@class"]=aClass;
  2625. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.HLClassCache)})},
  2626. args: ["aClass"],
  2627. source: "theClass: aClass\x0a\x09class := aClass",
  2628. messageSends: [],
  2629. referencedClasses: []
  2630. }),
  2631. smalltalk.HLClassCache);
  2632. smalltalk.addMethod(
  2633. "_on_selectorsCache_",
  2634. smalltalk.method({
  2635. selector: "on:selectorsCache:",
  2636. category: 'instance creation',
  2637. fn: function (aClass,aSelectorsCache){
  2638. var self=this;
  2639. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2640. $2=_st(self)._new();
  2641. _st($2)._theClass_(aClass);
  2642. _st($2)._selectorsCache_(aSelectorsCache);
  2643. $3=_st($2)._yourself();
  2644. $1=$3;
  2645. return $1;
  2646. }, function($ctx1) {$ctx1.fill(self,"on:selectorsCache:",{aClass:aClass,aSelectorsCache:aSelectorsCache}, smalltalk.HLClassCache.klass)})},
  2647. args: ["aClass", "aSelectorsCache"],
  2648. source: "on: aClass selectorsCache: aSelectorsCache\x0a\x09^ self new\x0a \x09theClass: aClass;\x0a selectorsCache: aSelectorsCache;\x0a yourself",
  2649. messageSends: ["theClass:", "new", "selectorsCache:", "yourself"],
  2650. referencedClasses: []
  2651. }),
  2652. smalltalk.HLClassCache.klass);
  2653. smalltalk.addClass('HLSelectorsCache', smalltalk.Object, ['classesCache'], 'Helios-Browser');
  2654. smalltalk.addMethod(
  2655. "_cacheFor_",
  2656. smalltalk.method({
  2657. selector: "cacheFor:",
  2658. category: 'accessing',
  2659. fn: function (aClass){
  2660. var self=this;
  2661. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2662. $1=aClass;
  2663. if(($receiver = $1) == nil || $receiver == undefined){
  2664. return nil;
  2665. } else {
  2666. $1;
  2667. };
  2668. $2=_st(_st(self)._classesCache())._at_ifAbsentPut_(_st(aClass)._name(),(function(){
  2669. return smalltalk.withContext(function($ctx2) { return _st(self)._newCacheFor_(aClass);
  2670. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2671. return $2;
  2672. }, function($ctx1) {$ctx1.fill(self,"cacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2673. args: ["aClass"],
  2674. source: "cacheFor: aClass\x0a\x09aClass ifNil: [ ^ nil ].\x0a \x0a\x09^ self classesCache\x0a \x09at: aClass name\x0a ifAbsentPut: [ self newCacheFor: aClass ]",
  2675. messageSends: ["ifNil:", "at:ifAbsentPut:", "name", "newCacheFor:", "classesCache"],
  2676. referencedClasses: []
  2677. }),
  2678. smalltalk.HLSelectorsCache);
  2679. smalltalk.addMethod(
  2680. "_classesCache",
  2681. smalltalk.method({
  2682. selector: "classesCache",
  2683. category: 'accessing',
  2684. fn: function (){
  2685. var self=this;
  2686. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2687. $2=self["@classesCache"];
  2688. if(($receiver = $2) == nil || $receiver == undefined){
  2689. self["@classesCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2690. $1=self["@classesCache"];
  2691. } else {
  2692. $1=$2;
  2693. };
  2694. return $1;
  2695. }, function($ctx1) {$ctx1.fill(self,"classesCache",{}, smalltalk.HLSelectorsCache)})},
  2696. args: [],
  2697. source: "classesCache\x0a\x09^ classesCache ifNil: [ classesCache := HashedCollection new ]",
  2698. messageSends: ["ifNil:", "new"],
  2699. referencedClasses: ["HashedCollection"]
  2700. }),
  2701. smalltalk.HLSelectorsCache);
  2702. smalltalk.addMethod(
  2703. "_initialize",
  2704. smalltalk.method({
  2705. selector: "initialize",
  2706. category: 'initialization',
  2707. fn: function (){
  2708. var self=this;
  2709. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  2710. _st(self)._observeSystem();
  2711. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLSelectorsCache)})},
  2712. args: [],
  2713. source: "initialize\x0a\x09super initialize.\x0a self observeSystem",
  2714. messageSends: ["initialize", "observeSystem"],
  2715. referencedClasses: []
  2716. }),
  2717. smalltalk.HLSelectorsCache);
  2718. smalltalk.addMethod(
  2719. "_invalidateCacheFor_",
  2720. smalltalk.method({
  2721. selector: "invalidateCacheFor:",
  2722. category: 'private',
  2723. fn: function (aMethod){
  2724. var self=this;
  2725. return smalltalk.withContext(function($ctx1) { _st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._invalidateSelector_(_st(aMethod)._selector());
  2726. return self}, function($ctx1) {$ctx1.fill(self,"invalidateCacheFor:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2727. args: ["aMethod"],
  2728. source: "invalidateCacheFor: aMethod\x0a\x09(self cacheFor: aMethod methodClass)\x0a \x09invalidateSelector: aMethod selector",
  2729. messageSends: ["invalidateSelector:", "selector", "cacheFor:", "methodClass"],
  2730. referencedClasses: []
  2731. }),
  2732. smalltalk.HLSelectorsCache);
  2733. smalltalk.addMethod(
  2734. "_isOverridden_",
  2735. smalltalk.method({
  2736. selector: "isOverridden:",
  2737. category: 'testing',
  2738. fn: function (aMethod){
  2739. var self=this;
  2740. return smalltalk.withContext(function($ctx1) { var $1;
  2741. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverridden_(aMethod);
  2742. return $1;
  2743. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2744. args: ["aMethod"],
  2745. source: "isOverridden: aMethod\x0a\x09^ (self cacheFor: aMethod methodClass)\x0a \x09isOverridden: aMethod",
  2746. messageSends: ["isOverridden:", "cacheFor:", "methodClass"],
  2747. referencedClasses: []
  2748. }),
  2749. smalltalk.HLSelectorsCache);
  2750. smalltalk.addMethod(
  2751. "_isOverride_",
  2752. smalltalk.method({
  2753. selector: "isOverride:",
  2754. category: 'testing',
  2755. fn: function (aMethod){
  2756. var self=this;
  2757. return smalltalk.withContext(function($ctx1) { var $1;
  2758. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverride_(aMethod);
  2759. return $1;
  2760. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2761. args: ["aMethod"],
  2762. source: "isOverride: aMethod\x0a\x09^ (self cacheFor: aMethod methodClass)\x0a \x09isOverride: aMethod",
  2763. messageSends: ["isOverride:", "cacheFor:", "methodClass"],
  2764. referencedClasses: []
  2765. }),
  2766. smalltalk.HLSelectorsCache);
  2767. smalltalk.addMethod(
  2768. "_newCacheFor_",
  2769. smalltalk.method({
  2770. selector: "newCacheFor:",
  2771. category: 'factory',
  2772. fn: function (aClass){
  2773. var self=this;
  2774. return smalltalk.withContext(function($ctx1) { var $1;
  2775. $1=_st((smalltalk.HLClassCache || HLClassCache))._on_selectorsCache_(aClass,self);
  2776. return $1;
  2777. }, function($ctx1) {$ctx1.fill(self,"newCacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2778. args: ["aClass"],
  2779. source: "newCacheFor: aClass\x0a\x09^ HLClassCache \x0a \x09on: aClass\x0a selectorsCache: self",
  2780. messageSends: ["on:selectorsCache:"],
  2781. referencedClasses: ["HLClassCache"]
  2782. }),
  2783. smalltalk.HLSelectorsCache);
  2784. smalltalk.addMethod(
  2785. "_observeSystem",
  2786. smalltalk.method({
  2787. selector: "observeSystem",
  2788. category: 'actions',
  2789. fn: function (){
  2790. var self=this;
  2791. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2792. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  2793. _st($1)._on_do_((smalltalk.MethodAdded || MethodAdded),(function(ann){
  2794. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodAdded_(_st(ann)._method());
  2795. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2796. $2=_st($1)._on_do_((smalltalk.MethodRemoved || MethodRemoved),(function(ann){
  2797. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodRemoved_(_st(ann)._method());
  2798. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2799. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLSelectorsCache)})},
  2800. args: [],
  2801. 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 ]",
  2802. messageSends: ["on:do:", "onMethodAdded:", "method", "current", "onMethodRemoved:"],
  2803. referencedClasses: ["MethodAdded", "SystemAnnouncer", "MethodRemoved"]
  2804. }),
  2805. smalltalk.HLSelectorsCache);
  2806. smalltalk.addMethod(
  2807. "_onMethodAdded_",
  2808. smalltalk.method({
  2809. selector: "onMethodAdded:",
  2810. category: 'reactions',
  2811. fn: function (aMethod){
  2812. var self=this;
  2813. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2814. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2815. args: ["aMethod"],
  2816. source: "onMethodAdded: aMethod\x0a\x09self invalidateCacheFor: aMethod",
  2817. messageSends: ["invalidateCacheFor:"],
  2818. referencedClasses: []
  2819. }),
  2820. smalltalk.HLSelectorsCache);
  2821. smalltalk.addMethod(
  2822. "_onMethodRemoved_",
  2823. smalltalk.method({
  2824. selector: "onMethodRemoved:",
  2825. category: 'reactions',
  2826. fn: function (aMethod){
  2827. var self=this;
  2828. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2829. return self}, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2830. args: ["aMethod"],
  2831. source: "onMethodRemoved: aMethod\x0a\x09self invalidateCacheFor: aMethod",
  2832. messageSends: ["invalidateCacheFor:"],
  2833. referencedClasses: []
  2834. }),
  2835. smalltalk.HLSelectorsCache);
  2836. smalltalk.HLSelectorsCache.klass.iVarNames = ['current'];
  2837. smalltalk.addMethod(
  2838. "_current",
  2839. smalltalk.method({
  2840. selector: "current",
  2841. category: 'accessing',
  2842. fn: function (){
  2843. var self=this;
  2844. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2845. $2=self["@current"];
  2846. if(($receiver = $2) == nil || $receiver == undefined){
  2847. self["@current"]=smalltalk.Object.klass.fn.prototype._new.apply(_st(self), []);
  2848. $1=self["@current"];
  2849. } else {
  2850. $1=$2;
  2851. };
  2852. return $1;
  2853. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.HLSelectorsCache.klass)})},
  2854. args: [],
  2855. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  2856. messageSends: ["ifNil:", "new"],
  2857. referencedClasses: []
  2858. }),
  2859. smalltalk.HLSelectorsCache.klass);
  2860. smalltalk.addMethod(
  2861. "_flush",
  2862. smalltalk.method({
  2863. selector: "flush",
  2864. category: 'accessing',
  2865. fn: function (){
  2866. var self=this;
  2867. return smalltalk.withContext(function($ctx1) { self["@current"]=nil;
  2868. return self}, function($ctx1) {$ctx1.fill(self,"flush",{}, smalltalk.HLSelectorsCache.klass)})},
  2869. args: [],
  2870. source: "flush\x0a\x09current := nil",
  2871. messageSends: [],
  2872. referencedClasses: []
  2873. }),
  2874. smalltalk.HLSelectorsCache.klass);
  2875. smalltalk.addMethod(
  2876. "_new",
  2877. smalltalk.method({
  2878. selector: "new",
  2879. category: 'instance creation',
  2880. fn: function (){
  2881. var self=this;
  2882. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  2883. return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.HLSelectorsCache.klass)})},
  2884. args: [],
  2885. source: "new\x0a\x09self shouldNotImplement",
  2886. messageSends: ["shouldNotImplement"],
  2887. referencedClasses: []
  2888. }),
  2889. smalltalk.HLSelectorsCache.klass);
  2890. smalltalk.addMethod(
  2891. "_isOverridden",
  2892. smalltalk.method({
  2893. selector: "isOverridden",
  2894. category: '*Helios-Browser',
  2895. fn: function (){
  2896. var self=this;
  2897. var selector;
  2898. return smalltalk.withContext(function($ctx1) { var $1;
  2899. var $early={};
  2900. try {
  2901. selector=_st(self)._selector();
  2902. _st(_st(self)._methodClass())._allSubclassesDo_((function(each){
  2903. return smalltalk.withContext(function($ctx2) { $1=_st(each)._includesSelector_(selector);
  2904. if(smalltalk.assert($1)){
  2905. throw $early=[true];
  2906. };
  2907. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2908. return false;
  2909. }
  2910. catch(e) {if(e===$early)return e[0]; throw e}
  2911. }, function($ctx1) {$ctx1.fill(self,"isOverridden",{selector:selector}, smalltalk.CompiledMethod)})},
  2912. args: [],
  2913. 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",
  2914. messageSends: ["selector", "allSubclassesDo:", "ifTrue:", "includesSelector:", "methodClass"],
  2915. referencedClasses: []
  2916. }),
  2917. smalltalk.CompiledMethod);
  2918. smalltalk.addMethod(
  2919. "_isOverride",
  2920. smalltalk.method({
  2921. selector: "isOverride",
  2922. category: '*Helios-Browser',
  2923. fn: function (){
  2924. var self=this;
  2925. var superclass;
  2926. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2927. superclass=_st(_st(self)._methodClass())._superclass();
  2928. $1=superclass;
  2929. if(($receiver = $1) == nil || $receiver == undefined){
  2930. return false;
  2931. } else {
  2932. $1;
  2933. };
  2934. $2=_st(_st(_st(_st(self)._methodClass())._superclass())._lookupSelector_(_st(self)._selector()))._notNil();
  2935. return $2;
  2936. }, function($ctx1) {$ctx1.fill(self,"isOverride",{superclass:superclass}, smalltalk.CompiledMethod)})},
  2937. args: [],
  2938. 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",
  2939. messageSends: ["superclass", "methodClass", "ifNil:", "notNil", "lookupSelector:", "selector"],
  2940. referencedClasses: []
  2941. }),
  2942. smalltalk.CompiledMethod);