1
0

Helios-Browser.js 80 KB

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