Helios-Browser.deploy.js 91 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500
  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. "_initialize",
  233. smalltalk.method({
  234. selector: "initialize",
  235. fn: function (){
  236. var self=this;
  237. return smalltalk.withContext(function($ctx1) { smalltalk.HLNavigationListWidget.fn.prototype._initialize.apply(_st(self), []);
  238. _st(self)._observeSystem();
  239. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLBrowserListWidget)})},
  240. messageSends: ["initialize", "observeSystem"]}),
  241. smalltalk.HLBrowserListWidget);
  242. smalltalk.addMethod(
  243. "_model",
  244. smalltalk.method({
  245. selector: "model",
  246. fn: function (){
  247. var self=this;
  248. return smalltalk.withContext(function($ctx1) { var $1;
  249. $1=self["@model"];
  250. return $1;
  251. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLBrowserListWidget)})},
  252. messageSends: []}),
  253. smalltalk.HLBrowserListWidget);
  254. smalltalk.addMethod(
  255. "_model_",
  256. smalltalk.method({
  257. selector: "model:",
  258. fn: function (aBrowserModel){
  259. var self=this;
  260. return smalltalk.withContext(function($ctx1) { self["@model"]=aBrowserModel;
  261. _st(self)._observeModel();
  262. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserListWidget)})},
  263. messageSends: ["observeModel"]}),
  264. smalltalk.HLBrowserListWidget);
  265. smalltalk.addMethod(
  266. "_observeModel",
  267. smalltalk.method({
  268. selector: "observeModel",
  269. fn: function (){
  270. var self=this;
  271. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLBrowserListWidget)})},
  272. messageSends: []}),
  273. smalltalk.HLBrowserListWidget);
  274. smalltalk.addMethod(
  275. "_observeSystem",
  276. smalltalk.method({
  277. selector: "observeSystem",
  278. fn: function (){
  279. var self=this;
  280. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLBrowserListWidget)})},
  281. messageSends: []}),
  282. smalltalk.HLBrowserListWidget);
  283. smalltalk.addMethod(
  284. "_on_",
  285. smalltalk.method({
  286. selector: "on:",
  287. fn: function (aModel){
  288. var self=this;
  289. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  290. $2=_st(self)._new();
  291. _st($2)._model_(aModel);
  292. $3=_st($2)._yourself();
  293. $1=$3;
  294. return $1;
  295. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel}, smalltalk.HLBrowserListWidget.klass)})},
  296. messageSends: ["model:", "new", "yourself"]}),
  297. smalltalk.HLBrowserListWidget.klass);
  298. smalltalk.addClass('HLClassesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  299. smalltalk.addMethod(
  300. "_focusMethodsListWidget",
  301. smalltalk.method({
  302. selector: "focusMethodsListWidget",
  303. fn: function (){
  304. var self=this;
  305. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._announce_(_st((smalltalk.HLMethodsListFocus || HLMethodsListFocus))._new());
  306. return self}, function($ctx1) {$ctx1.fill(self,"focusMethodsListWidget",{}, smalltalk.HLClassesListWidget)})},
  307. messageSends: ["announce:", "new", "announcer", "model"]}),
  308. smalltalk.HLClassesListWidget);
  309. smalltalk.addMethod(
  310. "_focusProtocolsListWidget",
  311. smalltalk.method({
  312. selector: "focusProtocolsListWidget",
  313. fn: function (){
  314. var self=this;
  315. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._announce_(_st((smalltalk.HLProtocolsListFocus || HLProtocolsListFocus))._new());
  316. return self}, function($ctx1) {$ctx1.fill(self,"focusProtocolsListWidget",{}, smalltalk.HLClassesListWidget)})},
  317. messageSends: ["announce:", "new", "announcer", "model"]}),
  318. smalltalk.HLClassesListWidget);
  319. smalltalk.addMethod(
  320. "_getChildrenOf_",
  321. smalltalk.method({
  322. selector: "getChildrenOf:",
  323. fn: function (aClass){
  324. var self=this;
  325. return smalltalk.withContext(function($ctx1) { var $1;
  326. $1=_st(_st(self)._items())._select_((function(each){
  327. return smalltalk.withContext(function($ctx2) { return _st(_st(each)._superclass()).__eq(aClass);
  328. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  329. return $1;
  330. }, function($ctx1) {$ctx1.fill(self,"getChildrenOf:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  331. messageSends: ["select:", "=", "superclass", "items"]}),
  332. smalltalk.HLClassesListWidget);
  333. smalltalk.addMethod(
  334. "_getRootClassesOf_",
  335. smalltalk.method({
  336. selector: "getRootClassesOf:",
  337. fn: function (aCollection){
  338. var self=this;
  339. return smalltalk.withContext(function($ctx1) { var $1;
  340. $1=_st(aCollection)._select_((function(each){
  341. return smalltalk.withContext(function($ctx2) { return _st(_st(aCollection)._includes_(_st(each)._superclass()))._not();
  342. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  343. return $1;
  344. }, function($ctx1) {$ctx1.fill(self,"getRootClassesOf:",{aCollection:aCollection}, smalltalk.HLClassesListWidget)})},
  345. messageSends: ["select:", "not", "includes:", "superclass"]}),
  346. smalltalk.HLClassesListWidget);
  347. smalltalk.addMethod(
  348. "_iconForItem_",
  349. smalltalk.method({
  350. selector: "iconForItem:",
  351. fn: function (aClass){
  352. var self=this;
  353. return smalltalk.withContext(function($ctx1) { var $2,$1;
  354. $2=_st(_st(_st(aClass)._theNonMetaClass())._comment())._isEmpty();
  355. if(smalltalk.assert($2)){
  356. $1="icon-question-sign";
  357. } else {
  358. $1="icon-none";
  359. };
  360. return $1;
  361. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  362. messageSends: ["ifFalse:ifTrue:", "isEmpty", "comment", "theNonMetaClass"]}),
  363. smalltalk.HLClassesListWidget);
  364. smalltalk.addMethod(
  365. "_observeModel",
  366. smalltalk.method({
  367. selector: "observeModel",
  368. fn: function (){
  369. var self=this;
  370. return smalltalk.withContext(function($ctx1) { var $1,$2;
  371. $1=_st(_st(self)._model())._announcer();
  372. _st($1)._on_do_((smalltalk.HLPackageSelected || HLPackageSelected),(function(ann){
  373. return smalltalk.withContext(function($ctx2) { return _st(self)._onPackageSelected_(_st(ann)._item());
  374. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  375. _st($1)._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  376. return smalltalk.withContext(function($ctx2) { return _st(self)._onShowInstanceToggled();
  377. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  378. $2=_st($1)._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  379. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  380. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  381. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLClassesListWidget)})},
  382. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model", "onShowInstanceToggled", "onClassSelected:"]}),
  383. smalltalk.HLClassesListWidget);
  384. smalltalk.addMethod(
  385. "_observeSystem",
  386. smalltalk.method({
  387. selector: "observeSystem",
  388. fn: function (){
  389. var self=this;
  390. return smalltalk.withContext(function($ctx1) { var $1,$2;
  391. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  392. _st($1)._on_do_((smalltalk.ClassAdded || ClassAdded),(function(ann){
  393. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassAdded_(_st(ann)._theClass());
  394. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  395. $2=_st($1)._on_do_((smalltalk.ClassRemoved || ClassRemoved),(function(ann){
  396. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassRemoved_(_st(ann)._theClass());
  397. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  398. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLClassesListWidget)})},
  399. messageSends: ["on:do:", "onClassAdded:", "theClass", "current", "onClassRemoved:"]}),
  400. smalltalk.HLClassesListWidget);
  401. smalltalk.addMethod(
  402. "_onClassAdded_",
  403. smalltalk.method({
  404. selector: "onClassAdded:",
  405. fn: function (aClass){
  406. var self=this;
  407. return smalltalk.withContext(function($ctx1) { var $1,$2;
  408. $1=_st(_st(aClass)._package()).__eq(_st(_st(self)._model())._selectedPackage());
  409. if(! smalltalk.assert($1)){
  410. $2=self;
  411. return $2;
  412. };
  413. _st(self)._setItemsForSelectedPackage();
  414. _st(self)._refresh();
  415. return self}, function($ctx1) {$ctx1.fill(self,"onClassAdded:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  416. messageSends: ["ifFalse:", "=", "selectedPackage", "model", "package", "setItemsForSelectedPackage", "refresh"]}),
  417. smalltalk.HLClassesListWidget);
  418. smalltalk.addMethod(
  419. "_onClassRemoved_",
  420. smalltalk.method({
  421. selector: "onClassRemoved:",
  422. fn: function (aClass){
  423. var self=this;
  424. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  425. $1=_st(_st(aClass)._package()).__eq(_st(_st(self)._model())._selectedPackage());
  426. if(! smalltalk.assert($1)){
  427. $2=self;
  428. return $2;
  429. };
  430. $3=_st(aClass).__eq(_st(_st(self)._model())._selectedClass());
  431. if(smalltalk.assert($3)){
  432. _st(self)._selectItem_(nil);
  433. };
  434. _st(self)._setItemsForSelectedPackage();
  435. _st(self)._refresh();
  436. return self}, function($ctx1) {$ctx1.fill(self,"onClassRemoved:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  437. messageSends: ["ifFalse:", "=", "selectedPackage", "model", "package", "ifTrue:", "selectItem:", "selectedClass", "setItemsForSelectedPackage", "refresh"]}),
  438. smalltalk.HLClassesListWidget);
  439. smalltalk.addMethod(
  440. "_onClassSelected_",
  441. smalltalk.method({
  442. selector: "onClassSelected:",
  443. fn: function (aClass){
  444. var self=this;
  445. return smalltalk.withContext(function($ctx1) { var $1,$2;
  446. _st(self)._selectedItem_(aClass);
  447. $1=aClass;
  448. if(($receiver = $1) == nil || $receiver == undefined){
  449. $2=self;
  450. return $2;
  451. } else {
  452. $1;
  453. };
  454. _st(self)._focus();
  455. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  456. messageSends: ["selectedItem:", "ifNil:", "focus"]}),
  457. smalltalk.HLClassesListWidget);
  458. smalltalk.addMethod(
  459. "_onPackageSelected_",
  460. smalltalk.method({
  461. selector: "onPackageSelected:",
  462. fn: function (aPackage){
  463. var self=this;
  464. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(nil);
  465. _st(self)._setItemsForSelectedPackage();
  466. _st(self)._refresh();
  467. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{aPackage:aPackage}, smalltalk.HLClassesListWidget)})},
  468. messageSends: ["selectedItem:", "setItemsForSelectedPackage", "refresh"]}),
  469. smalltalk.HLClassesListWidget);
  470. smalltalk.addMethod(
  471. "_onShowInstanceToggled",
  472. smalltalk.method({
  473. selector: "onShowInstanceToggled",
  474. fn: function (){
  475. var self=this;
  476. return smalltalk.withContext(function($ctx1) { _st(self)._refresh();
  477. return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{}, smalltalk.HLClassesListWidget)})},
  478. messageSends: ["refresh"]}),
  479. smalltalk.HLClassesListWidget);
  480. smalltalk.addMethod(
  481. "_renderButtonsOn_",
  482. smalltalk.method({
  483. selector: "renderButtonsOn:",
  484. fn: function (html){
  485. var self=this;
  486. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$6,$7,$8,$2,$9,$10;
  487. $1=_st(html)._div();
  488. _st($1)._class_("btn-group");
  489. _st($1)._at_put_("data-toggle","buttons-radio");
  490. $2=_st($1)._with_((function(){
  491. return smalltalk.withContext(function($ctx2) { $3=_st(html)._button();
  492. _st($3)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  493. return smalltalk.withContext(function($ctx3) { _st(str)._nextPutAll_("btn");
  494. $4=_st(self)._showInstance();
  495. if(smalltalk.assert($4)){
  496. return _st(str)._nextPutAll_(" active");
  497. };
  498. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  499. _st($3)._with_("Instance");
  500. $5=_st($3)._onClick_((function(){
  501. return smalltalk.withContext(function($ctx3) { return _st(self)._showInstance_(true);
  502. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  503. $5;
  504. $6=_st(html)._button();
  505. _st($6)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  506. return smalltalk.withContext(function($ctx3) { _st(str)._nextPutAll_("btn");
  507. $7=_st(_st(self)._model())._showInstance();
  508. if(! smalltalk.assert($7)){
  509. return _st(str)._nextPutAll_(" active");
  510. };
  511. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  512. _st($6)._with_("Class");
  513. $8=_st($6)._onClick_((function(){
  514. return smalltalk.withContext(function($ctx3) { return _st(_st(self)._model())._showInstance_(false);
  515. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  516. return $8;
  517. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  518. $9=_st(html)._button();
  519. _st($9)._class_("btn");
  520. _st($9)._at_put_("data-toggle","button");
  521. $10=_st($9)._with_("Comment");
  522. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.HLClassesListWidget)})},
  523. messageSends: ["class:", "div", "at:put:", "with:", "streamContents:", "nextPutAll:", "ifTrue:", "showInstance", "button", "onClick:", "showInstance:", "ifFalse:", "model"]}),
  524. smalltalk.HLClassesListWidget);
  525. smalltalk.addMethod(
  526. "_renderItem_level_on_",
  527. smalltalk.method({
  528. selector: "renderItem:level:on:",
  529. fn: function (aClass,anInteger,html){
  530. var self=this;
  531. var li;
  532. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  533. li=_st(html)._li();
  534. $1=li;
  535. _st($1)._at_put_("list-data",_st(_st(self)._items())._indexOf_(aClass));
  536. _st($1)._class_(_st(self)._cssClassForItem_(aClass));
  537. $2=_st($1)._with_((function(){
  538. return smalltalk.withContext(function($ctx2) { $3=_st(html)._a();
  539. _st($3)._with_((function(){
  540. return smalltalk.withContext(function($ctx3) { _st(_st(html)._tag_("i"))._class_(_st(self)._iconForItem_(aClass));
  541. return _st(self)._renderItemLabel_level_on_(aClass,anInteger,html);
  542. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  543. $4=_st($3)._onClick_((function(){
  544. return smalltalk.withContext(function($ctx3) { return _st(self)._activateListItem_(_st(li)._asJQuery());
  545. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  546. return $4;
  547. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  548. _st(_st(self)._getChildrenOf_(aClass))._do_((function(each){
  549. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_level_on_(each,_st(anInteger).__plus((1)),html);
  550. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  551. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:level:on:",{aClass:aClass,anInteger:anInteger,html:html,li:li}, smalltalk.HLClassesListWidget)})},
  552. messageSends: ["li", "at:put:", "indexOf:", "items", "class:", "cssClassForItem:", "with:", "iconForItem:", "tag:", "renderItemLabel:level:on:", "a", "onClick:", "activateListItem:", "asJQuery", "do:", "renderItem:level:on:", "+", "getChildrenOf:"]}),
  553. smalltalk.HLClassesListWidget);
  554. smalltalk.addMethod(
  555. "_renderItem_on_",
  556. smalltalk.method({
  557. selector: "renderItem:on:",
  558. fn: function (aClass,html){
  559. var self=this;
  560. return smalltalk.withContext(function($ctx1) { smalltalk.HLBrowserListWidget.fn.prototype._renderItem_on_.apply(_st(self), [aClass,html]);
  561. _st(_st(self)._getChildrenOf_(aClass))._do_((function(each){
  562. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_level_on_(each,(1),html);
  563. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  564. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{aClass:aClass,html:html}, smalltalk.HLClassesListWidget)})},
  565. messageSends: ["renderItem:on:", "do:", "renderItem:level:on:", "getChildrenOf:"]}),
  566. smalltalk.HLClassesListWidget);
  567. smalltalk.addMethod(
  568. "_renderItemLabel_level_on_",
  569. smalltalk.method({
  570. selector: "renderItemLabel:level:on:",
  571. fn: function (aClass,anInteger,html){
  572. var self=this;
  573. return smalltalk.withContext(function($ctx1) { _st(_st(_st(html)._span())._asJQuery())._html_(_st((smalltalk.String || String))._streamContents_((function(str){
  574. return smalltalk.withContext(function($ctx2) { _st(anInteger)._timesRepeat_((function(){
  575. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("    ");
  576. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  577. return _st(str)._nextPutAll_(_st(aClass)._name());
  578. }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1)})})));
  579. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:level:on:",{aClass:aClass,anInteger:anInteger,html:html}, smalltalk.HLClassesListWidget)})},
  580. messageSends: ["html:", "streamContents:", "timesRepeat:", "nextPutAll:", "name", "asJQuery", "span"]}),
  581. smalltalk.HLClassesListWidget);
  582. smalltalk.addMethod(
  583. "_renderItemLabel_on_",
  584. smalltalk.method({
  585. selector: "renderItemLabel:on:",
  586. fn: function (aClass,html){
  587. var self=this;
  588. return smalltalk.withContext(function($ctx1) { _st(self)._renderItemLabel_level_on_(aClass,(0),html);
  589. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aClass:aClass,html:html}, smalltalk.HLClassesListWidget)})},
  590. messageSends: ["renderItemLabel:level:on:"]}),
  591. smalltalk.HLClassesListWidget);
  592. smalltalk.addMethod(
  593. "_renderListOn_",
  594. smalltalk.method({
  595. selector: "renderListOn:",
  596. fn: function (html){
  597. var self=this;
  598. return smalltalk.withContext(function($ctx1) { _st(_st(self)._getRootClassesOf_(_st(self)._items()))._do_((function(each){
  599. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_on_(each,html);
  600. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  601. return self}, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html}, smalltalk.HLClassesListWidget)})},
  602. messageSends: ["do:", "renderItem:on:", "getRootClassesOf:", "items"]}),
  603. smalltalk.HLClassesListWidget);
  604. smalltalk.addMethod(
  605. "_selectItem_",
  606. smalltalk.method({
  607. selector: "selectItem:",
  608. fn: function (aClass){
  609. var self=this;
  610. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedClass_(aClass);
  611. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  612. messageSends: ["selectedClass:", "model"]}),
  613. smalltalk.HLClassesListWidget);
  614. smalltalk.addMethod(
  615. "_setItemsForPackage_",
  616. smalltalk.method({
  617. selector: "setItemsForPackage:",
  618. fn: function (aPackage){
  619. var self=this;
  620. return smalltalk.withContext(function($ctx1) { var $1,$3,$2;
  621. $1=self;
  622. $3=aPackage;
  623. if(($receiver = $3) == nil || $receiver == undefined){
  624. $2=[];
  625. } else {
  626. $2=_st(_st(_st(_st(_st(aPackage)._classes())._collect_((function(each){
  627. return smalltalk.withContext(function($ctx2) { return _st(each)._theNonMetaClass();
  628. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet())._asArray())._sort_((function(a,b){
  629. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._name()).__lt(_st(b)._name());
  630. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  631. };
  632. _st($1)._items_($2);
  633. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForPackage:",{aPackage:aPackage}, smalltalk.HLClassesListWidget)})},
  634. messageSends: ["items:", "ifNil:ifNotNil:", "sort:", "<", "name", "asArray", "asSet", "collect:", "theNonMetaClass", "classes"]}),
  635. smalltalk.HLClassesListWidget);
  636. smalltalk.addMethod(
  637. "_setItemsForSelectedPackage",
  638. smalltalk.method({
  639. selector: "setItemsForSelectedPackage",
  640. fn: function (){
  641. var self=this;
  642. return smalltalk.withContext(function($ctx1) { _st(self)._setItemsForPackage_(_st(_st(self)._model())._selectedPackage());
  643. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedPackage",{}, smalltalk.HLClassesListWidget)})},
  644. messageSends: ["setItemsForPackage:", "selectedPackage", "model"]}),
  645. smalltalk.HLClassesListWidget);
  646. smalltalk.addMethod(
  647. "_showInstance",
  648. smalltalk.method({
  649. selector: "showInstance",
  650. fn: function (){
  651. var self=this;
  652. return smalltalk.withContext(function($ctx1) { var $1;
  653. $1=_st(_st(self)._model())._showInstance();
  654. return $1;
  655. }, function($ctx1) {$ctx1.fill(self,"showInstance",{}, smalltalk.HLClassesListWidget)})},
  656. messageSends: ["showInstance", "model"]}),
  657. smalltalk.HLClassesListWidget);
  658. smalltalk.addMethod(
  659. "_showInstance_",
  660. smalltalk.method({
  661. selector: "showInstance:",
  662. fn: function (aBoolean){
  663. var self=this;
  664. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._showInstance_(aBoolean);
  665. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean}, smalltalk.HLClassesListWidget)})},
  666. messageSends: ["showInstance:", "model"]}),
  667. smalltalk.HLClassesListWidget);
  668. smalltalk.addClass('HLMethodsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  669. smalltalk.addMethod(
  670. "_allProtocol",
  671. smalltalk.method({
  672. selector: "allProtocol",
  673. fn: function (){
  674. var self=this;
  675. return smalltalk.withContext(function($ctx1) { var $1;
  676. $1=_st(_st(self)._model())._allProtocol();
  677. return $1;
  678. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLMethodsListWidget)})},
  679. messageSends: ["allProtocol", "model"]}),
  680. smalltalk.HLMethodsListWidget);
  681. smalltalk.addMethod(
  682. "_flushSelectorsCache",
  683. smalltalk.method({
  684. selector: "flushSelectorsCache",
  685. fn: function (){
  686. var self=this;
  687. return smalltalk.withContext(function($ctx1) { self["@selectorsCache"]=_st((smalltalk.Dictionary || Dictionary))._new();
  688. return self}, function($ctx1) {$ctx1.fill(self,"flushSelectorsCache",{}, smalltalk.HLMethodsListWidget)})},
  689. messageSends: ["new"]}),
  690. smalltalk.HLMethodsListWidget);
  691. smalltalk.addMethod(
  692. "_iconForItem_",
  693. smalltalk.method({
  694. selector: "iconForItem:",
  695. fn: function (aSelector){
  696. var self=this;
  697. var override,overriden,method;
  698. return smalltalk.withContext(function($ctx1) { var $2,$3,$4,$1;
  699. method=_st(self)._methodForSelector_(aSelector);
  700. override=_st(self)._isOverride_(method);
  701. overriden=_st(self)._isOverridden_(method);
  702. $2=override;
  703. if(smalltalk.assert($2)){
  704. $3=overriden;
  705. if(smalltalk.assert($3)){
  706. $1="icon-resize-vertical";
  707. } else {
  708. $1="icon-arrow-up";
  709. };
  710. } else {
  711. $4=overriden;
  712. if(smalltalk.assert($4)){
  713. $1="icon-arrow-down";
  714. } else {
  715. $1="icon-none";
  716. };
  717. };
  718. return $1;
  719. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{aSelector:aSelector,override:override,overriden:overriden,method:method}, smalltalk.HLMethodsListWidget)})},
  720. messageSends: ["methodForSelector:", "isOverride:", "isOverridden:", "ifTrue:ifFalse:"]}),
  721. smalltalk.HLMethodsListWidget);
  722. smalltalk.addMethod(
  723. "_initialize",
  724. smalltalk.method({
  725. selector: "initialize",
  726. fn: function (){
  727. var self=this;
  728. return smalltalk.withContext(function($ctx1) { smalltalk.HLBrowserListWidget.fn.prototype._initialize.apply(_st(self), []);
  729. _st(self)._flushSelectorsCache();
  730. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLMethodsListWidget)})},
  731. messageSends: ["initialize", "flushSelectorsCache"]}),
  732. smalltalk.HLMethodsListWidget);
  733. smalltalk.addMethod(
  734. "_isOverridden_",
  735. smalltalk.method({
  736. selector: "isOverridden:",
  737. fn: function (aMethod){
  738. var self=this;
  739. return smalltalk.withContext(function($ctx1) { var $1;
  740. $1=_st(_st(self)._selectorsCache())._isOverridden_(aMethod);
  741. return $1;
  742. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  743. messageSends: ["isOverridden:", "selectorsCache"]}),
  744. smalltalk.HLMethodsListWidget);
  745. smalltalk.addMethod(
  746. "_isOverride_",
  747. smalltalk.method({
  748. selector: "isOverride:",
  749. fn: function (aMethod){
  750. var self=this;
  751. return smalltalk.withContext(function($ctx1) { var $1;
  752. $1=_st(_st(self)._selectorsCache())._isOverride_(aMethod);
  753. return $1;
  754. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  755. messageSends: ["isOverride:", "selectorsCache"]}),
  756. smalltalk.HLMethodsListWidget);
  757. smalltalk.addMethod(
  758. "_methodForSelector_",
  759. smalltalk.method({
  760. selector: "methodForSelector:",
  761. fn: function (aSelector){
  762. var self=this;
  763. return smalltalk.withContext(function($ctx1) { var $1;
  764. $1=_st(_st(_st(_st(self)._model())._selectedClass())._methodDictionary())._at_(aSelector);
  765. return $1;
  766. }, function($ctx1) {$ctx1.fill(self,"methodForSelector:",{aSelector:aSelector}, smalltalk.HLMethodsListWidget)})},
  767. messageSends: ["at:", "methodDictionary", "selectedClass", "model"]}),
  768. smalltalk.HLMethodsListWidget);
  769. smalltalk.addMethod(
  770. "_methodsInProtocol_",
  771. smalltalk.method({
  772. selector: "methodsInProtocol:",
  773. fn: function (aString){
  774. var self=this;
  775. return smalltalk.withContext(function($ctx1) { var $1,$3,$2;
  776. $1=_st(_st(self)._model())._selectedClass();
  777. if(($receiver = $1) == nil || $receiver == undefined){
  778. return [];
  779. } else {
  780. $1;
  781. };
  782. $3=_st(aString).__eq(_st(self)._allProtocol());
  783. if(smalltalk.assert($3)){
  784. $2=_st(_st(_st(self)._model())._selectedClass())._methods();
  785. } else {
  786. $2=_st(_st(_st(self)._model())._selectedClass())._methodsInProtocol_(aString);
  787. };
  788. return $2;
  789. }, function($ctx1) {$ctx1.fill(self,"methodsInProtocol:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  790. messageSends: ["ifNil:", "selectedClass", "model", "ifTrue:ifFalse:", "methods", "methodsInProtocol:", "=", "allProtocol"]}),
  791. smalltalk.HLMethodsListWidget);
  792. smalltalk.addMethod(
  793. "_observeModel",
  794. smalltalk.method({
  795. selector: "observeModel",
  796. fn: function (){
  797. var self=this;
  798. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  799. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  800. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  801. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  802. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(nil);
  803. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  804. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLMethodSelected || HLMethodSelected),(function(ann){
  805. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodSelected_(_st(ann)._item());
  806. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  807. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLMethodsListWidget)})},
  808. messageSends: ["on:do:", "onProtocolSelected:", "item", "announcer", "model", "onMethodSelected:"]}),
  809. smalltalk.HLMethodsListWidget);
  810. smalltalk.addMethod(
  811. "_observeSystem",
  812. smalltalk.method({
  813. selector: "observeSystem",
  814. fn: function (){
  815. var self=this;
  816. return smalltalk.withContext(function($ctx1) { var $1,$2;
  817. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  818. _st($1)._on_do_((smalltalk.MethodAdded || MethodAdded),(function(ann){
  819. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodAdded_(_st(ann)._method());
  820. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  821. $2=_st($1)._on_do_((smalltalk.MethodRemoved || MethodRemoved),(function(ann){
  822. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodRemoved_(_st(ann)._method());
  823. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  824. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLMethodsListWidget)})},
  825. messageSends: ["on:do:", "onMethodAdded:", "method", "current", "onMethodRemoved:"]}),
  826. smalltalk.HLMethodsListWidget);
  827. smalltalk.addMethod(
  828. "_onMethodAdded_",
  829. smalltalk.method({
  830. selector: "onMethodAdded:",
  831. fn: function (aMethod){
  832. var self=this;
  833. return smalltalk.withContext(function($ctx1) { var $1,$2;
  834. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(aMethod)._methodClass());
  835. if(! smalltalk.assert($1)){
  836. $2=self;
  837. return $2;
  838. };
  839. _st(self)._setItemsForSelectedProtocol();
  840. _st(self)._refresh();
  841. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  842. messageSends: ["ifFalse:", "=", "methodClass", "selectedClass", "model", "setItemsForSelectedProtocol", "refresh"]}),
  843. smalltalk.HLMethodsListWidget);
  844. smalltalk.addMethod(
  845. "_onMethodRemoved_",
  846. smalltalk.method({
  847. selector: "onMethodRemoved:",
  848. fn: function (aMethod){
  849. var self=this;
  850. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  851. var $early={};
  852. try {
  853. _st(_st(self)._items())._detect_ifNone_((function(each){
  854. return smalltalk.withContext(function($ctx2) { return _st(each).__eq(_st(aMethod)._selector());
  855. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  856. return smalltalk.withContext(function($ctx2) { $1=self;
  857. throw $early=[$1];
  858. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  859. $2=_st(self)._selectedItem();
  860. if(($receiver = $2) == nil || $receiver == undefined){
  861. $2;
  862. } else {
  863. $3=_st(_st(_st(aMethod)._methodClass()).__eq(_st(_st(self)._model())._selectedClass()))._and_((function(){
  864. return smalltalk.withContext(function($ctx2) { return _st(_st(aMethod)._selector()).__eq(_st(_st(self)._selectedItem())._selector());
  865. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  866. if(smalltalk.assert($3)){
  867. _st(self)._selectItem_(nil);
  868. };
  869. };
  870. _st(self)._setItemsForSelectedProtocol();
  871. _st(self)._refresh();
  872. return self}
  873. catch(e) {if(e===$early)return e[0]; throw e}
  874. }, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  875. messageSends: ["detect:ifNone:", "=", "selector", "items", "ifNotNil:", "ifTrue:", "selectItem:", "and:", "selectedItem", "selectedClass", "model", "methodClass", "setItemsForSelectedProtocol", "refresh"]}),
  876. smalltalk.HLMethodsListWidget);
  877. smalltalk.addMethod(
  878. "_onMethodSelected_",
  879. smalltalk.method({
  880. selector: "onMethodSelected:",
  881. fn: function (aMethod){
  882. var self=this;
  883. return smalltalk.withContext(function($ctx1) { var $1,$2;
  884. _st(self)._selectedItem_(aMethod);
  885. $1=aMethod;
  886. if(($receiver = $1) == nil || $receiver == undefined){
  887. $2=self;
  888. return $2;
  889. } else {
  890. $1;
  891. };
  892. _st(self)._focus();
  893. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  894. messageSends: ["selectedItem:", "ifNil:", "focus"]}),
  895. smalltalk.HLMethodsListWidget);
  896. smalltalk.addMethod(
  897. "_onProtocolSelected_",
  898. smalltalk.method({
  899. selector: "onProtocolSelected:",
  900. fn: function (aString){
  901. var self=this;
  902. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(nil);
  903. _st(self)._setItemsForSelectedProtocol();
  904. _st(self)._refresh();
  905. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  906. messageSends: ["selectedItem:", "setItemsForSelectedProtocol", "refresh"]}),
  907. smalltalk.HLMethodsListWidget);
  908. smalltalk.addMethod(
  909. "_overrideSelectors",
  910. smalltalk.method({
  911. selector: "overrideSelectors",
  912. fn: function (){
  913. var self=this;
  914. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  915. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("override",(function(){
  916. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(_st(self)._model())._selectedClass())._allSuperclasses())._inject_into_(_st((smalltalk.Set || Set))._new(),(function(acc,each){
  917. return smalltalk.withContext(function($ctx3) { $2=acc;
  918. _st($2)._addAll_(_st(each)._selectors());
  919. $3=_st($2)._yourself();
  920. return $3;
  921. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  922. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  923. return $1;
  924. }, function($ctx1) {$ctx1.fill(self,"overrideSelectors",{}, smalltalk.HLMethodsListWidget)})},
  925. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSuperclasses", "selectedClass", "model", "selectorsCache"]}),
  926. smalltalk.HLMethodsListWidget);
  927. smalltalk.addMethod(
  928. "_overridenSelectors",
  929. smalltalk.method({
  930. selector: "overridenSelectors",
  931. fn: function (){
  932. var self=this;
  933. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  934. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("overriden",(function(){
  935. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(_st(self)._model())._selectedClass())._allSubclasses())._inject_into_(_st((smalltalk.Set || Set))._new(),(function(acc,each){
  936. return smalltalk.withContext(function($ctx3) { $2=acc;
  937. _st($2)._addAll_(_st(each)._selectors());
  938. $3=_st($2)._yourself();
  939. return $3;
  940. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  941. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  942. return $1;
  943. }, function($ctx1) {$ctx1.fill(self,"overridenSelectors",{}, smalltalk.HLMethodsListWidget)})},
  944. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSubclasses", "selectedClass", "model", "selectorsCache"]}),
  945. smalltalk.HLMethodsListWidget);
  946. smalltalk.addMethod(
  947. "_renderContentOn_",
  948. smalltalk.method({
  949. selector: "renderContentOn:",
  950. fn: function (html){
  951. var self=this;
  952. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  953. $1=_st(_st(self)._model())._showInstance();
  954. if(smalltalk.assert($1)){
  955. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  956. } else {
  957. $2=_st(html)._div();
  958. _st($2)._class_("class_side");
  959. $3=_st($2)._with_((function(){
  960. return smalltalk.withContext(function($ctx2) { return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  961. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  962. $3;
  963. };
  964. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLMethodsListWidget)})},
  965. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"]}),
  966. smalltalk.HLMethodsListWidget);
  967. smalltalk.addMethod(
  968. "_renderItemLabel_on_",
  969. smalltalk.method({
  970. selector: "renderItemLabel:on:",
  971. fn: function (aSelector,html){
  972. var self=this;
  973. return smalltalk.withContext(function($ctx1) { _st(html)._with_(aSelector);
  974. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aSelector:aSelector,html:html}, smalltalk.HLMethodsListWidget)})},
  975. messageSends: ["with:"]}),
  976. smalltalk.HLMethodsListWidget);
  977. smalltalk.addMethod(
  978. "_selectItem_",
  979. smalltalk.method({
  980. selector: "selectItem:",
  981. fn: function (aSelector){
  982. var self=this;
  983. return smalltalk.withContext(function($ctx1) { var $1,$2;
  984. $1=aSelector;
  985. if(($receiver = $1) == nil || $receiver == undefined){
  986. $2=_st(_st(self)._model())._selectedMethod_(nil);
  987. return $2;
  988. } else {
  989. $1;
  990. };
  991. _st(_st(self)._model())._selectedMethod_(_st(self)._methodForSelector_(aSelector));
  992. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aSelector:aSelector}, smalltalk.HLMethodsListWidget)})},
  993. messageSends: ["ifNil:", "selectedMethod:", "model", "methodForSelector:"]}),
  994. smalltalk.HLMethodsListWidget);
  995. smalltalk.addMethod(
  996. "_selectorsCache",
  997. smalltalk.method({
  998. selector: "selectorsCache",
  999. fn: function (){
  1000. var self=this;
  1001. return smalltalk.withContext(function($ctx1) { var $1;
  1002. $1=_st(_st(self)._class())._selectorsCache();
  1003. return $1;
  1004. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLMethodsListWidget)})},
  1005. messageSends: ["selectorsCache", "class"]}),
  1006. smalltalk.HLMethodsListWidget);
  1007. smalltalk.addMethod(
  1008. "_selectorsInProtocol_",
  1009. smalltalk.method({
  1010. selector: "selectorsInProtocol:",
  1011. fn: function (aString){
  1012. var self=this;
  1013. return smalltalk.withContext(function($ctx1) { var $1;
  1014. $1=_st(_st(self)._methodsInProtocol_(aString))._collect_((function(each){
  1015. return smalltalk.withContext(function($ctx2) { return _st(each)._selector();
  1016. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1017. return $1;
  1018. }, function($ctx1) {$ctx1.fill(self,"selectorsInProtocol:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  1019. messageSends: ["collect:", "selector", "methodsInProtocol:"]}),
  1020. smalltalk.HLMethodsListWidget);
  1021. smalltalk.addMethod(
  1022. "_setItemsForProtocol_",
  1023. smalltalk.method({
  1024. selector: "setItemsForProtocol:",
  1025. fn: function (aString){
  1026. var self=this;
  1027. return smalltalk.withContext(function($ctx1) { var $2,$4,$3,$1;
  1028. $2=self;
  1029. $4=aString;
  1030. if(($receiver = $4) == nil || $receiver == undefined){
  1031. $3=[];
  1032. } else {
  1033. $3=_st(self)._selectorsInProtocol_(aString);
  1034. };
  1035. $1=_st($2)._items_($3);
  1036. return $1;
  1037. }, function($ctx1) {$ctx1.fill(self,"setItemsForProtocol:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  1038. messageSends: ["items:", "ifNil:ifNotNil:", "selectorsInProtocol:"]}),
  1039. smalltalk.HLMethodsListWidget);
  1040. smalltalk.addMethod(
  1041. "_setItemsForSelectedProtocol",
  1042. smalltalk.method({
  1043. selector: "setItemsForSelectedProtocol",
  1044. fn: function (){
  1045. var self=this;
  1046. return smalltalk.withContext(function($ctx1) { _st(self)._setItemsForProtocol_(_st(_st(self)._model())._selectedProtocol());
  1047. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedProtocol",{}, smalltalk.HLMethodsListWidget)})},
  1048. messageSends: ["setItemsForProtocol:", "selectedProtocol", "model"]}),
  1049. smalltalk.HLMethodsListWidget);
  1050. smalltalk.HLMethodsListWidget.klass.iVarNames = ['selectorsCache'];
  1051. smalltalk.addMethod(
  1052. "_selectorsCache",
  1053. smalltalk.method({
  1054. selector: "selectorsCache",
  1055. fn: function (){
  1056. var self=this;
  1057. return smalltalk.withContext(function($ctx1) { var $1;
  1058. $1=_st((smalltalk.HLSelectorsCache || HLSelectorsCache))._current();
  1059. return $1;
  1060. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLMethodsListWidget.klass)})},
  1061. messageSends: ["current"]}),
  1062. smalltalk.HLMethodsListWidget.klass);
  1063. smalltalk.addClass('HLPackagesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1064. smalltalk.addMethod(
  1065. "_focusClassesListWidget",
  1066. smalltalk.method({
  1067. selector: "focusClassesListWidget",
  1068. fn: function (){
  1069. var self=this;
  1070. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._announce_(_st((smalltalk.HLClassesListFocus || HLClassesListFocus))._new());
  1071. return self}, function($ctx1) {$ctx1.fill(self,"focusClassesListWidget",{}, smalltalk.HLPackagesListWidget)})},
  1072. messageSends: ["announce:", "new", "announcer", "model"]}),
  1073. smalltalk.HLPackagesListWidget);
  1074. smalltalk.addMethod(
  1075. "_initializeItems",
  1076. smalltalk.method({
  1077. selector: "initializeItems",
  1078. fn: function (){
  1079. var self=this;
  1080. return smalltalk.withContext(function($ctx1) { var $1;
  1081. self["@items"]=_st(_st(_st(self)._model())._packages())._sort_((function(a,b){
  1082. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._name()).__lt(_st(b)._name());
  1083. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  1084. $1=self["@items"];
  1085. return $1;
  1086. }, function($ctx1) {$ctx1.fill(self,"initializeItems",{}, smalltalk.HLPackagesListWidget)})},
  1087. messageSends: ["sort:", "<", "name", "packages", "model"]}),
  1088. smalltalk.HLPackagesListWidget);
  1089. smalltalk.addMethod(
  1090. "_items",
  1091. smalltalk.method({
  1092. selector: "items",
  1093. fn: function (){
  1094. var self=this;
  1095. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1096. $2=self["@items"];
  1097. if(($receiver = $2) == nil || $receiver == undefined){
  1098. $1=_st(self)._initializeItems();
  1099. } else {
  1100. $1=$2;
  1101. };
  1102. return $1;
  1103. }, function($ctx1) {$ctx1.fill(self,"items",{}, smalltalk.HLPackagesListWidget)})},
  1104. messageSends: ["ifNil:", "initializeItems"]}),
  1105. smalltalk.HLPackagesListWidget);
  1106. smalltalk.addMethod(
  1107. "_observeModel",
  1108. smalltalk.method({
  1109. selector: "observeModel",
  1110. fn: function (){
  1111. var self=this;
  1112. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLPackageSelected || HLPackageSelected),(function(ann){
  1113. return smalltalk.withContext(function($ctx2) { return _st(self)._onPackageSelected_(_st(ann)._item());
  1114. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1115. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLPackagesListWidget)})},
  1116. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model"]}),
  1117. smalltalk.HLPackagesListWidget);
  1118. smalltalk.addMethod(
  1119. "_onPackageSelected_",
  1120. smalltalk.method({
  1121. selector: "onPackageSelected:",
  1122. fn: function (aPackage){
  1123. var self=this;
  1124. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(aPackage);
  1125. _st(self)._focus();
  1126. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{aPackage:aPackage}, smalltalk.HLPackagesListWidget)})},
  1127. messageSends: ["selectedItem:", "focus"]}),
  1128. smalltalk.HLPackagesListWidget);
  1129. smalltalk.addMethod(
  1130. "_renderButtonsOn_",
  1131. smalltalk.method({
  1132. selector: "renderButtonsOn:",
  1133. fn: function (html){
  1134. var self=this;
  1135. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$5,$6,$7,$8,$4,$9,$10;
  1136. $1=_st(html)._span();
  1137. _st($1)._class_("info");
  1138. $2=_st($1)._with_("Auto commit");
  1139. $3=_st(html)._div();
  1140. _st($3)._class_("btn-group switch");
  1141. _st($3)._at_put_("data-toggle","buttons-radio");
  1142. $4=_st($3)._with_((function(){
  1143. return smalltalk.withContext(function($ctx2) { $5=_st(html)._button();
  1144. _st($5)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  1145. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("btn");
  1146. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1147. $6=_st($5)._with_("On");
  1148. $6;
  1149. $7=_st(html)._button();
  1150. _st($7)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  1151. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("btn active");
  1152. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1153. $8=_st($7)._with_("Off");
  1154. return $8;
  1155. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1156. $9=_st(html)._a();
  1157. _st($9)._class_("btn");
  1158. $10=_st($9)._with_("Commit");
  1159. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.HLPackagesListWidget)})},
  1160. messageSends: ["class:", "span", "with:", "div", "at:put:", "streamContents:", "nextPutAll:", "button", "a"]}),
  1161. smalltalk.HLPackagesListWidget);
  1162. smalltalk.addMethod(
  1163. "_selectItem_",
  1164. smalltalk.method({
  1165. selector: "selectItem:",
  1166. fn: function (aPackage){
  1167. var self=this;
  1168. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedPackage_(aPackage);
  1169. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aPackage:aPackage}, smalltalk.HLPackagesListWidget)})},
  1170. messageSends: ["selectedPackage:", "model"]}),
  1171. smalltalk.HLPackagesListWidget);
  1172. smalltalk.addClass('HLProtocolsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1173. smalltalk.addMethod(
  1174. "_allProtocol",
  1175. smalltalk.method({
  1176. selector: "allProtocol",
  1177. fn: function (){
  1178. var self=this;
  1179. return smalltalk.withContext(function($ctx1) { var $1;
  1180. $1=_st(_st(self)._model())._allProtocol();
  1181. return $1;
  1182. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLProtocolsListWidget)})},
  1183. messageSends: ["allProtocol", "model"]}),
  1184. smalltalk.HLProtocolsListWidget);
  1185. smalltalk.addMethod(
  1186. "_observeModel",
  1187. smalltalk.method({
  1188. selector: "observeModel",
  1189. fn: function (){
  1190. var self=this;
  1191. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  1192. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  1193. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1194. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  1195. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(_st(self)._model())._selectedClass());
  1196. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1197. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  1198. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  1199. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1200. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLProtocolsListWidget)})},
  1201. messageSends: ["on:do:", "onClassSelected:", "item", "announcer", "model", "selectedClass", "onProtocolSelected:"]}),
  1202. smalltalk.HLProtocolsListWidget);
  1203. smalltalk.addMethod(
  1204. "_observeSystem",
  1205. smalltalk.method({
  1206. selector: "observeSystem",
  1207. fn: function (){
  1208. var self=this;
  1209. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1210. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  1211. _st($1)._on_do_((smalltalk.ProtocolAdded || ProtocolAdded),(function(ann){
  1212. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolAdded_to_(_st(ann)._protocol(),_st(ann)._theClass());
  1213. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1214. $2=_st($1)._on_do_((smalltalk.ProtocolRemoved || ProtocolRemoved),(function(ann){
  1215. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolRemoved_from_(_st(ann)._protocol(),_st(ann)._theClass());
  1216. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1217. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLProtocolsListWidget)})},
  1218. messageSends: ["on:do:", "onProtocolAdded:to:", "protocol", "theClass", "current", "onProtocolRemoved:from:"]}),
  1219. smalltalk.HLProtocolsListWidget);
  1220. smalltalk.addMethod(
  1221. "_onClassSelected_",
  1222. smalltalk.method({
  1223. selector: "onClassSelected:",
  1224. fn: function (aClass){
  1225. var self=this;
  1226. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(nil);
  1227. _st(self)._setItemsForSelectedClass();
  1228. _st(self)._refresh();
  1229. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLProtocolsListWidget)})},
  1230. messageSends: ["selectedItem:", "setItemsForSelectedClass", "refresh"]}),
  1231. smalltalk.HLProtocolsListWidget);
  1232. smalltalk.addMethod(
  1233. "_onProtocolAdded_to_",
  1234. smalltalk.method({
  1235. selector: "onProtocolAdded:to:",
  1236. fn: function (aString,aClass){
  1237. var self=this;
  1238. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1239. $1=_st(aClass).__eq(_st(_st(self)._model())._selectedClass());
  1240. if(! smalltalk.assert($1)){
  1241. $2=self;
  1242. return $2;
  1243. };
  1244. _st(self)._setItemsForSelectedClass();
  1245. _st(self)._refresh();
  1246. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolAdded:to:",{aString:aString,aClass:aClass}, smalltalk.HLProtocolsListWidget)})},
  1247. messageSends: ["ifFalse:", "=", "selectedClass", "model", "setItemsForSelectedClass", "refresh"]}),
  1248. smalltalk.HLProtocolsListWidget);
  1249. smalltalk.addMethod(
  1250. "_onProtocolRemoved_from_",
  1251. smalltalk.method({
  1252. selector: "onProtocolRemoved:from:",
  1253. fn: function (aString,aClass){
  1254. var self=this;
  1255. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1256. $1=_st(aClass).__eq(_st(_st(self)._model())._selectedClass());
  1257. if(! smalltalk.assert($1)){
  1258. $2=self;
  1259. return $2;
  1260. };
  1261. $3=_st(_st(_st(self)._model())._selectedProtocol()).__eq(aString);
  1262. if(smalltalk.assert($3)){
  1263. _st(self)._selectItem_(nil);
  1264. };
  1265. _st(self)._setItemsForSelectedClass();
  1266. _st(self)._refresh();
  1267. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolRemoved:from:",{aString:aString,aClass:aClass}, smalltalk.HLProtocolsListWidget)})},
  1268. messageSends: ["ifFalse:", "=", "selectedClass", "model", "ifTrue:", "selectItem:", "selectedProtocol", "setItemsForSelectedClass", "refresh"]}),
  1269. smalltalk.HLProtocolsListWidget);
  1270. smalltalk.addMethod(
  1271. "_onProtocolSelected_",
  1272. smalltalk.method({
  1273. selector: "onProtocolSelected:",
  1274. fn: function (aString){
  1275. var self=this;
  1276. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1277. _st(self)._selectedItem_(aString);
  1278. $1=aString;
  1279. if(($receiver = $1) == nil || $receiver == undefined){
  1280. $2=self;
  1281. return $2;
  1282. } else {
  1283. $1;
  1284. };
  1285. _st(self)._focus();
  1286. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLProtocolsListWidget)})},
  1287. messageSends: ["selectedItem:", "ifNil:", "focus"]}),
  1288. smalltalk.HLProtocolsListWidget);
  1289. smalltalk.addMethod(
  1290. "_renderContentOn_",
  1291. smalltalk.method({
  1292. selector: "renderContentOn:",
  1293. fn: function (html){
  1294. var self=this;
  1295. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1296. $1=_st(_st(self)._model())._showInstance();
  1297. if(smalltalk.assert($1)){
  1298. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1299. } else {
  1300. $2=_st(html)._div();
  1301. _st($2)._class_("class_side");
  1302. $3=_st($2)._with_((function(){
  1303. return smalltalk.withContext(function($ctx2) { return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1304. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1305. $3;
  1306. };
  1307. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLProtocolsListWidget)})},
  1308. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"]}),
  1309. smalltalk.HLProtocolsListWidget);
  1310. smalltalk.addMethod(
  1311. "_selectItem_",
  1312. smalltalk.method({
  1313. selector: "selectItem:",
  1314. fn: function (aString){
  1315. var self=this;
  1316. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedProtocol_(aString);
  1317. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aString:aString}, smalltalk.HLProtocolsListWidget)})},
  1318. messageSends: ["selectedProtocol:", "model"]}),
  1319. smalltalk.HLProtocolsListWidget);
  1320. smalltalk.addMethod(
  1321. "_selectedItem",
  1322. smalltalk.method({
  1323. selector: "selectedItem",
  1324. fn: function (){
  1325. var self=this;
  1326. return smalltalk.withContext(function($ctx1) { var $1;
  1327. $1=smalltalk.HLBrowserListWidget.fn.prototype._selectedItem.apply(_st(self), []);
  1328. return $1;
  1329. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{}, smalltalk.HLProtocolsListWidget)})},
  1330. messageSends: ["selectedItem"]}),
  1331. smalltalk.HLProtocolsListWidget);
  1332. smalltalk.addMethod(
  1333. "_setItemsForClass_",
  1334. smalltalk.method({
  1335. selector: "setItemsForClass:",
  1336. fn: function (aClass){
  1337. var self=this;
  1338. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$2;
  1339. $1=self;
  1340. $3=aClass;
  1341. if(($receiver = $3) == nil || $receiver == undefined){
  1342. $2=_st((smalltalk.Array || Array))._with_(_st(self)._allProtocol());
  1343. } else {
  1344. $4=_st((smalltalk.Array || Array))._with_(_st(self)._allProtocol());
  1345. _st($4)._addAll_(_st(aClass)._protocols());
  1346. $5=_st($4)._yourself();
  1347. $2=$5;
  1348. };
  1349. _st($1)._items_($2);
  1350. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForClass:",{aClass:aClass}, smalltalk.HLProtocolsListWidget)})},
  1351. messageSends: ["items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself"]}),
  1352. smalltalk.HLProtocolsListWidget);
  1353. smalltalk.addMethod(
  1354. "_setItemsForSelectedClass",
  1355. smalltalk.method({
  1356. selector: "setItemsForSelectedClass",
  1357. fn: function (){
  1358. var self=this;
  1359. return smalltalk.withContext(function($ctx1) { _st(self)._setItemsForClass_(_st(_st(self)._model())._selectedClass());
  1360. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedClass",{}, smalltalk.HLProtocolsListWidget)})},
  1361. messageSends: ["setItemsForClass:", "selectedClass", "model"]}),
  1362. smalltalk.HLProtocolsListWidget);
  1363. smalltalk.addClass('HLBrowserModel', smalltalk.Object, ['announcer', 'environment', 'selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedSelector', 'showInstance', 'showComment'], 'Helios-Browser');
  1364. smalltalk.addMethod(
  1365. "_allProtocol",
  1366. smalltalk.method({
  1367. selector: "allProtocol",
  1368. fn: function (){
  1369. var self=this;
  1370. return smalltalk.withContext(function($ctx1) { return "-- All --";
  1371. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLBrowserModel)})},
  1372. messageSends: []}),
  1373. smalltalk.HLBrowserModel);
  1374. smalltalk.addMethod(
  1375. "_announcer",
  1376. smalltalk.method({
  1377. selector: "announcer",
  1378. fn: function (){
  1379. var self=this;
  1380. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1381. $2=self["@announcer"];
  1382. if(($receiver = $2) == nil || $receiver == undefined){
  1383. self["@announcer"]=_st((smalltalk.Announcer || Announcer))._new();
  1384. $1=self["@announcer"];
  1385. } else {
  1386. $1=$2;
  1387. };
  1388. return $1;
  1389. }, function($ctx1) {$ctx1.fill(self,"announcer",{}, smalltalk.HLBrowserModel)})},
  1390. messageSends: ["ifNil:", "new"]}),
  1391. smalltalk.HLBrowserModel);
  1392. smalltalk.addMethod(
  1393. "_environment",
  1394. smalltalk.method({
  1395. selector: "environment",
  1396. fn: function (){
  1397. var self=this;
  1398. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1399. $2=self["@environment"];
  1400. if(($receiver = $2) == nil || $receiver == undefined){
  1401. $1=_st(_st((smalltalk.HLManager || HLManager))._current())._environment();
  1402. } else {
  1403. $1=$2;
  1404. };
  1405. return $1;
  1406. }, function($ctx1) {$ctx1.fill(self,"environment",{}, smalltalk.HLBrowserModel)})},
  1407. messageSends: ["ifNil:", "environment", "current"]}),
  1408. smalltalk.HLBrowserModel);
  1409. smalltalk.addMethod(
  1410. "_environment_",
  1411. smalltalk.method({
  1412. selector: "environment:",
  1413. fn: function (anEnvironment){
  1414. var self=this;
  1415. return smalltalk.withContext(function($ctx1) { self["@environment"]=anEnvironment;
  1416. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel)})},
  1417. messageSends: []}),
  1418. smalltalk.HLBrowserModel);
  1419. smalltalk.addMethod(
  1420. "_packages",
  1421. smalltalk.method({
  1422. selector: "packages",
  1423. fn: function (){
  1424. var self=this;
  1425. return smalltalk.withContext(function($ctx1) { var $1;
  1426. $1=_st(_st(self)._environment())._packages();
  1427. return $1;
  1428. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLBrowserModel)})},
  1429. messageSends: ["packages", "environment"]}),
  1430. smalltalk.HLBrowserModel);
  1431. smalltalk.addMethod(
  1432. "_selectedClass",
  1433. smalltalk.method({
  1434. selector: "selectedClass",
  1435. fn: function (){
  1436. var self=this;
  1437. return smalltalk.withContext(function($ctx1) { var $1;
  1438. $1=self["@selectedClass"];
  1439. return $1;
  1440. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{}, smalltalk.HLBrowserModel)})},
  1441. messageSends: []}),
  1442. smalltalk.HLBrowserModel);
  1443. smalltalk.addMethod(
  1444. "_selectedClass_",
  1445. smalltalk.method({
  1446. selector: "selectedClass:",
  1447. fn: function (aClass){
  1448. var self=this;
  1449. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  1450. $1=_st(self["@selectedClass"]).__eq(aClass);
  1451. if(smalltalk.assert($1)){
  1452. $2=self;
  1453. return $2;
  1454. };
  1455. $3=aClass;
  1456. if(($receiver = $3) == nil || $receiver == undefined){
  1457. self["@selectedClass"]=nil;
  1458. self["@selectedClass"];
  1459. } else {
  1460. $4=_st(self)._showInstance();
  1461. if(smalltalk.assert($4)){
  1462. self["@selectedClass"]=_st(aClass)._theNonMetaClass();
  1463. self["@selectedClass"];
  1464. } else {
  1465. self["@selectedClass"]=_st(aClass)._theMetaClass();
  1466. self["@selectedClass"];
  1467. };
  1468. };
  1469. _st(self)._selectedProtocol_(nil);
  1470. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLClassSelected || HLClassSelected))._on_(_st(self)._selectedClass()));
  1471. return self}, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass}, smalltalk.HLBrowserModel)})},
  1472. messageSends: ["ifTrue:", "=", "ifNil:ifNotNil:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "showInstance", "selectedProtocol:", "announce:", "on:", "selectedClass", "announcer"]}),
  1473. smalltalk.HLBrowserModel);
  1474. smalltalk.addMethod(
  1475. "_selectedMethod",
  1476. smalltalk.method({
  1477. selector: "selectedMethod",
  1478. fn: function (){
  1479. var self=this;
  1480. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1481. $2=_st(self)._selectedClass();
  1482. if(($receiver = $2) == nil || $receiver == undefined){
  1483. $1=$2;
  1484. } else {
  1485. $1=_st(_st(_st(self)._selectedClass())._methodDictionary())._at_(self["@selectedSelector"]);
  1486. };
  1487. return $1;
  1488. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{}, smalltalk.HLBrowserModel)})},
  1489. messageSends: ["ifNotNil:", "at:", "methodDictionary", "selectedClass"]}),
  1490. smalltalk.HLBrowserModel);
  1491. smalltalk.addMethod(
  1492. "_selectedMethod_",
  1493. smalltalk.method({
  1494. selector: "selectedMethod:",
  1495. fn: function (aCompiledMethod){
  1496. var self=this;
  1497. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  1498. $1=_st(self["@selectedSelector"]).__eq(aCompiledMethod);
  1499. if(smalltalk.assert($1)){
  1500. $2=self;
  1501. return $2;
  1502. };
  1503. $3=aCompiledMethod;
  1504. if(($receiver = $3) == nil || $receiver == undefined){
  1505. self["@selectedSelector"]=nil;
  1506. self["@selectedSelector"];
  1507. } else {
  1508. $4=_st(self["@selectedSelector"]).__eq(_st(aCompiledMethod)._selector());
  1509. if(smalltalk.assert($4)){
  1510. $5=self;
  1511. return $5;
  1512. };
  1513. self["@selectedSelector"]=_st(aCompiledMethod)._selector();
  1514. self["@selectedSelector"];
  1515. };
  1516. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLMethodSelected || HLMethodSelected))._on_(aCompiledMethod));
  1517. return self}, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserModel)})},
  1518. messageSends: ["ifTrue:", "=", "ifNil:ifNotNil:", "selector", "announce:", "on:", "announcer"]}),
  1519. smalltalk.HLBrowserModel);
  1520. smalltalk.addMethod(
  1521. "_selectedPackage",
  1522. smalltalk.method({
  1523. selector: "selectedPackage",
  1524. fn: function (){
  1525. var self=this;
  1526. return smalltalk.withContext(function($ctx1) { var $1;
  1527. $1=self["@selectedPackage"];
  1528. return $1;
  1529. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{}, smalltalk.HLBrowserModel)})},
  1530. messageSends: []}),
  1531. smalltalk.HLBrowserModel);
  1532. smalltalk.addMethod(
  1533. "_selectedPackage_",
  1534. smalltalk.method({
  1535. selector: "selectedPackage:",
  1536. fn: function (aPackage){
  1537. var self=this;
  1538. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1539. $1=_st(self["@selectedPackage"]).__eq(aPackage);
  1540. if(smalltalk.assert($1)){
  1541. $2=self;
  1542. return $2;
  1543. };
  1544. self["@selectedPackage"]=aPackage;
  1545. _st(self)._selectedClass_(nil);
  1546. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLPackageSelected || HLPackageSelected))._on_(aPackage));
  1547. return self}, function($ctx1) {$ctx1.fill(self,"selectedPackage:",{aPackage:aPackage}, smalltalk.HLBrowserModel)})},
  1548. messageSends: ["ifTrue:", "=", "selectedClass:", "announce:", "on:", "announcer"]}),
  1549. smalltalk.HLBrowserModel);
  1550. smalltalk.addMethod(
  1551. "_selectedProtocol",
  1552. smalltalk.method({
  1553. selector: "selectedProtocol",
  1554. fn: function (){
  1555. var self=this;
  1556. return smalltalk.withContext(function($ctx1) { var $1;
  1557. $1=self["@selectedProtocol"];
  1558. return $1;
  1559. }, function($ctx1) {$ctx1.fill(self,"selectedProtocol",{}, smalltalk.HLBrowserModel)})},
  1560. messageSends: []}),
  1561. smalltalk.HLBrowserModel);
  1562. smalltalk.addMethod(
  1563. "_selectedProtocol_",
  1564. smalltalk.method({
  1565. selector: "selectedProtocol:",
  1566. fn: function (aString){
  1567. var self=this;
  1568. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1569. $1=_st(self["@selectedProtocol"]).__eq(aString);
  1570. if(smalltalk.assert($1)){
  1571. $2=self;
  1572. return $2;
  1573. };
  1574. self["@selectedProtocol"]=aString;
  1575. _st(self)._selectedMethod_(nil);
  1576. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLProtocolSelected || HLProtocolSelected))._on_(aString));
  1577. return self}, function($ctx1) {$ctx1.fill(self,"selectedProtocol:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1578. messageSends: ["ifTrue:", "=", "selectedMethod:", "announce:", "on:", "announcer"]}),
  1579. smalltalk.HLBrowserModel);
  1580. smalltalk.addMethod(
  1581. "_showComment",
  1582. smalltalk.method({
  1583. selector: "showComment",
  1584. fn: function (){
  1585. var self=this;
  1586. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1587. $2=self["@showComment"];
  1588. if(($receiver = $2) == nil || $receiver == undefined){
  1589. $1=false;
  1590. } else {
  1591. $1=$2;
  1592. };
  1593. return $1;
  1594. }, function($ctx1) {$ctx1.fill(self,"showComment",{}, smalltalk.HLBrowserModel)})},
  1595. messageSends: ["ifNil:"]}),
  1596. smalltalk.HLBrowserModel);
  1597. smalltalk.addMethod(
  1598. "_showComment_",
  1599. smalltalk.method({
  1600. selector: "showComment:",
  1601. fn: function (aBoolean){
  1602. var self=this;
  1603. return smalltalk.withContext(function($ctx1) { self["@showComment"]=aBoolean;
  1604. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowCommentToggled || HLShowCommentToggled))._new());
  1605. return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  1606. messageSends: ["announce:", "new", "announcer"]}),
  1607. smalltalk.HLBrowserModel);
  1608. smalltalk.addMethod(
  1609. "_showInstance",
  1610. smalltalk.method({
  1611. selector: "showInstance",
  1612. fn: function (){
  1613. var self=this;
  1614. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1615. $2=self["@showInstance"];
  1616. if(($receiver = $2) == nil || $receiver == undefined){
  1617. $1=true;
  1618. } else {
  1619. $1=$2;
  1620. };
  1621. return $1;
  1622. }, function($ctx1) {$ctx1.fill(self,"showInstance",{}, smalltalk.HLBrowserModel)})},
  1623. messageSends: ["ifNil:"]}),
  1624. smalltalk.HLBrowserModel);
  1625. smalltalk.addMethod(
  1626. "_showInstance_",
  1627. smalltalk.method({
  1628. selector: "showInstance:",
  1629. fn: function (aBoolean){
  1630. var self=this;
  1631. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$3;
  1632. self["@showInstance"]=aBoolean;
  1633. $1=_st(self)._selectedClass();
  1634. if(($receiver = $1) == nil || $receiver == undefined){
  1635. $1;
  1636. } else {
  1637. $2=self;
  1638. $4=aBoolean;
  1639. if(smalltalk.assert($4)){
  1640. $3=_st(_st(self)._selectedClass())._theNonMetaClass();
  1641. } else {
  1642. $3=_st(_st(self)._selectedClass())._theMetaClass();
  1643. };
  1644. _st($2)._selectedClass_($3);
  1645. };
  1646. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled))._new());
  1647. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  1648. messageSends: ["ifNotNil:", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "selectedClass", "theMetaClass", "announce:", "new", "announcer"]}),
  1649. smalltalk.HLBrowserModel);
  1650. smalltalk.addMethod(
  1651. "_on_",
  1652. smalltalk.method({
  1653. selector: "on:",
  1654. fn: function (anEnvironment){
  1655. var self=this;
  1656. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1657. $2=_st(self)._new();
  1658. _st($2)._environment_(anEnvironment);
  1659. $3=_st($2)._yourself();
  1660. $1=$3;
  1661. return $1;
  1662. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel.klass)})},
  1663. messageSends: ["environment:", "new", "yourself"]}),
  1664. smalltalk.HLBrowserModel.klass);
  1665. smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'methodContents', 'codeWidget'], 'Helios-Browser');
  1666. smalltalk.addMethod(
  1667. "_codeWidget",
  1668. smalltalk.method({
  1669. selector: "codeWidget",
  1670. fn: function (){
  1671. var self=this;
  1672. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1673. $2=self["@codeWidget"];
  1674. if(($receiver = $2) == nil || $receiver == undefined){
  1675. self["@codeWidget"]=_st((smalltalk.HLCodeWidget || HLCodeWidget))._new();
  1676. $1=self["@codeWidget"];
  1677. } else {
  1678. $1=$2;
  1679. };
  1680. return $1;
  1681. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{}, smalltalk.HLBrowserSourceWidget)})},
  1682. messageSends: ["ifNil:", "new"]}),
  1683. smalltalk.HLBrowserSourceWidget);
  1684. smalltalk.addMethod(
  1685. "_contents",
  1686. smalltalk.method({
  1687. selector: "contents",
  1688. fn: function (){
  1689. var self=this;
  1690. return smalltalk.withContext(function($ctx1) { var $1;
  1691. $1=_st(_st(self)._codeWidget())._contents();
  1692. return $1;
  1693. }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.HLBrowserSourceWidget)})},
  1694. messageSends: ["contents", "codeWidget"]}),
  1695. smalltalk.HLBrowserSourceWidget);
  1696. smalltalk.addMethod(
  1697. "_contents_",
  1698. smalltalk.method({
  1699. selector: "contents:",
  1700. fn: function (aString){
  1701. var self=this;
  1702. return smalltalk.withContext(function($ctx1) { _st(self)._methodContents_(aString);
  1703. _st(_st(self)._codeWidget())._contents_(aString);
  1704. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  1705. messageSends: ["methodContents:", "contents:", "codeWidget"]}),
  1706. smalltalk.HLBrowserSourceWidget);
  1707. smalltalk.addMethod(
  1708. "_hasModification",
  1709. smalltalk.method({
  1710. selector: "hasModification",
  1711. fn: function (){
  1712. var self=this;
  1713. return smalltalk.withContext(function($ctx1) { var $1;
  1714. $1=_st(_st(_st(self)._methodContents()).__eq(_st(self)._contents()))._not();
  1715. return $1;
  1716. }, function($ctx1) {$ctx1.fill(self,"hasModification",{}, smalltalk.HLBrowserSourceWidget)})},
  1717. messageSends: ["not", "=", "contents", "methodContents"]}),
  1718. smalltalk.HLBrowserSourceWidget);
  1719. smalltalk.addMethod(
  1720. "_initialize",
  1721. smalltalk.method({
  1722. selector: "initialize",
  1723. fn: function (){
  1724. var self=this;
  1725. return smalltalk.withContext(function($ctx1) { smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  1726. _st(self)._observeSystem();
  1727. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLBrowserSourceWidget)})},
  1728. messageSends: ["initialize", "observeSystem"]}),
  1729. smalltalk.HLBrowserSourceWidget);
  1730. smalltalk.addMethod(
  1731. "_methodContents",
  1732. smalltalk.method({
  1733. selector: "methodContents",
  1734. fn: function (){
  1735. var self=this;
  1736. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1737. $2=self["@methodContents"];
  1738. if(($receiver = $2) == nil || $receiver == undefined){
  1739. self["@methodContents"]="";
  1740. $1=self["@methodContents"];
  1741. } else {
  1742. $1=$2;
  1743. };
  1744. return $1;
  1745. }, function($ctx1) {$ctx1.fill(self,"methodContents",{}, smalltalk.HLBrowserSourceWidget)})},
  1746. messageSends: ["ifNil:"]}),
  1747. smalltalk.HLBrowserSourceWidget);
  1748. smalltalk.addMethod(
  1749. "_methodContents_",
  1750. smalltalk.method({
  1751. selector: "methodContents:",
  1752. fn: function (aString){
  1753. var self=this;
  1754. return smalltalk.withContext(function($ctx1) { self["@methodContents"]=aString;
  1755. return self}, function($ctx1) {$ctx1.fill(self,"methodContents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  1756. messageSends: []}),
  1757. smalltalk.HLBrowserSourceWidget);
  1758. smalltalk.addMethod(
  1759. "_model",
  1760. smalltalk.method({
  1761. selector: "model",
  1762. fn: function (){
  1763. var self=this;
  1764. return smalltalk.withContext(function($ctx1) { var $1;
  1765. $1=self["@model"];
  1766. return $1;
  1767. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLBrowserSourceWidget)})},
  1768. messageSends: []}),
  1769. smalltalk.HLBrowserSourceWidget);
  1770. smalltalk.addMethod(
  1771. "_model_",
  1772. smalltalk.method({
  1773. selector: "model:",
  1774. fn: function (aBrowserModel){
  1775. var self=this;
  1776. return smalltalk.withContext(function($ctx1) { self["@model"]=aBrowserModel;
  1777. _st(self)._observeModel();
  1778. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget)})},
  1779. messageSends: ["observeModel"]}),
  1780. smalltalk.HLBrowserSourceWidget);
  1781. smalltalk.addMethod(
  1782. "_observeModel",
  1783. smalltalk.method({
  1784. selector: "observeModel",
  1785. fn: function (){
  1786. var self=this;
  1787. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLMethodSelected || HLMethodSelected),(function(ann){
  1788. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodSelected_(_st(ann)._item());
  1789. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1790. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  1791. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  1792. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1793. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  1794. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  1795. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1796. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLBrowserSourceWidget)})},
  1797. messageSends: ["on:do:", "onMethodSelected:", "item", "announcer", "model", "onClassSelected:", "onProtocolSelected:"]}),
  1798. smalltalk.HLBrowserSourceWidget);
  1799. smalltalk.addMethod(
  1800. "_observeSystem",
  1801. smalltalk.method({
  1802. selector: "observeSystem",
  1803. fn: function (){
  1804. var self=this;
  1805. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._on_do_((smalltalk.MethodModified || MethodModified),(function(ann){
  1806. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodModified_(_st(ann)._method());
  1807. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1808. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLBrowserSourceWidget)})},
  1809. messageSends: ["on:do:", "onMethodModified:", "method", "current"]}),
  1810. smalltalk.HLBrowserSourceWidget);
  1811. smalltalk.addMethod(
  1812. "_onClassSelected_",
  1813. smalltalk.method({
  1814. selector: "onClassSelected:",
  1815. fn: function (aClass){
  1816. var self=this;
  1817. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1818. $1=aClass;
  1819. if(($receiver = $1) == nil || $receiver == undefined){
  1820. $2=_st(self)._contents_("");
  1821. return $2;
  1822. } else {
  1823. $1;
  1824. };
  1825. _st(self)._contents_(_st(aClass)._definition());
  1826. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLBrowserSourceWidget)})},
  1827. messageSends: ["ifNil:", "contents:", "definition"]}),
  1828. smalltalk.HLBrowserSourceWidget);
  1829. smalltalk.addMethod(
  1830. "_onMethodModified_",
  1831. smalltalk.method({
  1832. selector: "onMethodModified:",
  1833. fn: function (aMethod){
  1834. var self=this;
  1835. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  1836. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(aMethod)._methodClass());
  1837. if(! smalltalk.assert($1)){
  1838. $2=self;
  1839. return $2;
  1840. };
  1841. $3=_st(_st(_st(_st(self)._model())._selectedMethod())._selector()).__eq(_st(aMethod)._selector());
  1842. if(! smalltalk.assert($3)){
  1843. $4=self;
  1844. return $4;
  1845. };
  1846. _st(self)._refresh();
  1847. return self}, function($ctx1) {$ctx1.fill(self,"onMethodModified:",{aMethod:aMethod}, smalltalk.HLBrowserSourceWidget)})},
  1848. messageSends: ["ifFalse:", "=", "methodClass", "selectedClass", "model", "selector", "selectedMethod", "refresh"]}),
  1849. smalltalk.HLBrowserSourceWidget);
  1850. smalltalk.addMethod(
  1851. "_onMethodSelected_",
  1852. smalltalk.method({
  1853. selector: "onMethodSelected:",
  1854. fn: function (aCompiledMethod){
  1855. var self=this;
  1856. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1857. $1=aCompiledMethod;
  1858. if(($receiver = $1) == nil || $receiver == undefined){
  1859. $2=_st(self)._contents_("");
  1860. return $2;
  1861. } else {
  1862. $1;
  1863. };
  1864. _st(self)._contents_(_st(aCompiledMethod)._source());
  1865. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserSourceWidget)})},
  1866. messageSends: ["ifNil:", "contents:", "source"]}),
  1867. smalltalk.HLBrowserSourceWidget);
  1868. smalltalk.addMethod(
  1869. "_onProtocolSelected_",
  1870. smalltalk.method({
  1871. selector: "onProtocolSelected:",
  1872. fn: function (aString){
  1873. var self=this;
  1874. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1875. $1=_st(_st(self)._model())._selectedClass();
  1876. if(($receiver = $1) == nil || $receiver == undefined){
  1877. $2=_st(self)._contents_("");
  1878. return $2;
  1879. } else {
  1880. $1;
  1881. };
  1882. _st(self)._contents_(_st(_st(_st(self)._model())._selectedClass())._definition());
  1883. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  1884. messageSends: ["ifNil:", "contents:", "selectedClass", "model", "definition"]}),
  1885. smalltalk.HLBrowserSourceWidget);
  1886. smalltalk.addMethod(
  1887. "_refresh",
  1888. smalltalk.method({
  1889. selector: "refresh",
  1890. fn: function (){
  1891. var self=this;
  1892. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1893. $1=_st(self)._hasModification();
  1894. if(smalltalk.assert($1)){
  1895. $2=self;
  1896. return $2;
  1897. };
  1898. _st(self)._contents_(_st(_st(_st(self)._model())._selectedMethod())._source());
  1899. smalltalk.HLWidget.fn.prototype._refresh.apply(_st(self), []);
  1900. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{}, smalltalk.HLBrowserSourceWidget)})},
  1901. messageSends: ["ifTrue:", "hasModification", "contents:", "source", "selectedMethod", "model", "refresh"]}),
  1902. smalltalk.HLBrowserSourceWidget);
  1903. smalltalk.addMethod(
  1904. "_renderContentOn_",
  1905. smalltalk.method({
  1906. selector: "renderContentOn:",
  1907. fn: function (html){
  1908. var self=this;
  1909. return smalltalk.withContext(function($ctx1) { _st(_st(self)._codeWidget())._renderOn_(html);
  1910. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLBrowserSourceWidget)})},
  1911. messageSends: ["renderOn:", "codeWidget"]}),
  1912. smalltalk.HLBrowserSourceWidget);
  1913. smalltalk.addMethod(
  1914. "_on_",
  1915. smalltalk.method({
  1916. selector: "on:",
  1917. fn: function (aBrowserModel){
  1918. var self=this;
  1919. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1920. $2=_st(self)._new();
  1921. _st($2)._model_(aBrowserModel);
  1922. $3=_st($2)._yourself();
  1923. $1=$3;
  1924. return $1;
  1925. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget.klass)})},
  1926. messageSends: ["model:", "new", "yourself"]}),
  1927. smalltalk.HLBrowserSourceWidget.klass);
  1928. smalltalk.addClass('HLClassCache', smalltalk.Object, ['class', 'selectorsCache', 'overrideCache', 'overriddenCache'], 'Helios-Browser');
  1929. smalltalk.addMethod(
  1930. "_invalidateChildrenSelector_",
  1931. smalltalk.method({
  1932. selector: "invalidateChildrenSelector:",
  1933. fn: function (aSelector){
  1934. var self=this;
  1935. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1936. _st(_st(_st(self)._theClass())._subclasses())._do_((function(each){
  1937. return smalltalk.withContext(function($ctx2) { $1=_st(_st(self)._selectorsCache())._cacheFor_(each);
  1938. _st($1)._removeSelector_(aSelector);
  1939. $2=_st($1)._invalidateChildrenSelector_(aSelector);
  1940. return $2;
  1941. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1942. return self}, function($ctx1) {$ctx1.fill(self,"invalidateChildrenSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  1943. messageSends: ["do:", "removeSelector:", "cacheFor:", "selectorsCache", "invalidateChildrenSelector:", "subclasses", "theClass"]}),
  1944. smalltalk.HLClassCache);
  1945. smalltalk.addMethod(
  1946. "_invalidateParentSelector_",
  1947. smalltalk.method({
  1948. selector: "invalidateParentSelector:",
  1949. fn: function (aSelector){
  1950. var self=this;
  1951. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1952. $1=_st(_st(self)._theClass())._superclass();
  1953. if(($receiver = $1) == nil || $receiver == undefined){
  1954. $1;
  1955. } else {
  1956. $2=_st(_st(self)._selectorsCache())._cacheFor_(_st(_st(self)._theClass())._superclass());
  1957. _st($2)._removeSelector_(aSelector);
  1958. $3=_st($2)._invalidateParentSelector_(aSelector);
  1959. $3;
  1960. };
  1961. return self}, function($ctx1) {$ctx1.fill(self,"invalidateParentSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  1962. messageSends: ["ifNotNil:", "removeSelector:", "cacheFor:", "superclass", "theClass", "selectorsCache", "invalidateParentSelector:"]}),
  1963. smalltalk.HLClassCache);
  1964. smalltalk.addMethod(
  1965. "_invalidateSelector_",
  1966. smalltalk.method({
  1967. selector: "invalidateSelector:",
  1968. fn: function (aSelector){
  1969. var self=this;
  1970. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1971. $1=self;
  1972. _st($1)._invalidateParentSelector_(aSelector);
  1973. _st($1)._invalidateChildrenSelector_(aSelector);
  1974. $2=_st($1)._removeSelector_(aSelector);
  1975. return self}, function($ctx1) {$ctx1.fill(self,"invalidateSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  1976. messageSends: ["invalidateParentSelector:", "invalidateChildrenSelector:", "removeSelector:"]}),
  1977. smalltalk.HLClassCache);
  1978. smalltalk.addMethod(
  1979. "_isOverridden_",
  1980. smalltalk.method({
  1981. selector: "isOverridden:",
  1982. fn: function (aMethod){
  1983. var self=this;
  1984. return smalltalk.withContext(function($ctx1) { var $1;
  1985. $1=_st(_st(self)._overriddenCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  1986. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverridden();
  1987. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1988. return $1;
  1989. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  1990. messageSends: ["at:ifAbsentPut:", "selector", "isOverridden", "overriddenCache"]}),
  1991. smalltalk.HLClassCache);
  1992. smalltalk.addMethod(
  1993. "_isOverride_",
  1994. smalltalk.method({
  1995. selector: "isOverride:",
  1996. fn: function (aMethod){
  1997. var self=this;
  1998. return smalltalk.withContext(function($ctx1) { var $1;
  1999. $1=_st(_st(self)._overrideCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  2000. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverride();
  2001. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2002. return $1;
  2003. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  2004. messageSends: ["at:ifAbsentPut:", "selector", "isOverride", "overrideCache"]}),
  2005. smalltalk.HLClassCache);
  2006. smalltalk.addMethod(
  2007. "_overriddenCache",
  2008. smalltalk.method({
  2009. selector: "overriddenCache",
  2010. fn: function (){
  2011. var self=this;
  2012. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2013. $2=self["@overriddenCache"];
  2014. if(($receiver = $2) == nil || $receiver == undefined){
  2015. self["@overriddenCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2016. $1=self["@overriddenCache"];
  2017. } else {
  2018. $1=$2;
  2019. };
  2020. return $1;
  2021. }, function($ctx1) {$ctx1.fill(self,"overriddenCache",{}, smalltalk.HLClassCache)})},
  2022. messageSends: ["ifNil:", "new"]}),
  2023. smalltalk.HLClassCache);
  2024. smalltalk.addMethod(
  2025. "_overrideCache",
  2026. smalltalk.method({
  2027. selector: "overrideCache",
  2028. fn: function (){
  2029. var self=this;
  2030. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2031. $2=self["@overrideCache"];
  2032. if(($receiver = $2) == nil || $receiver == undefined){
  2033. self["@overrideCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2034. $1=self["@overrideCache"];
  2035. } else {
  2036. $1=$2;
  2037. };
  2038. return $1;
  2039. }, function($ctx1) {$ctx1.fill(self,"overrideCache",{}, smalltalk.HLClassCache)})},
  2040. messageSends: ["ifNil:", "new"]}),
  2041. smalltalk.HLClassCache);
  2042. smalltalk.addMethod(
  2043. "_removeSelector_",
  2044. smalltalk.method({
  2045. selector: "removeSelector:",
  2046. fn: function (aSelector){
  2047. var self=this;
  2048. return smalltalk.withContext(function($ctx1) { _st(_st(self)._overriddenCache())._removeKey_ifAbsent_(aSelector,(function(){
  2049. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2050. _st(_st(self)._overrideCache())._removeKey_ifAbsent_(aSelector,(function(){
  2051. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2052. return self}, function($ctx1) {$ctx1.fill(self,"removeSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2053. messageSends: ["removeKey:ifAbsent:", "overriddenCache", "overrideCache"]}),
  2054. smalltalk.HLClassCache);
  2055. smalltalk.addMethod(
  2056. "_selectorsCache",
  2057. smalltalk.method({
  2058. selector: "selectorsCache",
  2059. fn: function (){
  2060. var self=this;
  2061. return smalltalk.withContext(function($ctx1) { var $1;
  2062. $1=self["@selectorsCache"];
  2063. return $1;
  2064. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLClassCache)})},
  2065. messageSends: []}),
  2066. smalltalk.HLClassCache);
  2067. smalltalk.addMethod(
  2068. "_selectorsCache_",
  2069. smalltalk.method({
  2070. selector: "selectorsCache:",
  2071. fn: function (aCache){
  2072. var self=this;
  2073. return smalltalk.withContext(function($ctx1) { self["@selectorsCache"]=aCache;
  2074. return self}, function($ctx1) {$ctx1.fill(self,"selectorsCache:",{aCache:aCache}, smalltalk.HLClassCache)})},
  2075. messageSends: []}),
  2076. smalltalk.HLClassCache);
  2077. smalltalk.addMethod(
  2078. "_theClass",
  2079. smalltalk.method({
  2080. selector: "theClass",
  2081. fn: function (){
  2082. var self=this;
  2083. return smalltalk.withContext(function($ctx1) { var $1;
  2084. $1=self["@class"];
  2085. return $1;
  2086. }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.HLClassCache)})},
  2087. messageSends: []}),
  2088. smalltalk.HLClassCache);
  2089. smalltalk.addMethod(
  2090. "_theClass_",
  2091. smalltalk.method({
  2092. selector: "theClass:",
  2093. fn: function (aClass){
  2094. var self=this;
  2095. return smalltalk.withContext(function($ctx1) { self["@class"]=aClass;
  2096. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.HLClassCache)})},
  2097. messageSends: []}),
  2098. smalltalk.HLClassCache);
  2099. smalltalk.addMethod(
  2100. "_on_selectorsCache_",
  2101. smalltalk.method({
  2102. selector: "on:selectorsCache:",
  2103. fn: function (aClass,aSelectorsCache){
  2104. var self=this;
  2105. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2106. $2=_st(self)._new();
  2107. _st($2)._theClass_(aClass);
  2108. _st($2)._selectorsCache_(aSelectorsCache);
  2109. $3=_st($2)._yourself();
  2110. $1=$3;
  2111. return $1;
  2112. }, function($ctx1) {$ctx1.fill(self,"on:selectorsCache:",{aClass:aClass,aSelectorsCache:aSelectorsCache}, smalltalk.HLClassCache.klass)})},
  2113. messageSends: ["theClass:", "new", "selectorsCache:", "yourself"]}),
  2114. smalltalk.HLClassCache.klass);
  2115. smalltalk.addClass('HLSelectorsCache', smalltalk.Object, ['classesCache'], 'Helios-Browser');
  2116. smalltalk.addMethod(
  2117. "_cacheFor_",
  2118. smalltalk.method({
  2119. selector: "cacheFor:",
  2120. fn: function (aClass){
  2121. var self=this;
  2122. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2123. $1=aClass;
  2124. if(($receiver = $1) == nil || $receiver == undefined){
  2125. return nil;
  2126. } else {
  2127. $1;
  2128. };
  2129. $2=_st(_st(self)._classesCache())._at_ifAbsentPut_(_st(aClass)._name(),(function(){
  2130. return smalltalk.withContext(function($ctx2) { return _st(self)._newCacheFor_(aClass);
  2131. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2132. return $2;
  2133. }, function($ctx1) {$ctx1.fill(self,"cacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2134. messageSends: ["ifNil:", "at:ifAbsentPut:", "name", "newCacheFor:", "classesCache"]}),
  2135. smalltalk.HLSelectorsCache);
  2136. smalltalk.addMethod(
  2137. "_classesCache",
  2138. smalltalk.method({
  2139. selector: "classesCache",
  2140. fn: function (){
  2141. var self=this;
  2142. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2143. $2=self["@classesCache"];
  2144. if(($receiver = $2) == nil || $receiver == undefined){
  2145. self["@classesCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2146. $1=self["@classesCache"];
  2147. } else {
  2148. $1=$2;
  2149. };
  2150. return $1;
  2151. }, function($ctx1) {$ctx1.fill(self,"classesCache",{}, smalltalk.HLSelectorsCache)})},
  2152. messageSends: ["ifNil:", "new"]}),
  2153. smalltalk.HLSelectorsCache);
  2154. smalltalk.addMethod(
  2155. "_initialize",
  2156. smalltalk.method({
  2157. selector: "initialize",
  2158. fn: function (){
  2159. var self=this;
  2160. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  2161. _st(self)._observeSystem();
  2162. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLSelectorsCache)})},
  2163. messageSends: ["initialize", "observeSystem"]}),
  2164. smalltalk.HLSelectorsCache);
  2165. smalltalk.addMethod(
  2166. "_invalidateCacheFor_",
  2167. smalltalk.method({
  2168. selector: "invalidateCacheFor:",
  2169. fn: function (aMethod){
  2170. var self=this;
  2171. return smalltalk.withContext(function($ctx1) { _st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._invalidateSelector_(_st(aMethod)._selector());
  2172. return self}, function($ctx1) {$ctx1.fill(self,"invalidateCacheFor:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2173. messageSends: ["invalidateSelector:", "selector", "cacheFor:", "methodClass"]}),
  2174. smalltalk.HLSelectorsCache);
  2175. smalltalk.addMethod(
  2176. "_isOverridden_",
  2177. smalltalk.method({
  2178. selector: "isOverridden:",
  2179. fn: function (aMethod){
  2180. var self=this;
  2181. return smalltalk.withContext(function($ctx1) { var $1;
  2182. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverridden_(aMethod);
  2183. return $1;
  2184. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2185. messageSends: ["isOverridden:", "cacheFor:", "methodClass"]}),
  2186. smalltalk.HLSelectorsCache);
  2187. smalltalk.addMethod(
  2188. "_isOverride_",
  2189. smalltalk.method({
  2190. selector: "isOverride:",
  2191. fn: function (aMethod){
  2192. var self=this;
  2193. return smalltalk.withContext(function($ctx1) { var $1;
  2194. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverride_(aMethod);
  2195. return $1;
  2196. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2197. messageSends: ["isOverride:", "cacheFor:", "methodClass"]}),
  2198. smalltalk.HLSelectorsCache);
  2199. smalltalk.addMethod(
  2200. "_newCacheFor_",
  2201. smalltalk.method({
  2202. selector: "newCacheFor:",
  2203. fn: function (aClass){
  2204. var self=this;
  2205. return smalltalk.withContext(function($ctx1) { var $1;
  2206. $1=_st((smalltalk.HLClassCache || HLClassCache))._on_selectorsCache_(aClass,self);
  2207. return $1;
  2208. }, function($ctx1) {$ctx1.fill(self,"newCacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2209. messageSends: ["on:selectorsCache:"]}),
  2210. smalltalk.HLSelectorsCache);
  2211. smalltalk.addMethod(
  2212. "_observeSystem",
  2213. smalltalk.method({
  2214. selector: "observeSystem",
  2215. fn: function (){
  2216. var self=this;
  2217. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2218. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  2219. _st($1)._on_do_((smalltalk.MethodAdded || MethodAdded),(function(ann){
  2220. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodAdded_(_st(ann)._method());
  2221. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2222. $2=_st($1)._on_do_((smalltalk.MethodRemoved || MethodRemoved),(function(ann){
  2223. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodRemoved_(_st(ann)._method());
  2224. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2225. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLSelectorsCache)})},
  2226. messageSends: ["on:do:", "onMethodAdded:", "method", "current", "onMethodRemoved:"]}),
  2227. smalltalk.HLSelectorsCache);
  2228. smalltalk.addMethod(
  2229. "_onMethodAdded_",
  2230. smalltalk.method({
  2231. selector: "onMethodAdded:",
  2232. fn: function (aMethod){
  2233. var self=this;
  2234. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2235. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2236. messageSends: ["invalidateCacheFor:"]}),
  2237. smalltalk.HLSelectorsCache);
  2238. smalltalk.addMethod(
  2239. "_onMethodRemoved_",
  2240. smalltalk.method({
  2241. selector: "onMethodRemoved:",
  2242. fn: function (aMethod){
  2243. var self=this;
  2244. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2245. return self}, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2246. messageSends: ["invalidateCacheFor:"]}),
  2247. smalltalk.HLSelectorsCache);
  2248. smalltalk.HLSelectorsCache.klass.iVarNames = ['current'];
  2249. smalltalk.addMethod(
  2250. "_current",
  2251. smalltalk.method({
  2252. selector: "current",
  2253. fn: function (){
  2254. var self=this;
  2255. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2256. $2=self["@current"];
  2257. if(($receiver = $2) == nil || $receiver == undefined){
  2258. self["@current"]=smalltalk.Object.klass.fn.prototype._new.apply(_st(self), []);
  2259. $1=self["@current"];
  2260. } else {
  2261. $1=$2;
  2262. };
  2263. return $1;
  2264. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.HLSelectorsCache.klass)})},
  2265. messageSends: ["ifNil:", "new"]}),
  2266. smalltalk.HLSelectorsCache.klass);
  2267. smalltalk.addMethod(
  2268. "_flush",
  2269. smalltalk.method({
  2270. selector: "flush",
  2271. fn: function (){
  2272. var self=this;
  2273. return smalltalk.withContext(function($ctx1) { self["@current"]=nil;
  2274. return self}, function($ctx1) {$ctx1.fill(self,"flush",{}, smalltalk.HLSelectorsCache.klass)})},
  2275. messageSends: []}),
  2276. smalltalk.HLSelectorsCache.klass);
  2277. smalltalk.addMethod(
  2278. "_new",
  2279. smalltalk.method({
  2280. selector: "new",
  2281. fn: function (){
  2282. var self=this;
  2283. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  2284. return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.HLSelectorsCache.klass)})},
  2285. messageSends: ["shouldNotImplement"]}),
  2286. smalltalk.HLSelectorsCache.klass);
  2287. smalltalk.addMethod(
  2288. "_isOverridden",
  2289. smalltalk.method({
  2290. selector: "isOverridden",
  2291. fn: function (){
  2292. var self=this;
  2293. var selector;
  2294. return smalltalk.withContext(function($ctx1) { var $1;
  2295. var $early={};
  2296. try {
  2297. selector=_st(self)._selector();
  2298. _st(_st(self)._methodClass())._allSubclassesDo_((function(each){
  2299. return smalltalk.withContext(function($ctx2) { $1=_st(each)._includesSelector_(selector);
  2300. if(smalltalk.assert($1)){
  2301. throw $early=[true];
  2302. };
  2303. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2304. return false;
  2305. }
  2306. catch(e) {if(e===$early)return e[0]; throw e}
  2307. }, function($ctx1) {$ctx1.fill(self,"isOverridden",{selector:selector}, smalltalk.CompiledMethod)})},
  2308. messageSends: ["selector", "allSubclassesDo:", "ifTrue:", "includesSelector:", "methodClass"]}),
  2309. smalltalk.CompiledMethod);
  2310. smalltalk.addMethod(
  2311. "_isOverride",
  2312. smalltalk.method({
  2313. selector: "isOverride",
  2314. fn: function (){
  2315. var self=this;
  2316. var superclass;
  2317. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2318. superclass=_st(_st(self)._methodClass())._superclass();
  2319. $1=superclass;
  2320. if(($receiver = $1) == nil || $receiver == undefined){
  2321. return false;
  2322. } else {
  2323. $1;
  2324. };
  2325. $2=_st(_st(_st(_st(self)._methodClass())._superclass())._lookupSelector_(_st(self)._selector()))._notNil();
  2326. return $2;
  2327. }, function($ctx1) {$ctx1.fill(self,"isOverride",{superclass:superclass}, smalltalk.CompiledMethod)})},
  2328. messageSends: ["superclass", "methodClass", "ifNil:", "notNil", "lookupSelector:", "selector"]}),
  2329. smalltalk.CompiledMethod);