Helios-Browser.js 70 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911
  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. "_initializeItems",
  953. smalltalk.method({
  954. selector: "initializeItems",
  955. category: 'accessing',
  956. fn: function (){
  957. var self=this;
  958. var $1;
  959. self["@items"]=smalltalk.send(smalltalk.send(smalltalk.send(self,"_model",[]),"_packages",[]),"_sort_",[(function(a,b){
  960. return smalltalk.send(smalltalk.send(a,"_name",[]),"__lt",[smalltalk.send(b,"_name",[])]);
  961. })]);
  962. $1=self["@items"];
  963. return $1;
  964. },
  965. args: [],
  966. source: "initializeItems\x0a\x09^ items := self model packages sort:[:a :b|\x0a\x09\x09\x09\x09\x09\x09a name < b name]",
  967. messageSends: ["sort:", "<", "name", "packages", "model"],
  968. referencedClasses: []
  969. }),
  970. smalltalk.HLPackagesListWidget);
  971. smalltalk.addMethod(
  972. "_items",
  973. smalltalk.method({
  974. selector: "items",
  975. category: 'accessing',
  976. fn: function (){
  977. var self=this;
  978. var $1;
  979. if(($receiver = self["@items"]) == nil || $receiver == undefined){
  980. $1=smalltalk.send(self,"_initializeItems",[]);
  981. } else {
  982. $1=self["@items"];
  983. };
  984. return $1;
  985. },
  986. args: [],
  987. source: "items\x0a\x09^ items ifNil: [self initializeItems]",
  988. messageSends: ["ifNil:", "initializeItems"],
  989. referencedClasses: []
  990. }),
  991. smalltalk.HLPackagesListWidget);
  992. smalltalk.addMethod(
  993. "_renderButtonsOn_",
  994. smalltalk.method({
  995. selector: "renderButtonsOn:",
  996. category: 'rendering',
  997. fn: function (html) {
  998. var self = this;
  999. var $1, $2, $3, $5, $6, $7, $8, $4, $9, $10;
  1000. $1 = smalltalk.send(html, "_span", []);
  1001. smalltalk.send($1, "_class_", ["info"]);
  1002. $2 = smalltalk.send($1, "_with_", ["Auto commit"]);
  1003. $3 = smalltalk.send(html, "_div", []);
  1004. smalltalk.send($3, "_class_", ["btn-group switch"]);
  1005. smalltalk.send($3, "_at_put_", ["data-toggle", "buttons-radio"]);
  1006. $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;}]);
  1007. $9 = smalltalk.send(html, "_a", []);
  1008. smalltalk.send($9, "_class_", ["btn"]);
  1009. $10 = smalltalk.send($9, "_with_", ["Commit"]);
  1010. return self;
  1011. },
  1012. args: ["html"],
  1013. 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'.",
  1014. messageSends: ["class:", "span", "with:", "div", "at:put:", "streamContents:", "nextPutAll:", "button", "a"],
  1015. referencedClasses: ["String"]
  1016. }),
  1017. smalltalk.HLPackagesListWidget);
  1018. smalltalk.addMethod(
  1019. "_selectItem_",
  1020. smalltalk.method({
  1021. selector: "selectItem:",
  1022. category: 'actions',
  1023. fn: function (aPackage){
  1024. var self=this;
  1025. smalltalk.send(self,"_selectItem_",[aPackage],smalltalk.HLBrowserListWidget);
  1026. smalltalk.send(smalltalk.send(self,"_model",[]),"_selectedPackage_",[aPackage]);
  1027. return self},
  1028. args: ["aPackage"],
  1029. source: "selectItem: aPackage\x0a\x09super selectItem: aPackage.\x0a self model selectedPackage: aPackage",
  1030. messageSends: ["selectItem:", "selectedPackage:", "model"],
  1031. referencedClasses: []
  1032. }),
  1033. smalltalk.HLPackagesListWidget);
  1034. smalltalk.addMethod(
  1035. "_subscribeTo_",
  1036. smalltalk.method({
  1037. selector: "subscribeTo:",
  1038. category: 'announcements',
  1039. fn: function (anAnnouncer) {
  1040. var self = this;
  1041. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLPackageSelected || HLPackageSelected, function (ann) {return smalltalk.send(self, "_focus", []);}]);
  1042. return self;
  1043. },
  1044. args: ["anAnnouncer"],
  1045. source: "subscribeTo: anAnnouncer\x0a anAnnouncer on: HLPackageSelected do: [ :ann |\x0a \x09self focus ]",
  1046. messageSends: ["on:do:", "focus"],
  1047. referencedClasses: ["HLPackageSelected"]
  1048. }),
  1049. smalltalk.HLPackagesListWidget);
  1050. smalltalk.addClass('HLProtocolsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1051. smalltalk.addMethod(
  1052. "_allProtocol",
  1053. smalltalk.method({
  1054. selector: "allProtocol",
  1055. category: 'accessing',
  1056. fn: function () {
  1057. var self = this;
  1058. var $1;
  1059. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_allProtocol", []);
  1060. return $1;
  1061. },
  1062. args: [],
  1063. source: "allProtocol\x0a\x09^ self model allProtocol",
  1064. messageSends: ["allProtocol", "model"],
  1065. referencedClasses: []
  1066. }),
  1067. smalltalk.HLProtocolsListWidget);
  1068. smalltalk.addMethod(
  1069. "_classSelected_",
  1070. smalltalk.method({
  1071. selector: "classSelected:",
  1072. category: 'actions',
  1073. fn: function (aClass) {
  1074. var self = this;
  1075. var $2, $3, $1;
  1076. smalltalk.send(self, "_selectedItem_", [nil]);
  1077. if (($receiver = aClass) == nil || $receiver == undefined) {
  1078. $1 = smalltalk.send(smalltalk.Array || Array, "_with_", [smalltalk.send(self, "_allProtocol", [])]);
  1079. } else {
  1080. $2 = smalltalk.send(smalltalk.Array || Array, "_with_", [smalltalk.send(self, "_allProtocol", [])]);
  1081. smalltalk.send($2, "_addAll_", [smalltalk.send(aClass, "_protocols", [])]);
  1082. $3 = smalltalk.send($2, "_yourself", []);
  1083. $1 = $3;
  1084. }
  1085. smalltalk.send(self, "_items_", [$1]);
  1086. smalltalk.send(self, "_refresh", []);
  1087. return self;
  1088. },
  1089. args: ["aClass"],
  1090. 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",
  1091. messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself", "refresh"],
  1092. referencedClasses: ["Array"]
  1093. }),
  1094. smalltalk.HLProtocolsListWidget);
  1095. smalltalk.addMethod(
  1096. "_renderContentOn_",
  1097. smalltalk.method({
  1098. selector: "renderContentOn:",
  1099. category: 'rendering',
  1100. fn: function (html) {
  1101. var self = this;
  1102. var $1, $2, $3;
  1103. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance", []);
  1104. if (smalltalk.assert($1)) {
  1105. smalltalk.send(self, "_renderContentOn_", [html], smalltalk.HLBrowserListWidget);
  1106. } else {
  1107. $2 = smalltalk.send(html, "_div", []);
  1108. smalltalk.send($2, "_class_", ["class_side"]);
  1109. $3 = smalltalk.send($2, "_with_", [function () {return smalltalk.send(self, "_renderContentOn_", [html], smalltalk.HLBrowserListWidget);}]);
  1110. }
  1111. return self;
  1112. },
  1113. args: ["html"],
  1114. 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 ]",
  1115. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"],
  1116. referencedClasses: []
  1117. }),
  1118. smalltalk.HLProtocolsListWidget);
  1119. smalltalk.addMethod(
  1120. "_selectItem_",
  1121. smalltalk.method({
  1122. selector: "selectItem:",
  1123. category: 'actions',
  1124. fn: function (aString){
  1125. var self=this;
  1126. smalltalk.send(self,"_selectItem_",[aString],smalltalk.HLBrowserListWidget);
  1127. smalltalk.send(smalltalk.send(self,"_model",[]),"_selectedProtocol_",[aString]);
  1128. return self},
  1129. args: ["aString"],
  1130. source: "selectItem: aString\x0a\x09super selectItem: aString.\x0a self model selectedProtocol: aString",
  1131. messageSends: ["selectItem:", "selectedProtocol:", "model"],
  1132. referencedClasses: []
  1133. }),
  1134. smalltalk.HLProtocolsListWidget);
  1135. smalltalk.addMethod(
  1136. "_selectedItem",
  1137. smalltalk.method({
  1138. selector: "selectedItem",
  1139. category: 'accessing',
  1140. fn: function (){
  1141. var self=this;
  1142. var $1;
  1143. $1=smalltalk.send(self,"_selectedItem",[],smalltalk.HLBrowserListWidget);
  1144. return $1;
  1145. },
  1146. args: [],
  1147. source: "selectedItem\x0a\x09^ super selectedItem\x22 ifNil: [ self allProtocol ]\x22",
  1148. messageSends: ["selectedItem"],
  1149. referencedClasses: []
  1150. }),
  1151. smalltalk.HLProtocolsListWidget);
  1152. smalltalk.addMethod(
  1153. "_subscribeTo_",
  1154. smalltalk.method({
  1155. selector: "subscribeTo:",
  1156. category: 'announcements',
  1157. fn: function (anAnnouncer) {
  1158. var self = this;
  1159. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_classSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  1160. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, function (ann) {return smalltalk.send(self, "_classSelected_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", [])]);}]);
  1161. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_focus", []);}]);
  1162. return self;
  1163. },
  1164. args: ["anAnnouncer"],
  1165. 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 ]",
  1166. messageSends: ["on:do:", "classSelected:", "item", "selectedClass", "model", "focus"],
  1167. referencedClasses: ["HLClassSelected", "HLShowInstanceToggled", "HLProtocolSelected"]
  1168. }),
  1169. smalltalk.HLProtocolsListWidget);
  1170. smalltalk.addClass('HLBrowserModel', smalltalk.Object, ['announcer', 'environment', 'selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'showInstance', 'showComment'], 'Helios-Browser');
  1171. smalltalk.addMethod(
  1172. "_allProtocol",
  1173. smalltalk.method({
  1174. selector: "allProtocol",
  1175. category: 'accessing',
  1176. fn: function () {
  1177. var self = this;
  1178. return "-- All --";
  1179. },
  1180. args: [],
  1181. source: "allProtocol\x0a\x09^ '-- All --'",
  1182. messageSends: [],
  1183. referencedClasses: []
  1184. }),
  1185. smalltalk.HLBrowserModel);
  1186. smalltalk.addMethod(
  1187. "_announcer",
  1188. smalltalk.method({
  1189. selector: "announcer",
  1190. category: 'announcements',
  1191. fn: function () {
  1192. var self = this;
  1193. var $1;
  1194. if (($receiver = self['@announcer']) == nil || $receiver == undefined) {
  1195. self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
  1196. $1 = self['@announcer'];
  1197. } else {
  1198. $1 = self['@announcer'];
  1199. }
  1200. return $1;
  1201. },
  1202. args: [],
  1203. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  1204. messageSends: ["ifNil:", "new"],
  1205. referencedClasses: ["Announcer"]
  1206. }),
  1207. smalltalk.HLBrowserModel);
  1208. smalltalk.addMethod(
  1209. "_beLocal",
  1210. smalltalk.method({
  1211. selector: "beLocal",
  1212. category: 'actions',
  1213. fn: function (){
  1214. var self=this;
  1215. smalltalk.send(self,"_initializeEnvironment",[]);
  1216. return self},
  1217. args: [],
  1218. source: "beLocal\x0a\x0a\x09self initializeEnvironment\x0a",
  1219. messageSends: ["initializeEnvironment"],
  1220. referencedClasses: []
  1221. }),
  1222. smalltalk.HLBrowserModel);
  1223. smalltalk.addMethod(
  1224. "_beRemoteOn_port_",
  1225. smalltalk.method({
  1226. selector: "beRemoteOn:port:",
  1227. category: 'actions',
  1228. fn: function (anIPAddress,aPort){
  1229. var self=this;
  1230. return self},
  1231. args: ["anIPAddress", "aPort"],
  1232. source: "beRemoteOn: anIPAddress port: aPort\x0a\x0a\x09\x22to-do\x22\x0a \x0a \x22environment := HLRemoteEnvironment on: anIPAddress port: aPort\x0a \x0a ...kind of stuff\x22\x0a \x0a",
  1233. messageSends: [],
  1234. referencedClasses: []
  1235. }),
  1236. smalltalk.HLBrowserModel);
  1237. smalltalk.addMethod(
  1238. "_environment",
  1239. smalltalk.method({
  1240. selector: "environment",
  1241. category: 'accessing',
  1242. fn: function (){
  1243. var self=this;
  1244. var $1;
  1245. if(($receiver = self["@environment"]) == nil || $receiver == undefined){
  1246. $1=smalltalk.send(self,"_initializeEnvironment",[]);
  1247. } else {
  1248. $1=self["@environment"];
  1249. };
  1250. return $1;
  1251. },
  1252. args: [],
  1253. source: "environment\x0a\x09^ environment ifNil: [ self initializeEnvironment ]",
  1254. messageSends: ["ifNil:", "initializeEnvironment"],
  1255. referencedClasses: []
  1256. }),
  1257. smalltalk.HLBrowserModel);
  1258. smalltalk.addMethod(
  1259. "_environment_",
  1260. smalltalk.method({
  1261. selector: "environment:",
  1262. category: 'accessing',
  1263. fn: function (anEnvironment) {
  1264. var self = this;
  1265. self['@environment'] = anEnvironment;
  1266. return self;
  1267. },
  1268. args: ["anEnvironment"],
  1269. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  1270. messageSends: [],
  1271. referencedClasses: []
  1272. }),
  1273. smalltalk.HLBrowserModel);
  1274. smalltalk.addMethod(
  1275. "_initializeEnvironment",
  1276. smalltalk.method({
  1277. selector: "initializeEnvironment",
  1278. category: 'initialization',
  1279. fn: function (){
  1280. var self=this;
  1281. var $1;
  1282. self["@environment"]=smalltalk.send((smalltalk.HLLocalEnvironment || HLLocalEnvironment),"_new",[]);
  1283. $1=self["@environment"];
  1284. return $1;
  1285. },
  1286. args: [],
  1287. source: "initializeEnvironment\x0a\x09^ environment := HLLocalEnvironment new",
  1288. messageSends: ["new"],
  1289. referencedClasses: ["HLLocalEnvironment"]
  1290. }),
  1291. smalltalk.HLBrowserModel);
  1292. smalltalk.addMethod(
  1293. "_packages",
  1294. smalltalk.method({
  1295. selector: "packages",
  1296. category: 'accessing',
  1297. fn: function () {
  1298. var self = this;
  1299. var $1;
  1300. $1 = smalltalk.send(smalltalk.send(self, "_environment", []), "_packages", []);
  1301. return $1;
  1302. },
  1303. args: [],
  1304. source: "packages\x0a\x09^ self environment packages",
  1305. messageSends: ["packages", "environment"],
  1306. referencedClasses: []
  1307. }),
  1308. smalltalk.HLBrowserModel);
  1309. smalltalk.addMethod(
  1310. "_selectedClass",
  1311. smalltalk.method({
  1312. selector: "selectedClass",
  1313. category: 'accessing',
  1314. fn: function () {
  1315. var self = this;
  1316. return self['@selectedClass'];
  1317. },
  1318. args: [],
  1319. source: "selectedClass\x0a\x09^ selectedClass",
  1320. messageSends: [],
  1321. referencedClasses: []
  1322. }),
  1323. smalltalk.HLBrowserModel);
  1324. smalltalk.addMethod(
  1325. "_selectedClass_",
  1326. smalltalk.method({
  1327. selector: "selectedClass:",
  1328. category: 'accessing',
  1329. fn: function (aClass){
  1330. var self=this;
  1331. var $1,$2,$3;
  1332. $1=smalltalk.send(self["@selectedClass"],"__eq",[aClass]);
  1333. if(! smalltalk.assert($1)){
  1334. if(($receiver = aClass) == nil || $receiver == undefined){
  1335. self["@selectedClass"]=nil;
  1336. self["@selectedClass"];
  1337. } else {
  1338. $2=smalltalk.send(self,"_showInstance",[]);
  1339. if(smalltalk.assert($2)){
  1340. self["@selectedClass"]=smalltalk.send(aClass,"_theNonMetaClass",[]);
  1341. self["@selectedClass"];
  1342. } else {
  1343. self["@selectedClass"]=smalltalk.send(aClass,"_theMetaClass",[]);
  1344. self["@selectedClass"];
  1345. };
  1346. };
  1347. smalltalk.send(self,"_selectedMethod_",[nil]);
  1348. $3=smalltalk.send(self,"_selectedProtocol_",[nil]);
  1349. $3;
  1350. };
  1351. smalltalk.send(smalltalk.send(self,"_announcer",[]),"_announce_",[smalltalk.send((smalltalk.HLClassSelected || HLClassSelected),"_on_",[smalltalk.send(self,"_selectedClass",[])])]);
  1352. return self},
  1353. args: ["aClass"],
  1354. 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)",
  1355. messageSends: ["ifFalse:", "ifNil:ifNotNil:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "showInstance", "selectedMethod:", "selectedProtocol:", "=", "announce:", "on:", "selectedClass", "announcer"],
  1356. referencedClasses: ["HLClassSelected"]
  1357. }),
  1358. smalltalk.HLBrowserModel);
  1359. smalltalk.addMethod(
  1360. "_selectedMethod",
  1361. smalltalk.method({
  1362. selector: "selectedMethod",
  1363. category: 'accessing',
  1364. fn: function () {
  1365. var self = this;
  1366. return self['@selectedMethod'];
  1367. },
  1368. args: [],
  1369. source: "selectedMethod\x0a\x09^ selectedMethod",
  1370. messageSends: [],
  1371. referencedClasses: []
  1372. }),
  1373. smalltalk.HLBrowserModel);
  1374. smalltalk.addMethod(
  1375. "_selectedMethod_",
  1376. smalltalk.method({
  1377. selector: "selectedMethod:",
  1378. category: 'accessing',
  1379. fn: function (aCompiledMethod){
  1380. var self=this;
  1381. var $1;
  1382. $1=smalltalk.send(self["@selectedMethod"],"__eq",[aCompiledMethod]);
  1383. if(! smalltalk.assert($1)){
  1384. self["@selectedMethod"]=aCompiledMethod;
  1385. self["@selectedMethod"];
  1386. };
  1387. smalltalk.send(smalltalk.send(self,"_announcer",[]),"_announce_",[smalltalk.send((smalltalk.HLMethodSelected || HLMethodSelected),"_on_",[aCompiledMethod])]);
  1388. return self},
  1389. args: ["aCompiledMethod"],
  1390. source: "selectedMethod: aCompiledMethod\x0a\x09selectedMethod = aCompiledMethod ifFalse: [\x0a\x09\x09selectedMethod := aCompiledMethod ].\x0a \x0a self announcer announce: (HLMethodSelected on: aCompiledMethod)",
  1391. messageSends: ["ifFalse:", "=", "announce:", "on:", "announcer"],
  1392. referencedClasses: ["HLMethodSelected"]
  1393. }),
  1394. smalltalk.HLBrowserModel);
  1395. smalltalk.addMethod(
  1396. "_selectedPackage",
  1397. smalltalk.method({
  1398. selector: "selectedPackage",
  1399. category: 'accessing',
  1400. fn: function () {
  1401. var self = this;
  1402. return self['@selectedPackage'];
  1403. },
  1404. args: [],
  1405. source: "selectedPackage\x0a\x09^ selectedPackage",
  1406. messageSends: [],
  1407. referencedClasses: []
  1408. }),
  1409. smalltalk.HLBrowserModel);
  1410. smalltalk.addMethod(
  1411. "_selectedPackage_",
  1412. smalltalk.method({
  1413. selector: "selectedPackage:",
  1414. category: 'accessing',
  1415. fn: function (aPackage){
  1416. var self=this;
  1417. var $1;
  1418. $1=smalltalk.send(self["@selectedPackage"],"__eq",[aPackage]);
  1419. if(! smalltalk.assert($1)){
  1420. self["@selectedPackage"]=aPackage;
  1421. self["@selectedPackage"];
  1422. smalltalk.send(self,"_selectedClass_",[nil]);
  1423. };
  1424. smalltalk.send(smalltalk.send(self,"_announcer",[]),"_announce_",[smalltalk.send((smalltalk.HLPackageSelected || HLPackageSelected),"_on_",[aPackage])]);
  1425. return self},
  1426. args: ["aPackage"],
  1427. source: "selectedPackage: aPackage\x0a\x09selectedPackage = aPackage ifFalse: [\x0a\x09\x09selectedPackage := aPackage.\x0a \x09self selectedClass: nil ].\x0a \x0a self announcer announce: (HLPackageSelected on: aPackage)",
  1428. messageSends: ["ifFalse:", "selectedClass:", "=", "announce:", "on:", "announcer"],
  1429. referencedClasses: ["HLPackageSelected"]
  1430. }),
  1431. smalltalk.HLBrowserModel);
  1432. smalltalk.addMethod(
  1433. "_selectedProtocol",
  1434. smalltalk.method({
  1435. selector: "selectedProtocol",
  1436. category: 'accessing',
  1437. fn: function () {
  1438. var self = this;
  1439. return self['@selectedProtocol'];
  1440. },
  1441. args: [],
  1442. source: "selectedProtocol\x0a\x09^ selectedProtocol",
  1443. messageSends: [],
  1444. referencedClasses: []
  1445. }),
  1446. smalltalk.HLBrowserModel);
  1447. smalltalk.addMethod(
  1448. "_selectedProtocol_",
  1449. smalltalk.method({
  1450. selector: "selectedProtocol:",
  1451. category: 'accessing',
  1452. fn: function (aString){
  1453. var self=this;
  1454. var $1;
  1455. $1=smalltalk.send(self["@selectedProtocol"],"__eq",[aString]);
  1456. if(! smalltalk.assert($1)){
  1457. self["@selectedProtocol"]=aString;
  1458. self["@selectedProtocol"];
  1459. smalltalk.send(self,"_selectedMethod_",[nil]);
  1460. };
  1461. smalltalk.send(smalltalk.send(self,"_announcer",[]),"_announce_",[smalltalk.send((smalltalk.HLProtocolSelected || HLProtocolSelected),"_on_",[aString])]);
  1462. return self},
  1463. args: ["aString"],
  1464. source: "selectedProtocol: aString\x0a\x09selectedProtocol = aString ifFalse: [\x0a \x09selectedProtocol := aString.\x0a \x09self selectedMethod: nil ].\x0a \x0a self announcer announce: (HLProtocolSelected on: aString)",
  1465. messageSends: ["ifFalse:", "selectedMethod:", "=", "announce:", "on:", "announcer"],
  1466. referencedClasses: ["HLProtocolSelected"]
  1467. }),
  1468. smalltalk.HLBrowserModel);
  1469. smalltalk.addMethod(
  1470. "_showComment",
  1471. smalltalk.method({
  1472. selector: "showComment",
  1473. category: 'accessing',
  1474. fn: function () {
  1475. var self = this;
  1476. var $1;
  1477. if (($receiver = self['@showComment']) == nil || $receiver == undefined) {
  1478. $1 = false;
  1479. } else {
  1480. $1 = self['@showComment'];
  1481. }
  1482. return $1;
  1483. },
  1484. args: [],
  1485. source: "showComment\x0a\x09^ showComment ifNil: [ false ]",
  1486. messageSends: ["ifNil:"],
  1487. referencedClasses: []
  1488. }),
  1489. smalltalk.HLBrowserModel);
  1490. smalltalk.addMethod(
  1491. "_showComment_",
  1492. smalltalk.method({
  1493. selector: "showComment:",
  1494. category: 'accessing',
  1495. fn: function (aBoolean) {
  1496. var self = this;
  1497. self['@showComment'] = aBoolean;
  1498. smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLShowCommentToggled || HLShowCommentToggled, "_new", [])]);
  1499. return self;
  1500. },
  1501. args: ["aBoolean"],
  1502. source: "showComment: aBoolean\x0a\x09showComment := aBoolean.\x0a \x0a self announcer announce: HLShowCommentToggled new",
  1503. messageSends: ["announce:", "new", "announcer"],
  1504. referencedClasses: ["HLShowCommentToggled"]
  1505. }),
  1506. smalltalk.HLBrowserModel);
  1507. smalltalk.addMethod(
  1508. "_showInstance",
  1509. smalltalk.method({
  1510. selector: "showInstance",
  1511. category: 'accessing',
  1512. fn: function () {
  1513. var self = this;
  1514. var $1;
  1515. if (($receiver = self['@showInstance']) == nil ||
  1516. $receiver == undefined) {
  1517. $1 = true;
  1518. } else {
  1519. $1 = self['@showInstance'];
  1520. }
  1521. return $1;
  1522. },
  1523. args: [],
  1524. source: "showInstance\x0a\x09^ showInstance ifNil: [ true ]",
  1525. messageSends: ["ifNil:"],
  1526. referencedClasses: []
  1527. }),
  1528. smalltalk.HLBrowserModel);
  1529. smalltalk.addMethod(
  1530. "_showInstance_",
  1531. smalltalk.method({
  1532. selector: "showInstance:",
  1533. category: 'accessing',
  1534. fn: function (aBoolean) {
  1535. var self = this;
  1536. var $1, $2;
  1537. self['@showInstance'] = aBoolean;
  1538. $1 = smalltalk.send(self, "_selectedClass", []);
  1539. if (($receiver = $1) == nil || $receiver == undefined) {
  1540. } else {
  1541. if (smalltalk.assert(aBoolean)) {
  1542. $2 = smalltalk.send(smalltalk.send(self, "_selectedClass", []), "_theNonMetaClass", []);
  1543. } else {
  1544. $2 = smalltalk.send(smalltalk.send(self, "_selectedClass", []), "_theMetaClass", []);
  1545. }
  1546. smalltalk.send(self, "_selectedClass_", [$2]);
  1547. }
  1548. smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLShowInstanceToggled || HLShowInstanceToggled, "_new", [])]);
  1549. return self;
  1550. },
  1551. args: ["aBoolean"],
  1552. 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",
  1553. messageSends: ["ifNotNil:", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "selectedClass", "theMetaClass", "announce:", "new", "announcer"],
  1554. referencedClasses: ["HLShowInstanceToggled"]
  1555. }),
  1556. smalltalk.HLBrowserModel);
  1557. smalltalk.addMethod(
  1558. "_subscribe_",
  1559. smalltalk.method({
  1560. selector: "subscribe:",
  1561. category: 'announcements',
  1562. fn: function (aWidget) {
  1563. var self = this;
  1564. smalltalk.send(aWidget, "_subscribeTo_", [smalltalk.send(self, "_announcer", [])]);
  1565. return self;
  1566. },
  1567. args: ["aWidget"],
  1568. source: "subscribe: aWidget\x0a\x09aWidget subscribeTo: self announcer",
  1569. messageSends: ["subscribeTo:", "announcer"],
  1570. referencedClasses: []
  1571. }),
  1572. smalltalk.HLBrowserModel);
  1573. smalltalk.addMethod(
  1574. "_on_",
  1575. smalltalk.method({
  1576. selector: "on:",
  1577. category: 'actions',
  1578. fn: function (anEnvironment){
  1579. var self=this;
  1580. var $2,$3,$1;
  1581. $2=smalltalk.send(self,"_new",[]);
  1582. smalltalk.send($2,"_environment_",[anEnvironment]);
  1583. $3=smalltalk.send($2,"_yourself",[]);
  1584. $1=$3;
  1585. return $1;
  1586. },
  1587. args: ["anEnvironment"],
  1588. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  1589. messageSends: ["environment:", "new", "yourself"],
  1590. referencedClasses: []
  1591. }),
  1592. smalltalk.HLBrowserModel.klass);
  1593. smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'sourceArea'], 'Helios-Browser');
  1594. smalltalk.addMethod(
  1595. "_classSelected_",
  1596. smalltalk.method({
  1597. selector: "classSelected:",
  1598. category: 'actions',
  1599. fn: function (aClass) {
  1600. var self = this;
  1601. var $1;
  1602. if (($receiver = aClass) == nil || $receiver == undefined) {
  1603. $1 = smalltalk.send(self, "_contents_", [""]);
  1604. return $1;
  1605. } else {
  1606. }
  1607. smalltalk.send(self, "_contents_", [smalltalk.send(aClass, "_definition", [])]);
  1608. return self;
  1609. },
  1610. args: ["aClass"],
  1611. source: "classSelected: aClass\x0a\x09aClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: aClass definition",
  1612. messageSends: ["ifNil:", "contents:", "definition"],
  1613. referencedClasses: []
  1614. }),
  1615. smalltalk.HLBrowserSourceWidget);
  1616. smalltalk.addMethod(
  1617. "_contents",
  1618. smalltalk.method({
  1619. selector: "contents",
  1620. category: 'accessing',
  1621. fn: function () {
  1622. var self = this;
  1623. var $1;
  1624. $1 = smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_contents", []);
  1625. return $1;
  1626. },
  1627. args: [],
  1628. source: "contents\x0a\x09^ self sourceArea contents",
  1629. messageSends: ["contents", "sourceArea"],
  1630. referencedClasses: []
  1631. }),
  1632. smalltalk.HLBrowserSourceWidget);
  1633. smalltalk.addMethod(
  1634. "_contents_",
  1635. smalltalk.method({
  1636. selector: "contents:",
  1637. category: 'accessing',
  1638. fn: function (aString) {
  1639. var self = this;
  1640. smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_contents_", [aString]);
  1641. return self;
  1642. },
  1643. args: ["aString"],
  1644. source: "contents: aString\x0a\x09self sourceArea contents: aString",
  1645. messageSends: ["contents:", "sourceArea"],
  1646. referencedClasses: []
  1647. }),
  1648. smalltalk.HLBrowserSourceWidget);
  1649. smalltalk.addMethod(
  1650. "_methodSelected_",
  1651. smalltalk.method({
  1652. selector: "methodSelected:",
  1653. category: 'actions',
  1654. fn: function (aCompiledMethod) {
  1655. var self = this;
  1656. var $1;
  1657. if (($receiver = aCompiledMethod) == nil || $receiver == undefined) {
  1658. $1 = smalltalk.send(self, "_contents_", [""]);
  1659. return $1;
  1660. } else {
  1661. }
  1662. smalltalk.send(self, "_contents_", [smalltalk.send(aCompiledMethod, "_source", [])]);
  1663. return self;
  1664. },
  1665. args: ["aCompiledMethod"],
  1666. source: "methodSelected: aCompiledMethod\x0a\x09aCompiledMethod ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: aCompiledMethod source",
  1667. messageSends: ["ifNil:", "contents:", "source"],
  1668. referencedClasses: []
  1669. }),
  1670. smalltalk.HLBrowserSourceWidget);
  1671. smalltalk.addMethod(
  1672. "_model",
  1673. smalltalk.method({
  1674. selector: "model",
  1675. category: 'accessing',
  1676. fn: function () {
  1677. var self = this;
  1678. return self['@model'];
  1679. },
  1680. args: [],
  1681. source: "model\x0a\x09^ model",
  1682. messageSends: [],
  1683. referencedClasses: []
  1684. }),
  1685. smalltalk.HLBrowserSourceWidget);
  1686. smalltalk.addMethod(
  1687. "_model_",
  1688. smalltalk.method({
  1689. selector: "model:",
  1690. category: 'accessing',
  1691. fn: function (aBrowserModel) {
  1692. var self = this;
  1693. self['@model'] = aBrowserModel;
  1694. smalltalk.send(self['@model'], "_subscribe_", [self]);
  1695. return self;
  1696. },
  1697. args: ["aBrowserModel"],
  1698. source: "model: aBrowserModel\x0a\x09\x22TODO: unsubscribe from previous model\x22\x0a \x0a\x09model := aBrowserModel.\x0a model subscribe: self",
  1699. messageSends: ["subscribe:"],
  1700. referencedClasses: []
  1701. }),
  1702. smalltalk.HLBrowserSourceWidget);
  1703. smalltalk.addMethod(
  1704. "_protocolSelected_",
  1705. smalltalk.method({
  1706. selector: "protocolSelected:",
  1707. category: 'actions',
  1708. fn: function (aString) {
  1709. var self = this;
  1710. var $1, $2;
  1711. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []);
  1712. if (($receiver = $1) == nil || $receiver == undefined) {
  1713. $2 = smalltalk.send(self, "_contents_", [""]);
  1714. return $2;
  1715. } else {
  1716. }
  1717. smalltalk.send(self, "_contents_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", []), "_definition", [])]);
  1718. return self;
  1719. },
  1720. args: ["aString"],
  1721. source: "protocolSelected: aString\x0a\x09self model selectedClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: self model selectedClass definition",
  1722. messageSends: ["ifNil:", "contents:", "selectedClass", "model", "definition"],
  1723. referencedClasses: []
  1724. }),
  1725. smalltalk.HLBrowserSourceWidget);
  1726. smalltalk.addMethod(
  1727. "_renderContentOn_",
  1728. smalltalk.method({
  1729. selector: "renderContentOn:",
  1730. category: 'rendering',
  1731. fn: function (html) {
  1732. var self = this;
  1733. smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_renderOn_", [html]);
  1734. return self;
  1735. },
  1736. args: ["html"],
  1737. source: "renderContentOn: html\x0a\x09self sourceArea renderOn: html",
  1738. messageSends: ["renderOn:", "sourceArea"],
  1739. referencedClasses: []
  1740. }),
  1741. smalltalk.HLBrowserSourceWidget);
  1742. smalltalk.addMethod(
  1743. "_sourceArea",
  1744. smalltalk.method({
  1745. selector: "sourceArea",
  1746. category: 'accessing',
  1747. fn: function () {
  1748. var self = this;
  1749. var $1;
  1750. if (($receiver = self['@sourceArea']) == nil || $receiver == undefined) {
  1751. self['@sourceArea'] = smalltalk.send(smalltalk.HLSourceArea || HLSourceArea, "_new", []);
  1752. $1 = self['@sourceArea'];
  1753. } else {
  1754. $1 = self['@sourceArea'];
  1755. }
  1756. return $1;
  1757. },
  1758. args: [],
  1759. source: "sourceArea\x0a\x09^ sourceArea ifNil: [ sourceArea := HLSourceArea new ]",
  1760. messageSends: ["ifNil:", "new"],
  1761. referencedClasses: ["HLSourceArea"]
  1762. }),
  1763. smalltalk.HLBrowserSourceWidget);
  1764. smalltalk.addMethod(
  1765. "_subscribeTo_",
  1766. smalltalk.method({
  1767. selector: "subscribeTo:",
  1768. category: 'announcements',
  1769. fn: function (anAnnouncer) {
  1770. var self = this;
  1771. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLMethodSelected || HLMethodSelected, function (ann) {return smalltalk.send(self, "_methodSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  1772. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLClassSelected || HLClassSelected, function (ann) {return smalltalk.send(self, "_classSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  1773. smalltalk.send(anAnnouncer, "_on_do_", [smalltalk.HLProtocolSelected || HLProtocolSelected, function (ann) {return smalltalk.send(self, "_protocolSelected_", [smalltalk.send(ann, "_item", [])]);}]);
  1774. return self;
  1775. },
  1776. args: ["anAnnouncer"],
  1777. 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 ]",
  1778. messageSends: ["on:do:", "methodSelected:", "item", "classSelected:", "protocolSelected:"],
  1779. referencedClasses: ["HLMethodSelected", "HLClassSelected", "HLProtocolSelected"]
  1780. }),
  1781. smalltalk.HLBrowserSourceWidget);
  1782. smalltalk.addMethod(
  1783. "_on_",
  1784. smalltalk.method({
  1785. selector: "on:",
  1786. category: 'instance creation',
  1787. fn: function (aBrowserModel) {
  1788. var self = this;
  1789. var $2, $3, $1;
  1790. $2 = smalltalk.send(self, "_new", []);
  1791. smalltalk.send($2, "_model_", [aBrowserModel]);
  1792. $3 = smalltalk.send($2, "_yourself", []);
  1793. $1 = $3;
  1794. return $1;
  1795. },
  1796. args: ["aBrowserModel"],
  1797. source: "on: aBrowserModel\x0a\x09^ self new\x0a \x09model: aBrowserModel;\x0a yourself",
  1798. messageSends: ["model:", "new", "yourself"],
  1799. referencedClasses: []
  1800. }),
  1801. smalltalk.HLBrowserSourceWidget.klass);