1
0

Helios-Browser.js 72 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953
  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, "_observeModel", []);
  323. return self;
  324. },
  325. args: ["aBrowserModel"],
  326. source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a \x0a self observeModel",
  327. messageSends: ["observeModel"],
  328. referencedClasses: []
  329. }),
  330. smalltalk.HLBrowserListWidget);
  331. smalltalk.addMethod(
  332. "_observeModel",
  333. smalltalk.method({
  334. selector: "observeModel",
  335. category: 'actions',
  336. fn: function () {
  337. var self = this;
  338. return self;
  339. },
  340. args: [],
  341. source: "observeModel",
  342. messageSends: [],
  343. referencedClasses: []
  344. }),
  345. smalltalk.HLBrowserListWidget);
  346. smalltalk.addMethod(
  347. "_on_",
  348. smalltalk.method({
  349. selector: "on:",
  350. category: 'instance creation',
  351. fn: function (aModel) {
  352. var self = this;
  353. var $2, $3, $1;
  354. $2 = smalltalk.send(self, "_new", []);
  355. smalltalk.send($2, "_model_", [aModel]);
  356. $3 = smalltalk.send($2, "_yourself", []);
  357. $1 = $3;
  358. return $1;
  359. },
  360. args: ["aModel"],
  361. source: "on: aModel\x0a\x09^ self new \x0a \x09model: aModel;\x0a yourself",
  362. messageSends: ["model:", "new", "yourself"],
  363. referencedClasses: []
  364. }),
  365. smalltalk.HLBrowserListWidget.klass);
  366. smalltalk.addClass('HLClassesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  367. smalltalk.addMethod(
  368. "_focusMethodsListWidget",
  369. smalltalk.method({
  370. selector: "focusMethodsListWidget",
  371. category: 'actions',
  372. fn: function () {
  373. var self = this;
  374. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLMethodsListFocus || HLMethodsListFocus, "_new", [])]);
  375. return self;
  376. },
  377. args: [],
  378. source: "focusMethodsListWidget\x0a\x09self model announcer announce: HLMethodsListFocus new",
  379. messageSends: ["announce:", "new", "announcer", "model"],
  380. referencedClasses: ["HLMethodsListFocus"]
  381. }),
  382. smalltalk.HLClassesListWidget);
  383. smalltalk.addMethod(
  384. "_focusProtocolsListWidget",
  385. smalltalk.method({
  386. selector: "focusProtocolsListWidget",
  387. category: 'actions',
  388. fn: function () {
  389. var self = this;
  390. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLProtocolsListFocus || HLProtocolsListFocus, "_new", [])]);
  391. return self;
  392. },
  393. args: [],
  394. source: "focusProtocolsListWidget\x0a\x09self model announcer announce: HLProtocolsListFocus new",
  395. messageSends: ["announce:", "new", "announcer", "model"],
  396. referencedClasses: ["HLProtocolsListFocus"]
  397. }),
  398. smalltalk.HLClassesListWidget);
  399. smalltalk.addMethod(
  400. "_getChildrenOf_",
  401. smalltalk.method({
  402. selector: "getChildrenOf:",
  403. category: 'accessing',
  404. fn: function (aClass) {
  405. var self = this;
  406. var $1;
  407. $1 = smalltalk.send(smalltalk.send(self, "_items", []), "_select_", [function (each) {return smalltalk.send(smalltalk.send(each, "_superclass", []), "__eq", [aClass]);}]);
  408. return $1;
  409. },
  410. args: ["aClass"],
  411. source: "getChildrenOf: aClass\x0a\x09^ self items select: [ :each | each superclass = aClass ]",
  412. messageSends: ["select:", "=", "superclass", "items"],
  413. referencedClasses: []
  414. }),
  415. smalltalk.HLClassesListWidget);
  416. smalltalk.addMethod(
  417. "_getRootClassesOf_",
  418. smalltalk.method({
  419. selector: "getRootClassesOf:",
  420. category: 'accessing',
  421. fn: function (aCollection) {
  422. var self = this;
  423. var $1;
  424. $1 = smalltalk.send(aCollection, "_select_", [function (each) {return smalltalk.send(smalltalk.send(smalltalk.send(each, "_allSuperclasses", []), "_intersection_", [aCollection]), "_isEmpty", []);}]);
  425. return $1;
  426. },
  427. args: ["aCollection"],
  428. source: "getRootClassesOf: aCollection\x0a\x09^ aCollection select: [ :each |\x0a \x09(each allSuperclasses intersection: aCollection) isEmpty ]",
  429. messageSends: ["select:", "isEmpty", "intersection:", "allSuperclasses"],
  430. referencedClasses: []
  431. }),
  432. smalltalk.HLClassesListWidget);
  433. smalltalk.addMethod(
  434. "_iconForItem_",
  435. smalltalk.method({
  436. selector: "iconForItem:",
  437. category: 'accessing',
  438. fn: function (aClass) {
  439. var self = this;
  440. var $2, $1;
  441. $2 = smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_theNonMetaClass", []), "_comment", []), "_isEmpty", []);
  442. if (smalltalk.assert($2)) {
  443. $1 = "icon-question-sign";
  444. } else {
  445. $1 = "icon-none";
  446. }
  447. return $1;
  448. },
  449. args: ["aClass"],
  450. source: "iconForItem: aClass\x0a\x09^ aClass theNonMetaClass comment isEmpty\x0a \x09ifFalse: [ 'icon-none' ]\x0a \x09ifTrue: [ 'icon-question-sign' ]",
  451. messageSends: ["ifFalse:ifTrue:", "isEmpty", "comment", "theNonMetaClass"],
  452. referencedClasses: []
  453. }),
  454. smalltalk.HLClassesListWidget);
  455. smalltalk.addMethod(
  456. "_observeModel",
  457. smalltalk.method({
  458. selector: "observeModel",
  459. category: 'actions',
  460. fn: function () {
  461. var self = this;
  462. var $1, $2;
  463. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []);
  464. smalltalk.send($1, "_on_do_", [smalltalk.HLPackageSelected || HLPackageSelected, function (ann) {return smalltalk.send(self, "_onPackageSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  465. smalltalk.send($1, "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_onShowInstanceToggled", []);}]);
  466. $2 = smalltalk.send($1, "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_onClassSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  467. return self;
  468. },
  469. args: [],
  470. source: "observeModel\x0a\x09self model announcer \x0a \x09on: HLPackageSelected do: [ :ann | self onPackageSelected: ann item ];\x0a \x09on: HLShowInstanceToggled do: [ :ann | self onShowInstanceToggled ];\x0a\x09\x09on: HLClassSelected do: [ :ann | self onClassSelected: ann item ]",
  471. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model", "onShowInstanceToggled", "onClassSelected:"],
  472. referencedClasses: ["HLPackageSelected", "HLShowInstanceToggled", "HLClassSelected"]
  473. }),
  474. smalltalk.HLClassesListWidget);
  475. smalltalk.addMethod(
  476. "_onClassSelected_",
  477. smalltalk.method({
  478. selector: "onClassSelected:",
  479. category: 'reactions',
  480. fn: function (aClass) {
  481. var self = this;
  482. smalltalk.send(self, "_focus", []);
  483. return self;
  484. },
  485. args: ["aClass"],
  486. source: "onClassSelected: aClass\x0a\x09self focus",
  487. messageSends: ["focus"],
  488. referencedClasses: []
  489. }),
  490. smalltalk.HLClassesListWidget);
  491. smalltalk.addMethod(
  492. "_onPackageSelected_",
  493. smalltalk.method({
  494. selector: "onPackageSelected:",
  495. category: 'reactions',
  496. fn: function (aPackage) {
  497. var self = this;
  498. var $1;
  499. smalltalk.send(self, "_selectedItem_", [nil]);
  500. if (($receiver = aPackage) == nil || $receiver == undefined) {
  501. $1 = [];
  502. } else {
  503. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aPackage, "_classes", []), "_collect_", [function (each) {return smalltalk.send(each, "_theNonMetaClass", []);}]), "_asSet", []), "_asArray", []);
  504. }
  505. smalltalk.send(self, "_items_", [$1]);
  506. smalltalk.send(self, "_refresh", []);
  507. return self;
  508. },
  509. args: ["aPackage"],
  510. source: "onPackageSelected: 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",
  511. messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "asArray", "asSet", "collect:", "theNonMetaClass", "classes", "refresh"],
  512. referencedClasses: []
  513. }),
  514. smalltalk.HLClassesListWidget);
  515. smalltalk.addMethod(
  516. "_onShowInstanceToggled",
  517. smalltalk.method({
  518. selector: "onShowInstanceToggled",
  519. category: 'reactions',
  520. fn: function () {
  521. var self = this;
  522. smalltalk.send(self, "_refresh", []);
  523. return self;
  524. },
  525. args: [],
  526. source: "onShowInstanceToggled\x0a\x09self refresh",
  527. messageSends: ["refresh"],
  528. referencedClasses: []
  529. }),
  530. smalltalk.HLClassesListWidget);
  531. smalltalk.addMethod(
  532. "_renderButtonsOn_",
  533. smalltalk.method({
  534. selector: "renderButtonsOn:",
  535. category: 'rendering',
  536. fn: function (html) {
  537. var self = this;
  538. var $1, $3, $4, $5, $6, $7, $8, $2, $9, $10;
  539. $1 = smalltalk.send(html, "_div", []);
  540. smalltalk.send($1, "_class_", ["btn-group"]);
  541. smalltalk.send($1, "_at_put_", ["data-toggle", "buttons-radio"]);
  542. $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;}]);
  543. $9 = smalltalk.send(html, "_button", []);
  544. smalltalk.send($9, "_class_", ["btn"]);
  545. smalltalk.send($9, "_at_put_", ["data-toggle", "button"]);
  546. $10 = smalltalk.send($9, "_with_", ["Comment"]);
  547. return self;
  548. },
  549. args: ["html"],
  550. 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'",
  551. messageSends: ["class:", "div", "at:put:", "with:", "streamContents:", "nextPutAll:", "ifTrue:", "showInstance", "button", "onClick:", "showInstance:", "ifFalse:", "model"],
  552. referencedClasses: ["String"]
  553. }),
  554. smalltalk.HLClassesListWidget);
  555. smalltalk.addMethod(
  556. "_renderItem_level_on_",
  557. smalltalk.method({
  558. selector: "renderItem:level:on:",
  559. category: 'rendering',
  560. fn: function (aClass, anInteger, html) {
  561. var self = this;
  562. var $2, $3, $1;
  563. var li;
  564. li = smalltalk.send(html, "_li", []);
  565. smalltalk.send(li, "_at_put_", ["list-data", smalltalk.send(smalltalk.send(self, "_items", []), "_indexOf_", [aClass])]);
  566. smalltalk.send(li, "_class_", [smalltalk.send(self, "_cssClassForItem_", [aClass])]);
  567. $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;}]);
  568. smalltalk.send(smalltalk.send(self, "_getChildrenOf_", [aClass]), "_do_", [function (each) {return smalltalk.send(self, "_renderItem_level_on_", [each, smalltalk.send(anInteger, "__plus", [1]), html]);}]);
  569. return self;
  570. },
  571. args: ["aClass", "anInteger", "html"],
  572. 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 ]",
  573. messageSends: ["li", "at:put:", "indexOf:", "items", "class:", "cssClassForItem:", "with:", "iconForItem:", "tag:", "renderItemLabel:level:on:", "a", "onClick:", "activateListItem:", "asJQuery", "do:", "renderItem:level:on:", "+", "getChildrenOf:"],
  574. referencedClasses: []
  575. }),
  576. smalltalk.HLClassesListWidget);
  577. smalltalk.addMethod(
  578. "_renderItem_on_",
  579. smalltalk.method({
  580. selector: "renderItem:on:",
  581. category: 'rendering',
  582. fn: function (aClass, html) {
  583. var self = this;
  584. smalltalk.send(self, "_renderItem_on_", [aClass, html], smalltalk.HLBrowserListWidget);
  585. smalltalk.send(smalltalk.send(self, "_getChildrenOf_", [aClass]), "_do_", [function (each) {return smalltalk.send(self, "_renderItem_level_on_", [each, 1, html]);}]);
  586. return self;
  587. },
  588. args: ["aClass", "html"],
  589. 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 ]",
  590. messageSends: ["renderItem:on:", "do:", "renderItem:level:on:", "getChildrenOf:"],
  591. referencedClasses: []
  592. }),
  593. smalltalk.HLClassesListWidget);
  594. smalltalk.addMethod(
  595. "_renderItemLabel_level_on_",
  596. smalltalk.method({
  597. selector: "renderItemLabel:level:on:",
  598. category: 'rendering',
  599. fn: function (aClass, anInteger, html) {
  600. var self = this;
  601. 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", [])]);}])]);
  602. return self;
  603. },
  604. args: ["aClass", "anInteger", "html"],
  605. 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 ])",
  606. messageSends: ["html:", "streamContents:", "timesRepeat:", "nextPutAll:", "name", "asJQuery", "span"],
  607. referencedClasses: ["String"]
  608. }),
  609. smalltalk.HLClassesListWidget);
  610. smalltalk.addMethod(
  611. "_renderItemLabel_on_",
  612. smalltalk.method({
  613. selector: "renderItemLabel:on:",
  614. category: 'rendering',
  615. fn: function (aClass, html) {
  616. var self = this;
  617. smalltalk.send(self, "_renderItemLabel_level_on_", [aClass, 0, html]);
  618. return self;
  619. },
  620. args: ["aClass", "html"],
  621. source: "renderItemLabel: aClass on: html\x0a\x09self renderItemLabel: aClass level: 0 on: html",
  622. messageSends: ["renderItemLabel:level:on:"],
  623. referencedClasses: []
  624. }),
  625. smalltalk.HLClassesListWidget);
  626. smalltalk.addMethod(
  627. "_renderListOn_",
  628. smalltalk.method({
  629. selector: "renderListOn:",
  630. category: 'rendering',
  631. fn: function (html) {
  632. var self = this;
  633. smalltalk.send(smalltalk.send(self, "_getRootClassesOf_", [smalltalk.send(self, "_items", [])]), "_do_", [function (each) {return smalltalk.send(self, "_renderItem_on_", [each, html]);}]);
  634. return self;
  635. },
  636. args: ["html"],
  637. source: "renderListOn: html\x0a\x09(self getRootClassesOf: self items)\x0a \x09do: [ :each | self renderItem: each on: html ]",
  638. messageSends: ["do:", "renderItem:on:", "getRootClassesOf:", "items"],
  639. referencedClasses: []
  640. }),
  641. smalltalk.HLClassesListWidget);
  642. smalltalk.addMethod(
  643. "_selectItem_",
  644. smalltalk.method({
  645. selector: "selectItem:",
  646. category: 'actions',
  647. fn: function (aClass) {
  648. var self = this;
  649. smalltalk.send(self, "_selectItem_", [aClass], smalltalk.HLBrowserListWidget);
  650. smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass_", [aClass]);
  651. return self;
  652. },
  653. args: ["aClass"],
  654. source: "selectItem: aClass\x0a\x09super selectItem: aClass.\x0a self model selectedClass: aClass",
  655. messageSends: ["selectItem:", "selectedClass:", "model"],
  656. referencedClasses: []
  657. }),
  658. smalltalk.HLClassesListWidget);
  659. smalltalk.addMethod(
  660. "_showInstance",
  661. smalltalk.method({
  662. selector: "showInstance",
  663. category: 'accessing',
  664. fn: function () {
  665. var self = this;
  666. var $1;
  667. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance", []);
  668. return $1;
  669. },
  670. args: [],
  671. source: "showInstance\x0a\x09^ self model showInstance",
  672. messageSends: ["showInstance", "model"],
  673. referencedClasses: []
  674. }),
  675. smalltalk.HLClassesListWidget);
  676. smalltalk.addMethod(
  677. "_showInstance_",
  678. smalltalk.method({
  679. selector: "showInstance:",
  680. category: 'actions',
  681. fn: function (aBoolean) {
  682. var self = this;
  683. smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance_", [aBoolean]);
  684. return self;
  685. },
  686. args: ["aBoolean"],
  687. source: "showInstance: aBoolean\x0a\x09self model showInstance: aBoolean",
  688. messageSends: ["showInstance:", "model"],
  689. referencedClasses: []
  690. }),
  691. smalltalk.HLClassesListWidget);
  692. smalltalk.addClass('HLMethodsListWidget', smalltalk.HLBrowserListWidget, ['selectorsCache'], 'Helios-Browser');
  693. smalltalk.addMethod(
  694. "_allProtocol",
  695. smalltalk.method({
  696. selector: "allProtocol",
  697. category: 'accessing',
  698. fn: function () {
  699. var self = this;
  700. var $1;
  701. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_allProtocol", []);
  702. return $1;
  703. },
  704. args: [],
  705. source: "allProtocol\x0a\x09^ self model allProtocol",
  706. messageSends: ["allProtocol", "model"],
  707. referencedClasses: []
  708. }),
  709. smalltalk.HLMethodsListWidget);
  710. smalltalk.addMethod(
  711. "_flushSelectorsCache",
  712. smalltalk.method({
  713. selector: "flushSelectorsCache",
  714. category: 'cache',
  715. fn: function () {
  716. var self = this;
  717. self['@selectorsCache'] = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  718. return self;
  719. },
  720. args: [],
  721. source: "flushSelectorsCache\x0a\x09selectorsCache := Dictionary new",
  722. messageSends: ["new"],
  723. referencedClasses: ["Dictionary"]
  724. }),
  725. smalltalk.HLMethodsListWidget);
  726. smalltalk.addMethod(
  727. "_iconForItem_",
  728. smalltalk.method({
  729. selector: "iconForItem:",
  730. category: 'accessing',
  731. fn: function (aCompiledMethod) {
  732. var self = this;
  733. var $1;
  734. var override;
  735. var overriden;
  736. override = smalltalk.send(self, "_isOverride_", [aCompiledMethod]);
  737. overriden = smalltalk.send(self, "_isOverriden_", [aCompiledMethod]);
  738. if (smalltalk.assert(override)) {
  739. if (smalltalk.assert(overriden)) {
  740. $1 = "icon-resize-vertical";
  741. } else {
  742. $1 = "icon-arrow-up";
  743. }
  744. } else {
  745. if (smalltalk.assert(overriden)) {
  746. $1 = "icon-arrow-down";
  747. } else {
  748. $1 = "icon-none";
  749. }
  750. }
  751. return $1;
  752. },
  753. args: ["aCompiledMethod"],
  754. 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' ] ]",
  755. messageSends: ["isOverride:", "isOverriden:", "ifTrue:ifFalse:"],
  756. referencedClasses: []
  757. }),
  758. smalltalk.HLMethodsListWidget);
  759. smalltalk.addMethod(
  760. "_initialize",
  761. smalltalk.method({
  762. selector: "initialize",
  763. category: 'initialization',
  764. fn: function () {
  765. var self = this;
  766. smalltalk.send(self, "_initialize", [], smalltalk.HLBrowserListWidget);
  767. smalltalk.send(self, "_flushSelectorsCache", []);
  768. return self;
  769. },
  770. args: [],
  771. source: "initialize\x0a\x09super initialize.\x0a self flushSelectorsCache",
  772. messageSends: ["initialize", "flushSelectorsCache"],
  773. referencedClasses: []
  774. }),
  775. smalltalk.HLMethodsListWidget);
  776. smalltalk.addMethod(
  777. "_isOverride_",
  778. smalltalk.method({
  779. selector: "isOverride:",
  780. category: 'testing',
  781. fn: function (aMethod) {
  782. var self = this;
  783. var $1;
  784. $1 = smalltalk.send(smalltalk.send(self, "_overrideSelectors", []), "_includes_", [smalltalk.send(aMethod, "_selector", [])]);
  785. return $1;
  786. },
  787. args: ["aMethod"],
  788. source: "isOverride: aMethod\x0a\x0a ^ self overrideSelectors includes: aMethod selector",
  789. messageSends: ["includes:", "selector", "overrideSelectors"],
  790. referencedClasses: []
  791. }),
  792. smalltalk.HLMethodsListWidget);
  793. smalltalk.addMethod(
  794. "_isOverriden_",
  795. smalltalk.method({
  796. selector: "isOverriden:",
  797. category: 'testing',
  798. fn: function (aMethod) {
  799. var self = this;
  800. var $1;
  801. $1 = smalltalk.send(smalltalk.send(self, "_overridenSelectors", []), "_includes_", [smalltalk.send(aMethod, "_selector", [])]);
  802. return $1;
  803. },
  804. args: ["aMethod"],
  805. source: "isOverriden: aMethod\x0a\x0a ^ self overridenSelectors includes: aMethod selector",
  806. messageSends: ["includes:", "selector", "overridenSelectors"],
  807. referencedClasses: []
  808. }),
  809. smalltalk.HLMethodsListWidget);
  810. smalltalk.addMethod(
  811. "_methodsInProtocol_",
  812. smalltalk.method({
  813. selector: "methodsInProtocol:",
  814. category: 'accessing',
  815. fn: function (aString) {
  816. var self = this;
  817. var $2, $1;
  818. $2 = smalltalk.send(aString, "__eq", [smalltalk.send(self, "_allProtocol", [])]);
  819. if (smalltalk.assert($2)) {
  820. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []), "_methods", []);
  821. } else {
  822. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []), "_methodsInProtocol_", [aString]);
  823. }
  824. return $1;
  825. },
  826. args: ["aString"],
  827. source: "methodsInProtocol: aString\x0a\x09^ aString = self allProtocol\x0a \x09ifTrue: [ self model selectedClass methods ]\x0a \x09ifFalse: [ self model selectedClass methodsInProtocol: aString ]",
  828. messageSends: ["ifTrue:ifFalse:", "methods", "selectedClass", "model", "methodsInProtocol:", "=", "allProtocol"],
  829. referencedClasses: []
  830. }),
  831. smalltalk.HLMethodsListWidget);
  832. smalltalk.addMethod(
  833. "_observeModel",
  834. smalltalk.method({
  835. selector: "observeModel",
  836. category: 'actions',
  837. fn: function () {
  838. var self = this;
  839. 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", [])]);}]);
  840. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_onProtocolSelected_", [nil]);}]);
  841. 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", [])]);}]);
  842. return self;
  843. },
  844. args: [],
  845. source: "observeModel\x0a\x09self model announcer on: HLProtocolSelected do: [ :ann |\x0a \x09self onProtocolSelected: ann item ].\x0a self model announcer on: HLShowInstanceToggled do: [ :ann |\x0a \x09self onProtocolSelected: nil ].\x0a self model announcer on: HLMethodSelected do: [ :ann |\x0a \x09self onMethodSelected: ann item ]",
  846. messageSends: ["on:do:", "onProtocolSelected:", "item", "announcer", "model", "onMethodSelected:"],
  847. referencedClasses: ["HLProtocolSelected", "HLShowInstanceToggled", "HLMethodSelected"]
  848. }),
  849. smalltalk.HLMethodsListWidget);
  850. smalltalk.addMethod(
  851. "_onMethodSelected_",
  852. smalltalk.method({
  853. selector: "onMethodSelected:",
  854. category: 'reactions',
  855. fn: function (aMethod) {
  856. var self = this;
  857. smalltalk.send(self, "_focus", []);
  858. return self;
  859. },
  860. args: ["aMethod"],
  861. source: "onMethodSelected: aMethod\x0a\x09self focus",
  862. messageSends: ["focus"],
  863. referencedClasses: []
  864. }),
  865. smalltalk.HLMethodsListWidget);
  866. smalltalk.addMethod(
  867. "_onProtocolSelected_",
  868. smalltalk.method({
  869. selector: "onProtocolSelected:",
  870. category: 'reactions',
  871. fn: function (aString) {
  872. var self = this;
  873. var $2, $1;
  874. smalltalk.send(self, "_selectedItem_", [nil]);
  875. $2 = smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []);
  876. if (($receiver = $2) == nil || $receiver == undefined) {
  877. $1 = [];
  878. } else {
  879. if (($receiver = aString) == nil || $receiver == undefined) {
  880. $1 = [];
  881. } else {
  882. $1 = smalltalk.send(self, "_methodsInProtocol_", [aString]);
  883. }
  884. }
  885. smalltalk.send(self, "_items_", [$1]);
  886. smalltalk.send(self, "_refresh", []);
  887. return self;
  888. },
  889. args: ["aString"],
  890. source: "onProtocolSelected: 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",
  891. messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "methodsInProtocol:", "selectedClass", "model", "refresh"],
  892. referencedClasses: []
  893. }),
  894. smalltalk.HLMethodsListWidget);
  895. smalltalk.addMethod(
  896. "_overrideSelectors",
  897. smalltalk.method({
  898. selector: "overrideSelectors",
  899. category: 'accessing',
  900. fn: function () {
  901. var self = this;
  902. var $2, $1;
  903. $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;}]);}]);
  904. return $1;
  905. },
  906. args: [],
  907. 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 ] ]",
  908. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSuperclasses", "selectedClass", "model", "selectorsCache"],
  909. referencedClasses: ["Set"]
  910. }),
  911. smalltalk.HLMethodsListWidget);
  912. smalltalk.addMethod(
  913. "_overridenSelectors",
  914. smalltalk.method({
  915. selector: "overridenSelectors",
  916. category: 'accessing',
  917. fn: function () {
  918. var self = this;
  919. var $2, $1;
  920. $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;}]);}]);
  921. return $1;
  922. },
  923. args: [],
  924. 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 ] ]",
  925. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSubclasses", "selectedClass", "model", "selectorsCache"],
  926. referencedClasses: ["Set"]
  927. }),
  928. smalltalk.HLMethodsListWidget);
  929. smalltalk.addMethod(
  930. "_renderContentOn_",
  931. smalltalk.method({
  932. selector: "renderContentOn:",
  933. category: 'rendering',
  934. fn: function (html) {
  935. var self = this;
  936. var $1, $2, $3;
  937. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance", []);
  938. if (smalltalk.assert($1)) {
  939. smalltalk.send(self, "_renderContentOn_", [html], smalltalk.HLBrowserListWidget);
  940. } else {
  941. $2 = smalltalk.send(html, "_div", []);
  942. smalltalk.send($2, "_class_", ["class_side"]);
  943. $3 = smalltalk.send($2, "_with_", [function () {return smalltalk.send(self, "_renderContentOn_", [html], smalltalk.HLBrowserListWidget);}]);
  944. }
  945. smalltalk.send(self, "_flushSelectorsCache", []);
  946. return self;
  947. },
  948. args: ["html"],
  949. 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",
  950. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model", "flushSelectorsCache"],
  951. referencedClasses: []
  952. }),
  953. smalltalk.HLMethodsListWidget);
  954. smalltalk.addMethod(
  955. "_renderItemLabel_on_",
  956. smalltalk.method({
  957. selector: "renderItemLabel:on:",
  958. category: 'rendering',
  959. fn: function (aCompiledMethod, html) {
  960. var self = this;
  961. smalltalk.send(html, "_with_", [smalltalk.send(aCompiledMethod, "_selector", [])]);
  962. return self;
  963. },
  964. args: ["aCompiledMethod", "html"],
  965. source: "renderItemLabel: aCompiledMethod on: html\x0a\x09html with: aCompiledMethod selector",
  966. messageSends: ["with:", "selector"],
  967. referencedClasses: []
  968. }),
  969. smalltalk.HLMethodsListWidget);
  970. smalltalk.addMethod(
  971. "_selectItem_",
  972. smalltalk.method({
  973. selector: "selectItem:",
  974. category: 'actions',
  975. fn: function (aCompiledMethod) {
  976. var self = this;
  977. smalltalk.send(self, "_selectItem_", [aCompiledMethod], smalltalk.HLBrowserListWidget);
  978. smalltalk.send(smalltalk.send(self, "_model", []), "_selectedMethod_", [aCompiledMethod]);
  979. return self;
  980. },
  981. args: ["aCompiledMethod"],
  982. source: "selectItem: aCompiledMethod\x0a\x09super selectItem: aCompiledMethod.\x0a \x09self model selectedMethod: aCompiledMethod",
  983. messageSends: ["selectItem:", "selectedMethod:", "model"],
  984. referencedClasses: []
  985. }),
  986. smalltalk.HLMethodsListWidget);
  987. smalltalk.addMethod(
  988. "_selectorsCache",
  989. smalltalk.method({
  990. selector: "selectorsCache",
  991. category: 'accessing',
  992. fn: function () {
  993. var self = this;
  994. return self['@selectorsCache'];
  995. },
  996. args: [],
  997. source: "selectorsCache\x0a\x09^ selectorsCache",
  998. messageSends: [],
  999. referencedClasses: []
  1000. }),
  1001. smalltalk.HLMethodsListWidget);
  1002. smalltalk.addClass('HLPackagesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1003. smalltalk.addMethod(
  1004. "_focusClassesListWidget",
  1005. smalltalk.method({
  1006. selector: "focusClassesListWidget",
  1007. category: 'actions',
  1008. fn: function () {
  1009. var self = this;
  1010. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLClassesListFocus || HLClassesListFocus, "_new", [])]);
  1011. return self;
  1012. },
  1013. args: [],
  1014. source: "focusClassesListWidget\x0a\x09self model announcer announce: HLClassesListFocus new",
  1015. messageSends: ["announce:", "new", "announcer", "model"],
  1016. referencedClasses: ["HLClassesListFocus"]
  1017. }),
  1018. smalltalk.HLPackagesListWidget);
  1019. smalltalk.addMethod(
  1020. "_initializeItems",
  1021. smalltalk.method({
  1022. selector: "initializeItems",
  1023. category: 'accessing',
  1024. fn: function () {
  1025. var self = this;
  1026. var $1;
  1027. 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", [])]);}]);
  1028. $1 = self['@items'];
  1029. return $1;
  1030. },
  1031. args: [],
  1032. source: "initializeItems\x0a\x09^ items := self model packages sort:[:a :b|\x0a\x09\x09\x09\x09\x09\x09a name < b name]",
  1033. messageSends: ["sort:", "<", "name", "packages", "model"],
  1034. referencedClasses: []
  1035. }),
  1036. smalltalk.HLPackagesListWidget);
  1037. smalltalk.addMethod(
  1038. "_items",
  1039. smalltalk.method({
  1040. selector: "items",
  1041. category: 'accessing',
  1042. fn: function () {
  1043. var self = this;
  1044. var $1;
  1045. if (($receiver = self['@items']) == nil || $receiver == undefined) {
  1046. $1 = smalltalk.send(self, "_initializeItems", []);
  1047. } else {
  1048. $1 = self['@items'];
  1049. }
  1050. return $1;
  1051. },
  1052. args: [],
  1053. source: "items\x0a\x09^ items ifNil: [self initializeItems]",
  1054. messageSends: ["ifNil:", "initializeItems"],
  1055. referencedClasses: []
  1056. }),
  1057. smalltalk.HLPackagesListWidget);
  1058. smalltalk.addMethod(
  1059. "_observeModel",
  1060. smalltalk.method({
  1061. selector: "observeModel",
  1062. category: 'actions',
  1063. fn: function () {
  1064. var self = this;
  1065. 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", [])]);}]);
  1066. return self;
  1067. },
  1068. args: [],
  1069. source: "observeModel\x0a self model announcer on: HLPackageSelected do: [ :ann |\x0a \x09self onPackageSelected: ann item ]",
  1070. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model"],
  1071. referencedClasses: ["HLPackageSelected"]
  1072. }),
  1073. smalltalk.HLPackagesListWidget);
  1074. smalltalk.addMethod(
  1075. "_onPackageSelected_",
  1076. smalltalk.method({
  1077. selector: "onPackageSelected:",
  1078. category: 'reactions',
  1079. fn: function (aPackage) {
  1080. var self = this;
  1081. smalltalk.send(self, "_focus", []);
  1082. return self;
  1083. },
  1084. args: ["aPackage"],
  1085. source: "onPackageSelected: aPackage\x0a\x09self focus",
  1086. messageSends: ["focus"],
  1087. referencedClasses: []
  1088. }),
  1089. smalltalk.HLPackagesListWidget);
  1090. smalltalk.addMethod(
  1091. "_renderButtonsOn_",
  1092. smalltalk.method({
  1093. selector: "renderButtonsOn:",
  1094. category: 'rendering',
  1095. fn: function (html) {
  1096. var self = this;
  1097. var $1, $2, $3, $5, $6, $7, $8, $4, $9, $10;
  1098. $1 = smalltalk.send(html, "_span", []);
  1099. smalltalk.send($1, "_class_", ["info"]);
  1100. $2 = smalltalk.send($1, "_with_", ["Auto commit"]);
  1101. $3 = smalltalk.send(html, "_div", []);
  1102. smalltalk.send($3, "_class_", ["btn-group switch"]);
  1103. smalltalk.send($3, "_at_put_", ["data-toggle", "buttons-radio"]);
  1104. $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;}]);
  1105. $9 = smalltalk.send(html, "_a", []);
  1106. smalltalk.send($9, "_class_", ["btn"]);
  1107. $10 = smalltalk.send($9, "_with_", ["Commit"]);
  1108. return self;
  1109. },
  1110. args: ["html"],
  1111. 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'.",
  1112. messageSends: ["class:", "span", "with:", "div", "at:put:", "streamContents:", "nextPutAll:", "button", "a"],
  1113. referencedClasses: ["String"]
  1114. }),
  1115. smalltalk.HLPackagesListWidget);
  1116. smalltalk.addMethod(
  1117. "_selectItem_",
  1118. smalltalk.method({
  1119. selector: "selectItem:",
  1120. category: 'actions',
  1121. fn: function (aPackage) {
  1122. var self = this;
  1123. smalltalk.send(self, "_selectItem_", [aPackage], smalltalk.HLBrowserListWidget);
  1124. smalltalk.send(smalltalk.send(self, "_model", []), "_selectedPackage_", [aPackage]);
  1125. return self;
  1126. },
  1127. args: ["aPackage"],
  1128. source: "selectItem: aPackage\x0a\x09super selectItem: aPackage.\x0a self model selectedPackage: aPackage",
  1129. messageSends: ["selectItem:", "selectedPackage:", "model"],
  1130. referencedClasses: []
  1131. }),
  1132. smalltalk.HLPackagesListWidget);
  1133. smalltalk.addClass('HLProtocolsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1134. smalltalk.addMethod(
  1135. "_allProtocol",
  1136. smalltalk.method({
  1137. selector: "allProtocol",
  1138. category: 'accessing',
  1139. fn: function () {
  1140. var self = this;
  1141. var $1;
  1142. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_allProtocol", []);
  1143. return $1;
  1144. },
  1145. args: [],
  1146. source: "allProtocol\x0a\x09^ self model allProtocol",
  1147. messageSends: ["allProtocol", "model"],
  1148. referencedClasses: []
  1149. }),
  1150. smalltalk.HLProtocolsListWidget);
  1151. smalltalk.addMethod(
  1152. "_observeModel",
  1153. smalltalk.method({
  1154. selector: "observeModel",
  1155. category: 'actions',
  1156. fn: function () {
  1157. var self = this;
  1158. 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", [])]);}]);
  1159. 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", [])]);}]);
  1160. 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", [])]);}]);
  1161. return self;
  1162. },
  1163. args: [],
  1164. source: "observeModel\x0a\x09self model announcer on: HLClassSelected do: [ :ann |\x0a \x09self onClassSelected: ann item ].\x0a self model announcer on: HLShowInstanceToggled do: [ :ann |\x0a \x09self onClassSelected: self model selectedClass ].\x0a self model announcer on: HLProtocolSelected do: [ :ann |\x0a \x09self onProtocolSelected: ann item ]",
  1165. messageSends: ["on:do:", "onClassSelected:", "item", "announcer", "model", "selectedClass", "onProtocolSelected:"],
  1166. referencedClasses: ["HLClassSelected", "HLShowInstanceToggled", "HLProtocolSelected"]
  1167. }),
  1168. smalltalk.HLProtocolsListWidget);
  1169. smalltalk.addMethod(
  1170. "_onClassSelected_",
  1171. smalltalk.method({
  1172. selector: "onClassSelected:",
  1173. category: 'reactions',
  1174. fn: function (aClass) {
  1175. var self = this;
  1176. var $2, $3, $1;
  1177. smalltalk.send(self, "_selectedItem_", [nil]);
  1178. if (($receiver = aClass) == nil || $receiver == undefined) {
  1179. $1 = smalltalk.send(smalltalk.Array || Array, "_with_", [smalltalk.send(self, "_allProtocol", [])]);
  1180. } else {
  1181. $2 = smalltalk.send(smalltalk.Array || Array, "_with_", [smalltalk.send(self, "_allProtocol", [])]);
  1182. smalltalk.send($2, "_addAll_", [smalltalk.send(aClass, "_protocols", [])]);
  1183. $3 = smalltalk.send($2, "_yourself", []);
  1184. $1 = $3;
  1185. }
  1186. smalltalk.send(self, "_items_", [$1]);
  1187. smalltalk.send(self, "_refresh", []);
  1188. return self;
  1189. },
  1190. args: ["aClass"],
  1191. source: "onClassSelected: 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",
  1192. messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself", "refresh"],
  1193. referencedClasses: ["Array"]
  1194. }),
  1195. smalltalk.HLProtocolsListWidget);
  1196. smalltalk.addMethod(
  1197. "_onProtocolSelected_",
  1198. smalltalk.method({
  1199. selector: "onProtocolSelected:",
  1200. category: 'reactions',
  1201. fn: function (aString) {
  1202. var self = this;
  1203. smalltalk.send(self, "_focus", []);
  1204. return self;
  1205. },
  1206. args: ["aString"],
  1207. source: "onProtocolSelected: aString\x0a\x09self focus",
  1208. messageSends: ["focus"],
  1209. referencedClasses: []
  1210. }),
  1211. smalltalk.HLProtocolsListWidget);
  1212. smalltalk.addMethod(
  1213. "_renderContentOn_",
  1214. smalltalk.method({
  1215. selector: "renderContentOn:",
  1216. category: 'rendering',
  1217. fn: function (html) {
  1218. var self = this;
  1219. var $1, $2, $3;
  1220. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance", []);
  1221. if (smalltalk.assert($1)) {
  1222. smalltalk.send(self, "_renderContentOn_", [html], smalltalk.HLBrowserListWidget);
  1223. } else {
  1224. $2 = smalltalk.send(html, "_div", []);
  1225. smalltalk.send($2, "_class_", ["class_side"]);
  1226. $3 = smalltalk.send($2, "_with_", [function () {return smalltalk.send(self, "_renderContentOn_", [html], smalltalk.HLBrowserListWidget);}]);
  1227. }
  1228. return self;
  1229. },
  1230. args: ["html"],
  1231. 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 ]",
  1232. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"],
  1233. referencedClasses: []
  1234. }),
  1235. smalltalk.HLProtocolsListWidget);
  1236. smalltalk.addMethod(
  1237. "_selectItem_",
  1238. smalltalk.method({
  1239. selector: "selectItem:",
  1240. category: 'actions',
  1241. fn: function (aString) {
  1242. var self = this;
  1243. smalltalk.send(self, "_selectItem_", [aString], smalltalk.HLBrowserListWidget);
  1244. smalltalk.send(smalltalk.send(self, "_model", []), "_selectedProtocol_", [aString]);
  1245. return self;
  1246. },
  1247. args: ["aString"],
  1248. source: "selectItem: aString\x0a\x09super selectItem: aString.\x0a self model selectedProtocol: aString",
  1249. messageSends: ["selectItem:", "selectedProtocol:", "model"],
  1250. referencedClasses: []
  1251. }),
  1252. smalltalk.HLProtocolsListWidget);
  1253. smalltalk.addMethod(
  1254. "_selectedItem",
  1255. smalltalk.method({
  1256. selector: "selectedItem",
  1257. category: 'accessing',
  1258. fn: function () {
  1259. var self = this;
  1260. var $1;
  1261. $1 = smalltalk.send(self, "_selectedItem", [], smalltalk.HLBrowserListWidget);
  1262. return $1;
  1263. },
  1264. args: [],
  1265. source: "selectedItem\x0a\x09^ super selectedItem\x22 ifNil: [ self allProtocol ]\x22",
  1266. messageSends: ["selectedItem"],
  1267. referencedClasses: []
  1268. }),
  1269. smalltalk.HLProtocolsListWidget);
  1270. smalltalk.addClass('HLBrowserModel', smalltalk.Object, ['announcer', 'environment', 'selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'showInstance', 'showComment'], 'Helios-Browser');
  1271. smalltalk.addMethod(
  1272. "_allProtocol",
  1273. smalltalk.method({
  1274. selector: "allProtocol",
  1275. category: 'accessing',
  1276. fn: function () {
  1277. var self = this;
  1278. return "-- All --";
  1279. },
  1280. args: [],
  1281. source: "allProtocol\x0a\x09^ '-- All --'",
  1282. messageSends: [],
  1283. referencedClasses: []
  1284. }),
  1285. smalltalk.HLBrowserModel);
  1286. smalltalk.addMethod(
  1287. "_announcer",
  1288. smalltalk.method({
  1289. selector: "announcer",
  1290. category: 'accessing',
  1291. fn: function () {
  1292. var self = this;
  1293. var $1;
  1294. if (($receiver = self['@announcer']) == nil || $receiver == undefined) {
  1295. self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
  1296. $1 = self['@announcer'];
  1297. } else {
  1298. $1 = self['@announcer'];
  1299. }
  1300. return $1;
  1301. },
  1302. args: [],
  1303. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  1304. messageSends: ["ifNil:", "new"],
  1305. referencedClasses: ["Announcer"]
  1306. }),
  1307. smalltalk.HLBrowserModel);
  1308. smalltalk.addMethod(
  1309. "_environment",
  1310. smalltalk.method({
  1311. selector: "environment",
  1312. category: 'accessing',
  1313. fn: function () {
  1314. var self = this;
  1315. var $1;
  1316. if (($receiver = self['@environment']) == nil || $receiver == undefined) {
  1317. $1 = smalltalk.send(smalltalk.send(smalltalk.HLManager || HLManager, "_current", []), "_environment", []);
  1318. } else {
  1319. $1 = self['@environment'];
  1320. }
  1321. return $1;
  1322. },
  1323. args: [],
  1324. source: "environment\x0a\x09^ environment ifNil: [ HLManager current environment ]",
  1325. messageSends: ["ifNil:", "environment", "current"],
  1326. referencedClasses: ["HLManager"]
  1327. }),
  1328. smalltalk.HLBrowserModel);
  1329. smalltalk.addMethod(
  1330. "_environment_",
  1331. smalltalk.method({
  1332. selector: "environment:",
  1333. category: 'accessing',
  1334. fn: function (anEnvironment) {
  1335. var self = this;
  1336. self['@environment'] = anEnvironment;
  1337. return self;
  1338. },
  1339. args: ["anEnvironment"],
  1340. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  1341. messageSends: [],
  1342. referencedClasses: []
  1343. }),
  1344. smalltalk.HLBrowserModel);
  1345. smalltalk.addMethod(
  1346. "_packages",
  1347. smalltalk.method({
  1348. selector: "packages",
  1349. category: 'accessing',
  1350. fn: function () {
  1351. var self = this;
  1352. var $1;
  1353. $1 = smalltalk.send(smalltalk.send(self, "_environment", []), "_packages", []);
  1354. return $1;
  1355. },
  1356. args: [],
  1357. source: "packages\x0a\x09^ self environment packages",
  1358. messageSends: ["packages", "environment"],
  1359. referencedClasses: []
  1360. }),
  1361. smalltalk.HLBrowserModel);
  1362. smalltalk.addMethod(
  1363. "_selectedClass",
  1364. smalltalk.method({
  1365. selector: "selectedClass",
  1366. category: 'accessing',
  1367. fn: function () {
  1368. var self = this;
  1369. return self['@selectedClass'];
  1370. },
  1371. args: [],
  1372. source: "selectedClass\x0a\x09^ selectedClass",
  1373. messageSends: [],
  1374. referencedClasses: []
  1375. }),
  1376. smalltalk.HLBrowserModel);
  1377. smalltalk.addMethod(
  1378. "_selectedClass_",
  1379. smalltalk.method({
  1380. selector: "selectedClass:",
  1381. category: 'accessing',
  1382. fn: function (aClass) {
  1383. var self = this;
  1384. var $1, $2, $3;
  1385. $1 = smalltalk.send(self['@selectedClass'], "__eq", [aClass]);
  1386. if (!smalltalk.assert($1)) {
  1387. if (($receiver = aClass) == nil || $receiver == undefined) {
  1388. self['@selectedClass'] = nil;
  1389. self['@selectedClass'];
  1390. } else {
  1391. $2 = smalltalk.send(self, "_showInstance", []);
  1392. if (smalltalk.assert($2)) {
  1393. self['@selectedClass'] = smalltalk.send(aClass, "_theNonMetaClass", []);
  1394. self['@selectedClass'];
  1395. } else {
  1396. self['@selectedClass'] = smalltalk.send(aClass, "_theMetaClass", []);
  1397. self['@selectedClass'];
  1398. }
  1399. }
  1400. smalltalk.send(self, "_selectedMethod_", [nil]);
  1401. $3 = smalltalk.send(self, "_selectedProtocol_", [nil]);
  1402. }
  1403. smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLClassSelected || HLClassSelected, "_on_", [smalltalk.send(self, "_selectedClass", [])])]);
  1404. return self;
  1405. },
  1406. args: ["aClass"],
  1407. 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)",
  1408. messageSends: ["ifFalse:", "ifNil:ifNotNil:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "showInstance", "selectedMethod:", "selectedProtocol:", "=", "announce:", "on:", "selectedClass", "announcer"],
  1409. referencedClasses: ["HLClassSelected"]
  1410. }),
  1411. smalltalk.HLBrowserModel);
  1412. smalltalk.addMethod(
  1413. "_selectedMethod",
  1414. smalltalk.method({
  1415. selector: "selectedMethod",
  1416. category: 'accessing',
  1417. fn: function () {
  1418. var self = this;
  1419. return self['@selectedMethod'];
  1420. },
  1421. args: [],
  1422. source: "selectedMethod\x0a\x09^ selectedMethod",
  1423. messageSends: [],
  1424. referencedClasses: []
  1425. }),
  1426. smalltalk.HLBrowserModel);
  1427. smalltalk.addMethod(
  1428. "_selectedMethod_",
  1429. smalltalk.method({
  1430. selector: "selectedMethod:",
  1431. category: 'accessing',
  1432. fn: function (aCompiledMethod) {
  1433. var self = this;
  1434. var $1;
  1435. $1 = smalltalk.send(self['@selectedMethod'], "__eq", [aCompiledMethod]);
  1436. if (!smalltalk.assert($1)) {
  1437. self['@selectedMethod'] = aCompiledMethod;
  1438. self['@selectedMethod'];
  1439. }
  1440. smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLMethodSelected || HLMethodSelected, "_on_", [aCompiledMethod])]);
  1441. return self;
  1442. },
  1443. args: ["aCompiledMethod"],
  1444. source: "selectedMethod: aCompiledMethod\x0a\x09selectedMethod = aCompiledMethod ifFalse: [\x0a\x09\x09selectedMethod := aCompiledMethod ].\x0a \x0a self announcer announce: (HLMethodSelected on: aCompiledMethod)",
  1445. messageSends: ["ifFalse:", "=", "announce:", "on:", "announcer"],
  1446. referencedClasses: ["HLMethodSelected"]
  1447. }),
  1448. smalltalk.HLBrowserModel);
  1449. smalltalk.addMethod(
  1450. "_selectedPackage",
  1451. smalltalk.method({
  1452. selector: "selectedPackage",
  1453. category: 'accessing',
  1454. fn: function () {
  1455. var self = this;
  1456. return self['@selectedPackage'];
  1457. },
  1458. args: [],
  1459. source: "selectedPackage\x0a\x09^ selectedPackage",
  1460. messageSends: [],
  1461. referencedClasses: []
  1462. }),
  1463. smalltalk.HLBrowserModel);
  1464. smalltalk.addMethod(
  1465. "_selectedPackage_",
  1466. smalltalk.method({
  1467. selector: "selectedPackage:",
  1468. category: 'accessing',
  1469. fn: function (aPackage) {
  1470. var self = this;
  1471. var $1;
  1472. $1 = smalltalk.send(self['@selectedPackage'], "__eq", [aPackage]);
  1473. if (!smalltalk.assert($1)) {
  1474. self['@selectedPackage'] = aPackage;
  1475. self['@selectedPackage'];
  1476. smalltalk.send(self, "_selectedClass_", [nil]);
  1477. }
  1478. smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLPackageSelected || HLPackageSelected, "_on_", [aPackage])]);
  1479. return self;
  1480. },
  1481. args: ["aPackage"],
  1482. source: "selectedPackage: aPackage\x0a\x09selectedPackage = aPackage ifFalse: [\x0a\x09\x09selectedPackage := aPackage.\x0a \x09self selectedClass: nil ].\x0a \x0a self announcer announce: (HLPackageSelected on: aPackage)",
  1483. messageSends: ["ifFalse:", "selectedClass:", "=", "announce:", "on:", "announcer"],
  1484. referencedClasses: ["HLPackageSelected"]
  1485. }),
  1486. smalltalk.HLBrowserModel);
  1487. smalltalk.addMethod(
  1488. "_selectedProtocol",
  1489. smalltalk.method({
  1490. selector: "selectedProtocol",
  1491. category: 'accessing',
  1492. fn: function () {
  1493. var self = this;
  1494. return self['@selectedProtocol'];
  1495. },
  1496. args: [],
  1497. source: "selectedProtocol\x0a\x09^ selectedProtocol",
  1498. messageSends: [],
  1499. referencedClasses: []
  1500. }),
  1501. smalltalk.HLBrowserModel);
  1502. smalltalk.addMethod(
  1503. "_selectedProtocol_",
  1504. smalltalk.method({
  1505. selector: "selectedProtocol:",
  1506. category: 'accessing',
  1507. fn: function (aString) {
  1508. var self = this;
  1509. var $1;
  1510. $1 = smalltalk.send(self['@selectedProtocol'], "__eq", [aString]);
  1511. if (!smalltalk.assert($1)) {
  1512. self['@selectedProtocol'] = aString;
  1513. self['@selectedProtocol'];
  1514. smalltalk.send(self, "_selectedMethod_", [nil]);
  1515. }
  1516. smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLProtocolSelected || HLProtocolSelected, "_on_", [aString])]);
  1517. return self;
  1518. },
  1519. args: ["aString"],
  1520. source: "selectedProtocol: aString\x0a\x09selectedProtocol = aString ifFalse: [\x0a \x09selectedProtocol := aString.\x0a \x09self selectedMethod: nil ].\x0a \x0a self announcer announce: (HLProtocolSelected on: aString)",
  1521. messageSends: ["ifFalse:", "selectedMethod:", "=", "announce:", "on:", "announcer"],
  1522. referencedClasses: ["HLProtocolSelected"]
  1523. }),
  1524. smalltalk.HLBrowserModel);
  1525. smalltalk.addMethod(
  1526. "_showComment",
  1527. smalltalk.method({
  1528. selector: "showComment",
  1529. category: 'accessing',
  1530. fn: function () {
  1531. var self = this;
  1532. var $1;
  1533. if (($receiver = self['@showComment']) == nil || $receiver == undefined) {
  1534. $1 = false;
  1535. } else {
  1536. $1 = self['@showComment'];
  1537. }
  1538. return $1;
  1539. },
  1540. args: [],
  1541. source: "showComment\x0a\x09^ showComment ifNil: [ false ]",
  1542. messageSends: ["ifNil:"],
  1543. referencedClasses: []
  1544. }),
  1545. smalltalk.HLBrowserModel);
  1546. smalltalk.addMethod(
  1547. "_showComment_",
  1548. smalltalk.method({
  1549. selector: "showComment:",
  1550. category: 'accessing',
  1551. fn: function (aBoolean) {
  1552. var self = this;
  1553. self['@showComment'] = aBoolean;
  1554. smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLShowCommentToggled || HLShowCommentToggled, "_new", [])]);
  1555. return self;
  1556. },
  1557. args: ["aBoolean"],
  1558. source: "showComment: aBoolean\x0a\x09showComment := aBoolean.\x0a \x0a self announcer announce: HLShowCommentToggled new",
  1559. messageSends: ["announce:", "new", "announcer"],
  1560. referencedClasses: ["HLShowCommentToggled"]
  1561. }),
  1562. smalltalk.HLBrowserModel);
  1563. smalltalk.addMethod(
  1564. "_showInstance",
  1565. smalltalk.method({
  1566. selector: "showInstance",
  1567. category: 'accessing',
  1568. fn: function () {
  1569. var self = this;
  1570. var $1;
  1571. if (($receiver = self['@showInstance']) == nil ||
  1572. $receiver == undefined) {
  1573. $1 = true;
  1574. } else {
  1575. $1 = self['@showInstance'];
  1576. }
  1577. return $1;
  1578. },
  1579. args: [],
  1580. source: "showInstance\x0a\x09^ showInstance ifNil: [ true ]",
  1581. messageSends: ["ifNil:"],
  1582. referencedClasses: []
  1583. }),
  1584. smalltalk.HLBrowserModel);
  1585. smalltalk.addMethod(
  1586. "_showInstance_",
  1587. smalltalk.method({
  1588. selector: "showInstance:",
  1589. category: 'accessing',
  1590. fn: function (aBoolean) {
  1591. var self = this;
  1592. var $1, $2;
  1593. self['@showInstance'] = aBoolean;
  1594. $1 = smalltalk.send(self, "_selectedClass", []);
  1595. if (($receiver = $1) == nil || $receiver == undefined) {
  1596. } else {
  1597. if (smalltalk.assert(aBoolean)) {
  1598. $2 = smalltalk.send(smalltalk.send(self, "_selectedClass", []), "_theNonMetaClass", []);
  1599. } else {
  1600. $2 = smalltalk.send(smalltalk.send(self, "_selectedClass", []), "_theMetaClass", []);
  1601. }
  1602. smalltalk.send(self, "_selectedClass_", [$2]);
  1603. }
  1604. smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, "_new", [])]);
  1605. return self;
  1606. },
  1607. args: ["aBoolean"],
  1608. 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",
  1609. messageSends: ["ifNotNil:", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "selectedClass", "theMetaClass", "announce:", "new", "announcer"],
  1610. referencedClasses: ["HLShowInstanceToggled"]
  1611. }),
  1612. smalltalk.HLBrowserModel);
  1613. smalltalk.addMethod(
  1614. "_on_",
  1615. smalltalk.method({
  1616. selector: "on:",
  1617. category: 'actions',
  1618. fn: function (anEnvironment) {
  1619. var self = this;
  1620. var $2, $3, $1;
  1621. $2 = smalltalk.send(self, "_new", []);
  1622. smalltalk.send($2, "_environment_", [anEnvironment]);
  1623. $3 = smalltalk.send($2, "_yourself", []);
  1624. $1 = $3;
  1625. return $1;
  1626. },
  1627. args: ["anEnvironment"],
  1628. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  1629. messageSends: ["environment:", "new", "yourself"],
  1630. referencedClasses: []
  1631. }),
  1632. smalltalk.HLBrowserModel.klass);
  1633. smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'codeWidget'], 'Helios-Browser');
  1634. smalltalk.addMethod(
  1635. "_codeWidget",
  1636. smalltalk.method({
  1637. selector: "codeWidget",
  1638. category: 'accessing',
  1639. fn: function () {
  1640. var self = this;
  1641. var $1;
  1642. if (($receiver = self['@codeWidget']) == nil || $receiver == undefined) {
  1643. self['@codeWidget'] = smalltalk.send(smalltalk.HLCodeWidget || HLCodeWidget, "_new", []);
  1644. $1 = self['@codeWidget'];
  1645. } else {
  1646. $1 = self['@codeWidget'];
  1647. }
  1648. return $1;
  1649. },
  1650. args: [],
  1651. source: "codeWidget\x0a\x09^ codeWidget ifNil: [ codeWidget := HLCodeWidget new ]",
  1652. messageSends: ["ifNil:", "new"],
  1653. referencedClasses: ["HLCodeWidget"]
  1654. }),
  1655. smalltalk.HLBrowserSourceWidget);
  1656. smalltalk.addMethod(
  1657. "_contents",
  1658. smalltalk.method({
  1659. selector: "contents",
  1660. category: 'accessing',
  1661. fn: function () {
  1662. var self = this;
  1663. var $1;
  1664. $1 = smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_contents", []);
  1665. return $1;
  1666. },
  1667. args: [],
  1668. source: "contents\x0a\x09^ self sourceArea contents",
  1669. messageSends: ["contents", "sourceArea"],
  1670. referencedClasses: []
  1671. }),
  1672. smalltalk.HLBrowserSourceWidget);
  1673. smalltalk.addMethod(
  1674. "_contents_",
  1675. smalltalk.method({
  1676. selector: "contents:",
  1677. category: 'accessing',
  1678. fn: function (aString) {
  1679. var self = this;
  1680. smalltalk.send(smalltalk.send(self, "_codeWidget", []), "_contents_", [aString]);
  1681. return self;
  1682. },
  1683. args: ["aString"],
  1684. source: "contents: aString\x0a\x09self codeWidget contents: aString",
  1685. messageSends: ["contents:", "codeWidget"],
  1686. referencedClasses: []
  1687. }),
  1688. smalltalk.HLBrowserSourceWidget);
  1689. smalltalk.addMethod(
  1690. "_model",
  1691. smalltalk.method({
  1692. selector: "model",
  1693. category: 'accessing',
  1694. fn: function () {
  1695. var self = this;
  1696. return self['@model'];
  1697. },
  1698. args: [],
  1699. source: "model\x0a\x09^ model",
  1700. messageSends: [],
  1701. referencedClasses: []
  1702. }),
  1703. smalltalk.HLBrowserSourceWidget);
  1704. smalltalk.addMethod(
  1705. "_model_",
  1706. smalltalk.method({
  1707. selector: "model:",
  1708. category: 'accessing',
  1709. fn: function (aBrowserModel) {
  1710. var self = this;
  1711. self['@model'] = aBrowserModel;
  1712. smalltalk.send(self, "_observeModel", []);
  1713. return self;
  1714. },
  1715. args: ["aBrowserModel"],
  1716. source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a \x0a self observeModel",
  1717. messageSends: ["observeModel"],
  1718. referencedClasses: []
  1719. }),
  1720. smalltalk.HLBrowserSourceWidget);
  1721. smalltalk.addMethod(
  1722. "_observeModel",
  1723. smalltalk.method({
  1724. selector: "observeModel",
  1725. category: 'actions',
  1726. fn: function () {
  1727. var self = this;
  1728. 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", [])]);}]);
  1729. 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", [])]);}]);
  1730. 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", [])]);}]);
  1731. return self;
  1732. },
  1733. args: [],
  1734. source: "observeModel\x0a\x09self model announcer on: HLMethodSelected do: [ :ann |\x0a \x09self onMethodSelected: ann item ].\x0a self model announcer on: HLClassSelected do: [ :ann |\x0a \x09self onClassSelected: ann item ].\x0a self model announcer on: HLProtocolSelected do: [ :ann |\x0a \x09self onProtocolSelected: ann item ]",
  1735. messageSends: ["on:do:", "onMethodSelected:", "item", "announcer", "model", "onClassSelected:", "onProtocolSelected:"],
  1736. referencedClasses: ["HLMethodSelected", "HLClassSelected", "HLProtocolSelected"]
  1737. }),
  1738. smalltalk.HLBrowserSourceWidget);
  1739. smalltalk.addMethod(
  1740. "_onClassSelected_",
  1741. smalltalk.method({
  1742. selector: "onClassSelected:",
  1743. category: 'reactions',
  1744. fn: function (aClass) {
  1745. var self = this;
  1746. var $1;
  1747. if (($receiver = aClass) == nil || $receiver == undefined) {
  1748. $1 = smalltalk.send(self, "_contents_", [""]);
  1749. return $1;
  1750. } else {
  1751. }
  1752. smalltalk.send(self, "_contents_", [smalltalk.send(aClass, "_definition", [])]);
  1753. return self;
  1754. },
  1755. args: ["aClass"],
  1756. source: "onClassSelected: aClass\x0a\x09aClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: aClass definition",
  1757. messageSends: ["ifNil:", "contents:", "definition"],
  1758. referencedClasses: []
  1759. }),
  1760. smalltalk.HLBrowserSourceWidget);
  1761. smalltalk.addMethod(
  1762. "_onMethodSelected_",
  1763. smalltalk.method({
  1764. selector: "onMethodSelected:",
  1765. category: 'reactions',
  1766. fn: function (aCompiledMethod) {
  1767. var self = this;
  1768. var $1;
  1769. if (($receiver = aCompiledMethod) == nil || $receiver == undefined) {
  1770. $1 = smalltalk.send(self, "_contents_", [""]);
  1771. return $1;
  1772. } else {
  1773. }
  1774. smalltalk.send(self, "_contents_", [smalltalk.send(aCompiledMethod, "_source", [])]);
  1775. return self;
  1776. },
  1777. args: ["aCompiledMethod"],
  1778. source: "onMethodSelected: aCompiledMethod\x0a\x09aCompiledMethod ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: aCompiledMethod source",
  1779. messageSends: ["ifNil:", "contents:", "source"],
  1780. referencedClasses: []
  1781. }),
  1782. smalltalk.HLBrowserSourceWidget);
  1783. smalltalk.addMethod(
  1784. "_onProtocolSelected_",
  1785. smalltalk.method({
  1786. selector: "onProtocolSelected:",
  1787. category: 'reactions',
  1788. fn: function (aString) {
  1789. var self = this;
  1790. var $1, $2;
  1791. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []);
  1792. if (($receiver = $1) == nil || $receiver == undefined) {
  1793. $2 = smalltalk.send(self, "_contents_", [""]);
  1794. return $2;
  1795. } else {
  1796. }
  1797. smalltalk.send(self, "_contents_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []), "_definition", [])]);
  1798. return self;
  1799. },
  1800. args: ["aString"],
  1801. source: "onProtocolSelected: aString\x0a\x09self model selectedClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: self model selectedClass definition",
  1802. messageSends: ["ifNil:", "contents:", "selectedClass", "model", "definition"],
  1803. referencedClasses: []
  1804. }),
  1805. smalltalk.HLBrowserSourceWidget);
  1806. smalltalk.addMethod(
  1807. "_renderContentOn_",
  1808. smalltalk.method({
  1809. selector: "renderContentOn:",
  1810. category: 'rendering',
  1811. fn: function (html) {
  1812. var self = this;
  1813. smalltalk.send(smalltalk.send(self, "_codeWidget", []), "_renderOn_", [html]);
  1814. return self;
  1815. },
  1816. args: ["html"],
  1817. source: "renderContentOn: html\x0a\x09self codeWidget renderOn: html",
  1818. messageSends: ["renderOn:", "codeWidget"],
  1819. referencedClasses: []
  1820. }),
  1821. smalltalk.HLBrowserSourceWidget);
  1822. smalltalk.addMethod(
  1823. "_on_",
  1824. smalltalk.method({
  1825. selector: "on:",
  1826. category: 'instance creation',
  1827. fn: function (aBrowserModel) {
  1828. var self = this;
  1829. var $2, $3, $1;
  1830. $2 = smalltalk.send(self, "_new", []);
  1831. smalltalk.send($2, "_model_", [aBrowserModel]);
  1832. $3 = smalltalk.send($2, "_yourself", []);
  1833. $1 = $3;
  1834. return $1;
  1835. },
  1836. args: ["aBrowserModel"],
  1837. source: "on: aBrowserModel\x0a\x09^ self new\x0a \x09model: aBrowserModel;\x0a yourself",
  1838. messageSends: ["model:", "new", "yourself"],
  1839. referencedClasses: []
  1840. }),
  1841. smalltalk.HLBrowserSourceWidget.klass);