Helios-Browser.js 118 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104
  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(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();
  830. };
  831. _st($1)._items_($2);
  832. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForPackage:",{aPackage:aPackage}, smalltalk.HLClassesListWidget)})},
  833. args: ["aPackage"],
  834. source: "setItemsForPackage: aPackage\x0a\x09self items: (aPackage \x0a \x09ifNil: [ #() ]\x0a \x09\x09ifNotNil: [ (aPackage classes \x0a \x09collect: [ :each | each theNonMetaClass ]) asSet asArray ]).",
  835. messageSends: ["items:", "ifNil:ifNotNil:", "asArray", "asSet", "collect:", "theNonMetaClass", "classes"],
  836. referencedClasses: []
  837. }),
  838. smalltalk.HLClassesListWidget);
  839. smalltalk.addMethod(
  840. "_setItemsForSelectedPackage",
  841. smalltalk.method({
  842. selector: "setItemsForSelectedPackage",
  843. category: 'private',
  844. fn: function (){
  845. var self=this;
  846. return smalltalk.withContext(function($ctx1) { _st(self)._setItemsForPackage_(_st(_st(self)._model())._selectedPackage());
  847. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedPackage",{}, smalltalk.HLClassesListWidget)})},
  848. args: [],
  849. source: "setItemsForSelectedPackage\x0a\x09self setItemsForPackage: self model selectedPackage",
  850. messageSends: ["setItemsForPackage:", "selectedPackage", "model"],
  851. referencedClasses: []
  852. }),
  853. smalltalk.HLClassesListWidget);
  854. smalltalk.addMethod(
  855. "_showInstance",
  856. smalltalk.method({
  857. selector: "showInstance",
  858. category: 'accessing',
  859. fn: function (){
  860. var self=this;
  861. return smalltalk.withContext(function($ctx1) { var $1;
  862. $1=_st(_st(self)._model())._showInstance();
  863. return $1;
  864. }, function($ctx1) {$ctx1.fill(self,"showInstance",{}, smalltalk.HLClassesListWidget)})},
  865. args: [],
  866. source: "showInstance\x0a\x09^ self model showInstance",
  867. messageSends: ["showInstance", "model"],
  868. referencedClasses: []
  869. }),
  870. smalltalk.HLClassesListWidget);
  871. smalltalk.addMethod(
  872. "_showInstance_",
  873. smalltalk.method({
  874. selector: "showInstance:",
  875. category: 'actions',
  876. fn: function (aBoolean){
  877. var self=this;
  878. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._showInstance_(aBoolean);
  879. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean}, smalltalk.HLClassesListWidget)})},
  880. args: ["aBoolean"],
  881. source: "showInstance: aBoolean\x0a\x09self model showInstance: aBoolean",
  882. messageSends: ["showInstance:", "model"],
  883. referencedClasses: []
  884. }),
  885. smalltalk.HLClassesListWidget);
  886. smalltalk.addClass('HLMethodsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  887. smalltalk.addMethod(
  888. "_allProtocol",
  889. smalltalk.method({
  890. selector: "allProtocol",
  891. category: 'accessing',
  892. fn: function (){
  893. var self=this;
  894. return smalltalk.withContext(function($ctx1) { var $1;
  895. $1=_st(_st(self)._model())._allProtocol();
  896. return $1;
  897. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLMethodsListWidget)})},
  898. args: [],
  899. source: "allProtocol\x0a\x09^ self model allProtocol",
  900. messageSends: ["allProtocol", "model"],
  901. referencedClasses: []
  902. }),
  903. smalltalk.HLMethodsListWidget);
  904. smalltalk.addMethod(
  905. "_flushSelectorsCache",
  906. smalltalk.method({
  907. selector: "flushSelectorsCache",
  908. category: 'cache',
  909. fn: function (){
  910. var self=this;
  911. return smalltalk.withContext(function($ctx1) { self["@selectorsCache"]=_st((smalltalk.Dictionary || Dictionary))._new();
  912. return self}, function($ctx1) {$ctx1.fill(self,"flushSelectorsCache",{}, smalltalk.HLMethodsListWidget)})},
  913. args: [],
  914. source: "flushSelectorsCache\x0a\x09selectorsCache := Dictionary new",
  915. messageSends: ["new"],
  916. referencedClasses: ["Dictionary"]
  917. }),
  918. smalltalk.HLMethodsListWidget);
  919. smalltalk.addMethod(
  920. "_iconForItem_",
  921. smalltalk.method({
  922. selector: "iconForItem:",
  923. category: 'accessing',
  924. fn: function (aSelector){
  925. var self=this;
  926. var override,overriden,method;
  927. return smalltalk.withContext(function($ctx1) { var $2,$3,$4,$1;
  928. method=_st(self)._methodForSelector_(aSelector);
  929. override=_st(self)._isOverride_(method);
  930. overriden=_st(self)._isOverridden_(method);
  931. $2=override;
  932. if(smalltalk.assert($2)){
  933. $3=overriden;
  934. if(smalltalk.assert($3)){
  935. $1="icon-resize-vertical";
  936. } else {
  937. $1="icon-arrow-up";
  938. };
  939. } else {
  940. $4=overriden;
  941. if(smalltalk.assert($4)){
  942. $1="icon-arrow-down";
  943. } else {
  944. $1="icon-none";
  945. };
  946. };
  947. return $1;
  948. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{aSelector:aSelector,override:override,overriden:overriden,method:method}, smalltalk.HLMethodsListWidget)})},
  949. args: ["aSelector"],
  950. 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' ] ]",
  951. messageSends: ["methodForSelector:", "isOverride:", "isOverridden:", "ifTrue:ifFalse:"],
  952. referencedClasses: []
  953. }),
  954. smalltalk.HLMethodsListWidget);
  955. smalltalk.addMethod(
  956. "_initialize",
  957. smalltalk.method({
  958. selector: "initialize",
  959. category: 'initialization',
  960. fn: function (){
  961. var self=this;
  962. return smalltalk.withContext(function($ctx1) { smalltalk.HLBrowserListWidget.fn.prototype._initialize.apply(_st(self), []);
  963. _st(self)._flushSelectorsCache();
  964. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLMethodsListWidget)})},
  965. args: [],
  966. source: "initialize\x0a\x09super initialize.\x0a self flushSelectorsCache",
  967. messageSends: ["initialize", "flushSelectorsCache"],
  968. referencedClasses: []
  969. }),
  970. smalltalk.HLMethodsListWidget);
  971. smalltalk.addMethod(
  972. "_isOverridden_",
  973. smalltalk.method({
  974. selector: "isOverridden:",
  975. category: 'testing',
  976. fn: function (aMethod){
  977. var self=this;
  978. return smalltalk.withContext(function($ctx1) { var $1;
  979. $1=_st(_st(self)._selectorsCache())._isOverridden_(aMethod);
  980. return $1;
  981. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  982. args: ["aMethod"],
  983. source: "isOverridden: aMethod\x0a ^ self selectorsCache isOverridden: aMethod",
  984. messageSends: ["isOverridden:", "selectorsCache"],
  985. referencedClasses: []
  986. }),
  987. smalltalk.HLMethodsListWidget);
  988. smalltalk.addMethod(
  989. "_isOverride_",
  990. smalltalk.method({
  991. selector: "isOverride:",
  992. category: 'testing',
  993. fn: function (aMethod){
  994. var self=this;
  995. return smalltalk.withContext(function($ctx1) { var $1;
  996. $1=_st(_st(self)._selectorsCache())._isOverride_(aMethod);
  997. return $1;
  998. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  999. args: ["aMethod"],
  1000. source: "isOverride: aMethod\x0a ^ self selectorsCache isOverride: aMethod",
  1001. messageSends: ["isOverride:", "selectorsCache"],
  1002. referencedClasses: []
  1003. }),
  1004. smalltalk.HLMethodsListWidget);
  1005. smalltalk.addMethod(
  1006. "_methodForSelector_",
  1007. smalltalk.method({
  1008. selector: "methodForSelector:",
  1009. category: 'accessing',
  1010. fn: function (aSelector){
  1011. var self=this;
  1012. return smalltalk.withContext(function($ctx1) { var $1;
  1013. $1=_st(_st(_st(_st(self)._model())._selectedClass())._methodDictionary())._at_(aSelector);
  1014. return $1;
  1015. }, function($ctx1) {$ctx1.fill(self,"methodForSelector:",{aSelector:aSelector}, smalltalk.HLMethodsListWidget)})},
  1016. args: ["aSelector"],
  1017. source: "methodForSelector: aSelector\x0a\x09^ self model selectedClass\x0a \x09methodDictionary at: aSelector",
  1018. messageSends: ["at:", "methodDictionary", "selectedClass", "model"],
  1019. referencedClasses: []
  1020. }),
  1021. smalltalk.HLMethodsListWidget);
  1022. smalltalk.addMethod(
  1023. "_methodsInProtocol_",
  1024. smalltalk.method({
  1025. selector: "methodsInProtocol:",
  1026. category: 'accessing',
  1027. fn: function (aString){
  1028. var self=this;
  1029. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1030. $2=_st(aString).__eq(_st(self)._allProtocol());
  1031. if(smalltalk.assert($2)){
  1032. $1=_st(_st(_st(self)._model())._selectedClass())._methods();
  1033. } else {
  1034. $1=_st(_st(_st(self)._model())._selectedClass())._methodsInProtocol_(aString);
  1035. };
  1036. return $1;
  1037. }, function($ctx1) {$ctx1.fill(self,"methodsInProtocol:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  1038. args: ["aString"],
  1039. source: "methodsInProtocol: aString\x0a\x09^ aString = self allProtocol\x0a \x09ifTrue: [ self model selectedClass methods ]\x0a \x09ifFalse: [ self model selectedClass methodsInProtocol: aString ]",
  1040. messageSends: ["ifTrue:ifFalse:", "methods", "selectedClass", "model", "methodsInProtocol:", "=", "allProtocol"],
  1041. referencedClasses: []
  1042. }),
  1043. smalltalk.HLMethodsListWidget);
  1044. smalltalk.addMethod(
  1045. "_observeModel",
  1046. smalltalk.method({
  1047. selector: "observeModel",
  1048. category: 'actions',
  1049. fn: function (){
  1050. var self=this;
  1051. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  1052. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  1053. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1054. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  1055. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(nil);
  1056. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1057. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLMethodSelected || HLMethodSelected),(function(ann){
  1058. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodSelected_(_st(ann)._item());
  1059. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1060. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLMethodsListWidget)})},
  1061. args: [],
  1062. 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 ]",
  1063. messageSends: ["on:do:", "onProtocolSelected:", "item", "announcer", "model", "onMethodSelected:"],
  1064. referencedClasses: ["HLProtocolSelected", "HLShowInstanceToggled", "HLMethodSelected"]
  1065. }),
  1066. smalltalk.HLMethodsListWidget);
  1067. smalltalk.addMethod(
  1068. "_observeSystem",
  1069. smalltalk.method({
  1070. selector: "observeSystem",
  1071. category: 'actions',
  1072. fn: function (){
  1073. var self=this;
  1074. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1075. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  1076. _st($1)._on_do_((smalltalk.MethodAdded || MethodAdded),(function(ann){
  1077. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodAdded_(_st(ann)._method());
  1078. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1079. $2=_st($1)._on_do_((smalltalk.MethodRemoved || MethodRemoved),(function(ann){
  1080. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodRemoved_(_st(ann)._method());
  1081. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1082. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLMethodsListWidget)})},
  1083. args: [],
  1084. 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 ]",
  1085. messageSends: ["on:do:", "onMethodAdded:", "method", "current", "onMethodRemoved:"],
  1086. referencedClasses: ["MethodAdded", "SystemAnnouncer", "MethodRemoved"]
  1087. }),
  1088. smalltalk.HLMethodsListWidget);
  1089. smalltalk.addMethod(
  1090. "_onMethodAdded_",
  1091. smalltalk.method({
  1092. selector: "onMethodAdded:",
  1093. category: 'reactions',
  1094. fn: function (aMethod){
  1095. var self=this;
  1096. return smalltalk.withContext(function($ctx1) { var $1;
  1097. var $early={};
  1098. try {
  1099. _st(_st(self)._items())._detect_ifNone_((function(each){
  1100. return smalltalk.withContext(function($ctx2) { return _st(each).__eq(_st(aMethod)._selector());
  1101. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  1102. return smalltalk.withContext(function($ctx2) { $1=self;
  1103. throw $early=[$1];
  1104. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1105. _st(self)._refresh();
  1106. return self}
  1107. catch(e) {if(e===$early)return e[0]; throw e}
  1108. }, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  1109. args: ["aMethod"],
  1110. source: "onMethodAdded: aMethod\x0a\x09self items detect: [ :each | each = aMethod selector ] ifNone: [ ^ self ].\x0a \x0a self refresh",
  1111. messageSends: ["detect:ifNone:", "=", "selector", "items", "refresh"],
  1112. referencedClasses: []
  1113. }),
  1114. smalltalk.HLMethodsListWidget);
  1115. smalltalk.addMethod(
  1116. "_onMethodRemoved_",
  1117. smalltalk.method({
  1118. selector: "onMethodRemoved:",
  1119. category: 'reactions',
  1120. fn: function (aMethod){
  1121. var self=this;
  1122. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1123. var $early={};
  1124. try {
  1125. _st(_st(self)._items())._detect_ifNone_((function(each){
  1126. return smalltalk.withContext(function($ctx2) { return _st(each).__eq(_st(aMethod)._selector());
  1127. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  1128. return smalltalk.withContext(function($ctx2) { $1=self;
  1129. throw $early=[$1];
  1130. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1131. $2=_st(_st(_st(aMethod)._methodClass()).__eq(_st(_st(self)._model())._selectedClass()))._and_((function(){
  1132. return smalltalk.withContext(function($ctx2) { return _st(_st(aMethod)._selector()).__eq(_st(self)._selectedItem());
  1133. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1134. if(smalltalk.assert($2)){
  1135. _st(self)._selectItem_(nil);
  1136. };
  1137. _st(self)._refresh();
  1138. return self}
  1139. catch(e) {if(e===$early)return e[0]; throw e}
  1140. }, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  1141. args: ["aMethod"],
  1142. 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",
  1143. messageSends: ["detect:ifNone:", "=", "selector", "items", "ifTrue:", "selectItem:", "and:", "selectedItem", "selectedClass", "model", "methodClass", "refresh"],
  1144. referencedClasses: []
  1145. }),
  1146. smalltalk.HLMethodsListWidget);
  1147. smalltalk.addMethod(
  1148. "_onMethodSelected_",
  1149. smalltalk.method({
  1150. selector: "onMethodSelected:",
  1151. category: 'reactions',
  1152. fn: function (aMethod){
  1153. var self=this;
  1154. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1155. _st(self)._selectedItem_(aMethod);
  1156. $1=aMethod;
  1157. if(($receiver = $1) == nil || $receiver == undefined){
  1158. $2=self;
  1159. return $2;
  1160. } else {
  1161. $1;
  1162. };
  1163. _st(self)._focus();
  1164. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  1165. args: ["aMethod"],
  1166. source: "onMethodSelected: aMethod\x0a\x09self selectedItem: aMethod.\x0a\x09aMethod ifNil: [ ^ self ].\x0a \x0a self focus",
  1167. messageSends: ["selectedItem:", "ifNil:", "focus"],
  1168. referencedClasses: []
  1169. }),
  1170. smalltalk.HLMethodsListWidget);
  1171. smalltalk.addMethod(
  1172. "_onProtocolSelected_",
  1173. smalltalk.method({
  1174. selector: "onProtocolSelected:",
  1175. category: 'reactions',
  1176. fn: function (aString){
  1177. var self=this;
  1178. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  1179. _st(self)._selectedItem_(nil);
  1180. $1=self;
  1181. $3=_st(_st(self)._model())._selectedClass();
  1182. if(($receiver = $3) == nil || $receiver == undefined){
  1183. $2=[];
  1184. } else {
  1185. $4=aString;
  1186. if(($receiver = $4) == nil || $receiver == undefined){
  1187. $2=[];
  1188. } else {
  1189. $2=_st(self)._selectorsInProtocol_(aString);
  1190. };
  1191. };
  1192. _st($1)._items_($2);
  1193. _st(self)._refresh();
  1194. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  1195. args: ["aString"],
  1196. 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",
  1197. messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "selectorsInProtocol:", "selectedClass", "model", "refresh"],
  1198. referencedClasses: []
  1199. }),
  1200. smalltalk.HLMethodsListWidget);
  1201. smalltalk.addMethod(
  1202. "_overrideSelectors",
  1203. smalltalk.method({
  1204. selector: "overrideSelectors",
  1205. category: 'accessing',
  1206. fn: function (){
  1207. var self=this;
  1208. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1209. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("override",(function(){
  1210. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(_st(self)._model())._selectedClass())._allSuperclasses())._inject_into_(_st((smalltalk.Set || Set))._new(),(function(acc,each){
  1211. return smalltalk.withContext(function($ctx3) { $2=acc;
  1212. _st($2)._addAll_(_st(each)._selectors());
  1213. $3=_st($2)._yourself();
  1214. return $3;
  1215. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  1216. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1217. return $1;
  1218. }, function($ctx1) {$ctx1.fill(self,"overrideSelectors",{}, smalltalk.HLMethodsListWidget)})},
  1219. args: [],
  1220. 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 ] ]",
  1221. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSuperclasses", "selectedClass", "model", "selectorsCache"],
  1222. referencedClasses: ["Set"]
  1223. }),
  1224. smalltalk.HLMethodsListWidget);
  1225. smalltalk.addMethod(
  1226. "_overridenSelectors",
  1227. smalltalk.method({
  1228. selector: "overridenSelectors",
  1229. category: 'accessing',
  1230. fn: function (){
  1231. var self=this;
  1232. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1233. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("overriden",(function(){
  1234. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(_st(self)._model())._selectedClass())._allSubclasses())._inject_into_(_st((smalltalk.Set || Set))._new(),(function(acc,each){
  1235. return smalltalk.withContext(function($ctx3) { $2=acc;
  1236. _st($2)._addAll_(_st(each)._selectors());
  1237. $3=_st($2)._yourself();
  1238. return $3;
  1239. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  1240. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1241. return $1;
  1242. }, function($ctx1) {$ctx1.fill(self,"overridenSelectors",{}, smalltalk.HLMethodsListWidget)})},
  1243. args: [],
  1244. 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 ] ]",
  1245. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSubclasses", "selectedClass", "model", "selectorsCache"],
  1246. referencedClasses: ["Set"]
  1247. }),
  1248. smalltalk.HLMethodsListWidget);
  1249. smalltalk.addMethod(
  1250. "_renderContentOn_",
  1251. smalltalk.method({
  1252. selector: "renderContentOn:",
  1253. category: 'rendering',
  1254. fn: function (html){
  1255. var self=this;
  1256. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1257. $1=_st(_st(self)._model())._showInstance();
  1258. if(smalltalk.assert($1)){
  1259. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1260. } else {
  1261. $2=_st(html)._div();
  1262. _st($2)._class_("class_side");
  1263. $3=_st($2)._with_((function(){
  1264. return smalltalk.withContext(function($ctx2) { return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1265. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1266. $3;
  1267. };
  1268. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLMethodsListWidget)})},
  1269. args: ["html"],
  1270. 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 ]",
  1271. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"],
  1272. referencedClasses: []
  1273. }),
  1274. smalltalk.HLMethodsListWidget);
  1275. smalltalk.addMethod(
  1276. "_renderItemLabel_on_",
  1277. smalltalk.method({
  1278. selector: "renderItemLabel:on:",
  1279. category: 'rendering',
  1280. fn: function (aSelector,html){
  1281. var self=this;
  1282. return smalltalk.withContext(function($ctx1) { _st(html)._with_(aSelector);
  1283. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aSelector:aSelector,html:html}, smalltalk.HLMethodsListWidget)})},
  1284. args: ["aSelector", "html"],
  1285. source: "renderItemLabel: aSelector on: html\x0a\x09html with: aSelector",
  1286. messageSends: ["with:"],
  1287. referencedClasses: []
  1288. }),
  1289. smalltalk.HLMethodsListWidget);
  1290. smalltalk.addMethod(
  1291. "_selectItem_",
  1292. smalltalk.method({
  1293. selector: "selectItem:",
  1294. category: 'actions',
  1295. fn: function (aSelector){
  1296. var self=this;
  1297. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedMethod_(_st(self)._methodForSelector_(aSelector));
  1298. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aSelector:aSelector}, smalltalk.HLMethodsListWidget)})},
  1299. args: ["aSelector"],
  1300. source: "selectItem: aSelector\x0a \x09self model selectedMethod: (self methodForSelector: aSelector)\x0a ",
  1301. messageSends: ["selectedMethod:", "methodForSelector:", "model"],
  1302. referencedClasses: []
  1303. }),
  1304. smalltalk.HLMethodsListWidget);
  1305. smalltalk.addMethod(
  1306. "_selectorsCache",
  1307. smalltalk.method({
  1308. selector: "selectorsCache",
  1309. category: 'accessing',
  1310. fn: function (){
  1311. var self=this;
  1312. return smalltalk.withContext(function($ctx1) { var $1;
  1313. $1=_st(_st(self)._class())._selectorsCache();
  1314. return $1;
  1315. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLMethodsListWidget)})},
  1316. args: [],
  1317. source: "selectorsCache\x0a\x09^ self class selectorsCache",
  1318. messageSends: ["selectorsCache", "class"],
  1319. referencedClasses: []
  1320. }),
  1321. smalltalk.HLMethodsListWidget);
  1322. smalltalk.addMethod(
  1323. "_selectorsInProtocol_",
  1324. smalltalk.method({
  1325. selector: "selectorsInProtocol:",
  1326. category: 'accessing',
  1327. fn: function (aString){
  1328. var self=this;
  1329. return smalltalk.withContext(function($ctx1) { var $1;
  1330. $1=_st(_st(self)._methodsInProtocol_(aString))._collect_((function(each){
  1331. return smalltalk.withContext(function($ctx2) { return _st(each)._selector();
  1332. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1333. return $1;
  1334. }, function($ctx1) {$ctx1.fill(self,"selectorsInProtocol:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  1335. args: ["aString"],
  1336. source: "selectorsInProtocol: aString\x0a\x09^ (self methodsInProtocol: aString)\x0a \x09collect: [ :each | each selector ]",
  1337. messageSends: ["collect:", "selector", "methodsInProtocol:"],
  1338. referencedClasses: []
  1339. }),
  1340. smalltalk.HLMethodsListWidget);
  1341. smalltalk.HLMethodsListWidget.klass.iVarNames = ['selectorsCache'];
  1342. smalltalk.addMethod(
  1343. "_selectorsCache",
  1344. smalltalk.method({
  1345. selector: "selectorsCache",
  1346. category: 'accessing',
  1347. fn: function (){
  1348. var self=this;
  1349. return smalltalk.withContext(function($ctx1) { var $1;
  1350. $1=_st((smalltalk.HLSelectorsCache || HLSelectorsCache))._current();
  1351. return $1;
  1352. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLMethodsListWidget.klass)})},
  1353. args: [],
  1354. source: "selectorsCache\x0a\x09^ HLSelectorsCache current",
  1355. messageSends: ["current"],
  1356. referencedClasses: ["HLSelectorsCache"]
  1357. }),
  1358. smalltalk.HLMethodsListWidget.klass);
  1359. smalltalk.addClass('HLPackagesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1360. smalltalk.addMethod(
  1361. "_focusClassesListWidget",
  1362. smalltalk.method({
  1363. selector: "focusClassesListWidget",
  1364. category: 'actions',
  1365. fn: function (){
  1366. var self=this;
  1367. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._announce_(_st((smalltalk.HLClassesListFocus || HLClassesListFocus))._new());
  1368. return self}, function($ctx1) {$ctx1.fill(self,"focusClassesListWidget",{}, smalltalk.HLPackagesListWidget)})},
  1369. args: [],
  1370. source: "focusClassesListWidget\x0a\x09self model announcer announce: HLClassesListFocus new",
  1371. messageSends: ["announce:", "new", "announcer", "model"],
  1372. referencedClasses: ["HLClassesListFocus"]
  1373. }),
  1374. smalltalk.HLPackagesListWidget);
  1375. smalltalk.addMethod(
  1376. "_initializeItems",
  1377. smalltalk.method({
  1378. selector: "initializeItems",
  1379. category: 'accessing',
  1380. fn: function (){
  1381. var self=this;
  1382. return smalltalk.withContext(function($ctx1) { var $1;
  1383. self["@items"]=_st(_st(_st(self)._model())._packages())._sort_((function(a,b){
  1384. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._name()).__lt(_st(b)._name());
  1385. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  1386. $1=self["@items"];
  1387. return $1;
  1388. }, function($ctx1) {$ctx1.fill(self,"initializeItems",{}, smalltalk.HLPackagesListWidget)})},
  1389. args: [],
  1390. source: "initializeItems\x0a\x09^ items := self model packages sort:[:a :b|\x0a\x09\x09\x09\x09\x09\x09a name < b name]",
  1391. messageSends: ["sort:", "<", "name", "packages", "model"],
  1392. referencedClasses: []
  1393. }),
  1394. smalltalk.HLPackagesListWidget);
  1395. smalltalk.addMethod(
  1396. "_items",
  1397. smalltalk.method({
  1398. selector: "items",
  1399. category: 'accessing',
  1400. fn: function (){
  1401. var self=this;
  1402. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1403. $2=self["@items"];
  1404. if(($receiver = $2) == nil || $receiver == undefined){
  1405. $1=_st(self)._initializeItems();
  1406. } else {
  1407. $1=$2;
  1408. };
  1409. return $1;
  1410. }, function($ctx1) {$ctx1.fill(self,"items",{}, smalltalk.HLPackagesListWidget)})},
  1411. args: [],
  1412. source: "items\x0a\x09^ items ifNil: [self initializeItems]",
  1413. messageSends: ["ifNil:", "initializeItems"],
  1414. referencedClasses: []
  1415. }),
  1416. smalltalk.HLPackagesListWidget);
  1417. smalltalk.addMethod(
  1418. "_observeModel",
  1419. smalltalk.method({
  1420. selector: "observeModel",
  1421. category: 'actions',
  1422. fn: function (){
  1423. var self=this;
  1424. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLPackageSelected || HLPackageSelected),(function(ann){
  1425. return smalltalk.withContext(function($ctx2) { return _st(self)._onPackageSelected_(_st(ann)._item());
  1426. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1427. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLPackagesListWidget)})},
  1428. args: [],
  1429. source: "observeModel\x0a self model announcer on: HLPackageSelected do: [ :ann |\x0a \x09self onPackageSelected: ann item ]",
  1430. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model"],
  1431. referencedClasses: ["HLPackageSelected"]
  1432. }),
  1433. smalltalk.HLPackagesListWidget);
  1434. smalltalk.addMethod(
  1435. "_onPackageSelected_",
  1436. smalltalk.method({
  1437. selector: "onPackageSelected:",
  1438. category: 'reactions',
  1439. fn: function (aPackage){
  1440. var self=this;
  1441. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(aPackage);
  1442. _st(self)._focus();
  1443. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{aPackage:aPackage}, smalltalk.HLPackagesListWidget)})},
  1444. args: ["aPackage"],
  1445. source: "onPackageSelected: aPackage\x0a\x09self selectedItem: aPackage.\x0a\x09self focus",
  1446. messageSends: ["selectedItem:", "focus"],
  1447. referencedClasses: []
  1448. }),
  1449. smalltalk.HLPackagesListWidget);
  1450. smalltalk.addMethod(
  1451. "_renderButtonsOn_",
  1452. smalltalk.method({
  1453. selector: "renderButtonsOn:",
  1454. category: 'rendering',
  1455. fn: function (html){
  1456. var self=this;
  1457. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$5,$6,$7,$8,$4,$9,$10;
  1458. $1=_st(html)._span();
  1459. _st($1)._class_("info");
  1460. $2=_st($1)._with_("Auto commit");
  1461. $3=_st(html)._div();
  1462. _st($3)._class_("btn-group switch");
  1463. _st($3)._at_put_("data-toggle","buttons-radio");
  1464. $4=_st($3)._with_((function(){
  1465. return smalltalk.withContext(function($ctx2) { $5=_st(html)._button();
  1466. _st($5)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  1467. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("btn");
  1468. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1469. $6=_st($5)._with_("On");
  1470. $6;
  1471. $7=_st(html)._button();
  1472. _st($7)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  1473. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("btn active");
  1474. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1475. $8=_st($7)._with_("Off");
  1476. return $8;
  1477. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1478. $9=_st(html)._a();
  1479. _st($9)._class_("btn");
  1480. $10=_st($9)._with_("Commit");
  1481. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.HLPackagesListWidget)})},
  1482. args: ["html"],
  1483. 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'.",
  1484. messageSends: ["class:", "span", "with:", "div", "at:put:", "streamContents:", "nextPutAll:", "button", "a"],
  1485. referencedClasses: ["String"]
  1486. }),
  1487. smalltalk.HLPackagesListWidget);
  1488. smalltalk.addMethod(
  1489. "_selectItem_",
  1490. smalltalk.method({
  1491. selector: "selectItem:",
  1492. category: 'actions',
  1493. fn: function (aPackage){
  1494. var self=this;
  1495. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedPackage_(aPackage);
  1496. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aPackage:aPackage}, smalltalk.HLPackagesListWidget)})},
  1497. args: ["aPackage"],
  1498. source: "selectItem: aPackage\x0a\x09self model selectedPackage: aPackage",
  1499. messageSends: ["selectedPackage:", "model"],
  1500. referencedClasses: []
  1501. }),
  1502. smalltalk.HLPackagesListWidget);
  1503. smalltalk.addClass('HLProtocolsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1504. smalltalk.addMethod(
  1505. "_allProtocol",
  1506. smalltalk.method({
  1507. selector: "allProtocol",
  1508. category: 'accessing',
  1509. fn: function (){
  1510. var self=this;
  1511. return smalltalk.withContext(function($ctx1) { var $1;
  1512. $1=_st(_st(self)._model())._allProtocol();
  1513. return $1;
  1514. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLProtocolsListWidget)})},
  1515. args: [],
  1516. source: "allProtocol\x0a\x09^ self model allProtocol",
  1517. messageSends: ["allProtocol", "model"],
  1518. referencedClasses: []
  1519. }),
  1520. smalltalk.HLProtocolsListWidget);
  1521. smalltalk.addMethod(
  1522. "_observeModel",
  1523. smalltalk.method({
  1524. selector: "observeModel",
  1525. category: 'actions',
  1526. fn: function (){
  1527. var self=this;
  1528. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  1529. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  1530. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1531. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  1532. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(_st(self)._model())._selectedClass());
  1533. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1534. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  1535. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  1536. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1537. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLProtocolsListWidget)})},
  1538. args: [],
  1539. 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 ]",
  1540. messageSends: ["on:do:", "onClassSelected:", "item", "announcer", "model", "selectedClass", "onProtocolSelected:"],
  1541. referencedClasses: ["HLClassSelected", "HLShowInstanceToggled", "HLProtocolSelected"]
  1542. }),
  1543. smalltalk.HLProtocolsListWidget);
  1544. smalltalk.addMethod(
  1545. "_onClassSelected_",
  1546. smalltalk.method({
  1547. selector: "onClassSelected:",
  1548. category: 'reactions',
  1549. fn: function (aClass){
  1550. var self=this;
  1551. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$2;
  1552. _st(self)._selectedItem_(nil);
  1553. $1=self;
  1554. $3=aClass;
  1555. if(($receiver = $3) == nil || $receiver == undefined){
  1556. $2=_st((smalltalk.Array || Array))._with_(_st(self)._allProtocol());
  1557. } else {
  1558. $4=_st((smalltalk.Array || Array))._with_(_st(self)._allProtocol());
  1559. _st($4)._addAll_(_st(aClass)._protocols());
  1560. $5=_st($4)._yourself();
  1561. $2=$5;
  1562. };
  1563. _st($1)._items_($2);
  1564. _st(self)._refresh();
  1565. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLProtocolsListWidget)})},
  1566. args: ["aClass"],
  1567. 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",
  1568. messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself", "refresh"],
  1569. referencedClasses: ["Array"]
  1570. }),
  1571. smalltalk.HLProtocolsListWidget);
  1572. smalltalk.addMethod(
  1573. "_onProtocolSelected_",
  1574. smalltalk.method({
  1575. selector: "onProtocolSelected:",
  1576. category: 'reactions',
  1577. fn: function (aString){
  1578. var self=this;
  1579. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1580. _st(self)._selectedItem_(aString);
  1581. $1=aString;
  1582. if(($receiver = $1) == nil || $receiver == undefined){
  1583. $2=self;
  1584. return $2;
  1585. } else {
  1586. $1;
  1587. };
  1588. _st(self)._focus();
  1589. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLProtocolsListWidget)})},
  1590. args: ["aString"],
  1591. source: "onProtocolSelected: aString\x0a\x09self selectedItem: aString.\x0a\x09aString ifNil: [ ^ self ].\x0a \x0a self focus",
  1592. messageSends: ["selectedItem:", "ifNil:", "focus"],
  1593. referencedClasses: []
  1594. }),
  1595. smalltalk.HLProtocolsListWidget);
  1596. smalltalk.addMethod(
  1597. "_renderContentOn_",
  1598. smalltalk.method({
  1599. selector: "renderContentOn:",
  1600. category: 'rendering',
  1601. fn: function (html){
  1602. var self=this;
  1603. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1604. $1=_st(_st(self)._model())._showInstance();
  1605. if(smalltalk.assert($1)){
  1606. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1607. } else {
  1608. $2=_st(html)._div();
  1609. _st($2)._class_("class_side");
  1610. $3=_st($2)._with_((function(){
  1611. return smalltalk.withContext(function($ctx2) { return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1612. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1613. $3;
  1614. };
  1615. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLProtocolsListWidget)})},
  1616. args: ["html"],
  1617. 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 ]",
  1618. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"],
  1619. referencedClasses: []
  1620. }),
  1621. smalltalk.HLProtocolsListWidget);
  1622. smalltalk.addMethod(
  1623. "_selectItem_",
  1624. smalltalk.method({
  1625. selector: "selectItem:",
  1626. category: 'actions',
  1627. fn: function (aString){
  1628. var self=this;
  1629. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedProtocol_(aString);
  1630. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aString:aString}, smalltalk.HLProtocolsListWidget)})},
  1631. args: ["aString"],
  1632. source: "selectItem: aString\x0a self model selectedProtocol: aString",
  1633. messageSends: ["selectedProtocol:", "model"],
  1634. referencedClasses: []
  1635. }),
  1636. smalltalk.HLProtocolsListWidget);
  1637. smalltalk.addMethod(
  1638. "_selectedItem",
  1639. smalltalk.method({
  1640. selector: "selectedItem",
  1641. category: 'accessing',
  1642. fn: function (){
  1643. var self=this;
  1644. return smalltalk.withContext(function($ctx1) { var $1;
  1645. $1=smalltalk.HLBrowserListWidget.fn.prototype._selectedItem.apply(_st(self), []);
  1646. return $1;
  1647. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{}, smalltalk.HLProtocolsListWidget)})},
  1648. args: [],
  1649. source: "selectedItem\x0a\x09^ super selectedItem\x22 ifNil: [ self allProtocol ]\x22",
  1650. messageSends: ["selectedItem"],
  1651. referencedClasses: []
  1652. }),
  1653. smalltalk.HLProtocolsListWidget);
  1654. smalltalk.addClass('HLBrowserModel', smalltalk.Object, ['announcer', 'environment', 'selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedSelector', 'showInstance', 'showComment'], 'Helios-Browser');
  1655. smalltalk.addMethod(
  1656. "_allProtocol",
  1657. smalltalk.method({
  1658. selector: "allProtocol",
  1659. category: 'accessing',
  1660. fn: function (){
  1661. var self=this;
  1662. return smalltalk.withContext(function($ctx1) { return "-- All --";
  1663. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLBrowserModel)})},
  1664. args: [],
  1665. source: "allProtocol\x0a\x09^ '-- All --'",
  1666. messageSends: [],
  1667. referencedClasses: []
  1668. }),
  1669. smalltalk.HLBrowserModel);
  1670. smalltalk.addMethod(
  1671. "_announcer",
  1672. smalltalk.method({
  1673. selector: "announcer",
  1674. category: 'accessing',
  1675. fn: function (){
  1676. var self=this;
  1677. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1678. $2=self["@announcer"];
  1679. if(($receiver = $2) == nil || $receiver == undefined){
  1680. self["@announcer"]=_st((smalltalk.Announcer || Announcer))._new();
  1681. $1=self["@announcer"];
  1682. } else {
  1683. $1=$2;
  1684. };
  1685. return $1;
  1686. }, function($ctx1) {$ctx1.fill(self,"announcer",{}, smalltalk.HLBrowserModel)})},
  1687. args: [],
  1688. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  1689. messageSends: ["ifNil:", "new"],
  1690. referencedClasses: ["Announcer"]
  1691. }),
  1692. smalltalk.HLBrowserModel);
  1693. smalltalk.addMethod(
  1694. "_environment",
  1695. smalltalk.method({
  1696. selector: "environment",
  1697. category: 'accessing',
  1698. fn: function (){
  1699. var self=this;
  1700. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1701. $2=self["@environment"];
  1702. if(($receiver = $2) == nil || $receiver == undefined){
  1703. $1=_st(_st((smalltalk.HLManager || HLManager))._current())._environment();
  1704. } else {
  1705. $1=$2;
  1706. };
  1707. return $1;
  1708. }, function($ctx1) {$ctx1.fill(self,"environment",{}, smalltalk.HLBrowserModel)})},
  1709. args: [],
  1710. source: "environment\x0a\x09^ environment ifNil: [ HLManager current environment ]",
  1711. messageSends: ["ifNil:", "environment", "current"],
  1712. referencedClasses: ["HLManager"]
  1713. }),
  1714. smalltalk.HLBrowserModel);
  1715. smalltalk.addMethod(
  1716. "_environment_",
  1717. smalltalk.method({
  1718. selector: "environment:",
  1719. category: 'accessing',
  1720. fn: function (anEnvironment){
  1721. var self=this;
  1722. return smalltalk.withContext(function($ctx1) { self["@environment"]=anEnvironment;
  1723. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel)})},
  1724. args: ["anEnvironment"],
  1725. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  1726. messageSends: [],
  1727. referencedClasses: []
  1728. }),
  1729. smalltalk.HLBrowserModel);
  1730. smalltalk.addMethod(
  1731. "_packages",
  1732. smalltalk.method({
  1733. selector: "packages",
  1734. category: 'accessing',
  1735. fn: function (){
  1736. var self=this;
  1737. return smalltalk.withContext(function($ctx1) { var $1;
  1738. $1=_st(_st(self)._environment())._packages();
  1739. return $1;
  1740. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLBrowserModel)})},
  1741. args: [],
  1742. source: "packages\x0a\x09^ self environment packages",
  1743. messageSends: ["packages", "environment"],
  1744. referencedClasses: []
  1745. }),
  1746. smalltalk.HLBrowserModel);
  1747. smalltalk.addMethod(
  1748. "_selectedClass",
  1749. smalltalk.method({
  1750. selector: "selectedClass",
  1751. category: 'accessing',
  1752. fn: function (){
  1753. var self=this;
  1754. return smalltalk.withContext(function($ctx1) { var $1;
  1755. $1=self["@selectedClass"];
  1756. return $1;
  1757. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{}, smalltalk.HLBrowserModel)})},
  1758. args: [],
  1759. source: "selectedClass\x0a\x09^ selectedClass",
  1760. messageSends: [],
  1761. referencedClasses: []
  1762. }),
  1763. smalltalk.HLBrowserModel);
  1764. smalltalk.addMethod(
  1765. "_selectedClass_",
  1766. smalltalk.method({
  1767. selector: "selectedClass:",
  1768. category: 'accessing',
  1769. fn: function (aClass){
  1770. var self=this;
  1771. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  1772. $1=_st(self["@selectedClass"]).__eq(aClass);
  1773. if(smalltalk.assert($1)){
  1774. $2=self;
  1775. return $2;
  1776. };
  1777. $3=aClass;
  1778. if(($receiver = $3) == nil || $receiver == undefined){
  1779. self["@selectedClass"]=nil;
  1780. self["@selectedClass"];
  1781. } else {
  1782. $4=_st(self)._showInstance();
  1783. if(smalltalk.assert($4)){
  1784. self["@selectedClass"]=_st(aClass)._theNonMetaClass();
  1785. self["@selectedClass"];
  1786. } else {
  1787. self["@selectedClass"]=_st(aClass)._theMetaClass();
  1788. self["@selectedClass"];
  1789. };
  1790. };
  1791. _st(self)._selectedProtocol_(nil);
  1792. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLClassSelected || HLClassSelected))._on_(_st(self)._selectedClass()));
  1793. return self}, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass}, smalltalk.HLBrowserModel)})},
  1794. args: ["aClass"],
  1795. 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)",
  1796. messageSends: ["ifTrue:", "=", "ifNil:ifNotNil:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "showInstance", "selectedProtocol:", "announce:", "on:", "selectedClass", "announcer"],
  1797. referencedClasses: ["HLClassSelected"]
  1798. }),
  1799. smalltalk.HLBrowserModel);
  1800. smalltalk.addMethod(
  1801. "_selectedMethod",
  1802. smalltalk.method({
  1803. selector: "selectedMethod",
  1804. category: 'accessing',
  1805. fn: function (){
  1806. var self=this;
  1807. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1808. $2=_st(self)._selectedClass();
  1809. if(($receiver = $2) == nil || $receiver == undefined){
  1810. $1=$2;
  1811. } else {
  1812. $1=_st(_st(_st(self)._selectedClass())._methodDictionary())._at_(self["@selectedSelector"]);
  1813. };
  1814. return $1;
  1815. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{}, smalltalk.HLBrowserModel)})},
  1816. args: [],
  1817. source: "selectedMethod\x0a\x09^ self selectedClass\x0a \x09ifNotNil: [ self selectedClass methodDictionary at: selectedSelector ]",
  1818. messageSends: ["ifNotNil:", "at:", "methodDictionary", "selectedClass"],
  1819. referencedClasses: []
  1820. }),
  1821. smalltalk.HLBrowserModel);
  1822. smalltalk.addMethod(
  1823. "_selectedMethod_",
  1824. smalltalk.method({
  1825. selector: "selectedMethod:",
  1826. category: 'accessing',
  1827. fn: function (aCompiledMethod){
  1828. var self=this;
  1829. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  1830. $1=_st(self["@selectedSelector"]).__eq(aCompiledMethod);
  1831. if(smalltalk.assert($1)){
  1832. $2=self;
  1833. return $2;
  1834. };
  1835. $3=aCompiledMethod;
  1836. if(($receiver = $3) == nil || $receiver == undefined){
  1837. self["@selectedSelector"]=nil;
  1838. self["@selectedSelector"];
  1839. } else {
  1840. $4=_st(self["@selectedSelector"]).__eq(_st(aCompiledMethod)._selector());
  1841. if(smalltalk.assert($4)){
  1842. $5=self;
  1843. return $5;
  1844. };
  1845. self["@selectedSelector"]=_st(aCompiledMethod)._selector();
  1846. self["@selectedSelector"];
  1847. };
  1848. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLMethodSelected || HLMethodSelected))._on_(aCompiledMethod));
  1849. return self}, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserModel)})},
  1850. args: ["aCompiledMethod"],
  1851. 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)",
  1852. messageSends: ["ifTrue:", "=", "ifNil:ifNotNil:", "selector", "announce:", "on:", "announcer"],
  1853. referencedClasses: ["HLMethodSelected"]
  1854. }),
  1855. smalltalk.HLBrowserModel);
  1856. smalltalk.addMethod(
  1857. "_selectedPackage",
  1858. smalltalk.method({
  1859. selector: "selectedPackage",
  1860. category: 'accessing',
  1861. fn: function (){
  1862. var self=this;
  1863. return smalltalk.withContext(function($ctx1) { var $1;
  1864. $1=self["@selectedPackage"];
  1865. return $1;
  1866. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{}, smalltalk.HLBrowserModel)})},
  1867. args: [],
  1868. source: "selectedPackage\x0a\x09^ selectedPackage",
  1869. messageSends: [],
  1870. referencedClasses: []
  1871. }),
  1872. smalltalk.HLBrowserModel);
  1873. smalltalk.addMethod(
  1874. "_selectedPackage_",
  1875. smalltalk.method({
  1876. selector: "selectedPackage:",
  1877. category: 'accessing',
  1878. fn: function (aPackage){
  1879. var self=this;
  1880. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1881. $1=_st(self["@selectedPackage"]).__eq(aPackage);
  1882. if(smalltalk.assert($1)){
  1883. $2=self;
  1884. return $2;
  1885. };
  1886. self["@selectedPackage"]=aPackage;
  1887. _st(self)._selectedClass_(nil);
  1888. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLPackageSelected || HLPackageSelected))._on_(aPackage));
  1889. return self}, function($ctx1) {$ctx1.fill(self,"selectedPackage:",{aPackage:aPackage}, smalltalk.HLBrowserModel)})},
  1890. args: ["aPackage"],
  1891. source: "selectedPackage: aPackage\x0a\x09selectedPackage = aPackage ifTrue: [ ^ self ].\x0a \x0a\x09selectedPackage := aPackage.\x0a\x09self selectedClass: nil.\x0a self announcer announce: (HLPackageSelected on: aPackage)",
  1892. messageSends: ["ifTrue:", "=", "selectedClass:", "announce:", "on:", "announcer"],
  1893. referencedClasses: ["HLPackageSelected"]
  1894. }),
  1895. smalltalk.HLBrowserModel);
  1896. smalltalk.addMethod(
  1897. "_selectedProtocol",
  1898. smalltalk.method({
  1899. selector: "selectedProtocol",
  1900. category: 'accessing',
  1901. fn: function (){
  1902. var self=this;
  1903. return smalltalk.withContext(function($ctx1) { var $1;
  1904. $1=self["@selectedProtocol"];
  1905. return $1;
  1906. }, function($ctx1) {$ctx1.fill(self,"selectedProtocol",{}, smalltalk.HLBrowserModel)})},
  1907. args: [],
  1908. source: "selectedProtocol\x0a\x09^ selectedProtocol",
  1909. messageSends: [],
  1910. referencedClasses: []
  1911. }),
  1912. smalltalk.HLBrowserModel);
  1913. smalltalk.addMethod(
  1914. "_selectedProtocol_",
  1915. smalltalk.method({
  1916. selector: "selectedProtocol:",
  1917. category: 'accessing',
  1918. fn: function (aString){
  1919. var self=this;
  1920. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1921. $1=_st(self["@selectedProtocol"]).__eq(aString);
  1922. if(smalltalk.assert($1)){
  1923. $2=self;
  1924. return $2;
  1925. };
  1926. self["@selectedProtocol"]=aString;
  1927. _st(self)._selectedMethod_(nil);
  1928. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLProtocolSelected || HLProtocolSelected))._on_(aString));
  1929. return self}, function($ctx1) {$ctx1.fill(self,"selectedProtocol:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1930. args: ["aString"],
  1931. source: "selectedProtocol: aString\x0a\x09selectedProtocol = aString ifTrue: [ ^ self ].\x0a \x0a\x09selectedProtocol := aString.\x0a self selectedMethod: nil.\x0a self announcer announce: (HLProtocolSelected on: aString)",
  1932. messageSends: ["ifTrue:", "=", "selectedMethod:", "announce:", "on:", "announcer"],
  1933. referencedClasses: ["HLProtocolSelected"]
  1934. }),
  1935. smalltalk.HLBrowserModel);
  1936. smalltalk.addMethod(
  1937. "_showComment",
  1938. smalltalk.method({
  1939. selector: "showComment",
  1940. category: 'accessing',
  1941. fn: function (){
  1942. var self=this;
  1943. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1944. $2=self["@showComment"];
  1945. if(($receiver = $2) == nil || $receiver == undefined){
  1946. $1=false;
  1947. } else {
  1948. $1=$2;
  1949. };
  1950. return $1;
  1951. }, function($ctx1) {$ctx1.fill(self,"showComment",{}, smalltalk.HLBrowserModel)})},
  1952. args: [],
  1953. source: "showComment\x0a\x09^ showComment ifNil: [ false ]",
  1954. messageSends: ["ifNil:"],
  1955. referencedClasses: []
  1956. }),
  1957. smalltalk.HLBrowserModel);
  1958. smalltalk.addMethod(
  1959. "_showComment_",
  1960. smalltalk.method({
  1961. selector: "showComment:",
  1962. category: 'accessing',
  1963. fn: function (aBoolean){
  1964. var self=this;
  1965. return smalltalk.withContext(function($ctx1) { self["@showComment"]=aBoolean;
  1966. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowCommentToggled || HLShowCommentToggled))._new());
  1967. return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  1968. args: ["aBoolean"],
  1969. source: "showComment: aBoolean\x0a\x09showComment := aBoolean.\x0a \x0a self announcer announce: HLShowCommentToggled new",
  1970. messageSends: ["announce:", "new", "announcer"],
  1971. referencedClasses: ["HLShowCommentToggled"]
  1972. }),
  1973. smalltalk.HLBrowserModel);
  1974. smalltalk.addMethod(
  1975. "_showInstance",
  1976. smalltalk.method({
  1977. selector: "showInstance",
  1978. category: 'accessing',
  1979. fn: function (){
  1980. var self=this;
  1981. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1982. $2=self["@showInstance"];
  1983. if(($receiver = $2) == nil || $receiver == undefined){
  1984. $1=true;
  1985. } else {
  1986. $1=$2;
  1987. };
  1988. return $1;
  1989. }, function($ctx1) {$ctx1.fill(self,"showInstance",{}, smalltalk.HLBrowserModel)})},
  1990. args: [],
  1991. source: "showInstance\x0a\x09^ showInstance ifNil: [ true ]",
  1992. messageSends: ["ifNil:"],
  1993. referencedClasses: []
  1994. }),
  1995. smalltalk.HLBrowserModel);
  1996. smalltalk.addMethod(
  1997. "_showInstance_",
  1998. smalltalk.method({
  1999. selector: "showInstance:",
  2000. category: 'accessing',
  2001. fn: function (aBoolean){
  2002. var self=this;
  2003. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$3;
  2004. self["@showInstance"]=aBoolean;
  2005. $1=_st(self)._selectedClass();
  2006. if(($receiver = $1) == nil || $receiver == undefined){
  2007. $1;
  2008. } else {
  2009. $2=self;
  2010. $4=aBoolean;
  2011. if(smalltalk.assert($4)){
  2012. $3=_st(_st(self)._selectedClass())._theNonMetaClass();
  2013. } else {
  2014. $3=_st(_st(self)._selectedClass())._theMetaClass();
  2015. };
  2016. _st($2)._selectedClass_($3);
  2017. };
  2018. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled))._new());
  2019. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  2020. args: ["aBoolean"],
  2021. 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",
  2022. messageSends: ["ifNotNil:", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "selectedClass", "theMetaClass", "announce:", "new", "announcer"],
  2023. referencedClasses: ["HLShowInstanceToggled"]
  2024. }),
  2025. smalltalk.HLBrowserModel);
  2026. smalltalk.addMethod(
  2027. "_on_",
  2028. smalltalk.method({
  2029. selector: "on:",
  2030. category: 'actions',
  2031. fn: function (anEnvironment){
  2032. var self=this;
  2033. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2034. $2=_st(self)._new();
  2035. _st($2)._environment_(anEnvironment);
  2036. $3=_st($2)._yourself();
  2037. $1=$3;
  2038. return $1;
  2039. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel.klass)})},
  2040. args: ["anEnvironment"],
  2041. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  2042. messageSends: ["environment:", "new", "yourself"],
  2043. referencedClasses: []
  2044. }),
  2045. smalltalk.HLBrowserModel.klass);
  2046. smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'methodContents', 'codeWidget'], 'Helios-Browser');
  2047. smalltalk.addMethod(
  2048. "_codeWidget",
  2049. smalltalk.method({
  2050. selector: "codeWidget",
  2051. category: 'accessing',
  2052. fn: function (){
  2053. var self=this;
  2054. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2055. $2=self["@codeWidget"];
  2056. if(($receiver = $2) == nil || $receiver == undefined){
  2057. self["@codeWidget"]=_st((smalltalk.HLCodeWidget || HLCodeWidget))._new();
  2058. $1=self["@codeWidget"];
  2059. } else {
  2060. $1=$2;
  2061. };
  2062. return $1;
  2063. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{}, smalltalk.HLBrowserSourceWidget)})},
  2064. args: [],
  2065. source: "codeWidget\x0a\x09^ codeWidget ifNil: [ codeWidget := HLCodeWidget new ]",
  2066. messageSends: ["ifNil:", "new"],
  2067. referencedClasses: ["HLCodeWidget"]
  2068. }),
  2069. smalltalk.HLBrowserSourceWidget);
  2070. smalltalk.addMethod(
  2071. "_contents",
  2072. smalltalk.method({
  2073. selector: "contents",
  2074. category: 'accessing',
  2075. fn: function (){
  2076. var self=this;
  2077. return smalltalk.withContext(function($ctx1) { var $1;
  2078. $1=_st(_st(self)._codeWidget())._contents();
  2079. return $1;
  2080. }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.HLBrowserSourceWidget)})},
  2081. args: [],
  2082. source: "contents\x0a\x09^ self codeWidget contents",
  2083. messageSends: ["contents", "codeWidget"],
  2084. referencedClasses: []
  2085. }),
  2086. smalltalk.HLBrowserSourceWidget);
  2087. smalltalk.addMethod(
  2088. "_contents_",
  2089. smalltalk.method({
  2090. selector: "contents:",
  2091. category: 'accessing',
  2092. fn: function (aString){
  2093. var self=this;
  2094. return smalltalk.withContext(function($ctx1) { _st(self)._methodContents_(aString);
  2095. _st(_st(self)._codeWidget())._contents_(aString);
  2096. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2097. args: ["aString"],
  2098. source: "contents: aString\x0a\x09self methodContents: aString.\x0a\x09self codeWidget contents: aString",
  2099. messageSends: ["methodContents:", "contents:", "codeWidget"],
  2100. referencedClasses: []
  2101. }),
  2102. smalltalk.HLBrowserSourceWidget);
  2103. smalltalk.addMethod(
  2104. "_hasModification",
  2105. smalltalk.method({
  2106. selector: "hasModification",
  2107. category: 'testing',
  2108. fn: function (){
  2109. var self=this;
  2110. return smalltalk.withContext(function($ctx1) { var $1;
  2111. $1=_st(_st(_st(self)._methodContents()).__eq(_st(self)._contents()))._not();
  2112. return $1;
  2113. }, function($ctx1) {$ctx1.fill(self,"hasModification",{}, smalltalk.HLBrowserSourceWidget)})},
  2114. args: [],
  2115. source: "hasModification\x0a\x09^ (self methodContents = self contents) not",
  2116. messageSends: ["not", "=", "contents", "methodContents"],
  2117. referencedClasses: []
  2118. }),
  2119. smalltalk.HLBrowserSourceWidget);
  2120. smalltalk.addMethod(
  2121. "_initialize",
  2122. smalltalk.method({
  2123. selector: "initialize",
  2124. category: 'initialization',
  2125. fn: function (){
  2126. var self=this;
  2127. return smalltalk.withContext(function($ctx1) { smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  2128. _st(self)._observeSystem();
  2129. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLBrowserSourceWidget)})},
  2130. args: [],
  2131. source: "initialize\x0a\x09super initialize.\x0a \x0a self observeSystem",
  2132. messageSends: ["initialize", "observeSystem"],
  2133. referencedClasses: []
  2134. }),
  2135. smalltalk.HLBrowserSourceWidget);
  2136. smalltalk.addMethod(
  2137. "_methodContents",
  2138. smalltalk.method({
  2139. selector: "methodContents",
  2140. category: 'accessing',
  2141. fn: function (){
  2142. var self=this;
  2143. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2144. $2=self["@methodContents"];
  2145. if(($receiver = $2) == nil || $receiver == undefined){
  2146. self["@methodContents"]="";
  2147. $1=self["@methodContents"];
  2148. } else {
  2149. $1=$2;
  2150. };
  2151. return $1;
  2152. }, function($ctx1) {$ctx1.fill(self,"methodContents",{}, smalltalk.HLBrowserSourceWidget)})},
  2153. args: [],
  2154. source: "methodContents\x0a\x09^ methodContents ifNil: [ methodContents := '' ]",
  2155. messageSends: ["ifNil:"],
  2156. referencedClasses: []
  2157. }),
  2158. smalltalk.HLBrowserSourceWidget);
  2159. smalltalk.addMethod(
  2160. "_methodContents_",
  2161. smalltalk.method({
  2162. selector: "methodContents:",
  2163. category: 'accessing',
  2164. fn: function (aString){
  2165. var self=this;
  2166. return smalltalk.withContext(function($ctx1) { self["@methodContents"]=aString;
  2167. return self}, function($ctx1) {$ctx1.fill(self,"methodContents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2168. args: ["aString"],
  2169. source: "methodContents: aString\x0a\x09methodContents := aString",
  2170. messageSends: [],
  2171. referencedClasses: []
  2172. }),
  2173. smalltalk.HLBrowserSourceWidget);
  2174. smalltalk.addMethod(
  2175. "_model",
  2176. smalltalk.method({
  2177. selector: "model",
  2178. category: 'accessing',
  2179. fn: function (){
  2180. var self=this;
  2181. return smalltalk.withContext(function($ctx1) { var $1;
  2182. $1=self["@model"];
  2183. return $1;
  2184. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLBrowserSourceWidget)})},
  2185. args: [],
  2186. source: "model\x0a\x09^ model",
  2187. messageSends: [],
  2188. referencedClasses: []
  2189. }),
  2190. smalltalk.HLBrowserSourceWidget);
  2191. smalltalk.addMethod(
  2192. "_model_",
  2193. smalltalk.method({
  2194. selector: "model:",
  2195. category: 'accessing',
  2196. fn: function (aBrowserModel){
  2197. var self=this;
  2198. return smalltalk.withContext(function($ctx1) { self["@model"]=aBrowserModel;
  2199. _st(self)._observeModel();
  2200. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget)})},
  2201. args: ["aBrowserModel"],
  2202. source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a \x0a self observeModel",
  2203. messageSends: ["observeModel"],
  2204. referencedClasses: []
  2205. }),
  2206. smalltalk.HLBrowserSourceWidget);
  2207. smalltalk.addMethod(
  2208. "_observeModel",
  2209. smalltalk.method({
  2210. selector: "observeModel",
  2211. category: 'actions',
  2212. fn: function (){
  2213. var self=this;
  2214. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLMethodSelected || HLMethodSelected),(function(ann){
  2215. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodSelected_(_st(ann)._item());
  2216. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2217. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  2218. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  2219. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2220. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  2221. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  2222. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2223. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLBrowserSourceWidget)})},
  2224. args: [],
  2225. 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 ]",
  2226. messageSends: ["on:do:", "onMethodSelected:", "item", "announcer", "model", "onClassSelected:", "onProtocolSelected:"],
  2227. referencedClasses: ["HLMethodSelected", "HLClassSelected", "HLProtocolSelected"]
  2228. }),
  2229. smalltalk.HLBrowserSourceWidget);
  2230. smalltalk.addMethod(
  2231. "_observeSystem",
  2232. smalltalk.method({
  2233. selector: "observeSystem",
  2234. category: 'actions',
  2235. fn: function (){
  2236. var self=this;
  2237. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._on_do_((smalltalk.MethodModified || MethodModified),(function(ann){
  2238. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodModified_(_st(ann)._method());
  2239. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2240. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLBrowserSourceWidget)})},
  2241. args: [],
  2242. source: "observeSystem\x0a\x09SystemAnnouncer current\x0a \x09on: MethodModified\x0a do: [ :ann | self onMethodModified: ann method ]",
  2243. messageSends: ["on:do:", "onMethodModified:", "method", "current"],
  2244. referencedClasses: ["MethodModified", "SystemAnnouncer"]
  2245. }),
  2246. smalltalk.HLBrowserSourceWidget);
  2247. smalltalk.addMethod(
  2248. "_onClassSelected_",
  2249. smalltalk.method({
  2250. selector: "onClassSelected:",
  2251. category: 'reactions',
  2252. fn: function (aClass){
  2253. var self=this;
  2254. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2255. $1=aClass;
  2256. if(($receiver = $1) == nil || $receiver == undefined){
  2257. $2=_st(self)._contents_("");
  2258. return $2;
  2259. } else {
  2260. $1;
  2261. };
  2262. _st(self)._contents_(_st(aClass)._definition());
  2263. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLBrowserSourceWidget)})},
  2264. args: ["aClass"],
  2265. source: "onClassSelected: aClass\x0a\x09aClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: aClass definition",
  2266. messageSends: ["ifNil:", "contents:", "definition"],
  2267. referencedClasses: []
  2268. }),
  2269. smalltalk.HLBrowserSourceWidget);
  2270. smalltalk.addMethod(
  2271. "_onMethodModified_",
  2272. smalltalk.method({
  2273. selector: "onMethodModified:",
  2274. category: 'reactions',
  2275. fn: function (aMethod){
  2276. var self=this;
  2277. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2278. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(aMethod)._methodClass());
  2279. if(! smalltalk.assert($1)){
  2280. $2=self;
  2281. return $2;
  2282. };
  2283. $3=_st(_st(_st(_st(self)._model())._selectedMethod())._selector()).__eq(_st(aMethod)._selector());
  2284. if(! smalltalk.assert($3)){
  2285. $4=self;
  2286. return $4;
  2287. };
  2288. _st(self)._refresh();
  2289. return self}, function($ctx1) {$ctx1.fill(self,"onMethodModified:",{aMethod:aMethod}, smalltalk.HLBrowserSourceWidget)})},
  2290. args: ["aMethod"],
  2291. 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",
  2292. messageSends: ["ifFalse:", "=", "methodClass", "selectedClass", "model", "selector", "selectedMethod", "refresh"],
  2293. referencedClasses: []
  2294. }),
  2295. smalltalk.HLBrowserSourceWidget);
  2296. smalltalk.addMethod(
  2297. "_onMethodSelected_",
  2298. smalltalk.method({
  2299. selector: "onMethodSelected:",
  2300. category: 'reactions',
  2301. fn: function (aCompiledMethod){
  2302. var self=this;
  2303. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2304. $1=aCompiledMethod;
  2305. if(($receiver = $1) == nil || $receiver == undefined){
  2306. $2=_st(self)._contents_("");
  2307. return $2;
  2308. } else {
  2309. $1;
  2310. };
  2311. _st(self)._contents_(_st(aCompiledMethod)._source());
  2312. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserSourceWidget)})},
  2313. args: ["aCompiledMethod"],
  2314. source: "onMethodSelected: aCompiledMethod\x0a\x09aCompiledMethod ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: aCompiledMethod source",
  2315. messageSends: ["ifNil:", "contents:", "source"],
  2316. referencedClasses: []
  2317. }),
  2318. smalltalk.HLBrowserSourceWidget);
  2319. smalltalk.addMethod(
  2320. "_onProtocolSelected_",
  2321. smalltalk.method({
  2322. selector: "onProtocolSelected:",
  2323. category: 'reactions',
  2324. fn: function (aString){
  2325. var self=this;
  2326. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2327. $1=_st(_st(self)._model())._selectedClass();
  2328. if(($receiver = $1) == nil || $receiver == undefined){
  2329. $2=_st(self)._contents_("");
  2330. return $2;
  2331. } else {
  2332. $1;
  2333. };
  2334. _st(self)._contents_(_st(_st(_st(self)._model())._selectedClass())._definition());
  2335. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2336. args: ["aString"],
  2337. source: "onProtocolSelected: aString\x0a\x09self model selectedClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: self model selectedClass definition",
  2338. messageSends: ["ifNil:", "contents:", "selectedClass", "model", "definition"],
  2339. referencedClasses: []
  2340. }),
  2341. smalltalk.HLBrowserSourceWidget);
  2342. smalltalk.addMethod(
  2343. "_refresh",
  2344. smalltalk.method({
  2345. selector: "refresh",
  2346. category: 'updating',
  2347. fn: function (){
  2348. var self=this;
  2349. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2350. $1=_st(self)._hasModification();
  2351. if(smalltalk.assert($1)){
  2352. $2=self;
  2353. return $2;
  2354. };
  2355. _st(self)._contents_(_st(_st(_st(self)._model())._selectedMethod())._source());
  2356. smalltalk.HLWidget.fn.prototype._refresh.apply(_st(self), []);
  2357. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{}, smalltalk.HLBrowserSourceWidget)})},
  2358. args: [],
  2359. source: "refresh\x0a\x09self hasModification ifTrue: [ ^ self ].\x0a \x0a\x09self contents: self model selectedMethod source.\x0a super refresh",
  2360. messageSends: ["ifTrue:", "hasModification", "contents:", "source", "selectedMethod", "model", "refresh"],
  2361. referencedClasses: []
  2362. }),
  2363. smalltalk.HLBrowserSourceWidget);
  2364. smalltalk.addMethod(
  2365. "_renderContentOn_",
  2366. smalltalk.method({
  2367. selector: "renderContentOn:",
  2368. category: 'rendering',
  2369. fn: function (html){
  2370. var self=this;
  2371. return smalltalk.withContext(function($ctx1) { _st(_st(self)._codeWidget())._renderOn_(html);
  2372. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLBrowserSourceWidget)})},
  2373. args: ["html"],
  2374. source: "renderContentOn: html\x0a\x09self codeWidget renderOn: html",
  2375. messageSends: ["renderOn:", "codeWidget"],
  2376. referencedClasses: []
  2377. }),
  2378. smalltalk.HLBrowserSourceWidget);
  2379. smalltalk.addMethod(
  2380. "_on_",
  2381. smalltalk.method({
  2382. selector: "on:",
  2383. category: 'instance creation',
  2384. fn: function (aBrowserModel){
  2385. var self=this;
  2386. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2387. $2=_st(self)._new();
  2388. _st($2)._model_(aBrowserModel);
  2389. $3=_st($2)._yourself();
  2390. $1=$3;
  2391. return $1;
  2392. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget.klass)})},
  2393. args: ["aBrowserModel"],
  2394. source: "on: aBrowserModel\x0a\x09^ self new\x0a \x09model: aBrowserModel;\x0a yourself",
  2395. messageSends: ["model:", "new", "yourself"],
  2396. referencedClasses: []
  2397. }),
  2398. smalltalk.HLBrowserSourceWidget.klass);
  2399. smalltalk.addClass('HLClassCache', smalltalk.Object, ['class', 'selectorsCache', 'overrideCache', 'overriddenCache'], 'Helios-Browser');
  2400. smalltalk.addMethod(
  2401. "_invalidateChildrenSelector_",
  2402. smalltalk.method({
  2403. selector: "invalidateChildrenSelector:",
  2404. category: 'actions',
  2405. fn: function (aSelector){
  2406. var self=this;
  2407. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2408. _st(_st(_st(self)._theClass())._subclasses())._do_((function(each){
  2409. return smalltalk.withContext(function($ctx2) { $1=_st(_st(self)._selectorsCache())._cacheFor_(each);
  2410. _st($1)._removeSelector_(aSelector);
  2411. $2=_st($1)._invalidateChildrenSelector_(aSelector);
  2412. return $2;
  2413. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2414. return self}, function($ctx1) {$ctx1.fill(self,"invalidateChildrenSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2415. args: ["aSelector"],
  2416. source: "invalidateChildrenSelector: aSelector\x0a\x09self theClass subclasses do: [ :each |\x0a \x09(self selectorsCache cacheFor: each)\x0a \x09removeSelector: aSelector;\x0a \x09invalidateChildrenSelector: aSelector ]",
  2417. messageSends: ["do:", "removeSelector:", "cacheFor:", "selectorsCache", "invalidateChildrenSelector:", "subclasses", "theClass"],
  2418. referencedClasses: []
  2419. }),
  2420. smalltalk.HLClassCache);
  2421. smalltalk.addMethod(
  2422. "_invalidateParentSelector_",
  2423. smalltalk.method({
  2424. selector: "invalidateParentSelector:",
  2425. category: 'actions',
  2426. fn: function (aSelector){
  2427. var self=this;
  2428. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2429. $1=_st(_st(self)._theClass())._superclass();
  2430. if(($receiver = $1) == nil || $receiver == undefined){
  2431. $1;
  2432. } else {
  2433. $2=_st(_st(self)._selectorsCache())._cacheFor_(_st(_st(self)._theClass())._superclass());
  2434. _st($2)._removeSelector_(aSelector);
  2435. $3=_st($2)._invalidateParentSelector_(aSelector);
  2436. $3;
  2437. };
  2438. return self}, function($ctx1) {$ctx1.fill(self,"invalidateParentSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2439. args: ["aSelector"],
  2440. source: "invalidateParentSelector: aSelector\x0a\x09self theClass superclass ifNotNil: [\x0a \x09(self selectorsCache cacheFor: self theClass superclass)\x0a \x09removeSelector: aSelector;\x0a\x09\x09\x09invalidateParentSelector: aSelector ]",
  2441. messageSends: ["ifNotNil:", "removeSelector:", "cacheFor:", "superclass", "theClass", "selectorsCache", "invalidateParentSelector:"],
  2442. referencedClasses: []
  2443. }),
  2444. smalltalk.HLClassCache);
  2445. smalltalk.addMethod(
  2446. "_invalidateSelector_",
  2447. smalltalk.method({
  2448. selector: "invalidateSelector:",
  2449. category: 'actions',
  2450. fn: function (aSelector){
  2451. var self=this;
  2452. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2453. $1=self;
  2454. _st($1)._invalidateParentSelector_(aSelector);
  2455. _st($1)._invalidateChildrenSelector_(aSelector);
  2456. $2=_st($1)._removeSelector_(aSelector);
  2457. return self}, function($ctx1) {$ctx1.fill(self,"invalidateSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2458. args: ["aSelector"],
  2459. source: "invalidateSelector: aSelector\x0a\x09self \x0a \x09invalidateParentSelector: aSelector;\x0a invalidateChildrenSelector: aSelector;\x0a removeSelector: aSelector",
  2460. messageSends: ["invalidateParentSelector:", "invalidateChildrenSelector:", "removeSelector:"],
  2461. referencedClasses: []
  2462. }),
  2463. smalltalk.HLClassCache);
  2464. smalltalk.addMethod(
  2465. "_isOverridden_",
  2466. smalltalk.method({
  2467. selector: "isOverridden:",
  2468. category: 'testing',
  2469. fn: function (aMethod){
  2470. var self=this;
  2471. return smalltalk.withContext(function($ctx1) { var $1;
  2472. $1=_st(_st(self)._overriddenCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  2473. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverridden();
  2474. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2475. return $1;
  2476. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  2477. args: ["aMethod"],
  2478. source: "isOverridden: aMethod\x0a\x09^ self overriddenCache \x0a \x09at: aMethod selector\x0a \x09ifAbsentPut: [ aMethod isOverridden ]",
  2479. messageSends: ["at:ifAbsentPut:", "selector", "isOverridden", "overriddenCache"],
  2480. referencedClasses: []
  2481. }),
  2482. smalltalk.HLClassCache);
  2483. smalltalk.addMethod(
  2484. "_isOverride_",
  2485. smalltalk.method({
  2486. selector: "isOverride:",
  2487. category: 'testing',
  2488. fn: function (aMethod){
  2489. var self=this;
  2490. return smalltalk.withContext(function($ctx1) { var $1;
  2491. $1=_st(_st(self)._overrideCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  2492. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverride();
  2493. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2494. return $1;
  2495. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  2496. args: ["aMethod"],
  2497. source: "isOverride: aMethod\x0a\x09^ self overrideCache\x0a \x09at: aMethod selector\x0a \x09ifAbsentPut: [ aMethod isOverride ]",
  2498. messageSends: ["at:ifAbsentPut:", "selector", "isOverride", "overrideCache"],
  2499. referencedClasses: []
  2500. }),
  2501. smalltalk.HLClassCache);
  2502. smalltalk.addMethod(
  2503. "_overriddenCache",
  2504. smalltalk.method({
  2505. selector: "overriddenCache",
  2506. category: 'accessing',
  2507. fn: function (){
  2508. var self=this;
  2509. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2510. $2=self["@overriddenCache"];
  2511. if(($receiver = $2) == nil || $receiver == undefined){
  2512. self["@overriddenCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2513. $1=self["@overriddenCache"];
  2514. } else {
  2515. $1=$2;
  2516. };
  2517. return $1;
  2518. }, function($ctx1) {$ctx1.fill(self,"overriddenCache",{}, smalltalk.HLClassCache)})},
  2519. args: [],
  2520. source: "overriddenCache\x0a\x09^ overriddenCache ifNil: [ overriddenCache := HashedCollection new ]",
  2521. messageSends: ["ifNil:", "new"],
  2522. referencedClasses: ["HashedCollection"]
  2523. }),
  2524. smalltalk.HLClassCache);
  2525. smalltalk.addMethod(
  2526. "_overrideCache",
  2527. smalltalk.method({
  2528. selector: "overrideCache",
  2529. category: 'accessing',
  2530. fn: function (){
  2531. var self=this;
  2532. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2533. $2=self["@overrideCache"];
  2534. if(($receiver = $2) == nil || $receiver == undefined){
  2535. self["@overrideCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2536. $1=self["@overrideCache"];
  2537. } else {
  2538. $1=$2;
  2539. };
  2540. return $1;
  2541. }, function($ctx1) {$ctx1.fill(self,"overrideCache",{}, smalltalk.HLClassCache)})},
  2542. args: [],
  2543. source: "overrideCache\x0a\x09^ overrideCache ifNil: [ overrideCache := HashedCollection new ]",
  2544. messageSends: ["ifNil:", "new"],
  2545. referencedClasses: ["HashedCollection"]
  2546. }),
  2547. smalltalk.HLClassCache);
  2548. smalltalk.addMethod(
  2549. "_removeSelector_",
  2550. smalltalk.method({
  2551. selector: "removeSelector:",
  2552. category: 'private',
  2553. fn: function (aSelector){
  2554. var self=this;
  2555. return smalltalk.withContext(function($ctx1) { _st(_st(self)._overriddenCache())._removeKey_ifAbsent_(aSelector,(function(){
  2556. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2557. _st(_st(self)._overrideCache())._removeKey_ifAbsent_(aSelector,(function(){
  2558. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2559. return self}, function($ctx1) {$ctx1.fill(self,"removeSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2560. args: ["aSelector"],
  2561. source: "removeSelector: aSelector\x0a\x09self overriddenCache \x0a \x09removeKey: aSelector\x0a ifAbsent: [ ].\x0a self overrideCache \x0a \x09removeKey: aSelector\x0a ifAbsent: [ ]",
  2562. messageSends: ["removeKey:ifAbsent:", "overriddenCache", "overrideCache"],
  2563. referencedClasses: []
  2564. }),
  2565. smalltalk.HLClassCache);
  2566. smalltalk.addMethod(
  2567. "_selectorsCache",
  2568. smalltalk.method({
  2569. selector: "selectorsCache",
  2570. category: 'accessing',
  2571. fn: function (){
  2572. var self=this;
  2573. return smalltalk.withContext(function($ctx1) { var $1;
  2574. $1=self["@selectorsCache"];
  2575. return $1;
  2576. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLClassCache)})},
  2577. args: [],
  2578. source: "selectorsCache\x0a\x09^ selectorsCache",
  2579. messageSends: [],
  2580. referencedClasses: []
  2581. }),
  2582. smalltalk.HLClassCache);
  2583. smalltalk.addMethod(
  2584. "_selectorsCache_",
  2585. smalltalk.method({
  2586. selector: "selectorsCache:",
  2587. category: 'accessing',
  2588. fn: function (aCache){
  2589. var self=this;
  2590. return smalltalk.withContext(function($ctx1) { self["@selectorsCache"]=aCache;
  2591. return self}, function($ctx1) {$ctx1.fill(self,"selectorsCache:",{aCache:aCache}, smalltalk.HLClassCache)})},
  2592. args: ["aCache"],
  2593. source: "selectorsCache: aCache\x0a\x09selectorsCache := aCache",
  2594. messageSends: [],
  2595. referencedClasses: []
  2596. }),
  2597. smalltalk.HLClassCache);
  2598. smalltalk.addMethod(
  2599. "_theClass",
  2600. smalltalk.method({
  2601. selector: "theClass",
  2602. category: 'accessing',
  2603. fn: function (){
  2604. var self=this;
  2605. return smalltalk.withContext(function($ctx1) { var $1;
  2606. $1=self["@class"];
  2607. return $1;
  2608. }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.HLClassCache)})},
  2609. args: [],
  2610. source: "theClass\x0a\x09^ class",
  2611. messageSends: [],
  2612. referencedClasses: []
  2613. }),
  2614. smalltalk.HLClassCache);
  2615. smalltalk.addMethod(
  2616. "_theClass_",
  2617. smalltalk.method({
  2618. selector: "theClass:",
  2619. category: 'accessing',
  2620. fn: function (aClass){
  2621. var self=this;
  2622. return smalltalk.withContext(function($ctx1) { self["@class"]=aClass;
  2623. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.HLClassCache)})},
  2624. args: ["aClass"],
  2625. source: "theClass: aClass\x0a\x09class := aClass",
  2626. messageSends: [],
  2627. referencedClasses: []
  2628. }),
  2629. smalltalk.HLClassCache);
  2630. smalltalk.addMethod(
  2631. "_on_selectorsCache_",
  2632. smalltalk.method({
  2633. selector: "on:selectorsCache:",
  2634. category: 'instance creation',
  2635. fn: function (aClass,aSelectorsCache){
  2636. var self=this;
  2637. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2638. $2=_st(self)._new();
  2639. _st($2)._theClass_(aClass);
  2640. _st($2)._selectorsCache_(aSelectorsCache);
  2641. $3=_st($2)._yourself();
  2642. $1=$3;
  2643. return $1;
  2644. }, function($ctx1) {$ctx1.fill(self,"on:selectorsCache:",{aClass:aClass,aSelectorsCache:aSelectorsCache}, smalltalk.HLClassCache.klass)})},
  2645. args: ["aClass", "aSelectorsCache"],
  2646. source: "on: aClass selectorsCache: aSelectorsCache\x0a\x09^ self new\x0a \x09theClass: aClass;\x0a selectorsCache: aSelectorsCache;\x0a yourself",
  2647. messageSends: ["theClass:", "new", "selectorsCache:", "yourself"],
  2648. referencedClasses: []
  2649. }),
  2650. smalltalk.HLClassCache.klass);
  2651. smalltalk.addClass('HLSelectorsCache', smalltalk.Object, ['classesCache'], 'Helios-Browser');
  2652. smalltalk.addMethod(
  2653. "_cacheFor_",
  2654. smalltalk.method({
  2655. selector: "cacheFor:",
  2656. category: 'accessing',
  2657. fn: function (aClass){
  2658. var self=this;
  2659. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2660. $1=aClass;
  2661. if(($receiver = $1) == nil || $receiver == undefined){
  2662. return nil;
  2663. } else {
  2664. $1;
  2665. };
  2666. $2=_st(_st(self)._classesCache())._at_ifAbsentPut_(_st(aClass)._name(),(function(){
  2667. return smalltalk.withContext(function($ctx2) { return _st(self)._newCacheFor_(aClass);
  2668. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2669. return $2;
  2670. }, function($ctx1) {$ctx1.fill(self,"cacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2671. args: ["aClass"],
  2672. source: "cacheFor: aClass\x0a\x09aClass ifNil: [ ^ nil ].\x0a \x0a\x09^ self classesCache\x0a \x09at: aClass name\x0a ifAbsentPut: [ self newCacheFor: aClass ]",
  2673. messageSends: ["ifNil:", "at:ifAbsentPut:", "name", "newCacheFor:", "classesCache"],
  2674. referencedClasses: []
  2675. }),
  2676. smalltalk.HLSelectorsCache);
  2677. smalltalk.addMethod(
  2678. "_classesCache",
  2679. smalltalk.method({
  2680. selector: "classesCache",
  2681. category: 'accessing',
  2682. fn: function (){
  2683. var self=this;
  2684. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2685. $2=self["@classesCache"];
  2686. if(($receiver = $2) == nil || $receiver == undefined){
  2687. self["@classesCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2688. $1=self["@classesCache"];
  2689. } else {
  2690. $1=$2;
  2691. };
  2692. return $1;
  2693. }, function($ctx1) {$ctx1.fill(self,"classesCache",{}, smalltalk.HLSelectorsCache)})},
  2694. args: [],
  2695. source: "classesCache\x0a\x09^ classesCache ifNil: [ classesCache := HashedCollection new ]",
  2696. messageSends: ["ifNil:", "new"],
  2697. referencedClasses: ["HashedCollection"]
  2698. }),
  2699. smalltalk.HLSelectorsCache);
  2700. smalltalk.addMethod(
  2701. "_initialize",
  2702. smalltalk.method({
  2703. selector: "initialize",
  2704. category: 'initialization',
  2705. fn: function (){
  2706. var self=this;
  2707. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  2708. _st(self)._observeSystem();
  2709. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLSelectorsCache)})},
  2710. args: [],
  2711. source: "initialize\x0a\x09super initialize.\x0a self observeSystem",
  2712. messageSends: ["initialize", "observeSystem"],
  2713. referencedClasses: []
  2714. }),
  2715. smalltalk.HLSelectorsCache);
  2716. smalltalk.addMethod(
  2717. "_invalidateCacheFor_",
  2718. smalltalk.method({
  2719. selector: "invalidateCacheFor:",
  2720. category: 'private',
  2721. fn: function (aMethod){
  2722. var self=this;
  2723. return smalltalk.withContext(function($ctx1) { _st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._invalidateSelector_(_st(aMethod)._selector());
  2724. return self}, function($ctx1) {$ctx1.fill(self,"invalidateCacheFor:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2725. args: ["aMethod"],
  2726. source: "invalidateCacheFor: aMethod\x0a\x09(self cacheFor: aMethod methodClass)\x0a \x09invalidateSelector: aMethod selector",
  2727. messageSends: ["invalidateSelector:", "selector", "cacheFor:", "methodClass"],
  2728. referencedClasses: []
  2729. }),
  2730. smalltalk.HLSelectorsCache);
  2731. smalltalk.addMethod(
  2732. "_isOverridden_",
  2733. smalltalk.method({
  2734. selector: "isOverridden:",
  2735. category: 'testing',
  2736. fn: function (aMethod){
  2737. var self=this;
  2738. return smalltalk.withContext(function($ctx1) { var $1;
  2739. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverridden_(aMethod);
  2740. return $1;
  2741. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2742. args: ["aMethod"],
  2743. source: "isOverridden: aMethod\x0a\x09^ (self cacheFor: aMethod methodClass)\x0a \x09isOverridden: aMethod",
  2744. messageSends: ["isOverridden:", "cacheFor:", "methodClass"],
  2745. referencedClasses: []
  2746. }),
  2747. smalltalk.HLSelectorsCache);
  2748. smalltalk.addMethod(
  2749. "_isOverride_",
  2750. smalltalk.method({
  2751. selector: "isOverride:",
  2752. category: 'testing',
  2753. fn: function (aMethod){
  2754. var self=this;
  2755. return smalltalk.withContext(function($ctx1) { var $1;
  2756. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverride_(aMethod);
  2757. return $1;
  2758. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2759. args: ["aMethod"],
  2760. source: "isOverride: aMethod\x0a\x09^ (self cacheFor: aMethod methodClass)\x0a \x09isOverride: aMethod",
  2761. messageSends: ["isOverride:", "cacheFor:", "methodClass"],
  2762. referencedClasses: []
  2763. }),
  2764. smalltalk.HLSelectorsCache);
  2765. smalltalk.addMethod(
  2766. "_newCacheFor_",
  2767. smalltalk.method({
  2768. selector: "newCacheFor:",
  2769. category: 'factory',
  2770. fn: function (aClass){
  2771. var self=this;
  2772. return smalltalk.withContext(function($ctx1) { var $1;
  2773. $1=_st((smalltalk.HLClassCache || HLClassCache))._on_selectorsCache_(aClass,self);
  2774. return $1;
  2775. }, function($ctx1) {$ctx1.fill(self,"newCacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2776. args: ["aClass"],
  2777. source: "newCacheFor: aClass\x0a\x09^ HLClassCache \x0a \x09on: aClass\x0a selectorsCache: self",
  2778. messageSends: ["on:selectorsCache:"],
  2779. referencedClasses: ["HLClassCache"]
  2780. }),
  2781. smalltalk.HLSelectorsCache);
  2782. smalltalk.addMethod(
  2783. "_observeSystem",
  2784. smalltalk.method({
  2785. selector: "observeSystem",
  2786. category: 'actions',
  2787. fn: function (){
  2788. var self=this;
  2789. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2790. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  2791. _st($1)._on_do_((smalltalk.MethodAdded || MethodAdded),(function(ann){
  2792. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodAdded_(_st(ann)._method());
  2793. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2794. $2=_st($1)._on_do_((smalltalk.MethodRemoved || MethodRemoved),(function(ann){
  2795. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodRemoved_(_st(ann)._method());
  2796. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2797. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLSelectorsCache)})},
  2798. args: [],
  2799. 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 ]",
  2800. messageSends: ["on:do:", "onMethodAdded:", "method", "current", "onMethodRemoved:"],
  2801. referencedClasses: ["MethodAdded", "SystemAnnouncer", "MethodRemoved"]
  2802. }),
  2803. smalltalk.HLSelectorsCache);
  2804. smalltalk.addMethod(
  2805. "_onMethodAdded_",
  2806. smalltalk.method({
  2807. selector: "onMethodAdded:",
  2808. category: 'reactions',
  2809. fn: function (aMethod){
  2810. var self=this;
  2811. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2812. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2813. args: ["aMethod"],
  2814. source: "onMethodAdded: aMethod\x0a\x09self invalidateCacheFor: aMethod",
  2815. messageSends: ["invalidateCacheFor:"],
  2816. referencedClasses: []
  2817. }),
  2818. smalltalk.HLSelectorsCache);
  2819. smalltalk.addMethod(
  2820. "_onMethodRemoved_",
  2821. smalltalk.method({
  2822. selector: "onMethodRemoved:",
  2823. category: 'reactions',
  2824. fn: function (aMethod){
  2825. var self=this;
  2826. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2827. return self}, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2828. args: ["aMethod"],
  2829. source: "onMethodRemoved: aMethod\x0a\x09self invalidateCacheFor: aMethod",
  2830. messageSends: ["invalidateCacheFor:"],
  2831. referencedClasses: []
  2832. }),
  2833. smalltalk.HLSelectorsCache);
  2834. smalltalk.HLSelectorsCache.klass.iVarNames = ['current'];
  2835. smalltalk.addMethod(
  2836. "_current",
  2837. smalltalk.method({
  2838. selector: "current",
  2839. category: 'accessing',
  2840. fn: function (){
  2841. var self=this;
  2842. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2843. $2=self["@current"];
  2844. if(($receiver = $2) == nil || $receiver == undefined){
  2845. self["@current"]=smalltalk.Object.klass.fn.prototype._new.apply(_st(self), []);
  2846. $1=self["@current"];
  2847. } else {
  2848. $1=$2;
  2849. };
  2850. return $1;
  2851. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.HLSelectorsCache.klass)})},
  2852. args: [],
  2853. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  2854. messageSends: ["ifNil:", "new"],
  2855. referencedClasses: []
  2856. }),
  2857. smalltalk.HLSelectorsCache.klass);
  2858. smalltalk.addMethod(
  2859. "_flush",
  2860. smalltalk.method({
  2861. selector: "flush",
  2862. category: 'accessing',
  2863. fn: function (){
  2864. var self=this;
  2865. return smalltalk.withContext(function($ctx1) { self["@current"]=nil;
  2866. return self}, function($ctx1) {$ctx1.fill(self,"flush",{}, smalltalk.HLSelectorsCache.klass)})},
  2867. args: [],
  2868. source: "flush\x0a\x09current := nil",
  2869. messageSends: [],
  2870. referencedClasses: []
  2871. }),
  2872. smalltalk.HLSelectorsCache.klass);
  2873. smalltalk.addMethod(
  2874. "_new",
  2875. smalltalk.method({
  2876. selector: "new",
  2877. category: 'instance creation',
  2878. fn: function (){
  2879. var self=this;
  2880. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  2881. return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.HLSelectorsCache.klass)})},
  2882. args: [],
  2883. source: "new\x0a\x09self shouldNotImplement",
  2884. messageSends: ["shouldNotImplement"],
  2885. referencedClasses: []
  2886. }),
  2887. smalltalk.HLSelectorsCache.klass);
  2888. smalltalk.addMethod(
  2889. "_isOverridden",
  2890. smalltalk.method({
  2891. selector: "isOverridden",
  2892. category: '*Helios-Browser',
  2893. fn: function (){
  2894. var self=this;
  2895. var selector;
  2896. return smalltalk.withContext(function($ctx1) { var $1;
  2897. var $early={};
  2898. try {
  2899. selector=_st(self)._selector();
  2900. _st(_st(self)._methodClass())._allSubclassesDo_((function(each){
  2901. return smalltalk.withContext(function($ctx2) { $1=_st(each)._includesSelector_(selector);
  2902. if(smalltalk.assert($1)){
  2903. throw $early=[true];
  2904. };
  2905. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2906. return false;
  2907. }
  2908. catch(e) {if(e===$early)return e[0]; throw e}
  2909. }, function($ctx1) {$ctx1.fill(self,"isOverridden",{selector:selector}, smalltalk.CompiledMethod)})},
  2910. args: [],
  2911. 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",
  2912. messageSends: ["selector", "allSubclassesDo:", "ifTrue:", "includesSelector:", "methodClass"],
  2913. referencedClasses: []
  2914. }),
  2915. smalltalk.CompiledMethod);
  2916. smalltalk.addMethod(
  2917. "_isOverride",
  2918. smalltalk.method({
  2919. selector: "isOverride",
  2920. category: '*Helios-Browser',
  2921. fn: function (){
  2922. var self=this;
  2923. var superclass;
  2924. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2925. superclass=_st(_st(self)._methodClass())._superclass();
  2926. $1=superclass;
  2927. if(($receiver = $1) == nil || $receiver == undefined){
  2928. return false;
  2929. } else {
  2930. $1;
  2931. };
  2932. $2=_st(_st(_st(_st(self)._methodClass())._superclass())._lookupSelector_(_st(self)._selector()))._isNil();
  2933. return $2;
  2934. }, function($ctx1) {$ctx1.fill(self,"isOverride",{superclass:superclass}, smalltalk.CompiledMethod)})},
  2935. args: [],
  2936. source: "isOverride\x0a\x09| superclass |\x0a \x0a superclass := self methodClass superclass.\x0a\x09superclass ifNil: [ ^ false ].\x0a\x09\x0a ^ (self methodClass superclass lookupSelector: self selector) isNil",
  2937. messageSends: ["superclass", "methodClass", "ifNil:", "isNil", "lookupSelector:", "selector"],
  2938. referencedClasses: []
  2939. }),
  2940. smalltalk.CompiledMethod);