Helios-References.js 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977
  1. smalltalk.addPackage('Helios-References');
  2. smalltalk.addClass('HLReferences', smalltalk.HLWidget, ['model', 'sendersListWidget', 'implementorsListWidget', 'classReferencesListWidget', 'regexpListWidget', 'sourceCodeWidget'], 'Helios-References');
  3. smalltalk.addMethod(
  4. smalltalk.method({
  5. selector: "classReferencesListWidget",
  6. category: 'accessing',
  7. fn: function (){
  8. var self=this;
  9. function $HLClassReferencesListWidget(){return smalltalk.HLClassReferencesListWidget||(typeof HLClassReferencesListWidget=="undefined"?nil:HLClassReferencesListWidget)}
  10. return smalltalk.withContext(function($ctx1) {
  11. var $2,$1;
  12. $2=self["@classReferencesListWidget"];
  13. if(($receiver = $2) == nil || $receiver == undefined){
  14. self["@classReferencesListWidget"]=_st($HLClassReferencesListWidget())._on_(_st(self)._model());
  15. self["@classReferencesListWidget"];
  16. $1=_st(self["@classReferencesListWidget"])._next_(_st(self)._regexpListWidget());
  17. } else {
  18. $1=$2;
  19. };
  20. return $1;
  21. }, function($ctx1) {$ctx1.fill(self,"classReferencesListWidget",{},smalltalk.HLReferences)})},
  22. args: [],
  23. source: "classReferencesListWidget\x0a\x09^ classReferencesListWidget ifNil: [\x0a \x09classReferencesListWidget := HLClassReferencesListWidget on: self model.\x0a\x09\x09classReferencesListWidget next: self regexpListWidget ]",
  24. messageSends: ["ifNil:", "on:", "model", "next:", "regexpListWidget"],
  25. referencedClasses: ["HLClassReferencesListWidget"]
  26. }),
  27. smalltalk.HLReferences);
  28. smalltalk.addMethod(
  29. smalltalk.method({
  30. selector: "implementorsListWidget",
  31. category: 'accessing',
  32. fn: function (){
  33. var self=this;
  34. function $HLImplementorsListWidget(){return smalltalk.HLImplementorsListWidget||(typeof HLImplementorsListWidget=="undefined"?nil:HLImplementorsListWidget)}
  35. return smalltalk.withContext(function($ctx1) {
  36. var $2,$1;
  37. $2=self["@implementorsListWidget"];
  38. if(($receiver = $2) == nil || $receiver == undefined){
  39. self["@implementorsListWidget"]=_st($HLImplementorsListWidget())._on_(_st(self)._model());
  40. self["@implementorsListWidget"];
  41. $1=_st(self["@implementorsListWidget"])._next_(_st(self)._classReferencesListWidget());
  42. } else {
  43. $1=$2;
  44. };
  45. return $1;
  46. }, function($ctx1) {$ctx1.fill(self,"implementorsListWidget",{},smalltalk.HLReferences)})},
  47. args: [],
  48. source: "implementorsListWidget\x0a\x09^ implementorsListWidget ifNil: [\x0a \x09implementorsListWidget := HLImplementorsListWidget on: self model.\x0a\x09\x09implementorsListWidget next: self classReferencesListWidget ]",
  49. messageSends: ["ifNil:", "on:", "model", "next:", "classReferencesListWidget"],
  50. referencedClasses: ["HLImplementorsListWidget"]
  51. }),
  52. smalltalk.HLReferences);
  53. smalltalk.addMethod(
  54. smalltalk.method({
  55. selector: "model",
  56. category: 'accessing',
  57. fn: function (){
  58. var self=this;
  59. function $HLReferencesModel(){return smalltalk.HLReferencesModel||(typeof HLReferencesModel=="undefined"?nil:HLReferencesModel)}
  60. return smalltalk.withContext(function($ctx1) {
  61. var $2,$3,$4,$1;
  62. $2=self["@model"];
  63. if(($receiver = $2) == nil || $receiver == undefined){
  64. $3=_st($HLReferencesModel())._new();
  65. _st($3)._environment_(_st(_st(self)._manager())._environment());
  66. $4=_st($3)._yourself();
  67. self["@model"]=$4;
  68. $1=self["@model"];
  69. } else {
  70. $1=$2;
  71. };
  72. return $1;
  73. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLReferences)})},
  74. args: [],
  75. source: "model\x0a\x09^ model ifNil: [\x0a\x09\x09model := (HLReferencesModel new\x0a\x09\x09\x09environment: self manager environment;\x0a\x09\x09\x09yourself) ]",
  76. messageSends: ["ifNil:", "environment:", "environment", "manager", "new", "yourself"],
  77. referencedClasses: ["HLReferencesModel"]
  78. }),
  79. smalltalk.HLReferences);
  80. smalltalk.addMethod(
  81. smalltalk.method({
  82. selector: "model:",
  83. category: 'accessing',
  84. fn: function (aModel){
  85. var self=this;
  86. return smalltalk.withContext(function($ctx1) {
  87. self["@model"]=aModel;
  88. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLReferences)})},
  89. args: ["aModel"],
  90. source: "model: aModel\x0a\x09model := aModel",
  91. messageSends: [],
  92. referencedClasses: []
  93. }),
  94. smalltalk.HLReferences);
  95. smalltalk.addMethod(
  96. smalltalk.method({
  97. selector: "open",
  98. category: 'actions',
  99. fn: function (){
  100. var self=this;
  101. function $HLTab(){return smalltalk.HLTab||(typeof HLTab=="undefined"?nil:HLTab)}
  102. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  103. return smalltalk.withContext(function($ctx1) {
  104. _st(_st($HLManager())._current())._addTab_(_st($HLTab())._on_labelled_(self,_st(_st(self)._class())._tabLabel()));
  105. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.HLReferences)})},
  106. args: [],
  107. source: "open\x0a\x09HLManager current addTab: (HLTab on: self labelled: self class tabLabel)",
  108. messageSends: ["addTab:", "on:labelled:", "tabLabel", "class", "current"],
  109. referencedClasses: ["HLTab", "HLManager"]
  110. }),
  111. smalltalk.HLReferences);
  112. smalltalk.addMethod(
  113. smalltalk.method({
  114. selector: "regexpListWidget",
  115. category: 'accessing',
  116. fn: function (){
  117. var self=this;
  118. function $HLRegexpListWidget(){return smalltalk.HLRegexpListWidget||(typeof HLRegexpListWidget=="undefined"?nil:HLRegexpListWidget)}
  119. return smalltalk.withContext(function($ctx1) {
  120. var $2,$1;
  121. $2=self["@regexpListWidget"];
  122. if(($receiver = $2) == nil || $receiver == undefined){
  123. self["@regexpListWidget"]=_st($HLRegexpListWidget())._on_(_st(self)._model());
  124. self["@regexpListWidget"];
  125. $1=_st(self["@regexpListWidget"])._next_(_st(self)._sourceCodeWidget());
  126. } else {
  127. $1=$2;
  128. };
  129. return $1;
  130. }, function($ctx1) {$ctx1.fill(self,"regexpListWidget",{},smalltalk.HLReferences)})},
  131. args: [],
  132. source: "regexpListWidget\x0a\x09^ regexpListWidget ifNil: [\x0a \x09regexpListWidget := HLRegexpListWidget on: self model.\x0a\x09\x09regexpListWidget next: self sourceCodeWidget ]",
  133. messageSends: ["ifNil:", "on:", "model", "next:", "sourceCodeWidget"],
  134. referencedClasses: ["HLRegexpListWidget"]
  135. }),
  136. smalltalk.HLReferences);
  137. smalltalk.addMethod(
  138. smalltalk.method({
  139. selector: "renderContentOn:",
  140. category: 'rendering',
  141. fn: function (html){
  142. var self=this;
  143. function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  144. function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  145. function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  146. return smalltalk.withContext(function($ctx1) {
  147. _st(html)._with_(_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(_st(self)._sendersListWidget(),_st(self)._implementorsListWidget()),_st($HLVerticalSplitter())._with_with_(_st(self)._classReferencesListWidget(),_st(self)._regexpListWidget())),_st(self)._sourceCodeWidget())));
  148. _st(_st(self)._sendersListWidget())._focus();
  149. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLReferences)})},
  150. args: ["html"],
  151. source: "renderContentOn: html\x0a\x09html with: (HLContainer with: (HLHorizontalSplitter \x0a \x09with: (HLVerticalSplitter\x0a \x09with: (HLVerticalSplitter\x0a \x09with: self sendersListWidget\x0a with: self implementorsListWidget)\x0a with: (HLVerticalSplitter\x0a \x09with: self classReferencesListWidget\x0a with: self regexpListWidget)) \x0a with: self sourceCodeWidget)).\x0a\x09\x0a\x09self sendersListWidget focus",
  152. messageSends: ["with:", "with:with:", "sendersListWidget", "implementorsListWidget", "classReferencesListWidget", "regexpListWidget", "sourceCodeWidget", "focus"],
  153. referencedClasses: ["HLVerticalSplitter", "HLHorizontalSplitter", "HLContainer"]
  154. }),
  155. smalltalk.HLReferences);
  156. smalltalk.addMethod(
  157. smalltalk.method({
  158. selector: "search:",
  159. category: 'actions',
  160. fn: function (aString){
  161. var self=this;
  162. return smalltalk.withContext(function($ctx1) {
  163. _st(_st(self)._model())._search_(aString);
  164. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.HLReferences)})},
  165. args: ["aString"],
  166. source: "search: aString\x0a\x09self model search: aString",
  167. messageSends: ["search:", "model"],
  168. referencedClasses: []
  169. }),
  170. smalltalk.HLReferences);
  171. smalltalk.addMethod(
  172. smalltalk.method({
  173. selector: "sendersListWidget",
  174. category: 'accessing',
  175. fn: function (){
  176. var self=this;
  177. function $HLSendersListWidget(){return smalltalk.HLSendersListWidget||(typeof HLSendersListWidget=="undefined"?nil:HLSendersListWidget)}
  178. return smalltalk.withContext(function($ctx1) {
  179. var $2,$1;
  180. $2=self["@sendersListWidget"];
  181. if(($receiver = $2) == nil || $receiver == undefined){
  182. self["@sendersListWidget"]=_st($HLSendersListWidget())._on_(_st(self)._model());
  183. self["@sendersListWidget"];
  184. $1=_st(self["@sendersListWidget"])._next_(_st(self)._implementorsListWidget());
  185. } else {
  186. $1=$2;
  187. };
  188. return $1;
  189. }, function($ctx1) {$ctx1.fill(self,"sendersListWidget",{},smalltalk.HLReferences)})},
  190. args: [],
  191. source: "sendersListWidget\x0a\x09^ sendersListWidget ifNil: [\x0a \x09sendersListWidget := HLSendersListWidget on: self model.\x0a\x09\x09sendersListWidget next: self implementorsListWidget ]",
  192. messageSends: ["ifNil:", "on:", "model", "next:", "implementorsListWidget"],
  193. referencedClasses: ["HLSendersListWidget"]
  194. }),
  195. smalltalk.HLReferences);
  196. smalltalk.addMethod(
  197. smalltalk.method({
  198. selector: "sourceCodeWidget",
  199. category: 'accessing',
  200. fn: function (){
  201. var self=this;
  202. function $HLBrowserCodeWidget(){return smalltalk.HLBrowserCodeWidget||(typeof HLBrowserCodeWidget=="undefined"?nil:HLBrowserCodeWidget)}
  203. return smalltalk.withContext(function($ctx1) {
  204. var $2,$3,$4,$1;
  205. $2=self["@sourceCodeWidget"];
  206. if(($receiver = $2) == nil || $receiver == undefined){
  207. $3=_st($HLBrowserCodeWidget())._new();
  208. _st($3)._browserModel_(_st(self)._model());
  209. $4=_st($3)._yourself();
  210. self["@sourceCodeWidget"]=$4;
  211. $1=self["@sourceCodeWidget"];
  212. } else {
  213. $1=$2;
  214. };
  215. return $1;
  216. }, function($ctx1) {$ctx1.fill(self,"sourceCodeWidget",{},smalltalk.HLReferences)})},
  217. args: [],
  218. source: "sourceCodeWidget\x0a\x09^ sourceCodeWidget ifNil: [\x0a \x09sourceCodeWidget := HLBrowserCodeWidget new\x0a\x09\x09\x09browserModel: self model;\x0a\x09\x09\x09yourself ]",
  219. messageSends: ["ifNil:", "browserModel:", "model", "new", "yourself"],
  220. referencedClasses: ["HLBrowserCodeWidget"]
  221. }),
  222. smalltalk.HLReferences);
  223. smalltalk.addMethod(
  224. smalltalk.method({
  225. selector: "canBeOpenAsTab",
  226. category: 'testing',
  227. fn: function (){
  228. var self=this;
  229. return smalltalk.withContext(function($ctx1) {
  230. return false;
  231. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLReferences.klass)})},
  232. args: [],
  233. source: "canBeOpenAsTab\x0a\x09^ false",
  234. messageSends: [],
  235. referencedClasses: []
  236. }),
  237. smalltalk.HLReferences.klass);
  238. smalltalk.addMethod(
  239. smalltalk.method({
  240. selector: "tabLabel",
  241. category: 'accessing',
  242. fn: function (){
  243. var self=this;
  244. return smalltalk.withContext(function($ctx1) {
  245. return "References";
  246. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLReferences.klass)})},
  247. args: [],
  248. source: "tabLabel\x0a\x09^ 'References'",
  249. messageSends: [],
  250. referencedClasses: []
  251. }),
  252. smalltalk.HLReferences.klass);
  253. smalltalk.addMethod(
  254. smalltalk.method({
  255. selector: "tabPriority",
  256. category: 'accessing',
  257. fn: function (){
  258. var self=this;
  259. return smalltalk.withContext(function($ctx1) {
  260. var $1;
  261. $1=(100);
  262. return $1;
  263. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLReferences.klass)})},
  264. args: [],
  265. source: "tabPriority\x0a\x09^ 100",
  266. messageSends: [],
  267. referencedClasses: []
  268. }),
  269. smalltalk.HLReferences.klass);
  270. smalltalk.addClass('HLReferencesListWidget', smalltalk.HLBrowserListWidget, ['model'], 'Helios-References');
  271. smalltalk.addMethod(
  272. smalltalk.method({
  273. selector: "activateListItem:",
  274. category: 'actions',
  275. fn: function (anItem){
  276. var self=this;
  277. return smalltalk.withContext(function($ctx1) {
  278. _st(_st(self)._model())._withChangesDo_((function(){
  279. return smalltalk.withContext(function($ctx2) {
  280. return smalltalk.HLBrowserListWidget.fn.prototype._activateListItem_.apply(_st(self), [anItem]);
  281. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  282. return self}, function($ctx1) {$ctx1.fill(self,"activateListItem:",{anItem:anItem},smalltalk.HLReferencesListWidget)})},
  283. args: ["anItem"],
  284. source: "activateListItem: anItem\x0a\x09self model withChangesDo: [ super activateListItem: anItem ]",
  285. messageSends: ["withChangesDo:", "activateListItem:", "model"],
  286. referencedClasses: []
  287. }),
  288. smalltalk.HLReferencesListWidget);
  289. smalltalk.addMethod(
  290. smalltalk.method({
  291. selector: "commandCategory",
  292. category: 'accessing',
  293. fn: function (){
  294. var self=this;
  295. return smalltalk.withContext(function($ctx1) {
  296. return "Methods";
  297. }, function($ctx1) {$ctx1.fill(self,"commandCategory",{},smalltalk.HLReferencesListWidget)})},
  298. args: [],
  299. source: "commandCategory\x0a\x09^ 'Methods'",
  300. messageSends: [],
  301. referencedClasses: []
  302. }),
  303. smalltalk.HLReferencesListWidget);
  304. smalltalk.addMethod(
  305. smalltalk.method({
  306. selector: "label",
  307. category: 'accessing',
  308. fn: function (){
  309. var self=this;
  310. return smalltalk.withContext(function($ctx1) {
  311. return "List";
  312. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLReferencesListWidget)})},
  313. args: [],
  314. source: "label\x0a\x09^ 'List'",
  315. messageSends: [],
  316. referencedClasses: []
  317. }),
  318. smalltalk.HLReferencesListWidget);
  319. smalltalk.addMethod(
  320. smalltalk.method({
  321. selector: "observeModel",
  322. category: 'actions',
  323. fn: function (){
  324. var self=this;
  325. function $HLSearchReferences(){return smalltalk.HLSearchReferences||(typeof HLSearchReferences=="undefined"?nil:HLSearchReferences)}
  326. function $HLMethodSelected(){return smalltalk.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  327. return smalltalk.withContext(function($ctx1) {
  328. var $1,$2;
  329. $1=_st(_st(self)._model())._announcer();
  330. _st($1)._on_do_($HLSearchReferences(),(function(ann){
  331. return smalltalk.withContext(function($ctx2) {
  332. return _st(self)._onSearchReferences_(_st(ann)._searchString());
  333. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  334. $2=_st($1)._on_do_($HLMethodSelected(),(function(ann){
  335. return smalltalk.withContext(function($ctx2) {
  336. return _st(self)._onMethodSelected_(_st(ann)._item());
  337. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  338. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLReferencesListWidget)})},
  339. args: [],
  340. source: "observeModel\x0a\x09self model announcer\x0a\x09\x09on: HLSearchReferences\x0a\x09\x09do: [ :ann | self onSearchReferences: ann searchString ];\x0a\x09\x09on: HLMethodSelected\x0a\x09\x09do: [ :ann | self onMethodSelected: ann item ]",
  341. messageSends: ["on:do:", "onSearchReferences:", "searchString", "announcer", "model", "onMethodSelected:", "item"],
  342. referencedClasses: ["HLSearchReferences", "HLMethodSelected"]
  343. }),
  344. smalltalk.HLReferencesListWidget);
  345. smalltalk.addMethod(
  346. smalltalk.method({
  347. selector: "onMethodSelected:",
  348. category: 'reactions',
  349. fn: function (aMethod){
  350. var self=this;
  351. return smalltalk.withContext(function($ctx1) {
  352. var $1,$2,$3,$4,$5;
  353. var $early={};
  354. try {
  355. $1=aMethod;
  356. if(($receiver = $1) == nil || $receiver == undefined){
  357. $2=self;
  358. return $2;
  359. } else {
  360. $1;
  361. };
  362. _st(_st(self)._items())._detect_ifNone_((function(each){
  363. return smalltalk.withContext(function($ctx2) {
  364. return _st(each).__eq(_st(aMethod)._selector());
  365. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  366. return smalltalk.withContext(function($ctx2) {
  367. $3=self;
  368. throw $early=[$3];
  369. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  370. $4=self;
  371. _st($4)._selectedItem_(_st(aMethod)._selector());
  372. $5=_st($4)._activateItem_(_st(aMethod)._selector());
  373. return self}
  374. catch(e) {if(e===$early)return e[0]; throw e}
  375. }, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aMethod:aMethod},smalltalk.HLReferencesListWidget)})},
  376. args: ["aMethod"],
  377. source: "onMethodSelected: aMethod\x0a\x09aMethod ifNil: [ ^ self ].\x0a\x09self items detect: [ :each | each = aMethod selector ] ifNone: [ ^ self ].\x0a\x09\x0a\x09self \x0a\x09\x09selectedItem: aMethod selector;\x0a\x09\x09activateItem: aMethod selector\x09",
  378. messageSends: ["ifNil:", "detect:ifNone:", "=", "selector", "items", "selectedItem:", "activateItem:"],
  379. referencedClasses: []
  380. }),
  381. smalltalk.HLReferencesListWidget);
  382. smalltalk.addMethod(
  383. smalltalk.method({
  384. selector: "onSearchReferences:",
  385. category: 'reactions',
  386. fn: function (aString){
  387. var self=this;
  388. return smalltalk.withContext(function($ctx1) {
  389. _st(self)._subclassResponsibility();
  390. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLReferencesListWidget)})},
  391. args: ["aString"],
  392. source: "onSearchReferences: aString\x0a\x09self subclassResponsibility",
  393. messageSends: ["subclassResponsibility"],
  394. referencedClasses: []
  395. }),
  396. smalltalk.HLReferencesListWidget);
  397. smalltalk.addMethod(
  398. smalltalk.method({
  399. selector: "renderItemLabel:on:",
  400. category: 'rendering',
  401. fn: function (aMethod,html){
  402. var self=this;
  403. return smalltalk.withContext(function($ctx1) {
  404. _st(html)._with_(_st(_st(_st(_st(aMethod)._methodClass())._name()).__comma(" >> #")).__comma(_st(aMethod)._selector()));
  405. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aMethod:aMethod,html:html},smalltalk.HLReferencesListWidget)})},
  406. args: ["aMethod", "html"],
  407. source: "renderItemLabel: aMethod on: html\x0a\x09html with: aMethod methodClass name, ' >> #', aMethod selector",
  408. messageSends: ["with:", ",", "selector", "name", "methodClass"],
  409. referencedClasses: []
  410. }),
  411. smalltalk.HLReferencesListWidget);
  412. smalltalk.addMethod(
  413. smalltalk.method({
  414. selector: "selectItem:",
  415. category: 'actions',
  416. fn: function (aMethod){
  417. var self=this;
  418. return smalltalk.withContext(function($ctx1) {
  419. _st(_st(self)._model())._selectedMethod_(aMethod);
  420. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aMethod:aMethod},smalltalk.HLReferencesListWidget)})},
  421. args: ["aMethod"],
  422. source: "selectItem: aMethod\x0a\x09self model selectedMethod: aMethod",
  423. messageSends: ["selectedMethod:", "model"],
  424. referencedClasses: []
  425. }),
  426. smalltalk.HLReferencesListWidget);
  427. smalltalk.addMethod(
  428. smalltalk.method({
  429. selector: "on:",
  430. category: 'instance creation',
  431. fn: function (aModel){
  432. var self=this;
  433. return smalltalk.withContext(function($ctx1) {
  434. var $2,$3,$1;
  435. $2=_st(self)._new();
  436. _st($2)._model_(aModel);
  437. $3=_st($2)._yourself();
  438. $1=$3;
  439. return $1;
  440. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel},smalltalk.HLReferencesListWidget.klass)})},
  441. args: ["aModel"],
  442. source: "on: aModel\x0a\x09^ self new \x0a\x09\x09model: aModel; \x0a\x09\x09yourself",
  443. messageSends: ["model:", "new", "yourself"],
  444. referencedClasses: []
  445. }),
  446. smalltalk.HLReferencesListWidget.klass);
  447. smalltalk.addClass('HLClassReferencesListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  448. smalltalk.addMethod(
  449. smalltalk.method({
  450. selector: "label",
  451. category: 'accessing',
  452. fn: function (){
  453. var self=this;
  454. return smalltalk.withContext(function($ctx1) {
  455. return "Class references";
  456. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLClassReferencesListWidget)})},
  457. args: [],
  458. source: "label\x0a\x09^ 'Class references'",
  459. messageSends: [],
  460. referencedClasses: []
  461. }),
  462. smalltalk.HLClassReferencesListWidget);
  463. smalltalk.addMethod(
  464. smalltalk.method({
  465. selector: "onSearchReferences:",
  466. category: 'reactions',
  467. fn: function (aString){
  468. var self=this;
  469. return smalltalk.withContext(function($ctx1) {
  470. _st(self)._selectItem_(nil);
  471. _st(self)._items_(_st(_st(self)._model())._classReferencesOf_(aString));
  472. _st(self)._refresh();
  473. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLClassReferencesListWidget)})},
  474. args: ["aString"],
  475. source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model classReferencesOf: aString).\x0a\x09self refresh",
  476. messageSends: ["selectItem:", "items:", "classReferencesOf:", "model", "refresh"],
  477. referencedClasses: []
  478. }),
  479. smalltalk.HLClassReferencesListWidget);
  480. smalltalk.addClass('HLImplementorsListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  481. smalltalk.addMethod(
  482. smalltalk.method({
  483. selector: "label",
  484. category: 'accessing',
  485. fn: function (){
  486. var self=this;
  487. return smalltalk.withContext(function($ctx1) {
  488. return "Implementors";
  489. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLImplementorsListWidget)})},
  490. args: [],
  491. source: "label\x0a\x09^ 'Implementors'",
  492. messageSends: [],
  493. referencedClasses: []
  494. }),
  495. smalltalk.HLImplementorsListWidget);
  496. smalltalk.addMethod(
  497. smalltalk.method({
  498. selector: "onSearchReferences:",
  499. category: 'reactions',
  500. fn: function (aString){
  501. var self=this;
  502. return smalltalk.withContext(function($ctx1) {
  503. _st(self)._selectItem_(nil);
  504. _st(self)._items_(_st(_st(self)._model())._implementorsOf_(aString));
  505. _st(self)._refresh();
  506. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLImplementorsListWidget)})},
  507. args: ["aString"],
  508. source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model implementorsOf: aString).\x0a\x09self refresh",
  509. messageSends: ["selectItem:", "items:", "implementorsOf:", "model", "refresh"],
  510. referencedClasses: []
  511. }),
  512. smalltalk.HLImplementorsListWidget);
  513. smalltalk.addClass('HLRegexpListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  514. smalltalk.addMethod(
  515. smalltalk.method({
  516. selector: "label",
  517. category: 'accessing',
  518. fn: function (){
  519. var self=this;
  520. return smalltalk.withContext(function($ctx1) {
  521. return "Source search";
  522. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRegexpListWidget)})},
  523. args: [],
  524. source: "label\x0a\x09^ 'Source search'",
  525. messageSends: [],
  526. referencedClasses: []
  527. }),
  528. smalltalk.HLRegexpListWidget);
  529. smalltalk.addMethod(
  530. smalltalk.method({
  531. selector: "onSearchReferences:",
  532. category: 'reactions',
  533. fn: function (aString){
  534. var self=this;
  535. return smalltalk.withContext(function($ctx1) {
  536. _st(self)._selectItem_(nil);
  537. _st(self)._items_(_st(_st(self)._model())._regexpReferencesOf_(aString));
  538. _st(self)._refresh();
  539. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLRegexpListWidget)})},
  540. args: ["aString"],
  541. source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model regexpReferencesOf: aString).\x0a\x09self refresh",
  542. messageSends: ["selectItem:", "items:", "regexpReferencesOf:", "model", "refresh"],
  543. referencedClasses: []
  544. }),
  545. smalltalk.HLRegexpListWidget);
  546. smalltalk.addClass('HLSendersListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  547. smalltalk.addMethod(
  548. smalltalk.method({
  549. selector: "label",
  550. category: 'accessing',
  551. fn: function (){
  552. var self=this;
  553. return smalltalk.withContext(function($ctx1) {
  554. return "Senders";
  555. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLSendersListWidget)})},
  556. args: [],
  557. source: "label\x0a\x09^ 'Senders'",
  558. messageSends: [],
  559. referencedClasses: []
  560. }),
  561. smalltalk.HLSendersListWidget);
  562. smalltalk.addMethod(
  563. smalltalk.method({
  564. selector: "onSearchReferences:",
  565. category: 'reactions',
  566. fn: function (aString){
  567. var self=this;
  568. return smalltalk.withContext(function($ctx1) {
  569. _st(self)._selectItem_(nil);
  570. _st(self)._items_(_st(_st(self)._model())._sendersOf_(aString));
  571. _st(self)._refresh();
  572. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLSendersListWidget)})},
  573. args: ["aString"],
  574. source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model sendersOf: aString).\x0a\x09self refresh",
  575. messageSends: ["selectItem:", "items:", "sendersOf:", "model", "refresh"],
  576. referencedClasses: []
  577. }),
  578. smalltalk.HLSendersListWidget);
  579. smalltalk.addClass('HLReferencesModel', smalltalk.HLModel, ['methodsCache', 'classesAndMetaclassesCache', 'selectedMethod'], 'Helios-References');
  580. smalltalk.addMethod(
  581. smalltalk.method({
  582. selector: "allMethods",
  583. category: 'accessing',
  584. fn: function (){
  585. var self=this;
  586. return smalltalk.withContext(function($ctx1) {
  587. var $1;
  588. $1=_st(self)._methodsCache();
  589. return $1;
  590. }, function($ctx1) {$ctx1.fill(self,"allMethods",{},smalltalk.HLReferencesModel)})},
  591. args: [],
  592. source: "allMethods\x0a\x09^ self methodsCache",
  593. messageSends: ["methodsCache"],
  594. referencedClasses: []
  595. }),
  596. smalltalk.HLReferencesModel);
  597. smalltalk.addMethod(
  598. smalltalk.method({
  599. selector: "allSelectors",
  600. category: 'accessing',
  601. fn: function (){
  602. var self=this;
  603. return smalltalk.withContext(function($ctx1) {
  604. var $1;
  605. $1=_st(_st(_st(self)._allMethods())._collect_((function(each){
  606. return smalltalk.withContext(function($ctx2) {
  607. return _st(each)._selector();
  608. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet();
  609. return $1;
  610. }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.HLReferencesModel)})},
  611. args: [],
  612. source: "allSelectors\x0a\x09^ (self allMethods \x0a\x09\x09collect: [ :each | each selector ])\x0a\x09\x09asSet",
  613. messageSends: ["asSet", "collect:", "selector", "allMethods"],
  614. referencedClasses: []
  615. }),
  616. smalltalk.HLReferencesModel);
  617. smalltalk.addMethod(
  618. smalltalk.method({
  619. selector: "classReferencesOf:",
  620. category: 'accessing',
  621. fn: function (aString){
  622. var self=this;
  623. var references;
  624. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  625. return smalltalk.withContext(function($ctx1) {
  626. var $1,$2;
  627. references=_st($OrderedCollection())._new();
  628. _st(_st(self)._classesAndMetaclasses())._do_((function(each){
  629. return smalltalk.withContext(function($ctx2) {
  630. return _st(_st(_st(each)._methodDictionary())._values())._do_((function(method){
  631. return smalltalk.withContext(function($ctx3) {
  632. $1=_st(_st(method)._referencedClasses())._includes_(aString);
  633. if(smalltalk.assert($1)){
  634. return _st(references)._add_(method);
  635. };
  636. }, function($ctx3) {$ctx3.fillBlock({method:method},$ctx1)})}));
  637. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  638. $2=references;
  639. return $2;
  640. }, function($ctx1) {$ctx1.fill(self,"classReferencesOf:",{aString:aString,references:references},smalltalk.HLReferencesModel)})},
  641. args: ["aString"],
  642. source: "classReferencesOf: aString\x0a\x09\x22Answer all methods referencing the class named aString\x22\x0a\x09\x0a\x09| references |\x0a\x09\x0a\x09references := OrderedCollection new.\x0a\x09\x0a\x09self classesAndMetaclasses do: [ :each |\x0a\x09\x09each methodDictionary values do: [ :method |\x0a\x09\x09\x09(method referencedClasses includes: aString) ifTrue: [\x0a\x09\x09\x09\x09references add: method ] ] ].\x0a\x09\x09\x09\x09\x0a\x09^ references",
  643. messageSends: ["new", "do:", "ifTrue:", "add:", "includes:", "referencedClasses", "values", "methodDictionary", "classesAndMetaclasses"],
  644. referencedClasses: ["OrderedCollection"]
  645. }),
  646. smalltalk.HLReferencesModel);
  647. smalltalk.addMethod(
  648. smalltalk.method({
  649. selector: "classesAndMetaclasses",
  650. category: 'accessing',
  651. fn: function (){
  652. var self=this;
  653. return smalltalk.withContext(function($ctx1) {
  654. var $1;
  655. $1=_st(self)._classesAndMetaclassesCache();
  656. return $1;
  657. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},smalltalk.HLReferencesModel)})},
  658. args: [],
  659. source: "classesAndMetaclasses\x0a\x09^ self classesAndMetaclassesCache",
  660. messageSends: ["classesAndMetaclassesCache"],
  661. referencedClasses: []
  662. }),
  663. smalltalk.HLReferencesModel);
  664. smalltalk.addMethod(
  665. smalltalk.method({
  666. selector: "classesAndMetaclassesCache",
  667. category: 'cache',
  668. fn: function (){
  669. var self=this;
  670. return smalltalk.withContext(function($ctx1) {
  671. var $1,$2;
  672. $1=self["@classesAndMetaclassesCache"];
  673. if(($receiver = $1) == nil || $receiver == undefined){
  674. _st(self)._updateClassesAndMetaclassesCache();
  675. } else {
  676. $1;
  677. };
  678. $2=self["@classesAndMetaclassesCache"];
  679. return $2;
  680. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclassesCache",{},smalltalk.HLReferencesModel)})},
  681. args: [],
  682. source: "classesAndMetaclassesCache\x0a\x09classesAndMetaclassesCache ifNil: [ self updateClassesAndMetaclassesCache ].\x0a\x09\x0a\x09^ classesAndMetaclassesCache",
  683. messageSends: ["ifNil:", "updateClassesAndMetaclassesCache"],
  684. referencedClasses: []
  685. }),
  686. smalltalk.HLReferencesModel);
  687. smalltalk.addMethod(
  688. smalltalk.method({
  689. selector: "implementorsOf:",
  690. category: 'accessing',
  691. fn: function (aString){
  692. var self=this;
  693. return smalltalk.withContext(function($ctx1) {
  694. var $1;
  695. $1=_st(_st(self)._allMethods())._select_((function(each){
  696. return smalltalk.withContext(function($ctx2) {
  697. return _st(_st(each)._selector()).__eq(aString);
  698. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  699. return $1;
  700. }, function($ctx1) {$ctx1.fill(self,"implementorsOf:",{aString:aString},smalltalk.HLReferencesModel)})},
  701. args: ["aString"],
  702. source: "implementorsOf: aString\x0a\x09^ self allMethods select: [ :each |\x0a\x09\x09each selector = aString ]",
  703. messageSends: ["select:", "=", "selector", "allMethods"],
  704. referencedClasses: []
  705. }),
  706. smalltalk.HLReferencesModel);
  707. smalltalk.addMethod(
  708. smalltalk.method({
  709. selector: "methodsCache",
  710. category: 'cache',
  711. fn: function (){
  712. var self=this;
  713. return smalltalk.withContext(function($ctx1) {
  714. var $1,$2;
  715. $1=self["@methodsCache"];
  716. if(($receiver = $1) == nil || $receiver == undefined){
  717. _st(self)._updateMethodsCache();
  718. } else {
  719. $1;
  720. };
  721. $2=self["@methodsCache"];
  722. return $2;
  723. }, function($ctx1) {$ctx1.fill(self,"methodsCache",{},smalltalk.HLReferencesModel)})},
  724. args: [],
  725. source: "methodsCache\x0a\x09methodsCache ifNil: [ self updateMethodsCache ].\x0a\x09\x0a\x09^ methodsCache",
  726. messageSends: ["ifNil:", "updateMethodsCache"],
  727. referencedClasses: []
  728. }),
  729. smalltalk.HLReferencesModel);
  730. smalltalk.addMethod(
  731. smalltalk.method({
  732. selector: "regexpReferencesOf:",
  733. category: 'accessing',
  734. fn: function (aString){
  735. var self=this;
  736. return smalltalk.withContext(function($ctx1) {
  737. var $1;
  738. $1=_st(_st(self)._allMethods())._select_((function(each){
  739. return smalltalk.withContext(function($ctx2) {
  740. return _st(_st(each)._source())._match_(aString);
  741. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  742. return $1;
  743. }, function($ctx1) {$ctx1.fill(self,"regexpReferencesOf:",{aString:aString},smalltalk.HLReferencesModel)})},
  744. args: ["aString"],
  745. source: "regexpReferencesOf: aString\x0a\x09^ self allMethods select: [ :each |\x0a\x09\x09each source match: aString ]",
  746. messageSends: ["select:", "match:", "source", "allMethods"],
  747. referencedClasses: []
  748. }),
  749. smalltalk.HLReferencesModel);
  750. smalltalk.addMethod(
  751. smalltalk.method({
  752. selector: "search:",
  753. category: 'actions',
  754. fn: function (aString){
  755. var self=this;
  756. function $HLSearchReferences(){return smalltalk.HLSearchReferences||(typeof HLSearchReferences=="undefined"?nil:HLSearchReferences)}
  757. return smalltalk.withContext(function($ctx1) {
  758. var $1,$2;
  759. _st(self)._updateCaches();
  760. $1=_st($HLSearchReferences())._new();
  761. _st($1)._searchString_(aString);
  762. $2=_st($1)._yourself();
  763. _st(_st(self)._announcer())._announce_($2);
  764. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.HLReferencesModel)})},
  765. args: ["aString"],
  766. source: "search: aString\x0a\x09self updateCaches.\x0a\x09\x0a\x09self announcer announce: (HLSearchReferences new\x0a\x09\x09searchString: aString;\x0a\x09\x09yourself)",
  767. messageSends: ["updateCaches", "announce:", "searchString:", "new", "yourself", "announcer"],
  768. referencedClasses: ["HLSearchReferences"]
  769. }),
  770. smalltalk.HLReferencesModel);
  771. smalltalk.addMethod(
  772. smalltalk.method({
  773. selector: "selectedClass",
  774. category: 'accessing',
  775. fn: function (){
  776. var self=this;
  777. return smalltalk.withContext(function($ctx1) {
  778. var $2,$1;
  779. $2=_st(self)._selectedMethod();
  780. if(($receiver = $2) == nil || $receiver == undefined){
  781. $1=$2;
  782. } else {
  783. var method;
  784. method=$receiver;
  785. $1=_st(method)._methodClass();
  786. };
  787. return $1;
  788. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{},smalltalk.HLReferencesModel)})},
  789. args: [],
  790. source: "selectedClass\x0a\x09^ self selectedMethod ifNotNil: [ :method |\x0a\x09\x09method methodClass ]",
  791. messageSends: ["ifNotNil:", "methodClass", "selectedMethod"],
  792. referencedClasses: []
  793. }),
  794. smalltalk.HLReferencesModel);
  795. smalltalk.addMethod(
  796. smalltalk.method({
  797. selector: "selectedMethod",
  798. category: 'accessing',
  799. fn: function (){
  800. var self=this;
  801. return smalltalk.withContext(function($ctx1) {
  802. var $1;
  803. $1=self["@selectedMethod"];
  804. return $1;
  805. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{},smalltalk.HLReferencesModel)})},
  806. args: [],
  807. source: "selectedMethod\x0a\x09^ selectedMethod",
  808. messageSends: [],
  809. referencedClasses: []
  810. }),
  811. smalltalk.HLReferencesModel);
  812. smalltalk.addMethod(
  813. smalltalk.method({
  814. selector: "selectedMethod:",
  815. category: 'accessing',
  816. fn: function (aMethod){
  817. var self=this;
  818. function $HLMethodSelected(){return smalltalk.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  819. return smalltalk.withContext(function($ctx1) {
  820. var $1,$2;
  821. _st(self)._withChangesDo_((function(){
  822. return smalltalk.withContext(function($ctx2) {
  823. self["@selectedMethod"]=aMethod;
  824. self["@selectedMethod"];
  825. $1=_st($HLMethodSelected())._new();
  826. _st($1)._item_(aMethod);
  827. $2=_st($1)._yourself();
  828. return _st(_st(self)._announcer())._announce_($2);
  829. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  830. return self}, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aMethod:aMethod},smalltalk.HLReferencesModel)})},
  831. args: ["aMethod"],
  832. source: "selectedMethod: aMethod\x0a\x09self withChangesDo: [ \x0a\x09\x09selectedMethod := aMethod.\x0a\x09\x09\x0a\x09\x09self announcer announce: (HLMethodSelected new\x0a\x09\x09\x09item: aMethod;\x0a\x09\x09\x09yourself) ]\x0a\x09",
  833. messageSends: ["withChangesDo:", "announce:", "item:", "new", "yourself", "announcer"],
  834. referencedClasses: ["HLMethodSelected"]
  835. }),
  836. smalltalk.HLReferencesModel);
  837. smalltalk.addMethod(
  838. smalltalk.method({
  839. selector: "sendersOf:",
  840. category: 'accessing',
  841. fn: function (aString){
  842. var self=this;
  843. return smalltalk.withContext(function($ctx1) {
  844. var $1;
  845. $1=_st(_st(self)._allMethods())._select_((function(each){
  846. return smalltalk.withContext(function($ctx2) {
  847. return _st(_st(each)._messageSends())._includes_(aString);
  848. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  849. return $1;
  850. }, function($ctx1) {$ctx1.fill(self,"sendersOf:",{aString:aString},smalltalk.HLReferencesModel)})},
  851. args: ["aString"],
  852. source: "sendersOf: aString\x0a\x09^ self allMethods select: [ :each |\x0a\x09\x09each messageSends includes: aString ]",
  853. messageSends: ["select:", "includes:", "messageSends", "allMethods"],
  854. referencedClasses: []
  855. }),
  856. smalltalk.HLReferencesModel);
  857. smalltalk.addMethod(
  858. smalltalk.method({
  859. selector: "updateCaches",
  860. category: 'cache',
  861. fn: function (){
  862. var self=this;
  863. return smalltalk.withContext(function($ctx1) {
  864. var $1,$2;
  865. $1=self;
  866. _st($1)._updateClassesAndMetaclassesCache();
  867. $2=_st($1)._updateMethodsCache();
  868. return self}, function($ctx1) {$ctx1.fill(self,"updateCaches",{},smalltalk.HLReferencesModel)})},
  869. args: [],
  870. source: "updateCaches\x0a\x09self \x0a\x09\x09updateClassesAndMetaclassesCache;\x0a\x09\x09updateMethodsCache",
  871. messageSends: ["updateClassesAndMetaclassesCache", "updateMethodsCache"],
  872. referencedClasses: []
  873. }),
  874. smalltalk.HLReferencesModel);
  875. smalltalk.addMethod(
  876. smalltalk.method({
  877. selector: "updateClassesAndMetaclassesCache",
  878. category: 'cache',
  879. fn: function (){
  880. var self=this;
  881. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  882. return smalltalk.withContext(function($ctx1) {
  883. var $1,$2;
  884. self["@classesAndMetaclassesCache"]=_st(_st(_st(self)._environment())._classes())._inject_into_(_st($OrderedCollection())._new(),(function(acc,each){
  885. return smalltalk.withContext(function($ctx2) {
  886. $1=acc;
  887. _st($1)._add_(each);
  888. _st($1)._add_(_st(each)._class());
  889. $2=_st($1)._yourself();
  890. return $2;
  891. }, function($ctx2) {$ctx2.fillBlock({acc:acc,each:each},$ctx1)})}));
  892. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesAndMetaclassesCache",{},smalltalk.HLReferencesModel)})},
  893. args: [],
  894. source: "updateClassesAndMetaclassesCache\x0a\x09classesAndMetaclassesCache := self environment classes \x0a\x09\x09inject: OrderedCollection new \x0a\x09\x09into: [ :acc :each |\x0a\x09\x09\x09acc \x0a\x09\x09\x09\x09add: each; \x0a\x09\x09\x09\x09add: each class;\x0a\x09\x09\x09\x09yourself ]",
  895. messageSends: ["inject:into:", "new", "add:", "class", "yourself", "classes", "environment"],
  896. referencedClasses: ["OrderedCollection"]
  897. }),
  898. smalltalk.HLReferencesModel);
  899. smalltalk.addMethod(
  900. smalltalk.method({
  901. selector: "updateMethodsCache",
  902. category: 'cache',
  903. fn: function (){
  904. var self=this;
  905. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  906. return smalltalk.withContext(function($ctx1) {
  907. self["@methodsCache"]=_st(_st(self)._classesAndMetaclasses())._inject_into_(_st($OrderedCollection())._new(),(function(acc,each){
  908. return smalltalk.withContext(function($ctx2) {
  909. return _st(acc).__comma(_st(each)._methods());
  910. }, function($ctx2) {$ctx2.fillBlock({acc:acc,each:each},$ctx1)})}));
  911. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsCache",{},smalltalk.HLReferencesModel)})},
  912. args: [],
  913. source: "updateMethodsCache\x0a\x09methodsCache := self classesAndMetaclasses\x0a\x09\x09inject: OrderedCollection new\x0a\x09\x09into: [ :acc :each |\x0a\x09\x09\x09acc, each methods ]",
  914. messageSends: ["inject:into:", "new", ",", "methods", "classesAndMetaclasses"],
  915. referencedClasses: ["OrderedCollection"]
  916. }),
  917. smalltalk.HLReferencesModel);