1
0

Helios-References.js 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112
  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(self._methodClass())._methodAt_(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(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=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_(self._model());
  152. self["@classReferencesListWidget"];
  153. $1=_st(self["@classReferencesListWidget"])._next_(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_(self._model());
  177. self["@implementorsListWidget"];
  178. $1=_st(self["@implementorsListWidget"])._next_(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(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_(self._model());
  244. self["@regexpListWidget"];
  245. $1=_st(self["@regexpListWidget"])._next_(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,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_(self._sendersListWidget(),self._implementorsListWidget()),_st($HLVerticalSplitter())._with_with_(self._classReferencesListWidget(),self._regexpListWidget())),self._sourceCodeWidget())));
  284. _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(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_(self._model());
  319. self["@sendersListWidget"];
  320. $1=_st(self["@sendersListWidget"])._next_(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_(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. return (100);
  412. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLReferences.klass)})},
  413. args: [],
  414. source: "tabPriority\x0a\x09^ 100",
  415. messageSends: [],
  416. referencedClasses: []
  417. }),
  418. smalltalk.HLReferences.klass);
  419. smalltalk.addClass('HLReferencesListWidget', smalltalk.HLToolListWidget, [], 'Helios-References');
  420. smalltalk.addMethod(
  421. smalltalk.method({
  422. selector: "activateListItem:",
  423. category: 'actions',
  424. fn: function (anItem){
  425. var self=this;
  426. return smalltalk.withContext(function($ctx1) {
  427. _st(self._model())._withChangesDo_((function(){
  428. return smalltalk.withContext(function($ctx2) {
  429. return smalltalk.HLToolListWidget.fn.prototype._activateListItem_.apply(_st(self), [anItem]);
  430. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  431. return self}, function($ctx1) {$ctx1.fill(self,"activateListItem:",{anItem:anItem},smalltalk.HLReferencesListWidget)})},
  432. args: ["anItem"],
  433. source: "activateListItem: anItem\x0a\x09self model withChangesDo: [ super activateListItem: anItem ]",
  434. messageSends: ["withChangesDo:", "activateListItem:", "model"],
  435. referencedClasses: []
  436. }),
  437. smalltalk.HLReferencesListWidget);
  438. smalltalk.addMethod(
  439. smalltalk.method({
  440. selector: "commandCategory",
  441. category: 'accessing',
  442. fn: function (){
  443. var self=this;
  444. return smalltalk.withContext(function($ctx1) {
  445. return "Methods";
  446. }, function($ctx1) {$ctx1.fill(self,"commandCategory",{},smalltalk.HLReferencesListWidget)})},
  447. args: [],
  448. source: "commandCategory\x0a\x09^ 'Methods'",
  449. messageSends: [],
  450. referencedClasses: []
  451. }),
  452. smalltalk.HLReferencesListWidget);
  453. smalltalk.addMethod(
  454. smalltalk.method({
  455. selector: "label",
  456. category: 'accessing',
  457. fn: function (){
  458. var self=this;
  459. return smalltalk.withContext(function($ctx1) {
  460. return "List";
  461. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLReferencesListWidget)})},
  462. args: [],
  463. source: "label\x0a\x09^ 'List'",
  464. messageSends: [],
  465. referencedClasses: []
  466. }),
  467. smalltalk.HLReferencesListWidget);
  468. smalltalk.addMethod(
  469. smalltalk.method({
  470. selector: "observeModel",
  471. category: 'actions',
  472. fn: function (){
  473. var self=this;
  474. function $HLSearchReferences(){return smalltalk.HLSearchReferences||(typeof HLSearchReferences=="undefined"?nil:HLSearchReferences)}
  475. function $HLMethodSelected(){return smalltalk.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  476. return smalltalk.withContext(function($ctx1) {
  477. var $1,$2;
  478. $1=_st(self._model())._announcer();
  479. _st($1)._on_do_($HLSearchReferences(),(function(ann){
  480. return smalltalk.withContext(function($ctx2) {
  481. return self._onSearchReferences_(_st(ann)._searchString());
  482. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  483. $2=_st($1)._on_do_($HLMethodSelected(),(function(ann){
  484. return smalltalk.withContext(function($ctx2) {
  485. return self._onMethodSelected_(_st(ann)._item());
  486. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  487. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLReferencesListWidget)})},
  488. args: [],
  489. 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 ]",
  490. messageSends: ["on:do:", "onSearchReferences:", "searchString", "announcer", "model", "onMethodSelected:", "item"],
  491. referencedClasses: ["HLSearchReferences", "HLMethodSelected"]
  492. }),
  493. smalltalk.HLReferencesListWidget);
  494. smalltalk.addMethod(
  495. smalltalk.method({
  496. selector: "onMethodSelected:",
  497. category: 'reactions',
  498. fn: function (aMethod){
  499. var self=this;
  500. return smalltalk.withContext(function($ctx1) {
  501. var $1,$2,$3,$4,$5;
  502. var $early={};
  503. try {
  504. $1=aMethod;
  505. if(($receiver = $1) == nil || $receiver == undefined){
  506. $2=self;
  507. return $2;
  508. } else {
  509. $1;
  510. };
  511. _st(self._items())._detect_ifNone_((function(each){
  512. return smalltalk.withContext(function($ctx2) {
  513. return _st(each).__eq(_st(aMethod)._selector());
  514. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  515. return smalltalk.withContext(function($ctx2) {
  516. $3=self;
  517. throw $early=[$3];
  518. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  519. $4=self;
  520. _st($4)._selectedItem_(_st(aMethod)._selector());
  521. $5=_st($4)._activateItem_(_st(aMethod)._selector());
  522. return self}
  523. catch(e) {if(e===$early)return e[0]; throw e}
  524. }, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aMethod:aMethod},smalltalk.HLReferencesListWidget)})},
  525. args: ["aMethod"],
  526. 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",
  527. messageSends: ["ifNil:", "detect:ifNone:", "=", "selector", "items", "selectedItem:", "activateItem:"],
  528. referencedClasses: []
  529. }),
  530. smalltalk.HLReferencesListWidget);
  531. smalltalk.addMethod(
  532. smalltalk.method({
  533. selector: "onSearchReferences:",
  534. category: 'reactions',
  535. fn: function (aString){
  536. var self=this;
  537. return smalltalk.withContext(function($ctx1) {
  538. self._subclassResponsibility();
  539. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLReferencesListWidget)})},
  540. args: ["aString"],
  541. source: "onSearchReferences: aString\x0a\x09self subclassResponsibility",
  542. messageSends: ["subclassResponsibility"],
  543. referencedClasses: []
  544. }),
  545. smalltalk.HLReferencesListWidget);
  546. smalltalk.addMethod(
  547. smalltalk.method({
  548. selector: "renderItemLabel:on:",
  549. category: 'rendering',
  550. fn: function (aMethod,html){
  551. var self=this;
  552. return smalltalk.withContext(function($ctx1) {
  553. _st(html)._with_(_st(_st(_st(_st(aMethod)._methodClass())._name()).__comma(" >> #")).__comma(_st(aMethod)._selector()));
  554. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aMethod:aMethod,html:html},smalltalk.HLReferencesListWidget)})},
  555. args: ["aMethod", "html"],
  556. source: "renderItemLabel: aMethod on: html\x0a\x09html with: aMethod methodClass name, ' >> #', aMethod selector",
  557. messageSends: ["with:", ",", "selector", "name", "methodClass"],
  558. referencedClasses: []
  559. }),
  560. smalltalk.HLReferencesListWidget);
  561. smalltalk.addMethod(
  562. smalltalk.method({
  563. selector: "selectItem:",
  564. category: 'actions',
  565. fn: function (aMethod){
  566. var self=this;
  567. return smalltalk.withContext(function($ctx1) {
  568. _st(self._model())._selectedMethod_(aMethod);
  569. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aMethod:aMethod},smalltalk.HLReferencesListWidget)})},
  570. args: ["aMethod"],
  571. source: "selectItem: aMethod\x0a\x09self model selectedMethod: aMethod",
  572. messageSends: ["selectedMethod:", "model"],
  573. referencedClasses: []
  574. }),
  575. smalltalk.HLReferencesListWidget);
  576. smalltalk.addMethod(
  577. smalltalk.method({
  578. selector: "on:",
  579. category: 'instance creation',
  580. fn: function (aModel){
  581. var self=this;
  582. return smalltalk.withContext(function($ctx1) {
  583. var $2,$3,$1;
  584. $2=self._new();
  585. _st($2)._model_(aModel);
  586. $3=_st($2)._yourself();
  587. $1=$3;
  588. return $1;
  589. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel},smalltalk.HLReferencesListWidget.klass)})},
  590. args: ["aModel"],
  591. source: "on: aModel\x0a\x09^ self new \x0a\x09\x09model: aModel; \x0a\x09\x09yourself",
  592. messageSends: ["model:", "new", "yourself"],
  593. referencedClasses: []
  594. }),
  595. smalltalk.HLReferencesListWidget.klass);
  596. smalltalk.addClass('HLClassReferencesListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  597. smalltalk.addMethod(
  598. smalltalk.method({
  599. selector: "label",
  600. category: 'accessing',
  601. fn: function (){
  602. var self=this;
  603. return smalltalk.withContext(function($ctx1) {
  604. return "Class references";
  605. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLClassReferencesListWidget)})},
  606. args: [],
  607. source: "label\x0a\x09^ 'Class references'",
  608. messageSends: [],
  609. referencedClasses: []
  610. }),
  611. smalltalk.HLClassReferencesListWidget);
  612. smalltalk.addMethod(
  613. smalltalk.method({
  614. selector: "onSearchReferences:",
  615. category: 'reactions',
  616. fn: function (aString){
  617. var self=this;
  618. return smalltalk.withContext(function($ctx1) {
  619. self._selectItem_(nil);
  620. self._items_(_st(self._model())._classReferencesOf_(aString));
  621. self._refresh();
  622. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLClassReferencesListWidget)})},
  623. args: ["aString"],
  624. source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model classReferencesOf: aString).\x0a\x09self refresh",
  625. messageSends: ["selectItem:", "items:", "classReferencesOf:", "model", "refresh"],
  626. referencedClasses: []
  627. }),
  628. smalltalk.HLClassReferencesListWidget);
  629. smalltalk.addClass('HLImplementorsListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  630. smalltalk.addMethod(
  631. smalltalk.method({
  632. selector: "label",
  633. category: 'accessing',
  634. fn: function (){
  635. var self=this;
  636. return smalltalk.withContext(function($ctx1) {
  637. return "Implementors";
  638. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLImplementorsListWidget)})},
  639. args: [],
  640. source: "label\x0a\x09^ 'Implementors'",
  641. messageSends: [],
  642. referencedClasses: []
  643. }),
  644. smalltalk.HLImplementorsListWidget);
  645. smalltalk.addMethod(
  646. smalltalk.method({
  647. selector: "onSearchReferences:",
  648. category: 'reactions',
  649. fn: function (aString){
  650. var self=this;
  651. return smalltalk.withContext(function($ctx1) {
  652. self._selectItem_(nil);
  653. self._items_(_st(self._model())._implementorsOf_(aString));
  654. self._refresh();
  655. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLImplementorsListWidget)})},
  656. args: ["aString"],
  657. source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model implementorsOf: aString).\x0a\x09self refresh",
  658. messageSends: ["selectItem:", "items:", "implementorsOf:", "model", "refresh"],
  659. referencedClasses: []
  660. }),
  661. smalltalk.HLImplementorsListWidget);
  662. smalltalk.addClass('HLRegexpListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  663. smalltalk.addMethod(
  664. smalltalk.method({
  665. selector: "label",
  666. category: 'accessing',
  667. fn: function (){
  668. var self=this;
  669. return smalltalk.withContext(function($ctx1) {
  670. return "Source search";
  671. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRegexpListWidget)})},
  672. args: [],
  673. source: "label\x0a\x09^ 'Source search'",
  674. messageSends: [],
  675. referencedClasses: []
  676. }),
  677. smalltalk.HLRegexpListWidget);
  678. smalltalk.addMethod(
  679. smalltalk.method({
  680. selector: "onSearchReferences:",
  681. category: 'reactions',
  682. fn: function (aString){
  683. var self=this;
  684. return smalltalk.withContext(function($ctx1) {
  685. self._selectItem_(nil);
  686. self._items_(_st(self._model())._regexpReferencesOf_(aString));
  687. self._refresh();
  688. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLRegexpListWidget)})},
  689. args: ["aString"],
  690. source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model regexpReferencesOf: aString).\x0a\x09self refresh",
  691. messageSends: ["selectItem:", "items:", "regexpReferencesOf:", "model", "refresh"],
  692. referencedClasses: []
  693. }),
  694. smalltalk.HLRegexpListWidget);
  695. smalltalk.addClass('HLSendersListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  696. smalltalk.addMethod(
  697. smalltalk.method({
  698. selector: "label",
  699. category: 'accessing',
  700. fn: function (){
  701. var self=this;
  702. return smalltalk.withContext(function($ctx1) {
  703. return "Senders";
  704. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLSendersListWidget)})},
  705. args: [],
  706. source: "label\x0a\x09^ 'Senders'",
  707. messageSends: [],
  708. referencedClasses: []
  709. }),
  710. smalltalk.HLSendersListWidget);
  711. smalltalk.addMethod(
  712. smalltalk.method({
  713. selector: "onSearchReferences:",
  714. category: 'reactions',
  715. fn: function (aString){
  716. var self=this;
  717. return smalltalk.withContext(function($ctx1) {
  718. self._selectItem_(nil);
  719. self._items_(_st(self._model())._sendersOf_(aString));
  720. self._refresh();
  721. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLSendersListWidget)})},
  722. args: ["aString"],
  723. source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model sendersOf: aString).\x0a\x09self refresh",
  724. messageSends: ["selectItem:", "items:", "sendersOf:", "model", "refresh"],
  725. referencedClasses: []
  726. }),
  727. smalltalk.HLSendersListWidget);
  728. smalltalk.addClass('HLReferencesModel', smalltalk.HLToolModel, ['methodsCache', 'classesAndMetaclassesCache'], 'Helios-References');
  729. smalltalk.addMethod(
  730. smalltalk.method({
  731. selector: "allMethods",
  732. category: 'accessing',
  733. fn: function (){
  734. var self=this;
  735. return smalltalk.withContext(function($ctx1) {
  736. var $1;
  737. $1=self._methodsCache();
  738. return $1;
  739. }, function($ctx1) {$ctx1.fill(self,"allMethods",{},smalltalk.HLReferencesModel)})},
  740. args: [],
  741. source: "allMethods\x0a\x09^ self methodsCache",
  742. messageSends: ["methodsCache"],
  743. referencedClasses: []
  744. }),
  745. smalltalk.HLReferencesModel);
  746. smalltalk.addMethod(
  747. smalltalk.method({
  748. selector: "allSelectors",
  749. category: 'accessing',
  750. fn: function (){
  751. var self=this;
  752. return smalltalk.withContext(function($ctx1) {
  753. var $1;
  754. $1=_st(_st(self._allMethods())._collect_((function(each){
  755. return smalltalk.withContext(function($ctx2) {
  756. return _st(each)._selector();
  757. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet();
  758. return $1;
  759. }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.HLReferencesModel)})},
  760. args: [],
  761. source: "allSelectors\x0a\x09^ (self allMethods \x0a\x09\x09collect: [ :each | each selector ])\x0a\x09\x09asSet",
  762. messageSends: ["asSet", "collect:", "selector", "allMethods"],
  763. referencedClasses: []
  764. }),
  765. smalltalk.HLReferencesModel);
  766. smalltalk.addMethod(
  767. smalltalk.method({
  768. selector: "classReferencesOf:",
  769. category: 'accessing',
  770. fn: function (aString){
  771. var self=this;
  772. var references;
  773. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  774. return smalltalk.withContext(function($ctx1) {
  775. var $1,$2;
  776. references=_st($OrderedCollection())._new();
  777. _st(self._classesAndMetaclasses())._do_((function(each){
  778. return smalltalk.withContext(function($ctx2) {
  779. return _st(_st(_st(each)._methodDictionary())._values())._do_((function(method){
  780. return smalltalk.withContext(function($ctx3) {
  781. $1=_st(_st(method)._referencedClasses())._includes_(aString);
  782. if(smalltalk.assert($1)){
  783. return _st(references)._add_(method);
  784. };
  785. }, function($ctx3) {$ctx3.fillBlock({method:method},$ctx2)})}));
  786. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  787. $2=references;
  788. return $2;
  789. }, function($ctx1) {$ctx1.fill(self,"classReferencesOf:",{aString:aString,references:references},smalltalk.HLReferencesModel)})},
  790. args: ["aString"],
  791. 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",
  792. messageSends: ["new", "do:", "ifTrue:", "add:", "includes:", "referencedClasses", "values", "methodDictionary", "classesAndMetaclasses"],
  793. referencedClasses: ["OrderedCollection"]
  794. }),
  795. smalltalk.HLReferencesModel);
  796. smalltalk.addMethod(
  797. smalltalk.method({
  798. selector: "classesAndMetaclasses",
  799. category: 'accessing',
  800. fn: function (){
  801. var self=this;
  802. return smalltalk.withContext(function($ctx1) {
  803. var $1;
  804. $1=self._classesAndMetaclassesCache();
  805. return $1;
  806. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},smalltalk.HLReferencesModel)})},
  807. args: [],
  808. source: "classesAndMetaclasses\x0a\x09^ self classesAndMetaclassesCache",
  809. messageSends: ["classesAndMetaclassesCache"],
  810. referencedClasses: []
  811. }),
  812. smalltalk.HLReferencesModel);
  813. smalltalk.addMethod(
  814. smalltalk.method({
  815. selector: "classesAndMetaclassesCache",
  816. category: 'cache',
  817. fn: function (){
  818. var self=this;
  819. return smalltalk.withContext(function($ctx1) {
  820. var $1,$2;
  821. $1=self["@classesAndMetaclassesCache"];
  822. if(($receiver = $1) == nil || $receiver == undefined){
  823. self._updateClassesAndMetaclassesCache();
  824. } else {
  825. $1;
  826. };
  827. $2=self["@classesAndMetaclassesCache"];
  828. return $2;
  829. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclassesCache",{},smalltalk.HLReferencesModel)})},
  830. args: [],
  831. source: "classesAndMetaclassesCache\x0a\x09classesAndMetaclassesCache ifNil: [ self updateClassesAndMetaclassesCache ].\x0a\x09\x0a\x09^ classesAndMetaclassesCache",
  832. messageSends: ["ifNil:", "updateClassesAndMetaclassesCache"],
  833. referencedClasses: []
  834. }),
  835. smalltalk.HLReferencesModel);
  836. smalltalk.addMethod(
  837. smalltalk.method({
  838. selector: "implementorsOf:",
  839. category: 'accessing',
  840. fn: function (aString){
  841. var self=this;
  842. return smalltalk.withContext(function($ctx1) {
  843. var $1;
  844. $1=_st(_st(self._allMethods())._select_((function(each){
  845. return smalltalk.withContext(function($ctx2) {
  846. return _st(_st(each)._selector()).__eq(aString);
  847. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._collect_((function(each){
  848. return smalltalk.withContext(function($ctx2) {
  849. return self._methodReferenceOn_(each);
  850. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  851. return $1;
  852. }, function($ctx1) {$ctx1.fill(self,"implementorsOf:",{aString:aString},smalltalk.HLReferencesModel)})},
  853. args: ["aString"],
  854. source: "implementorsOf: aString\x0a\x09^ (self allMethods select: [ :each |\x0a\x09\x09each selector = aString ])\x0a\x09\x09\x09collect: [ :each | self methodReferenceOn: each ]",
  855. messageSends: ["collect:", "methodReferenceOn:", "select:", "=", "selector", "allMethods"],
  856. referencedClasses: []
  857. }),
  858. smalltalk.HLReferencesModel);
  859. smalltalk.addMethod(
  860. smalltalk.method({
  861. selector: "isReferencesModel",
  862. category: 'testing',
  863. fn: function (){
  864. var self=this;
  865. return smalltalk.withContext(function($ctx1) {
  866. return true;
  867. }, function($ctx1) {$ctx1.fill(self,"isReferencesModel",{},smalltalk.HLReferencesModel)})},
  868. args: [],
  869. source: "isReferencesModel\x0a\x09^ true",
  870. messageSends: [],
  871. referencedClasses: []
  872. }),
  873. smalltalk.HLReferencesModel);
  874. smalltalk.addMethod(
  875. smalltalk.method({
  876. selector: "methodReferenceOn:",
  877. category: 'accessing',
  878. fn: function (aCompiledMethod){
  879. var self=this;
  880. function $HLMethodReference(){return smalltalk.HLMethodReference||(typeof HLMethodReference=="undefined"?nil:HLMethodReference)}
  881. return smalltalk.withContext(function($ctx1) {
  882. var $1;
  883. $1=_st($HLMethodReference())._on_(aCompiledMethod);
  884. return $1;
  885. }, function($ctx1) {$ctx1.fill(self,"methodReferenceOn:",{aCompiledMethod:aCompiledMethod},smalltalk.HLReferencesModel)})},
  886. args: ["aCompiledMethod"],
  887. source: "methodReferenceOn: aCompiledMethod\x0a\x09^ HLMethodReference on: aCompiledMethod",
  888. messageSends: ["on:"],
  889. referencedClasses: ["HLMethodReference"]
  890. }),
  891. smalltalk.HLReferencesModel);
  892. smalltalk.addMethod(
  893. smalltalk.method({
  894. selector: "methodsCache",
  895. category: 'cache',
  896. fn: function (){
  897. var self=this;
  898. return smalltalk.withContext(function($ctx1) {
  899. var $1,$2;
  900. $1=self["@methodsCache"];
  901. if(($receiver = $1) == nil || $receiver == undefined){
  902. self._updateMethodsCache();
  903. } else {
  904. $1;
  905. };
  906. $2=self["@methodsCache"];
  907. return $2;
  908. }, function($ctx1) {$ctx1.fill(self,"methodsCache",{},smalltalk.HLReferencesModel)})},
  909. args: [],
  910. source: "methodsCache\x0a\x09methodsCache ifNil: [ self updateMethodsCache ].\x0a\x09\x0a\x09^ methodsCache",
  911. messageSends: ["ifNil:", "updateMethodsCache"],
  912. referencedClasses: []
  913. }),
  914. smalltalk.HLReferencesModel);
  915. smalltalk.addMethod(
  916. smalltalk.method({
  917. selector: "regexpReferencesOf:",
  918. category: 'accessing',
  919. fn: function (aString){
  920. var self=this;
  921. return smalltalk.withContext(function($ctx1) {
  922. var $1;
  923. $1=_st(_st(self._allMethods())._select_((function(each){
  924. return smalltalk.withContext(function($ctx2) {
  925. return _st(_st(each)._source())._match_(aString);
  926. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._collect_((function(each){
  927. return smalltalk.withContext(function($ctx2) {
  928. return self._methodReferenceOn_(each);
  929. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  930. return $1;
  931. }, function($ctx1) {$ctx1.fill(self,"regexpReferencesOf:",{aString:aString},smalltalk.HLReferencesModel)})},
  932. args: ["aString"],
  933. source: "regexpReferencesOf: aString\x0a\x09^ (self allMethods select: [ :each |\x0a\x09\x09each source match: aString ])\x0a\x09\x09\x09collect: [ :each | self methodReferenceOn: each ]",
  934. messageSends: ["collect:", "methodReferenceOn:", "select:", "match:", "source", "allMethods"],
  935. referencedClasses: []
  936. }),
  937. smalltalk.HLReferencesModel);
  938. smalltalk.addMethod(
  939. smalltalk.method({
  940. selector: "search:",
  941. category: 'actions',
  942. fn: function (aString){
  943. var self=this;
  944. function $HLSearchReferences(){return smalltalk.HLSearchReferences||(typeof HLSearchReferences=="undefined"?nil:HLSearchReferences)}
  945. return smalltalk.withContext(function($ctx1) {
  946. var $1,$2;
  947. self._updateCaches();
  948. $1=_st($HLSearchReferences())._new();
  949. _st($1)._searchString_(aString);
  950. $2=_st($1)._yourself();
  951. _st(self._announcer())._announce_($2);
  952. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.HLReferencesModel)})},
  953. args: ["aString"],
  954. source: "search: aString\x0a\x09self updateCaches.\x0a\x09\x0a\x09self announcer announce: (HLSearchReferences new\x0a\x09\x09searchString: aString;\x0a\x09\x09yourself)",
  955. messageSends: ["updateCaches", "announce:", "searchString:", "new", "yourself", "announcer"],
  956. referencedClasses: ["HLSearchReferences"]
  957. }),
  958. smalltalk.HLReferencesModel);
  959. smalltalk.addMethod(
  960. smalltalk.method({
  961. selector: "sendersOf:",
  962. category: 'accessing',
  963. fn: function (aString){
  964. var self=this;
  965. return smalltalk.withContext(function($ctx1) {
  966. var $1;
  967. $1=_st(_st(self._allMethods())._select_((function(each){
  968. return smalltalk.withContext(function($ctx2) {
  969. return _st(_st(each)._messageSends())._includes_(aString);
  970. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._collect_((function(each){
  971. return smalltalk.withContext(function($ctx2) {
  972. return self._methodReferenceOn_(each);
  973. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  974. return $1;
  975. }, function($ctx1) {$ctx1.fill(self,"sendersOf:",{aString:aString},smalltalk.HLReferencesModel)})},
  976. args: ["aString"],
  977. source: "sendersOf: aString\x0a\x09^ (self allMethods select: [ :each |\x0a\x09\x09each messageSends includes: aString ])\x0a\x09\x09\x09collect: [ :each | self methodReferenceOn: each ]",
  978. messageSends: ["collect:", "methodReferenceOn:", "select:", "includes:", "messageSends", "allMethods"],
  979. referencedClasses: []
  980. }),
  981. smalltalk.HLReferencesModel);
  982. smalltalk.addMethod(
  983. smalltalk.method({
  984. selector: "updateCaches",
  985. category: 'cache',
  986. fn: function (){
  987. var self=this;
  988. return smalltalk.withContext(function($ctx1) {
  989. var $1,$2;
  990. $1=self;
  991. _st($1)._updateClassesAndMetaclassesCache();
  992. $2=_st($1)._updateMethodsCache();
  993. return self}, function($ctx1) {$ctx1.fill(self,"updateCaches",{},smalltalk.HLReferencesModel)})},
  994. args: [],
  995. source: "updateCaches\x0a\x09self \x0a\x09\x09updateClassesAndMetaclassesCache;\x0a\x09\x09updateMethodsCache",
  996. messageSends: ["updateClassesAndMetaclassesCache", "updateMethodsCache"],
  997. referencedClasses: []
  998. }),
  999. smalltalk.HLReferencesModel);
  1000. smalltalk.addMethod(
  1001. smalltalk.method({
  1002. selector: "updateClassesAndMetaclassesCache",
  1003. category: 'cache',
  1004. fn: function (){
  1005. var self=this;
  1006. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  1007. return smalltalk.withContext(function($ctx1) {
  1008. var $1,$2;
  1009. self["@classesAndMetaclassesCache"]=_st(_st(self._environment())._classes())._inject_into_(_st($OrderedCollection())._new(),(function(acc,each){
  1010. return smalltalk.withContext(function($ctx2) {
  1011. $1=acc;
  1012. _st($1)._add_(each);
  1013. _st($1)._add_(_st(each)._class());
  1014. $2=_st($1)._yourself();
  1015. return $2;
  1016. }, function($ctx2) {$ctx2.fillBlock({acc:acc,each:each},$ctx1)})}));
  1017. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesAndMetaclassesCache",{},smalltalk.HLReferencesModel)})},
  1018. args: [],
  1019. 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 ]",
  1020. messageSends: ["inject:into:", "new", "add:", "class", "yourself", "classes", "environment"],
  1021. referencedClasses: ["OrderedCollection"]
  1022. }),
  1023. smalltalk.HLReferencesModel);
  1024. smalltalk.addMethod(
  1025. smalltalk.method({
  1026. selector: "updateMethodsCache",
  1027. category: 'cache',
  1028. fn: function (){
  1029. var self=this;
  1030. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  1031. return smalltalk.withContext(function($ctx1) {
  1032. self["@methodsCache"]=_st(self._classesAndMetaclasses())._inject_into_(_st($OrderedCollection())._new(),(function(acc,each){
  1033. return smalltalk.withContext(function($ctx2) {
  1034. return _st(acc).__comma(_st(each)._methods());
  1035. }, function($ctx2) {$ctx2.fillBlock({acc:acc,each:each},$ctx1)})}));
  1036. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsCache",{},smalltalk.HLReferencesModel)})},
  1037. args: [],
  1038. source: "updateMethodsCache\x0a\x09methodsCache := self classesAndMetaclasses\x0a\x09\x09inject: OrderedCollection new\x0a\x09\x09into: [ :acc :each |\x0a\x09\x09\x09acc, each methods ]",
  1039. messageSends: ["inject:into:", "new", ",", "methods", "classesAndMetaclasses"],
  1040. referencedClasses: ["OrderedCollection"]
  1041. }),
  1042. smalltalk.HLReferencesModel);