Helios-Browser.js 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821
  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. category: 'accessing',
  8. fn: function () {
  9. var self = this;
  10. var $1;
  11. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []);
  12. return $1;
  13. },
  14. args: [],
  15. source: "announcer\x0a\x09^ self model announcer",
  16. messageSends: ["announcer", "model"],
  17. referencedClasses: []
  18. }),
  19. smalltalk.HLBrowser);
  20. smalltalk.addMethod(
  21. "_classesListWidget",
  22. smalltalk.method({
  23. selector: "classesListWidget",
  24. category: 'widgets',
  25. fn: function () {
  26. var self = this;
  27. var $1;
  28. if (($receiver = self['@classesListWidget']) == nil ||
  29. $receiver == undefined) {
  30. self['@classesListWidget'] = smalltalk.send(smalltalk.HLClassesListWidget || HLClassesListWidget, "_on_", [smalltalk.send(self, "_model", [])]);
  31. self['@classesListWidget'];
  32. $1 = smalltalk.send(self['@classesListWidget'], "_next_", [smalltalk.send(self, "_protocolsListWidget", [])]);
  33. } else {
  34. $1 = self['@classesListWidget'];
  35. }
  36. return $1;
  37. },
  38. args: [],
  39. source: "classesListWidget\x0a\x09^ classesListWidget ifNil: [\x0a \x09classesListWidget := HLClassesListWidget on: self model.\x0a\x09\x09classesListWidget next: self protocolsListWidget ]",
  40. messageSends: ["ifNil:", "on:", "model", "next:", "protocolsListWidget"],
  41. referencedClasses: ["HLClassesListWidget"]
  42. }),
  43. smalltalk.HLBrowser);
  44. smalltalk.addMethod(
  45. "_environment",
  46. smalltalk.method({
  47. selector: "environment",
  48. category: 'accessing',
  49. fn: function () {
  50. var self = this;
  51. var $1;
  52. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_environment", []);
  53. return $1;
  54. },
  55. args: [],
  56. source: "environment\x0a\x09^ self model environment",
  57. messageSends: ["environment", "model"],
  58. referencedClasses: []
  59. }),
  60. smalltalk.HLBrowser);
  61. smalltalk.addMethod(
  62. "_methodsListWidget",
  63. smalltalk.method({
  64. selector: "methodsListWidget",
  65. category: 'widgets',
  66. fn: function () {
  67. var self = this;
  68. var $1;
  69. if (($receiver = self['@methodsListWidget']) == nil ||
  70. $receiver == undefined) {
  71. self['@methodsListWidget'] = smalltalk.send(smalltalk.HLMethodsListWidget || HLMethodsListWidget, "_on_", [smalltalk.send(self, "_model", [])]);
  72. $1 = self['@methodsListWidget'];
  73. } else {
  74. $1 = self['@methodsListWidget'];
  75. }
  76. return $1;
  77. },
  78. args: [],
  79. source: "methodsListWidget\x0a\x09^ methodsListWidget ifNil: [\x0a \x09methodsListWidget := HLMethodsListWidget on: self model ]",
  80. messageSends: ["ifNil:", "on:", "model"],
  81. referencedClasses: ["HLMethodsListWidget"]
  82. }),
  83. smalltalk.HLBrowser);
  84. smalltalk.addMethod(
  85. "_model",
  86. smalltalk.method({
  87. selector: "model",
  88. category: 'accessing',
  89. fn: function () {
  90. var self = this;
  91. var $1;
  92. if (($receiver = self['@model']) == nil || $receiver == undefined) {
  93. self['@model'] = smalltalk.send(smalltalk.HLBrowserModel || HLBrowserModel, "_new", []);
  94. $1 = self['@model'];
  95. } else {
  96. $1 = self['@model'];
  97. }
  98. return $1;
  99. },
  100. args: [],
  101. source: "model\x0a\x09^ model ifNil: [ model := HLBrowserModel new ]",
  102. messageSends: ["ifNil:", "new"],
  103. referencedClasses: ["HLBrowserModel"]
  104. }),
  105. smalltalk.HLBrowser);
  106. smalltalk.addMethod(
  107. "_model_",
  108. smalltalk.method({
  109. selector: "model:",
  110. category: 'accessing',
  111. fn: function (aModel) {
  112. var self = this;
  113. self['@model'] = aModel;
  114. return self;
  115. },
  116. args: ["aModel"],
  117. source: "model: aModel\x0a\x09model := aModel",
  118. messageSends: [],
  119. referencedClasses: []
  120. }),
  121. smalltalk.HLBrowser);
  122. smalltalk.addMethod(
  123. "_packagesListWidget",
  124. smalltalk.method({
  125. selector: "packagesListWidget",
  126. category: 'widgets',
  127. fn: function () {
  128. var self = this;
  129. var $1;
  130. if (($receiver = self['@packagesListWidget']) == nil ||
  131. $receiver == undefined) {
  132. self['@packagesListWidget'] = smalltalk.send(smalltalk.HLPackagesListWidget || HLPackagesListWidget, "_on_", [smalltalk.send(self, "_model", [])]);
  133. self['@packagesListWidget'];
  134. $1 = smalltalk.send(self['@packagesListWidget'], "_next_", [smalltalk.send(self, "_classesListWidget", [])]);
  135. } else {
  136. $1 = self['@packagesListWidget'];
  137. }
  138. return $1;
  139. },
  140. args: [],
  141. source: "packagesListWidget\x0a\x09^ packagesListWidget ifNil: [\x0a \x09packagesListWidget := HLPackagesListWidget on: self model.\x0a\x09\x09packagesListWidget next: self classesListWidget ]",
  142. messageSends: ["ifNil:", "on:", "model", "next:", "classesListWidget"],
  143. referencedClasses: ["HLPackagesListWidget"]
  144. }),
  145. smalltalk.HLBrowser);
  146. smalltalk.addMethod(
  147. "_protocolsListWidget",
  148. smalltalk.method({
  149. selector: "protocolsListWidget",
  150. category: 'widgets',
  151. fn: function () {
  152. var self = this;
  153. var $1;
  154. if (($receiver = self['@protocolsListWidget']) == nil ||
  155. $receiver == undefined) {
  156. self['@protocolsListWidget'] = smalltalk.send(smalltalk.HLProtocolsListWidget || HLProtocolsListWidget, "_on_", [smalltalk.send(self, "_model", [])]);
  157. self['@protocolsListWidget'];
  158. $1 = smalltalk.send(self['@protocolsListWidget'], "_next_", [smalltalk.send(self, "_methodsListWidget", [])]);
  159. } else {
  160. $1 = self['@protocolsListWidget'];
  161. }
  162. return $1;
  163. },
  164. args: [],
  165. source: "protocolsListWidget\x0a\x09^ protocolsListWidget ifNil: [\x0a \x09protocolsListWidget := HLProtocolsListWidget on: self model.\x0a\x09\x09protocolsListWidget next: self methodsListWidget ]",
  166. messageSends: ["ifNil:", "on:", "model", "next:", "methodsListWidget"],
  167. referencedClasses: ["HLProtocolsListWidget"]
  168. }),
  169. smalltalk.HLBrowser);
  170. smalltalk.addMethod(
  171. "_registerBindingsOn_",
  172. smalltalk.method({
  173. selector: "registerBindingsOn:",
  174. category: 'keybindings',
  175. fn: function (aBindingGroup) {
  176. var self = this;
  177. var $1, $2;
  178. smalltalk.send(aBindingGroup, "_addGroupKey_labelled_", [66, "Browse"]);
  179. smalltalk.send(aBindingGroup, "_addGroupKey_labelled_", [71, "Go to"]);
  180. $1 = smalltalk.send(aBindingGroup, "_addGroupKey_labelled_", [84, "Toggle"]);
  181. 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", [])]);}}]);
  182. return self;
  183. },
  184. args: ["aBindingGroup"],
  185. source: "registerBindingsOn: aBindingGroup\x0a\x09aBindingGroup \x0a \x09addGroupKey: 66 labelled: 'Browse';\x0a addGroupKey: 71 labelled: 'Go to';\x0a addGroupKey: 84 labelled: 'Toggle'.\x0a \x0a \x09HLBrowserCommand withAllSubclasses do: [ :each |\x0a \x09\x09each key ifNotNil: [\x0a \x09\x09\x09(aBindingGroup at: each bindingGroup) \x0a \x09\x09\x09\x09add: (each on: self model) asBinding ] ]",
  186. messageSends: ["addGroupKey:labelled:", "do:", "ifNotNil:", "add:", "asBinding", "on:", "model", "at:", "bindingGroup", "key", "withAllSubclasses"],
  187. referencedClasses: ["HLBrowserCommand"]
  188. }),
  189. smalltalk.HLBrowser);
  190. smalltalk.addMethod(
  191. "_renderContentOn_",
  192. smalltalk.method({
  193. selector: "renderContentOn:",
  194. category: 'rendering',
  195. fn: function (html) {
  196. var self = this;
  197. 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", [])])])]);
  198. return self;
  199. },
  200. args: ["html"],
  201. source: "renderContentOn: html\x0a\x09html with: (HLContainer with: (HLHorizontalSplitter \x0a \x09with: (HLVerticalSplitter\x0a \x09with: (HLVerticalSplitter\x0a \x09with: self packagesListWidget\x0a with: self classesListWidget)\x0a with: (HLVerticalSplitter\x0a \x09with: self protocolsListWidget\x0a with: self methodsListWidget)) \x0a with: self sourceWidget))",
  202. messageSends: ["with:", "with:with:", "packagesListWidget", "classesListWidget", "protocolsListWidget", "methodsListWidget", "sourceWidget"],
  203. referencedClasses: ["HLVerticalSplitter", "HLHorizontalSplitter", "HLContainer"]
  204. }),
  205. smalltalk.HLBrowser);
  206. smalltalk.addMethod(
  207. "_sourceWidget",
  208. smalltalk.method({
  209. selector: "sourceWidget",
  210. category: 'widgets',
  211. fn: function () {
  212. var self = this;
  213. var $1;
  214. if (($receiver = self['@sourceWidget']) == nil ||
  215. $receiver == undefined) {
  216. self['@sourceWidget'] = smalltalk.send(smalltalk.HLBrowserSourceWidget || HLBrowserSourceWidget, "_on_", [smalltalk.send(self, "_model", [])]);
  217. $1 = self['@sourceWidget'];
  218. } else {
  219. $1 = self['@sourceWidget'];
  220. }
  221. return $1;
  222. },
  223. args: [],
  224. source: "sourceWidget\x0a\x09^ sourceWidget ifNil: [\x0a \x09sourceWidget := HLBrowserSourceWidget on: self model ]",
  225. messageSends: ["ifNil:", "on:", "model"],
  226. referencedClasses: ["HLBrowserSourceWidget"]
  227. }),
  228. smalltalk.HLBrowser);
  229. smalltalk.HLBrowser.klass.iVarNames = ['nextId'];
  230. smalltalk.addMethod(
  231. "_canBeOpenAsTab",
  232. smalltalk.method({
  233. selector: "canBeOpenAsTab",
  234. category: 'testing',
  235. fn: function () {
  236. var self = this;
  237. return true;
  238. },
  239. args: [],
  240. source: "canBeOpenAsTab\x0a\x09^ true",
  241. messageSends: [],
  242. referencedClasses: []
  243. }),
  244. smalltalk.HLBrowser.klass);
  245. smalltalk.addMethod(
  246. "_nextId",
  247. smalltalk.method({
  248. selector: "nextId",
  249. category: 'accessing',
  250. fn: function () {
  251. var self = this;
  252. var $1;
  253. if (($receiver = self['@nextId']) == nil || $receiver == undefined) {
  254. self['@nextId'] = 0;
  255. self['@nextId'];
  256. } else {
  257. self['@nextId'];
  258. }
  259. $1 = smalltalk.send("browser_", "__comma", [smalltalk.send(smalltalk.send(self['@nextId'], "__plus", [1]), "_asString", [])]);
  260. return $1;
  261. },
  262. args: [],
  263. source: "nextId\x0a\x09nextId ifNil: [ nextId := 0 ].\x0a ^ 'browser_', (nextId + 1) asString",
  264. messageSends: ["ifNil:", ",", "asString", "+"],
  265. referencedClasses: []
  266. }),
  267. smalltalk.HLBrowser.klass);
  268. smalltalk.addMethod(
  269. "_tabLabel",
  270. smalltalk.method({
  271. selector: "tabLabel",
  272. category: 'accessing',
  273. fn: function () {
  274. var self = this;
  275. return "Browser";
  276. },
  277. args: [],
  278. source: "tabLabel\x0a\x09^ 'Browser'",
  279. messageSends: [],
  280. referencedClasses: []
  281. }),
  282. smalltalk.HLBrowser.klass);
  283. smalltalk.addMethod(
  284. "_tabPriority",
  285. smalltalk.method({
  286. selector: "tabPriority",
  287. category: 'accessing',
  288. fn: function () {
  289. var self = this;
  290. return 0;
  291. },
  292. args: [],
  293. source: "tabPriority\x0a\x09^ 0",
  294. messageSends: [],
  295. referencedClasses: []
  296. }),
  297. smalltalk.HLBrowser.klass);
  298. smalltalk.addClass('HLBrowserListWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Browser');
  299. smalltalk.addMethod(
  300. "_model",
  301. smalltalk.method({
  302. selector: "model",
  303. category: 'accessing',
  304. fn: function () {
  305. var self = this;
  306. return self['@model'];
  307. },
  308. args: [],
  309. source: "model\x0a\x09^ model",
  310. messageSends: [],
  311. referencedClasses: []
  312. }),
  313. smalltalk.HLBrowserListWidget);
  314. smalltalk.addMethod(
  315. "_model_",
  316. smalltalk.method({
  317. selector: "model:",
  318. category: 'accessing',
  319. fn: function (aBrowserModel) {
  320. var self = this;
  321. self['@model'] = aBrowserModel;
  322. smalltalk.send(self['@model'], "_subscribe_", [self]);
  323. return self;
  324. },
  325. args: ["aBrowserModel"],
  326. source: "model: aBrowserModel\x0a\x09\x22TODO: unsubscribe from previous model\x22\x0a \x0a\x09model := aBrowserModel.\x0a model subscribe: self",
  327. messageSends: ["subscribe:"],
  328. referencedClasses: []
  329. }),
  330. smalltalk.HLBrowserListWidget);
  331. smalltalk.addMethod(
  332. "_on_",
  333. smalltalk.method({
  334. selector: "on:",
  335. category: 'instance creation',
  336. fn: function (aModel) {
  337. var self = this;
  338. var $2, $3, $1;
  339. $2 = smalltalk.send(self, "_new", []);
  340. smalltalk.send($2, "_model_", [aModel]);
  341. $3 = smalltalk.send($2, "_yourself", []);
  342. $1 = $3;
  343. return $1;
  344. },
  345. args: ["aModel"],
  346. source: "on: aModel\x0a\x09^ self new \x0a \x09model: aModel;\x0a yourself",
  347. messageSends: ["model:", "new", "yourself"],
  348. referencedClasses: []
  349. }),
  350. smalltalk.HLBrowserListWidget.klass);
  351. smalltalk.addClass('HLClassesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  352. smalltalk.addMethod(
  353. "_focusMethodsListWidget",
  354. smalltalk.method({
  355. selector: "focusMethodsListWidget",
  356. category: 'actions',
  357. fn: function () {
  358. var self = this;
  359. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLMethodsListFocus || HLMethodsListFocus, "_new", [])]);
  360. return self;
  361. },
  362. args: [],
  363. source: "focusMethodsListWidget\x0a\x09self model announcer announce: HLMethodsListFocus new",
  364. messageSends: ["announce:", "new", "announcer", "model"],
  365. referencedClasses: ["HLMethodsListFocus"]
  366. }),
  367. smalltalk.HLClassesListWidget);
  368. smalltalk.addMethod(
  369. "_focusProtocolsListWidget",
  370. smalltalk.method({
  371. selector: "focusProtocolsListWidget",
  372. category: 'actions',
  373. fn: function () {
  374. var self = this;
  375. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLProtocolsListFocus || HLProtocolsListFocus, "_new", [])]);
  376. return self;
  377. },
  378. args: [],
  379. source: "focusProtocolsListWidget\x0a\x09self model announcer announce: HLProtocolsListFocus new",
  380. messageSends: ["announce:", "new", "announcer", "model"],
  381. referencedClasses: ["HLProtocolsListFocus"]
  382. }),
  383. smalltalk.HLClassesListWidget);
  384. smalltalk.addMethod(
  385. "_getChildrenOf_",
  386. smalltalk.method({
  387. selector: "getChildrenOf:",
  388. category: 'accessing',
  389. fn: function (aClass) {
  390. var self = this;
  391. var $1;
  392. $1 = smalltalk.send(smalltalk.send(self, "_items", []), "_select_", [function (each) {return smalltalk.send(smalltalk.send(each, "_superclass", []), "__eq", [aClass]);}]);
  393. return $1;
  394. },
  395. args: ["aClass"],
  396. source: "getChildrenOf: aClass\x0a\x09^ self items select: [ :each | each superclass = aClass ]",
  397. messageSends: ["select:", "=", "superclass", "items"],
  398. referencedClasses: []
  399. }),
  400. smalltalk.HLClassesListWidget);
  401. smalltalk.addMethod(
  402. "_getRootClassesOf_",
  403. smalltalk.method({
  404. selector: "getRootClassesOf:",
  405. category: 'accessing',
  406. fn: function (aCollection) {
  407. var self = this;
  408. var $1;
  409. $1 = smalltalk.send(aCollection, "_select_", [function (each) {return smalltalk.send(smalltalk.send(smalltalk.send(each, "_allSuperclasses", []), "_intersection_", [aCollection]), "_isEmpty", []);}]);
  410. return $1;
  411. },
  412. args: ["aCollection"],
  413. source: "getRootClassesOf: aCollection\x0a\x09^ aCollection select: [ :each |\x0a \x09(each allSuperclasses intersection: aCollection) isEmpty ]",
  414. messageSends: ["select:", "isEmpty", "intersection:", "allSuperclasses"],
  415. referencedClasses: []
  416. }),
  417. smalltalk.HLClassesListWidget);
  418. smalltalk.addMethod(
  419. "_iconForItem_",
  420. smalltalk.method({
  421. selector: "iconForItem:",
  422. category: 'accessing',
  423. fn: function (aClass) {
  424. var self = this;
  425. var $2, $1;
  426. $2 = smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_theNonMetaClass", []), "_comment", []), "_isEmpty", []);
  427. if (smalltalk.assert($2)) {
  428. $1 = "icon-question-sign";
  429. } else {
  430. $1 = "icon-none";
  431. }
  432. return $1;
  433. },
  434. args: ["aClass"],
  435. source: "iconForItem: aClass\x0a\x09^ aClass theNonMetaClass comment isEmpty\x0a \x09ifFalse: [ 'icon-none' ]\x0a \x09ifTrue: [ 'icon-question-sign' ]",
  436. messageSends: ["ifFalse:ifTrue:", "isEmpty", "comment", "theNonMetaClass"],
  437. referencedClasses: []
  438. }),
  439. smalltalk.HLClassesListWidget);
  440. smalltalk.addMethod(
  441. "_packageSelected_",
  442. smalltalk.method({
  443. selector: "packageSelected:",
  444. category: 'actions',
  445. fn: function (aPackage) {
  446. var self = this;
  447. var $1;
  448. smalltalk.send(self, "_selectedItem_", [nil]);
  449. if (($receiver = aPackage) == nil || $receiver == undefined) {
  450. $1 = [];
  451. } else {
  452. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aPackage, "_classes", []), "_collect_", [function (each) {return smalltalk.send(each, "_theNonMetaClass", []);}]), "_asSet", []), "_asArray", []);
  453. }
  454. smalltalk.send(self, "_items_", [$1]);
  455. smalltalk.send(self, "_refresh", []);
  456. return self;
  457. },
  458. args: ["aPackage"],
  459. source: "packageSelected: aPackage\x0a self selectedItem: nil.\x0a \x0a self items: (aPackage \x0a \x09ifNil: [ #() ]\x0a \x09\x09ifNotNil: [ (aPackage classes \x0a \x09collect: [ :each | each theNonMetaClass ]) asSet asArray ]).\x0a\x0a self refresh",
  460. messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "asArray", "asSet", "collect:", "theNonMetaClass", "classes", "refresh"],
  461. referencedClasses: []
  462. }),
  463. smalltalk.HLClassesListWidget);
  464. smalltalk.addMethod(
  465. "_renderButtonsOn_",
  466. smalltalk.method({
  467. selector: "renderButtonsOn:",
  468. category: 'rendering',
  469. fn: function (html) {
  470. var self = this;
  471. var $1, $3, $4, $5, $6, $7, $8, $2, $9, $10;
  472. $1 = smalltalk.send(html, "_div", []);
  473. smalltalk.send($1, "_class_", ["btn-group"]);
  474. smalltalk.send($1, "_at_put_", ["data-toggle", "buttons-radio"]);
  475. $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;}]);
  476. $9 = smalltalk.send(html, "_button", []);
  477. smalltalk.send($9, "_class_", ["btn"]);
  478. smalltalk.send($9, "_at_put_", ["data-toggle", "button"]);
  479. $10 = smalltalk.send($9, "_with_", ["Comment"]);
  480. return self;
  481. },
  482. args: ["html"],
  483. source: "renderButtonsOn: html\x0a\x09html div \x0a class: 'btn-group';\x0a\x09\x09at: 'data-toggle' put: 'buttons-radio';\x0a\x09\x09with: [ \x0a \x09html button \x0a class: (String streamContents: [ :str |\x0a \x09str nextPutAll: 'btn'.\x0a self showInstance ifTrue: [ \x0a \x09str nextPutAll: ' active'] ]);\x0a \x09\x09\x09\x09with: 'Instance';\x0a onClick: [ self showInstance: true ].\x0a \x09\x09\x09html button\x0a \x09\x09\x09\x09class: (String streamContents: [ :str |\x0a \x09str nextPutAll: 'btn'.\x0a self model showInstance ifFalse: [ \x0a \x09str nextPutAll: ' active'] ]);\x0a \x09\x09\x09\x09with: 'Class';\x0a\x09\x09\x09\x09onClick: [ self model showInstance: false ] ].\x0a \x0a \x09html button \x0a \x09class: 'btn';\x0a at: 'data-toggle' put: 'button';\x0a \x09\x09\x09with: 'Comment'",
  484. messageSends: ["class:", "div", "at:put:", "with:", "streamContents:", "nextPutAll:", "ifTrue:", "showInstance", "button", "onClick:", "showInstance:", "ifFalse:", "model"],
  485. referencedClasses: ["String"]
  486. }),
  487. smalltalk.HLClassesListWidget);
  488. smalltalk.addMethod(
  489. "_renderItem_level_on_",
  490. smalltalk.method({
  491. selector: "renderItem:level:on:",
  492. category: 'rendering',
  493. fn: function (aClass, anInteger, html) {
  494. var self = this;
  495. var $2, $3, $1;
  496. var li;
  497. li = smalltalk.send(html, "_li", []);
  498. smalltalk.send(li, "_at_put_", ["list-data", smalltalk.send(smalltalk.send(self, "_items", []), "_indexOf_", [aClass])]);
  499. smalltalk.send(li, "_class_", [smalltalk.send(self, "_cssClassForItem_", [aClass])]);
  500. $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;}]);
  501. smalltalk.send(smalltalk.send(self, "_getChildrenOf_", [aClass]), "_do_", [function (each) {return smalltalk.send(self, "_renderItem_level_on_", [each, smalltalk.send(anInteger, "__plus", [1]), html]);}]);
  502. return self;
  503. },
  504. args: ["aClass", "anInteger", "html"],
  505. source: "renderItem: aClass level: anInteger on: html\x0a\x09| li |\x0a \x0a\x09li := html li.\x0a li\x0a \x09at: 'list-data' put: (self items indexOf: aClass);\x0a \x09class: (self cssClassForItem: aClass);\x0a with: [ \x0a \x09html a\x0a \x09with: [ \x0a \x09\x09(html tag: 'i') class: (self iconForItem: aClass).\x0a \x09\x09\x09\x09\x09self renderItemLabel: aClass level: anInteger on: html ];\x0a\x09\x09\x09\x09onClick: [\x0a \x09self activateListItem: li asJQuery ] ].\x0a \x0a (self getChildrenOf: aClass) do: [ :each |\x0a \x09self renderItem: each level: anInteger + 1 on: html ]",
  506. messageSends: ["li", "at:put:", "indexOf:", "items", "class:", "cssClassForItem:", "with:", "iconForItem:", "tag:", "renderItemLabel:level:on:", "a", "onClick:", "activateListItem:", "asJQuery", "do:", "renderItem:level:on:", "+", "getChildrenOf:"],
  507. referencedClasses: []
  508. }),
  509. smalltalk.HLClassesListWidget);
  510. smalltalk.addMethod(
  511. "_renderItem_on_",
  512. smalltalk.method({
  513. selector: "renderItem:on:",
  514. category: 'rendering',
  515. fn: function (aClass, html) {
  516. var self = this;
  517. smalltalk.send(self, "_renderItem_on_", [aClass, html], smalltalk.HLBrowserListWidget);
  518. smalltalk.send(smalltalk.send(self, "_getChildrenOf_", [aClass]), "_do_", [function (each) {return smalltalk.send(self, "_renderItem_level_on_", [each, 1, html]);}]);
  519. return self;
  520. },
  521. args: ["aClass", "html"],
  522. source: "renderItem: aClass on: html\x0a\x09super renderItem: aClass on: html.\x0a \x09(self getChildrenOf: aClass) do: [ :each |\x0a \x09\x09self renderItem: each level: 1 on: html ]",
  523. messageSends: ["renderItem:on:", "do:", "renderItem:level:on:", "getChildrenOf:"],
  524. referencedClasses: []
  525. }),
  526. smalltalk.HLClassesListWidget);
  527. smalltalk.addMethod(
  528. "_renderItemLabel_level_on_",
  529. smalltalk.method({
  530. selector: "renderItemLabel:level:on:",
  531. category: 'rendering',
  532. fn: function (aClass, anInteger, html) {
  533. var self = this;
  534. 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", [])]);}])]);
  535. return self;
  536. },
  537. args: ["aClass", "anInteger", "html"],
  538. source: "renderItemLabel: aClass level: anInteger on: html\x0a\x09html span asJQuery html: (String streamContents: [ :str |\x0a\x09\x09anInteger timesRepeat: [\x0a\x09\x09\x09str nextPutAll: '    '].\x0a\x09\x09\x09str nextPutAll: aClass name ])",
  539. messageSends: ["html:", "streamContents:", "timesRepeat:", "nextPutAll:", "name", "asJQuery", "span"],
  540. referencedClasses: ["String"]
  541. }),
  542. smalltalk.HLClassesListWidget);
  543. smalltalk.addMethod(
  544. "_renderItemLabel_on_",
  545. smalltalk.method({
  546. selector: "renderItemLabel:on:",
  547. category: 'rendering',
  548. fn: function (aClass, html) {
  549. var self = this;
  550. smalltalk.send(self, "_renderItemLabel_level_on_", [aClass, 0, html]);
  551. return self;
  552. },
  553. args: ["aClass", "html"],
  554. source: "renderItemLabel: aClass on: html\x0a\x09self renderItemLabel: aClass level: 0 on: html",
  555. messageSends: ["renderItemLabel:level:on:"],
  556. referencedClasses: []
  557. }),
  558. smalltalk.HLClassesListWidget);
  559. smalltalk.addMethod(
  560. "_renderListOn_",
  561. smalltalk.method({
  562. selector: "renderListOn:",
  563. category: 'rendering',
  564. fn: function (html) {
  565. var self = this;
  566. smalltalk.send(smalltalk.send(self, "_getRootClassesOf_", [smalltalk.send(self, "_items", [])]), "_do_", [function (each) {return smalltalk.send(self, "_renderItem_on_", [each, html]);}]);
  567. return self;
  568. },
  569. args: ["html"],
  570. source: "renderListOn: html\x0a\x09(self getRootClassesOf: self items)\x0a \x09do: [ :each | self renderItem: each on: html ]",
  571. messageSends: ["do:", "renderItem:on:", "getRootClassesOf:", "items"],
  572. referencedClasses: []
  573. }),
  574. smalltalk.HLClassesListWidget);
  575. smalltalk.addMethod(
  576. "_selectItem_",
  577. smalltalk.method({
  578. selector: "selectItem:",
  579. category: 'actions',
  580. fn: function (aClass){
  581. var self=this;
  582. smalltalk.send(self,"_selectItem_",[aClass],smalltalk.HLBrowserListWidget);
  583. smalltalk.send(smalltalk.send(self,"_model",[]),"_selectedClass_",[aClass]);
  584. return self},
  585. args: ["aClass"],
  586. source: "selectItem: aClass\x0a\x09super selectItem: aClass.\x0a self model selectedClass: aClass",
  587. messageSends: ["selectItem:", "selectedClass:", "model"],
  588. referencedClasses: []
  589. }),
  590. smalltalk.HLClassesListWidget);
  591. smalltalk.addMethod(
  592. "_showInstance",
  593. smalltalk.method({
  594. selector: "showInstance",
  595. category: 'accessing',
  596. fn: function () {
  597. var self = this;
  598. var $1;
  599. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance", []);
  600. return $1;
  601. },
  602. args: [],
  603. source: "showInstance\x0a\x09^ self model showInstance",
  604. messageSends: ["showInstance", "model"],
  605. referencedClasses: []
  606. }),
  607. smalltalk.HLClassesListWidget);
  608. smalltalk.addMethod(
  609. "_showInstance_",
  610. smalltalk.method({
  611. selector: "showInstance:",
  612. category: 'actions',
  613. fn: function (aBoolean) {
  614. var self = this;
  615. smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance_", [aBoolean]);
  616. return self;
  617. },
  618. args: ["aBoolean"],
  619. source: "showInstance: aBoolean\x0a\x09self model showInstance: aBoolean",
  620. messageSends: ["showInstance:", "model"],
  621. referencedClasses: []
  622. }),
  623. smalltalk.HLClassesListWidget);
  624. smalltalk.addMethod(
  625. "_subscribeTo_",
  626. smalltalk.method({
  627. selector: "subscribeTo:",
  628. category: 'announcements',
  629. fn: function (anAnnouncer) {
  630. var self = this;
  631. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLPackageSelected || HLPackageSelected, function (ann) {return smalltalk.send(self, "_packageSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  632. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_refresh", []);}]);
  633. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_focus", []);}]);
  634. return self;
  635. },
  636. args: ["anAnnouncer"],
  637. source: "subscribeTo: anAnnouncer\x0a\x09anAnnouncer on: HLPackageSelected do: [ :ann |\x0a \x09self packageSelected: ann item ].\x0a anAnnouncer on: HLShowInstanceToggled do: [ :ann |\x0a \x09self refresh ].\x0a anAnnouncer on: HLClassSelected do: [ :ann |\x0a \x09self focus ]",
  638. messageSends: ["on:do:", "packageSelected:", "item", "refresh", "focus"],
  639. referencedClasses: ["HLPackageSelected", "HLShowInstanceToggled", "HLClassSelected"]
  640. }),
  641. smalltalk.HLClassesListWidget);
  642. smalltalk.addClass('HLMethodsListWidget', smalltalk.HLBrowserListWidget, ['selectorsCache'], 'Helios-Browser');
  643. smalltalk.addMethod(
  644. "_allProtocol",
  645. smalltalk.method({
  646. selector: "allProtocol",
  647. category: 'accessing',
  648. fn: function () {
  649. var self = this;
  650. var $1;
  651. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_allProtocol", []);
  652. return $1;
  653. },
  654. args: [],
  655. source: "allProtocol\x0a\x09^ self model allProtocol",
  656. messageSends: ["allProtocol", "model"],
  657. referencedClasses: []
  658. }),
  659. smalltalk.HLMethodsListWidget);
  660. smalltalk.addMethod(
  661. "_flushSelectorsCache",
  662. smalltalk.method({
  663. selector: "flushSelectorsCache",
  664. category: 'cache',
  665. fn: function () {
  666. var self = this;
  667. self['@selectorsCache'] = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  668. return self;
  669. },
  670. args: [],
  671. source: "flushSelectorsCache\x0a\x09selectorsCache := Dictionary new",
  672. messageSends: ["new"],
  673. referencedClasses: ["Dictionary"]
  674. }),
  675. smalltalk.HLMethodsListWidget);
  676. smalltalk.addMethod(
  677. "_iconForItem_",
  678. smalltalk.method({
  679. selector: "iconForItem:",
  680. category: 'accessing',
  681. fn: function (aCompiledMethod) {
  682. var self = this;
  683. var $1;
  684. var override;
  685. var overriden;
  686. override = smalltalk.send(self, "_isOverride_", [aCompiledMethod]);
  687. overriden = smalltalk.send(self, "_isOverriden_", [aCompiledMethod]);
  688. if (smalltalk.assert(override)) {
  689. if (smalltalk.assert(overriden)) {
  690. $1 = "icon-resize-vertical";
  691. } else {
  692. $1 = "icon-arrow-up";
  693. }
  694. } else {
  695. if (smalltalk.assert(overriden)) {
  696. $1 = "icon-arrow-down";
  697. } else {
  698. $1 = "icon-none";
  699. }
  700. }
  701. return $1;
  702. },
  703. args: ["aCompiledMethod"],
  704. source: "iconForItem: aCompiledMethod\x0a\x09| override overriden |\x0a \x0a override := self isOverride: aCompiledMethod.\x0a overriden := self isOverriden: aCompiledMethod.\x0a \x0a\x09^ override\x0a \x09ifTrue: [ overriden\x0a\x09\x09\x09ifTrue: [ 'icon-resize-vertical' ]\x0a\x09\x09\x09ifFalse: [ 'icon-arrow-up' ] ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09overriden\x0a\x09\x09\x09ifTrue: [ 'icon-arrow-down' ]\x0a\x09\x09\x09ifFalse: [ 'icon-none' ] ]",
  705. messageSends: ["isOverride:", "isOverriden:", "ifTrue:ifFalse:"],
  706. referencedClasses: []
  707. }),
  708. smalltalk.HLMethodsListWidget);
  709. smalltalk.addMethod(
  710. "_initialize",
  711. smalltalk.method({
  712. selector: "initialize",
  713. category: 'initialization',
  714. fn: function () {
  715. var self = this;
  716. smalltalk.send(self, "_initialize", [], smalltalk.HLBrowserListWidget);
  717. smalltalk.send(self, "_flushSelectorsCache", []);
  718. return self;
  719. },
  720. args: [],
  721. source: "initialize\x0a\x09super initialize.\x0a self flushSelectorsCache",
  722. messageSends: ["initialize", "flushSelectorsCache"],
  723. referencedClasses: []
  724. }),
  725. smalltalk.HLMethodsListWidget);
  726. smalltalk.addMethod(
  727. "_isOverride_",
  728. smalltalk.method({
  729. selector: "isOverride:",
  730. category: 'testing',
  731. fn: function (aMethod) {
  732. var self = this;
  733. var $1;
  734. $1 = smalltalk.send(smalltalk.send(self, "_overrideSelectors", []), "_includes_", [smalltalk.send(aMethod, "_selector", [])]);
  735. return $1;
  736. },
  737. args: ["aMethod"],
  738. source: "isOverride: aMethod\x0a\x0a ^ self overrideSelectors includes: aMethod selector",
  739. messageSends: ["includes:", "selector", "overrideSelectors"],
  740. referencedClasses: []
  741. }),
  742. smalltalk.HLMethodsListWidget);
  743. smalltalk.addMethod(
  744. "_isOverriden_",
  745. smalltalk.method({
  746. selector: "isOverriden:",
  747. category: 'testing',
  748. fn: function (aMethod) {
  749. var self = this;
  750. var $1;
  751. $1 = smalltalk.send(smalltalk.send(self, "_overridenSelectors", []), "_includes_", [smalltalk.send(aMethod, "_selector", [])]);
  752. return $1;
  753. },
  754. args: ["aMethod"],
  755. source: "isOverriden: aMethod\x0a\x0a ^ self overridenSelectors includes: aMethod selector",
  756. messageSends: ["includes:", "selector", "overridenSelectors"],
  757. referencedClasses: []
  758. }),
  759. smalltalk.HLMethodsListWidget);
  760. smalltalk.addMethod(
  761. "_methodsInProtocol_",
  762. smalltalk.method({
  763. selector: "methodsInProtocol:",
  764. category: 'accessing',
  765. fn: function (aString) {
  766. var self = this;
  767. var $2, $1;
  768. $2 = smalltalk.send(aString, "__eq", [smalltalk.send(self, "_allProtocol", [])]);
  769. if (smalltalk.assert($2)) {
  770. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []), "_methods", []);
  771. } else {
  772. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []), "_methodsInProtocol_", [aString]);
  773. }
  774. return $1;
  775. },
  776. args: ["aString"],
  777. source: "methodsInProtocol: aString\x0a\x09^ aString = self allProtocol\x0a \x09ifTrue: [ self model selectedClass methods ]\x0a \x09ifFalse: [ self model selectedClass methodsInProtocol: aString ]",
  778. messageSends: ["ifTrue:ifFalse:", "methods", "selectedClass", "model", "methodsInProtocol:", "=", "allProtocol"],
  779. referencedClasses: []
  780. }),
  781. smalltalk.HLMethodsListWidget);
  782. smalltalk.addMethod(
  783. "_overrideSelectors",
  784. smalltalk.method({
  785. selector: "overrideSelectors",
  786. category: 'accessing',
  787. fn: function () {
  788. var self = this;
  789. var $2, $1;
  790. $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;}]);}]);
  791. return $1;
  792. },
  793. args: [],
  794. source: "overrideSelectors\x0a\x09^ self selectorsCache \x0a \x09at: 'override'\x0a ifAbsentPut: [ \x0a \x09self model selectedClass allSuperclasses\x0a\x09\x09\x09\x09inject: Set new into: [ :acc :each | acc addAll: each selectors; yourself ] ]",
  795. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSuperclasses", "selectedClass", "model", "selectorsCache"],
  796. referencedClasses: ["Set"]
  797. }),
  798. smalltalk.HLMethodsListWidget);
  799. smalltalk.addMethod(
  800. "_overridenSelectors",
  801. smalltalk.method({
  802. selector: "overridenSelectors",
  803. category: 'accessing',
  804. fn: function () {
  805. var self = this;
  806. var $2, $1;
  807. $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;}]);}]);
  808. return $1;
  809. },
  810. args: [],
  811. source: "overridenSelectors\x0a\x09^ self selectorsCache \x0a \x09at: 'overriden'\x0a ifAbsentPut: [ \x0a \x09self model selectedClass allSubclasses\x0a\x09\x09\x09\x09inject: Set new into: [ :acc :each | acc addAll: each selectors; yourself ] ]",
  812. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSubclasses", "selectedClass", "model", "selectorsCache"],
  813. referencedClasses: ["Set"]
  814. }),
  815. smalltalk.HLMethodsListWidget);
  816. smalltalk.addMethod(
  817. "_protocolSelected_",
  818. smalltalk.method({
  819. selector: "protocolSelected:",
  820. category: 'actions',
  821. fn: function (aString){
  822. var self=this;
  823. var $2,$1;
  824. smalltalk.send(self,"_selectedItem_",[nil]);
  825. $2=smalltalk.send(smalltalk.send(self,"_model",[]),"_selectedClass",[]);
  826. if(($receiver = $2) == nil || $receiver == undefined){
  827. $1=[];
  828. } else {
  829. if(($receiver = aString) == nil || $receiver == undefined){
  830. $1=[];
  831. } else {
  832. $1=smalltalk.send(self,"_methodsInProtocol_",[aString]);
  833. };
  834. };
  835. smalltalk.send(self,"_items_",[$1]);
  836. smalltalk.send(self,"_refresh",[]);
  837. return self},
  838. args: ["aString"],
  839. source: "protocolSelected: aString\x0a self selectedItem: nil.\x0a \x0a self items: (self model selectedClass \x0a \x09ifNil: [ #() ]\x0a \x09ifNotNil: [ aString\x0a \x09\x09ifNil: [ #() ]\x0a \x09\x09ifNotNil: [ self methodsInProtocol: aString ] ]).\x0a \x0a self refresh",
  840. messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "methodsInProtocol:", "selectedClass", "model", "refresh"],
  841. referencedClasses: []
  842. }),
  843. smalltalk.HLMethodsListWidget);
  844. smalltalk.addMethod(
  845. "_renderContentOn_",
  846. smalltalk.method({
  847. selector: "renderContentOn:",
  848. category: 'rendering',
  849. fn: function (html) {
  850. var self = this;
  851. var $1, $2, $3;
  852. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance", []);
  853. if (smalltalk.assert($1)) {
  854. smalltalk.send(self, "_renderContentOn_", [html], smalltalk.HLBrowserListWidget);
  855. } else {
  856. $2 = smalltalk.send(html, "_div", []);
  857. smalltalk.send($2, "_class_", ["class_side"]);
  858. $3 = smalltalk.send($2, "_with_", [function () {return smalltalk.send(self, "_renderContentOn_", [html], smalltalk.HLBrowserListWidget);}]);
  859. }
  860. smalltalk.send(self, "_flushSelectorsCache", []);
  861. return self;
  862. },
  863. args: ["html"],
  864. source: "renderContentOn: html\x0a\x09self model showInstance\x0a \x09ifFalse: [ html div \x0a \x09class: 'class_side'; \x0a with: [ super renderContentOn: html ] ]\x0a \x09ifTrue: [ super renderContentOn: html ].\x0a \x0a self flushSelectorsCache",
  865. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model", "flushSelectorsCache"],
  866. referencedClasses: []
  867. }),
  868. smalltalk.HLMethodsListWidget);
  869. smalltalk.addMethod(
  870. "_renderItemLabel_on_",
  871. smalltalk.method({
  872. selector: "renderItemLabel:on:",
  873. category: 'rendering',
  874. fn: function (aCompiledMethod, html) {
  875. var self = this;
  876. smalltalk.send(html, "_with_", [smalltalk.send(aCompiledMethod, "_selector", [])]);
  877. return self;
  878. },
  879. args: ["aCompiledMethod", "html"],
  880. source: "renderItemLabel: aCompiledMethod on: html\x0a\x09html with: aCompiledMethod selector",
  881. messageSends: ["with:", "selector"],
  882. referencedClasses: []
  883. }),
  884. smalltalk.HLMethodsListWidget);
  885. smalltalk.addMethod(
  886. "_selectItem_",
  887. smalltalk.method({
  888. selector: "selectItem:",
  889. category: 'actions',
  890. fn: function (aCompiledMethod){
  891. var self=this;
  892. smalltalk.send(self,"_selectItem_",[aCompiledMethod],smalltalk.HLBrowserListWidget);
  893. smalltalk.send(smalltalk.send(self,"_model",[]),"_selectedMethod_",[aCompiledMethod]);
  894. return self},
  895. args: ["aCompiledMethod"],
  896. source: "selectItem: aCompiledMethod\x0a\x09super selectItem: aCompiledMethod.\x0a \x09self model selectedMethod: aCompiledMethod",
  897. messageSends: ["selectItem:", "selectedMethod:", "model"],
  898. referencedClasses: []
  899. }),
  900. smalltalk.HLMethodsListWidget);
  901. smalltalk.addMethod(
  902. "_selectorsCache",
  903. smalltalk.method({
  904. selector: "selectorsCache",
  905. category: 'accessing',
  906. fn: function () {
  907. var self = this;
  908. return self['@selectorsCache'];
  909. },
  910. args: [],
  911. source: "selectorsCache\x0a\x09^ selectorsCache",
  912. messageSends: [],
  913. referencedClasses: []
  914. }),
  915. smalltalk.HLMethodsListWidget);
  916. smalltalk.addMethod(
  917. "_subscribeTo_",
  918. smalltalk.method({
  919. selector: "subscribeTo:",
  920. category: 'announcements',
  921. fn: function (anAnnouncer) {
  922. var self = this;
  923. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_protocolSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  924. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_protocolSelected_", [nil]);}]);
  925. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLMethodSelected || HLMethodSelected, function (ann) {return smalltalk.send(self, "_focus", []);}]);
  926. return self;
  927. },
  928. args: ["anAnnouncer"],
  929. source: "subscribeTo: anAnnouncer\x0a\x09anAnnouncer on: HLProtocolSelected do: [ :ann |\x0a \x09self protocolSelected: ann item ].\x0a anAnnouncer on: HLShowInstanceToggled do: [ :ann |\x0a \x09self protocolSelected: nil ].\x0a anAnnouncer on: HLMethodSelected do: [ :ann |\x0a \x09self focus ]",
  930. messageSends: ["on:do:", "protocolSelected:", "item", "focus"],
  931. referencedClasses: ["HLProtocolSelected", "HLShowInstanceToggled", "HLMethodSelected"]
  932. }),
  933. smalltalk.HLMethodsListWidget);
  934. smalltalk.addClass('HLPackagesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  935. smalltalk.addMethod(
  936. "_focusClassesListWidget",
  937. smalltalk.method({
  938. selector: "focusClassesListWidget",
  939. category: 'actions',
  940. fn: function () {
  941. var self = this;
  942. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLClassesListFocus || HLClassesListFocus, "_new", [])]);
  943. return self;
  944. },
  945. args: [],
  946. source: "focusClassesListWidget\x0a\x09self model announcer announce: HLClassesListFocus new",
  947. messageSends: ["announce:", "new", "announcer", "model"],
  948. referencedClasses: ["HLClassesListFocus"]
  949. }),
  950. smalltalk.HLPackagesListWidget);
  951. smalltalk.addMethod(
  952. "_items",
  953. smalltalk.method({
  954. selector: "items",
  955. category: 'accessing',
  956. fn: function () {
  957. var self = this;
  958. var $1;
  959. if (($receiver = self['@items']) == nil || $receiver == undefined) {
  960. self['@items'] = smalltalk.send(smalltalk.send(self, "_model", []), "_packages", []);
  961. $1 = self['@items'];
  962. } else {
  963. $1 = self['@items'];
  964. }
  965. return $1;
  966. },
  967. args: [],
  968. source: "items\x0a\x09^ items ifNil: [ items := self model packages ]",
  969. messageSends: ["ifNil:", "packages", "model"],
  970. referencedClasses: []
  971. }),
  972. smalltalk.HLPackagesListWidget);
  973. smalltalk.addMethod(
  974. "_renderButtonsOn_",
  975. smalltalk.method({
  976. selector: "renderButtonsOn:",
  977. category: 'rendering',
  978. fn: function (html) {
  979. var self = this;
  980. var $1, $2, $3, $5, $6, $7, $8, $4, $9, $10;
  981. $1 = smalltalk.send(html, "_span", []);
  982. smalltalk.send($1, "_class_", ["info"]);
  983. $2 = smalltalk.send($1, "_with_", ["Auto commit"]);
  984. $3 = smalltalk.send(html, "_div", []);
  985. smalltalk.send($3, "_class_", ["btn-group switch"]);
  986. smalltalk.send($3, "_at_put_", ["data-toggle", "buttons-radio"]);
  987. $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;}]);
  988. $9 = smalltalk.send(html, "_a", []);
  989. smalltalk.send($9, "_class_", ["btn"]);
  990. $10 = smalltalk.send($9, "_with_", ["Commit"]);
  991. return self;
  992. },
  993. args: ["html"],
  994. source: "renderButtonsOn: html\x0a\x0a\x09html span class: 'info'; with: 'Auto commit'.\x0a\x09html div \x0a class: 'btn-group switch';\x0a\x09\x09at: 'data-toggle' put: 'buttons-radio';\x0a\x09\x09with: [ \x0a \x09html button \x0a class: (String streamContents: [ :str |\x0a \x09str nextPutAll: 'btn' ]);\x0a \x09\x09\x09\x09with: 'On'.\x0a \x09\x09\x09html button\x0a \x09\x09\x09\x09class: (String streamContents: [ :str |\x0a \x09str nextPutAll: 'btn active' ]);\x0a \x09\x09\x09\x09with: 'Off' ].\x0a \x0a html a \x0a \x09class: 'btn';\x0a\x09\x09\x09with: 'Commit'.",
  995. messageSends: ["class:", "span", "with:", "div", "at:put:", "streamContents:", "nextPutAll:", "button", "a"],
  996. referencedClasses: ["String"]
  997. }),
  998. smalltalk.HLPackagesListWidget);
  999. smalltalk.addMethod(
  1000. "_selectItem_",
  1001. smalltalk.method({
  1002. selector: "selectItem:",
  1003. category: 'actions',
  1004. fn: function (aPackage){
  1005. var self=this;
  1006. smalltalk.send(self,"_selectItem_",[aPackage],smalltalk.HLBrowserListWidget);
  1007. smalltalk.send(smalltalk.send(self,"_model",[]),"_selectedPackage_",[aPackage]);
  1008. return self},
  1009. args: ["aPackage"],
  1010. source: "selectItem: aPackage\x0a\x09super selectItem: aPackage.\x0a self model selectedPackage: aPackage",
  1011. messageSends: ["selectItem:", "selectedPackage:", "model"],
  1012. referencedClasses: []
  1013. }),
  1014. smalltalk.HLPackagesListWidget);
  1015. smalltalk.addMethod(
  1016. "_subscribeTo_",
  1017. smalltalk.method({
  1018. selector: "subscribeTo:",
  1019. category: 'announcements',
  1020. fn: function (anAnnouncer) {
  1021. var self = this;
  1022. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLPackageSelected || HLPackageSelected, function (ann) {return smalltalk.send(self, "_focus", []);}]);
  1023. return self;
  1024. },
  1025. args: ["anAnnouncer"],
  1026. source: "subscribeTo: anAnnouncer\x0a anAnnouncer on: HLPackageSelected do: [ :ann |\x0a \x09self focus ]",
  1027. messageSends: ["on:do:", "focus"],
  1028. referencedClasses: ["HLPackageSelected"]
  1029. }),
  1030. smalltalk.HLPackagesListWidget);
  1031. smalltalk.addClass('HLProtocolsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1032. smalltalk.addMethod(
  1033. "_allProtocol",
  1034. smalltalk.method({
  1035. selector: "allProtocol",
  1036. category: 'accessing',
  1037. fn: function () {
  1038. var self = this;
  1039. var $1;
  1040. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_allProtocol", []);
  1041. return $1;
  1042. },
  1043. args: [],
  1044. source: "allProtocol\x0a\x09^ self model allProtocol",
  1045. messageSends: ["allProtocol", "model"],
  1046. referencedClasses: []
  1047. }),
  1048. smalltalk.HLProtocolsListWidget);
  1049. smalltalk.addMethod(
  1050. "_classSelected_",
  1051. smalltalk.method({
  1052. selector: "classSelected:",
  1053. category: 'actions',
  1054. fn: function (aClass) {
  1055. var self = this;
  1056. var $2, $3, $1;
  1057. smalltalk.send(self, "_selectedItem_", [nil]);
  1058. if (($receiver = aClass) == nil || $receiver == undefined) {
  1059. $1 = smalltalk.send(smalltalk.Array || Array, "_with_", [smalltalk.send(self, "_allProtocol", [])]);
  1060. } else {
  1061. $2 = smalltalk.send(smalltalk.Array || Array, "_with_", [smalltalk.send(self, "_allProtocol", [])]);
  1062. smalltalk.send($2, "_addAll_", [smalltalk.send(aClass, "_protocols", [])]);
  1063. $3 = smalltalk.send($2, "_yourself", []);
  1064. $1 = $3;
  1065. }
  1066. smalltalk.send(self, "_items_", [$1]);
  1067. smalltalk.send(self, "_refresh", []);
  1068. return self;
  1069. },
  1070. args: ["aClass"],
  1071. source: "classSelected: aClass\x0a self selectedItem: nil.\x0a \x0a self items: (aClass\x0a \x09ifNil: [ Array with: self allProtocol ]\x0a \x09ifNotNil: [ \x0a \x09(Array with: self allProtocol) \x0a \x09addAll: aClass protocols; \x0a yourself ]).\x0a\x0a self refresh",
  1072. messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself", "refresh"],
  1073. referencedClasses: ["Array"]
  1074. }),
  1075. smalltalk.HLProtocolsListWidget);
  1076. smalltalk.addMethod(
  1077. "_renderContentOn_",
  1078. smalltalk.method({
  1079. selector: "renderContentOn:",
  1080. category: 'rendering',
  1081. fn: function (html) {
  1082. var self = this;
  1083. var $1, $2, $3;
  1084. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance", []);
  1085. if (smalltalk.assert($1)) {
  1086. smalltalk.send(self, "_renderContentOn_", [html], smalltalk.HLBrowserListWidget);
  1087. } else {
  1088. $2 = smalltalk.send(html, "_div", []);
  1089. smalltalk.send($2, "_class_", ["class_side"]);
  1090. $3 = smalltalk.send($2, "_with_", [function () {return smalltalk.send(self, "_renderContentOn_", [html], smalltalk.HLBrowserListWidget);}]);
  1091. }
  1092. return self;
  1093. },
  1094. args: ["html"],
  1095. source: "renderContentOn: html\x0a\x09self model showInstance\x0a \x09ifFalse: [ html div \x0a \x09class: 'class_side'; \x0a with: [ super renderContentOn: html ] ]\x0a \x09ifTrue: [ super renderContentOn: html ]",
  1096. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"],
  1097. referencedClasses: []
  1098. }),
  1099. smalltalk.HLProtocolsListWidget);
  1100. smalltalk.addMethod(
  1101. "_selectItem_",
  1102. smalltalk.method({
  1103. selector: "selectItem:",
  1104. category: 'actions',
  1105. fn: function (aString){
  1106. var self=this;
  1107. smalltalk.send(self,"_selectItem_",[aString],smalltalk.HLBrowserListWidget);
  1108. smalltalk.send(smalltalk.send(self,"_model",[]),"_selectedProtocol_",[aString]);
  1109. return self},
  1110. args: ["aString"],
  1111. source: "selectItem: aString\x0a\x09super selectItem: aString.\x0a self model selectedProtocol: aString",
  1112. messageSends: ["selectItem:", "selectedProtocol:", "model"],
  1113. referencedClasses: []
  1114. }),
  1115. smalltalk.HLProtocolsListWidget);
  1116. smalltalk.addMethod(
  1117. "_selectedItem",
  1118. smalltalk.method({
  1119. selector: "selectedItem",
  1120. category: 'accessing',
  1121. fn: function (){
  1122. var self=this;
  1123. var $1;
  1124. $1=smalltalk.send(self,"_selectedItem",[],smalltalk.HLBrowserListWidget);
  1125. return $1;
  1126. },
  1127. args: [],
  1128. source: "selectedItem\x0a\x09^ super selectedItem\x22 ifNil: [ self allProtocol ]\x22",
  1129. messageSends: ["selectedItem"],
  1130. referencedClasses: []
  1131. }),
  1132. smalltalk.HLProtocolsListWidget);
  1133. smalltalk.addMethod(
  1134. "_subscribeTo_",
  1135. smalltalk.method({
  1136. selector: "subscribeTo:",
  1137. category: 'announcements',
  1138. fn: function (anAnnouncer) {
  1139. var self = this;
  1140. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_classSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  1141. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_classSelected_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", [])]);}]);
  1142. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_focus", []);}]);
  1143. return self;
  1144. },
  1145. args: ["anAnnouncer"],
  1146. source: "subscribeTo: anAnnouncer\x0a\x09anAnnouncer on: HLClassSelected do: [ :ann |\x0a \x09self classSelected: ann item ].\x0a anAnnouncer on: HLShowInstanceToggled do: [ :ann |\x0a \x09self classSelected: self model selectedClass ].\x0a anAnnouncer on: HLProtocolSelected do: [ :ann |\x0a \x09self focus ]",
  1147. messageSends: ["on:do:", "classSelected:", "item", "selectedClass", "model", "focus"],
  1148. referencedClasses: ["HLClassSelected", "HLShowInstanceToggled", "HLProtocolSelected"]
  1149. }),
  1150. smalltalk.HLProtocolsListWidget);
  1151. smalltalk.addClass('HLBrowserModel', smalltalk.Object, ['announcer', 'environment', 'selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'showInstance', 'showComment'], 'Helios-Browser');
  1152. smalltalk.addMethod(
  1153. "_allProtocol",
  1154. smalltalk.method({
  1155. selector: "allProtocol",
  1156. category: 'accessing',
  1157. fn: function () {
  1158. var self = this;
  1159. return "-- All --";
  1160. },
  1161. args: [],
  1162. source: "allProtocol\x0a\x09^ '-- All --'",
  1163. messageSends: [],
  1164. referencedClasses: []
  1165. }),
  1166. smalltalk.HLBrowserModel);
  1167. smalltalk.addMethod(
  1168. "_announcer",
  1169. smalltalk.method({
  1170. selector: "announcer",
  1171. category: 'announcements',
  1172. fn: function () {
  1173. var self = this;
  1174. var $1;
  1175. if (($receiver = self['@announcer']) == nil || $receiver == undefined) {
  1176. self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
  1177. $1 = self['@announcer'];
  1178. } else {
  1179. $1 = self['@announcer'];
  1180. }
  1181. return $1;
  1182. },
  1183. args: [],
  1184. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  1185. messageSends: ["ifNil:", "new"],
  1186. referencedClasses: ["Announcer"]
  1187. }),
  1188. smalltalk.HLBrowserModel);
  1189. smalltalk.addMethod(
  1190. "_environment",
  1191. smalltalk.method({
  1192. selector: "environment",
  1193. category: 'accessing',
  1194. fn: function () {
  1195. var self = this;
  1196. var $1;
  1197. if (($receiver = self['@environment']) == nil || $receiver == undefined) {
  1198. self['@environment'] = smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []);
  1199. $1 = self['@environment'];
  1200. } else {
  1201. $1 = self['@environment'];
  1202. }
  1203. return $1;
  1204. },
  1205. args: [],
  1206. source: "environment\x0a\x09^ environment ifNil: [ environment := Smalltalk current ]",
  1207. messageSends: ["ifNil:", "current"],
  1208. referencedClasses: ["Smalltalk"]
  1209. }),
  1210. smalltalk.HLBrowserModel);
  1211. smalltalk.addMethod(
  1212. "_environment_",
  1213. smalltalk.method({
  1214. selector: "environment:",
  1215. category: 'accessing',
  1216. fn: function (anEnvironment) {
  1217. var self = this;
  1218. self['@environment'] = anEnvironment;
  1219. return self;
  1220. },
  1221. args: ["anEnvironment"],
  1222. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  1223. messageSends: [],
  1224. referencedClasses: []
  1225. }),
  1226. smalltalk.HLBrowserModel);
  1227. smalltalk.addMethod(
  1228. "_packages",
  1229. smalltalk.method({
  1230. selector: "packages",
  1231. category: 'accessing',
  1232. fn: function () {
  1233. var self = this;
  1234. var $1;
  1235. $1 = smalltalk.send(smalltalk.send(self, "_environment", []), "_packages", []);
  1236. return $1;
  1237. },
  1238. args: [],
  1239. source: "packages\x0a\x09^ self environment packages",
  1240. messageSends: ["packages", "environment"],
  1241. referencedClasses: []
  1242. }),
  1243. smalltalk.HLBrowserModel);
  1244. smalltalk.addMethod(
  1245. "_selectedClass",
  1246. smalltalk.method({
  1247. selector: "selectedClass",
  1248. category: 'accessing',
  1249. fn: function () {
  1250. var self = this;
  1251. return self['@selectedClass'];
  1252. },
  1253. args: [],
  1254. source: "selectedClass\x0a\x09^ selectedClass",
  1255. messageSends: [],
  1256. referencedClasses: []
  1257. }),
  1258. smalltalk.HLBrowserModel);
  1259. smalltalk.addMethod(
  1260. "_selectedClass_",
  1261. smalltalk.method({
  1262. selector: "selectedClass:",
  1263. category: 'accessing',
  1264. fn: function (aClass){
  1265. var self=this;
  1266. var $1,$2,$3;
  1267. $1=smalltalk.send(self["@selectedClass"],"__eq",[aClass]);
  1268. if(! smalltalk.assert($1)){
  1269. if(($receiver = aClass) == nil || $receiver == undefined){
  1270. self["@selectedClass"]=nil;
  1271. self["@selectedClass"];
  1272. } else {
  1273. $2=smalltalk.send(self,"_showInstance",[]);
  1274. if(smalltalk.assert($2)){
  1275. self["@selectedClass"]=smalltalk.send(aClass,"_theNonMetaClass",[]);
  1276. self["@selectedClass"];
  1277. } else {
  1278. self["@selectedClass"]=smalltalk.send(aClass,"_theMetaClass",[]);
  1279. self["@selectedClass"];
  1280. };
  1281. };
  1282. smalltalk.send(self,"_selectedMethod_",[nil]);
  1283. $3=smalltalk.send(self,"_selectedProtocol_",[nil]);
  1284. $3;
  1285. };
  1286. smalltalk.send(smalltalk.send(self,"_announcer",[]),"_announce_",[smalltalk.send((smalltalk.HLClassSelected || HLClassSelected),"_on_",[smalltalk.send(self,"_selectedClass",[])])]);
  1287. return self},
  1288. args: ["aClass"],
  1289. source: "selectedClass: aClass\x0a\x09selectedClass = aClass ifFalse: [\x0a\x09\x09aClass \x0a \x09\x09ifNil: [ selectedClass := nil ]\x0a \x09\x09ifNotNil: [\x0a\x09\x09\x09\x09self showInstance \x0a \x09\x09\x09\x09ifTrue: [ selectedClass := aClass theNonMetaClass ]\x0a \x09\x09\x09\x09ifFalse: [ selectedClass := aClass theMetaClass ] ].\x0a \x0a \x09\x09self \x0a \x09\x09selectedMethod: nil;\x0a \x09 \x09selectedProtocol: nil ].\x0a \x0a self announcer announce: (HLClassSelected on: self selectedClass)",
  1290. messageSends: ["ifFalse:", "ifNil:ifNotNil:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "showInstance", "selectedMethod:", "selectedProtocol:", "=", "announce:", "on:", "selectedClass", "announcer"],
  1291. referencedClasses: ["HLClassSelected"]
  1292. }),
  1293. smalltalk.HLBrowserModel);
  1294. smalltalk.addMethod(
  1295. "_selectedMethod",
  1296. smalltalk.method({
  1297. selector: "selectedMethod",
  1298. category: 'accessing',
  1299. fn: function () {
  1300. var self = this;
  1301. return self['@selectedMethod'];
  1302. },
  1303. args: [],
  1304. source: "selectedMethod\x0a\x09^ selectedMethod",
  1305. messageSends: [],
  1306. referencedClasses: []
  1307. }),
  1308. smalltalk.HLBrowserModel);
  1309. smalltalk.addMethod(
  1310. "_selectedMethod_",
  1311. smalltalk.method({
  1312. selector: "selectedMethod:",
  1313. category: 'accessing',
  1314. fn: function (aCompiledMethod){
  1315. var self=this;
  1316. var $1;
  1317. $1=smalltalk.send(self["@selectedMethod"],"__eq",[aCompiledMethod]);
  1318. if(! smalltalk.assert($1)){
  1319. self["@selectedMethod"]=aCompiledMethod;
  1320. self["@selectedMethod"];
  1321. };
  1322. smalltalk.send(smalltalk.send(self,"_announcer",[]),"_announce_",[smalltalk.send((smalltalk.HLMethodSelected || HLMethodSelected),"_on_",[aCompiledMethod])]);
  1323. return self},
  1324. args: ["aCompiledMethod"],
  1325. source: "selectedMethod: aCompiledMethod\x0a\x09selectedMethod = aCompiledMethod ifFalse: [\x0a\x09\x09selectedMethod := aCompiledMethod ].\x0a \x0a self announcer announce: (HLMethodSelected on: aCompiledMethod)",
  1326. messageSends: ["ifFalse:", "=", "announce:", "on:", "announcer"],
  1327. referencedClasses: ["HLMethodSelected"]
  1328. }),
  1329. smalltalk.HLBrowserModel);
  1330. smalltalk.addMethod(
  1331. "_selectedPackage",
  1332. smalltalk.method({
  1333. selector: "selectedPackage",
  1334. category: 'accessing',
  1335. fn: function () {
  1336. var self = this;
  1337. return self['@selectedPackage'];
  1338. },
  1339. args: [],
  1340. source: "selectedPackage\x0a\x09^ selectedPackage",
  1341. messageSends: [],
  1342. referencedClasses: []
  1343. }),
  1344. smalltalk.HLBrowserModel);
  1345. smalltalk.addMethod(
  1346. "_selectedPackage_",
  1347. smalltalk.method({
  1348. selector: "selectedPackage:",
  1349. category: 'accessing',
  1350. fn: function (aPackage){
  1351. var self=this;
  1352. var $1;
  1353. $1=smalltalk.send(self["@selectedPackage"],"__eq",[aPackage]);
  1354. if(! smalltalk.assert($1)){
  1355. self["@selectedPackage"]=aPackage;
  1356. self["@selectedPackage"];
  1357. smalltalk.send(self,"_selectedClass_",[nil]);
  1358. };
  1359. smalltalk.send(smalltalk.send(self,"_announcer",[]),"_announce_",[smalltalk.send((smalltalk.HLPackageSelected || HLPackageSelected),"_on_",[aPackage])]);
  1360. return self},
  1361. args: ["aPackage"],
  1362. source: "selectedPackage: aPackage\x0a\x09selectedPackage = aPackage ifFalse: [\x0a\x09\x09selectedPackage := aPackage.\x0a \x09self selectedClass: nil ].\x0a \x0a self announcer announce: (HLPackageSelected on: aPackage)",
  1363. messageSends: ["ifFalse:", "selectedClass:", "=", "announce:", "on:", "announcer"],
  1364. referencedClasses: ["HLPackageSelected"]
  1365. }),
  1366. smalltalk.HLBrowserModel);
  1367. smalltalk.addMethod(
  1368. "_selectedProtocol",
  1369. smalltalk.method({
  1370. selector: "selectedProtocol",
  1371. category: 'accessing',
  1372. fn: function () {
  1373. var self = this;
  1374. return self['@selectedProtocol'];
  1375. },
  1376. args: [],
  1377. source: "selectedProtocol\x0a\x09^ selectedProtocol",
  1378. messageSends: [],
  1379. referencedClasses: []
  1380. }),
  1381. smalltalk.HLBrowserModel);
  1382. smalltalk.addMethod(
  1383. "_selectedProtocol_",
  1384. smalltalk.method({
  1385. selector: "selectedProtocol:",
  1386. category: 'accessing',
  1387. fn: function (aString){
  1388. var self=this;
  1389. var $1;
  1390. $1=smalltalk.send(self["@selectedProtocol"],"__eq",[aString]);
  1391. if(! smalltalk.assert($1)){
  1392. self["@selectedProtocol"]=aString;
  1393. self["@selectedProtocol"];
  1394. smalltalk.send(self,"_selectedMethod_",[nil]);
  1395. };
  1396. smalltalk.send(smalltalk.send(self,"_announcer",[]),"_announce_",[smalltalk.send((smalltalk.HLProtocolSelected || HLProtocolSelected),"_on_",[aString])]);
  1397. return self},
  1398. args: ["aString"],
  1399. source: "selectedProtocol: aString\x0a\x09selectedProtocol = aString ifFalse: [\x0a \x09selectedProtocol := aString.\x0a \x09self selectedMethod: nil ].\x0a \x0a self announcer announce: (HLProtocolSelected on: aString)",
  1400. messageSends: ["ifFalse:", "selectedMethod:", "=", "announce:", "on:", "announcer"],
  1401. referencedClasses: ["HLProtocolSelected"]
  1402. }),
  1403. smalltalk.HLBrowserModel);
  1404. smalltalk.addMethod(
  1405. "_showComment",
  1406. smalltalk.method({
  1407. selector: "showComment",
  1408. category: 'accessing',
  1409. fn: function () {
  1410. var self = this;
  1411. var $1;
  1412. if (($receiver = self['@showComment']) == nil || $receiver == undefined) {
  1413. $1 = false;
  1414. } else {
  1415. $1 = self['@showComment'];
  1416. }
  1417. return $1;
  1418. },
  1419. args: [],
  1420. source: "showComment\x0a\x09^ showComment ifNil: [ false ]",
  1421. messageSends: ["ifNil:"],
  1422. referencedClasses: []
  1423. }),
  1424. smalltalk.HLBrowserModel);
  1425. smalltalk.addMethod(
  1426. "_showComment_",
  1427. smalltalk.method({
  1428. selector: "showComment:",
  1429. category: 'accessing',
  1430. fn: function (aBoolean) {
  1431. var self = this;
  1432. self['@showComment'] = aBoolean;
  1433. smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLShowCommentToggled || HLShowCommentToggled, "_new", [])]);
  1434. return self;
  1435. },
  1436. args: ["aBoolean"],
  1437. source: "showComment: aBoolean\x0a\x09showComment := aBoolean.\x0a \x0a self announcer announce: HLShowCommentToggled new",
  1438. messageSends: ["announce:", "new", "announcer"],
  1439. referencedClasses: ["HLShowCommentToggled"]
  1440. }),
  1441. smalltalk.HLBrowserModel);
  1442. smalltalk.addMethod(
  1443. "_showInstance",
  1444. smalltalk.method({
  1445. selector: "showInstance",
  1446. category: 'accessing',
  1447. fn: function () {
  1448. var self = this;
  1449. var $1;
  1450. if (($receiver = self['@showInstance']) == nil ||
  1451. $receiver == undefined) {
  1452. $1 = true;
  1453. } else {
  1454. $1 = self['@showInstance'];
  1455. }
  1456. return $1;
  1457. },
  1458. args: [],
  1459. source: "showInstance\x0a\x09^ showInstance ifNil: [ true ]",
  1460. messageSends: ["ifNil:"],
  1461. referencedClasses: []
  1462. }),
  1463. smalltalk.HLBrowserModel);
  1464. smalltalk.addMethod(
  1465. "_showInstance_",
  1466. smalltalk.method({
  1467. selector: "showInstance:",
  1468. category: 'accessing',
  1469. fn: function (aBoolean) {
  1470. var self = this;
  1471. var $1, $2;
  1472. self['@showInstance'] = aBoolean;
  1473. $1 = smalltalk.send(self, "_selectedClass", []);
  1474. if (($receiver = $1) == nil || $receiver == undefined) {
  1475. } else {
  1476. if (smalltalk.assert(aBoolean)) {
  1477. $2 = smalltalk.send(smalltalk.send(self, "_selectedClass", []), "_theNonMetaClass", []);
  1478. } else {
  1479. $2 = smalltalk.send(smalltalk.send(self, "_selectedClass", []), "_theMetaClass", []);
  1480. }
  1481. smalltalk.send(self, "_selectedClass_", [$2]);
  1482. }
  1483. smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, "_new", [])]);
  1484. return self;
  1485. },
  1486. args: ["aBoolean"],
  1487. source: "showInstance: aBoolean\x0a\x09showInstance := aBoolean.\x0a \x0a self selectedClass ifNotNil: [\x0a \x09self selectedClass: (aBoolean\x0a \x09\x09ifTrue: [self selectedClass theNonMetaClass ]\x0a \x09 \x09ifFalse: [ self selectedClass theMetaClass ]) ].\x0a \x0a self announcer announce: HLShowInstanceToggled new",
  1488. messageSends: ["ifNotNil:", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "selectedClass", "theMetaClass", "announce:", "new", "announcer"],
  1489. referencedClasses: ["HLShowInstanceToggled"]
  1490. }),
  1491. smalltalk.HLBrowserModel);
  1492. smalltalk.addMethod(
  1493. "_subscribe_",
  1494. smalltalk.method({
  1495. selector: "subscribe:",
  1496. category: 'announcements',
  1497. fn: function (aWidget) {
  1498. var self = this;
  1499. smalltalk.send(aWidget, "_subscribeTo_", [smalltalk.send(self, "_announcer", [])]);
  1500. return self;
  1501. },
  1502. args: ["aWidget"],
  1503. source: "subscribe: aWidget\x0a\x09aWidget subscribeTo: self announcer",
  1504. messageSends: ["subscribeTo:", "announcer"],
  1505. referencedClasses: []
  1506. }),
  1507. smalltalk.HLBrowserModel);
  1508. smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'sourceArea'], 'Helios-Browser');
  1509. smalltalk.addMethod(
  1510. "_classSelected_",
  1511. smalltalk.method({
  1512. selector: "classSelected:",
  1513. category: 'actions',
  1514. fn: function (aClass) {
  1515. var self = this;
  1516. var $1;
  1517. if (($receiver = aClass) == nil || $receiver == undefined) {
  1518. $1 = smalltalk.send(self, "_contents_", [""]);
  1519. return $1;
  1520. } else {
  1521. }
  1522. smalltalk.send(self, "_contents_", [smalltalk.send(aClass, "_definition", [])]);
  1523. return self;
  1524. },
  1525. args: ["aClass"],
  1526. source: "classSelected: aClass\x0a\x09aClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: aClass definition",
  1527. messageSends: ["ifNil:", "contents:", "definition"],
  1528. referencedClasses: []
  1529. }),
  1530. smalltalk.HLBrowserSourceWidget);
  1531. smalltalk.addMethod(
  1532. "_contents",
  1533. smalltalk.method({
  1534. selector: "contents",
  1535. category: 'accessing',
  1536. fn: function () {
  1537. var self = this;
  1538. var $1;
  1539. $1 = smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_contents", []);
  1540. return $1;
  1541. },
  1542. args: [],
  1543. source: "contents\x0a\x09^ self sourceArea contents",
  1544. messageSends: ["contents", "sourceArea"],
  1545. referencedClasses: []
  1546. }),
  1547. smalltalk.HLBrowserSourceWidget);
  1548. smalltalk.addMethod(
  1549. "_contents_",
  1550. smalltalk.method({
  1551. selector: "contents:",
  1552. category: 'accessing',
  1553. fn: function (aString) {
  1554. var self = this;
  1555. smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_contents_", [aString]);
  1556. return self;
  1557. },
  1558. args: ["aString"],
  1559. source: "contents: aString\x0a\x09self sourceArea contents: aString",
  1560. messageSends: ["contents:", "sourceArea"],
  1561. referencedClasses: []
  1562. }),
  1563. smalltalk.HLBrowserSourceWidget);
  1564. smalltalk.addMethod(
  1565. "_methodSelected_",
  1566. smalltalk.method({
  1567. selector: "methodSelected:",
  1568. category: 'actions',
  1569. fn: function (aCompiledMethod) {
  1570. var self = this;
  1571. var $1;
  1572. if (($receiver = aCompiledMethod) == nil || $receiver == undefined) {
  1573. $1 = smalltalk.send(self, "_contents_", [""]);
  1574. return $1;
  1575. } else {
  1576. }
  1577. smalltalk.send(self, "_contents_", [smalltalk.send(aCompiledMethod, "_source", [])]);
  1578. return self;
  1579. },
  1580. args: ["aCompiledMethod"],
  1581. source: "methodSelected: aCompiledMethod\x0a\x09aCompiledMethod ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: aCompiledMethod source",
  1582. messageSends: ["ifNil:", "contents:", "source"],
  1583. referencedClasses: []
  1584. }),
  1585. smalltalk.HLBrowserSourceWidget);
  1586. smalltalk.addMethod(
  1587. "_model",
  1588. smalltalk.method({
  1589. selector: "model",
  1590. category: 'accessing',
  1591. fn: function () {
  1592. var self = this;
  1593. return self['@model'];
  1594. },
  1595. args: [],
  1596. source: "model\x0a\x09^ model",
  1597. messageSends: [],
  1598. referencedClasses: []
  1599. }),
  1600. smalltalk.HLBrowserSourceWidget);
  1601. smalltalk.addMethod(
  1602. "_model_",
  1603. smalltalk.method({
  1604. selector: "model:",
  1605. category: 'accessing',
  1606. fn: function (aBrowserModel) {
  1607. var self = this;
  1608. self['@model'] = aBrowserModel;
  1609. smalltalk.send(self['@model'], "_subscribe_", [self]);
  1610. return self;
  1611. },
  1612. args: ["aBrowserModel"],
  1613. source: "model: aBrowserModel\x0a\x09\x22TODO: unsubscribe from previous model\x22\x0a \x0a\x09model := aBrowserModel.\x0a model subscribe: self",
  1614. messageSends: ["subscribe:"],
  1615. referencedClasses: []
  1616. }),
  1617. smalltalk.HLBrowserSourceWidget);
  1618. smalltalk.addMethod(
  1619. "_protocolSelected_",
  1620. smalltalk.method({
  1621. selector: "protocolSelected:",
  1622. category: 'actions',
  1623. fn: function (aString) {
  1624. var self = this;
  1625. var $1, $2;
  1626. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []);
  1627. if (($receiver = $1) == nil || $receiver == undefined) {
  1628. $2 = smalltalk.send(self, "_contents_", [""]);
  1629. return $2;
  1630. } else {
  1631. }
  1632. smalltalk.send(self, "_contents_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []), "_definition", [])]);
  1633. return self;
  1634. },
  1635. args: ["aString"],
  1636. source: "protocolSelected: aString\x0a\x09self model selectedClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: self model selectedClass definition",
  1637. messageSends: ["ifNil:", "contents:", "selectedClass", "model", "definition"],
  1638. referencedClasses: []
  1639. }),
  1640. smalltalk.HLBrowserSourceWidget);
  1641. smalltalk.addMethod(
  1642. "_renderContentOn_",
  1643. smalltalk.method({
  1644. selector: "renderContentOn:",
  1645. category: 'rendering',
  1646. fn: function (html) {
  1647. var self = this;
  1648. smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_renderOn_", [html]);
  1649. return self;
  1650. },
  1651. args: ["html"],
  1652. source: "renderContentOn: html\x0a\x09self sourceArea renderOn: html",
  1653. messageSends: ["renderOn:", "sourceArea"],
  1654. referencedClasses: []
  1655. }),
  1656. smalltalk.HLBrowserSourceWidget);
  1657. smalltalk.addMethod(
  1658. "_sourceArea",
  1659. smalltalk.method({
  1660. selector: "sourceArea",
  1661. category: 'accessing',
  1662. fn: function () {
  1663. var self = this;
  1664. var $1;
  1665. if (($receiver = self['@sourceArea']) == nil || $receiver == undefined) {
  1666. self['@sourceArea'] = smalltalk.send(smalltalk.HLSourceArea || HLSourceArea, "_new", []);
  1667. $1 = self['@sourceArea'];
  1668. } else {
  1669. $1 = self['@sourceArea'];
  1670. }
  1671. return $1;
  1672. },
  1673. args: [],
  1674. source: "sourceArea\x0a\x09^ sourceArea ifNil: [ sourceArea := HLSourceArea new ]",
  1675. messageSends: ["ifNil:", "new"],
  1676. referencedClasses: ["HLSourceArea"]
  1677. }),
  1678. smalltalk.HLBrowserSourceWidget);
  1679. smalltalk.addMethod(
  1680. "_subscribeTo_",
  1681. smalltalk.method({
  1682. selector: "subscribeTo:",
  1683. category: 'announcements',
  1684. fn: function (anAnnouncer) {
  1685. var self = this;
  1686. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLMethodSelected || HLMethodSelected, function (ann) {return smalltalk.send(self, "_methodSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  1687. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_classSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  1688. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_protocolSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  1689. return self;
  1690. },
  1691. args: ["anAnnouncer"],
  1692. source: "subscribeTo: anAnnouncer\x0a\x09anAnnouncer on: HLMethodSelected do: [ :ann |\x0a \x09self methodSelected: ann item ].\x0a anAnnouncer on: HLClassSelected do: [ :ann |\x0a \x09self classSelected: ann item ].\x0a anAnnouncer on: HLProtocolSelected do: [ :ann |\x0a \x09self protocolSelected: ann item ]",
  1693. messageSends: ["on:do:", "methodSelected:", "item", "classSelected:", "protocolSelected:"],
  1694. referencedClasses: ["HLMethodSelected", "HLClassSelected", "HLProtocolSelected"]
  1695. }),
  1696. smalltalk.HLBrowserSourceWidget);
  1697. smalltalk.addMethod(
  1698. "_on_",
  1699. smalltalk.method({
  1700. selector: "on:",
  1701. category: 'instance creation',
  1702. fn: function (aBrowserModel) {
  1703. var self = this;
  1704. var $2, $3, $1;
  1705. $2 = smalltalk.send(self, "_new", []);
  1706. smalltalk.send($2, "_model_", [aBrowserModel]);
  1707. $3 = smalltalk.send($2, "_yourself", []);
  1708. $1 = $3;
  1709. return $1;
  1710. },
  1711. args: ["aBrowserModel"],
  1712. source: "on: aBrowserModel\x0a\x09^ self new\x0a \x09model: aBrowserModel;\x0a yourself",
  1713. messageSends: ["model:", "new", "yourself"],
  1714. referencedClasses: []
  1715. }),
  1716. smalltalk.HLBrowserSourceWidget.klass);