Helios-Browser.js 63 KB

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