Helios-Browser.deploy.js 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473
  1. smalltalk.addPackage('Helios-Browser', {});
  2. smalltalk.addClass('HLBrowser', smalltalk.HLWidget, ['model', 'packagesListWidget', 'classesListWidget', 'protocolsListWidget', 'methodsListWidget', 'sourceWidget'], 'Helios-Browser');
  3. smalltalk.addMethod(
  4. "_announcer",
  5. smalltalk.method({
  6. selector: "announcer",
  7. fn: function () {
  8. var self = this;
  9. var $1;
  10. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []);
  11. return $1;
  12. }
  13. }),
  14. smalltalk.HLBrowser);
  15. smalltalk.addMethod(
  16. "_classesListWidget",
  17. smalltalk.method({
  18. selector: "classesListWidget",
  19. fn: function () {
  20. var self = this;
  21. var $1;
  22. if (($receiver = self['@classesListWidget']) == nil ||
  23. $receiver == undefined) {
  24. self['@classesListWidget'] = smalltalk.send(smalltalk.HLClassesListWidget || HLClassesListWidget, "_on_", [smalltalk.send(self, "_model", [])]);
  25. self['@classesListWidget'];
  26. $1 = smalltalk.send(self['@classesListWidget'], "_next_", [smalltalk.send(self, "_protocolsListWidget", [])]);
  27. } else {
  28. $1 = self['@classesListWidget'];
  29. }
  30. return $1;
  31. }
  32. }),
  33. smalltalk.HLBrowser);
  34. smalltalk.addMethod(
  35. "_environment",
  36. smalltalk.method({
  37. selector: "environment",
  38. fn: function () {
  39. var self = this;
  40. var $1;
  41. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_environment", []);
  42. return $1;
  43. }
  44. }),
  45. smalltalk.HLBrowser);
  46. smalltalk.addMethod(
  47. "_methodsListWidget",
  48. smalltalk.method({
  49. selector: "methodsListWidget",
  50. fn: function () {
  51. var self = this;
  52. var $1;
  53. if (($receiver = self['@methodsListWidget']) == nil ||
  54. $receiver == undefined) {
  55. self['@methodsListWidget'] = smalltalk.send(smalltalk.HLMethodsListWidget || HLMethodsListWidget, "_on_", [smalltalk.send(self, "_model", [])]);
  56. $1 = self['@methodsListWidget'];
  57. } else {
  58. $1 = self['@methodsListWidget'];
  59. }
  60. return $1;
  61. }
  62. }),
  63. smalltalk.HLBrowser);
  64. smalltalk.addMethod(
  65. "_model",
  66. smalltalk.method({
  67. selector: "model",
  68. fn: function () {
  69. var self = this;
  70. var $1;
  71. if (($receiver = self['@model']) == nil || $receiver == undefined) {
  72. self['@model'] = smalltalk.send(smalltalk.HLBrowserModel || HLBrowserModel, "_new", []);
  73. $1 = self['@model'];
  74. } else {
  75. $1 = self['@model'];
  76. }
  77. return $1;
  78. }
  79. }),
  80. smalltalk.HLBrowser);
  81. smalltalk.addMethod(
  82. "_model_",
  83. smalltalk.method({
  84. selector: "model:",
  85. fn: function (aModel) {
  86. var self = this;
  87. self['@model'] = aModel;
  88. return self;
  89. }
  90. }),
  91. smalltalk.HLBrowser);
  92. smalltalk.addMethod(
  93. "_packagesListWidget",
  94. smalltalk.method({
  95. selector: "packagesListWidget",
  96. fn: function () {
  97. var self = this;
  98. var $1;
  99. if (($receiver = self['@packagesListWidget']) == nil ||
  100. $receiver == undefined) {
  101. self['@packagesListWidget'] = smalltalk.send(smalltalk.HLPackagesListWidget || HLPackagesListWidget, "_on_", [smalltalk.send(self, "_model", [])]);
  102. self['@packagesListWidget'];
  103. $1 = smalltalk.send(self['@packagesListWidget'], "_next_", [smalltalk.send(self, "_classesListWidget", [])]);
  104. } else {
  105. $1 = self['@packagesListWidget'];
  106. }
  107. return $1;
  108. }
  109. }),
  110. smalltalk.HLBrowser);
  111. smalltalk.addMethod(
  112. "_protocolsListWidget",
  113. smalltalk.method({
  114. selector: "protocolsListWidget",
  115. fn: function () {
  116. var self = this;
  117. var $1;
  118. if (($receiver = self['@protocolsListWidget']) == nil ||
  119. $receiver == undefined) {
  120. self['@protocolsListWidget'] = smalltalk.send(smalltalk.HLProtocolsListWidget || HLProtocolsListWidget, "_on_", [smalltalk.send(self, "_model", [])]);
  121. self['@protocolsListWidget'];
  122. $1 = smalltalk.send(self['@protocolsListWidget'], "_next_", [smalltalk.send(self, "_methodsListWidget", [])]);
  123. } else {
  124. $1 = self['@protocolsListWidget'];
  125. }
  126. return $1;
  127. }
  128. }),
  129. smalltalk.HLBrowser);
  130. smalltalk.addMethod(
  131. "_registerBindingsOn_",
  132. smalltalk.method({
  133. selector: "registerBindingsOn:",
  134. fn: function (aBindingGroup) {
  135. var self = this;
  136. var $1, $2;
  137. smalltalk.send(aBindingGroup, "_addGroupKey_labelled_", [66, "Browse"]);
  138. smalltalk.send(aBindingGroup, "_addGroupKey_labelled_", [71, "Go to"]);
  139. $1 = smalltalk.send(aBindingGroup, "_addGroupKey_labelled_", [84, "Toggle"]);
  140. smalltalk.send(smalltalk.send(smalltalk.HLBrowserCommand || HLBrowserCommand, "_withAllSubclasses", []), "_do_", [function (each) {$2 = smalltalk.send(each, "_key", []);if (($receiver = $2) == nil || $receiver == undefined) {return $2;} else {return smalltalk.send(smalltalk.send(aBindingGroup, "_at_", [smalltalk.send(each, "_bindingGroup", [])]), "_add_", [smalltalk.send(smalltalk.send(each, "_on_", [smalltalk.send(self, "_model", [])]), "_asBinding", [])]);}}]);
  141. return self;
  142. }
  143. }),
  144. smalltalk.HLBrowser);
  145. smalltalk.addMethod(
  146. "_renderContentOn_",
  147. smalltalk.method({
  148. selector: "renderContentOn:",
  149. fn: function (html) {
  150. var self = this;
  151. smalltalk.send(html, "_with_", [smalltalk.send(smalltalk.HLContainer || HLContainer, "_with_", [smalltalk.send(smalltalk.HLHorizontalSplitter || HLHorizontalSplitter, "_with_with_", [smalltalk.send(smalltalk.HLVerticalSplitter || HLVerticalSplitter, "_with_with_", [smalltalk.send(smalltalk.HLVerticalSplitter || HLVerticalSplitter, "_with_with_", [smalltalk.send(self, "_packagesListWidget", []), smalltalk.send(self, "_classesListWidget", [])]), smalltalk.send(smalltalk.HLVerticalSplitter || HLVerticalSplitter, "_with_with_", [smalltalk.send(self, "_protocolsListWidget", []), smalltalk.send(self, "_methodsListWidget", [])])]), smalltalk.send(self, "_sourceWidget", [])])])]);
  152. return self;
  153. }
  154. }),
  155. smalltalk.HLBrowser);
  156. smalltalk.addMethod(
  157. "_sourceWidget",
  158. smalltalk.method({
  159. selector: "sourceWidget",
  160. fn: function () {
  161. var self = this;
  162. var $1;
  163. if (($receiver = self['@sourceWidget']) == nil ||
  164. $receiver == undefined) {
  165. self['@sourceWidget'] = smalltalk.send(smalltalk.HLBrowserSourceWidget || HLBrowserSourceWidget, "_on_", [smalltalk.send(self, "_model", [])]);
  166. $1 = self['@sourceWidget'];
  167. } else {
  168. $1 = self['@sourceWidget'];
  169. }
  170. return $1;
  171. }
  172. }),
  173. smalltalk.HLBrowser);
  174. smalltalk.HLBrowser.klass.iVarNames = ['nextId'];
  175. smalltalk.addMethod(
  176. "_canBeOpenAsTab",
  177. smalltalk.method({
  178. selector: "canBeOpenAsTab",
  179. fn: function () {
  180. var self = this;
  181. return true;
  182. }
  183. }),
  184. smalltalk.HLBrowser.klass);
  185. smalltalk.addMethod(
  186. "_nextId",
  187. smalltalk.method({
  188. selector: "nextId",
  189. fn: function () {
  190. var self = this;
  191. var $1;
  192. if (($receiver = self['@nextId']) == nil || $receiver == undefined) {
  193. self['@nextId'] = 0;
  194. self['@nextId'];
  195. } else {
  196. self['@nextId'];
  197. }
  198. $1 = smalltalk.send("browser_", "__comma", [smalltalk.send(smalltalk.send(self['@nextId'], "__plus", [1]), "_asString", [])]);
  199. return $1;
  200. }
  201. }),
  202. smalltalk.HLBrowser.klass);
  203. smalltalk.addMethod(
  204. "_tabLabel",
  205. smalltalk.method({
  206. selector: "tabLabel",
  207. fn: function () {
  208. var self = this;
  209. return "Browser";
  210. }
  211. }),
  212. smalltalk.HLBrowser.klass);
  213. smalltalk.addMethod(
  214. "_tabPriority",
  215. smalltalk.method({
  216. selector: "tabPriority",
  217. fn: function () {
  218. var self = this;
  219. return 0;
  220. }
  221. }),
  222. smalltalk.HLBrowser.klass);
  223. smalltalk.addClass('HLBrowserListWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Browser');
  224. smalltalk.addMethod(
  225. "_model",
  226. smalltalk.method({
  227. selector: "model",
  228. fn: function () {
  229. var self = this;
  230. return self['@model'];
  231. }
  232. }),
  233. smalltalk.HLBrowserListWidget);
  234. smalltalk.addMethod(
  235. "_model_",
  236. smalltalk.method({
  237. selector: "model:",
  238. fn: function (aBrowserModel) {
  239. var self = this;
  240. self['@model'] = aBrowserModel;
  241. smalltalk.send(self, "_observeModel", []);
  242. return self;
  243. }
  244. }),
  245. smalltalk.HLBrowserListWidget);
  246. smalltalk.addMethod(
  247. "_observeModel",
  248. smalltalk.method({
  249. selector: "observeModel",
  250. fn: function () {
  251. var self = this;
  252. return self;
  253. }
  254. }),
  255. smalltalk.HLBrowserListWidget);
  256. smalltalk.addMethod(
  257. "_on_",
  258. smalltalk.method({
  259. selector: "on:",
  260. fn: function (aModel) {
  261. var self = this;
  262. var $2, $3, $1;
  263. $2 = smalltalk.send(self, "_new", []);
  264. smalltalk.send($2, "_model_", [aModel]);
  265. $3 = smalltalk.send($2, "_yourself", []);
  266. $1 = $3;
  267. return $1;
  268. }
  269. }),
  270. smalltalk.HLBrowserListWidget.klass);
  271. smalltalk.addClass('HLClassesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  272. smalltalk.addMethod(
  273. "_focusMethodsListWidget",
  274. smalltalk.method({
  275. selector: "focusMethodsListWidget",
  276. fn: function () {
  277. var self = this;
  278. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLMethodsListFocus || HLMethodsListFocus, "_new", [])]);
  279. return self;
  280. }
  281. }),
  282. smalltalk.HLClassesListWidget);
  283. smalltalk.addMethod(
  284. "_focusProtocolsListWidget",
  285. smalltalk.method({
  286. selector: "focusProtocolsListWidget",
  287. fn: function () {
  288. var self = this;
  289. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLProtocolsListFocus || HLProtocolsListFocus, "_new", [])]);
  290. return self;
  291. }
  292. }),
  293. smalltalk.HLClassesListWidget);
  294. smalltalk.addMethod(
  295. "_getChildrenOf_",
  296. smalltalk.method({
  297. selector: "getChildrenOf:",
  298. fn: function (aClass) {
  299. var self = this;
  300. var $1;
  301. $1 = smalltalk.send(smalltalk.send(self, "_items", []), "_select_", [function (each) {return smalltalk.send(smalltalk.send(each, "_superclass", []), "__eq", [aClass]);}]);
  302. return $1;
  303. }
  304. }),
  305. smalltalk.HLClassesListWidget);
  306. smalltalk.addMethod(
  307. "_getRootClassesOf_",
  308. smalltalk.method({
  309. selector: "getRootClassesOf:",
  310. fn: function (aCollection) {
  311. var self = this;
  312. var $1;
  313. $1 = smalltalk.send(aCollection, "_select_", [function (each) {return smalltalk.send(smalltalk.send(smalltalk.send(each, "_allSuperclasses", []), "_intersection_", [aCollection]), "_isEmpty", []);}]);
  314. return $1;
  315. }
  316. }),
  317. smalltalk.HLClassesListWidget);
  318. smalltalk.addMethod(
  319. "_iconForItem_",
  320. smalltalk.method({
  321. selector: "iconForItem:",
  322. fn: function (aClass) {
  323. var self = this;
  324. var $2, $1;
  325. $2 = smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_theNonMetaClass", []), "_comment", []), "_isEmpty", []);
  326. if (smalltalk.assert($2)) {
  327. $1 = "icon-question-sign";
  328. } else {
  329. $1 = "icon-none";
  330. }
  331. return $1;
  332. }
  333. }),
  334. smalltalk.HLClassesListWidget);
  335. smalltalk.addMethod(
  336. "_observeModel",
  337. smalltalk.method({
  338. selector: "observeModel",
  339. fn: function () {
  340. var self = this;
  341. var $1, $2;
  342. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []);
  343. smalltalk.send($1, "_on_do_", [smalltalk.HLPackageSelected || HLPackageSelected, function (ann) {return smalltalk.send(self, "_onPackageSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  344. smalltalk.send($1, "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_onShowInstanceToggled", []);}]);
  345. $2 = smalltalk.send($1, "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_onClassSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  346. return self;
  347. }
  348. }),
  349. smalltalk.HLClassesListWidget);
  350. smalltalk.addMethod(
  351. "_onClassSelected_",
  352. smalltalk.method({
  353. selector: "onClassSelected:",
  354. fn: function (aClass) {
  355. var self = this;
  356. smalltalk.send(self, "_focus", []);
  357. return self;
  358. }
  359. }),
  360. smalltalk.HLClassesListWidget);
  361. smalltalk.addMethod(
  362. "_onPackageSelected_",
  363. smalltalk.method({
  364. selector: "onPackageSelected:",
  365. fn: function (aPackage) {
  366. var self = this;
  367. var $1;
  368. smalltalk.send(self, "_selectedItem_", [nil]);
  369. if (($receiver = aPackage) == nil || $receiver == undefined) {
  370. $1 = [];
  371. } else {
  372. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aPackage, "_classes", []), "_collect_", [function (each) {return smalltalk.send(each, "_theNonMetaClass", []);}]), "_asSet", []), "_asArray", []);
  373. }
  374. smalltalk.send(self, "_items_", [$1]);
  375. smalltalk.send(self, "_refresh", []);
  376. return self;
  377. }
  378. }),
  379. smalltalk.HLClassesListWidget);
  380. smalltalk.addMethod(
  381. "_onShowInstanceToggled",
  382. smalltalk.method({
  383. selector: "onShowInstanceToggled",
  384. fn: function () {
  385. var self = this;
  386. smalltalk.send(self, "_refresh", []);
  387. return self;
  388. }
  389. }),
  390. smalltalk.HLClassesListWidget);
  391. smalltalk.addMethod(
  392. "_renderButtonsOn_",
  393. smalltalk.method({
  394. selector: "renderButtonsOn:",
  395. fn: function (html) {
  396. var self = this;
  397. var $1, $3, $4, $5, $6, $7, $8, $2, $9, $10;
  398. $1 = smalltalk.send(html, "_div", []);
  399. smalltalk.send($1, "_class_", ["btn-group"]);
  400. smalltalk.send($1, "_at_put_", ["data-toggle", "buttons-radio"]);
  401. $2 = smalltalk.send($1, "_with_", [function () {$3 = smalltalk.send(html, "_button", []);smalltalk.send($3, "_class_", [smalltalk.send(smalltalk.String || String, "_streamContents_", [function (str) {smalltalk.send(str, "_nextPutAll_", ["btn"]);$4 = smalltalk.send(self, "_showInstance", []);if (smalltalk.assert($4)) {return smalltalk.send(str, "_nextPutAll_", [" active"]);}}])]);smalltalk.send($3, "_with_", ["Instance"]);$5 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(self, "_showInstance_", [true]);}]);$5;$6 = smalltalk.send(html, "_button", []);smalltalk.send($6, "_class_", [smalltalk.send(smalltalk.String || String, "_streamContents_", [function (str) {smalltalk.send(str, "_nextPutAll_", ["btn"]);$7 = smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance", []);if (!smalltalk.assert($7)) {return smalltalk.send(str, "_nextPutAll_", [" active"]);}}])]);smalltalk.send($6, "_with_", ["Class"]);$8 = smalltalk.send($6, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance_", [false]);}]);return $8;}]);
  402. $9 = smalltalk.send(html, "_button", []);
  403. smalltalk.send($9, "_class_", ["btn"]);
  404. smalltalk.send($9, "_at_put_", ["data-toggle", "button"]);
  405. $10 = smalltalk.send($9, "_with_", ["Comment"]);
  406. return self;
  407. }
  408. }),
  409. smalltalk.HLClassesListWidget);
  410. smalltalk.addMethod(
  411. "_renderItem_level_on_",
  412. smalltalk.method({
  413. selector: "renderItem:level:on:",
  414. fn: function (aClass, anInteger, html) {
  415. var self = this;
  416. var $2, $3, $1;
  417. var li;
  418. li = smalltalk.send(html, "_li", []);
  419. smalltalk.send(li, "_at_put_", ["list-data", smalltalk.send(smalltalk.send(self, "_items", []), "_indexOf_", [aClass])]);
  420. smalltalk.send(li, "_class_", [smalltalk.send(self, "_cssClassForItem_", [aClass])]);
  421. $1 = smalltalk.send(li, "_with_", [function () {$2 = smalltalk.send(html, "_a", []);smalltalk.send($2, "_with_", [function () {smalltalk.send(smalltalk.send(html, "_tag_", ["i"]), "_class_", [smalltalk.send(self, "_iconForItem_", [aClass])]);return smalltalk.send(self, "_renderItemLabel_level_on_", [aClass, anInteger, html]);}]);$3 = smalltalk.send($2, "_onClick_", [function () {return smalltalk.send(self, "_activateListItem_", [smalltalk.send(li, "_asJQuery", [])]);}]);return $3;}]);
  422. smalltalk.send(smalltalk.send(self, "_getChildrenOf_", [aClass]), "_do_", [function (each) {return smalltalk.send(self, "_renderItem_level_on_", [each, smalltalk.send(anInteger, "__plus", [1]), html]);}]);
  423. return self;
  424. }
  425. }),
  426. smalltalk.HLClassesListWidget);
  427. smalltalk.addMethod(
  428. "_renderItem_on_",
  429. smalltalk.method({
  430. selector: "renderItem:on:",
  431. fn: function (aClass, html) {
  432. var self = this;
  433. smalltalk.send(self, "_renderItem_on_", [aClass, html], smalltalk.HLBrowserListWidget);
  434. smalltalk.send(smalltalk.send(self, "_getChildrenOf_", [aClass]), "_do_", [function (each) {return smalltalk.send(self, "_renderItem_level_on_", [each, 1, html]);}]);
  435. return self;
  436. }
  437. }),
  438. smalltalk.HLClassesListWidget);
  439. smalltalk.addMethod(
  440. "_renderItemLabel_level_on_",
  441. smalltalk.method({
  442. selector: "renderItemLabel:level:on:",
  443. fn: function (aClass, anInteger, html) {
  444. var self = this;
  445. smalltalk.send(smalltalk.send(smalltalk.send(html, "_span", []), "_asJQuery", []), "_html_", [smalltalk.send(smalltalk.String || String, "_streamContents_", [function (str) {smalltalk.send(anInteger, "_timesRepeat_", [function () {return smalltalk.send(str, "_nextPutAll_", ["    "]);}]);return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(aClass, "_name", [])]);}])]);
  446. return self;
  447. }
  448. }),
  449. smalltalk.HLClassesListWidget);
  450. smalltalk.addMethod(
  451. "_renderItemLabel_on_",
  452. smalltalk.method({
  453. selector: "renderItemLabel:on:",
  454. fn: function (aClass, html) {
  455. var self = this;
  456. smalltalk.send(self, "_renderItemLabel_level_on_", [aClass, 0, html]);
  457. return self;
  458. }
  459. }),
  460. smalltalk.HLClassesListWidget);
  461. smalltalk.addMethod(
  462. "_renderListOn_",
  463. smalltalk.method({
  464. selector: "renderListOn:",
  465. fn: function (html) {
  466. var self = this;
  467. smalltalk.send(smalltalk.send(self, "_getRootClassesOf_", [smalltalk.send(self, "_items", [])]), "_do_", [function (each) {return smalltalk.send(self, "_renderItem_on_", [each, html]);}]);
  468. return self;
  469. }
  470. }),
  471. smalltalk.HLClassesListWidget);
  472. smalltalk.addMethod(
  473. "_selectItem_",
  474. smalltalk.method({
  475. selector: "selectItem:",
  476. fn: function (aClass) {
  477. var self = this;
  478. smalltalk.send(self, "_selectItem_", [aClass], smalltalk.HLBrowserListWidget);
  479. smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass_", [aClass]);
  480. return self;
  481. }
  482. }),
  483. smalltalk.HLClassesListWidget);
  484. smalltalk.addMethod(
  485. "_showInstance",
  486. smalltalk.method({
  487. selector: "showInstance",
  488. fn: function () {
  489. var self = this;
  490. var $1;
  491. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance", []);
  492. return $1;
  493. }
  494. }),
  495. smalltalk.HLClassesListWidget);
  496. smalltalk.addMethod(
  497. "_showInstance_",
  498. smalltalk.method({
  499. selector: "showInstance:",
  500. fn: function (aBoolean) {
  501. var self = this;
  502. smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance_", [aBoolean]);
  503. return self;
  504. }
  505. }),
  506. smalltalk.HLClassesListWidget);
  507. smalltalk.addClass('HLMethodsListWidget', smalltalk.HLBrowserListWidget, ['selectorsCache'], 'Helios-Browser');
  508. smalltalk.addMethod(
  509. "_allProtocol",
  510. smalltalk.method({
  511. selector: "allProtocol",
  512. fn: function () {
  513. var self = this;
  514. var $1;
  515. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_allProtocol", []);
  516. return $1;
  517. }
  518. }),
  519. smalltalk.HLMethodsListWidget);
  520. smalltalk.addMethod(
  521. "_flushSelectorsCache",
  522. smalltalk.method({
  523. selector: "flushSelectorsCache",
  524. fn: function () {
  525. var self = this;
  526. self['@selectorsCache'] = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  527. return self;
  528. }
  529. }),
  530. smalltalk.HLMethodsListWidget);
  531. smalltalk.addMethod(
  532. "_iconForItem_",
  533. smalltalk.method({
  534. selector: "iconForItem:",
  535. fn: function (aCompiledMethod) {
  536. var self = this;
  537. var $1;
  538. var override;
  539. var overriden;
  540. override = smalltalk.send(self, "_isOverride_", [aCompiledMethod]);
  541. overriden = smalltalk.send(self, "_isOverriden_", [aCompiledMethod]);
  542. if (smalltalk.assert(override)) {
  543. if (smalltalk.assert(overriden)) {
  544. $1 = "icon-resize-vertical";
  545. } else {
  546. $1 = "icon-arrow-up";
  547. }
  548. } else {
  549. if (smalltalk.assert(overriden)) {
  550. $1 = "icon-arrow-down";
  551. } else {
  552. $1 = "icon-none";
  553. }
  554. }
  555. return $1;
  556. }
  557. }),
  558. smalltalk.HLMethodsListWidget);
  559. smalltalk.addMethod(
  560. "_initialize",
  561. smalltalk.method({
  562. selector: "initialize",
  563. fn: function () {
  564. var self = this;
  565. smalltalk.send(self, "_initialize", [], smalltalk.HLBrowserListWidget);
  566. smalltalk.send(self, "_flushSelectorsCache", []);
  567. return self;
  568. }
  569. }),
  570. smalltalk.HLMethodsListWidget);
  571. smalltalk.addMethod(
  572. "_isOverride_",
  573. smalltalk.method({
  574. selector: "isOverride:",
  575. fn: function (aMethod) {
  576. var self = this;
  577. var $1;
  578. $1 = smalltalk.send(smalltalk.send(self, "_overrideSelectors", []), "_includes_", [smalltalk.send(aMethod, "_selector", [])]);
  579. return $1;
  580. }
  581. }),
  582. smalltalk.HLMethodsListWidget);
  583. smalltalk.addMethod(
  584. "_isOverriden_",
  585. smalltalk.method({
  586. selector: "isOverriden:",
  587. fn: function (aMethod) {
  588. var self = this;
  589. var $1;
  590. $1 = smalltalk.send(smalltalk.send(self, "_overridenSelectors", []), "_includes_", [smalltalk.send(aMethod, "_selector", [])]);
  591. return $1;
  592. }
  593. }),
  594. smalltalk.HLMethodsListWidget);
  595. smalltalk.addMethod(
  596. "_methodsInProtocol_",
  597. smalltalk.method({
  598. selector: "methodsInProtocol:",
  599. fn: function (aString) {
  600. var self = this;
  601. var $2, $1;
  602. $2 = smalltalk.send(aString, "__eq", [smalltalk.send(self, "_allProtocol", [])]);
  603. if (smalltalk.assert($2)) {
  604. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []), "_methods", []);
  605. } else {
  606. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []), "_methodsInProtocol_", [aString]);
  607. }
  608. return $1;
  609. }
  610. }),
  611. smalltalk.HLMethodsListWidget);
  612. smalltalk.addMethod(
  613. "_observeModel",
  614. smalltalk.method({
  615. selector: "observeModel",
  616. fn: function () {
  617. var self = this;
  618. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_onProtocolSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  619. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_onProtocolSelected_", [nil]);}]);
  620. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLMethodSelected || HLMethodSelected, function (ann) {return smalltalk.send(self, "_onMethodSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  621. return self;
  622. }
  623. }),
  624. smalltalk.HLMethodsListWidget);
  625. smalltalk.addMethod(
  626. "_onMethodSelected_",
  627. smalltalk.method({
  628. selector: "onMethodSelected:",
  629. fn: function (aMethod) {
  630. var self = this;
  631. smalltalk.send(self, "_focus", []);
  632. return self;
  633. }
  634. }),
  635. smalltalk.HLMethodsListWidget);
  636. smalltalk.addMethod(
  637. "_onProtocolSelected_",
  638. smalltalk.method({
  639. selector: "onProtocolSelected:",
  640. fn: function (aString) {
  641. var self = this;
  642. var $2, $1;
  643. smalltalk.send(self, "_selectedItem_", [nil]);
  644. $2 = smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []);
  645. if (($receiver = $2) == nil || $receiver == undefined) {
  646. $1 = [];
  647. } else {
  648. if (($receiver = aString) == nil || $receiver == undefined) {
  649. $1 = [];
  650. } else {
  651. $1 = smalltalk.send(self, "_methodsInProtocol_", [aString]);
  652. }
  653. }
  654. smalltalk.send(self, "_items_", [$1]);
  655. smalltalk.send(self, "_refresh", []);
  656. return self;
  657. }
  658. }),
  659. smalltalk.HLMethodsListWidget);
  660. smalltalk.addMethod(
  661. "_overrideSelectors",
  662. smalltalk.method({
  663. selector: "overrideSelectors",
  664. fn: function () {
  665. var self = this;
  666. var $2, $1;
  667. $1 = smalltalk.send(smalltalk.send(self, "_selectorsCache", []), "_at_ifAbsentPut_", ["override", function () {return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []), "_allSuperclasses", []), "_inject_into_", [smalltalk.send(smalltalk.Set || Set, "_new", []), function (acc, each) {smalltalk.send(acc, "_addAll_", [smalltalk.send(each, "_selectors", [])]);$2 = smalltalk.send(acc, "_yourself", []);return $2;}]);}]);
  668. return $1;
  669. }
  670. }),
  671. smalltalk.HLMethodsListWidget);
  672. smalltalk.addMethod(
  673. "_overridenSelectors",
  674. smalltalk.method({
  675. selector: "overridenSelectors",
  676. fn: function () {
  677. var self = this;
  678. var $2, $1;
  679. $1 = smalltalk.send(smalltalk.send(self, "_selectorsCache", []), "_at_ifAbsentPut_", ["overriden", function () {return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []), "_allSubclasses", []), "_inject_into_", [smalltalk.send(smalltalk.Set || Set, "_new", []), function (acc, each) {smalltalk.send(acc, "_addAll_", [smalltalk.send(each, "_selectors", [])]);$2 = smalltalk.send(acc, "_yourself", []);return $2;}]);}]);
  680. return $1;
  681. }
  682. }),
  683. smalltalk.HLMethodsListWidget);
  684. smalltalk.addMethod(
  685. "_renderContentOn_",
  686. smalltalk.method({
  687. selector: "renderContentOn:",
  688. fn: function (html) {
  689. var self = this;
  690. var $1, $2, $3;
  691. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance", []);
  692. if (smalltalk.assert($1)) {
  693. smalltalk.send(self, "_renderContentOn_", [html], smalltalk.HLBrowserListWidget);
  694. } else {
  695. $2 = smalltalk.send(html, "_div", []);
  696. smalltalk.send($2, "_class_", ["class_side"]);
  697. $3 = smalltalk.send($2, "_with_", [function () {return smalltalk.send(self, "_renderContentOn_", [html], smalltalk.HLBrowserListWidget);}]);
  698. }
  699. smalltalk.send(self, "_flushSelectorsCache", []);
  700. return self;
  701. }
  702. }),
  703. smalltalk.HLMethodsListWidget);
  704. smalltalk.addMethod(
  705. "_renderItemLabel_on_",
  706. smalltalk.method({
  707. selector: "renderItemLabel:on:",
  708. fn: function (aCompiledMethod, html) {
  709. var self = this;
  710. smalltalk.send(html, "_with_", [smalltalk.send(aCompiledMethod, "_selector", [])]);
  711. return self;
  712. }
  713. }),
  714. smalltalk.HLMethodsListWidget);
  715. smalltalk.addMethod(
  716. "_selectItem_",
  717. smalltalk.method({
  718. selector: "selectItem:",
  719. fn: function (aCompiledMethod) {
  720. var self = this;
  721. smalltalk.send(self, "_selectItem_", [aCompiledMethod], smalltalk.HLBrowserListWidget);
  722. smalltalk.send(smalltalk.send(self, "_model", []), "_selectedMethod_", [aCompiledMethod]);
  723. return self;
  724. }
  725. }),
  726. smalltalk.HLMethodsListWidget);
  727. smalltalk.addMethod(
  728. "_selectorsCache",
  729. smalltalk.method({
  730. selector: "selectorsCache",
  731. fn: function () {
  732. var self = this;
  733. return self['@selectorsCache'];
  734. }
  735. }),
  736. smalltalk.HLMethodsListWidget);
  737. smalltalk.addClass('HLPackagesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  738. smalltalk.addMethod(
  739. "_focusClassesListWidget",
  740. smalltalk.method({
  741. selector: "focusClassesListWidget",
  742. fn: function () {
  743. var self = this;
  744. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLClassesListFocus || HLClassesListFocus, "_new", [])]);
  745. return self;
  746. }
  747. }),
  748. smalltalk.HLPackagesListWidget);
  749. smalltalk.addMethod(
  750. "_initializeItems",
  751. smalltalk.method({
  752. selector: "initializeItems",
  753. fn: function () {
  754. var self = this;
  755. var $1;
  756. self['@items'] = smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_packages", []), "_sort_", [function (a, b) {return smalltalk.send(smalltalk.send(a, "_name", []), "__lt", [smalltalk.send(b, "_name", [])]);}]);
  757. $1 = self['@items'];
  758. return $1;
  759. }
  760. }),
  761. smalltalk.HLPackagesListWidget);
  762. smalltalk.addMethod(
  763. "_items",
  764. smalltalk.method({
  765. selector: "items",
  766. fn: function () {
  767. var self = this;
  768. var $1;
  769. if (($receiver = self['@items']) == nil || $receiver == undefined) {
  770. $1 = smalltalk.send(self, "_initializeItems", []);
  771. } else {
  772. $1 = self['@items'];
  773. }
  774. return $1;
  775. }
  776. }),
  777. smalltalk.HLPackagesListWidget);
  778. smalltalk.addMethod(
  779. "_observeModel",
  780. smalltalk.method({
  781. selector: "observeModel",
  782. fn: function () {
  783. var self = this;
  784. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLPackageSelected || HLPackageSelected, function (ann) {return smalltalk.send(self, "_onPackageSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  785. return self;
  786. }
  787. }),
  788. smalltalk.HLPackagesListWidget);
  789. smalltalk.addMethod(
  790. "_onPackageSelected_",
  791. smalltalk.method({
  792. selector: "onPackageSelected:",
  793. fn: function (aPackage) {
  794. var self = this;
  795. smalltalk.send(self, "_focus", []);
  796. return self;
  797. }
  798. }),
  799. smalltalk.HLPackagesListWidget);
  800. smalltalk.addMethod(
  801. "_renderButtonsOn_",
  802. smalltalk.method({
  803. selector: "renderButtonsOn:",
  804. fn: function (html) {
  805. var self = this;
  806. var $1, $2, $3, $5, $6, $7, $8, $4, $9, $10;
  807. $1 = smalltalk.send(html, "_span", []);
  808. smalltalk.send($1, "_class_", ["info"]);
  809. $2 = smalltalk.send($1, "_with_", ["Auto commit"]);
  810. $3 = smalltalk.send(html, "_div", []);
  811. smalltalk.send($3, "_class_", ["btn-group switch"]);
  812. smalltalk.send($3, "_at_put_", ["data-toggle", "buttons-radio"]);
  813. $4 = smalltalk.send($3, "_with_", [function () {$5 = smalltalk.send(html, "_button", []);smalltalk.send($5, "_class_", [smalltalk.send(smalltalk.String || String, "_streamContents_", [function (str) {return smalltalk.send(str, "_nextPutAll_", ["btn"]);}])]);$6 = smalltalk.send($5, "_with_", ["On"]);$6;$7 = smalltalk.send(html, "_button", []);smalltalk.send($7, "_class_", [smalltalk.send(smalltalk.String || String, "_streamContents_", [function (str) {return smalltalk.send(str, "_nextPutAll_", ["btn active"]);}])]);$8 = smalltalk.send($7, "_with_", ["Off"]);return $8;}]);
  814. $9 = smalltalk.send(html, "_a", []);
  815. smalltalk.send($9, "_class_", ["btn"]);
  816. $10 = smalltalk.send($9, "_with_", ["Commit"]);
  817. return self;
  818. }
  819. }),
  820. smalltalk.HLPackagesListWidget);
  821. smalltalk.addMethod(
  822. "_selectItem_",
  823. smalltalk.method({
  824. selector: "selectItem:",
  825. fn: function (aPackage) {
  826. var self = this;
  827. smalltalk.send(self, "_selectItem_", [aPackage], smalltalk.HLBrowserListWidget);
  828. smalltalk.send(smalltalk.send(self, "_model", []), "_selectedPackage_", [aPackage]);
  829. return self;
  830. }
  831. }),
  832. smalltalk.HLPackagesListWidget);
  833. smalltalk.addClass('HLProtocolsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  834. smalltalk.addMethod(
  835. "_allProtocol",
  836. smalltalk.method({
  837. selector: "allProtocol",
  838. fn: function () {
  839. var self = this;
  840. var $1;
  841. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_allProtocol", []);
  842. return $1;
  843. }
  844. }),
  845. smalltalk.HLProtocolsListWidget);
  846. smalltalk.addMethod(
  847. "_observeModel",
  848. smalltalk.method({
  849. selector: "observeModel",
  850. fn: function () {
  851. var self = this;
  852. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_onClassSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  853. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_onClassSelected_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", [])]);}]);
  854. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_onProtocolSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  855. return self;
  856. }
  857. }),
  858. smalltalk.HLProtocolsListWidget);
  859. smalltalk.addMethod(
  860. "_onClassSelected_",
  861. smalltalk.method({
  862. selector: "onClassSelected:",
  863. fn: function (aClass) {
  864. var self = this;
  865. var $2, $3, $1;
  866. smalltalk.send(self, "_selectedItem_", [nil]);
  867. if (($receiver = aClass) == nil || $receiver == undefined) {
  868. $1 = smalltalk.send(smalltalk.Array || Array, "_with_", [smalltalk.send(self, "_allProtocol", [])]);
  869. } else {
  870. $2 = smalltalk.send(smalltalk.Array || Array, "_with_", [smalltalk.send(self, "_allProtocol", [])]);
  871. smalltalk.send($2, "_addAll_", [smalltalk.send(aClass, "_protocols", [])]);
  872. $3 = smalltalk.send($2, "_yourself", []);
  873. $1 = $3;
  874. }
  875. smalltalk.send(self, "_items_", [$1]);
  876. smalltalk.send(self, "_refresh", []);
  877. return self;
  878. }
  879. }),
  880. smalltalk.HLProtocolsListWidget);
  881. smalltalk.addMethod(
  882. "_onProtocolSelected_",
  883. smalltalk.method({
  884. selector: "onProtocolSelected:",
  885. fn: function (aString) {
  886. var self = this;
  887. smalltalk.send(self, "_focus", []);
  888. return self;
  889. }
  890. }),
  891. smalltalk.HLProtocolsListWidget);
  892. smalltalk.addMethod(
  893. "_renderContentOn_",
  894. smalltalk.method({
  895. selector: "renderContentOn:",
  896. fn: function (html) {
  897. var self = this;
  898. var $1, $2, $3;
  899. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance", []);
  900. if (smalltalk.assert($1)) {
  901. smalltalk.send(self, "_renderContentOn_", [html], smalltalk.HLBrowserListWidget);
  902. } else {
  903. $2 = smalltalk.send(html, "_div", []);
  904. smalltalk.send($2, "_class_", ["class_side"]);
  905. $3 = smalltalk.send($2, "_with_", [function () {return smalltalk.send(self, "_renderContentOn_", [html], smalltalk.HLBrowserListWidget);}]);
  906. }
  907. return self;
  908. }
  909. }),
  910. smalltalk.HLProtocolsListWidget);
  911. smalltalk.addMethod(
  912. "_selectItem_",
  913. smalltalk.method({
  914. selector: "selectItem:",
  915. fn: function (aString) {
  916. var self = this;
  917. smalltalk.send(self, "_selectItem_", [aString], smalltalk.HLBrowserListWidget);
  918. smalltalk.send(smalltalk.send(self, "_model", []), "_selectedProtocol_", [aString]);
  919. return self;
  920. }
  921. }),
  922. smalltalk.HLProtocolsListWidget);
  923. smalltalk.addMethod(
  924. "_selectedItem",
  925. smalltalk.method({
  926. selector: "selectedItem",
  927. fn: function () {
  928. var self = this;
  929. var $1;
  930. $1 = smalltalk.send(self, "_selectedItem", [], smalltalk.HLBrowserListWidget);
  931. return $1;
  932. }
  933. }),
  934. smalltalk.HLProtocolsListWidget);
  935. smalltalk.addClass('HLBrowserModel', smalltalk.Object, ['announcer', 'environment', 'selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'showInstance', 'showComment'], 'Helios-Browser');
  936. smalltalk.addMethod(
  937. "_allProtocol",
  938. smalltalk.method({
  939. selector: "allProtocol",
  940. fn: function () {
  941. var self = this;
  942. return "-- All --";
  943. }
  944. }),
  945. smalltalk.HLBrowserModel);
  946. smalltalk.addMethod(
  947. "_announcer",
  948. smalltalk.method({
  949. selector: "announcer",
  950. fn: function () {
  951. var self = this;
  952. var $1;
  953. if (($receiver = self['@announcer']) == nil || $receiver == undefined) {
  954. self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
  955. $1 = self['@announcer'];
  956. } else {
  957. $1 = self['@announcer'];
  958. }
  959. return $1;
  960. }
  961. }),
  962. smalltalk.HLBrowserModel);
  963. smalltalk.addMethod(
  964. "_environment",
  965. smalltalk.method({
  966. selector: "environment",
  967. fn: function () {
  968. var self = this;
  969. var $1;
  970. if (($receiver = self['@environment']) == nil || $receiver == undefined) {
  971. $1 = smalltalk.send(smalltalk.send(smalltalk.HLManager || HLManager, "_current", []), "_environment", []);
  972. } else {
  973. $1 = self['@environment'];
  974. }
  975. return $1;
  976. }
  977. }),
  978. smalltalk.HLBrowserModel);
  979. smalltalk.addMethod(
  980. "_environment_",
  981. smalltalk.method({
  982. selector: "environment:",
  983. fn: function (anEnvironment) {
  984. var self = this;
  985. self['@environment'] = anEnvironment;
  986. return self;
  987. }
  988. }),
  989. smalltalk.HLBrowserModel);
  990. smalltalk.addMethod(
  991. "_packages",
  992. smalltalk.method({
  993. selector: "packages",
  994. fn: function () {
  995. var self = this;
  996. var $1;
  997. $1 = smalltalk.send(smalltalk.send(self, "_environment", []), "_packages", []);
  998. return $1;
  999. }
  1000. }),
  1001. smalltalk.HLBrowserModel);
  1002. smalltalk.addMethod(
  1003. "_selectedClass",
  1004. smalltalk.method({
  1005. selector: "selectedClass",
  1006. fn: function () {
  1007. var self = this;
  1008. return self['@selectedClass'];
  1009. }
  1010. }),
  1011. smalltalk.HLBrowserModel);
  1012. smalltalk.addMethod(
  1013. "_selectedClass_",
  1014. smalltalk.method({
  1015. selector: "selectedClass:",
  1016. fn: function (aClass) {
  1017. var self = this;
  1018. var $1, $2, $3;
  1019. $1 = smalltalk.send(self['@selectedClass'], "__eq", [aClass]);
  1020. if (!smalltalk.assert($1)) {
  1021. if (($receiver = aClass) == nil || $receiver == undefined) {
  1022. self['@selectedClass'] = nil;
  1023. self['@selectedClass'];
  1024. } else {
  1025. $2 = smalltalk.send(self, "_showInstance", []);
  1026. if (smalltalk.assert($2)) {
  1027. self['@selectedClass'] = smalltalk.send(aClass, "_theNonMetaClass", []);
  1028. self['@selectedClass'];
  1029. } else {
  1030. self['@selectedClass'] = smalltalk.send(aClass, "_theMetaClass", []);
  1031. self['@selectedClass'];
  1032. }
  1033. }
  1034. smalltalk.send(self, "_selectedMethod_", [nil]);
  1035. $3 = smalltalk.send(self, "_selectedProtocol_", [nil]);
  1036. }
  1037. smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLClassSelected || HLClassSelected, "_on_", [smalltalk.send(self, "_selectedClass", [])])]);
  1038. return self;
  1039. }
  1040. }),
  1041. smalltalk.HLBrowserModel);
  1042. smalltalk.addMethod(
  1043. "_selectedMethod",
  1044. smalltalk.method({
  1045. selector: "selectedMethod",
  1046. fn: function () {
  1047. var self = this;
  1048. return self['@selectedMethod'];
  1049. }
  1050. }),
  1051. smalltalk.HLBrowserModel);
  1052. smalltalk.addMethod(
  1053. "_selectedMethod_",
  1054. smalltalk.method({
  1055. selector: "selectedMethod:",
  1056. fn: function (aCompiledMethod) {
  1057. var self = this;
  1058. var $1;
  1059. $1 = smalltalk.send(self['@selectedMethod'], "__eq", [aCompiledMethod]);
  1060. if (!smalltalk.assert($1)) {
  1061. self['@selectedMethod'] = aCompiledMethod;
  1062. self['@selectedMethod'];
  1063. }
  1064. smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLMethodSelected || HLMethodSelected, "_on_", [aCompiledMethod])]);
  1065. return self;
  1066. }
  1067. }),
  1068. smalltalk.HLBrowserModel);
  1069. smalltalk.addMethod(
  1070. "_selectedPackage",
  1071. smalltalk.method({
  1072. selector: "selectedPackage",
  1073. fn: function () {
  1074. var self = this;
  1075. return self['@selectedPackage'];
  1076. }
  1077. }),
  1078. smalltalk.HLBrowserModel);
  1079. smalltalk.addMethod(
  1080. "_selectedPackage_",
  1081. smalltalk.method({
  1082. selector: "selectedPackage:",
  1083. fn: function (aPackage) {
  1084. var self = this;
  1085. var $1;
  1086. $1 = smalltalk.send(self['@selectedPackage'], "__eq", [aPackage]);
  1087. if (!smalltalk.assert($1)) {
  1088. self['@selectedPackage'] = aPackage;
  1089. self['@selectedPackage'];
  1090. smalltalk.send(self, "_selectedClass_", [nil]);
  1091. }
  1092. smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLPackageSelected || HLPackageSelected, "_on_", [aPackage])]);
  1093. return self;
  1094. }
  1095. }),
  1096. smalltalk.HLBrowserModel);
  1097. smalltalk.addMethod(
  1098. "_selectedProtocol",
  1099. smalltalk.method({
  1100. selector: "selectedProtocol",
  1101. fn: function () {
  1102. var self = this;
  1103. return self['@selectedProtocol'];
  1104. }
  1105. }),
  1106. smalltalk.HLBrowserModel);
  1107. smalltalk.addMethod(
  1108. "_selectedProtocol_",
  1109. smalltalk.method({
  1110. selector: "selectedProtocol:",
  1111. fn: function (aString) {
  1112. var self = this;
  1113. var $1;
  1114. $1 = smalltalk.send(self['@selectedProtocol'], "__eq", [aString]);
  1115. if (!smalltalk.assert($1)) {
  1116. self['@selectedProtocol'] = aString;
  1117. self['@selectedProtocol'];
  1118. smalltalk.send(self, "_selectedMethod_", [nil]);
  1119. }
  1120. smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLProtocolSelected || HLProtocolSelected, "_on_", [aString])]);
  1121. return self;
  1122. }
  1123. }),
  1124. smalltalk.HLBrowserModel);
  1125. smalltalk.addMethod(
  1126. "_showComment",
  1127. smalltalk.method({
  1128. selector: "showComment",
  1129. fn: function () {
  1130. var self = this;
  1131. var $1;
  1132. if (($receiver = self['@showComment']) == nil || $receiver == undefined) {
  1133. $1 = false;
  1134. } else {
  1135. $1 = self['@showComment'];
  1136. }
  1137. return $1;
  1138. }
  1139. }),
  1140. smalltalk.HLBrowserModel);
  1141. smalltalk.addMethod(
  1142. "_showComment_",
  1143. smalltalk.method({
  1144. selector: "showComment:",
  1145. fn: function (aBoolean) {
  1146. var self = this;
  1147. self['@showComment'] = aBoolean;
  1148. smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLShowCommentToggled || HLShowCommentToggled, "_new", [])]);
  1149. return self;
  1150. }
  1151. }),
  1152. smalltalk.HLBrowserModel);
  1153. smalltalk.addMethod(
  1154. "_showInstance",
  1155. smalltalk.method({
  1156. selector: "showInstance",
  1157. fn: function () {
  1158. var self = this;
  1159. var $1;
  1160. if (($receiver = self['@showInstance']) == nil ||
  1161. $receiver == undefined) {
  1162. $1 = true;
  1163. } else {
  1164. $1 = self['@showInstance'];
  1165. }
  1166. return $1;
  1167. }
  1168. }),
  1169. smalltalk.HLBrowserModel);
  1170. smalltalk.addMethod(
  1171. "_showInstance_",
  1172. smalltalk.method({
  1173. selector: "showInstance:",
  1174. fn: function (aBoolean) {
  1175. var self = this;
  1176. var $1, $2;
  1177. self['@showInstance'] = aBoolean;
  1178. $1 = smalltalk.send(self, "_selectedClass", []);
  1179. if (($receiver = $1) == nil || $receiver == undefined) {
  1180. } else {
  1181. if (smalltalk.assert(aBoolean)) {
  1182. $2 = smalltalk.send(smalltalk.send(self, "_selectedClass", []), "_theNonMetaClass", []);
  1183. } else {
  1184. $2 = smalltalk.send(smalltalk.send(self, "_selectedClass", []), "_theMetaClass", []);
  1185. }
  1186. smalltalk.send(self, "_selectedClass_", [$2]);
  1187. }
  1188. smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, "_new", [])]);
  1189. return self;
  1190. }
  1191. }),
  1192. smalltalk.HLBrowserModel);
  1193. smalltalk.addMethod(
  1194. "_on_",
  1195. smalltalk.method({
  1196. selector: "on:",
  1197. fn: function (anEnvironment) {
  1198. var self = this;
  1199. var $2, $3, $1;
  1200. $2 = smalltalk.send(self, "_new", []);
  1201. smalltalk.send($2, "_environment_", [anEnvironment]);
  1202. $3 = smalltalk.send($2, "_yourself", []);
  1203. $1 = $3;
  1204. return $1;
  1205. }
  1206. }),
  1207. smalltalk.HLBrowserModel.klass);
  1208. smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'codeWidget'], 'Helios-Browser');
  1209. smalltalk.addMethod(
  1210. "_codeWidget",
  1211. smalltalk.method({
  1212. selector: "codeWidget",
  1213. fn: function () {
  1214. var self = this;
  1215. var $1;
  1216. if (($receiver = self['@codeWidget']) == nil || $receiver == undefined) {
  1217. self['@codeWidget'] = smalltalk.send(smalltalk.HLCodeWidget || HLCodeWidget, "_new", []);
  1218. $1 = self['@codeWidget'];
  1219. } else {
  1220. $1 = self['@codeWidget'];
  1221. }
  1222. return $1;
  1223. }
  1224. }),
  1225. smalltalk.HLBrowserSourceWidget);
  1226. smalltalk.addMethod(
  1227. "_contents",
  1228. smalltalk.method({
  1229. selector: "contents",
  1230. fn: function () {
  1231. var self = this;
  1232. var $1;
  1233. $1 = smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_contents", []);
  1234. return $1;
  1235. }
  1236. }),
  1237. smalltalk.HLBrowserSourceWidget);
  1238. smalltalk.addMethod(
  1239. "_contents_",
  1240. smalltalk.method({
  1241. selector: "contents:",
  1242. fn: function (aString) {
  1243. var self = this;
  1244. smalltalk.send(smalltalk.send(self, "_codeWidget", []), "_contents_", [aString]);
  1245. return self;
  1246. }
  1247. }),
  1248. smalltalk.HLBrowserSourceWidget);
  1249. smalltalk.addMethod(
  1250. "_model",
  1251. smalltalk.method({
  1252. selector: "model",
  1253. fn: function () {
  1254. var self = this;
  1255. return self['@model'];
  1256. }
  1257. }),
  1258. smalltalk.HLBrowserSourceWidget);
  1259. smalltalk.addMethod(
  1260. "_model_",
  1261. smalltalk.method({
  1262. selector: "model:",
  1263. fn: function (aBrowserModel) {
  1264. var self = this;
  1265. self['@model'] = aBrowserModel;
  1266. smalltalk.send(self, "_observeModel", []);
  1267. return self;
  1268. }
  1269. }),
  1270. smalltalk.HLBrowserSourceWidget);
  1271. smalltalk.addMethod(
  1272. "_observeModel",
  1273. smalltalk.method({
  1274. selector: "observeModel",
  1275. fn: function () {
  1276. var self = this;
  1277. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLMethodSelected || HLMethodSelected, function (ann) {return smalltalk.send(self, "_onMethodSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  1278. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_onClassSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  1279. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_onProtocolSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  1280. return self;
  1281. }
  1282. }),
  1283. smalltalk.HLBrowserSourceWidget);
  1284. smalltalk.addMethod(
  1285. "_onClassSelected_",
  1286. smalltalk.method({
  1287. selector: "onClassSelected:",
  1288. fn: function (aClass) {
  1289. var self = this;
  1290. var $1;
  1291. if (($receiver = aClass) == nil || $receiver == undefined) {
  1292. $1 = smalltalk.send(self, "_contents_", [""]);
  1293. return $1;
  1294. } else {
  1295. }
  1296. smalltalk.send(self, "_contents_", [smalltalk.send(aClass, "_definition", [])]);
  1297. return self;
  1298. }
  1299. }),
  1300. smalltalk.HLBrowserSourceWidget);
  1301. smalltalk.addMethod(
  1302. "_onMethodSelected_",
  1303. smalltalk.method({
  1304. selector: "onMethodSelected:",
  1305. fn: function (aCompiledMethod) {
  1306. var self = this;
  1307. var $1;
  1308. if (($receiver = aCompiledMethod) == nil || $receiver == undefined) {
  1309. $1 = smalltalk.send(self, "_contents_", [""]);
  1310. return $1;
  1311. } else {
  1312. }
  1313. smalltalk.send(self, "_contents_", [smalltalk.send(aCompiledMethod, "_source", [])]);
  1314. return self;
  1315. }
  1316. }),
  1317. smalltalk.HLBrowserSourceWidget);
  1318. smalltalk.addMethod(
  1319. "_onProtocolSelected_",
  1320. smalltalk.method({
  1321. selector: "onProtocolSelected:",
  1322. fn: function (aString) {
  1323. var self = this;
  1324. var $1, $2;
  1325. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []);
  1326. if (($receiver = $1) == nil || $receiver == undefined) {
  1327. $2 = smalltalk.send(self, "_contents_", [""]);
  1328. return $2;
  1329. } else {
  1330. }
  1331. smalltalk.send(self, "_contents_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []), "_definition", [])]);
  1332. return self;
  1333. }
  1334. }),
  1335. smalltalk.HLBrowserSourceWidget);
  1336. smalltalk.addMethod(
  1337. "_renderContentOn_",
  1338. smalltalk.method({
  1339. selector: "renderContentOn:",
  1340. fn: function (html) {
  1341. var self = this;
  1342. smalltalk.send(smalltalk.send(self, "_codeWidget", []), "_renderOn_", [html]);
  1343. return self;
  1344. }
  1345. }),
  1346. smalltalk.HLBrowserSourceWidget);
  1347. smalltalk.addMethod(
  1348. "_on_",
  1349. smalltalk.method({
  1350. selector: "on:",
  1351. fn: function (aBrowserModel) {
  1352. var self = this;
  1353. var $2, $3, $1;
  1354. $2 = smalltalk.send(self, "_new", []);
  1355. smalltalk.send($2, "_model_", [aBrowserModel]);
  1356. $3 = smalltalk.send($2, "_yourself", []);
  1357. $1 = $3;
  1358. return $1;
  1359. }
  1360. }),
  1361. smalltalk.HLBrowserSourceWidget.klass);