2
0

Helios-References.js 39 KB

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