1
0

Helios-Browser.js 94 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510
  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. "_model",
  308. smalltalk.method({
  309. selector: "model",
  310. category: 'accessing',
  311. fn: function (){
  312. var self=this;
  313. return smalltalk.withContext(function($ctx1) { var $1;
  314. $1=self["@model"];
  315. return $1;
  316. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLBrowserListWidget)})},
  317. args: [],
  318. source: "model\x0a\x09^ model",
  319. messageSends: [],
  320. referencedClasses: []
  321. }),
  322. smalltalk.HLBrowserListWidget);
  323. smalltalk.addMethod(
  324. "_model_",
  325. smalltalk.method({
  326. selector: "model:",
  327. category: 'accessing',
  328. fn: function (aBrowserModel){
  329. var self=this;
  330. return smalltalk.withContext(function($ctx1) { self["@model"]=aBrowserModel;
  331. _st(self)._observeModel();
  332. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserListWidget)})},
  333. args: ["aBrowserModel"],
  334. source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a \x0a self observeModel",
  335. messageSends: ["observeModel"],
  336. referencedClasses: []
  337. }),
  338. smalltalk.HLBrowserListWidget);
  339. smalltalk.addMethod(
  340. "_observeModel",
  341. smalltalk.method({
  342. selector: "observeModel",
  343. category: 'actions',
  344. fn: function (){
  345. var self=this;
  346. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLBrowserListWidget)})},
  347. args: [],
  348. source: "observeModel",
  349. messageSends: [],
  350. referencedClasses: []
  351. }),
  352. smalltalk.HLBrowserListWidget);
  353. smalltalk.addMethod(
  354. "_on_",
  355. smalltalk.method({
  356. selector: "on:",
  357. category: 'instance creation',
  358. fn: function (aModel){
  359. var self=this;
  360. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  361. $2=_st(self)._new();
  362. _st($2)._model_(aModel);
  363. $3=_st($2)._yourself();
  364. $1=$3;
  365. return $1;
  366. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel}, smalltalk.HLBrowserListWidget.klass)})},
  367. args: ["aModel"],
  368. source: "on: aModel\x0a\x09^ self new \x0a \x09model: aModel;\x0a yourself",
  369. messageSends: ["model:", "new", "yourself"],
  370. referencedClasses: []
  371. }),
  372. smalltalk.HLBrowserListWidget.klass);
  373. smalltalk.addClass('HLClassesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  374. smalltalk.addMethod(
  375. "_focusMethodsListWidget",
  376. smalltalk.method({
  377. selector: "focusMethodsListWidget",
  378. category: 'actions',
  379. fn: function (){
  380. var self=this;
  381. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._announce_(_st((smalltalk.HLMethodsListFocus || HLMethodsListFocus))._new());
  382. return self}, function($ctx1) {$ctx1.fill(self,"focusMethodsListWidget",{}, smalltalk.HLClassesListWidget)})},
  383. args: [],
  384. source: "focusMethodsListWidget\x0a\x09self model announcer announce: HLMethodsListFocus new",
  385. messageSends: ["announce:", "new", "announcer", "model"],
  386. referencedClasses: ["HLMethodsListFocus"]
  387. }),
  388. smalltalk.HLClassesListWidget);
  389. smalltalk.addMethod(
  390. "_focusProtocolsListWidget",
  391. smalltalk.method({
  392. selector: "focusProtocolsListWidget",
  393. category: 'actions',
  394. fn: function (){
  395. var self=this;
  396. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._announce_(_st((smalltalk.HLProtocolsListFocus || HLProtocolsListFocus))._new());
  397. return self}, function($ctx1) {$ctx1.fill(self,"focusProtocolsListWidget",{}, smalltalk.HLClassesListWidget)})},
  398. args: [],
  399. source: "focusProtocolsListWidget\x0a\x09self model announcer announce: HLProtocolsListFocus new",
  400. messageSends: ["announce:", "new", "announcer", "model"],
  401. referencedClasses: ["HLProtocolsListFocus"]
  402. }),
  403. smalltalk.HLClassesListWidget);
  404. smalltalk.addMethod(
  405. "_getChildrenOf_",
  406. smalltalk.method({
  407. selector: "getChildrenOf:",
  408. category: 'accessing',
  409. fn: function (aClass){
  410. var self=this;
  411. return smalltalk.withContext(function($ctx1) { var $1;
  412. $1=_st(_st(self)._items())._select_((function(each){
  413. return smalltalk.withContext(function($ctx2) { return _st(_st(each)._superclass()).__eq(aClass);
  414. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  415. return $1;
  416. }, function($ctx1) {$ctx1.fill(self,"getChildrenOf:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  417. args: ["aClass"],
  418. source: "getChildrenOf: aClass\x0a\x09^ self items select: [ :each | each superclass = aClass ]",
  419. messageSends: ["select:", "=", "superclass", "items"],
  420. referencedClasses: []
  421. }),
  422. smalltalk.HLClassesListWidget);
  423. smalltalk.addMethod(
  424. "_getRootClassesOf_",
  425. smalltalk.method({
  426. selector: "getRootClassesOf:",
  427. category: 'accessing',
  428. fn: function (aCollection){
  429. var self=this;
  430. return smalltalk.withContext(function($ctx1) { var $1;
  431. $1=_st(aCollection)._select_((function(each){
  432. return smalltalk.withContext(function($ctx2) { return _st(_st(aCollection)._includes_(_st(each)._superclass()))._not();
  433. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  434. return $1;
  435. }, function($ctx1) {$ctx1.fill(self,"getRootClassesOf:",{aCollection:aCollection}, smalltalk.HLClassesListWidget)})},
  436. args: ["aCollection"],
  437. source: "getRootClassesOf: aCollection\x0a\x09^ aCollection select: [ :each |\x0a \x09\x09(aCollection includes: each superclass) not ]",
  438. messageSends: ["select:", "not", "includes:", "superclass"],
  439. referencedClasses: []
  440. }),
  441. smalltalk.HLClassesListWidget);
  442. smalltalk.addMethod(
  443. "_iconForItem_",
  444. smalltalk.method({
  445. selector: "iconForItem:",
  446. category: 'accessing',
  447. fn: function (aClass){
  448. var self=this;
  449. return smalltalk.withContext(function($ctx1) { var $2,$1;
  450. $2=_st(_st(_st(aClass)._theNonMetaClass())._comment())._isEmpty();
  451. if(smalltalk.assert($2)){
  452. $1="icon-question-sign";
  453. } else {
  454. $1="icon-none";
  455. };
  456. return $1;
  457. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  458. args: ["aClass"],
  459. source: "iconForItem: aClass\x0a\x09^ aClass theNonMetaClass comment isEmpty\x0a \x09ifFalse: [ 'icon-none' ]\x0a \x09ifTrue: [ 'icon-question-sign' ]",
  460. messageSends: ["ifFalse:ifTrue:", "isEmpty", "comment", "theNonMetaClass"],
  461. referencedClasses: []
  462. }),
  463. smalltalk.HLClassesListWidget);
  464. smalltalk.addMethod(
  465. "_observeModel",
  466. smalltalk.method({
  467. selector: "observeModel",
  468. category: 'actions',
  469. fn: function (){
  470. var self=this;
  471. return smalltalk.withContext(function($ctx1) { var $1,$2;
  472. $1=_st(_st(self)._model())._announcer();
  473. _st($1)._on_do_((smalltalk.HLPackageSelected || HLPackageSelected),(function(ann){
  474. return smalltalk.withContext(function($ctx2) { return _st(self)._onPackageSelected_(_st(ann)._item());
  475. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  476. _st($1)._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  477. return smalltalk.withContext(function($ctx2) { return _st(self)._onShowInstanceToggled();
  478. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  479. $2=_st($1)._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  480. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  481. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  482. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLClassesListWidget)})},
  483. args: [],
  484. 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 ]",
  485. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model", "onShowInstanceToggled", "onClassSelected:"],
  486. referencedClasses: ["HLPackageSelected", "HLShowInstanceToggled", "HLClassSelected"]
  487. }),
  488. smalltalk.HLClassesListWidget);
  489. smalltalk.addMethod(
  490. "_onClassSelected_",
  491. smalltalk.method({
  492. selector: "onClassSelected:",
  493. category: 'reactions',
  494. fn: function (aClass){
  495. var self=this;
  496. return smalltalk.withContext(function($ctx1) { var $1,$2;
  497. _st(self)._selectedItem_(aClass);
  498. $1=aClass;
  499. if(($receiver = $1) == nil || $receiver == undefined){
  500. $2=self;
  501. return $2;
  502. } else {
  503. $1;
  504. };
  505. _st(self)._focus();
  506. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  507. args: ["aClass"],
  508. source: "onClassSelected: aClass\x0a\x09self selectedItem: aClass.\x0a\x09aClass ifNil: [ ^ self ].\x0a \x0a self focus",
  509. messageSends: ["selectedItem:", "ifNil:", "focus"],
  510. referencedClasses: []
  511. }),
  512. smalltalk.HLClassesListWidget);
  513. smalltalk.addMethod(
  514. "_onPackageSelected_",
  515. smalltalk.method({
  516. selector: "onPackageSelected:",
  517. category: 'reactions',
  518. fn: function (aPackage){
  519. var self=this;
  520. return smalltalk.withContext(function($ctx1) { var $1,$3,$2;
  521. _st(self)._selectedItem_(nil);
  522. $1=self;
  523. $3=aPackage;
  524. if(($receiver = $3) == nil || $receiver == undefined){
  525. $2=[];
  526. } else {
  527. $2=_st(_st(_st(_st(aPackage)._classes())._collect_((function(each){
  528. return smalltalk.withContext(function($ctx2) { return _st(each)._theNonMetaClass();
  529. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet())._asArray();
  530. };
  531. _st($1)._items_($2);
  532. _st(self)._refresh();
  533. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{aPackage:aPackage}, smalltalk.HLClassesListWidget)})},
  534. args: ["aPackage"],
  535. 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",
  536. messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "asArray", "asSet", "collect:", "theNonMetaClass", "classes", "refresh"],
  537. referencedClasses: []
  538. }),
  539. smalltalk.HLClassesListWidget);
  540. smalltalk.addMethod(
  541. "_onShowInstanceToggled",
  542. smalltalk.method({
  543. selector: "onShowInstanceToggled",
  544. category: 'reactions',
  545. fn: function (){
  546. var self=this;
  547. return smalltalk.withContext(function($ctx1) { _st(self)._refresh();
  548. return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{}, smalltalk.HLClassesListWidget)})},
  549. args: [],
  550. source: "onShowInstanceToggled\x0a\x09self refresh",
  551. messageSends: ["refresh"],
  552. referencedClasses: []
  553. }),
  554. smalltalk.HLClassesListWidget);
  555. smalltalk.addMethod(
  556. "_renderButtonsOn_",
  557. smalltalk.method({
  558. selector: "renderButtonsOn:",
  559. category: 'rendering',
  560. fn: function (html){
  561. var self=this;
  562. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$6,$7,$8,$2,$9,$10;
  563. $1=_st(html)._div();
  564. _st($1)._class_("btn-group");
  565. _st($1)._at_put_("data-toggle","buttons-radio");
  566. $2=_st($1)._with_((function(){
  567. return smalltalk.withContext(function($ctx2) { $3=_st(html)._button();
  568. _st($3)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  569. return smalltalk.withContext(function($ctx3) { _st(str)._nextPutAll_("btn");
  570. $4=_st(self)._showInstance();
  571. if(smalltalk.assert($4)){
  572. return _st(str)._nextPutAll_(" active");
  573. };
  574. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  575. _st($3)._with_("Instance");
  576. $5=_st($3)._onClick_((function(){
  577. return smalltalk.withContext(function($ctx3) { return _st(self)._showInstance_(true);
  578. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  579. $5;
  580. $6=_st(html)._button();
  581. _st($6)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  582. return smalltalk.withContext(function($ctx3) { _st(str)._nextPutAll_("btn");
  583. $7=_st(_st(self)._model())._showInstance();
  584. if(! smalltalk.assert($7)){
  585. return _st(str)._nextPutAll_(" active");
  586. };
  587. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  588. _st($6)._with_("Class");
  589. $8=_st($6)._onClick_((function(){
  590. return smalltalk.withContext(function($ctx3) { return _st(_st(self)._model())._showInstance_(false);
  591. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  592. return $8;
  593. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  594. $9=_st(html)._button();
  595. _st($9)._class_("btn");
  596. _st($9)._at_put_("data-toggle","button");
  597. $10=_st($9)._with_("Comment");
  598. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.HLClassesListWidget)})},
  599. args: ["html"],
  600. 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'",
  601. messageSends: ["class:", "div", "at:put:", "with:", "streamContents:", "nextPutAll:", "ifTrue:", "showInstance", "button", "onClick:", "showInstance:", "ifFalse:", "model"],
  602. referencedClasses: ["String"]
  603. }),
  604. smalltalk.HLClassesListWidget);
  605. smalltalk.addMethod(
  606. "_renderItem_level_on_",
  607. smalltalk.method({
  608. selector: "renderItem:level:on:",
  609. category: 'rendering',
  610. fn: function (aClass,anInteger,html){
  611. var self=this;
  612. var li;
  613. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  614. li=_st(html)._li();
  615. $1=li;
  616. _st($1)._at_put_("list-data",_st(_st(self)._items())._indexOf_(aClass));
  617. _st($1)._class_(_st(self)._cssClassForItem_(aClass));
  618. $2=_st($1)._with_((function(){
  619. return smalltalk.withContext(function($ctx2) { $3=_st(html)._a();
  620. _st($3)._with_((function(){
  621. return smalltalk.withContext(function($ctx3) { _st(_st(html)._tag_("i"))._class_(_st(self)._iconForItem_(aClass));
  622. return _st(self)._renderItemLabel_level_on_(aClass,anInteger,html);
  623. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  624. $4=_st($3)._onClick_((function(){
  625. return smalltalk.withContext(function($ctx3) { return _st(self)._activateListItem_(_st(li)._asJQuery());
  626. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  627. return $4;
  628. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  629. _st(_st(self)._getChildrenOf_(aClass))._do_((function(each){
  630. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_level_on_(each,_st(anInteger).__plus((1)),html);
  631. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  632. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:level:on:",{aClass:aClass,anInteger:anInteger,html:html,li:li}, smalltalk.HLClassesListWidget)})},
  633. args: ["aClass", "anInteger", "html"],
  634. 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 ]",
  635. messageSends: ["li", "at:put:", "indexOf:", "items", "class:", "cssClassForItem:", "with:", "iconForItem:", "tag:", "renderItemLabel:level:on:", "a", "onClick:", "activateListItem:", "asJQuery", "do:", "renderItem:level:on:", "+", "getChildrenOf:"],
  636. referencedClasses: []
  637. }),
  638. smalltalk.HLClassesListWidget);
  639. smalltalk.addMethod(
  640. "_renderItem_on_",
  641. smalltalk.method({
  642. selector: "renderItem:on:",
  643. category: 'rendering',
  644. fn: function (aClass,html){
  645. var self=this;
  646. return smalltalk.withContext(function($ctx1) { smalltalk.HLBrowserListWidget.fn.prototype._renderItem_on_.apply(_st(self), [aClass,html]);
  647. _st(_st(self)._getChildrenOf_(aClass))._do_((function(each){
  648. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_level_on_(each,(1),html);
  649. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  650. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{aClass:aClass,html:html}, smalltalk.HLClassesListWidget)})},
  651. args: ["aClass", "html"],
  652. 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 ]",
  653. messageSends: ["renderItem:on:", "do:", "renderItem:level:on:", "getChildrenOf:"],
  654. referencedClasses: []
  655. }),
  656. smalltalk.HLClassesListWidget);
  657. smalltalk.addMethod(
  658. "_renderItemLabel_level_on_",
  659. smalltalk.method({
  660. selector: "renderItemLabel:level:on:",
  661. category: 'rendering',
  662. fn: function (aClass,anInteger,html){
  663. var self=this;
  664. return smalltalk.withContext(function($ctx1) { _st(_st(_st(html)._span())._asJQuery())._html_(_st((smalltalk.String || String))._streamContents_((function(str){
  665. return smalltalk.withContext(function($ctx2) { _st(anInteger)._timesRepeat_((function(){
  666. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("    ");
  667. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  668. return _st(str)._nextPutAll_(_st(aClass)._name());
  669. }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1)})})));
  670. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:level:on:",{aClass:aClass,anInteger:anInteger,html:html}, smalltalk.HLClassesListWidget)})},
  671. args: ["aClass", "anInteger", "html"],
  672. 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 ])",
  673. messageSends: ["html:", "streamContents:", "timesRepeat:", "nextPutAll:", "name", "asJQuery", "span"],
  674. referencedClasses: ["String"]
  675. }),
  676. smalltalk.HLClassesListWidget);
  677. smalltalk.addMethod(
  678. "_renderItemLabel_on_",
  679. smalltalk.method({
  680. selector: "renderItemLabel:on:",
  681. category: 'rendering',
  682. fn: function (aClass,html){
  683. var self=this;
  684. return smalltalk.withContext(function($ctx1) { _st(self)._renderItemLabel_level_on_(aClass,(0),html);
  685. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aClass:aClass,html:html}, smalltalk.HLClassesListWidget)})},
  686. args: ["aClass", "html"],
  687. source: "renderItemLabel: aClass on: html\x0a\x09self renderItemLabel: aClass level: 0 on: html",
  688. messageSends: ["renderItemLabel:level:on:"],
  689. referencedClasses: []
  690. }),
  691. smalltalk.HLClassesListWidget);
  692. smalltalk.addMethod(
  693. "_renderListOn_",
  694. smalltalk.method({
  695. selector: "renderListOn:",
  696. category: 'rendering',
  697. fn: function (html){
  698. var self=this;
  699. return smalltalk.withContext(function($ctx1) { _st(_st(self)._getRootClassesOf_(_st(self)._items()))._do_((function(each){
  700. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_on_(each,html);
  701. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  702. return self}, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html}, smalltalk.HLClassesListWidget)})},
  703. args: ["html"],
  704. source: "renderListOn: html\x0a\x09(self getRootClassesOf: self items)\x0a \x09do: [ :each | self renderItem: each on: html ]",
  705. messageSends: ["do:", "renderItem:on:", "getRootClassesOf:", "items"],
  706. referencedClasses: []
  707. }),
  708. smalltalk.HLClassesListWidget);
  709. smalltalk.addMethod(
  710. "_selectItem_",
  711. smalltalk.method({
  712. selector: "selectItem:",
  713. category: 'actions',
  714. fn: function (aClass){
  715. var self=this;
  716. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedClass_(aClass);
  717. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  718. args: ["aClass"],
  719. source: "selectItem: aClass\x0a self model selectedClass: aClass",
  720. messageSends: ["selectedClass:", "model"],
  721. referencedClasses: []
  722. }),
  723. smalltalk.HLClassesListWidget);
  724. smalltalk.addMethod(
  725. "_showInstance",
  726. smalltalk.method({
  727. selector: "showInstance",
  728. category: 'accessing',
  729. fn: function (){
  730. var self=this;
  731. return smalltalk.withContext(function($ctx1) { var $1;
  732. $1=_st(_st(self)._model())._showInstance();
  733. return $1;
  734. }, function($ctx1) {$ctx1.fill(self,"showInstance",{}, smalltalk.HLClassesListWidget)})},
  735. args: [],
  736. source: "showInstance\x0a\x09^ self model showInstance",
  737. messageSends: ["showInstance", "model"],
  738. referencedClasses: []
  739. }),
  740. smalltalk.HLClassesListWidget);
  741. smalltalk.addMethod(
  742. "_showInstance_",
  743. smalltalk.method({
  744. selector: "showInstance:",
  745. category: 'actions',
  746. fn: function (aBoolean){
  747. var self=this;
  748. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._showInstance_(aBoolean);
  749. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean}, smalltalk.HLClassesListWidget)})},
  750. args: ["aBoolean"],
  751. source: "showInstance: aBoolean\x0a\x09self model showInstance: aBoolean",
  752. messageSends: ["showInstance:", "model"],
  753. referencedClasses: []
  754. }),
  755. smalltalk.HLClassesListWidget);
  756. smalltalk.addClass('HLMethodsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  757. smalltalk.addMethod(
  758. "_allProtocol",
  759. smalltalk.method({
  760. selector: "allProtocol",
  761. category: 'accessing',
  762. fn: function (){
  763. var self=this;
  764. return smalltalk.withContext(function($ctx1) { var $1;
  765. $1=_st(_st(self)._model())._allProtocol();
  766. return $1;
  767. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLMethodsListWidget)})},
  768. args: [],
  769. source: "allProtocol\x0a\x09^ self model allProtocol",
  770. messageSends: ["allProtocol", "model"],
  771. referencedClasses: []
  772. }),
  773. smalltalk.HLMethodsListWidget);
  774. smalltalk.addMethod(
  775. "_flushSelectorsCache",
  776. smalltalk.method({
  777. selector: "flushSelectorsCache",
  778. category: 'cache',
  779. fn: function (){
  780. var self=this;
  781. return smalltalk.withContext(function($ctx1) { self["@selectorsCache"]=_st((smalltalk.Dictionary || Dictionary))._new();
  782. return self}, function($ctx1) {$ctx1.fill(self,"flushSelectorsCache",{}, smalltalk.HLMethodsListWidget)})},
  783. args: [],
  784. source: "flushSelectorsCache\x0a\x09selectorsCache := Dictionary new",
  785. messageSends: ["new"],
  786. referencedClasses: ["Dictionary"]
  787. }),
  788. smalltalk.HLMethodsListWidget);
  789. smalltalk.addMethod(
  790. "_iconForItem_",
  791. smalltalk.method({
  792. selector: "iconForItem:",
  793. category: 'accessing',
  794. fn: function (aCompiledMethod){
  795. var self=this;
  796. var override,overriden;
  797. return smalltalk.withContext(function($ctx1) { var $2,$3,$4,$1;
  798. override=_st(self)._isOverride_(aCompiledMethod);
  799. overriden=_st(self)._isOverridden_(aCompiledMethod);
  800. $2=override;
  801. if(smalltalk.assert($2)){
  802. $3=overriden;
  803. if(smalltalk.assert($3)){
  804. $1="icon-resize-vertical";
  805. } else {
  806. $1="icon-arrow-up";
  807. };
  808. } else {
  809. $4=overriden;
  810. if(smalltalk.assert($4)){
  811. $1="icon-arrow-down";
  812. } else {
  813. $1="icon-none";
  814. };
  815. };
  816. return $1;
  817. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{aCompiledMethod:aCompiledMethod,override:override,overriden:overriden}, smalltalk.HLMethodsListWidget)})},
  818. args: ["aCompiledMethod"],
  819. source: "iconForItem: aCompiledMethod\x0a\x09| override overriden |\x0a \x0a override := self isOverride: aCompiledMethod.\x0a overriden := self isOverridden: aCompiledMethod.\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' ] ]",
  820. messageSends: ["isOverride:", "isOverridden:", "ifTrue:ifFalse:"],
  821. referencedClasses: []
  822. }),
  823. smalltalk.HLMethodsListWidget);
  824. smalltalk.addMethod(
  825. "_initialize",
  826. smalltalk.method({
  827. selector: "initialize",
  828. category: 'initialization',
  829. fn: function (){
  830. var self=this;
  831. return smalltalk.withContext(function($ctx1) { smalltalk.HLBrowserListWidget.fn.prototype._initialize.apply(_st(self), []);
  832. _st(self)._flushSelectorsCache();
  833. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLMethodsListWidget)})},
  834. args: [],
  835. source: "initialize\x0a\x09super initialize.\x0a self flushSelectorsCache",
  836. messageSends: ["initialize", "flushSelectorsCache"],
  837. referencedClasses: []
  838. }),
  839. smalltalk.HLMethodsListWidget);
  840. smalltalk.addMethod(
  841. "_isOverridden_",
  842. smalltalk.method({
  843. selector: "isOverridden:",
  844. category: 'testing',
  845. fn: function (aMethod){
  846. var self=this;
  847. return smalltalk.withContext(function($ctx1) { var $1;
  848. $1=_st(_st(self)._selectorsCache())._isOverridden_(aMethod);
  849. return $1;
  850. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  851. args: ["aMethod"],
  852. source: "isOverridden: aMethod\x0a ^ self selectorsCache isOverridden: aMethod",
  853. messageSends: ["isOverridden:", "selectorsCache"],
  854. referencedClasses: []
  855. }),
  856. smalltalk.HLMethodsListWidget);
  857. smalltalk.addMethod(
  858. "_isOverride_",
  859. smalltalk.method({
  860. selector: "isOverride:",
  861. category: 'testing',
  862. fn: function (aMethod){
  863. var self=this;
  864. return smalltalk.withContext(function($ctx1) { var $1;
  865. $1=_st(_st(self)._selectorsCache())._isOverride_(aMethod);
  866. return $1;
  867. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  868. args: ["aMethod"],
  869. source: "isOverride: aMethod\x0a ^ self selectorsCache isOverride: aMethod",
  870. messageSends: ["isOverride:", "selectorsCache"],
  871. referencedClasses: []
  872. }),
  873. smalltalk.HLMethodsListWidget);
  874. smalltalk.addMethod(
  875. "_methodsInProtocol_",
  876. smalltalk.method({
  877. selector: "methodsInProtocol:",
  878. category: 'accessing',
  879. fn: function (aString){
  880. var self=this;
  881. return smalltalk.withContext(function($ctx1) { var $2,$1;
  882. $2=_st(aString).__eq(_st(self)._allProtocol());
  883. if(smalltalk.assert($2)){
  884. $1=_st(_st(_st(self)._model())._selectedClass())._methods();
  885. } else {
  886. $1=_st(_st(_st(self)._model())._selectedClass())._methodsInProtocol_(aString);
  887. };
  888. return $1;
  889. }, function($ctx1) {$ctx1.fill(self,"methodsInProtocol:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  890. args: ["aString"],
  891. source: "methodsInProtocol: aString\x0a\x09^ aString = self allProtocol\x0a \x09ifTrue: [ self model selectedClass methods ]\x0a \x09ifFalse: [ self model selectedClass methodsInProtocol: aString ]",
  892. messageSends: ["ifTrue:ifFalse:", "methods", "selectedClass", "model", "methodsInProtocol:", "=", "allProtocol"],
  893. referencedClasses: []
  894. }),
  895. smalltalk.HLMethodsListWidget);
  896. smalltalk.addMethod(
  897. "_observeModel",
  898. smalltalk.method({
  899. selector: "observeModel",
  900. category: 'actions',
  901. fn: function (){
  902. var self=this;
  903. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  904. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  905. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  906. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  907. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(nil);
  908. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  909. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLMethodSelected || HLMethodSelected),(function(ann){
  910. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodSelected_(_st(ann)._item());
  911. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  912. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLMethodsListWidget)})},
  913. args: [],
  914. 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 ]",
  915. messageSends: ["on:do:", "onProtocolSelected:", "item", "announcer", "model", "onMethodSelected:"],
  916. referencedClasses: ["HLProtocolSelected", "HLShowInstanceToggled", "HLMethodSelected"]
  917. }),
  918. smalltalk.HLMethodsListWidget);
  919. smalltalk.addMethod(
  920. "_onMethodSelected_",
  921. smalltalk.method({
  922. selector: "onMethodSelected:",
  923. category: 'reactions',
  924. fn: function (aMethod){
  925. var self=this;
  926. return smalltalk.withContext(function($ctx1) { var $1,$2;
  927. _st(self)._selectedItem_(aMethod);
  928. $1=aMethod;
  929. if(($receiver = $1) == nil || $receiver == undefined){
  930. $2=self;
  931. return $2;
  932. } else {
  933. $1;
  934. };
  935. _st(self)._focus();
  936. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  937. args: ["aMethod"],
  938. source: "onMethodSelected: aMethod\x0a\x09self selectedItem: aMethod.\x0a\x09aMethod ifNil: [ ^ self ].\x0a \x0a self focus",
  939. messageSends: ["selectedItem:", "ifNil:", "focus"],
  940. referencedClasses: []
  941. }),
  942. smalltalk.HLMethodsListWidget);
  943. smalltalk.addMethod(
  944. "_onProtocolSelected_",
  945. smalltalk.method({
  946. selector: "onProtocolSelected:",
  947. category: 'reactions',
  948. fn: function (aString){
  949. var self=this;
  950. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  951. _st(self)._selectedItem_(nil);
  952. $1=self;
  953. $3=_st(_st(self)._model())._selectedClass();
  954. if(($receiver = $3) == nil || $receiver == undefined){
  955. $2=[];
  956. } else {
  957. $4=aString;
  958. if(($receiver = $4) == nil || $receiver == undefined){
  959. $2=[];
  960. } else {
  961. $2=_st(self)._methodsInProtocol_(aString);
  962. };
  963. };
  964. _st($1)._items_($2);
  965. _st(self)._refresh();
  966. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  967. args: ["aString"],
  968. 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 methodsInProtocol: aString ] ]).\x0a \x0a self refresh",
  969. messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "methodsInProtocol:", "selectedClass", "model", "refresh"],
  970. referencedClasses: []
  971. }),
  972. smalltalk.HLMethodsListWidget);
  973. smalltalk.addMethod(
  974. "_overrideSelectors",
  975. smalltalk.method({
  976. selector: "overrideSelectors",
  977. category: 'accessing',
  978. fn: function (){
  979. var self=this;
  980. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  981. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("override",(function(){
  982. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(_st(self)._model())._selectedClass())._allSuperclasses())._inject_into_(_st((smalltalk.Set || Set))._new(),(function(acc,each){
  983. return smalltalk.withContext(function($ctx3) { $2=acc;
  984. _st($2)._addAll_(_st(each)._selectors());
  985. $3=_st($2)._yourself();
  986. return $3;
  987. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  988. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  989. return $1;
  990. }, function($ctx1) {$ctx1.fill(self,"overrideSelectors",{}, smalltalk.HLMethodsListWidget)})},
  991. args: [],
  992. 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 ] ]",
  993. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSuperclasses", "selectedClass", "model", "selectorsCache"],
  994. referencedClasses: ["Set"]
  995. }),
  996. smalltalk.HLMethodsListWidget);
  997. smalltalk.addMethod(
  998. "_overridenSelectors",
  999. smalltalk.method({
  1000. selector: "overridenSelectors",
  1001. category: 'accessing',
  1002. fn: function (){
  1003. var self=this;
  1004. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1005. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("overriden",(function(){
  1006. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(_st(self)._model())._selectedClass())._allSubclasses())._inject_into_(_st((smalltalk.Set || Set))._new(),(function(acc,each){
  1007. return smalltalk.withContext(function($ctx3) { $2=acc;
  1008. _st($2)._addAll_(_st(each)._selectors());
  1009. $3=_st($2)._yourself();
  1010. return $3;
  1011. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  1012. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1013. return $1;
  1014. }, function($ctx1) {$ctx1.fill(self,"overridenSelectors",{}, smalltalk.HLMethodsListWidget)})},
  1015. args: [],
  1016. 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 ] ]",
  1017. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSubclasses", "selectedClass", "model", "selectorsCache"],
  1018. referencedClasses: ["Set"]
  1019. }),
  1020. smalltalk.HLMethodsListWidget);
  1021. smalltalk.addMethod(
  1022. "_renderContentOn_",
  1023. smalltalk.method({
  1024. selector: "renderContentOn:",
  1025. category: 'rendering',
  1026. fn: function (html){
  1027. var self=this;
  1028. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1029. $1=_st(_st(self)._model())._showInstance();
  1030. if(smalltalk.assert($1)){
  1031. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1032. } else {
  1033. $2=_st(html)._div();
  1034. _st($2)._class_("class_side");
  1035. $3=_st($2)._with_((function(){
  1036. return smalltalk.withContext(function($ctx2) { return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1037. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1038. $3;
  1039. };
  1040. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLMethodsListWidget)})},
  1041. args: ["html"],
  1042. 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 ].\x0a \x0a \x22self flushSelectorsCache\x22",
  1043. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"],
  1044. referencedClasses: []
  1045. }),
  1046. smalltalk.HLMethodsListWidget);
  1047. smalltalk.addMethod(
  1048. "_renderItemLabel_on_",
  1049. smalltalk.method({
  1050. selector: "renderItemLabel:on:",
  1051. category: 'rendering',
  1052. fn: function (aCompiledMethod,html){
  1053. var self=this;
  1054. return smalltalk.withContext(function($ctx1) { _st(html)._with_(_st(aCompiledMethod)._selector());
  1055. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aCompiledMethod:aCompiledMethod,html:html}, smalltalk.HLMethodsListWidget)})},
  1056. args: ["aCompiledMethod", "html"],
  1057. source: "renderItemLabel: aCompiledMethod on: html\x0a\x09html with: aCompiledMethod selector",
  1058. messageSends: ["with:", "selector"],
  1059. referencedClasses: []
  1060. }),
  1061. smalltalk.HLMethodsListWidget);
  1062. smalltalk.addMethod(
  1063. "_selectItem_",
  1064. smalltalk.method({
  1065. selector: "selectItem:",
  1066. category: 'actions',
  1067. fn: function (aCompiledMethod){
  1068. var self=this;
  1069. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedMethod_(aCompiledMethod);
  1070. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLMethodsListWidget)})},
  1071. args: ["aCompiledMethod"],
  1072. source: "selectItem: aCompiledMethod\x0a \x09self model selectedMethod: aCompiledMethod",
  1073. messageSends: ["selectedMethod:", "model"],
  1074. referencedClasses: []
  1075. }),
  1076. smalltalk.HLMethodsListWidget);
  1077. smalltalk.addMethod(
  1078. "_selectorsCache",
  1079. smalltalk.method({
  1080. selector: "selectorsCache",
  1081. category: 'accessing',
  1082. fn: function (){
  1083. var self=this;
  1084. return smalltalk.withContext(function($ctx1) { var $1;
  1085. $1=_st(_st(self)._class())._selectorsCache();
  1086. return $1;
  1087. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLMethodsListWidget)})},
  1088. args: [],
  1089. source: "selectorsCache\x0a\x09^ self class selectorsCache",
  1090. messageSends: ["selectorsCache", "class"],
  1091. referencedClasses: []
  1092. }),
  1093. smalltalk.HLMethodsListWidget);
  1094. smalltalk.HLMethodsListWidget.klass.iVarNames = ['selectorsCache'];
  1095. smalltalk.addMethod(
  1096. "_selectorsCache",
  1097. smalltalk.method({
  1098. selector: "selectorsCache",
  1099. category: 'accessing',
  1100. fn: function (){
  1101. var self=this;
  1102. return smalltalk.withContext(function($ctx1) { var $1;
  1103. $1=_st((smalltalk.HLSelectorsCache || HLSelectorsCache))._current();
  1104. return $1;
  1105. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLMethodsListWidget.klass)})},
  1106. args: [],
  1107. source: "selectorsCache\x0a\x09^ HLSelectorsCache current",
  1108. messageSends: ["current"],
  1109. referencedClasses: ["HLSelectorsCache"]
  1110. }),
  1111. smalltalk.HLMethodsListWidget.klass);
  1112. smalltalk.addClass('HLPackagesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1113. smalltalk.addMethod(
  1114. "_focusClassesListWidget",
  1115. smalltalk.method({
  1116. selector: "focusClassesListWidget",
  1117. category: 'actions',
  1118. fn: function (){
  1119. var self=this;
  1120. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._announce_(_st((smalltalk.HLClassesListFocus || HLClassesListFocus))._new());
  1121. return self}, function($ctx1) {$ctx1.fill(self,"focusClassesListWidget",{}, smalltalk.HLPackagesListWidget)})},
  1122. args: [],
  1123. source: "focusClassesListWidget\x0a\x09self model announcer announce: HLClassesListFocus new",
  1124. messageSends: ["announce:", "new", "announcer", "model"],
  1125. referencedClasses: ["HLClassesListFocus"]
  1126. }),
  1127. smalltalk.HLPackagesListWidget);
  1128. smalltalk.addMethod(
  1129. "_initializeItems",
  1130. smalltalk.method({
  1131. selector: "initializeItems",
  1132. category: 'accessing',
  1133. fn: function (){
  1134. var self=this;
  1135. return smalltalk.withContext(function($ctx1) { var $1;
  1136. self["@items"]=_st(_st(_st(self)._model())._packages())._sort_((function(a,b){
  1137. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._name()).__lt(_st(b)._name());
  1138. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  1139. $1=self["@items"];
  1140. return $1;
  1141. }, function($ctx1) {$ctx1.fill(self,"initializeItems",{}, smalltalk.HLPackagesListWidget)})},
  1142. args: [],
  1143. source: "initializeItems\x0a\x09^ items := self model packages sort:[:a :b|\x0a\x09\x09\x09\x09\x09\x09a name < b name]",
  1144. messageSends: ["sort:", "<", "name", "packages", "model"],
  1145. referencedClasses: []
  1146. }),
  1147. smalltalk.HLPackagesListWidget);
  1148. smalltalk.addMethod(
  1149. "_items",
  1150. smalltalk.method({
  1151. selector: "items",
  1152. category: 'accessing',
  1153. fn: function (){
  1154. var self=this;
  1155. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1156. $2=self["@items"];
  1157. if(($receiver = $2) == nil || $receiver == undefined){
  1158. $1=_st(self)._initializeItems();
  1159. } else {
  1160. $1=$2;
  1161. };
  1162. return $1;
  1163. }, function($ctx1) {$ctx1.fill(self,"items",{}, smalltalk.HLPackagesListWidget)})},
  1164. args: [],
  1165. source: "items\x0a\x09^ items ifNil: [self initializeItems]",
  1166. messageSends: ["ifNil:", "initializeItems"],
  1167. referencedClasses: []
  1168. }),
  1169. smalltalk.HLPackagesListWidget);
  1170. smalltalk.addMethod(
  1171. "_observeModel",
  1172. smalltalk.method({
  1173. selector: "observeModel",
  1174. category: 'actions',
  1175. fn: function (){
  1176. var self=this;
  1177. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLPackageSelected || HLPackageSelected),(function(ann){
  1178. return smalltalk.withContext(function($ctx2) { return _st(self)._onPackageSelected_(_st(ann)._item());
  1179. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1180. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLPackagesListWidget)})},
  1181. args: [],
  1182. source: "observeModel\x0a self model announcer on: HLPackageSelected do: [ :ann |\x0a \x09self onPackageSelected: ann item ]",
  1183. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model"],
  1184. referencedClasses: ["HLPackageSelected"]
  1185. }),
  1186. smalltalk.HLPackagesListWidget);
  1187. smalltalk.addMethod(
  1188. "_onPackageSelected_",
  1189. smalltalk.method({
  1190. selector: "onPackageSelected:",
  1191. category: 'reactions',
  1192. fn: function (aPackage){
  1193. var self=this;
  1194. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(aPackage);
  1195. _st(self)._focus();
  1196. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{aPackage:aPackage}, smalltalk.HLPackagesListWidget)})},
  1197. args: ["aPackage"],
  1198. source: "onPackageSelected: aPackage\x0a\x09self selectedItem: aPackage.\x0a\x09self focus",
  1199. messageSends: ["selectedItem:", "focus"],
  1200. referencedClasses: []
  1201. }),
  1202. smalltalk.HLPackagesListWidget);
  1203. smalltalk.addMethod(
  1204. "_renderButtonsOn_",
  1205. smalltalk.method({
  1206. selector: "renderButtonsOn:",
  1207. category: 'rendering',
  1208. fn: function (html){
  1209. var self=this;
  1210. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$5,$6,$7,$8,$4,$9,$10;
  1211. $1=_st(html)._span();
  1212. _st($1)._class_("info");
  1213. $2=_st($1)._with_("Auto commit");
  1214. $3=_st(html)._div();
  1215. _st($3)._class_("btn-group switch");
  1216. _st($3)._at_put_("data-toggle","buttons-radio");
  1217. $4=_st($3)._with_((function(){
  1218. return smalltalk.withContext(function($ctx2) { $5=_st(html)._button();
  1219. _st($5)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  1220. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("btn");
  1221. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1222. $6=_st($5)._with_("On");
  1223. $6;
  1224. $7=_st(html)._button();
  1225. _st($7)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  1226. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("btn active");
  1227. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1228. $8=_st($7)._with_("Off");
  1229. return $8;
  1230. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1231. $9=_st(html)._a();
  1232. _st($9)._class_("btn");
  1233. $10=_st($9)._with_("Commit");
  1234. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.HLPackagesListWidget)})},
  1235. args: ["html"],
  1236. 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'.",
  1237. messageSends: ["class:", "span", "with:", "div", "at:put:", "streamContents:", "nextPutAll:", "button", "a"],
  1238. referencedClasses: ["String"]
  1239. }),
  1240. smalltalk.HLPackagesListWidget);
  1241. smalltalk.addMethod(
  1242. "_selectItem_",
  1243. smalltalk.method({
  1244. selector: "selectItem:",
  1245. category: 'actions',
  1246. fn: function (aPackage){
  1247. var self=this;
  1248. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedPackage_(aPackage);
  1249. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aPackage:aPackage}, smalltalk.HLPackagesListWidget)})},
  1250. args: ["aPackage"],
  1251. source: "selectItem: aPackage\x0a\x09self model selectedPackage: aPackage",
  1252. messageSends: ["selectedPackage:", "model"],
  1253. referencedClasses: []
  1254. }),
  1255. smalltalk.HLPackagesListWidget);
  1256. smalltalk.addClass('HLProtocolsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1257. smalltalk.addMethod(
  1258. "_allProtocol",
  1259. smalltalk.method({
  1260. selector: "allProtocol",
  1261. category: 'accessing',
  1262. fn: function (){
  1263. var self=this;
  1264. return smalltalk.withContext(function($ctx1) { var $1;
  1265. $1=_st(_st(self)._model())._allProtocol();
  1266. return $1;
  1267. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLProtocolsListWidget)})},
  1268. args: [],
  1269. source: "allProtocol\x0a\x09^ self model allProtocol",
  1270. messageSends: ["allProtocol", "model"],
  1271. referencedClasses: []
  1272. }),
  1273. smalltalk.HLProtocolsListWidget);
  1274. smalltalk.addMethod(
  1275. "_observeModel",
  1276. smalltalk.method({
  1277. selector: "observeModel",
  1278. category: 'actions',
  1279. fn: function (){
  1280. var self=this;
  1281. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  1282. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  1283. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1284. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  1285. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(_st(self)._model())._selectedClass());
  1286. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1287. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  1288. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  1289. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1290. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLProtocolsListWidget)})},
  1291. args: [],
  1292. 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 ]",
  1293. messageSends: ["on:do:", "onClassSelected:", "item", "announcer", "model", "selectedClass", "onProtocolSelected:"],
  1294. referencedClasses: ["HLClassSelected", "HLShowInstanceToggled", "HLProtocolSelected"]
  1295. }),
  1296. smalltalk.HLProtocolsListWidget);
  1297. smalltalk.addMethod(
  1298. "_onClassSelected_",
  1299. smalltalk.method({
  1300. selector: "onClassSelected:",
  1301. category: 'reactions',
  1302. fn: function (aClass){
  1303. var self=this;
  1304. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$2;
  1305. _st(self)._selectedItem_(nil);
  1306. $1=self;
  1307. $3=aClass;
  1308. if(($receiver = $3) == nil || $receiver == undefined){
  1309. $2=_st((smalltalk.Array || Array))._with_(_st(self)._allProtocol());
  1310. } else {
  1311. $4=_st((smalltalk.Array || Array))._with_(_st(self)._allProtocol());
  1312. _st($4)._addAll_(_st(aClass)._protocols());
  1313. $5=_st($4)._yourself();
  1314. $2=$5;
  1315. };
  1316. _st($1)._items_($2);
  1317. _st(self)._refresh();
  1318. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLProtocolsListWidget)})},
  1319. args: ["aClass"],
  1320. 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",
  1321. messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself", "refresh"],
  1322. referencedClasses: ["Array"]
  1323. }),
  1324. smalltalk.HLProtocolsListWidget);
  1325. smalltalk.addMethod(
  1326. "_onProtocolSelected_",
  1327. smalltalk.method({
  1328. selector: "onProtocolSelected:",
  1329. category: 'reactions',
  1330. fn: function (aString){
  1331. var self=this;
  1332. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1333. _st(self)._selectedItem_(aString);
  1334. $1=aString;
  1335. if(($receiver = $1) == nil || $receiver == undefined){
  1336. $2=self;
  1337. return $2;
  1338. } else {
  1339. $1;
  1340. };
  1341. _st(self)._focus();
  1342. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLProtocolsListWidget)})},
  1343. args: ["aString"],
  1344. source: "onProtocolSelected: aString\x0a\x09self selectedItem: aString.\x0a\x09aString ifNil: [ ^ self ].\x0a \x0a self focus",
  1345. messageSends: ["selectedItem:", "ifNil:", "focus"],
  1346. referencedClasses: []
  1347. }),
  1348. smalltalk.HLProtocolsListWidget);
  1349. smalltalk.addMethod(
  1350. "_renderContentOn_",
  1351. smalltalk.method({
  1352. selector: "renderContentOn:",
  1353. category: 'rendering',
  1354. fn: function (html){
  1355. var self=this;
  1356. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1357. $1=_st(_st(self)._model())._showInstance();
  1358. if(smalltalk.assert($1)){
  1359. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1360. } else {
  1361. $2=_st(html)._div();
  1362. _st($2)._class_("class_side");
  1363. $3=_st($2)._with_((function(){
  1364. return smalltalk.withContext(function($ctx2) { return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1365. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1366. $3;
  1367. };
  1368. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLProtocolsListWidget)})},
  1369. args: ["html"],
  1370. 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 ]",
  1371. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"],
  1372. referencedClasses: []
  1373. }),
  1374. smalltalk.HLProtocolsListWidget);
  1375. smalltalk.addMethod(
  1376. "_selectItem_",
  1377. smalltalk.method({
  1378. selector: "selectItem:",
  1379. category: 'actions',
  1380. fn: function (aString){
  1381. var self=this;
  1382. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedProtocol_(aString);
  1383. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aString:aString}, smalltalk.HLProtocolsListWidget)})},
  1384. args: ["aString"],
  1385. source: "selectItem: aString\x0a self model selectedProtocol: aString",
  1386. messageSends: ["selectedProtocol:", "model"],
  1387. referencedClasses: []
  1388. }),
  1389. smalltalk.HLProtocolsListWidget);
  1390. smalltalk.addMethod(
  1391. "_selectedItem",
  1392. smalltalk.method({
  1393. selector: "selectedItem",
  1394. category: 'accessing',
  1395. fn: function (){
  1396. var self=this;
  1397. return smalltalk.withContext(function($ctx1) { var $1;
  1398. $1=smalltalk.HLBrowserListWidget.fn.prototype._selectedItem.apply(_st(self), []);
  1399. return $1;
  1400. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{}, smalltalk.HLProtocolsListWidget)})},
  1401. args: [],
  1402. source: "selectedItem\x0a\x09^ super selectedItem\x22 ifNil: [ self allProtocol ]\x22",
  1403. messageSends: ["selectedItem"],
  1404. referencedClasses: []
  1405. }),
  1406. smalltalk.HLProtocolsListWidget);
  1407. smalltalk.addClass('HLBrowserModel', smalltalk.Object, ['announcer', 'environment', 'selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'showInstance', 'showComment'], 'Helios-Browser');
  1408. smalltalk.addMethod(
  1409. "_allProtocol",
  1410. smalltalk.method({
  1411. selector: "allProtocol",
  1412. category: 'accessing',
  1413. fn: function (){
  1414. var self=this;
  1415. return smalltalk.withContext(function($ctx1) { return "-- All --";
  1416. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLBrowserModel)})},
  1417. args: [],
  1418. source: "allProtocol\x0a\x09^ '-- All --'",
  1419. messageSends: [],
  1420. referencedClasses: []
  1421. }),
  1422. smalltalk.HLBrowserModel);
  1423. smalltalk.addMethod(
  1424. "_announcer",
  1425. smalltalk.method({
  1426. selector: "announcer",
  1427. category: 'accessing',
  1428. fn: function (){
  1429. var self=this;
  1430. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1431. $2=self["@announcer"];
  1432. if(($receiver = $2) == nil || $receiver == undefined){
  1433. self["@announcer"]=_st((smalltalk.Announcer || Announcer))._new();
  1434. $1=self["@announcer"];
  1435. } else {
  1436. $1=$2;
  1437. };
  1438. return $1;
  1439. }, function($ctx1) {$ctx1.fill(self,"announcer",{}, smalltalk.HLBrowserModel)})},
  1440. args: [],
  1441. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  1442. messageSends: ["ifNil:", "new"],
  1443. referencedClasses: ["Announcer"]
  1444. }),
  1445. smalltalk.HLBrowserModel);
  1446. smalltalk.addMethod(
  1447. "_environment",
  1448. smalltalk.method({
  1449. selector: "environment",
  1450. category: 'accessing',
  1451. fn: function (){
  1452. var self=this;
  1453. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1454. $2=self["@environment"];
  1455. if(($receiver = $2) == nil || $receiver == undefined){
  1456. $1=_st(_st((smalltalk.HLManager || HLManager))._current())._environment();
  1457. } else {
  1458. $1=$2;
  1459. };
  1460. return $1;
  1461. }, function($ctx1) {$ctx1.fill(self,"environment",{}, smalltalk.HLBrowserModel)})},
  1462. args: [],
  1463. source: "environment\x0a\x09^ environment ifNil: [ HLManager current environment ]",
  1464. messageSends: ["ifNil:", "environment", "current"],
  1465. referencedClasses: ["HLManager"]
  1466. }),
  1467. smalltalk.HLBrowserModel);
  1468. smalltalk.addMethod(
  1469. "_environment_",
  1470. smalltalk.method({
  1471. selector: "environment:",
  1472. category: 'accessing',
  1473. fn: function (anEnvironment){
  1474. var self=this;
  1475. return smalltalk.withContext(function($ctx1) { self["@environment"]=anEnvironment;
  1476. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel)})},
  1477. args: ["anEnvironment"],
  1478. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  1479. messageSends: [],
  1480. referencedClasses: []
  1481. }),
  1482. smalltalk.HLBrowserModel);
  1483. smalltalk.addMethod(
  1484. "_packages",
  1485. smalltalk.method({
  1486. selector: "packages",
  1487. category: 'accessing',
  1488. fn: function (){
  1489. var self=this;
  1490. return smalltalk.withContext(function($ctx1) { var $1;
  1491. $1=_st(_st(self)._environment())._packages();
  1492. return $1;
  1493. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLBrowserModel)})},
  1494. args: [],
  1495. source: "packages\x0a\x09^ self environment packages",
  1496. messageSends: ["packages", "environment"],
  1497. referencedClasses: []
  1498. }),
  1499. smalltalk.HLBrowserModel);
  1500. smalltalk.addMethod(
  1501. "_selectedClass",
  1502. smalltalk.method({
  1503. selector: "selectedClass",
  1504. category: 'accessing',
  1505. fn: function (){
  1506. var self=this;
  1507. return smalltalk.withContext(function($ctx1) { var $1;
  1508. $1=self["@selectedClass"];
  1509. return $1;
  1510. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{}, smalltalk.HLBrowserModel)})},
  1511. args: [],
  1512. source: "selectedClass\x0a\x09^ selectedClass",
  1513. messageSends: [],
  1514. referencedClasses: []
  1515. }),
  1516. smalltalk.HLBrowserModel);
  1517. smalltalk.addMethod(
  1518. "_selectedClass_",
  1519. smalltalk.method({
  1520. selector: "selectedClass:",
  1521. category: 'accessing',
  1522. fn: function (aClass){
  1523. var self=this;
  1524. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  1525. $1=_st(self["@selectedClass"]).__eq(aClass);
  1526. if(smalltalk.assert($1)){
  1527. $2=self;
  1528. return $2;
  1529. };
  1530. $3=aClass;
  1531. if(($receiver = $3) == nil || $receiver == undefined){
  1532. self["@selectedClass"]=nil;
  1533. self["@selectedClass"];
  1534. } else {
  1535. $4=_st(self)._showInstance();
  1536. if(smalltalk.assert($4)){
  1537. self["@selectedClass"]=_st(aClass)._theNonMetaClass();
  1538. self["@selectedClass"];
  1539. } else {
  1540. self["@selectedClass"]=_st(aClass)._theMetaClass();
  1541. self["@selectedClass"];
  1542. };
  1543. };
  1544. _st(self)._selectedProtocol_(nil);
  1545. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLClassSelected || HLClassSelected))._on_(_st(self)._selectedClass()));
  1546. return self}, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass}, smalltalk.HLBrowserModel)})},
  1547. args: ["aClass"],
  1548. 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)",
  1549. messageSends: ["ifTrue:", "=", "ifNil:ifNotNil:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "showInstance", "selectedProtocol:", "announce:", "on:", "selectedClass", "announcer"],
  1550. referencedClasses: ["HLClassSelected"]
  1551. }),
  1552. smalltalk.HLBrowserModel);
  1553. smalltalk.addMethod(
  1554. "_selectedMethod",
  1555. smalltalk.method({
  1556. selector: "selectedMethod",
  1557. category: 'accessing',
  1558. fn: function (){
  1559. var self=this;
  1560. return smalltalk.withContext(function($ctx1) { var $1;
  1561. $1=self["@selectedMethod"];
  1562. return $1;
  1563. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{}, smalltalk.HLBrowserModel)})},
  1564. args: [],
  1565. source: "selectedMethod\x0a\x09^ selectedMethod",
  1566. messageSends: [],
  1567. referencedClasses: []
  1568. }),
  1569. smalltalk.HLBrowserModel);
  1570. smalltalk.addMethod(
  1571. "_selectedMethod_",
  1572. smalltalk.method({
  1573. selector: "selectedMethod:",
  1574. category: 'accessing',
  1575. fn: function (aCompiledMethod){
  1576. var self=this;
  1577. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1578. $1=_st(self["@selectedMethod"]).__eq(aCompiledMethod);
  1579. if(smalltalk.assert($1)){
  1580. $2=self;
  1581. return $2;
  1582. };
  1583. self["@selectedMethod"]=aCompiledMethod;
  1584. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLMethodSelected || HLMethodSelected))._on_(aCompiledMethod));
  1585. return self}, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserModel)})},
  1586. args: ["aCompiledMethod"],
  1587. source: "selectedMethod: aCompiledMethod\x0a\x09selectedMethod = aCompiledMethod ifTrue: [ ^ self ].\x0a\x0a\x09selectedMethod := aCompiledMethod. \x0a self announcer announce: (HLMethodSelected on: aCompiledMethod)",
  1588. messageSends: ["ifTrue:", "=", "announce:", "on:", "announcer"],
  1589. referencedClasses: ["HLMethodSelected"]
  1590. }),
  1591. smalltalk.HLBrowserModel);
  1592. smalltalk.addMethod(
  1593. "_selectedPackage",
  1594. smalltalk.method({
  1595. selector: "selectedPackage",
  1596. category: 'accessing',
  1597. fn: function (){
  1598. var self=this;
  1599. return smalltalk.withContext(function($ctx1) { var $1;
  1600. $1=self["@selectedPackage"];
  1601. return $1;
  1602. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{}, smalltalk.HLBrowserModel)})},
  1603. args: [],
  1604. source: "selectedPackage\x0a\x09^ selectedPackage",
  1605. messageSends: [],
  1606. referencedClasses: []
  1607. }),
  1608. smalltalk.HLBrowserModel);
  1609. smalltalk.addMethod(
  1610. "_selectedPackage_",
  1611. smalltalk.method({
  1612. selector: "selectedPackage:",
  1613. category: 'accessing',
  1614. fn: function (aPackage){
  1615. var self=this;
  1616. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1617. $1=_st(self["@selectedPackage"]).__eq(aPackage);
  1618. if(smalltalk.assert($1)){
  1619. $2=self;
  1620. return $2;
  1621. };
  1622. self["@selectedPackage"]=aPackage;
  1623. _st(self)._selectedClass_(nil);
  1624. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLPackageSelected || HLPackageSelected))._on_(aPackage));
  1625. return self}, function($ctx1) {$ctx1.fill(self,"selectedPackage:",{aPackage:aPackage}, smalltalk.HLBrowserModel)})},
  1626. args: ["aPackage"],
  1627. source: "selectedPackage: aPackage\x0a\x09selectedPackage = aPackage ifTrue: [ ^ self ].\x0a \x0a\x09selectedPackage := aPackage.\x0a\x09self selectedClass: nil.\x0a self announcer announce: (HLPackageSelected on: aPackage)",
  1628. messageSends: ["ifTrue:", "=", "selectedClass:", "announce:", "on:", "announcer"],
  1629. referencedClasses: ["HLPackageSelected"]
  1630. }),
  1631. smalltalk.HLBrowserModel);
  1632. smalltalk.addMethod(
  1633. "_selectedProtocol",
  1634. smalltalk.method({
  1635. selector: "selectedProtocol",
  1636. category: 'accessing',
  1637. fn: function (){
  1638. var self=this;
  1639. return smalltalk.withContext(function($ctx1) { var $1;
  1640. $1=self["@selectedProtocol"];
  1641. return $1;
  1642. }, function($ctx1) {$ctx1.fill(self,"selectedProtocol",{}, smalltalk.HLBrowserModel)})},
  1643. args: [],
  1644. source: "selectedProtocol\x0a\x09^ selectedProtocol",
  1645. messageSends: [],
  1646. referencedClasses: []
  1647. }),
  1648. smalltalk.HLBrowserModel);
  1649. smalltalk.addMethod(
  1650. "_selectedProtocol_",
  1651. smalltalk.method({
  1652. selector: "selectedProtocol:",
  1653. category: 'accessing',
  1654. fn: function (aString){
  1655. var self=this;
  1656. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1657. $1=_st(self["@selectedProtocol"]).__eq(aString);
  1658. if(smalltalk.assert($1)){
  1659. $2=self;
  1660. return $2;
  1661. };
  1662. self["@selectedProtocol"]=aString;
  1663. _st(self)._selectedMethod_(nil);
  1664. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLProtocolSelected || HLProtocolSelected))._on_(aString));
  1665. return self}, function($ctx1) {$ctx1.fill(self,"selectedProtocol:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1666. args: ["aString"],
  1667. source: "selectedProtocol: aString\x0a\x09selectedProtocol = aString ifTrue: [ ^ self ].\x0a \x0a\x09selectedProtocol := aString.\x0a self selectedMethod: nil.\x0a self announcer announce: (HLProtocolSelected on: aString)",
  1668. messageSends: ["ifTrue:", "=", "selectedMethod:", "announce:", "on:", "announcer"],
  1669. referencedClasses: ["HLProtocolSelected"]
  1670. }),
  1671. smalltalk.HLBrowserModel);
  1672. smalltalk.addMethod(
  1673. "_showComment",
  1674. smalltalk.method({
  1675. selector: "showComment",
  1676. category: 'accessing',
  1677. fn: function (){
  1678. var self=this;
  1679. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1680. $2=self["@showComment"];
  1681. if(($receiver = $2) == nil || $receiver == undefined){
  1682. $1=false;
  1683. } else {
  1684. $1=$2;
  1685. };
  1686. return $1;
  1687. }, function($ctx1) {$ctx1.fill(self,"showComment",{}, smalltalk.HLBrowserModel)})},
  1688. args: [],
  1689. source: "showComment\x0a\x09^ showComment ifNil: [ false ]",
  1690. messageSends: ["ifNil:"],
  1691. referencedClasses: []
  1692. }),
  1693. smalltalk.HLBrowserModel);
  1694. smalltalk.addMethod(
  1695. "_showComment_",
  1696. smalltalk.method({
  1697. selector: "showComment:",
  1698. category: 'accessing',
  1699. fn: function (aBoolean){
  1700. var self=this;
  1701. return smalltalk.withContext(function($ctx1) { self["@showComment"]=aBoolean;
  1702. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowCommentToggled || HLShowCommentToggled))._new());
  1703. return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  1704. args: ["aBoolean"],
  1705. source: "showComment: aBoolean\x0a\x09showComment := aBoolean.\x0a \x0a self announcer announce: HLShowCommentToggled new",
  1706. messageSends: ["announce:", "new", "announcer"],
  1707. referencedClasses: ["HLShowCommentToggled"]
  1708. }),
  1709. smalltalk.HLBrowserModel);
  1710. smalltalk.addMethod(
  1711. "_showInstance",
  1712. smalltalk.method({
  1713. selector: "showInstance",
  1714. category: 'accessing',
  1715. fn: function (){
  1716. var self=this;
  1717. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1718. $2=self["@showInstance"];
  1719. if(($receiver = $2) == nil || $receiver == undefined){
  1720. $1=true;
  1721. } else {
  1722. $1=$2;
  1723. };
  1724. return $1;
  1725. }, function($ctx1) {$ctx1.fill(self,"showInstance",{}, smalltalk.HLBrowserModel)})},
  1726. args: [],
  1727. source: "showInstance\x0a\x09^ showInstance ifNil: [ true ]",
  1728. messageSends: ["ifNil:"],
  1729. referencedClasses: []
  1730. }),
  1731. smalltalk.HLBrowserModel);
  1732. smalltalk.addMethod(
  1733. "_showInstance_",
  1734. smalltalk.method({
  1735. selector: "showInstance:",
  1736. category: 'accessing',
  1737. fn: function (aBoolean){
  1738. var self=this;
  1739. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$3;
  1740. self["@showInstance"]=aBoolean;
  1741. $1=_st(self)._selectedClass();
  1742. if(($receiver = $1) == nil || $receiver == undefined){
  1743. $1;
  1744. } else {
  1745. $2=self;
  1746. $4=aBoolean;
  1747. if(smalltalk.assert($4)){
  1748. $3=_st(_st(self)._selectedClass())._theNonMetaClass();
  1749. } else {
  1750. $3=_st(_st(self)._selectedClass())._theMetaClass();
  1751. };
  1752. _st($2)._selectedClass_($3);
  1753. };
  1754. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled))._new());
  1755. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  1756. args: ["aBoolean"],
  1757. 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",
  1758. messageSends: ["ifNotNil:", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "selectedClass", "theMetaClass", "announce:", "new", "announcer"],
  1759. referencedClasses: ["HLShowInstanceToggled"]
  1760. }),
  1761. smalltalk.HLBrowserModel);
  1762. smalltalk.addMethod(
  1763. "_on_",
  1764. smalltalk.method({
  1765. selector: "on:",
  1766. category: 'actions',
  1767. fn: function (anEnvironment){
  1768. var self=this;
  1769. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1770. $2=_st(self)._new();
  1771. _st($2)._environment_(anEnvironment);
  1772. $3=_st($2)._yourself();
  1773. $1=$3;
  1774. return $1;
  1775. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel.klass)})},
  1776. args: ["anEnvironment"],
  1777. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  1778. messageSends: ["environment:", "new", "yourself"],
  1779. referencedClasses: []
  1780. }),
  1781. smalltalk.HLBrowserModel.klass);
  1782. smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'codeWidget'], 'Helios-Browser');
  1783. smalltalk.addMethod(
  1784. "_codeWidget",
  1785. smalltalk.method({
  1786. selector: "codeWidget",
  1787. category: 'accessing',
  1788. fn: function (){
  1789. var self=this;
  1790. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1791. $2=self["@codeWidget"];
  1792. if(($receiver = $2) == nil || $receiver == undefined){
  1793. self["@codeWidget"]=_st((smalltalk.HLCodeWidget || HLCodeWidget))._new();
  1794. $1=self["@codeWidget"];
  1795. } else {
  1796. $1=$2;
  1797. };
  1798. return $1;
  1799. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{}, smalltalk.HLBrowserSourceWidget)})},
  1800. args: [],
  1801. source: "codeWidget\x0a\x09^ codeWidget ifNil: [ codeWidget := HLCodeWidget new ]",
  1802. messageSends: ["ifNil:", "new"],
  1803. referencedClasses: ["HLCodeWidget"]
  1804. }),
  1805. smalltalk.HLBrowserSourceWidget);
  1806. smalltalk.addMethod(
  1807. "_contents",
  1808. smalltalk.method({
  1809. selector: "contents",
  1810. category: 'accessing',
  1811. fn: function (){
  1812. var self=this;
  1813. return smalltalk.withContext(function($ctx1) { var $1;
  1814. $1=_st(_st(self)._sourceArea())._contents();
  1815. return $1;
  1816. }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.HLBrowserSourceWidget)})},
  1817. args: [],
  1818. source: "contents\x0a\x09^ self sourceArea contents",
  1819. messageSends: ["contents", "sourceArea"],
  1820. referencedClasses: []
  1821. }),
  1822. smalltalk.HLBrowserSourceWidget);
  1823. smalltalk.addMethod(
  1824. "_contents_",
  1825. smalltalk.method({
  1826. selector: "contents:",
  1827. category: 'accessing',
  1828. fn: function (aString){
  1829. var self=this;
  1830. return smalltalk.withContext(function($ctx1) { _st(_st(self)._codeWidget())._contents_(aString);
  1831. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  1832. args: ["aString"],
  1833. source: "contents: aString\x0a\x09self codeWidget contents: aString",
  1834. messageSends: ["contents:", "codeWidget"],
  1835. referencedClasses: []
  1836. }),
  1837. smalltalk.HLBrowserSourceWidget);
  1838. smalltalk.addMethod(
  1839. "_model",
  1840. smalltalk.method({
  1841. selector: "model",
  1842. category: 'accessing',
  1843. fn: function (){
  1844. var self=this;
  1845. return smalltalk.withContext(function($ctx1) { var $1;
  1846. $1=self["@model"];
  1847. return $1;
  1848. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLBrowserSourceWidget)})},
  1849. args: [],
  1850. source: "model\x0a\x09^ model",
  1851. messageSends: [],
  1852. referencedClasses: []
  1853. }),
  1854. smalltalk.HLBrowserSourceWidget);
  1855. smalltalk.addMethod(
  1856. "_model_",
  1857. smalltalk.method({
  1858. selector: "model:",
  1859. category: 'accessing',
  1860. fn: function (aBrowserModel){
  1861. var self=this;
  1862. return smalltalk.withContext(function($ctx1) { self["@model"]=aBrowserModel;
  1863. _st(self)._observeModel();
  1864. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget)})},
  1865. args: ["aBrowserModel"],
  1866. source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a \x0a self observeModel",
  1867. messageSends: ["observeModel"],
  1868. referencedClasses: []
  1869. }),
  1870. smalltalk.HLBrowserSourceWidget);
  1871. smalltalk.addMethod(
  1872. "_observeModel",
  1873. smalltalk.method({
  1874. selector: "observeModel",
  1875. category: 'actions',
  1876. fn: function (){
  1877. var self=this;
  1878. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLMethodSelected || HLMethodSelected),(function(ann){
  1879. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodSelected_(_st(ann)._item());
  1880. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1881. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  1882. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  1883. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1884. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  1885. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  1886. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1887. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLBrowserSourceWidget)})},
  1888. args: [],
  1889. 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 ]",
  1890. messageSends: ["on:do:", "onMethodSelected:", "item", "announcer", "model", "onClassSelected:", "onProtocolSelected:"],
  1891. referencedClasses: ["HLMethodSelected", "HLClassSelected", "HLProtocolSelected"]
  1892. }),
  1893. smalltalk.HLBrowserSourceWidget);
  1894. smalltalk.addMethod(
  1895. "_onClassSelected_",
  1896. smalltalk.method({
  1897. selector: "onClassSelected:",
  1898. category: 'reactions',
  1899. fn: function (aClass){
  1900. var self=this;
  1901. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1902. $1=aClass;
  1903. if(($receiver = $1) == nil || $receiver == undefined){
  1904. $2=_st(self)._contents_("");
  1905. return $2;
  1906. } else {
  1907. $1;
  1908. };
  1909. _st(self)._contents_(_st(aClass)._definition());
  1910. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLBrowserSourceWidget)})},
  1911. args: ["aClass"],
  1912. source: "onClassSelected: aClass\x0a\x09aClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: aClass definition",
  1913. messageSends: ["ifNil:", "contents:", "definition"],
  1914. referencedClasses: []
  1915. }),
  1916. smalltalk.HLBrowserSourceWidget);
  1917. smalltalk.addMethod(
  1918. "_onMethodSelected_",
  1919. smalltalk.method({
  1920. selector: "onMethodSelected:",
  1921. category: 'reactions',
  1922. fn: function (aCompiledMethod){
  1923. var self=this;
  1924. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1925. $1=aCompiledMethod;
  1926. if(($receiver = $1) == nil || $receiver == undefined){
  1927. $2=_st(self)._contents_("");
  1928. return $2;
  1929. } else {
  1930. $1;
  1931. };
  1932. _st(self)._contents_(_st(aCompiledMethod)._source());
  1933. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserSourceWidget)})},
  1934. args: ["aCompiledMethod"],
  1935. source: "onMethodSelected: aCompiledMethod\x0a\x09aCompiledMethod ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: aCompiledMethod source",
  1936. messageSends: ["ifNil:", "contents:", "source"],
  1937. referencedClasses: []
  1938. }),
  1939. smalltalk.HLBrowserSourceWidget);
  1940. smalltalk.addMethod(
  1941. "_onProtocolSelected_",
  1942. smalltalk.method({
  1943. selector: "onProtocolSelected:",
  1944. category: 'reactions',
  1945. fn: function (aString){
  1946. var self=this;
  1947. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1948. $1=_st(_st(self)._model())._selectedClass();
  1949. if(($receiver = $1) == nil || $receiver == undefined){
  1950. $2=_st(self)._contents_("");
  1951. return $2;
  1952. } else {
  1953. $1;
  1954. };
  1955. _st(self)._contents_(_st(_st(_st(self)._model())._selectedClass())._definition());
  1956. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  1957. args: ["aString"],
  1958. source: "onProtocolSelected: aString\x0a\x09self model selectedClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: self model selectedClass definition",
  1959. messageSends: ["ifNil:", "contents:", "selectedClass", "model", "definition"],
  1960. referencedClasses: []
  1961. }),
  1962. smalltalk.HLBrowserSourceWidget);
  1963. smalltalk.addMethod(
  1964. "_renderContentOn_",
  1965. smalltalk.method({
  1966. selector: "renderContentOn:",
  1967. category: 'rendering',
  1968. fn: function (html){
  1969. var self=this;
  1970. return smalltalk.withContext(function($ctx1) { _st(_st(self)._codeWidget())._renderOn_(html);
  1971. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLBrowserSourceWidget)})},
  1972. args: ["html"],
  1973. source: "renderContentOn: html\x0a\x09self codeWidget renderOn: html",
  1974. messageSends: ["renderOn:", "codeWidget"],
  1975. referencedClasses: []
  1976. }),
  1977. smalltalk.HLBrowserSourceWidget);
  1978. smalltalk.addMethod(
  1979. "_on_",
  1980. smalltalk.method({
  1981. selector: "on:",
  1982. category: 'instance creation',
  1983. fn: function (aBrowserModel){
  1984. var self=this;
  1985. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1986. $2=_st(self)._new();
  1987. _st($2)._model_(aBrowserModel);
  1988. $3=_st($2)._yourself();
  1989. $1=$3;
  1990. return $1;
  1991. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget.klass)})},
  1992. args: ["aBrowserModel"],
  1993. source: "on: aBrowserModel\x0a\x09^ self new\x0a \x09model: aBrowserModel;\x0a yourself",
  1994. messageSends: ["model:", "new", "yourself"],
  1995. referencedClasses: []
  1996. }),
  1997. smalltalk.HLBrowserSourceWidget.klass);
  1998. smalltalk.addClass('HLClassCache', smalltalk.Object, ['class', 'parentCache', 'overrideCache', 'overriddenCache'], 'Helios-Browser');
  1999. smalltalk.addMethod(
  2000. "_isOverridden_",
  2001. smalltalk.method({
  2002. selector: "isOverridden:",
  2003. category: 'testing',
  2004. fn: function (aMethod){
  2005. var self=this;
  2006. return smalltalk.withContext(function($ctx1) { var $1;
  2007. $1=_st(_st(self)._overriddenCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  2008. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverridden();
  2009. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2010. return $1;
  2011. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  2012. args: ["aMethod"],
  2013. source: "isOverridden: aMethod\x0a\x09^ self overriddenCache \x0a \x09at: aMethod selector\x0a \x09ifAbsentPut: [ aMethod isOverridden ]",
  2014. messageSends: ["at:ifAbsentPut:", "selector", "isOverridden", "overriddenCache"],
  2015. referencedClasses: []
  2016. }),
  2017. smalltalk.HLClassCache);
  2018. smalltalk.addMethod(
  2019. "_isOverride_",
  2020. smalltalk.method({
  2021. selector: "isOverride:",
  2022. category: 'testing',
  2023. fn: function (aMethod){
  2024. var self=this;
  2025. return smalltalk.withContext(function($ctx1) { var $1;
  2026. $1=_st(_st(self)._overrideCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  2027. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverride();
  2028. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2029. return $1;
  2030. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  2031. args: ["aMethod"],
  2032. source: "isOverride: aMethod\x0a\x09^ self overrideCache\x0a \x09at: aMethod selector\x0a \x09ifAbsentPut: [ aMethod isOverride ]",
  2033. messageSends: ["at:ifAbsentPut:", "selector", "isOverride", "overrideCache"],
  2034. referencedClasses: []
  2035. }),
  2036. smalltalk.HLClassCache);
  2037. smalltalk.addMethod(
  2038. "_overriddenCache",
  2039. smalltalk.method({
  2040. selector: "overriddenCache",
  2041. category: 'accessing',
  2042. fn: function (){
  2043. var self=this;
  2044. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2045. $2=self["@overriddenCache"];
  2046. if(($receiver = $2) == nil || $receiver == undefined){
  2047. self["@overriddenCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2048. $1=self["@overriddenCache"];
  2049. } else {
  2050. $1=$2;
  2051. };
  2052. return $1;
  2053. }, function($ctx1) {$ctx1.fill(self,"overriddenCache",{}, smalltalk.HLClassCache)})},
  2054. args: [],
  2055. source: "overriddenCache\x0a\x09^ overriddenCache ifNil: [ overriddenCache := HashedCollection new ]",
  2056. messageSends: ["ifNil:", "new"],
  2057. referencedClasses: ["HashedCollection"]
  2058. }),
  2059. smalltalk.HLClassCache);
  2060. smalltalk.addMethod(
  2061. "_overrideCache",
  2062. smalltalk.method({
  2063. selector: "overrideCache",
  2064. category: 'accessing',
  2065. fn: function (){
  2066. var self=this;
  2067. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2068. $2=self["@overrideCache"];
  2069. if(($receiver = $2) == nil || $receiver == undefined){
  2070. self["@overrideCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2071. $1=self["@overrideCache"];
  2072. } else {
  2073. $1=$2;
  2074. };
  2075. return $1;
  2076. }, function($ctx1) {$ctx1.fill(self,"overrideCache",{}, smalltalk.HLClassCache)})},
  2077. args: [],
  2078. source: "overrideCache\x0a\x09^ overrideCache ifNil: [ overrideCache := HashedCollection new ]",
  2079. messageSends: ["ifNil:", "new"],
  2080. referencedClasses: ["HashedCollection"]
  2081. }),
  2082. smalltalk.HLClassCache);
  2083. smalltalk.addMethod(
  2084. "_parentCache",
  2085. smalltalk.method({
  2086. selector: "parentCache",
  2087. category: 'accessing',
  2088. fn: function (){
  2089. var self=this;
  2090. return smalltalk.withContext(function($ctx1) { var $1;
  2091. $1=self["@parentCache"];
  2092. return $1;
  2093. }, function($ctx1) {$ctx1.fill(self,"parentCache",{}, smalltalk.HLClassCache)})},
  2094. args: [],
  2095. source: "parentCache\x0a\x09^ parentCache",
  2096. messageSends: [],
  2097. referencedClasses: []
  2098. }),
  2099. smalltalk.HLClassCache);
  2100. smalltalk.addMethod(
  2101. "_parentCache_",
  2102. smalltalk.method({
  2103. selector: "parentCache:",
  2104. category: 'accessing',
  2105. fn: function (aCache){
  2106. var self=this;
  2107. return smalltalk.withContext(function($ctx1) { self["@parentCache"]=aCache;
  2108. return self}, function($ctx1) {$ctx1.fill(self,"parentCache:",{aCache:aCache}, smalltalk.HLClassCache)})},
  2109. args: ["aCache"],
  2110. source: "parentCache: aCache\x0a\x09parentCache := aCache",
  2111. messageSends: [],
  2112. referencedClasses: []
  2113. }),
  2114. smalltalk.HLClassCache);
  2115. smalltalk.addMethod(
  2116. "_theClass",
  2117. smalltalk.method({
  2118. selector: "theClass",
  2119. category: 'accessing',
  2120. fn: function (){
  2121. var self=this;
  2122. return smalltalk.withContext(function($ctx1) { var $1;
  2123. $1=self["@class"];
  2124. return $1;
  2125. }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.HLClassCache)})},
  2126. args: [],
  2127. source: "theClass\x0a\x09^ class",
  2128. messageSends: [],
  2129. referencedClasses: []
  2130. }),
  2131. smalltalk.HLClassCache);
  2132. smalltalk.addMethod(
  2133. "_theClass_",
  2134. smalltalk.method({
  2135. selector: "theClass:",
  2136. category: 'accessing',
  2137. fn: function (aClass){
  2138. var self=this;
  2139. return smalltalk.withContext(function($ctx1) { self["@class"]=aClass;
  2140. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.HLClassCache)})},
  2141. args: ["aClass"],
  2142. source: "theClass: aClass\x0a\x09class := aClass",
  2143. messageSends: [],
  2144. referencedClasses: []
  2145. }),
  2146. smalltalk.HLClassCache);
  2147. smalltalk.addMethod(
  2148. "_on_parentCache_",
  2149. smalltalk.method({
  2150. selector: "on:parentCache:",
  2151. category: 'instance creation',
  2152. fn: function (aClass,aCache){
  2153. var self=this;
  2154. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2155. $2=_st(self)._new();
  2156. _st($2)._theClass_(aClass);
  2157. _st($2)._parentCache_(aCache);
  2158. $3=_st($2)._yourself();
  2159. $1=$3;
  2160. return $1;
  2161. }, function($ctx1) {$ctx1.fill(self,"on:parentCache:",{aClass:aClass,aCache:aCache}, smalltalk.HLClassCache.klass)})},
  2162. args: ["aClass", "aCache"],
  2163. source: "on: aClass parentCache: aCache\x0a\x09^ self new\x0a \x09theClass: aClass;\x0a parentCache: aCache;\x0a yourself",
  2164. messageSends: ["theClass:", "new", "parentCache:", "yourself"],
  2165. referencedClasses: []
  2166. }),
  2167. smalltalk.HLClassCache.klass);
  2168. smalltalk.addClass('HLSelectorsCache', smalltalk.Object, ['classesCache'], 'Helios-Browser');
  2169. smalltalk.addMethod(
  2170. "_cacheFor_",
  2171. smalltalk.method({
  2172. selector: "cacheFor:",
  2173. category: 'accessing',
  2174. fn: function (aClass){
  2175. var self=this;
  2176. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2177. $1=aClass;
  2178. if(($receiver = $1) == nil || $receiver == undefined){
  2179. return nil;
  2180. } else {
  2181. $1;
  2182. };
  2183. $2=_st(_st(self)._classesCache())._at_ifAbsentPut_(_st(aClass)._name(),(function(){
  2184. return smalltalk.withContext(function($ctx2) { return _st(self)._newCacheFor_(aClass);
  2185. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2186. return $2;
  2187. }, function($ctx1) {$ctx1.fill(self,"cacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2188. args: ["aClass"],
  2189. source: "cacheFor: aClass\x0a\x09aClass ifNil: [ ^ nil ].\x0a \x0a\x09^ self classesCache\x0a \x09at: aClass name\x0a ifAbsentPut: [ self newCacheFor: aClass ]",
  2190. messageSends: ["ifNil:", "at:ifAbsentPut:", "name", "newCacheFor:", "classesCache"],
  2191. referencedClasses: []
  2192. }),
  2193. smalltalk.HLSelectorsCache);
  2194. smalltalk.addMethod(
  2195. "_classesCache",
  2196. smalltalk.method({
  2197. selector: "classesCache",
  2198. category: 'accessing',
  2199. fn: function (){
  2200. var self=this;
  2201. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2202. $2=self["@classesCache"];
  2203. if(($receiver = $2) == nil || $receiver == undefined){
  2204. self["@classesCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2205. $1=self["@classesCache"];
  2206. } else {
  2207. $1=$2;
  2208. };
  2209. return $1;
  2210. }, function($ctx1) {$ctx1.fill(self,"classesCache",{}, smalltalk.HLSelectorsCache)})},
  2211. args: [],
  2212. source: "classesCache\x0a\x09^ classesCache ifNil: [ classesCache := HashedCollection new ]",
  2213. messageSends: ["ifNil:", "new"],
  2214. referencedClasses: ["HashedCollection"]
  2215. }),
  2216. smalltalk.HLSelectorsCache);
  2217. smalltalk.addMethod(
  2218. "_isOverridden_",
  2219. smalltalk.method({
  2220. selector: "isOverridden:",
  2221. category: 'testing',
  2222. fn: function (aMethod){
  2223. var self=this;
  2224. return smalltalk.withContext(function($ctx1) { var $1;
  2225. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverridden_(aMethod);
  2226. return $1;
  2227. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2228. args: ["aMethod"],
  2229. source: "isOverridden: aMethod\x0a\x09^ (self cacheFor: aMethod methodClass)\x0a \x09isOverridden: aMethod",
  2230. messageSends: ["isOverridden:", "cacheFor:", "methodClass"],
  2231. referencedClasses: []
  2232. }),
  2233. smalltalk.HLSelectorsCache);
  2234. smalltalk.addMethod(
  2235. "_isOverride_",
  2236. smalltalk.method({
  2237. selector: "isOverride:",
  2238. category: 'testing',
  2239. fn: function (aMethod){
  2240. var self=this;
  2241. return smalltalk.withContext(function($ctx1) { var $1;
  2242. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverride_(aMethod);
  2243. return $1;
  2244. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2245. args: ["aMethod"],
  2246. source: "isOverride: aMethod\x0a\x09^ (self cacheFor: aMethod methodClass)\x0a \x09isOverride: aMethod",
  2247. messageSends: ["isOverride:", "cacheFor:", "methodClass"],
  2248. referencedClasses: []
  2249. }),
  2250. smalltalk.HLSelectorsCache);
  2251. smalltalk.addMethod(
  2252. "_newCacheFor_",
  2253. smalltalk.method({
  2254. selector: "newCacheFor:",
  2255. category: 'factory',
  2256. fn: function (aClass){
  2257. var self=this;
  2258. return smalltalk.withContext(function($ctx1) { var $1;
  2259. $1=_st((smalltalk.HLClassCache || HLClassCache))._on_parentCache_(aClass,_st(self)._cacheFor_(_st(aClass)._superclass()));
  2260. return $1;
  2261. }, function($ctx1) {$ctx1.fill(self,"newCacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2262. args: ["aClass"],
  2263. source: "newCacheFor: aClass\x0a\x09^ HLClassCache \x0a \x09on: aClass\x0a parentCache: (self cacheFor: aClass superclass)",
  2264. messageSends: ["on:parentCache:", "cacheFor:", "superclass"],
  2265. referencedClasses: ["HLClassCache"]
  2266. }),
  2267. smalltalk.HLSelectorsCache);
  2268. smalltalk.HLSelectorsCache.klass.iVarNames = ['current'];
  2269. smalltalk.addMethod(
  2270. "_current",
  2271. smalltalk.method({
  2272. selector: "current",
  2273. category: 'accessing',
  2274. fn: function (){
  2275. var self=this;
  2276. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2277. $2=self["@current"];
  2278. if(($receiver = $2) == nil || $receiver == undefined){
  2279. self["@current"]=smalltalk.Object.klass.fn.prototype._new.apply(_st(self), []);
  2280. $1=self["@current"];
  2281. } else {
  2282. $1=$2;
  2283. };
  2284. return $1;
  2285. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.HLSelectorsCache.klass)})},
  2286. args: [],
  2287. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  2288. messageSends: ["ifNil:", "new"],
  2289. referencedClasses: []
  2290. }),
  2291. smalltalk.HLSelectorsCache.klass);
  2292. smalltalk.addMethod(
  2293. "_flush",
  2294. smalltalk.method({
  2295. selector: "flush",
  2296. category: 'accessing',
  2297. fn: function (){
  2298. var self=this;
  2299. return smalltalk.withContext(function($ctx1) { self["@current"]=nil;
  2300. return self}, function($ctx1) {$ctx1.fill(self,"flush",{}, smalltalk.HLSelectorsCache.klass)})},
  2301. args: [],
  2302. source: "flush\x0a\x09current := nil",
  2303. messageSends: [],
  2304. referencedClasses: []
  2305. }),
  2306. smalltalk.HLSelectorsCache.klass);
  2307. smalltalk.addMethod(
  2308. "_new",
  2309. smalltalk.method({
  2310. selector: "new",
  2311. category: 'instance creation',
  2312. fn: function (){
  2313. var self=this;
  2314. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  2315. return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.HLSelectorsCache.klass)})},
  2316. args: [],
  2317. source: "new\x0a\x09self shouldNotImplement",
  2318. messageSends: ["shouldNotImplement"],
  2319. referencedClasses: []
  2320. }),
  2321. smalltalk.HLSelectorsCache.klass);
  2322. smalltalk.addMethod(
  2323. "_isOverridden",
  2324. smalltalk.method({
  2325. selector: "isOverridden",
  2326. category: '*Helios-Browser',
  2327. fn: function (){
  2328. var self=this;
  2329. var selector;
  2330. return smalltalk.withContext(function($ctx1) { var $1;
  2331. var $early={};
  2332. try {
  2333. selector=_st(self)._selector();
  2334. _st(_st(self)._methodClass())._allSubclassesDo_((function(each){
  2335. return smalltalk.withContext(function($ctx2) { $1=_st(each)._includesSelector_(selector);
  2336. if(smalltalk.assert($1)){
  2337. throw $early=[true];
  2338. };
  2339. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2340. return false;
  2341. }
  2342. catch(e) {if(e===$early)return e[0]; throw e}
  2343. }, function($ctx1) {$ctx1.fill(self,"isOverridden",{selector:selector}, smalltalk.CompiledMethod)})},
  2344. args: [],
  2345. 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",
  2346. messageSends: ["selector", "allSubclassesDo:", "ifTrue:", "includesSelector:", "methodClass"],
  2347. referencedClasses: []
  2348. }),
  2349. smalltalk.CompiledMethod);
  2350. smalltalk.addMethod(
  2351. "_isOverride",
  2352. smalltalk.method({
  2353. selector: "isOverride",
  2354. category: '*Helios-Browser',
  2355. fn: function (){
  2356. var self=this;
  2357. var superclass;
  2358. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2359. superclass=_st(_st(self)._methodClass())._superclass();
  2360. $1=superclass;
  2361. if(($receiver = $1) == nil || $receiver == undefined){
  2362. return false;
  2363. } else {
  2364. $1;
  2365. };
  2366. $2=_st(_st(_st(_st(self)._methodClass())._superclass())._lookupSelector_(_st(self)._selector()))._isNil();
  2367. return $2;
  2368. }, function($ctx1) {$ctx1.fill(self,"isOverride",{superclass:superclass}, smalltalk.CompiledMethod)})},
  2369. args: [],
  2370. 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",
  2371. messageSends: ["superclass", "methodClass", "ifNil:", "isNil", "lookupSelector:", "selector"],
  2372. referencedClasses: []
  2373. }),
  2374. smalltalk.CompiledMethod);