Helios-References.deploy.js 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844
  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(_st(self)._methodClass())._methodAt_(_st(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(_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=_st(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_(_st(self)._model());
  111. self["@classReferencesListWidget"];
  112. $1=_st(self["@classReferencesListWidget"])._next_(_st(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_(_st(self)._model());
  131. self["@implementorsListWidget"];
  132. $1=_st(self["@implementorsListWidget"])._next_(_st(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(_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_(_st(self)._model());
  183. self["@regexpListWidget"];
  184. $1=_st(self["@regexpListWidget"])._next_(_st(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,_st(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_(_st(self)._sendersListWidget(),_st(self)._implementorsListWidget()),_st($HLVerticalSplitter())._with_with_(_st(self)._classReferencesListWidget(),_st(self)._regexpListWidget())),_st(self)._sourceCodeWidget())));
  213. _st(_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(_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_(_st(self)._model());
  238. self["@sendersListWidget"];
  239. $1=_st(self["@sendersListWidget"])._next_(_st(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_(_st(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. var $1;
  306. $1=(100);
  307. return $1;
  308. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLReferences.klass)})},
  309. messageSends: []}),
  310. smalltalk.HLReferences.klass);
  311. smalltalk.addClass('HLReferencesListWidget', smalltalk.HLToolListWidget, [], 'Helios-References');
  312. smalltalk.addMethod(
  313. smalltalk.method({
  314. selector: "activateListItem:",
  315. fn: function (anItem){
  316. var self=this;
  317. return smalltalk.withContext(function($ctx1) {
  318. _st(_st(self)._model())._withChangesDo_((function(){
  319. return smalltalk.withContext(function($ctx2) {
  320. return smalltalk.HLToolListWidget.fn.prototype._activateListItem_.apply(_st(self), [anItem]);
  321. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  322. return self}, function($ctx1) {$ctx1.fill(self,"activateListItem:",{anItem:anItem},smalltalk.HLReferencesListWidget)})},
  323. messageSends: ["withChangesDo:", "activateListItem:", "model"]}),
  324. smalltalk.HLReferencesListWidget);
  325. smalltalk.addMethod(
  326. smalltalk.method({
  327. selector: "commandCategory",
  328. fn: function (){
  329. var self=this;
  330. return smalltalk.withContext(function($ctx1) {
  331. return "Methods";
  332. }, function($ctx1) {$ctx1.fill(self,"commandCategory",{},smalltalk.HLReferencesListWidget)})},
  333. messageSends: []}),
  334. smalltalk.HLReferencesListWidget);
  335. smalltalk.addMethod(
  336. smalltalk.method({
  337. selector: "label",
  338. fn: function (){
  339. var self=this;
  340. return smalltalk.withContext(function($ctx1) {
  341. return "List";
  342. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLReferencesListWidget)})},
  343. messageSends: []}),
  344. smalltalk.HLReferencesListWidget);
  345. smalltalk.addMethod(
  346. smalltalk.method({
  347. selector: "observeModel",
  348. fn: function (){
  349. var self=this;
  350. function $HLSearchReferences(){return smalltalk.HLSearchReferences||(typeof HLSearchReferences=="undefined"?nil:HLSearchReferences)}
  351. function $HLMethodSelected(){return smalltalk.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  352. return smalltalk.withContext(function($ctx1) {
  353. var $1,$2;
  354. $1=_st(_st(self)._model())._announcer();
  355. _st($1)._on_do_($HLSearchReferences(),(function(ann){
  356. return smalltalk.withContext(function($ctx2) {
  357. return _st(self)._onSearchReferences_(_st(ann)._searchString());
  358. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  359. $2=_st($1)._on_do_($HLMethodSelected(),(function(ann){
  360. return smalltalk.withContext(function($ctx2) {
  361. return _st(self)._onMethodSelected_(_st(ann)._item());
  362. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  363. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLReferencesListWidget)})},
  364. messageSends: ["on:do:", "onSearchReferences:", "searchString", "announcer", "model", "onMethodSelected:", "item"]}),
  365. smalltalk.HLReferencesListWidget);
  366. smalltalk.addMethod(
  367. smalltalk.method({
  368. selector: "onMethodSelected:",
  369. fn: function (aMethod){
  370. var self=this;
  371. return smalltalk.withContext(function($ctx1) {
  372. var $1,$2,$3,$4,$5;
  373. var $early={};
  374. try {
  375. $1=aMethod;
  376. if(($receiver = $1) == nil || $receiver == undefined){
  377. $2=self;
  378. return $2;
  379. } else {
  380. $1;
  381. };
  382. _st(_st(self)._items())._detect_ifNone_((function(each){
  383. return smalltalk.withContext(function($ctx2) {
  384. return _st(each).__eq(_st(aMethod)._selector());
  385. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  386. return smalltalk.withContext(function($ctx2) {
  387. $3=self;
  388. throw $early=[$3];
  389. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  390. $4=self;
  391. _st($4)._selectedItem_(_st(aMethod)._selector());
  392. $5=_st($4)._activateItem_(_st(aMethod)._selector());
  393. return self}
  394. catch(e) {if(e===$early)return e[0]; throw e}
  395. }, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aMethod:aMethod},smalltalk.HLReferencesListWidget)})},
  396. messageSends: ["ifNil:", "detect:ifNone:", "=", "selector", "items", "selectedItem:", "activateItem:"]}),
  397. smalltalk.HLReferencesListWidget);
  398. smalltalk.addMethod(
  399. smalltalk.method({
  400. selector: "onSearchReferences:",
  401. fn: function (aString){
  402. var self=this;
  403. return smalltalk.withContext(function($ctx1) {
  404. _st(self)._subclassResponsibility();
  405. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLReferencesListWidget)})},
  406. messageSends: ["subclassResponsibility"]}),
  407. smalltalk.HLReferencesListWidget);
  408. smalltalk.addMethod(
  409. smalltalk.method({
  410. selector: "renderItemLabel:on:",
  411. fn: function (aMethod,html){
  412. var self=this;
  413. return smalltalk.withContext(function($ctx1) {
  414. _st(html)._with_(_st(_st(_st(_st(aMethod)._methodClass())._name()).__comma(" >> #")).__comma(_st(aMethod)._selector()));
  415. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aMethod:aMethod,html:html},smalltalk.HLReferencesListWidget)})},
  416. messageSends: ["with:", ",", "selector", "name", "methodClass"]}),
  417. smalltalk.HLReferencesListWidget);
  418. smalltalk.addMethod(
  419. smalltalk.method({
  420. selector: "selectItem:",
  421. fn: function (aMethod){
  422. var self=this;
  423. return smalltalk.withContext(function($ctx1) {
  424. _st(_st(self)._model())._selectedMethod_(aMethod);
  425. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aMethod:aMethod},smalltalk.HLReferencesListWidget)})},
  426. messageSends: ["selectedMethod:", "model"]}),
  427. smalltalk.HLReferencesListWidget);
  428. smalltalk.addMethod(
  429. smalltalk.method({
  430. selector: "on:",
  431. fn: function (aModel){
  432. var self=this;
  433. return smalltalk.withContext(function($ctx1) {
  434. var $2,$3,$1;
  435. $2=_st(self)._new();
  436. _st($2)._model_(aModel);
  437. $3=_st($2)._yourself();
  438. $1=$3;
  439. return $1;
  440. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel},smalltalk.HLReferencesListWidget.klass)})},
  441. messageSends: ["model:", "new", "yourself"]}),
  442. smalltalk.HLReferencesListWidget.klass);
  443. smalltalk.addClass('HLClassReferencesListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  444. smalltalk.addMethod(
  445. smalltalk.method({
  446. selector: "label",
  447. fn: function (){
  448. var self=this;
  449. return smalltalk.withContext(function($ctx1) {
  450. return "Class references";
  451. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLClassReferencesListWidget)})},
  452. messageSends: []}),
  453. smalltalk.HLClassReferencesListWidget);
  454. smalltalk.addMethod(
  455. smalltalk.method({
  456. selector: "onSearchReferences:",
  457. fn: function (aString){
  458. var self=this;
  459. return smalltalk.withContext(function($ctx1) {
  460. _st(self)._selectItem_(nil);
  461. _st(self)._items_(_st(_st(self)._model())._classReferencesOf_(aString));
  462. _st(self)._refresh();
  463. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLClassReferencesListWidget)})},
  464. messageSends: ["selectItem:", "items:", "classReferencesOf:", "model", "refresh"]}),
  465. smalltalk.HLClassReferencesListWidget);
  466. smalltalk.addClass('HLImplementorsListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  467. smalltalk.addMethod(
  468. smalltalk.method({
  469. selector: "label",
  470. fn: function (){
  471. var self=this;
  472. return smalltalk.withContext(function($ctx1) {
  473. return "Implementors";
  474. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLImplementorsListWidget)})},
  475. messageSends: []}),
  476. smalltalk.HLImplementorsListWidget);
  477. smalltalk.addMethod(
  478. smalltalk.method({
  479. selector: "onSearchReferences:",
  480. fn: function (aString){
  481. var self=this;
  482. return smalltalk.withContext(function($ctx1) {
  483. _st(self)._selectItem_(nil);
  484. _st(self)._items_(_st(_st(self)._model())._implementorsOf_(aString));
  485. _st(self)._refresh();
  486. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLImplementorsListWidget)})},
  487. messageSends: ["selectItem:", "items:", "implementorsOf:", "model", "refresh"]}),
  488. smalltalk.HLImplementorsListWidget);
  489. smalltalk.addClass('HLRegexpListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  490. smalltalk.addMethod(
  491. smalltalk.method({
  492. selector: "label",
  493. fn: function (){
  494. var self=this;
  495. return smalltalk.withContext(function($ctx1) {
  496. return "Source search";
  497. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRegexpListWidget)})},
  498. messageSends: []}),
  499. smalltalk.HLRegexpListWidget);
  500. smalltalk.addMethod(
  501. smalltalk.method({
  502. selector: "onSearchReferences:",
  503. fn: function (aString){
  504. var self=this;
  505. return smalltalk.withContext(function($ctx1) {
  506. _st(self)._selectItem_(nil);
  507. _st(self)._items_(_st(_st(self)._model())._regexpReferencesOf_(aString));
  508. _st(self)._refresh();
  509. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLRegexpListWidget)})},
  510. messageSends: ["selectItem:", "items:", "regexpReferencesOf:", "model", "refresh"]}),
  511. smalltalk.HLRegexpListWidget);
  512. smalltalk.addClass('HLSendersListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
  513. smalltalk.addMethod(
  514. smalltalk.method({
  515. selector: "label",
  516. fn: function (){
  517. var self=this;
  518. return smalltalk.withContext(function($ctx1) {
  519. return "Senders";
  520. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLSendersListWidget)})},
  521. messageSends: []}),
  522. smalltalk.HLSendersListWidget);
  523. smalltalk.addMethod(
  524. smalltalk.method({
  525. selector: "onSearchReferences:",
  526. fn: function (aString){
  527. var self=this;
  528. return smalltalk.withContext(function($ctx1) {
  529. _st(self)._selectItem_(nil);
  530. _st(self)._items_(_st(_st(self)._model())._sendersOf_(aString));
  531. _st(self)._refresh();
  532. return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLSendersListWidget)})},
  533. messageSends: ["selectItem:", "items:", "sendersOf:", "model", "refresh"]}),
  534. smalltalk.HLSendersListWidget);
  535. smalltalk.addClass('HLReferencesModel', smalltalk.HLToolModel, ['methodsCache', 'classesAndMetaclassesCache'], 'Helios-References');
  536. smalltalk.addMethod(
  537. smalltalk.method({
  538. selector: "allMethods",
  539. fn: function (){
  540. var self=this;
  541. return smalltalk.withContext(function($ctx1) {
  542. var $1;
  543. $1=_st(self)._methodsCache();
  544. return $1;
  545. }, function($ctx1) {$ctx1.fill(self,"allMethods",{},smalltalk.HLReferencesModel)})},
  546. messageSends: ["methodsCache"]}),
  547. smalltalk.HLReferencesModel);
  548. smalltalk.addMethod(
  549. smalltalk.method({
  550. selector: "allSelectors",
  551. fn: function (){
  552. var self=this;
  553. return smalltalk.withContext(function($ctx1) {
  554. var $1;
  555. $1=_st(_st(_st(self)._allMethods())._collect_((function(each){
  556. return smalltalk.withContext(function($ctx2) {
  557. return _st(each)._selector();
  558. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet();
  559. return $1;
  560. }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.HLReferencesModel)})},
  561. messageSends: ["asSet", "collect:", "selector", "allMethods"]}),
  562. smalltalk.HLReferencesModel);
  563. smalltalk.addMethod(
  564. smalltalk.method({
  565. selector: "classReferencesOf:",
  566. fn: function (aString){
  567. var self=this;
  568. var references;
  569. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  570. return smalltalk.withContext(function($ctx1) {
  571. var $1,$2;
  572. references=_st($OrderedCollection())._new();
  573. _st(_st(self)._classesAndMetaclasses())._do_((function(each){
  574. return smalltalk.withContext(function($ctx2) {
  575. return _st(_st(_st(each)._methodDictionary())._values())._do_((function(method){
  576. return smalltalk.withContext(function($ctx3) {
  577. $1=_st(_st(method)._referencedClasses())._includes_(aString);
  578. if(smalltalk.assert($1)){
  579. return _st(references)._add_(method);
  580. };
  581. }, function($ctx3) {$ctx3.fillBlock({method:method},$ctx1)})}));
  582. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  583. $2=references;
  584. return $2;
  585. }, function($ctx1) {$ctx1.fill(self,"classReferencesOf:",{aString:aString,references:references},smalltalk.HLReferencesModel)})},
  586. messageSends: ["new", "do:", "ifTrue:", "add:", "includes:", "referencedClasses", "values", "methodDictionary", "classesAndMetaclasses"]}),
  587. smalltalk.HLReferencesModel);
  588. smalltalk.addMethod(
  589. smalltalk.method({
  590. selector: "classesAndMetaclasses",
  591. fn: function (){
  592. var self=this;
  593. return smalltalk.withContext(function($ctx1) {
  594. var $1;
  595. $1=_st(self)._classesAndMetaclassesCache();
  596. return $1;
  597. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},smalltalk.HLReferencesModel)})},
  598. messageSends: ["classesAndMetaclassesCache"]}),
  599. smalltalk.HLReferencesModel);
  600. smalltalk.addMethod(
  601. smalltalk.method({
  602. selector: "classesAndMetaclassesCache",
  603. fn: function (){
  604. var self=this;
  605. return smalltalk.withContext(function($ctx1) {
  606. var $1,$2;
  607. $1=self["@classesAndMetaclassesCache"];
  608. if(($receiver = $1) == nil || $receiver == undefined){
  609. _st(self)._updateClassesAndMetaclassesCache();
  610. } else {
  611. $1;
  612. };
  613. $2=self["@classesAndMetaclassesCache"];
  614. return $2;
  615. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclassesCache",{},smalltalk.HLReferencesModel)})},
  616. messageSends: ["ifNil:", "updateClassesAndMetaclassesCache"]}),
  617. smalltalk.HLReferencesModel);
  618. smalltalk.addMethod(
  619. smalltalk.method({
  620. selector: "implementorsOf:",
  621. fn: function (aString){
  622. var self=this;
  623. return smalltalk.withContext(function($ctx1) {
  624. var $1;
  625. $1=_st(_st(_st(self)._allMethods())._select_((function(each){
  626. return smalltalk.withContext(function($ctx2) {
  627. return _st(_st(each)._selector()).__eq(aString);
  628. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._collect_((function(each){
  629. return smalltalk.withContext(function($ctx2) {
  630. return _st(self)._methodReferenceOn_(each);
  631. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  632. return $1;
  633. }, function($ctx1) {$ctx1.fill(self,"implementorsOf:",{aString:aString},smalltalk.HLReferencesModel)})},
  634. messageSends: ["collect:", "methodReferenceOn:", "select:", "=", "selector", "allMethods"]}),
  635. smalltalk.HLReferencesModel);
  636. smalltalk.addMethod(
  637. smalltalk.method({
  638. selector: "isReferencesModel",
  639. fn: function (){
  640. var self=this;
  641. return smalltalk.withContext(function($ctx1) {
  642. return true;
  643. }, function($ctx1) {$ctx1.fill(self,"isReferencesModel",{},smalltalk.HLReferencesModel)})},
  644. messageSends: []}),
  645. smalltalk.HLReferencesModel);
  646. smalltalk.addMethod(
  647. smalltalk.method({
  648. selector: "methodReferenceOn:",
  649. fn: function (aCompiledMethod){
  650. var self=this;
  651. function $HLMethodReference(){return smalltalk.HLMethodReference||(typeof HLMethodReference=="undefined"?nil:HLMethodReference)}
  652. return smalltalk.withContext(function($ctx1) {
  653. var $1;
  654. $1=_st($HLMethodReference())._on_(aCompiledMethod);
  655. return $1;
  656. }, function($ctx1) {$ctx1.fill(self,"methodReferenceOn:",{aCompiledMethod:aCompiledMethod},smalltalk.HLReferencesModel)})},
  657. messageSends: ["on:"]}),
  658. smalltalk.HLReferencesModel);
  659. smalltalk.addMethod(
  660. smalltalk.method({
  661. selector: "methodsCache",
  662. fn: function (){
  663. var self=this;
  664. return smalltalk.withContext(function($ctx1) {
  665. var $1,$2;
  666. $1=self["@methodsCache"];
  667. if(($receiver = $1) == nil || $receiver == undefined){
  668. _st(self)._updateMethodsCache();
  669. } else {
  670. $1;
  671. };
  672. $2=self["@methodsCache"];
  673. return $2;
  674. }, function($ctx1) {$ctx1.fill(self,"methodsCache",{},smalltalk.HLReferencesModel)})},
  675. messageSends: ["ifNil:", "updateMethodsCache"]}),
  676. smalltalk.HLReferencesModel);
  677. smalltalk.addMethod(
  678. smalltalk.method({
  679. selector: "regexpReferencesOf:",
  680. fn: function (aString){
  681. var self=this;
  682. return smalltalk.withContext(function($ctx1) {
  683. var $1;
  684. $1=_st(_st(_st(self)._allMethods())._select_((function(each){
  685. return smalltalk.withContext(function($ctx2) {
  686. return _st(_st(each)._source())._match_(aString);
  687. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._collect_((function(each){
  688. return smalltalk.withContext(function($ctx2) {
  689. return _st(self)._methodReferenceOn_(each);
  690. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  691. return $1;
  692. }, function($ctx1) {$ctx1.fill(self,"regexpReferencesOf:",{aString:aString},smalltalk.HLReferencesModel)})},
  693. messageSends: ["collect:", "methodReferenceOn:", "select:", "match:", "source", "allMethods"]}),
  694. smalltalk.HLReferencesModel);
  695. smalltalk.addMethod(
  696. smalltalk.method({
  697. selector: "search:",
  698. fn: function (aString){
  699. var self=this;
  700. function $HLSearchReferences(){return smalltalk.HLSearchReferences||(typeof HLSearchReferences=="undefined"?nil:HLSearchReferences)}
  701. return smalltalk.withContext(function($ctx1) {
  702. var $1,$2;
  703. _st(self)._updateCaches();
  704. $1=_st($HLSearchReferences())._new();
  705. _st($1)._searchString_(aString);
  706. $2=_st($1)._yourself();
  707. _st(_st(self)._announcer())._announce_($2);
  708. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.HLReferencesModel)})},
  709. messageSends: ["updateCaches", "announce:", "searchString:", "new", "yourself", "announcer"]}),
  710. smalltalk.HLReferencesModel);
  711. smalltalk.addMethod(
  712. smalltalk.method({
  713. selector: "sendersOf:",
  714. fn: function (aString){
  715. var self=this;
  716. return smalltalk.withContext(function($ctx1) {
  717. var $1;
  718. $1=_st(_st(_st(self)._allMethods())._select_((function(each){
  719. return smalltalk.withContext(function($ctx2) {
  720. return _st(_st(each)._messageSends())._includes_(aString);
  721. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._collect_((function(each){
  722. return smalltalk.withContext(function($ctx2) {
  723. return _st(self)._methodReferenceOn_(each);
  724. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  725. return $1;
  726. }, function($ctx1) {$ctx1.fill(self,"sendersOf:",{aString:aString},smalltalk.HLReferencesModel)})},
  727. messageSends: ["collect:", "methodReferenceOn:", "select:", "includes:", "messageSends", "allMethods"]}),
  728. smalltalk.HLReferencesModel);
  729. smalltalk.addMethod(
  730. smalltalk.method({
  731. selector: "updateCaches",
  732. fn: function (){
  733. var self=this;
  734. return smalltalk.withContext(function($ctx1) {
  735. var $1,$2;
  736. $1=self;
  737. _st($1)._updateClassesAndMetaclassesCache();
  738. $2=_st($1)._updateMethodsCache();
  739. return self}, function($ctx1) {$ctx1.fill(self,"updateCaches",{},smalltalk.HLReferencesModel)})},
  740. messageSends: ["updateClassesAndMetaclassesCache", "updateMethodsCache"]}),
  741. smalltalk.HLReferencesModel);
  742. smalltalk.addMethod(
  743. smalltalk.method({
  744. selector: "updateClassesAndMetaclassesCache",
  745. fn: function (){
  746. var self=this;
  747. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  748. return smalltalk.withContext(function($ctx1) {
  749. var $1,$2;
  750. self["@classesAndMetaclassesCache"]=_st(_st(_st(self)._environment())._classes())._inject_into_(_st($OrderedCollection())._new(),(function(acc,each){
  751. return smalltalk.withContext(function($ctx2) {
  752. $1=acc;
  753. _st($1)._add_(each);
  754. _st($1)._add_(_st(each)._class());
  755. $2=_st($1)._yourself();
  756. return $2;
  757. }, function($ctx2) {$ctx2.fillBlock({acc:acc,each:each},$ctx1)})}));
  758. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesAndMetaclassesCache",{},smalltalk.HLReferencesModel)})},
  759. messageSends: ["inject:into:", "new", "add:", "class", "yourself", "classes", "environment"]}),
  760. smalltalk.HLReferencesModel);
  761. smalltalk.addMethod(
  762. smalltalk.method({
  763. selector: "updateMethodsCache",
  764. fn: function (){
  765. var self=this;
  766. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  767. return smalltalk.withContext(function($ctx1) {
  768. self["@methodsCache"]=_st(_st(self)._classesAndMetaclasses())._inject_into_(_st($OrderedCollection())._new(),(function(acc,each){
  769. return smalltalk.withContext(function($ctx2) {
  770. return _st(acc).__comma(_st(each)._methods());
  771. }, function($ctx2) {$ctx2.fillBlock({acc:acc,each:each},$ctx1)})}));
  772. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsCache",{},smalltalk.HLReferencesModel)})},
  773. messageSends: ["inject:into:", "new", ",", "methods", "classesAndMetaclasses"]}),
  774. smalltalk.HLReferencesModel);