1
0

Helios-References.js 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883
  1. smalltalk.addPackage('Helios-References');
  2. smalltalk.addClass('HLReferences', smalltalk.HLWidget, ['model', 'sendersListWidget', 'implementorsListWidget', 'classReferencesListWidget', 'regexpListWidget', 'sourceCodeWidget'], 'Helios-References');
  3. smalltalk.addMethod(
  4. smalltalk.method({
  5. selector: "classReferencesListWidget",
  6. category: 'accessing',
  7. fn: function (){
  8. var self=this;
  9. function $HLClassReferencesListWidget(){return smalltalk.HLClassReferencesListWidget||(typeof HLClassReferencesListWidget=="undefined"?nil:HLClassReferencesListWidget)}
  10. return smalltalk.withContext(function($ctx1) {
  11. var $2,$1;
  12. $2=self["@classReferencesListWidget"];
  13. if(($receiver = $2) == nil || $receiver == undefined){
  14. self["@classReferencesListWidget"]=_st($HLClassReferencesListWidget())._on_(_st(self)._model());
  15. self["@classReferencesListWidget"];
  16. $1=_st(self["@classReferencesListWidget"])._next_(_st(self)._regexpListWidget());
  17. } else {
  18. $1=$2;
  19. };
  20. return $1;
  21. }, function($ctx1) {$ctx1.fill(self,"classReferencesListWidget",{},smalltalk.HLReferences)})},
  22. args: [],
  23. source: "classReferencesListWidget\x0a\x09^ classReferencesListWidget ifNil: [\x0a \x09classReferencesListWidget := HLClassReferencesListWidget on: self model.\x0a\x09\x09classReferencesListWidget next: self regexpListWidget ]",
  24. messageSends: ["ifNil:", "on:", "model", "next:", "regexpListWidget"],
  25. referencedClasses: ["HLClassReferencesListWidget"]
  26. }),
  27. smalltalk.HLReferences);
  28. smalltalk.addMethod(
  29. smalltalk.method({
  30. selector: "implementorsListWidget",
  31. category: 'accessing',
  32. fn: function (){
  33. var self=this;
  34. function $HLImplementorsListWidget(){return smalltalk.HLImplementorsListWidget||(typeof HLImplementorsListWidget=="undefined"?nil:HLImplementorsListWidget)}
  35. return smalltalk.withContext(function($ctx1) {
  36. var $2,$1;
  37. $2=self["@implementorsListWidget"];
  38. if(($receiver = $2) == nil || $receiver == undefined){
  39. self["@implementorsListWidget"]=_st($HLImplementorsListWidget())._on_(_st(self)._model());
  40. self["@implementorsListWidget"];
  41. $1=_st(self["@implementorsListWidget"])._next_(_st(self)._classReferencesListWidget());
  42. } else {
  43. $1=$2;
  44. };
  45. return $1;
  46. }, function($ctx1) {$ctx1.fill(self,"implementorsListWidget",{},smalltalk.HLReferences)})},
  47. args: [],
  48. source: "implementorsListWidget\x0a\x09^ implementorsListWidget ifNil: [\x0a \x09implementorsListWidget := HLImplementorsListWidget on: self model.\x0a\x09\x09implementorsListWidget next: self classReferencesListWidget ]",
  49. messageSends: ["ifNil:", "on:", "model", "next:", "classReferencesListWidget"],
  50. referencedClasses: ["HLImplementorsListWidget"]
  51. }),
  52. smalltalk.HLReferences);
  53. smalltalk.addMethod(
  54. smalltalk.method({
  55. selector: "model",
  56. category: 'accessing',
  57. fn: function (){
  58. var self=this;
  59. function $HLReferencesModel(){return smalltalk.HLReferencesModel||(typeof HLReferencesModel=="undefined"?nil:HLReferencesModel)}
  60. return smalltalk.withContext(function($ctx1) {
  61. var $2,$3,$4,$1;
  62. $2=self["@model"];
  63. if(($receiver = $2) == nil || $receiver == undefined){
  64. $3=_st($HLReferencesModel())._new();
  65. _st($3)._environment_(_st(_st(self)._manager())._environment());
  66. $4=_st($3)._yourself();
  67. self["@model"]=$4;
  68. $1=self["@model"];
  69. } else {
  70. $1=$2;
  71. };
  72. return $1;
  73. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLReferences)})},
  74. args: [],
  75. source: "model\x0a\x09^ model ifNil: [\x0a\x09\x09model := (HLReferencesModel new\x0a\x09\x09\x09environment: self manager environment;\x0a\x09\x09\x09yourself) ]",
  76. messageSends: ["ifNil:", "environment:", "environment", "manager", "new", "yourself"],
  77. referencedClasses: ["HLReferencesModel"]
  78. }),
  79. smalltalk.HLReferences);
  80. smalltalk.addMethod(
  81. smalltalk.method({
  82. selector: "model:",
  83. category: 'accessing',
  84. fn: function (aModel){
  85. var self=this;
  86. return smalltalk.withContext(function($ctx1) {
  87. self["@model"]=aModel;
  88. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLReferences)})},
  89. args: ["aModel"],
  90. source: "model: aModel\x0a\x09model := aModel",
  91. messageSends: [],
  92. referencedClasses: []
  93. }),
  94. smalltalk.HLReferences);
  95. smalltalk.addMethod(
  96. smalltalk.method({
  97. selector: "open",
  98. category: 'actions',
  99. fn: function (){
  100. var self=this;
  101. function $HLTab(){return smalltalk.HLTab||(typeof HLTab=="undefined"?nil:HLTab)}
  102. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  103. return smalltalk.withContext(function($ctx1) {
  104. _st(_st($HLManager())._current())._addTab_(_st($HLTab())._on_labelled_(self,_st(_st(self)._class())._tabLabel()));
  105. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.HLReferences)})},
  106. args: [],
  107. source: "open\x0a\x09HLManager current addTab: (HLTab on: self labelled: self class tabLabel)",
  108. messageSends: ["addTab:", "on:labelled:", "tabLabel", "class", "current"],
  109. referencedClasses: ["HLTab", "HLManager"]
  110. }),
  111. smalltalk.HLReferences);
  112. smalltalk.addMethod(
  113. smalltalk.method({
  114. selector: "regexpListWidget",
  115. category: 'accessing',
  116. fn: function (){
  117. var self=this;
  118. function $HLRegexpListWidget(){return smalltalk.HLRegexpListWidget||(typeof HLRegexpListWidget=="undefined"?nil:HLRegexpListWidget)}
  119. return smalltalk.withContext(function($ctx1) {
  120. var $2,$1;
  121. $2=self["@regexpListWidget"];
  122. if(($receiver = $2) == nil || $receiver == undefined){
  123. self["@regexpListWidget"]=_st($HLRegexpListWidget())._on_(_st(self)._model());
  124. self["@regexpListWidget"];
  125. $1=_st(self["@regexpListWidget"])._next_(_st(self)._sourceCodeWidget());
  126. } else {
  127. $1=$2;
  128. };
  129. return $1;
  130. }, function($ctx1) {$ctx1.fill(self,"regexpListWidget",{},smalltalk.HLReferences)})},
  131. args: [],
  132. source: "regexpListWidget\x0a\x09^ regexpListWidget ifNil: [\x0a \x09regexpListWidget := HLRegexpListWidget on: self model.\x0a\x09\x09regexpListWidget next: self sourceCodeWidget ]",
  133. messageSends: ["ifNil:", "on:", "model", "next:", "sourceCodeWidget"],
  134. referencedClasses: ["HLRegexpListWidget"]
  135. }),
  136. smalltalk.HLReferences);
  137. smalltalk.addMethod(
  138. smalltalk.method({
  139. selector: "renderContentOn:",
  140. category: 'rendering',
  141. fn: function (html){
  142. var self=this;
  143. function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  144. function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  145. function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  146. return smalltalk.withContext(function($ctx1) {
  147. _st(html)._with_(_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(_st(self)._sendersListWidget(),_st(self)._implementorsListWidget()),_st($HLVerticalSplitter())._with_with_(_st(self)._classReferencesListWidget(),_st(self)._regexpListWidget())),_st(self)._sourceCodeWidget())));
  148. _st(_st(self)._sendersListWidget())._focus();
  149. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLReferences)})},
  150. args: ["html"],
  151. 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",
  152. messageSends: ["with:", "with:with:", "sendersListWidget", "implementorsListWidget", "classReferencesListWidget", "regexpListWidget", "sourceCodeWidget", "focus"],
  153. referencedClasses: ["HLVerticalSplitter", "HLHorizontalSplitter", "HLContainer"]
  154. }),
  155. smalltalk.HLReferences);
  156. smalltalk.addMethod(
  157. smalltalk.method({
  158. selector: "search:",
  159. category: 'actions',
  160. fn: function (aString){
  161. var self=this;
  162. return smalltalk.withContext(function($ctx1) {
  163. _st(_st(self)._model())._search_(aString);
  164. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.HLReferences)})},
  165. args: ["aString"],
  166. source: "search: aString\x0a\x09self model search: aString",
  167. messageSends: ["search:", "model"],
  168. referencedClasses: []
  169. }),
  170. smalltalk.HLReferences);
  171. smalltalk.addMethod(
  172. smalltalk.method({
  173. selector: "sendersListWidget",
  174. category: 'accessing',
  175. fn: function (){
  176. var self=this;
  177. function $HLSendersListWidget(){return smalltalk.HLSendersListWidget||(typeof HLSendersListWidget=="undefined"?nil:HLSendersListWidget)}
  178. return smalltalk.withContext(function($ctx1) {
  179. var $2,$1;
  180. $2=self["@sendersListWidget"];
  181. if(($receiver = $2) == nil || $receiver == undefined){
  182. self["@sendersListWidget"]=_st($HLSendersListWidget())._on_(_st(self)._model());
  183. self["@sendersListWidget"];
  184. $1=_st(self["@sendersListWidget"])._next_(_st(self)._implementorsListWidget());
  185. } else {
  186. $1=$2;
  187. };
  188. return $1;
  189. }, function($ctx1) {$ctx1.fill(self,"sendersListWidget",{},smalltalk.HLReferences)})},
  190. args: [],
  191. source: "sendersListWidget\x0a\x09^ sendersListWidget ifNil: [\x0a \x09sendersListWidget := HLSendersListWidget on: self model.\x0a\x09\x09sendersListWidget next: self implementorsListWidget ]",
  192. messageSends: ["ifNil:", "on:", "model", "next:", "implementorsListWidget"],
  193. referencedClasses: ["HLSendersListWidget"]
  194. }),
  195. smalltalk.HLReferences);
  196. smalltalk.addMethod(
  197. smalltalk.method({
  198. selector: "sourceCodeWidget",
  199. category: 'accessing',
  200. fn: function (){
  201. var self=this;
  202. function $HLNavigationCodeWidget(){return smalltalk.HLNavigationCodeWidget||(typeof HLNavigationCodeWidget=="undefined"?nil:HLNavigationCodeWidget)}
  203. return smalltalk.withContext(function($ctx1) {
  204. var $2,$1;
  205. $2=self["@sourceCodeWidget"];
  206. if(($receiver = $2) == nil || $receiver == undefined){
  207. self["@sourceCodeWidget"]=_st($HLNavigationCodeWidget())._new();
  208. $1=self["@sourceCodeWidget"];
  209. } else {
  210. $1=$2;
  211. };
  212. return $1;
  213. }, function($ctx1) {$ctx1.fill(self,"sourceCodeWidget",{},smalltalk.HLReferences)})},
  214. args: [],
  215. source: "sourceCodeWidget\x0a\x09^ sourceCodeWidget ifNil: [\x0a \x09sourceCodeWidget := HLNavigationCodeWidget new ]",
  216. messageSends: ["ifNil:", "new"],
  217. referencedClasses: ["HLNavigationCodeWidget"]
  218. }),
  219. smalltalk.HLReferences);
  220. smalltalk.addMethod(
  221. smalltalk.method({
  222. selector: "canBeOpenAsTab",
  223. category: 'testing',
  224. fn: function (){
  225. var self=this;
  226. return smalltalk.withContext(function($ctx1) {
  227. return false;
  228. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLReferences.klass)})},
  229. args: [],
  230. source: "canBeOpenAsTab\x0a\x09^ false",
  231. messageSends: [],
  232. referencedClasses: []
  233. }),
  234. smalltalk.HLReferences.klass);
  235. smalltalk.addMethod(
  236. smalltalk.method({
  237. selector: "tabLabel",
  238. category: 'accessing',
  239. fn: function (){
  240. var self=this;
  241. return smalltalk.withContext(function($ctx1) {
  242. return "References";
  243. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLReferences.klass)})},
  244. args: [],
  245. source: "tabLabel\x0a\x09^ 'References'",
  246. messageSends: [],
  247. referencedClasses: []
  248. }),
  249. smalltalk.HLReferences.klass);
  250. smalltalk.addMethod(
  251. smalltalk.method({
  252. selector: "tabPriority",
  253. category: 'accessing',
  254. fn: function (){
  255. var self=this;
  256. return smalltalk.withContext(function($ctx1) {
  257. var $1;
  258. $1=(100);
  259. return $1;
  260. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLReferences.klass)})},
  261. args: [],
  262. source: "tabPriority\x0a\x09^ 100",
  263. messageSends: [],
  264. referencedClasses: []
  265. }),
  266. smalltalk.HLReferences.klass);
  267. smalltalk.addClass('HLReferencesListWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-References');
  268. smalltalk.addMethod(
  269. smalltalk.method({
  270. selector: "label",
  271. category: 'accessing',
  272. fn: function (){
  273. var self=this;
  274. return smalltalk.withContext(function($ctx1) {
  275. return "List";
  276. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLReferencesListWidget)})},
  277. args: [],
  278. source: "label\x0a\x09^ 'List'",
  279. messageSends: [],
  280. referencedClasses: []
  281. }),
  282. smalltalk.HLReferencesListWidget);
  283. smalltalk.addMethod(
  284. smalltalk.method({
  285. selector: "model",
  286. category: 'accessing',
  287. fn: function (){
  288. var self=this;
  289. return smalltalk.withContext(function($ctx1) {
  290. var $1;
  291. $1=self["@model"];
  292. return $1;
  293. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLReferencesListWidget)})},
  294. args: [],
  295. source: "model\x0a\x09^ model",
  296. messageSends: [],
  297. referencedClasses: []
  298. }),
  299. smalltalk.HLReferencesListWidget);
  300. smalltalk.addMethod(
  301. smalltalk.method({
  302. selector: "model:",
  303. category: 'accessing',
  304. fn: function (aModel){
  305. var self=this;
  306. return smalltalk.withContext(function($ctx1) {
  307. self["@model"]=aModel;
  308. _st(self)._observeModel();
  309. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLReferencesListWidget)})},
  310. args: ["aModel"],
  311. source: "model: aModel\x0a\x09model := aModel.\x0a\x09\x0a\x09self observeModel",
  312. messageSends: ["observeModel"],
  313. referencedClasses: []
  314. }),
  315. smalltalk.HLReferencesListWidget);
  316. smalltalk.addMethod(
  317. smalltalk.method({
  318. selector: "observeModel",
  319. category: 'actions',
  320. fn: function (){
  321. var self=this;
  322. function $HLSearchReferences(){return smalltalk.HLSearchReferences||(typeof HLSearchReferences=="undefined"?nil:HLSearchReferences)}
  323. return smalltalk.withContext(function($ctx1) {
  324. _st(_st(_st(self)._model())._announcer())._on_do_($HLSearchReferences(),(function(ann){
  325. return smalltalk.withContext(function($ctx2) {
  326. return _st(self)._onSearchReferences_(_st(ann)._searchString());
  327. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  328. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLReferencesListWidget)})},
  329. args: [],
  330. source: "observeModel\x0a\x09self model announcer\x0a\x09\x09on: HLSearchReferences\x0a\x09\x09do: [ :ann | self onSearchReferences: ann searchString ]",
  331. messageSends: ["on:do:", "onSearchReferences:", "searchString", "announcer", "model"],
  332. referencedClasses: ["HLSearchReferences"]
  333. }),
  334. smalltalk.HLReferencesListWidget);
  335. smalltalk.addMethod(
  336. smalltalk.method({
  337. selector: "onSearchReferences:",
  338. category: 'reactions',
  339. fn: function (aString){
  340. var self=this;
  341. return smalltalk.withContext(function($ctx1) {
  342. _st(self)._subclassResponsibility();
  343. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLReferencesListWidget)})},
  344. args: ["aString"],
  345. source: "onSearchReferences: aString\x0a\x09self subclassResponsibility",
  346. messageSends: ["subclassResponsibility"],
  347. referencedClasses: []
  348. }),
  349. smalltalk.HLReferencesListWidget);
  350. smalltalk.addMethod(
  351. smalltalk.method({
  352. selector: "renderContentOn:",
  353. category: 'rendering',
  354. fn: function (html){
  355. var self=this;
  356. return smalltalk.withContext(function($ctx1) {
  357. _st(self)._renderHeadOn_(html);
  358. smalltalk.HLNavigationListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  359. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLReferencesListWidget)})},
  360. args: ["html"],
  361. source: "renderContentOn: html\x0a\x09self renderHeadOn: html.\x09\x0a\x09super renderContentOn: html",
  362. messageSends: ["renderHeadOn:", "renderContentOn:"],
  363. referencedClasses: []
  364. }),
  365. smalltalk.HLReferencesListWidget);
  366. smalltalk.addMethod(
  367. smalltalk.method({
  368. selector: "renderHeadOn:",
  369. category: 'rendering',
  370. fn: function (html){
  371. var self=this;
  372. return smalltalk.withContext(function($ctx1) {
  373. var $1,$2;
  374. $1=_st(html)._div();
  375. _st($1)._class_("list-label");
  376. $2=_st($1)._with_((function(){
  377. return smalltalk.withContext(function($ctx2) {
  378. return _st(html)._with_(_st(self)._label());
  379. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  380. return self}, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},smalltalk.HLReferencesListWidget)})},
  381. args: ["html"],
  382. source: "renderHeadOn: html\x0a\x09html div \x0a\x09\x09class: 'list-label';\x0a\x09\x09with: [\x0a\x09\x09\x09html with: self label ]",
  383. messageSends: ["class:", "div", "with:", "label"],
  384. referencedClasses: []
  385. }),
  386. smalltalk.HLReferencesListWidget);
  387. smalltalk.addMethod(
  388. smalltalk.method({
  389. selector: "renderItemLabel:on:",
  390. category: 'rendering',
  391. fn: function (aMethod,html){
  392. var self=this;
  393. return smalltalk.withContext(function($ctx1) {
  394. _st(html)._with_(_st(_st(_st(_st(aMethod)._methodClass())._name()).__comma(" >> #")).__comma(_st(aMethod)._selector()));
  395. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aMethod:aMethod,html:html},smalltalk.HLReferencesListWidget)})},
  396. args: ["aMethod", "html"],
  397. source: "renderItemLabel: aMethod on: html\x0a\x09html with: aMethod methodClass name, ' >> #', aMethod selector",
  398. messageSends: ["with:", ",", "selector", "name", "methodClass"],
  399. referencedClasses: []
  400. }),
  401. smalltalk.HLReferencesListWidget);
  402. smalltalk.addMethod(
  403. smalltalk.method({
  404. selector: "on:",
  405. category: 'instance creation',
  406. fn: function (aModel){
  407. var self=this;
  408. return smalltalk.withContext(function($ctx1) {
  409. var $2,$3,$1;
  410. $2=_st(self)._new();
  411. _st($2)._model_(aModel);
  412. $3=_st($2)._yourself();
  413. $1=$3;
  414. return $1;
  415. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel},smalltalk.HLReferencesListWidget.klass)})},
  416. args: ["aModel"],
  417. source: "on: aModel\x0a\x09^ self new \x0a\x09\x09model: aModel; \x0a\x09\x09yourself",
  418. messageSends: ["model:", "new", "yourself"],
  419. referencedClasses: []
  420. }),
  421. smalltalk.HLReferencesListWidget.klass);
  422. smalltalk.addClass('HLClassReferencesListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  423. smalltalk.addMethod(
  424. smalltalk.method({
  425. selector: "label",
  426. category: 'accessing',
  427. fn: function (){
  428. var self=this;
  429. return smalltalk.withContext(function($ctx1) {
  430. return "Class references";
  431. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLClassReferencesListWidget)})},
  432. args: [],
  433. source: "label\x0a\x09^ 'Class references'",
  434. messageSends: [],
  435. referencedClasses: []
  436. }),
  437. smalltalk.HLClassReferencesListWidget);
  438. smalltalk.addMethod(
  439. smalltalk.method({
  440. selector: "onSearchReferences:",
  441. category: 'reactions',
  442. fn: function (aString){
  443. var self=this;
  444. return smalltalk.withContext(function($ctx1) {
  445. _st(self)._selectItem_(nil);
  446. _st(self)._items_(_st(_st(self)._model())._classReferencesOf_(aString));
  447. _st(self)._refresh();
  448. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLClassReferencesListWidget)})},
  449. args: ["aString"],
  450. source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model classReferencesOf: aString).\x0a\x09self refresh",
  451. messageSends: ["selectItem:", "items:", "classReferencesOf:", "model", "refresh"],
  452. referencedClasses: []
  453. }),
  454. smalltalk.HLClassReferencesListWidget);
  455. smalltalk.addClass('HLImplementorsListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  456. smalltalk.addMethod(
  457. smalltalk.method({
  458. selector: "label",
  459. category: 'accessing',
  460. fn: function (){
  461. var self=this;
  462. return smalltalk.withContext(function($ctx1) {
  463. return "Implementors";
  464. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLImplementorsListWidget)})},
  465. args: [],
  466. source: "label\x0a\x09^ 'Implementors'",
  467. messageSends: [],
  468. referencedClasses: []
  469. }),
  470. smalltalk.HLImplementorsListWidget);
  471. smalltalk.addMethod(
  472. smalltalk.method({
  473. selector: "onSearchReferences:",
  474. category: 'reactions',
  475. fn: function (aString){
  476. var self=this;
  477. return smalltalk.withContext(function($ctx1) {
  478. _st(self)._selectItem_(nil);
  479. _st(self)._items_(_st(_st(self)._model())._implementorsOf_(aString));
  480. _st(self)._refresh();
  481. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLImplementorsListWidget)})},
  482. args: ["aString"],
  483. source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model implementorsOf: aString).\x0a\x09self refresh",
  484. messageSends: ["selectItem:", "items:", "implementorsOf:", "model", "refresh"],
  485. referencedClasses: []
  486. }),
  487. smalltalk.HLImplementorsListWidget);
  488. smalltalk.addClass('HLRegexpListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  489. smalltalk.addMethod(
  490. smalltalk.method({
  491. selector: "label",
  492. category: 'accessing',
  493. fn: function (){
  494. var self=this;
  495. return smalltalk.withContext(function($ctx1) {
  496. return "Source search";
  497. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRegexpListWidget)})},
  498. args: [],
  499. source: "label\x0a\x09^ 'Source search'",
  500. messageSends: [],
  501. referencedClasses: []
  502. }),
  503. smalltalk.HLRegexpListWidget);
  504. smalltalk.addMethod(
  505. smalltalk.method({
  506. selector: "onSearchReferences:",
  507. category: 'reactions',
  508. fn: function (aString){
  509. var self=this;
  510. return smalltalk.withContext(function($ctx1) {
  511. _st(self)._selectItem_(nil);
  512. _st(self)._items_(_st(_st(self)._model())._regexpReferencesOf_(aString));
  513. _st(self)._refresh();
  514. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLRegexpListWidget)})},
  515. args: ["aString"],
  516. source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model regexpReferencesOf: aString).\x0a\x09self refresh",
  517. messageSends: ["selectItem:", "items:", "regexpReferencesOf:", "model", "refresh"],
  518. referencedClasses: []
  519. }),
  520. smalltalk.HLRegexpListWidget);
  521. smalltalk.addClass('HLSendersListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  522. smalltalk.addMethod(
  523. smalltalk.method({
  524. selector: "label",
  525. category: 'accessing',
  526. fn: function (){
  527. var self=this;
  528. return smalltalk.withContext(function($ctx1) {
  529. return "Senders";
  530. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLSendersListWidget)})},
  531. args: [],
  532. source: "label\x0a\x09^ 'Senders'",
  533. messageSends: [],
  534. referencedClasses: []
  535. }),
  536. smalltalk.HLSendersListWidget);
  537. smalltalk.addMethod(
  538. smalltalk.method({
  539. selector: "onSearchReferences:",
  540. category: 'reactions',
  541. fn: function (aString){
  542. var self=this;
  543. return smalltalk.withContext(function($ctx1) {
  544. _st(self)._selectItem_(nil);
  545. _st(self)._items_(_st(_st(self)._model())._sendersOf_(aString));
  546. _st(self)._refresh();
  547. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLSendersListWidget)})},
  548. args: ["aString"],
  549. source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model sendersOf: aString).\x0a\x09self refresh",
  550. messageSends: ["selectItem:", "items:", "sendersOf:", "model", "refresh"],
  551. referencedClasses: []
  552. }),
  553. smalltalk.HLSendersListWidget);
  554. smalltalk.addClass('HLReferencesModel', smalltalk.HLModel, ['methodsCache', 'classesAndMetaclassesCache'], 'Helios-References');
  555. smalltalk.addMethod(
  556. smalltalk.method({
  557. selector: "allMethods",
  558. category: 'accessing',
  559. fn: function (){
  560. var self=this;
  561. return smalltalk.withContext(function($ctx1) {
  562. var $1;
  563. $1=_st(self)._methodsCache();
  564. return $1;
  565. }, function($ctx1) {$ctx1.fill(self,"allMethods",{},smalltalk.HLReferencesModel)})},
  566. args: [],
  567. source: "allMethods\x0a\x09^ self methodsCache",
  568. messageSends: ["methodsCache"],
  569. referencedClasses: []
  570. }),
  571. smalltalk.HLReferencesModel);
  572. smalltalk.addMethod(
  573. smalltalk.method({
  574. selector: "allSelectors",
  575. category: 'accessing',
  576. fn: function (){
  577. var self=this;
  578. return smalltalk.withContext(function($ctx1) {
  579. var $1;
  580. $1=_st(_st(_st(self)._allMethods())._collect_((function(each){
  581. return smalltalk.withContext(function($ctx2) {
  582. return _st(each)._selector();
  583. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet();
  584. return $1;
  585. }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.HLReferencesModel)})},
  586. args: [],
  587. source: "allSelectors\x0a\x09^ (self allMethods \x0a\x09\x09collect: [ :each | each selector ])\x0a\x09\x09asSet",
  588. messageSends: ["asSet", "collect:", "selector", "allMethods"],
  589. referencedClasses: []
  590. }),
  591. smalltalk.HLReferencesModel);
  592. smalltalk.addMethod(
  593. smalltalk.method({
  594. selector: "classReferencesOf:",
  595. category: 'accessing',
  596. fn: function (aString){
  597. var self=this;
  598. var references;
  599. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  600. return smalltalk.withContext(function($ctx1) {
  601. var $1,$2;
  602. references=_st($OrderedCollection())._new();
  603. _st(_st(self)._classesAndMetaclasses())._do_((function(each){
  604. return smalltalk.withContext(function($ctx2) {
  605. return _st(_st(_st(each)._methodDictionary())._values())._do_((function(method){
  606. return smalltalk.withContext(function($ctx3) {
  607. $1=_st(_st(method)._referencedClasses())._includes_(aString);
  608. if(smalltalk.assert($1)){
  609. return _st(references)._add_(method);
  610. };
  611. }, function($ctx3) {$ctx3.fillBlock({method:method},$ctx1)})}));
  612. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  613. $2=references;
  614. return $2;
  615. }, function($ctx1) {$ctx1.fill(self,"classReferencesOf:",{aString:aString,references:references},smalltalk.HLReferencesModel)})},
  616. args: ["aString"],
  617. source: "classReferencesOf: aString\x0a\x09\x22Answer all methods referencing the class named aString\x22\x0a\x09\x0a\x09| references |\x0a\x09\x0a\x09references := OrderedCollection new.\x0a\x09\x0a\x09self classesAndMetaclasses do: [ :each |\x0a\x09\x09each methodDictionary values do: [ :method |\x0a\x09\x09\x09(method referencedClasses includes: aString) ifTrue: [\x0a\x09\x09\x09\x09references add: method ] ] ].\x0a\x09\x09\x09\x09\x0a\x09^ references",
  618. messageSends: ["new", "do:", "ifTrue:", "add:", "includes:", "referencedClasses", "values", "methodDictionary", "classesAndMetaclasses"],
  619. referencedClasses: ["OrderedCollection"]
  620. }),
  621. smalltalk.HLReferencesModel);
  622. smalltalk.addMethod(
  623. smalltalk.method({
  624. selector: "classesAndMetaclasses",
  625. category: 'accessing',
  626. fn: function (){
  627. var self=this;
  628. return smalltalk.withContext(function($ctx1) {
  629. var $1;
  630. $1=_st(self)._classesAndMetaclassesCache();
  631. return $1;
  632. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},smalltalk.HLReferencesModel)})},
  633. args: [],
  634. source: "classesAndMetaclasses\x0a\x09^ self classesAndMetaclassesCache",
  635. messageSends: ["classesAndMetaclassesCache"],
  636. referencedClasses: []
  637. }),
  638. smalltalk.HLReferencesModel);
  639. smalltalk.addMethod(
  640. smalltalk.method({
  641. selector: "classesAndMetaclassesCache",
  642. category: 'cache',
  643. fn: function (){
  644. var self=this;
  645. return smalltalk.withContext(function($ctx1) {
  646. var $1,$2;
  647. $1=self["@classesAndMetaclassesCache"];
  648. if(($receiver = $1) == nil || $receiver == undefined){
  649. _st(self)._updateClassesAndMetaclassesCache();
  650. } else {
  651. $1;
  652. };
  653. $2=self["@classesAndMetaclassesCache"];
  654. return $2;
  655. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclassesCache",{},smalltalk.HLReferencesModel)})},
  656. args: [],
  657. source: "classesAndMetaclassesCache\x0a\x09classesAndMetaclassesCache ifNil: [ self updateClassesAndMetaclassesCache ].\x0a\x09\x0a\x09^ classesAndMetaclassesCache",
  658. messageSends: ["ifNil:", "updateClassesAndMetaclassesCache"],
  659. referencedClasses: []
  660. }),
  661. smalltalk.HLReferencesModel);
  662. smalltalk.addMethod(
  663. smalltalk.method({
  664. selector: "implementorsOf:",
  665. category: 'accessing',
  666. fn: function (aString){
  667. var self=this;
  668. return smalltalk.withContext(function($ctx1) {
  669. var $1;
  670. $1=_st(_st(self)._allMethods())._select_((function(each){
  671. return smalltalk.withContext(function($ctx2) {
  672. return _st(_st(each)._selector()).__eq(aString);
  673. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  674. return $1;
  675. }, function($ctx1) {$ctx1.fill(self,"implementorsOf:",{aString:aString},smalltalk.HLReferencesModel)})},
  676. args: ["aString"],
  677. source: "implementorsOf: aString\x0a\x09^ self allMethods select: [ :each |\x0a\x09\x09each selector = aString ]",
  678. messageSends: ["select:", "=", "selector", "allMethods"],
  679. referencedClasses: []
  680. }),
  681. smalltalk.HLReferencesModel);
  682. smalltalk.addMethod(
  683. smalltalk.method({
  684. selector: "methodsCache",
  685. category: 'cache',
  686. fn: function (){
  687. var self=this;
  688. return smalltalk.withContext(function($ctx1) {
  689. var $1,$2;
  690. $1=self["@methodsCache"];
  691. if(($receiver = $1) == nil || $receiver == undefined){
  692. _st(self)._updateMethodsCache();
  693. } else {
  694. $1;
  695. };
  696. $2=self["@methodsCache"];
  697. return $2;
  698. }, function($ctx1) {$ctx1.fill(self,"methodsCache",{},smalltalk.HLReferencesModel)})},
  699. args: [],
  700. source: "methodsCache\x0a\x09methodsCache ifNil: [ self updateMethodsCache ].\x0a\x09\x0a\x09^ methodsCache",
  701. messageSends: ["ifNil:", "updateMethodsCache"],
  702. referencedClasses: []
  703. }),
  704. smalltalk.HLReferencesModel);
  705. smalltalk.addMethod(
  706. smalltalk.method({
  707. selector: "regexpReferencesOf:",
  708. category: 'accessing',
  709. fn: function (aString){
  710. var self=this;
  711. return smalltalk.withContext(function($ctx1) {
  712. var $1;
  713. $1=_st(_st(self)._allMethods())._select_((function(each){
  714. return smalltalk.withContext(function($ctx2) {
  715. return _st(_st(each)._source())._match_(aString);
  716. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  717. return $1;
  718. }, function($ctx1) {$ctx1.fill(self,"regexpReferencesOf:",{aString:aString},smalltalk.HLReferencesModel)})},
  719. args: ["aString"],
  720. source: "regexpReferencesOf: aString\x0a\x09^ self allMethods select: [ :each |\x0a\x09\x09each source match: aString ]",
  721. messageSends: ["select:", "match:", "source", "allMethods"],
  722. referencedClasses: []
  723. }),
  724. smalltalk.HLReferencesModel);
  725. smalltalk.addMethod(
  726. smalltalk.method({
  727. selector: "search:",
  728. category: 'actions',
  729. fn: function (aString){
  730. var self=this;
  731. function $HLSearchReferences(){return smalltalk.HLSearchReferences||(typeof HLSearchReferences=="undefined"?nil:HLSearchReferences)}
  732. return smalltalk.withContext(function($ctx1) {
  733. var $1,$2;
  734. _st(self)._updateCaches();
  735. $1=_st($HLSearchReferences())._new();
  736. _st($1)._searchString_(aString);
  737. $2=_st($1)._yourself();
  738. _st(_st(self)._announcer())._announce_($2);
  739. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.HLReferencesModel)})},
  740. args: ["aString"],
  741. source: "search: aString\x0a\x09self updateCaches.\x0a\x09\x0a\x09self announcer announce: (HLSearchReferences new\x0a\x09\x09searchString: aString;\x0a\x09\x09yourself)",
  742. messageSends: ["updateCaches", "announce:", "searchString:", "new", "yourself", "announcer"],
  743. referencedClasses: ["HLSearchReferences"]
  744. }),
  745. smalltalk.HLReferencesModel);
  746. smalltalk.addMethod(
  747. smalltalk.method({
  748. selector: "sendersOf:",
  749. category: 'accessing',
  750. fn: function (aString){
  751. var self=this;
  752. return smalltalk.withContext(function($ctx1) {
  753. var $1;
  754. $1=_st(_st(self)._allMethods())._select_((function(each){
  755. return smalltalk.withContext(function($ctx2) {
  756. return _st(_st(each)._messageSends())._includes_(aString);
  757. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  758. return $1;
  759. }, function($ctx1) {$ctx1.fill(self,"sendersOf:",{aString:aString},smalltalk.HLReferencesModel)})},
  760. args: ["aString"],
  761. source: "sendersOf: aString\x0a\x09^ self allMethods select: [ :each |\x0a\x09\x09each messageSends includes: aString ]",
  762. messageSends: ["select:", "includes:", "messageSends", "allMethods"],
  763. referencedClasses: []
  764. }),
  765. smalltalk.HLReferencesModel);
  766. smalltalk.addMethod(
  767. smalltalk.method({
  768. selector: "updateCaches",
  769. category: 'cache',
  770. fn: function (){
  771. var self=this;
  772. return smalltalk.withContext(function($ctx1) {
  773. var $1,$2;
  774. $1=self;
  775. _st($1)._updateClassesAndMetaclassesCache();
  776. $2=_st($1)._updateMethodsCache();
  777. return self}, function($ctx1) {$ctx1.fill(self,"updateCaches",{},smalltalk.HLReferencesModel)})},
  778. args: [],
  779. source: "updateCaches\x0a\x09self \x0a\x09\x09updateClassesAndMetaclassesCache;\x0a\x09\x09updateMethodsCache",
  780. messageSends: ["updateClassesAndMetaclassesCache", "updateMethodsCache"],
  781. referencedClasses: []
  782. }),
  783. smalltalk.HLReferencesModel);
  784. smalltalk.addMethod(
  785. smalltalk.method({
  786. selector: "updateClassesAndMetaclassesCache",
  787. category: 'cache',
  788. fn: function (){
  789. var self=this;
  790. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  791. return smalltalk.withContext(function($ctx1) {
  792. var $1,$2;
  793. self["@classesAndMetaclassesCache"]=_st(_st(_st(self)._environment())._classes())._inject_into_(_st($OrderedCollection())._new(),(function(acc,each){
  794. return smalltalk.withContext(function($ctx2) {
  795. $1=acc;
  796. _st($1)._add_(each);
  797. _st($1)._add_(_st(each)._class());
  798. $2=_st($1)._yourself();
  799. return $2;
  800. }, function($ctx2) {$ctx2.fillBlock({acc:acc,each:each},$ctx1)})}));
  801. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesAndMetaclassesCache",{},smalltalk.HLReferencesModel)})},
  802. args: [],
  803. source: "updateClassesAndMetaclassesCache\x0a\x09classesAndMetaclassesCache := self environment classes \x0a\x09\x09inject: OrderedCollection new \x0a\x09\x09into: [ :acc :each |\x0a\x09\x09\x09acc \x0a\x09\x09\x09\x09add: each; \x0a\x09\x09\x09\x09add: each class;\x0a\x09\x09\x09\x09yourself ]",
  804. messageSends: ["inject:into:", "new", "add:", "class", "yourself", "classes", "environment"],
  805. referencedClasses: ["OrderedCollection"]
  806. }),
  807. smalltalk.HLReferencesModel);
  808. smalltalk.addMethod(
  809. smalltalk.method({
  810. selector: "updateMethodsCache",
  811. category: 'cache',
  812. fn: function (){
  813. var self=this;
  814. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  815. return smalltalk.withContext(function($ctx1) {
  816. self["@methodsCache"]=_st(_st(self)._classesAndMetaclasses())._inject_into_(_st($OrderedCollection())._new(),(function(acc,each){
  817. return smalltalk.withContext(function($ctx2) {
  818. return _st(acc).__comma(_st(each)._methods());
  819. }, function($ctx2) {$ctx2.fillBlock({acc:acc,each:each},$ctx1)})}));
  820. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsCache",{},smalltalk.HLReferencesModel)})},
  821. args: [],
  822. source: "updateMethodsCache\x0a\x09methodsCache := self classesAndMetaclasses\x0a\x09\x09inject: OrderedCollection new\x0a\x09\x09into: [ :acc :each |\x0a\x09\x09\x09acc, each methods ]",
  823. messageSends: ["inject:into:", "new", ",", "methods", "classesAndMetaclasses"],
  824. referencedClasses: ["OrderedCollection"]
  825. }),
  826. smalltalk.HLReferencesModel);