2
0

Helios-References.deploy.js 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  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. fn: function (){
  7. var self=this;
  8. function $HLClassReferencesListWidget(){return smalltalk.HLClassReferencesListWidget||(typeof HLClassReferencesListWidget=="undefined"?nil:HLClassReferencesListWidget)}
  9. return smalltalk.withContext(function($ctx1) {
  10. var $2,$1;
  11. $2=self["@classReferencesListWidget"];
  12. if(($receiver = $2) == nil || $receiver == undefined){
  13. self["@classReferencesListWidget"]=_st($HLClassReferencesListWidget())._on_(_st(self)._model());
  14. self["@classReferencesListWidget"];
  15. $1=_st(self["@classReferencesListWidget"])._next_(_st(self)._regexpListWidget());
  16. } else {
  17. $1=$2;
  18. };
  19. return $1;
  20. }, function($ctx1) {$ctx1.fill(self,"classReferencesListWidget",{},smalltalk.HLReferences)})},
  21. messageSends: ["ifNil:", "on:", "model", "next:", "regexpListWidget"]}),
  22. smalltalk.HLReferences);
  23. smalltalk.addMethod(
  24. smalltalk.method({
  25. selector: "implementorsListWidget",
  26. fn: function (){
  27. var self=this;
  28. function $HLImplementorsListWidget(){return smalltalk.HLImplementorsListWidget||(typeof HLImplementorsListWidget=="undefined"?nil:HLImplementorsListWidget)}
  29. return smalltalk.withContext(function($ctx1) {
  30. var $2,$1;
  31. $2=self["@implementorsListWidget"];
  32. if(($receiver = $2) == nil || $receiver == undefined){
  33. self["@implementorsListWidget"]=_st($HLImplementorsListWidget())._on_(_st(self)._model());
  34. self["@implementorsListWidget"];
  35. $1=_st(self["@implementorsListWidget"])._next_(_st(self)._classReferencesListWidget());
  36. } else {
  37. $1=$2;
  38. };
  39. return $1;
  40. }, function($ctx1) {$ctx1.fill(self,"implementorsListWidget",{},smalltalk.HLReferences)})},
  41. messageSends: ["ifNil:", "on:", "model", "next:", "classReferencesListWidget"]}),
  42. smalltalk.HLReferences);
  43. smalltalk.addMethod(
  44. smalltalk.method({
  45. selector: "model",
  46. fn: function (){
  47. var self=this;
  48. function $HLReferencesModel(){return smalltalk.HLReferencesModel||(typeof HLReferencesModel=="undefined"?nil:HLReferencesModel)}
  49. return smalltalk.withContext(function($ctx1) {
  50. var $2,$3,$4,$1;
  51. $2=self["@model"];
  52. if(($receiver = $2) == nil || $receiver == undefined){
  53. $3=_st($HLReferencesModel())._new();
  54. _st($3)._environment_(_st(_st(self)._manager())._environment());
  55. $4=_st($3)._yourself();
  56. self["@model"]=$4;
  57. $1=self["@model"];
  58. } else {
  59. $1=$2;
  60. };
  61. return $1;
  62. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLReferences)})},
  63. messageSends: ["ifNil:", "environment:", "environment", "manager", "new", "yourself"]}),
  64. smalltalk.HLReferences);
  65. smalltalk.addMethod(
  66. smalltalk.method({
  67. selector: "model:",
  68. fn: function (aModel){
  69. var self=this;
  70. return smalltalk.withContext(function($ctx1) {
  71. self["@model"]=aModel;
  72. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLReferences)})},
  73. messageSends: []}),
  74. smalltalk.HLReferences);
  75. smalltalk.addMethod(
  76. smalltalk.method({
  77. selector: "open",
  78. fn: function (){
  79. var self=this;
  80. function $HLTab(){return smalltalk.HLTab||(typeof HLTab=="undefined"?nil:HLTab)}
  81. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  82. return smalltalk.withContext(function($ctx1) {
  83. _st(_st($HLManager())._current())._addTab_(_st($HLTab())._on_labelled_(self,_st(_st(self)._class())._tabLabel()));
  84. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.HLReferences)})},
  85. messageSends: ["addTab:", "on:labelled:", "tabLabel", "class", "current"]}),
  86. smalltalk.HLReferences);
  87. smalltalk.addMethod(
  88. smalltalk.method({
  89. selector: "regexpListWidget",
  90. fn: function (){
  91. var self=this;
  92. function $HLRegexpListWidget(){return smalltalk.HLRegexpListWidget||(typeof HLRegexpListWidget=="undefined"?nil:HLRegexpListWidget)}
  93. return smalltalk.withContext(function($ctx1) {
  94. var $2,$1;
  95. $2=self["@regexpListWidget"];
  96. if(($receiver = $2) == nil || $receiver == undefined){
  97. self["@regexpListWidget"]=_st($HLRegexpListWidget())._on_(_st(self)._model());
  98. self["@regexpListWidget"];
  99. $1=_st(self["@regexpListWidget"])._next_(_st(self)._sourceCodeWidget());
  100. } else {
  101. $1=$2;
  102. };
  103. return $1;
  104. }, function($ctx1) {$ctx1.fill(self,"regexpListWidget",{},smalltalk.HLReferences)})},
  105. messageSends: ["ifNil:", "on:", "model", "next:", "sourceCodeWidget"]}),
  106. smalltalk.HLReferences);
  107. smalltalk.addMethod(
  108. smalltalk.method({
  109. selector: "registerBindingsOn:",
  110. fn: function (aBindingGroup){
  111. var self=this;
  112. function $HLToolCommand(){return smalltalk.HLToolCommand||(typeof HLToolCommand=="undefined"?nil:HLToolCommand)}
  113. return smalltalk.withContext(function($ctx1) {
  114. _st($HLToolCommand())._registerConcreteClassesOn_for_(aBindingGroup,_st(self)._model());
  115. return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup},smalltalk.HLReferences)})},
  116. messageSends: ["registerConcreteClassesOn:for:", "model"]}),
  117. smalltalk.HLReferences);
  118. smalltalk.addMethod(
  119. smalltalk.method({
  120. selector: "renderContentOn:",
  121. fn: function (html){
  122. var self=this;
  123. function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  124. function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  125. function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  126. return smalltalk.withContext(function($ctx1) {
  127. _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())));
  128. _st(_st(self)._sendersListWidget())._focus();
  129. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLReferences)})},
  130. messageSends: ["with:", "with:with:", "sendersListWidget", "implementorsListWidget", "classReferencesListWidget", "regexpListWidget", "sourceCodeWidget", "focus"]}),
  131. smalltalk.HLReferences);
  132. smalltalk.addMethod(
  133. smalltalk.method({
  134. selector: "search:",
  135. fn: function (aString){
  136. var self=this;
  137. return smalltalk.withContext(function($ctx1) {
  138. _st(_st(self)._model())._search_(aString);
  139. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.HLReferences)})},
  140. messageSends: ["search:", "model"]}),
  141. smalltalk.HLReferences);
  142. smalltalk.addMethod(
  143. smalltalk.method({
  144. selector: "sendersListWidget",
  145. fn: function (){
  146. var self=this;
  147. function $HLSendersListWidget(){return smalltalk.HLSendersListWidget||(typeof HLSendersListWidget=="undefined"?nil:HLSendersListWidget)}
  148. return smalltalk.withContext(function($ctx1) {
  149. var $2,$1;
  150. $2=self["@sendersListWidget"];
  151. if(($receiver = $2) == nil || $receiver == undefined){
  152. self["@sendersListWidget"]=_st($HLSendersListWidget())._on_(_st(self)._model());
  153. self["@sendersListWidget"];
  154. $1=_st(self["@sendersListWidget"])._next_(_st(self)._implementorsListWidget());
  155. } else {
  156. $1=$2;
  157. };
  158. return $1;
  159. }, function($ctx1) {$ctx1.fill(self,"sendersListWidget",{},smalltalk.HLReferences)})},
  160. messageSends: ["ifNil:", "on:", "model", "next:", "implementorsListWidget"]}),
  161. smalltalk.HLReferences);
  162. smalltalk.addMethod(
  163. smalltalk.method({
  164. selector: "sourceCodeWidget",
  165. fn: function (){
  166. var self=this;
  167. function $HLBrowserCodeWidget(){return smalltalk.HLBrowserCodeWidget||(typeof HLBrowserCodeWidget=="undefined"?nil:HLBrowserCodeWidget)}
  168. return smalltalk.withContext(function($ctx1) {
  169. var $2,$3,$4,$1;
  170. $2=self["@sourceCodeWidget"];
  171. if(($receiver = $2) == nil || $receiver == undefined){
  172. $3=_st($HLBrowserCodeWidget())._new();
  173. _st($3)._browserModel_(_st(self)._model());
  174. $4=_st($3)._yourself();
  175. self["@sourceCodeWidget"]=$4;
  176. $1=self["@sourceCodeWidget"];
  177. } else {
  178. $1=$2;
  179. };
  180. return $1;
  181. }, function($ctx1) {$ctx1.fill(self,"sourceCodeWidget",{},smalltalk.HLReferences)})},
  182. messageSends: ["ifNil:", "browserModel:", "model", "new", "yourself"]}),
  183. smalltalk.HLReferences);
  184. smalltalk.addMethod(
  185. smalltalk.method({
  186. selector: "canBeOpenAsTab",
  187. fn: function (){
  188. var self=this;
  189. return smalltalk.withContext(function($ctx1) {
  190. return false;
  191. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLReferences.klass)})},
  192. messageSends: []}),
  193. smalltalk.HLReferences.klass);
  194. smalltalk.addMethod(
  195. smalltalk.method({
  196. selector: "tabLabel",
  197. fn: function (){
  198. var self=this;
  199. return smalltalk.withContext(function($ctx1) {
  200. return "References";
  201. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLReferences.klass)})},
  202. messageSends: []}),
  203. smalltalk.HLReferences.klass);
  204. smalltalk.addMethod(
  205. smalltalk.method({
  206. selector: "tabPriority",
  207. fn: function (){
  208. var self=this;
  209. return smalltalk.withContext(function($ctx1) {
  210. var $1;
  211. $1=(100);
  212. return $1;
  213. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLReferences.klass)})},
  214. messageSends: []}),
  215. smalltalk.HLReferences.klass);
  216. smalltalk.addClass('HLReferencesListWidget', smalltalk.HLToolListWidget, [], 'Helios-References');
  217. smalltalk.addMethod(
  218. smalltalk.method({
  219. selector: "activateListItem:",
  220. fn: function (anItem){
  221. var self=this;
  222. return smalltalk.withContext(function($ctx1) {
  223. _st(_st(self)._model())._withChangesDo_((function(){
  224. return smalltalk.withContext(function($ctx2) {
  225. return smalltalk.HLToolListWidget.fn.prototype._activateListItem_.apply(_st(self), [anItem]);
  226. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  227. return self}, function($ctx1) {$ctx1.fill(self,"activateListItem:",{anItem:anItem},smalltalk.HLReferencesListWidget)})},
  228. messageSends: ["withChangesDo:", "activateListItem:", "model"]}),
  229. smalltalk.HLReferencesListWidget);
  230. smalltalk.addMethod(
  231. smalltalk.method({
  232. selector: "commandCategory",
  233. fn: function (){
  234. var self=this;
  235. return smalltalk.withContext(function($ctx1) {
  236. return "Methods";
  237. }, function($ctx1) {$ctx1.fill(self,"commandCategory",{},smalltalk.HLReferencesListWidget)})},
  238. messageSends: []}),
  239. smalltalk.HLReferencesListWidget);
  240. smalltalk.addMethod(
  241. smalltalk.method({
  242. selector: "label",
  243. fn: function (){
  244. var self=this;
  245. return smalltalk.withContext(function($ctx1) {
  246. return "List";
  247. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLReferencesListWidget)})},
  248. messageSends: []}),
  249. smalltalk.HLReferencesListWidget);
  250. smalltalk.addMethod(
  251. smalltalk.method({
  252. selector: "observeModel",
  253. fn: function (){
  254. var self=this;
  255. function $HLSearchReferences(){return smalltalk.HLSearchReferences||(typeof HLSearchReferences=="undefined"?nil:HLSearchReferences)}
  256. function $HLMethodSelected(){return smalltalk.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  257. return smalltalk.withContext(function($ctx1) {
  258. var $1,$2;
  259. $1=_st(_st(self)._model())._announcer();
  260. _st($1)._on_do_($HLSearchReferences(),(function(ann){
  261. return smalltalk.withContext(function($ctx2) {
  262. return _st(self)._onSearchReferences_(_st(ann)._searchString());
  263. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  264. $2=_st($1)._on_do_($HLMethodSelected(),(function(ann){
  265. return smalltalk.withContext(function($ctx2) {
  266. return _st(self)._onMethodSelected_(_st(ann)._item());
  267. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  268. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLReferencesListWidget)})},
  269. messageSends: ["on:do:", "onSearchReferences:", "searchString", "announcer", "model", "onMethodSelected:", "item"]}),
  270. smalltalk.HLReferencesListWidget);
  271. smalltalk.addMethod(
  272. smalltalk.method({
  273. selector: "onMethodSelected:",
  274. fn: function (aMethod){
  275. var self=this;
  276. return smalltalk.withContext(function($ctx1) {
  277. var $1,$2,$3,$4,$5;
  278. var $early={};
  279. try {
  280. $1=aMethod;
  281. if(($receiver = $1) == nil || $receiver == undefined){
  282. $2=self;
  283. return $2;
  284. } else {
  285. $1;
  286. };
  287. _st(_st(self)._items())._detect_ifNone_((function(each){
  288. return smalltalk.withContext(function($ctx2) {
  289. return _st(each).__eq(_st(aMethod)._selector());
  290. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  291. return smalltalk.withContext(function($ctx2) {
  292. $3=self;
  293. throw $early=[$3];
  294. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  295. $4=self;
  296. _st($4)._selectedItem_(_st(aMethod)._selector());
  297. $5=_st($4)._activateItem_(_st(aMethod)._selector());
  298. return self}
  299. catch(e) {if(e===$early)return e[0]; throw e}
  300. }, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aMethod:aMethod},smalltalk.HLReferencesListWidget)})},
  301. messageSends: ["ifNil:", "detect:ifNone:", "=", "selector", "items", "selectedItem:", "activateItem:"]}),
  302. smalltalk.HLReferencesListWidget);
  303. smalltalk.addMethod(
  304. smalltalk.method({
  305. selector: "onSearchReferences:",
  306. fn: function (aString){
  307. var self=this;
  308. return smalltalk.withContext(function($ctx1) {
  309. _st(self)._subclassResponsibility();
  310. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLReferencesListWidget)})},
  311. messageSends: ["subclassResponsibility"]}),
  312. smalltalk.HLReferencesListWidget);
  313. smalltalk.addMethod(
  314. smalltalk.method({
  315. selector: "renderItemLabel:on:",
  316. fn: function (aMethod,html){
  317. var self=this;
  318. return smalltalk.withContext(function($ctx1) {
  319. _st(html)._with_(_st(_st(_st(_st(aMethod)._methodClass())._name()).__comma(" >> #")).__comma(_st(aMethod)._selector()));
  320. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aMethod:aMethod,html:html},smalltalk.HLReferencesListWidget)})},
  321. messageSends: ["with:", ",", "selector", "name", "methodClass"]}),
  322. smalltalk.HLReferencesListWidget);
  323. smalltalk.addMethod(
  324. smalltalk.method({
  325. selector: "selectItem:",
  326. fn: function (aMethod){
  327. var self=this;
  328. return smalltalk.withContext(function($ctx1) {
  329. _st(_st(self)._model())._selectedMethod_(aMethod);
  330. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aMethod:aMethod},smalltalk.HLReferencesListWidget)})},
  331. messageSends: ["selectedMethod:", "model"]}),
  332. smalltalk.HLReferencesListWidget);
  333. smalltalk.addMethod(
  334. smalltalk.method({
  335. selector: "on:",
  336. fn: function (aModel){
  337. var self=this;
  338. return smalltalk.withContext(function($ctx1) {
  339. var $2,$3,$1;
  340. $2=_st(self)._new();
  341. _st($2)._model_(aModel);
  342. $3=_st($2)._yourself();
  343. $1=$3;
  344. return $1;
  345. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel},smalltalk.HLReferencesListWidget.klass)})},
  346. messageSends: ["model:", "new", "yourself"]}),
  347. smalltalk.HLReferencesListWidget.klass);
  348. smalltalk.addClass('HLClassReferencesListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  349. smalltalk.addMethod(
  350. smalltalk.method({
  351. selector: "label",
  352. fn: function (){
  353. var self=this;
  354. return smalltalk.withContext(function($ctx1) {
  355. return "Class references";
  356. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLClassReferencesListWidget)})},
  357. messageSends: []}),
  358. smalltalk.HLClassReferencesListWidget);
  359. smalltalk.addMethod(
  360. smalltalk.method({
  361. selector: "onSearchReferences:",
  362. fn: function (aString){
  363. var self=this;
  364. return smalltalk.withContext(function($ctx1) {
  365. _st(self)._selectItem_(nil);
  366. _st(self)._items_(_st(_st(self)._model())._classReferencesOf_(aString));
  367. _st(self)._refresh();
  368. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLClassReferencesListWidget)})},
  369. messageSends: ["selectItem:", "items:", "classReferencesOf:", "model", "refresh"]}),
  370. smalltalk.HLClassReferencesListWidget);
  371. smalltalk.addClass('HLImplementorsListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  372. smalltalk.addMethod(
  373. smalltalk.method({
  374. selector: "label",
  375. fn: function (){
  376. var self=this;
  377. return smalltalk.withContext(function($ctx1) {
  378. return "Implementors";
  379. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLImplementorsListWidget)})},
  380. messageSends: []}),
  381. smalltalk.HLImplementorsListWidget);
  382. smalltalk.addMethod(
  383. smalltalk.method({
  384. selector: "onSearchReferences:",
  385. fn: function (aString){
  386. var self=this;
  387. return smalltalk.withContext(function($ctx1) {
  388. _st(self)._selectItem_(nil);
  389. _st(self)._items_(_st(_st(self)._model())._implementorsOf_(aString));
  390. _st(self)._refresh();
  391. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLImplementorsListWidget)})},
  392. messageSends: ["selectItem:", "items:", "implementorsOf:", "model", "refresh"]}),
  393. smalltalk.HLImplementorsListWidget);
  394. smalltalk.addClass('HLRegexpListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  395. smalltalk.addMethod(
  396. smalltalk.method({
  397. selector: "label",
  398. fn: function (){
  399. var self=this;
  400. return smalltalk.withContext(function($ctx1) {
  401. return "Source search";
  402. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRegexpListWidget)})},
  403. messageSends: []}),
  404. smalltalk.HLRegexpListWidget);
  405. smalltalk.addMethod(
  406. smalltalk.method({
  407. selector: "onSearchReferences:",
  408. fn: function (aString){
  409. var self=this;
  410. return smalltalk.withContext(function($ctx1) {
  411. _st(self)._selectItem_(nil);
  412. _st(self)._items_(_st(_st(self)._model())._regexpReferencesOf_(aString));
  413. _st(self)._refresh();
  414. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLRegexpListWidget)})},
  415. messageSends: ["selectItem:", "items:", "regexpReferencesOf:", "model", "refresh"]}),
  416. smalltalk.HLRegexpListWidget);
  417. smalltalk.addClass('HLSendersListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  418. smalltalk.addMethod(
  419. smalltalk.method({
  420. selector: "label",
  421. fn: function (){
  422. var self=this;
  423. return smalltalk.withContext(function($ctx1) {
  424. return "Senders";
  425. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLSendersListWidget)})},
  426. messageSends: []}),
  427. smalltalk.HLSendersListWidget);
  428. smalltalk.addMethod(
  429. smalltalk.method({
  430. selector: "onSearchReferences:",
  431. fn: function (aString){
  432. var self=this;
  433. return smalltalk.withContext(function($ctx1) {
  434. _st(self)._selectItem_(nil);
  435. _st(self)._items_(_st(_st(self)._model())._sendersOf_(aString));
  436. _st(self)._refresh();
  437. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLSendersListWidget)})},
  438. messageSends: ["selectItem:", "items:", "sendersOf:", "model", "refresh"]}),
  439. smalltalk.HLSendersListWidget);
  440. smalltalk.addClass('HLReferencesModel', smalltalk.HLToolModel, ['methodsCache', 'classesAndMetaclassesCache'], 'Helios-References');
  441. smalltalk.addMethod(
  442. smalltalk.method({
  443. selector: "allMethods",
  444. fn: function (){
  445. var self=this;
  446. return smalltalk.withContext(function($ctx1) {
  447. var $1;
  448. $1=_st(self)._methodsCache();
  449. return $1;
  450. }, function($ctx1) {$ctx1.fill(self,"allMethods",{},smalltalk.HLReferencesModel)})},
  451. messageSends: ["methodsCache"]}),
  452. smalltalk.HLReferencesModel);
  453. smalltalk.addMethod(
  454. smalltalk.method({
  455. selector: "allSelectors",
  456. fn: function (){
  457. var self=this;
  458. return smalltalk.withContext(function($ctx1) {
  459. var $1;
  460. $1=_st(_st(_st(self)._allMethods())._collect_((function(each){
  461. return smalltalk.withContext(function($ctx2) {
  462. return _st(each)._selector();
  463. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet();
  464. return $1;
  465. }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.HLReferencesModel)})},
  466. messageSends: ["asSet", "collect:", "selector", "allMethods"]}),
  467. smalltalk.HLReferencesModel);
  468. smalltalk.addMethod(
  469. smalltalk.method({
  470. selector: "classReferencesOf:",
  471. fn: function (aString){
  472. var self=this;
  473. var references;
  474. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  475. return smalltalk.withContext(function($ctx1) {
  476. var $1,$2;
  477. references=_st($OrderedCollection())._new();
  478. _st(_st(self)._classesAndMetaclasses())._do_((function(each){
  479. return smalltalk.withContext(function($ctx2) {
  480. return _st(_st(_st(each)._methodDictionary())._values())._do_((function(method){
  481. return smalltalk.withContext(function($ctx3) {
  482. $1=_st(_st(method)._referencedClasses())._includes_(aString);
  483. if(smalltalk.assert($1)){
  484. return _st(references)._add_(method);
  485. };
  486. }, function($ctx3) {$ctx3.fillBlock({method:method},$ctx1)})}));
  487. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  488. $2=references;
  489. return $2;
  490. }, function($ctx1) {$ctx1.fill(self,"classReferencesOf:",{aString:aString,references:references},smalltalk.HLReferencesModel)})},
  491. messageSends: ["new", "do:", "ifTrue:", "add:", "includes:", "referencedClasses", "values", "methodDictionary", "classesAndMetaclasses"]}),
  492. smalltalk.HLReferencesModel);
  493. smalltalk.addMethod(
  494. smalltalk.method({
  495. selector: "classesAndMetaclasses",
  496. fn: function (){
  497. var self=this;
  498. return smalltalk.withContext(function($ctx1) {
  499. var $1;
  500. $1=_st(self)._classesAndMetaclassesCache();
  501. return $1;
  502. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},smalltalk.HLReferencesModel)})},
  503. messageSends: ["classesAndMetaclassesCache"]}),
  504. smalltalk.HLReferencesModel);
  505. smalltalk.addMethod(
  506. smalltalk.method({
  507. selector: "classesAndMetaclassesCache",
  508. fn: function (){
  509. var self=this;
  510. return smalltalk.withContext(function($ctx1) {
  511. var $1,$2;
  512. $1=self["@classesAndMetaclassesCache"];
  513. if(($receiver = $1) == nil || $receiver == undefined){
  514. _st(self)._updateClassesAndMetaclassesCache();
  515. } else {
  516. $1;
  517. };
  518. $2=self["@classesAndMetaclassesCache"];
  519. return $2;
  520. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclassesCache",{},smalltalk.HLReferencesModel)})},
  521. messageSends: ["ifNil:", "updateClassesAndMetaclassesCache"]}),
  522. smalltalk.HLReferencesModel);
  523. smalltalk.addMethod(
  524. smalltalk.method({
  525. selector: "implementorsOf:",
  526. fn: function (aString){
  527. var self=this;
  528. return smalltalk.withContext(function($ctx1) {
  529. var $1;
  530. $1=_st(_st(self)._allMethods())._select_((function(each){
  531. return smalltalk.withContext(function($ctx2) {
  532. return _st(_st(each)._selector()).__eq(aString);
  533. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  534. return $1;
  535. }, function($ctx1) {$ctx1.fill(self,"implementorsOf:",{aString:aString},smalltalk.HLReferencesModel)})},
  536. messageSends: ["select:", "=", "selector", "allMethods"]}),
  537. smalltalk.HLReferencesModel);
  538. smalltalk.addMethod(
  539. smalltalk.method({
  540. selector: "isReferencesModel",
  541. fn: function (){
  542. var self=this;
  543. return smalltalk.withContext(function($ctx1) {
  544. return true;
  545. }, function($ctx1) {$ctx1.fill(self,"isReferencesModel",{},smalltalk.HLReferencesModel)})},
  546. messageSends: []}),
  547. smalltalk.HLReferencesModel);
  548. smalltalk.addMethod(
  549. smalltalk.method({
  550. selector: "methodsCache",
  551. fn: function (){
  552. var self=this;
  553. return smalltalk.withContext(function($ctx1) {
  554. var $1,$2;
  555. $1=self["@methodsCache"];
  556. if(($receiver = $1) == nil || $receiver == undefined){
  557. _st(self)._updateMethodsCache();
  558. } else {
  559. $1;
  560. };
  561. $2=self["@methodsCache"];
  562. return $2;
  563. }, function($ctx1) {$ctx1.fill(self,"methodsCache",{},smalltalk.HLReferencesModel)})},
  564. messageSends: ["ifNil:", "updateMethodsCache"]}),
  565. smalltalk.HLReferencesModel);
  566. smalltalk.addMethod(
  567. smalltalk.method({
  568. selector: "regexpReferencesOf:",
  569. fn: function (aString){
  570. var self=this;
  571. return smalltalk.withContext(function($ctx1) {
  572. var $1;
  573. $1=_st(_st(self)._allMethods())._select_((function(each){
  574. return smalltalk.withContext(function($ctx2) {
  575. return _st(_st(each)._source())._match_(aString);
  576. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  577. return $1;
  578. }, function($ctx1) {$ctx1.fill(self,"regexpReferencesOf:",{aString:aString},smalltalk.HLReferencesModel)})},
  579. messageSends: ["select:", "match:", "source", "allMethods"]}),
  580. smalltalk.HLReferencesModel);
  581. smalltalk.addMethod(
  582. smalltalk.method({
  583. selector: "search:",
  584. fn: function (aString){
  585. var self=this;
  586. function $HLSearchReferences(){return smalltalk.HLSearchReferences||(typeof HLSearchReferences=="undefined"?nil:HLSearchReferences)}
  587. return smalltalk.withContext(function($ctx1) {
  588. var $1,$2;
  589. _st(self)._updateCaches();
  590. $1=_st($HLSearchReferences())._new();
  591. _st($1)._searchString_(aString);
  592. $2=_st($1)._yourself();
  593. _st(_st(self)._announcer())._announce_($2);
  594. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.HLReferencesModel)})},
  595. messageSends: ["updateCaches", "announce:", "searchString:", "new", "yourself", "announcer"]}),
  596. smalltalk.HLReferencesModel);
  597. smalltalk.addMethod(
  598. smalltalk.method({
  599. selector: "sendersOf:",
  600. fn: function (aString){
  601. var self=this;
  602. return smalltalk.withContext(function($ctx1) {
  603. var $1;
  604. $1=_st(_st(self)._allMethods())._select_((function(each){
  605. return smalltalk.withContext(function($ctx2) {
  606. return _st(_st(each)._messageSends())._includes_(aString);
  607. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  608. return $1;
  609. }, function($ctx1) {$ctx1.fill(self,"sendersOf:",{aString:aString},smalltalk.HLReferencesModel)})},
  610. messageSends: ["select:", "includes:", "messageSends", "allMethods"]}),
  611. smalltalk.HLReferencesModel);
  612. smalltalk.addMethod(
  613. smalltalk.method({
  614. selector: "updateCaches",
  615. fn: function (){
  616. var self=this;
  617. return smalltalk.withContext(function($ctx1) {
  618. var $1,$2;
  619. $1=self;
  620. _st($1)._updateClassesAndMetaclassesCache();
  621. $2=_st($1)._updateMethodsCache();
  622. return self}, function($ctx1) {$ctx1.fill(self,"updateCaches",{},smalltalk.HLReferencesModel)})},
  623. messageSends: ["updateClassesAndMetaclassesCache", "updateMethodsCache"]}),
  624. smalltalk.HLReferencesModel);
  625. smalltalk.addMethod(
  626. smalltalk.method({
  627. selector: "updateClassesAndMetaclassesCache",
  628. fn: function (){
  629. var self=this;
  630. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  631. return smalltalk.withContext(function($ctx1) {
  632. var $1,$2;
  633. self["@classesAndMetaclassesCache"]=_st(_st(_st(self)._environment())._classes())._inject_into_(_st($OrderedCollection())._new(),(function(acc,each){
  634. return smalltalk.withContext(function($ctx2) {
  635. $1=acc;
  636. _st($1)._add_(each);
  637. _st($1)._add_(_st(each)._class());
  638. $2=_st($1)._yourself();
  639. return $2;
  640. }, function($ctx2) {$ctx2.fillBlock({acc:acc,each:each},$ctx1)})}));
  641. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesAndMetaclassesCache",{},smalltalk.HLReferencesModel)})},
  642. messageSends: ["inject:into:", "new", "add:", "class", "yourself", "classes", "environment"]}),
  643. smalltalk.HLReferencesModel);
  644. smalltalk.addMethod(
  645. smalltalk.method({
  646. selector: "updateMethodsCache",
  647. fn: function (){
  648. var self=this;
  649. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  650. return smalltalk.withContext(function($ctx1) {
  651. self["@methodsCache"]=_st(_st(self)._classesAndMetaclasses())._inject_into_(_st($OrderedCollection())._new(),(function(acc,each){
  652. return smalltalk.withContext(function($ctx2) {
  653. return _st(acc).__comma(_st(each)._methods());
  654. }, function($ctx2) {$ctx2.fillBlock({acc:acc,each:each},$ctx1)})}));
  655. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsCache",{},smalltalk.HLReferencesModel)})},
  656. messageSends: ["inject:into:", "new", ",", "methods", "classesAndMetaclasses"]}),
  657. smalltalk.HLReferencesModel);