Helios-References.js 40 KB

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