1
0

Helios-References.deploy.js 30 KB

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