2
0

Helios-References.js 41 KB

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