Helios-References.js 40 KB

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