Helios-References.deploy.js 30 KB

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