2
0

Helios-References.deploy.js 27 KB

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