Helios-Browser.deploy.js 59 KB

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