2
0

Helios-References.js 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132
  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: "open",
  235. category: 'actions',
  236. fn: function (){
  237. var self=this;
  238. function $HLTab(){return smalltalk.HLTab||(typeof HLTab=="undefined"?nil:HLTab)}
  239. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  240. return smalltalk.withContext(function($ctx1) {
  241. _st(_st($HLManager())._current())._addTab_(_st($HLTab())._on_labelled_(self,_st(_st(self)._class())._tabLabel()));
  242. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.HLReferences)})},
  243. args: [],
  244. source: "open\x0a\x09HLManager current addTab: (HLTab on: self labelled: self class tabLabel)",
  245. messageSends: ["addTab:", "on:labelled:", "tabLabel", "class", "current"],
  246. referencedClasses: ["HLTab", "HLManager"]
  247. }),
  248. smalltalk.HLReferences);
  249. smalltalk.addMethod(
  250. smalltalk.method({
  251. selector: "regexpListWidget",
  252. category: 'accessing',
  253. fn: function (){
  254. var self=this;
  255. function $HLRegexpListWidget(){return smalltalk.HLRegexpListWidget||(typeof HLRegexpListWidget=="undefined"?nil:HLRegexpListWidget)}
  256. return smalltalk.withContext(function($ctx1) {
  257. var $2,$1;
  258. $2=self["@regexpListWidget"];
  259. if(($receiver = $2) == nil || $receiver == undefined){
  260. self["@regexpListWidget"]=_st($HLRegexpListWidget())._on_(_st(self)._model());
  261. self["@regexpListWidget"];
  262. $1=_st(self["@regexpListWidget"])._next_(_st(self)._sourceCodeWidget());
  263. } else {
  264. $1=$2;
  265. };
  266. return $1;
  267. }, function($ctx1) {$ctx1.fill(self,"regexpListWidget",{},smalltalk.HLReferences)})},
  268. args: [],
  269. source: "regexpListWidget\x0a\x09^ regexpListWidget ifNil: [\x0a \x09regexpListWidget := HLRegexpListWidget on: self model.\x0a\x09\x09regexpListWidget next: self sourceCodeWidget ]",
  270. messageSends: ["ifNil:", "on:", "model", "next:", "sourceCodeWidget"],
  271. referencedClasses: ["HLRegexpListWidget"]
  272. }),
  273. smalltalk.HLReferences);
  274. smalltalk.addMethod(
  275. smalltalk.method({
  276. selector: "registerBindingsOn:",
  277. category: 'actions',
  278. fn: function (aBindingGroup){
  279. var self=this;
  280. function $HLToolCommand(){return smalltalk.HLToolCommand||(typeof HLToolCommand=="undefined"?nil:HLToolCommand)}
  281. return smalltalk.withContext(function($ctx1) {
  282. _st($HLToolCommand())._registerConcreteClassesOn_for_(aBindingGroup,_st(self)._model());
  283. return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup},smalltalk.HLReferences)})},
  284. args: ["aBindingGroup"],
  285. source: "registerBindingsOn: aBindingGroup\x0a\x09HLToolCommand \x0a\x09\x09registerConcreteClassesOn: aBindingGroup \x0a\x09\x09for: self model",
  286. messageSends: ["registerConcreteClassesOn:for:", "model"],
  287. referencedClasses: ["HLToolCommand"]
  288. }),
  289. smalltalk.HLReferences);
  290. smalltalk.addMethod(
  291. smalltalk.method({
  292. selector: "renderContentOn:",
  293. category: 'rendering',
  294. fn: function (html){
  295. var self=this;
  296. function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  297. function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  298. function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  299. return smalltalk.withContext(function($ctx1) {
  300. _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())));
  301. _st(_st(self)._sendersListWidget())._focus();
  302. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLReferences)})},
  303. args: ["html"],
  304. 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",
  305. messageSends: ["with:", "with:with:", "sendersListWidget", "implementorsListWidget", "classReferencesListWidget", "regexpListWidget", "sourceCodeWidget", "focus"],
  306. referencedClasses: ["HLVerticalSplitter", "HLHorizontalSplitter", "HLContainer"]
  307. }),
  308. smalltalk.HLReferences);
  309. smalltalk.addMethod(
  310. smalltalk.method({
  311. selector: "search:",
  312. category: 'actions',
  313. fn: function (aString){
  314. var self=this;
  315. return smalltalk.withContext(function($ctx1) {
  316. _st(_st(self)._model())._search_(aString);
  317. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.HLReferences)})},
  318. args: ["aString"],
  319. source: "search: aString\x0a\x09self model search: aString",
  320. messageSends: ["search:", "model"],
  321. referencedClasses: []
  322. }),
  323. smalltalk.HLReferences);
  324. smalltalk.addMethod(
  325. smalltalk.method({
  326. selector: "sendersListWidget",
  327. category: 'accessing',
  328. fn: function (){
  329. var self=this;
  330. function $HLSendersListWidget(){return smalltalk.HLSendersListWidget||(typeof HLSendersListWidget=="undefined"?nil:HLSendersListWidget)}
  331. return smalltalk.withContext(function($ctx1) {
  332. var $2,$1;
  333. $2=self["@sendersListWidget"];
  334. if(($receiver = $2) == nil || $receiver == undefined){
  335. self["@sendersListWidget"]=_st($HLSendersListWidget())._on_(_st(self)._model());
  336. self["@sendersListWidget"];
  337. $1=_st(self["@sendersListWidget"])._next_(_st(self)._implementorsListWidget());
  338. } else {
  339. $1=$2;
  340. };
  341. return $1;
  342. }, function($ctx1) {$ctx1.fill(self,"sendersListWidget",{},smalltalk.HLReferences)})},
  343. args: [],
  344. source: "sendersListWidget\x0a\x09^ sendersListWidget ifNil: [\x0a \x09sendersListWidget := HLSendersListWidget on: self model.\x0a\x09\x09sendersListWidget next: self implementorsListWidget ]",
  345. messageSends: ["ifNil:", "on:", "model", "next:", "implementorsListWidget"],
  346. referencedClasses: ["HLSendersListWidget"]
  347. }),
  348. smalltalk.HLReferences);
  349. smalltalk.addMethod(
  350. smalltalk.method({
  351. selector: "sourceCodeWidget",
  352. category: 'accessing',
  353. fn: function (){
  354. var self=this;
  355. function $HLBrowserCodeWidget(){return smalltalk.HLBrowserCodeWidget||(typeof HLBrowserCodeWidget=="undefined"?nil:HLBrowserCodeWidget)}
  356. return smalltalk.withContext(function($ctx1) {
  357. var $2,$3,$4,$1;
  358. $2=self["@sourceCodeWidget"];
  359. if(($receiver = $2) == nil || $receiver == undefined){
  360. $3=_st($HLBrowserCodeWidget())._new();
  361. _st($3)._browserModel_(_st(self)._model());
  362. $4=_st($3)._yourself();
  363. self["@sourceCodeWidget"]=$4;
  364. $1=self["@sourceCodeWidget"];
  365. } else {
  366. $1=$2;
  367. };
  368. return $1;
  369. }, function($ctx1) {$ctx1.fill(self,"sourceCodeWidget",{},smalltalk.HLReferences)})},
  370. args: [],
  371. source: "sourceCodeWidget\x0a\x09^ sourceCodeWidget ifNil: [\x0a \x09sourceCodeWidget := HLBrowserCodeWidget new\x0a\x09\x09\x09browserModel: self model;\x0a\x09\x09\x09yourself ]",
  372. messageSends: ["ifNil:", "browserModel:", "model", "new", "yourself"],
  373. referencedClasses: ["HLBrowserCodeWidget"]
  374. }),
  375. smalltalk.HLReferences);
  376. smalltalk.addMethod(
  377. smalltalk.method({
  378. selector: "canBeOpenAsTab",
  379. category: 'testing',
  380. fn: function (){
  381. var self=this;
  382. return smalltalk.withContext(function($ctx1) {
  383. return false;
  384. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLReferences.klass)})},
  385. args: [],
  386. source: "canBeOpenAsTab\x0a\x09^ false",
  387. messageSends: [],
  388. referencedClasses: []
  389. }),
  390. smalltalk.HLReferences.klass);
  391. smalltalk.addMethod(
  392. smalltalk.method({
  393. selector: "tabClass",
  394. category: 'accessing',
  395. fn: function (){
  396. var self=this;
  397. return smalltalk.withContext(function($ctx1) {
  398. return "references";
  399. }, function($ctx1) {$ctx1.fill(self,"tabClass",{},smalltalk.HLReferences.klass)})},
  400. args: [],
  401. source: "tabClass\x0a\x09^ 'references'",
  402. messageSends: [],
  403. referencedClasses: []
  404. }),
  405. smalltalk.HLReferences.klass);
  406. smalltalk.addMethod(
  407. smalltalk.method({
  408. selector: "tabLabel",
  409. category: 'accessing',
  410. fn: function (){
  411. var self=this;
  412. return smalltalk.withContext(function($ctx1) {
  413. return "References";
  414. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLReferences.klass)})},
  415. args: [],
  416. source: "tabLabel\x0a\x09^ 'References'",
  417. messageSends: [],
  418. referencedClasses: []
  419. }),
  420. smalltalk.HLReferences.klass);
  421. smalltalk.addMethod(
  422. smalltalk.method({
  423. selector: "tabPriority",
  424. category: 'accessing',
  425. fn: function (){
  426. var self=this;
  427. return smalltalk.withContext(function($ctx1) {
  428. var $1;
  429. $1=(100);
  430. return $1;
  431. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLReferences.klass)})},
  432. args: [],
  433. source: "tabPriority\x0a\x09^ 100",
  434. messageSends: [],
  435. referencedClasses: []
  436. }),
  437. smalltalk.HLReferences.klass);
  438. smalltalk.addClass('HLReferencesListWidget', smalltalk.HLToolListWidget, [], 'Helios-References');
  439. smalltalk.addMethod(
  440. smalltalk.method({
  441. selector: "activateListItem:",
  442. category: 'actions',
  443. fn: function (anItem){
  444. var self=this;
  445. return smalltalk.withContext(function($ctx1) {
  446. _st(_st(self)._model())._withChangesDo_((function(){
  447. return smalltalk.withContext(function($ctx2) {
  448. return smalltalk.HLToolListWidget.fn.prototype._activateListItem_.apply(_st(self), [anItem]);
  449. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  450. return self}, function($ctx1) {$ctx1.fill(self,"activateListItem:",{anItem:anItem},smalltalk.HLReferencesListWidget)})},
  451. args: ["anItem"],
  452. source: "activateListItem: anItem\x0a\x09self model withChangesDo: [ super activateListItem: anItem ]",
  453. messageSends: ["withChangesDo:", "activateListItem:", "model"],
  454. referencedClasses: []
  455. }),
  456. smalltalk.HLReferencesListWidget);
  457. smalltalk.addMethod(
  458. smalltalk.method({
  459. selector: "commandCategory",
  460. category: 'accessing',
  461. fn: function (){
  462. var self=this;
  463. return smalltalk.withContext(function($ctx1) {
  464. return "Methods";
  465. }, function($ctx1) {$ctx1.fill(self,"commandCategory",{},smalltalk.HLReferencesListWidget)})},
  466. args: [],
  467. source: "commandCategory\x0a\x09^ 'Methods'",
  468. messageSends: [],
  469. referencedClasses: []
  470. }),
  471. smalltalk.HLReferencesListWidget);
  472. smalltalk.addMethod(
  473. smalltalk.method({
  474. selector: "label",
  475. category: 'accessing',
  476. fn: function (){
  477. var self=this;
  478. return smalltalk.withContext(function($ctx1) {
  479. return "List";
  480. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLReferencesListWidget)})},
  481. args: [],
  482. source: "label\x0a\x09^ 'List'",
  483. messageSends: [],
  484. referencedClasses: []
  485. }),
  486. smalltalk.HLReferencesListWidget);
  487. smalltalk.addMethod(
  488. smalltalk.method({
  489. selector: "observeModel",
  490. category: 'actions',
  491. fn: function (){
  492. var self=this;
  493. function $HLSearchReferences(){return smalltalk.HLSearchReferences||(typeof HLSearchReferences=="undefined"?nil:HLSearchReferences)}
  494. function $HLMethodSelected(){return smalltalk.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  495. return smalltalk.withContext(function($ctx1) {
  496. var $1,$2;
  497. $1=_st(_st(self)._model())._announcer();
  498. _st($1)._on_do_($HLSearchReferences(),(function(ann){
  499. return smalltalk.withContext(function($ctx2) {
  500. return _st(self)._onSearchReferences_(_st(ann)._searchString());
  501. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  502. $2=_st($1)._on_do_($HLMethodSelected(),(function(ann){
  503. return smalltalk.withContext(function($ctx2) {
  504. return _st(self)._onMethodSelected_(_st(ann)._item());
  505. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  506. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLReferencesListWidget)})},
  507. args: [],
  508. 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 ]",
  509. messageSends: ["on:do:", "onSearchReferences:", "searchString", "announcer", "model", "onMethodSelected:", "item"],
  510. referencedClasses: ["HLSearchReferences", "HLMethodSelected"]
  511. }),
  512. smalltalk.HLReferencesListWidget);
  513. smalltalk.addMethod(
  514. smalltalk.method({
  515. selector: "onMethodSelected:",
  516. category: 'reactions',
  517. fn: function (aMethod){
  518. var self=this;
  519. return smalltalk.withContext(function($ctx1) {
  520. var $1,$2,$3,$4,$5;
  521. var $early={};
  522. try {
  523. $1=aMethod;
  524. if(($receiver = $1) == nil || $receiver == undefined){
  525. $2=self;
  526. return $2;
  527. } else {
  528. $1;
  529. };
  530. _st(_st(self)._items())._detect_ifNone_((function(each){
  531. return smalltalk.withContext(function($ctx2) {
  532. return _st(each).__eq(_st(aMethod)._selector());
  533. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  534. return smalltalk.withContext(function($ctx2) {
  535. $3=self;
  536. throw $early=[$3];
  537. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  538. $4=self;
  539. _st($4)._selectedItem_(_st(aMethod)._selector());
  540. $5=_st($4)._activateItem_(_st(aMethod)._selector());
  541. return self}
  542. catch(e) {if(e===$early)return e[0]; throw e}
  543. }, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aMethod:aMethod},smalltalk.HLReferencesListWidget)})},
  544. args: ["aMethod"],
  545. 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",
  546. messageSends: ["ifNil:", "detect:ifNone:", "=", "selector", "items", "selectedItem:", "activateItem:"],
  547. referencedClasses: []
  548. }),
  549. smalltalk.HLReferencesListWidget);
  550. smalltalk.addMethod(
  551. smalltalk.method({
  552. selector: "onSearchReferences:",
  553. category: 'reactions',
  554. fn: function (aString){
  555. var self=this;
  556. return smalltalk.withContext(function($ctx1) {
  557. _st(self)._subclassResponsibility();
  558. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLReferencesListWidget)})},
  559. args: ["aString"],
  560. source: "onSearchReferences: aString\x0a\x09self subclassResponsibility",
  561. messageSends: ["subclassResponsibility"],
  562. referencedClasses: []
  563. }),
  564. smalltalk.HLReferencesListWidget);
  565. smalltalk.addMethod(
  566. smalltalk.method({
  567. selector: "renderItemLabel:on:",
  568. category: 'rendering',
  569. fn: function (aMethod,html){
  570. var self=this;
  571. return smalltalk.withContext(function($ctx1) {
  572. _st(html)._with_(_st(_st(_st(_st(aMethod)._methodClass())._name()).__comma(" >> #")).__comma(_st(aMethod)._selector()));
  573. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aMethod:aMethod,html:html},smalltalk.HLReferencesListWidget)})},
  574. args: ["aMethod", "html"],
  575. source: "renderItemLabel: aMethod on: html\x0a\x09html with: aMethod methodClass name, ' >> #', aMethod selector",
  576. messageSends: ["with:", ",", "selector", "name", "methodClass"],
  577. referencedClasses: []
  578. }),
  579. smalltalk.HLReferencesListWidget);
  580. smalltalk.addMethod(
  581. smalltalk.method({
  582. selector: "selectItem:",
  583. category: 'actions',
  584. fn: function (aMethod){
  585. var self=this;
  586. return smalltalk.withContext(function($ctx1) {
  587. _st(_st(self)._model())._selectedMethod_(aMethod);
  588. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aMethod:aMethod},smalltalk.HLReferencesListWidget)})},
  589. args: ["aMethod"],
  590. source: "selectItem: aMethod\x0a\x09self model selectedMethod: aMethod",
  591. messageSends: ["selectedMethod:", "model"],
  592. referencedClasses: []
  593. }),
  594. smalltalk.HLReferencesListWidget);
  595. smalltalk.addMethod(
  596. smalltalk.method({
  597. selector: "on:",
  598. category: 'instance creation',
  599. fn: function (aModel){
  600. var self=this;
  601. return smalltalk.withContext(function($ctx1) {
  602. var $2,$3,$1;
  603. $2=_st(self)._new();
  604. _st($2)._model_(aModel);
  605. $3=_st($2)._yourself();
  606. $1=$3;
  607. return $1;
  608. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel},smalltalk.HLReferencesListWidget.klass)})},
  609. args: ["aModel"],
  610. source: "on: aModel\x0a\x09^ self new \x0a\x09\x09model: aModel; \x0a\x09\x09yourself",
  611. messageSends: ["model:", "new", "yourself"],
  612. referencedClasses: []
  613. }),
  614. smalltalk.HLReferencesListWidget.klass);
  615. smalltalk.addClass('HLClassReferencesListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  616. smalltalk.addMethod(
  617. smalltalk.method({
  618. selector: "label",
  619. category: 'accessing',
  620. fn: function (){
  621. var self=this;
  622. return smalltalk.withContext(function($ctx1) {
  623. return "Class references";
  624. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLClassReferencesListWidget)})},
  625. args: [],
  626. source: "label\x0a\x09^ 'Class references'",
  627. messageSends: [],
  628. referencedClasses: []
  629. }),
  630. smalltalk.HLClassReferencesListWidget);
  631. smalltalk.addMethod(
  632. smalltalk.method({
  633. selector: "onSearchReferences:",
  634. category: 'reactions',
  635. fn: function (aString){
  636. var self=this;
  637. return smalltalk.withContext(function($ctx1) {
  638. _st(self)._selectItem_(nil);
  639. _st(self)._items_(_st(_st(self)._model())._classReferencesOf_(aString));
  640. _st(self)._refresh();
  641. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLClassReferencesListWidget)})},
  642. args: ["aString"],
  643. source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model classReferencesOf: aString).\x0a\x09self refresh",
  644. messageSends: ["selectItem:", "items:", "classReferencesOf:", "model", "refresh"],
  645. referencedClasses: []
  646. }),
  647. smalltalk.HLClassReferencesListWidget);
  648. smalltalk.addClass('HLImplementorsListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  649. smalltalk.addMethod(
  650. smalltalk.method({
  651. selector: "label",
  652. category: 'accessing',
  653. fn: function (){
  654. var self=this;
  655. return smalltalk.withContext(function($ctx1) {
  656. return "Implementors";
  657. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLImplementorsListWidget)})},
  658. args: [],
  659. source: "label\x0a\x09^ 'Implementors'",
  660. messageSends: [],
  661. referencedClasses: []
  662. }),
  663. smalltalk.HLImplementorsListWidget);
  664. smalltalk.addMethod(
  665. smalltalk.method({
  666. selector: "onSearchReferences:",
  667. category: 'reactions',
  668. fn: function (aString){
  669. var self=this;
  670. return smalltalk.withContext(function($ctx1) {
  671. _st(self)._selectItem_(nil);
  672. _st(self)._items_(_st(_st(self)._model())._implementorsOf_(aString));
  673. _st(self)._refresh();
  674. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLImplementorsListWidget)})},
  675. args: ["aString"],
  676. source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model implementorsOf: aString).\x0a\x09self refresh",
  677. messageSends: ["selectItem:", "items:", "implementorsOf:", "model", "refresh"],
  678. referencedClasses: []
  679. }),
  680. smalltalk.HLImplementorsListWidget);
  681. smalltalk.addClass('HLRegexpListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  682. smalltalk.addMethod(
  683. smalltalk.method({
  684. selector: "label",
  685. category: 'accessing',
  686. fn: function (){
  687. var self=this;
  688. return smalltalk.withContext(function($ctx1) {
  689. return "Source search";
  690. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRegexpListWidget)})},
  691. args: [],
  692. source: "label\x0a\x09^ 'Source search'",
  693. messageSends: [],
  694. referencedClasses: []
  695. }),
  696. smalltalk.HLRegexpListWidget);
  697. smalltalk.addMethod(
  698. smalltalk.method({
  699. selector: "onSearchReferences:",
  700. category: 'reactions',
  701. fn: function (aString){
  702. var self=this;
  703. return smalltalk.withContext(function($ctx1) {
  704. _st(self)._selectItem_(nil);
  705. _st(self)._items_(_st(_st(self)._model())._regexpReferencesOf_(aString));
  706. _st(self)._refresh();
  707. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLRegexpListWidget)})},
  708. args: ["aString"],
  709. source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model regexpReferencesOf: aString).\x0a\x09self refresh",
  710. messageSends: ["selectItem:", "items:", "regexpReferencesOf:", "model", "refresh"],
  711. referencedClasses: []
  712. }),
  713. smalltalk.HLRegexpListWidget);
  714. smalltalk.addClass('HLSendersListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  715. smalltalk.addMethod(
  716. smalltalk.method({
  717. selector: "label",
  718. category: 'accessing',
  719. fn: function (){
  720. var self=this;
  721. return smalltalk.withContext(function($ctx1) {
  722. return "Senders";
  723. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLSendersListWidget)})},
  724. args: [],
  725. source: "label\x0a\x09^ 'Senders'",
  726. messageSends: [],
  727. referencedClasses: []
  728. }),
  729. smalltalk.HLSendersListWidget);
  730. smalltalk.addMethod(
  731. smalltalk.method({
  732. selector: "onSearchReferences:",
  733. category: 'reactions',
  734. fn: function (aString){
  735. var self=this;
  736. return smalltalk.withContext(function($ctx1) {
  737. _st(self)._selectItem_(nil);
  738. _st(self)._items_(_st(_st(self)._model())._sendersOf_(aString));
  739. _st(self)._refresh();
  740. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLSendersListWidget)})},
  741. args: ["aString"],
  742. source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model sendersOf: aString).\x0a\x09self refresh",
  743. messageSends: ["selectItem:", "items:", "sendersOf:", "model", "refresh"],
  744. referencedClasses: []
  745. }),
  746. smalltalk.HLSendersListWidget);
  747. smalltalk.addClass('HLReferencesModel', smalltalk.HLToolModel, ['methodsCache', 'classesAndMetaclassesCache'], 'Helios-References');
  748. smalltalk.addMethod(
  749. smalltalk.method({
  750. selector: "allMethods",
  751. category: 'accessing',
  752. fn: function (){
  753. var self=this;
  754. return smalltalk.withContext(function($ctx1) {
  755. var $1;
  756. $1=_st(self)._methodsCache();
  757. return $1;
  758. }, function($ctx1) {$ctx1.fill(self,"allMethods",{},smalltalk.HLReferencesModel)})},
  759. args: [],
  760. source: "allMethods\x0a\x09^ self methodsCache",
  761. messageSends: ["methodsCache"],
  762. referencedClasses: []
  763. }),
  764. smalltalk.HLReferencesModel);
  765. smalltalk.addMethod(
  766. smalltalk.method({
  767. selector: "allSelectors",
  768. category: 'accessing',
  769. fn: function (){
  770. var self=this;
  771. return smalltalk.withContext(function($ctx1) {
  772. var $1;
  773. $1=_st(_st(_st(self)._allMethods())._collect_((function(each){
  774. return smalltalk.withContext(function($ctx2) {
  775. return _st(each)._selector();
  776. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet();
  777. return $1;
  778. }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.HLReferencesModel)})},
  779. args: [],
  780. source: "allSelectors\x0a\x09^ (self allMethods \x0a\x09\x09collect: [ :each | each selector ])\x0a\x09\x09asSet",
  781. messageSends: ["asSet", "collect:", "selector", "allMethods"],
  782. referencedClasses: []
  783. }),
  784. smalltalk.HLReferencesModel);
  785. smalltalk.addMethod(
  786. smalltalk.method({
  787. selector: "classReferencesOf:",
  788. category: 'accessing',
  789. fn: function (aString){
  790. var self=this;
  791. var references;
  792. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  793. return smalltalk.withContext(function($ctx1) {
  794. var $1,$2;
  795. references=_st($OrderedCollection())._new();
  796. _st(_st(self)._classesAndMetaclasses())._do_((function(each){
  797. return smalltalk.withContext(function($ctx2) {
  798. return _st(_st(_st(each)._methodDictionary())._values())._do_((function(method){
  799. return smalltalk.withContext(function($ctx3) {
  800. $1=_st(_st(method)._referencedClasses())._includes_(aString);
  801. if(smalltalk.assert($1)){
  802. return _st(references)._add_(method);
  803. };
  804. }, function($ctx3) {$ctx3.fillBlock({method:method},$ctx1)})}));
  805. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  806. $2=references;
  807. return $2;
  808. }, function($ctx1) {$ctx1.fill(self,"classReferencesOf:",{aString:aString,references:references},smalltalk.HLReferencesModel)})},
  809. args: ["aString"],
  810. 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",
  811. messageSends: ["new", "do:", "ifTrue:", "add:", "includes:", "referencedClasses", "values", "methodDictionary", "classesAndMetaclasses"],
  812. referencedClasses: ["OrderedCollection"]
  813. }),
  814. smalltalk.HLReferencesModel);
  815. smalltalk.addMethod(
  816. smalltalk.method({
  817. selector: "classesAndMetaclasses",
  818. category: 'accessing',
  819. fn: function (){
  820. var self=this;
  821. return smalltalk.withContext(function($ctx1) {
  822. var $1;
  823. $1=_st(self)._classesAndMetaclassesCache();
  824. return $1;
  825. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},smalltalk.HLReferencesModel)})},
  826. args: [],
  827. source: "classesAndMetaclasses\x0a\x09^ self classesAndMetaclassesCache",
  828. messageSends: ["classesAndMetaclassesCache"],
  829. referencedClasses: []
  830. }),
  831. smalltalk.HLReferencesModel);
  832. smalltalk.addMethod(
  833. smalltalk.method({
  834. selector: "classesAndMetaclassesCache",
  835. category: 'cache',
  836. fn: function (){
  837. var self=this;
  838. return smalltalk.withContext(function($ctx1) {
  839. var $1,$2;
  840. $1=self["@classesAndMetaclassesCache"];
  841. if(($receiver = $1) == nil || $receiver == undefined){
  842. _st(self)._updateClassesAndMetaclassesCache();
  843. } else {
  844. $1;
  845. };
  846. $2=self["@classesAndMetaclassesCache"];
  847. return $2;
  848. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclassesCache",{},smalltalk.HLReferencesModel)})},
  849. args: [],
  850. source: "classesAndMetaclassesCache\x0a\x09classesAndMetaclassesCache ifNil: [ self updateClassesAndMetaclassesCache ].\x0a\x09\x0a\x09^ classesAndMetaclassesCache",
  851. messageSends: ["ifNil:", "updateClassesAndMetaclassesCache"],
  852. referencedClasses: []
  853. }),
  854. smalltalk.HLReferencesModel);
  855. smalltalk.addMethod(
  856. smalltalk.method({
  857. selector: "implementorsOf:",
  858. category: 'accessing',
  859. fn: function (aString){
  860. var self=this;
  861. return smalltalk.withContext(function($ctx1) {
  862. var $1;
  863. $1=_st(_st(_st(self)._allMethods())._select_((function(each){
  864. return smalltalk.withContext(function($ctx2) {
  865. return _st(_st(each)._selector()).__eq(aString);
  866. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._collect_((function(each){
  867. return smalltalk.withContext(function($ctx2) {
  868. return _st(self)._methodReferenceOn_(each);
  869. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  870. return $1;
  871. }, function($ctx1) {$ctx1.fill(self,"implementorsOf:",{aString:aString},smalltalk.HLReferencesModel)})},
  872. args: ["aString"],
  873. source: "implementorsOf: aString\x0a\x09^ (self allMethods select: [ :each |\x0a\x09\x09each selector = aString ])\x0a\x09\x09\x09collect: [ :each | self methodReferenceOn: each ]",
  874. messageSends: ["collect:", "methodReferenceOn:", "select:", "=", "selector", "allMethods"],
  875. referencedClasses: []
  876. }),
  877. smalltalk.HLReferencesModel);
  878. smalltalk.addMethod(
  879. smalltalk.method({
  880. selector: "isReferencesModel",
  881. category: 'testing',
  882. fn: function (){
  883. var self=this;
  884. return smalltalk.withContext(function($ctx1) {
  885. return true;
  886. }, function($ctx1) {$ctx1.fill(self,"isReferencesModel",{},smalltalk.HLReferencesModel)})},
  887. args: [],
  888. source: "isReferencesModel\x0a\x09^ true",
  889. messageSends: [],
  890. referencedClasses: []
  891. }),
  892. smalltalk.HLReferencesModel);
  893. smalltalk.addMethod(
  894. smalltalk.method({
  895. selector: "methodReferenceOn:",
  896. category: 'accessing',
  897. fn: function (aCompiledMethod){
  898. var self=this;
  899. function $HLMethodReference(){return smalltalk.HLMethodReference||(typeof HLMethodReference=="undefined"?nil:HLMethodReference)}
  900. return smalltalk.withContext(function($ctx1) {
  901. var $1;
  902. $1=_st($HLMethodReference())._on_(aCompiledMethod);
  903. return $1;
  904. }, function($ctx1) {$ctx1.fill(self,"methodReferenceOn:",{aCompiledMethod:aCompiledMethod},smalltalk.HLReferencesModel)})},
  905. args: ["aCompiledMethod"],
  906. source: "methodReferenceOn: aCompiledMethod\x0a\x09^ HLMethodReference on: aCompiledMethod",
  907. messageSends: ["on:"],
  908. referencedClasses: ["HLMethodReference"]
  909. }),
  910. smalltalk.HLReferencesModel);
  911. smalltalk.addMethod(
  912. smalltalk.method({
  913. selector: "methodsCache",
  914. category: 'cache',
  915. fn: function (){
  916. var self=this;
  917. return smalltalk.withContext(function($ctx1) {
  918. var $1,$2;
  919. $1=self["@methodsCache"];
  920. if(($receiver = $1) == nil || $receiver == undefined){
  921. _st(self)._updateMethodsCache();
  922. } else {
  923. $1;
  924. };
  925. $2=self["@methodsCache"];
  926. return $2;
  927. }, function($ctx1) {$ctx1.fill(self,"methodsCache",{},smalltalk.HLReferencesModel)})},
  928. args: [],
  929. source: "methodsCache\x0a\x09methodsCache ifNil: [ self updateMethodsCache ].\x0a\x09\x0a\x09^ methodsCache",
  930. messageSends: ["ifNil:", "updateMethodsCache"],
  931. referencedClasses: []
  932. }),
  933. smalltalk.HLReferencesModel);
  934. smalltalk.addMethod(
  935. smalltalk.method({
  936. selector: "regexpReferencesOf:",
  937. category: 'accessing',
  938. fn: function (aString){
  939. var self=this;
  940. return smalltalk.withContext(function($ctx1) {
  941. var $1;
  942. $1=_st(_st(_st(self)._allMethods())._select_((function(each){
  943. return smalltalk.withContext(function($ctx2) {
  944. return _st(_st(each)._source())._match_(aString);
  945. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._collect_((function(each){
  946. return smalltalk.withContext(function($ctx2) {
  947. return _st(self)._methodReferenceOn_(each);
  948. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  949. return $1;
  950. }, function($ctx1) {$ctx1.fill(self,"regexpReferencesOf:",{aString:aString},smalltalk.HLReferencesModel)})},
  951. args: ["aString"],
  952. source: "regexpReferencesOf: aString\x0a\x09^ (self allMethods select: [ :each |\x0a\x09\x09each source match: aString ])\x0a\x09\x09\x09collect: [ :each | self methodReferenceOn: each ]",
  953. messageSends: ["collect:", "methodReferenceOn:", "select:", "match:", "source", "allMethods"],
  954. referencedClasses: []
  955. }),
  956. smalltalk.HLReferencesModel);
  957. smalltalk.addMethod(
  958. smalltalk.method({
  959. selector: "search:",
  960. category: 'actions',
  961. fn: function (aString){
  962. var self=this;
  963. function $HLSearchReferences(){return smalltalk.HLSearchReferences||(typeof HLSearchReferences=="undefined"?nil:HLSearchReferences)}
  964. return smalltalk.withContext(function($ctx1) {
  965. var $1,$2;
  966. _st(self)._updateCaches();
  967. $1=_st($HLSearchReferences())._new();
  968. _st($1)._searchString_(aString);
  969. $2=_st($1)._yourself();
  970. _st(_st(self)._announcer())._announce_($2);
  971. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.HLReferencesModel)})},
  972. args: ["aString"],
  973. source: "search: aString\x0a\x09self updateCaches.\x0a\x09\x0a\x09self announcer announce: (HLSearchReferences new\x0a\x09\x09searchString: aString;\x0a\x09\x09yourself)",
  974. messageSends: ["updateCaches", "announce:", "searchString:", "new", "yourself", "announcer"],
  975. referencedClasses: ["HLSearchReferences"]
  976. }),
  977. smalltalk.HLReferencesModel);
  978. smalltalk.addMethod(
  979. smalltalk.method({
  980. selector: "sendersOf:",
  981. category: 'accessing',
  982. fn: function (aString){
  983. var self=this;
  984. return smalltalk.withContext(function($ctx1) {
  985. var $1;
  986. $1=_st(_st(_st(self)._allMethods())._select_((function(each){
  987. return smalltalk.withContext(function($ctx2) {
  988. return _st(_st(each)._messageSends())._includes_(aString);
  989. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._collect_((function(each){
  990. return smalltalk.withContext(function($ctx2) {
  991. return _st(self)._methodReferenceOn_(each);
  992. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  993. return $1;
  994. }, function($ctx1) {$ctx1.fill(self,"sendersOf:",{aString:aString},smalltalk.HLReferencesModel)})},
  995. args: ["aString"],
  996. source: "sendersOf: aString\x0a\x09^ (self allMethods select: [ :each |\x0a\x09\x09each messageSends includes: aString ])\x0a\x09\x09\x09collect: [ :each | self methodReferenceOn: each ]",
  997. messageSends: ["collect:", "methodReferenceOn:", "select:", "includes:", "messageSends", "allMethods"],
  998. referencedClasses: []
  999. }),
  1000. smalltalk.HLReferencesModel);
  1001. smalltalk.addMethod(
  1002. smalltalk.method({
  1003. selector: "updateCaches",
  1004. category: 'cache',
  1005. fn: function (){
  1006. var self=this;
  1007. return smalltalk.withContext(function($ctx1) {
  1008. var $1,$2;
  1009. $1=self;
  1010. _st($1)._updateClassesAndMetaclassesCache();
  1011. $2=_st($1)._updateMethodsCache();
  1012. return self}, function($ctx1) {$ctx1.fill(self,"updateCaches",{},smalltalk.HLReferencesModel)})},
  1013. args: [],
  1014. source: "updateCaches\x0a\x09self \x0a\x09\x09updateClassesAndMetaclassesCache;\x0a\x09\x09updateMethodsCache",
  1015. messageSends: ["updateClassesAndMetaclassesCache", "updateMethodsCache"],
  1016. referencedClasses: []
  1017. }),
  1018. smalltalk.HLReferencesModel);
  1019. smalltalk.addMethod(
  1020. smalltalk.method({
  1021. selector: "updateClassesAndMetaclassesCache",
  1022. category: 'cache',
  1023. fn: function (){
  1024. var self=this;
  1025. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  1026. return smalltalk.withContext(function($ctx1) {
  1027. var $1,$2;
  1028. self["@classesAndMetaclassesCache"]=_st(_st(_st(self)._environment())._classes())._inject_into_(_st($OrderedCollection())._new(),(function(acc,each){
  1029. return smalltalk.withContext(function($ctx2) {
  1030. $1=acc;
  1031. _st($1)._add_(each);
  1032. _st($1)._add_(_st(each)._class());
  1033. $2=_st($1)._yourself();
  1034. return $2;
  1035. }, function($ctx2) {$ctx2.fillBlock({acc:acc,each:each},$ctx1)})}));
  1036. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesAndMetaclassesCache",{},smalltalk.HLReferencesModel)})},
  1037. args: [],
  1038. 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 ]",
  1039. messageSends: ["inject:into:", "new", "add:", "class", "yourself", "classes", "environment"],
  1040. referencedClasses: ["OrderedCollection"]
  1041. }),
  1042. smalltalk.HLReferencesModel);
  1043. smalltalk.addMethod(
  1044. smalltalk.method({
  1045. selector: "updateMethodsCache",
  1046. category: 'cache',
  1047. fn: function (){
  1048. var self=this;
  1049. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  1050. return smalltalk.withContext(function($ctx1) {
  1051. self["@methodsCache"]=_st(_st(self)._classesAndMetaclasses())._inject_into_(_st($OrderedCollection())._new(),(function(acc,each){
  1052. return smalltalk.withContext(function($ctx2) {
  1053. return _st(acc).__comma(_st(each)._methods());
  1054. }, function($ctx2) {$ctx2.fillBlock({acc:acc,each:each},$ctx1)})}));
  1055. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsCache",{},smalltalk.HLReferencesModel)})},
  1056. args: [],
  1057. source: "updateMethodsCache\x0a\x09methodsCache := self classesAndMetaclasses\x0a\x09\x09inject: OrderedCollection new\x0a\x09\x09into: [ :acc :each |\x0a\x09\x09\x09acc, each methods ]",
  1058. messageSends: ["inject:into:", "new", ",", "methods", "classesAndMetaclasses"],
  1059. referencedClasses: ["OrderedCollection"]
  1060. }),
  1061. smalltalk.HLReferencesModel);