Helios-References.deploy.js 31 KB

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