1
0

Helios-References.js 39 KB

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