Helios-References.js 41 KB

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