Helios-References.deploy.js 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845
  1. define("amber_core/Helios-References", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_core/Kernel-Objects", "amber_core/Helios-Core"], function(smalltalk,nil,_st){
  2. smalltalk.addPackage('Helios-References');
  3. smalltalk.packages["Helios-References"].transport = {"type":"amd","amdNamespace":"amber_core"};
  4. smalltalk.addClass('HLMethodReference', smalltalk.Object, ['selector', 'methodClass'], 'Helios-References');
  5. smalltalk.addMethod(
  6. smalltalk.method({
  7. selector: "initializeFromMethod:",
  8. fn: function (aCompiledMethod){
  9. var self=this;
  10. return smalltalk.withContext(function($ctx1) {
  11. var $1,$2;
  12. $1=self;
  13. _st($1)._selector_(_st(aCompiledMethod)._selector());
  14. $2=_st($1)._methodClass_(_st(aCompiledMethod)._methodClass());
  15. return self}, function($ctx1) {$ctx1.fill(self,"initializeFromMethod:",{aCompiledMethod:aCompiledMethod},smalltalk.HLMethodReference)})},
  16. messageSends: ["selector:", "selector", "methodClass:", "methodClass"]}),
  17. smalltalk.HLMethodReference);
  18. smalltalk.addMethod(
  19. smalltalk.method({
  20. selector: "method",
  21. fn: function (){
  22. var self=this;
  23. return smalltalk.withContext(function($ctx1) {
  24. var $1;
  25. $1=_st(self._methodClass())._methodAt_(self._selector());
  26. return $1;
  27. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.HLMethodReference)})},
  28. messageSends: ["methodAt:", "selector", "methodClass"]}),
  29. smalltalk.HLMethodReference);
  30. smalltalk.addMethod(
  31. smalltalk.method({
  32. selector: "methodClass",
  33. fn: function (){
  34. var self=this;
  35. return smalltalk.withContext(function($ctx1) {
  36. var $1;
  37. $1=self["@methodClass"];
  38. return $1;
  39. }, function($ctx1) {$ctx1.fill(self,"methodClass",{},smalltalk.HLMethodReference)})},
  40. messageSends: []}),
  41. smalltalk.HLMethodReference);
  42. smalltalk.addMethod(
  43. smalltalk.method({
  44. selector: "methodClass:",
  45. fn: function (aClass){
  46. var self=this;
  47. return smalltalk.withContext(function($ctx1) {
  48. self["@methodClass"]=aClass;
  49. return self}, function($ctx1) {$ctx1.fill(self,"methodClass:",{aClass:aClass},smalltalk.HLMethodReference)})},
  50. messageSends: []}),
  51. smalltalk.HLMethodReference);
  52. smalltalk.addMethod(
  53. smalltalk.method({
  54. selector: "selector",
  55. fn: function (){
  56. var self=this;
  57. return smalltalk.withContext(function($ctx1) {
  58. var $1;
  59. $1=self["@selector"];
  60. return $1;
  61. }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.HLMethodReference)})},
  62. messageSends: []}),
  63. smalltalk.HLMethodReference);
  64. smalltalk.addMethod(
  65. smalltalk.method({
  66. selector: "selector:",
  67. fn: function (aString){
  68. var self=this;
  69. return smalltalk.withContext(function($ctx1) {
  70. self["@selector"]=aString;
  71. return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.HLMethodReference)})},
  72. messageSends: []}),
  73. smalltalk.HLMethodReference);
  74. smalltalk.addMethod(
  75. smalltalk.method({
  76. selector: "source",
  77. fn: function (){
  78. var self=this;
  79. return smalltalk.withContext(function($ctx1) {
  80. var $1;
  81. $1=_st(self._method())._source();
  82. return $1;
  83. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.HLMethodReference)})},
  84. messageSends: ["source", "method"]}),
  85. smalltalk.HLMethodReference);
  86. smalltalk.addMethod(
  87. smalltalk.method({
  88. selector: "on:",
  89. fn: function (aCompiledMethod){
  90. var self=this;
  91. return smalltalk.withContext(function($ctx1) {
  92. var $2,$3,$1;
  93. $2=self._new();
  94. _st($2)._initializeFromMethod_(aCompiledMethod);
  95. $3=_st($2)._yourself();
  96. $1=$3;
  97. return $1;
  98. }, function($ctx1) {$ctx1.fill(self,"on:",{aCompiledMethod:aCompiledMethod},smalltalk.HLMethodReference.klass)})},
  99. messageSends: ["initializeFromMethod:", "new", "yourself"]}),
  100. smalltalk.HLMethodReference.klass);
  101. smalltalk.addClass('HLReferences', smalltalk.HLWidget, ['model', 'sendersListWidget', 'implementorsListWidget', 'classReferencesListWidget', 'regexpListWidget', 'sourceCodeWidget'], 'Helios-References');
  102. smalltalk.addMethod(
  103. smalltalk.method({
  104. selector: "classReferencesListWidget",
  105. fn: function (){
  106. var self=this;
  107. function $HLClassReferencesListWidget(){return smalltalk.HLClassReferencesListWidget||(typeof HLClassReferencesListWidget=="undefined"?nil:HLClassReferencesListWidget)}
  108. return smalltalk.withContext(function($ctx1) {
  109. var $2,$1;
  110. $2=self["@classReferencesListWidget"];
  111. if(($receiver = $2) == nil || $receiver == undefined){
  112. self["@classReferencesListWidget"]=_st($HLClassReferencesListWidget())._on_(self._model());
  113. self["@classReferencesListWidget"];
  114. $1=_st(self["@classReferencesListWidget"])._next_(self._regexpListWidget());
  115. } else {
  116. $1=$2;
  117. };
  118. return $1;
  119. }, function($ctx1) {$ctx1.fill(self,"classReferencesListWidget",{},smalltalk.HLReferences)})},
  120. messageSends: ["ifNil:", "on:", "model", "next:", "regexpListWidget"]}),
  121. smalltalk.HLReferences);
  122. smalltalk.addMethod(
  123. smalltalk.method({
  124. selector: "implementorsListWidget",
  125. fn: function (){
  126. var self=this;
  127. function $HLImplementorsListWidget(){return smalltalk.HLImplementorsListWidget||(typeof HLImplementorsListWidget=="undefined"?nil:HLImplementorsListWidget)}
  128. return smalltalk.withContext(function($ctx1) {
  129. var $2,$1;
  130. $2=self["@implementorsListWidget"];
  131. if(($receiver = $2) == nil || $receiver == undefined){
  132. self["@implementorsListWidget"]=_st($HLImplementorsListWidget())._on_(self._model());
  133. self["@implementorsListWidget"];
  134. $1=_st(self["@implementorsListWidget"])._next_(self._classReferencesListWidget());
  135. } else {
  136. $1=$2;
  137. };
  138. return $1;
  139. }, function($ctx1) {$ctx1.fill(self,"implementorsListWidget",{},smalltalk.HLReferences)})},
  140. messageSends: ["ifNil:", "on:", "model", "next:", "classReferencesListWidget"]}),
  141. smalltalk.HLReferences);
  142. smalltalk.addMethod(
  143. smalltalk.method({
  144. selector: "model",
  145. fn: function (){
  146. var self=this;
  147. function $HLReferencesModel(){return smalltalk.HLReferencesModel||(typeof HLReferencesModel=="undefined"?nil:HLReferencesModel)}
  148. return smalltalk.withContext(function($ctx1) {
  149. var $2,$3,$4,$1;
  150. $2=self["@model"];
  151. if(($receiver = $2) == nil || $receiver == undefined){
  152. $3=_st($HLReferencesModel())._new();
  153. _st($3)._environment_(_st(self._manager())._environment());
  154. $4=_st($3)._yourself();
  155. self["@model"]=$4;
  156. $1=self["@model"];
  157. } else {
  158. $1=$2;
  159. };
  160. return $1;
  161. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLReferences)})},
  162. messageSends: ["ifNil:", "environment:", "environment", "manager", "new", "yourself"]}),
  163. smalltalk.HLReferences);
  164. smalltalk.addMethod(
  165. smalltalk.method({
  166. selector: "model:",
  167. fn: function (aModel){
  168. var self=this;
  169. return smalltalk.withContext(function($ctx1) {
  170. self["@model"]=aModel;
  171. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLReferences)})},
  172. messageSends: []}),
  173. smalltalk.HLReferences);
  174. smalltalk.addMethod(
  175. smalltalk.method({
  176. selector: "regexpListWidget",
  177. fn: function (){
  178. var self=this;
  179. function $HLRegexpListWidget(){return smalltalk.HLRegexpListWidget||(typeof HLRegexpListWidget=="undefined"?nil:HLRegexpListWidget)}
  180. return smalltalk.withContext(function($ctx1) {
  181. var $2,$1;
  182. $2=self["@regexpListWidget"];
  183. if(($receiver = $2) == nil || $receiver == undefined){
  184. self["@regexpListWidget"]=_st($HLRegexpListWidget())._on_(self._model());
  185. self["@regexpListWidget"];
  186. $1=_st(self["@regexpListWidget"])._next_(self._sourceCodeWidget());
  187. } else {
  188. $1=$2;
  189. };
  190. return $1;
  191. }, function($ctx1) {$ctx1.fill(self,"regexpListWidget",{},smalltalk.HLReferences)})},
  192. messageSends: ["ifNil:", "on:", "model", "next:", "sourceCodeWidget"]}),
  193. smalltalk.HLReferences);
  194. smalltalk.addMethod(
  195. smalltalk.method({
  196. selector: "registerBindingsOn:",
  197. fn: function (aBindingGroup){
  198. var self=this;
  199. function $HLToolCommand(){return smalltalk.HLToolCommand||(typeof HLToolCommand=="undefined"?nil:HLToolCommand)}
  200. return smalltalk.withContext(function($ctx1) {
  201. _st($HLToolCommand())._registerConcreteClassesOn_for_(aBindingGroup,self._model());
  202. return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup},smalltalk.HLReferences)})},
  203. messageSends: ["registerConcreteClassesOn:for:", "model"]}),
  204. smalltalk.HLReferences);
  205. smalltalk.addMethod(
  206. smalltalk.method({
  207. selector: "renderContentOn:",
  208. fn: function (html){
  209. var self=this;
  210. function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  211. function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  212. function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  213. return smalltalk.withContext(function($ctx1) {
  214. _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())));
  215. _st(self._sendersListWidget())._focus();
  216. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLReferences)})},
  217. messageSends: ["with:", "with:with:", "sendersListWidget", "implementorsListWidget", "classReferencesListWidget", "regexpListWidget", "sourceCodeWidget", "focus"]}),
  218. smalltalk.HLReferences);
  219. smalltalk.addMethod(
  220. smalltalk.method({
  221. selector: "search:",
  222. fn: function (aString){
  223. var self=this;
  224. return smalltalk.withContext(function($ctx1) {
  225. _st(self._model())._search_(aString);
  226. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.HLReferences)})},
  227. messageSends: ["search:", "model"]}),
  228. smalltalk.HLReferences);
  229. smalltalk.addMethod(
  230. smalltalk.method({
  231. selector: "sendersListWidget",
  232. fn: function (){
  233. var self=this;
  234. function $HLSendersListWidget(){return smalltalk.HLSendersListWidget||(typeof HLSendersListWidget=="undefined"?nil:HLSendersListWidget)}
  235. return smalltalk.withContext(function($ctx1) {
  236. var $2,$1;
  237. $2=self["@sendersListWidget"];
  238. if(($receiver = $2) == nil || $receiver == undefined){
  239. self["@sendersListWidget"]=_st($HLSendersListWidget())._on_(self._model());
  240. self["@sendersListWidget"];
  241. $1=_st(self["@sendersListWidget"])._next_(self._implementorsListWidget());
  242. } else {
  243. $1=$2;
  244. };
  245. return $1;
  246. }, function($ctx1) {$ctx1.fill(self,"sendersListWidget",{},smalltalk.HLReferences)})},
  247. messageSends: ["ifNil:", "on:", "model", "next:", "implementorsListWidget"]}),
  248. smalltalk.HLReferences);
  249. smalltalk.addMethod(
  250. smalltalk.method({
  251. selector: "sourceCodeWidget",
  252. fn: function (){
  253. var self=this;
  254. function $HLBrowserCodeWidget(){return smalltalk.HLBrowserCodeWidget||(typeof HLBrowserCodeWidget=="undefined"?nil:HLBrowserCodeWidget)}
  255. return smalltalk.withContext(function($ctx1) {
  256. var $2,$3,$4,$1;
  257. $2=self["@sourceCodeWidget"];
  258. if(($receiver = $2) == nil || $receiver == undefined){
  259. $3=_st($HLBrowserCodeWidget())._new();
  260. _st($3)._browserModel_(self._model());
  261. $4=_st($3)._yourself();
  262. self["@sourceCodeWidget"]=$4;
  263. $1=self["@sourceCodeWidget"];
  264. } else {
  265. $1=$2;
  266. };
  267. return $1;
  268. }, function($ctx1) {$ctx1.fill(self,"sourceCodeWidget",{},smalltalk.HLReferences)})},
  269. messageSends: ["ifNil:", "browserModel:", "model", "new", "yourself"]}),
  270. smalltalk.HLReferences);
  271. smalltalk.addMethod(
  272. smalltalk.method({
  273. selector: "canBeOpenAsTab",
  274. fn: function (){
  275. var self=this;
  276. return smalltalk.withContext(function($ctx1) {
  277. return false;
  278. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLReferences.klass)})},
  279. messageSends: []}),
  280. smalltalk.HLReferences.klass);
  281. smalltalk.addMethod(
  282. smalltalk.method({
  283. selector: "tabClass",
  284. fn: function (){
  285. var self=this;
  286. return smalltalk.withContext(function($ctx1) {
  287. return "references";
  288. }, function($ctx1) {$ctx1.fill(self,"tabClass",{},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. return (100);
  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(self._model())._withChangesDo_((function(){
  319. return smalltalk.withContext(function($ctx2) {
  320. return smalltalk.HLReferencesListWidget.superclass.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(self._model())._announcer();
  355. _st($1)._on_do_($HLSearchReferences(),(function(ann){
  356. return smalltalk.withContext(function($ctx2) {
  357. return 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 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(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. 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(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=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. self._selectItem_(nil);
  461. self._items_(_st(self._model())._classReferencesOf_(aString));
  462. 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. self._selectItem_(nil);
  484. self._items_(_st(self._model())._implementorsOf_(aString));
  485. 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. self._selectItem_(nil);
  507. self._items_(_st(self._model())._regexpReferencesOf_(aString));
  508. 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. self._selectItem_(nil);
  530. self._items_(_st(self._model())._sendersOf_(aString));
  531. 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=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(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(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},$ctx2)})}));
  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=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. 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(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 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. 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(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 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. self._updateCaches();
  704. $1=_st($HLSearchReferences())._new();
  705. _st($1)._searchString_(aString);
  706. $2=_st($1)._yourself();
  707. _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(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 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(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(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);
  775. });