2
0

Helios-References.deploy.js 30 KB

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