1
0

Helios-References.js 39 KB

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