1
0

Helios-Browser.js 113 KB

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