Helios-Browser.deploy.js 87 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386
  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 $2,$1;
  776. $2=_st(aString).__eq(_st(self)._allProtocol());
  777. if(smalltalk.assert($2)){
  778. $1=_st(_st(_st(self)._model())._selectedClass())._methods();
  779. } else {
  780. $1=_st(_st(_st(self)._model())._selectedClass())._methodsInProtocol_(aString);
  781. };
  782. return $1;
  783. }, function($ctx1) {$ctx1.fill(self,"methodsInProtocol:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  784. messageSends: ["ifTrue:ifFalse:", "methods", "selectedClass", "model", "methodsInProtocol:", "=", "allProtocol"]}),
  785. smalltalk.HLMethodsListWidget);
  786. smalltalk.addMethod(
  787. "_observeModel",
  788. smalltalk.method({
  789. selector: "observeModel",
  790. fn: function (){
  791. var self=this;
  792. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  793. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  794. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  795. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  796. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(nil);
  797. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  798. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLMethodSelected || HLMethodSelected),(function(ann){
  799. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodSelected_(_st(ann)._item());
  800. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  801. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLMethodsListWidget)})},
  802. messageSends: ["on:do:", "onProtocolSelected:", "item", "announcer", "model", "onMethodSelected:"]}),
  803. smalltalk.HLMethodsListWidget);
  804. smalltalk.addMethod(
  805. "_observeSystem",
  806. smalltalk.method({
  807. selector: "observeSystem",
  808. fn: function (){
  809. var self=this;
  810. return smalltalk.withContext(function($ctx1) { var $1,$2;
  811. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  812. _st($1)._on_do_((smalltalk.MethodAdded || MethodAdded),(function(ann){
  813. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodAdded_(_st(ann)._method());
  814. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  815. $2=_st($1)._on_do_((smalltalk.MethodRemoved || MethodRemoved),(function(ann){
  816. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodRemoved_(_st(ann)._method());
  817. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  818. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLMethodsListWidget)})},
  819. messageSends: ["on:do:", "onMethodAdded:", "method", "current", "onMethodRemoved:"]}),
  820. smalltalk.HLMethodsListWidget);
  821. smalltalk.addMethod(
  822. "_onMethodAdded_",
  823. smalltalk.method({
  824. selector: "onMethodAdded:",
  825. fn: function (aMethod){
  826. var self=this;
  827. return smalltalk.withContext(function($ctx1) { var $1;
  828. var $early={};
  829. try {
  830. _st(_st(self)._items())._detect_ifNone_((function(each){
  831. return smalltalk.withContext(function($ctx2) { return _st(each).__eq(_st(aMethod)._selector());
  832. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  833. return smalltalk.withContext(function($ctx2) { $1=self;
  834. throw $early=[$1];
  835. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  836. _st(self)._refresh();
  837. return self}
  838. catch(e) {if(e===$early)return e[0]; throw e}
  839. }, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  840. messageSends: ["detect:ifNone:", "=", "selector", "items", "refresh"]}),
  841. smalltalk.HLMethodsListWidget);
  842. smalltalk.addMethod(
  843. "_onMethodRemoved_",
  844. smalltalk.method({
  845. selector: "onMethodRemoved:",
  846. fn: function (aMethod){
  847. var self=this;
  848. return smalltalk.withContext(function($ctx1) { var $1,$2;
  849. var $early={};
  850. try {
  851. _st(_st(self)._items())._detect_ifNone_((function(each){
  852. return smalltalk.withContext(function($ctx2) { return _st(each).__eq(_st(aMethod)._selector());
  853. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  854. return smalltalk.withContext(function($ctx2) { $1=self;
  855. throw $early=[$1];
  856. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  857. $2=_st(_st(_st(aMethod)._methodClass()).__eq(_st(_st(self)._model())._selectedClass()))._and_((function(){
  858. return smalltalk.withContext(function($ctx2) { return _st(_st(aMethod)._selector()).__eq(_st(self)._selectedItem());
  859. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  860. if(smalltalk.assert($2)){
  861. _st(self)._selectItem_(nil);
  862. };
  863. _st(self)._refresh();
  864. return self}
  865. catch(e) {if(e===$early)return e[0]; throw e}
  866. }, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  867. messageSends: ["detect:ifNone:", "=", "selector", "items", "ifTrue:", "selectItem:", "and:", "selectedItem", "selectedClass", "model", "methodClass", "refresh"]}),
  868. smalltalk.HLMethodsListWidget);
  869. smalltalk.addMethod(
  870. "_onMethodSelected_",
  871. smalltalk.method({
  872. selector: "onMethodSelected:",
  873. fn: function (aMethod){
  874. var self=this;
  875. return smalltalk.withContext(function($ctx1) { var $1,$2;
  876. _st(self)._selectedItem_(aMethod);
  877. $1=aMethod;
  878. if(($receiver = $1) == nil || $receiver == undefined){
  879. $2=self;
  880. return $2;
  881. } else {
  882. $1;
  883. };
  884. _st(self)._focus();
  885. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  886. messageSends: ["selectedItem:", "ifNil:", "focus"]}),
  887. smalltalk.HLMethodsListWidget);
  888. smalltalk.addMethod(
  889. "_onProtocolSelected_",
  890. smalltalk.method({
  891. selector: "onProtocolSelected:",
  892. fn: function (aString){
  893. var self=this;
  894. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  895. _st(self)._selectedItem_(nil);
  896. $1=self;
  897. $3=_st(_st(self)._model())._selectedClass();
  898. if(($receiver = $3) == nil || $receiver == undefined){
  899. $2=[];
  900. } else {
  901. $4=aString;
  902. if(($receiver = $4) == nil || $receiver == undefined){
  903. $2=[];
  904. } else {
  905. $2=_st(self)._selectorsInProtocol_(aString);
  906. };
  907. };
  908. _st($1)._items_($2);
  909. _st(self)._refresh();
  910. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  911. messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "selectorsInProtocol:", "selectedClass", "model", "refresh"]}),
  912. smalltalk.HLMethodsListWidget);
  913. smalltalk.addMethod(
  914. "_overrideSelectors",
  915. smalltalk.method({
  916. selector: "overrideSelectors",
  917. fn: function (){
  918. var self=this;
  919. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  920. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("override",(function(){
  921. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(_st(self)._model())._selectedClass())._allSuperclasses())._inject_into_(_st((smalltalk.Set || Set))._new(),(function(acc,each){
  922. return smalltalk.withContext(function($ctx3) { $2=acc;
  923. _st($2)._addAll_(_st(each)._selectors());
  924. $3=_st($2)._yourself();
  925. return $3;
  926. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  927. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  928. return $1;
  929. }, function($ctx1) {$ctx1.fill(self,"overrideSelectors",{}, smalltalk.HLMethodsListWidget)})},
  930. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSuperclasses", "selectedClass", "model", "selectorsCache"]}),
  931. smalltalk.HLMethodsListWidget);
  932. smalltalk.addMethod(
  933. "_overridenSelectors",
  934. smalltalk.method({
  935. selector: "overridenSelectors",
  936. fn: function (){
  937. var self=this;
  938. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  939. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("overriden",(function(){
  940. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(_st(self)._model())._selectedClass())._allSubclasses())._inject_into_(_st((smalltalk.Set || Set))._new(),(function(acc,each){
  941. return smalltalk.withContext(function($ctx3) { $2=acc;
  942. _st($2)._addAll_(_st(each)._selectors());
  943. $3=_st($2)._yourself();
  944. return $3;
  945. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  946. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  947. return $1;
  948. }, function($ctx1) {$ctx1.fill(self,"overridenSelectors",{}, smalltalk.HLMethodsListWidget)})},
  949. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSubclasses", "selectedClass", "model", "selectorsCache"]}),
  950. smalltalk.HLMethodsListWidget);
  951. smalltalk.addMethod(
  952. "_renderContentOn_",
  953. smalltalk.method({
  954. selector: "renderContentOn:",
  955. fn: function (html){
  956. var self=this;
  957. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  958. $1=_st(_st(self)._model())._showInstance();
  959. if(smalltalk.assert($1)){
  960. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  961. } else {
  962. $2=_st(html)._div();
  963. _st($2)._class_("class_side");
  964. $3=_st($2)._with_((function(){
  965. return smalltalk.withContext(function($ctx2) { return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  966. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  967. $3;
  968. };
  969. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLMethodsListWidget)})},
  970. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"]}),
  971. smalltalk.HLMethodsListWidget);
  972. smalltalk.addMethod(
  973. "_renderItemLabel_on_",
  974. smalltalk.method({
  975. selector: "renderItemLabel:on:",
  976. fn: function (aSelector,html){
  977. var self=this;
  978. return smalltalk.withContext(function($ctx1) { _st(html)._with_(aSelector);
  979. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aSelector:aSelector,html:html}, smalltalk.HLMethodsListWidget)})},
  980. messageSends: ["with:"]}),
  981. smalltalk.HLMethodsListWidget);
  982. smalltalk.addMethod(
  983. "_selectItem_",
  984. smalltalk.method({
  985. selector: "selectItem:",
  986. fn: function (aSelector){
  987. var self=this;
  988. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedMethod_(_st(self)._methodForSelector_(aSelector));
  989. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aSelector:aSelector}, smalltalk.HLMethodsListWidget)})},
  990. messageSends: ["selectedMethod:", "methodForSelector:", "model"]}),
  991. smalltalk.HLMethodsListWidget);
  992. smalltalk.addMethod(
  993. "_selectorsCache",
  994. smalltalk.method({
  995. selector: "selectorsCache",
  996. fn: function (){
  997. var self=this;
  998. return smalltalk.withContext(function($ctx1) { var $1;
  999. $1=_st(_st(self)._class())._selectorsCache();
  1000. return $1;
  1001. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLMethodsListWidget)})},
  1002. messageSends: ["selectorsCache", "class"]}),
  1003. smalltalk.HLMethodsListWidget);
  1004. smalltalk.addMethod(
  1005. "_selectorsInProtocol_",
  1006. smalltalk.method({
  1007. selector: "selectorsInProtocol:",
  1008. fn: function (aString){
  1009. var self=this;
  1010. return smalltalk.withContext(function($ctx1) { var $1;
  1011. $1=_st(_st(self)._methodsInProtocol_(aString))._collect_((function(each){
  1012. return smalltalk.withContext(function($ctx2) { return _st(each)._selector();
  1013. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1014. return $1;
  1015. }, function($ctx1) {$ctx1.fill(self,"selectorsInProtocol:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  1016. messageSends: ["collect:", "selector", "methodsInProtocol:"]}),
  1017. smalltalk.HLMethodsListWidget);
  1018. smalltalk.HLMethodsListWidget.klass.iVarNames = ['selectorsCache'];
  1019. smalltalk.addMethod(
  1020. "_selectorsCache",
  1021. smalltalk.method({
  1022. selector: "selectorsCache",
  1023. fn: function (){
  1024. var self=this;
  1025. return smalltalk.withContext(function($ctx1) { var $1;
  1026. $1=_st((smalltalk.HLSelectorsCache || HLSelectorsCache))._current();
  1027. return $1;
  1028. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLMethodsListWidget.klass)})},
  1029. messageSends: ["current"]}),
  1030. smalltalk.HLMethodsListWidget.klass);
  1031. smalltalk.addClass('HLPackagesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1032. smalltalk.addMethod(
  1033. "_focusClassesListWidget",
  1034. smalltalk.method({
  1035. selector: "focusClassesListWidget",
  1036. fn: function (){
  1037. var self=this;
  1038. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._announce_(_st((smalltalk.HLClassesListFocus || HLClassesListFocus))._new());
  1039. return self}, function($ctx1) {$ctx1.fill(self,"focusClassesListWidget",{}, smalltalk.HLPackagesListWidget)})},
  1040. messageSends: ["announce:", "new", "announcer", "model"]}),
  1041. smalltalk.HLPackagesListWidget);
  1042. smalltalk.addMethod(
  1043. "_initializeItems",
  1044. smalltalk.method({
  1045. selector: "initializeItems",
  1046. fn: function (){
  1047. var self=this;
  1048. return smalltalk.withContext(function($ctx1) { var $1;
  1049. self["@items"]=_st(_st(_st(self)._model())._packages())._sort_((function(a,b){
  1050. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._name()).__lt(_st(b)._name());
  1051. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  1052. $1=self["@items"];
  1053. return $1;
  1054. }, function($ctx1) {$ctx1.fill(self,"initializeItems",{}, smalltalk.HLPackagesListWidget)})},
  1055. messageSends: ["sort:", "<", "name", "packages", "model"]}),
  1056. smalltalk.HLPackagesListWidget);
  1057. smalltalk.addMethod(
  1058. "_items",
  1059. smalltalk.method({
  1060. selector: "items",
  1061. fn: function (){
  1062. var self=this;
  1063. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1064. $2=self["@items"];
  1065. if(($receiver = $2) == nil || $receiver == undefined){
  1066. $1=_st(self)._initializeItems();
  1067. } else {
  1068. $1=$2;
  1069. };
  1070. return $1;
  1071. }, function($ctx1) {$ctx1.fill(self,"items",{}, smalltalk.HLPackagesListWidget)})},
  1072. messageSends: ["ifNil:", "initializeItems"]}),
  1073. smalltalk.HLPackagesListWidget);
  1074. smalltalk.addMethod(
  1075. "_observeModel",
  1076. smalltalk.method({
  1077. selector: "observeModel",
  1078. fn: function (){
  1079. var self=this;
  1080. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLPackageSelected || HLPackageSelected),(function(ann){
  1081. return smalltalk.withContext(function($ctx2) { return _st(self)._onPackageSelected_(_st(ann)._item());
  1082. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1083. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLPackagesListWidget)})},
  1084. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model"]}),
  1085. smalltalk.HLPackagesListWidget);
  1086. smalltalk.addMethod(
  1087. "_onPackageSelected_",
  1088. smalltalk.method({
  1089. selector: "onPackageSelected:",
  1090. fn: function (aPackage){
  1091. var self=this;
  1092. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(aPackage);
  1093. _st(self)._focus();
  1094. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{aPackage:aPackage}, smalltalk.HLPackagesListWidget)})},
  1095. messageSends: ["selectedItem:", "focus"]}),
  1096. smalltalk.HLPackagesListWidget);
  1097. smalltalk.addMethod(
  1098. "_renderButtonsOn_",
  1099. smalltalk.method({
  1100. selector: "renderButtonsOn:",
  1101. fn: function (html){
  1102. var self=this;
  1103. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$5,$6,$7,$8,$4,$9,$10;
  1104. $1=_st(html)._span();
  1105. _st($1)._class_("info");
  1106. $2=_st($1)._with_("Auto commit");
  1107. $3=_st(html)._div();
  1108. _st($3)._class_("btn-group switch");
  1109. _st($3)._at_put_("data-toggle","buttons-radio");
  1110. $4=_st($3)._with_((function(){
  1111. return smalltalk.withContext(function($ctx2) { $5=_st(html)._button();
  1112. _st($5)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  1113. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("btn");
  1114. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1115. $6=_st($5)._with_("On");
  1116. $6;
  1117. $7=_st(html)._button();
  1118. _st($7)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  1119. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("btn active");
  1120. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1121. $8=_st($7)._with_("Off");
  1122. return $8;
  1123. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1124. $9=_st(html)._a();
  1125. _st($9)._class_("btn");
  1126. $10=_st($9)._with_("Commit");
  1127. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.HLPackagesListWidget)})},
  1128. messageSends: ["class:", "span", "with:", "div", "at:put:", "streamContents:", "nextPutAll:", "button", "a"]}),
  1129. smalltalk.HLPackagesListWidget);
  1130. smalltalk.addMethod(
  1131. "_selectItem_",
  1132. smalltalk.method({
  1133. selector: "selectItem:",
  1134. fn: function (aPackage){
  1135. var self=this;
  1136. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedPackage_(aPackage);
  1137. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aPackage:aPackage}, smalltalk.HLPackagesListWidget)})},
  1138. messageSends: ["selectedPackage:", "model"]}),
  1139. smalltalk.HLPackagesListWidget);
  1140. smalltalk.addClass('HLProtocolsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1141. smalltalk.addMethod(
  1142. "_allProtocol",
  1143. smalltalk.method({
  1144. selector: "allProtocol",
  1145. fn: function (){
  1146. var self=this;
  1147. return smalltalk.withContext(function($ctx1) { var $1;
  1148. $1=_st(_st(self)._model())._allProtocol();
  1149. return $1;
  1150. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLProtocolsListWidget)})},
  1151. messageSends: ["allProtocol", "model"]}),
  1152. smalltalk.HLProtocolsListWidget);
  1153. smalltalk.addMethod(
  1154. "_observeModel",
  1155. smalltalk.method({
  1156. selector: "observeModel",
  1157. fn: function (){
  1158. var self=this;
  1159. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  1160. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  1161. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1162. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  1163. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(_st(self)._model())._selectedClass());
  1164. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1165. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  1166. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  1167. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1168. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLProtocolsListWidget)})},
  1169. messageSends: ["on:do:", "onClassSelected:", "item", "announcer", "model", "selectedClass", "onProtocolSelected:"]}),
  1170. smalltalk.HLProtocolsListWidget);
  1171. smalltalk.addMethod(
  1172. "_onClassSelected_",
  1173. smalltalk.method({
  1174. selector: "onClassSelected:",
  1175. fn: function (aClass){
  1176. var self=this;
  1177. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$2;
  1178. _st(self)._selectedItem_(nil);
  1179. $1=self;
  1180. $3=aClass;
  1181. if(($receiver = $3) == nil || $receiver == undefined){
  1182. $2=_st((smalltalk.Array || Array))._with_(_st(self)._allProtocol());
  1183. } else {
  1184. $4=_st((smalltalk.Array || Array))._with_(_st(self)._allProtocol());
  1185. _st($4)._addAll_(_st(aClass)._protocols());
  1186. $5=_st($4)._yourself();
  1187. $2=$5;
  1188. };
  1189. _st($1)._items_($2);
  1190. _st(self)._refresh();
  1191. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLProtocolsListWidget)})},
  1192. messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself", "refresh"]}),
  1193. smalltalk.HLProtocolsListWidget);
  1194. smalltalk.addMethod(
  1195. "_onProtocolSelected_",
  1196. smalltalk.method({
  1197. selector: "onProtocolSelected:",
  1198. fn: function (aString){
  1199. var self=this;
  1200. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1201. _st(self)._selectedItem_(aString);
  1202. $1=aString;
  1203. if(($receiver = $1) == nil || $receiver == undefined){
  1204. $2=self;
  1205. return $2;
  1206. } else {
  1207. $1;
  1208. };
  1209. _st(self)._focus();
  1210. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLProtocolsListWidget)})},
  1211. messageSends: ["selectedItem:", "ifNil:", "focus"]}),
  1212. smalltalk.HLProtocolsListWidget);
  1213. smalltalk.addMethod(
  1214. "_renderContentOn_",
  1215. smalltalk.method({
  1216. selector: "renderContentOn:",
  1217. fn: function (html){
  1218. var self=this;
  1219. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1220. $1=_st(_st(self)._model())._showInstance();
  1221. if(smalltalk.assert($1)){
  1222. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1223. } else {
  1224. $2=_st(html)._div();
  1225. _st($2)._class_("class_side");
  1226. $3=_st($2)._with_((function(){
  1227. return smalltalk.withContext(function($ctx2) { return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1228. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1229. $3;
  1230. };
  1231. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLProtocolsListWidget)})},
  1232. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"]}),
  1233. smalltalk.HLProtocolsListWidget);
  1234. smalltalk.addMethod(
  1235. "_selectItem_",
  1236. smalltalk.method({
  1237. selector: "selectItem:",
  1238. fn: function (aString){
  1239. var self=this;
  1240. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedProtocol_(aString);
  1241. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aString:aString}, smalltalk.HLProtocolsListWidget)})},
  1242. messageSends: ["selectedProtocol:", "model"]}),
  1243. smalltalk.HLProtocolsListWidget);
  1244. smalltalk.addMethod(
  1245. "_selectedItem",
  1246. smalltalk.method({
  1247. selector: "selectedItem",
  1248. fn: function (){
  1249. var self=this;
  1250. return smalltalk.withContext(function($ctx1) { var $1;
  1251. $1=smalltalk.HLBrowserListWidget.fn.prototype._selectedItem.apply(_st(self), []);
  1252. return $1;
  1253. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{}, smalltalk.HLProtocolsListWidget)})},
  1254. messageSends: ["selectedItem"]}),
  1255. smalltalk.HLProtocolsListWidget);
  1256. smalltalk.addClass('HLBrowserModel', smalltalk.Object, ['announcer', 'environment', 'selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedSelector', 'showInstance', 'showComment'], 'Helios-Browser');
  1257. smalltalk.addMethod(
  1258. "_allProtocol",
  1259. smalltalk.method({
  1260. selector: "allProtocol",
  1261. fn: function (){
  1262. var self=this;
  1263. return smalltalk.withContext(function($ctx1) { return "-- All --";
  1264. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLBrowserModel)})},
  1265. messageSends: []}),
  1266. smalltalk.HLBrowserModel);
  1267. smalltalk.addMethod(
  1268. "_announcer",
  1269. smalltalk.method({
  1270. selector: "announcer",
  1271. fn: function (){
  1272. var self=this;
  1273. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1274. $2=self["@announcer"];
  1275. if(($receiver = $2) == nil || $receiver == undefined){
  1276. self["@announcer"]=_st((smalltalk.Announcer || Announcer))._new();
  1277. $1=self["@announcer"];
  1278. } else {
  1279. $1=$2;
  1280. };
  1281. return $1;
  1282. }, function($ctx1) {$ctx1.fill(self,"announcer",{}, smalltalk.HLBrowserModel)})},
  1283. messageSends: ["ifNil:", "new"]}),
  1284. smalltalk.HLBrowserModel);
  1285. smalltalk.addMethod(
  1286. "_environment",
  1287. smalltalk.method({
  1288. selector: "environment",
  1289. fn: function (){
  1290. var self=this;
  1291. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1292. $2=self["@environment"];
  1293. if(($receiver = $2) == nil || $receiver == undefined){
  1294. $1=_st(_st((smalltalk.HLManager || HLManager))._current())._environment();
  1295. } else {
  1296. $1=$2;
  1297. };
  1298. return $1;
  1299. }, function($ctx1) {$ctx1.fill(self,"environment",{}, smalltalk.HLBrowserModel)})},
  1300. messageSends: ["ifNil:", "environment", "current"]}),
  1301. smalltalk.HLBrowserModel);
  1302. smalltalk.addMethod(
  1303. "_environment_",
  1304. smalltalk.method({
  1305. selector: "environment:",
  1306. fn: function (anEnvironment){
  1307. var self=this;
  1308. return smalltalk.withContext(function($ctx1) { self["@environment"]=anEnvironment;
  1309. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel)})},
  1310. messageSends: []}),
  1311. smalltalk.HLBrowserModel);
  1312. smalltalk.addMethod(
  1313. "_packages",
  1314. smalltalk.method({
  1315. selector: "packages",
  1316. fn: function (){
  1317. var self=this;
  1318. return smalltalk.withContext(function($ctx1) { var $1;
  1319. $1=_st(_st(self)._environment())._packages();
  1320. return $1;
  1321. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLBrowserModel)})},
  1322. messageSends: ["packages", "environment"]}),
  1323. smalltalk.HLBrowserModel);
  1324. smalltalk.addMethod(
  1325. "_selectedClass",
  1326. smalltalk.method({
  1327. selector: "selectedClass",
  1328. fn: function (){
  1329. var self=this;
  1330. return smalltalk.withContext(function($ctx1) { var $1;
  1331. $1=self["@selectedClass"];
  1332. return $1;
  1333. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{}, smalltalk.HLBrowserModel)})},
  1334. messageSends: []}),
  1335. smalltalk.HLBrowserModel);
  1336. smalltalk.addMethod(
  1337. "_selectedClass_",
  1338. smalltalk.method({
  1339. selector: "selectedClass:",
  1340. fn: function (aClass){
  1341. var self=this;
  1342. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  1343. $1=_st(self["@selectedClass"]).__eq(aClass);
  1344. if(smalltalk.assert($1)){
  1345. $2=self;
  1346. return $2;
  1347. };
  1348. $3=aClass;
  1349. if(($receiver = $3) == nil || $receiver == undefined){
  1350. self["@selectedClass"]=nil;
  1351. self["@selectedClass"];
  1352. } else {
  1353. $4=_st(self)._showInstance();
  1354. if(smalltalk.assert($4)){
  1355. self["@selectedClass"]=_st(aClass)._theNonMetaClass();
  1356. self["@selectedClass"];
  1357. } else {
  1358. self["@selectedClass"]=_st(aClass)._theMetaClass();
  1359. self["@selectedClass"];
  1360. };
  1361. };
  1362. _st(self)._selectedProtocol_(nil);
  1363. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLClassSelected || HLClassSelected))._on_(_st(self)._selectedClass()));
  1364. return self}, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass}, smalltalk.HLBrowserModel)})},
  1365. messageSends: ["ifTrue:", "=", "ifNil:ifNotNil:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "showInstance", "selectedProtocol:", "announce:", "on:", "selectedClass", "announcer"]}),
  1366. smalltalk.HLBrowserModel);
  1367. smalltalk.addMethod(
  1368. "_selectedMethod",
  1369. smalltalk.method({
  1370. selector: "selectedMethod",
  1371. fn: function (){
  1372. var self=this;
  1373. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1374. $2=_st(self)._selectedClass();
  1375. if(($receiver = $2) == nil || $receiver == undefined){
  1376. $1=$2;
  1377. } else {
  1378. $1=_st(_st(_st(self)._selectedClass())._methodDictionary())._at_(self["@selectedSelector"]);
  1379. };
  1380. return $1;
  1381. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{}, smalltalk.HLBrowserModel)})},
  1382. messageSends: ["ifNotNil:", "at:", "methodDictionary", "selectedClass"]}),
  1383. smalltalk.HLBrowserModel);
  1384. smalltalk.addMethod(
  1385. "_selectedMethod_",
  1386. smalltalk.method({
  1387. selector: "selectedMethod:",
  1388. fn: function (aCompiledMethod){
  1389. var self=this;
  1390. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  1391. $1=_st(self["@selectedSelector"]).__eq(aCompiledMethod);
  1392. if(smalltalk.assert($1)){
  1393. $2=self;
  1394. return $2;
  1395. };
  1396. $3=aCompiledMethod;
  1397. if(($receiver = $3) == nil || $receiver == undefined){
  1398. self["@selectedSelector"]=nil;
  1399. self["@selectedSelector"];
  1400. } else {
  1401. $4=_st(self["@selectedSelector"]).__eq(_st(aCompiledMethod)._selector());
  1402. if(smalltalk.assert($4)){
  1403. $5=self;
  1404. return $5;
  1405. };
  1406. self["@selectedSelector"]=_st(aCompiledMethod)._selector();
  1407. self["@selectedSelector"];
  1408. };
  1409. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLMethodSelected || HLMethodSelected))._on_(aCompiledMethod));
  1410. return self}, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserModel)})},
  1411. messageSends: ["ifTrue:", "=", "ifNil:ifNotNil:", "selector", "announce:", "on:", "announcer"]}),
  1412. smalltalk.HLBrowserModel);
  1413. smalltalk.addMethod(
  1414. "_selectedPackage",
  1415. smalltalk.method({
  1416. selector: "selectedPackage",
  1417. fn: function (){
  1418. var self=this;
  1419. return smalltalk.withContext(function($ctx1) { var $1;
  1420. $1=self["@selectedPackage"];
  1421. return $1;
  1422. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{}, smalltalk.HLBrowserModel)})},
  1423. messageSends: []}),
  1424. smalltalk.HLBrowserModel);
  1425. smalltalk.addMethod(
  1426. "_selectedPackage_",
  1427. smalltalk.method({
  1428. selector: "selectedPackage:",
  1429. fn: function (aPackage){
  1430. var self=this;
  1431. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1432. $1=_st(self["@selectedPackage"]).__eq(aPackage);
  1433. if(smalltalk.assert($1)){
  1434. $2=self;
  1435. return $2;
  1436. };
  1437. self["@selectedPackage"]=aPackage;
  1438. _st(self)._selectedClass_(nil);
  1439. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLPackageSelected || HLPackageSelected))._on_(aPackage));
  1440. return self}, function($ctx1) {$ctx1.fill(self,"selectedPackage:",{aPackage:aPackage}, smalltalk.HLBrowserModel)})},
  1441. messageSends: ["ifTrue:", "=", "selectedClass:", "announce:", "on:", "announcer"]}),
  1442. smalltalk.HLBrowserModel);
  1443. smalltalk.addMethod(
  1444. "_selectedProtocol",
  1445. smalltalk.method({
  1446. selector: "selectedProtocol",
  1447. fn: function (){
  1448. var self=this;
  1449. return smalltalk.withContext(function($ctx1) { var $1;
  1450. $1=self["@selectedProtocol"];
  1451. return $1;
  1452. }, function($ctx1) {$ctx1.fill(self,"selectedProtocol",{}, smalltalk.HLBrowserModel)})},
  1453. messageSends: []}),
  1454. smalltalk.HLBrowserModel);
  1455. smalltalk.addMethod(
  1456. "_selectedProtocol_",
  1457. smalltalk.method({
  1458. selector: "selectedProtocol:",
  1459. fn: function (aString){
  1460. var self=this;
  1461. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1462. $1=_st(self["@selectedProtocol"]).__eq(aString);
  1463. if(smalltalk.assert($1)){
  1464. $2=self;
  1465. return $2;
  1466. };
  1467. self["@selectedProtocol"]=aString;
  1468. _st(self)._selectedMethod_(nil);
  1469. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLProtocolSelected || HLProtocolSelected))._on_(aString));
  1470. return self}, function($ctx1) {$ctx1.fill(self,"selectedProtocol:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1471. messageSends: ["ifTrue:", "=", "selectedMethod:", "announce:", "on:", "announcer"]}),
  1472. smalltalk.HLBrowserModel);
  1473. smalltalk.addMethod(
  1474. "_showComment",
  1475. smalltalk.method({
  1476. selector: "showComment",
  1477. fn: function (){
  1478. var self=this;
  1479. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1480. $2=self["@showComment"];
  1481. if(($receiver = $2) == nil || $receiver == undefined){
  1482. $1=false;
  1483. } else {
  1484. $1=$2;
  1485. };
  1486. return $1;
  1487. }, function($ctx1) {$ctx1.fill(self,"showComment",{}, smalltalk.HLBrowserModel)})},
  1488. messageSends: ["ifNil:"]}),
  1489. smalltalk.HLBrowserModel);
  1490. smalltalk.addMethod(
  1491. "_showComment_",
  1492. smalltalk.method({
  1493. selector: "showComment:",
  1494. fn: function (aBoolean){
  1495. var self=this;
  1496. return smalltalk.withContext(function($ctx1) { self["@showComment"]=aBoolean;
  1497. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowCommentToggled || HLShowCommentToggled))._new());
  1498. return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  1499. messageSends: ["announce:", "new", "announcer"]}),
  1500. smalltalk.HLBrowserModel);
  1501. smalltalk.addMethod(
  1502. "_showInstance",
  1503. smalltalk.method({
  1504. selector: "showInstance",
  1505. fn: function (){
  1506. var self=this;
  1507. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1508. $2=self["@showInstance"];
  1509. if(($receiver = $2) == nil || $receiver == undefined){
  1510. $1=true;
  1511. } else {
  1512. $1=$2;
  1513. };
  1514. return $1;
  1515. }, function($ctx1) {$ctx1.fill(self,"showInstance",{}, smalltalk.HLBrowserModel)})},
  1516. messageSends: ["ifNil:"]}),
  1517. smalltalk.HLBrowserModel);
  1518. smalltalk.addMethod(
  1519. "_showInstance_",
  1520. smalltalk.method({
  1521. selector: "showInstance:",
  1522. fn: function (aBoolean){
  1523. var self=this;
  1524. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$3;
  1525. self["@showInstance"]=aBoolean;
  1526. $1=_st(self)._selectedClass();
  1527. if(($receiver = $1) == nil || $receiver == undefined){
  1528. $1;
  1529. } else {
  1530. $2=self;
  1531. $4=aBoolean;
  1532. if(smalltalk.assert($4)){
  1533. $3=_st(_st(self)._selectedClass())._theNonMetaClass();
  1534. } else {
  1535. $3=_st(_st(self)._selectedClass())._theMetaClass();
  1536. };
  1537. _st($2)._selectedClass_($3);
  1538. };
  1539. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled))._new());
  1540. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  1541. messageSends: ["ifNotNil:", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "selectedClass", "theMetaClass", "announce:", "new", "announcer"]}),
  1542. smalltalk.HLBrowserModel);
  1543. smalltalk.addMethod(
  1544. "_on_",
  1545. smalltalk.method({
  1546. selector: "on:",
  1547. fn: function (anEnvironment){
  1548. var self=this;
  1549. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1550. $2=_st(self)._new();
  1551. _st($2)._environment_(anEnvironment);
  1552. $3=_st($2)._yourself();
  1553. $1=$3;
  1554. return $1;
  1555. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel.klass)})},
  1556. messageSends: ["environment:", "new", "yourself"]}),
  1557. smalltalk.HLBrowserModel.klass);
  1558. smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'methodContents', 'codeWidget'], 'Helios-Browser');
  1559. smalltalk.addMethod(
  1560. "_codeWidget",
  1561. smalltalk.method({
  1562. selector: "codeWidget",
  1563. fn: function (){
  1564. var self=this;
  1565. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1566. $2=self["@codeWidget"];
  1567. if(($receiver = $2) == nil || $receiver == undefined){
  1568. self["@codeWidget"]=_st((smalltalk.HLCodeWidget || HLCodeWidget))._new();
  1569. $1=self["@codeWidget"];
  1570. } else {
  1571. $1=$2;
  1572. };
  1573. return $1;
  1574. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{}, smalltalk.HLBrowserSourceWidget)})},
  1575. messageSends: ["ifNil:", "new"]}),
  1576. smalltalk.HLBrowserSourceWidget);
  1577. smalltalk.addMethod(
  1578. "_contents",
  1579. smalltalk.method({
  1580. selector: "contents",
  1581. fn: function (){
  1582. var self=this;
  1583. return smalltalk.withContext(function($ctx1) { var $1;
  1584. $1=_st(_st(self)._codeWidget())._contents();
  1585. return $1;
  1586. }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.HLBrowserSourceWidget)})},
  1587. messageSends: ["contents", "codeWidget"]}),
  1588. smalltalk.HLBrowserSourceWidget);
  1589. smalltalk.addMethod(
  1590. "_contents_",
  1591. smalltalk.method({
  1592. selector: "contents:",
  1593. fn: function (aString){
  1594. var self=this;
  1595. return smalltalk.withContext(function($ctx1) { _st(self)._methodContents_(aString);
  1596. _st(_st(self)._codeWidget())._contents_(aString);
  1597. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  1598. messageSends: ["methodContents:", "contents:", "codeWidget"]}),
  1599. smalltalk.HLBrowserSourceWidget);
  1600. smalltalk.addMethod(
  1601. "_hasModification",
  1602. smalltalk.method({
  1603. selector: "hasModification",
  1604. fn: function (){
  1605. var self=this;
  1606. return smalltalk.withContext(function($ctx1) { var $1;
  1607. $1=_st(_st(_st(self)._methodContents()).__eq(_st(self)._contents()))._not();
  1608. return $1;
  1609. }, function($ctx1) {$ctx1.fill(self,"hasModification",{}, smalltalk.HLBrowserSourceWidget)})},
  1610. messageSends: ["not", "=", "contents", "methodContents"]}),
  1611. smalltalk.HLBrowserSourceWidget);
  1612. smalltalk.addMethod(
  1613. "_initialize",
  1614. smalltalk.method({
  1615. selector: "initialize",
  1616. fn: function (){
  1617. var self=this;
  1618. return smalltalk.withContext(function($ctx1) { smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  1619. _st(self)._observeSystem();
  1620. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLBrowserSourceWidget)})},
  1621. messageSends: ["initialize", "observeSystem"]}),
  1622. smalltalk.HLBrowserSourceWidget);
  1623. smalltalk.addMethod(
  1624. "_methodContents",
  1625. smalltalk.method({
  1626. selector: "methodContents",
  1627. fn: function (){
  1628. var self=this;
  1629. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1630. $2=self["@methodContents"];
  1631. if(($receiver = $2) == nil || $receiver == undefined){
  1632. self["@methodContents"]="";
  1633. $1=self["@methodContents"];
  1634. } else {
  1635. $1=$2;
  1636. };
  1637. return $1;
  1638. }, function($ctx1) {$ctx1.fill(self,"methodContents",{}, smalltalk.HLBrowserSourceWidget)})},
  1639. messageSends: ["ifNil:"]}),
  1640. smalltalk.HLBrowserSourceWidget);
  1641. smalltalk.addMethod(
  1642. "_methodContents_",
  1643. smalltalk.method({
  1644. selector: "methodContents:",
  1645. fn: function (aString){
  1646. var self=this;
  1647. return smalltalk.withContext(function($ctx1) { self["@methodContents"]=aString;
  1648. return self}, function($ctx1) {$ctx1.fill(self,"methodContents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  1649. messageSends: []}),
  1650. smalltalk.HLBrowserSourceWidget);
  1651. smalltalk.addMethod(
  1652. "_model",
  1653. smalltalk.method({
  1654. selector: "model",
  1655. fn: function (){
  1656. var self=this;
  1657. return smalltalk.withContext(function($ctx1) { var $1;
  1658. $1=self["@model"];
  1659. return $1;
  1660. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLBrowserSourceWidget)})},
  1661. messageSends: []}),
  1662. smalltalk.HLBrowserSourceWidget);
  1663. smalltalk.addMethod(
  1664. "_model_",
  1665. smalltalk.method({
  1666. selector: "model:",
  1667. fn: function (aBrowserModel){
  1668. var self=this;
  1669. return smalltalk.withContext(function($ctx1) { self["@model"]=aBrowserModel;
  1670. _st(self)._observeModel();
  1671. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget)})},
  1672. messageSends: ["observeModel"]}),
  1673. smalltalk.HLBrowserSourceWidget);
  1674. smalltalk.addMethod(
  1675. "_observeModel",
  1676. smalltalk.method({
  1677. selector: "observeModel",
  1678. fn: function (){
  1679. var self=this;
  1680. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLMethodSelected || HLMethodSelected),(function(ann){
  1681. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodSelected_(_st(ann)._item());
  1682. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1683. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  1684. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  1685. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1686. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  1687. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  1688. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1689. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLBrowserSourceWidget)})},
  1690. messageSends: ["on:do:", "onMethodSelected:", "item", "announcer", "model", "onClassSelected:", "onProtocolSelected:"]}),
  1691. smalltalk.HLBrowserSourceWidget);
  1692. smalltalk.addMethod(
  1693. "_observeSystem",
  1694. smalltalk.method({
  1695. selector: "observeSystem",
  1696. fn: function (){
  1697. var self=this;
  1698. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._on_do_((smalltalk.MethodModified || MethodModified),(function(ann){
  1699. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodModified_(_st(ann)._method());
  1700. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1701. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLBrowserSourceWidget)})},
  1702. messageSends: ["on:do:", "onMethodModified:", "method", "current"]}),
  1703. smalltalk.HLBrowserSourceWidget);
  1704. smalltalk.addMethod(
  1705. "_onClassSelected_",
  1706. smalltalk.method({
  1707. selector: "onClassSelected:",
  1708. fn: function (aClass){
  1709. var self=this;
  1710. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1711. $1=aClass;
  1712. if(($receiver = $1) == nil || $receiver == undefined){
  1713. $2=_st(self)._contents_("");
  1714. return $2;
  1715. } else {
  1716. $1;
  1717. };
  1718. _st(self)._contents_(_st(aClass)._definition());
  1719. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLBrowserSourceWidget)})},
  1720. messageSends: ["ifNil:", "contents:", "definition"]}),
  1721. smalltalk.HLBrowserSourceWidget);
  1722. smalltalk.addMethod(
  1723. "_onMethodModified_",
  1724. smalltalk.method({
  1725. selector: "onMethodModified:",
  1726. fn: function (aMethod){
  1727. var self=this;
  1728. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  1729. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(aMethod)._methodClass());
  1730. if(! smalltalk.assert($1)){
  1731. $2=self;
  1732. return $2;
  1733. };
  1734. $3=_st(_st(_st(_st(self)._model())._selectedMethod())._selector()).__eq(_st(aMethod)._selector());
  1735. if(! smalltalk.assert($3)){
  1736. $4=self;
  1737. return $4;
  1738. };
  1739. _st(self)._refresh();
  1740. return self}, function($ctx1) {$ctx1.fill(self,"onMethodModified:",{aMethod:aMethod}, smalltalk.HLBrowserSourceWidget)})},
  1741. messageSends: ["ifFalse:", "=", "methodClass", "selectedClass", "model", "selector", "selectedMethod", "refresh"]}),
  1742. smalltalk.HLBrowserSourceWidget);
  1743. smalltalk.addMethod(
  1744. "_onMethodSelected_",
  1745. smalltalk.method({
  1746. selector: "onMethodSelected:",
  1747. fn: function (aCompiledMethod){
  1748. var self=this;
  1749. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1750. $1=aCompiledMethod;
  1751. if(($receiver = $1) == nil || $receiver == undefined){
  1752. $2=_st(self)._contents_("");
  1753. return $2;
  1754. } else {
  1755. $1;
  1756. };
  1757. _st(self)._contents_(_st(aCompiledMethod)._source());
  1758. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserSourceWidget)})},
  1759. messageSends: ["ifNil:", "contents:", "source"]}),
  1760. smalltalk.HLBrowserSourceWidget);
  1761. smalltalk.addMethod(
  1762. "_onProtocolSelected_",
  1763. smalltalk.method({
  1764. selector: "onProtocolSelected:",
  1765. fn: function (aString){
  1766. var self=this;
  1767. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1768. $1=_st(_st(self)._model())._selectedClass();
  1769. if(($receiver = $1) == nil || $receiver == undefined){
  1770. $2=_st(self)._contents_("");
  1771. return $2;
  1772. } else {
  1773. $1;
  1774. };
  1775. _st(self)._contents_(_st(_st(_st(self)._model())._selectedClass())._definition());
  1776. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  1777. messageSends: ["ifNil:", "contents:", "selectedClass", "model", "definition"]}),
  1778. smalltalk.HLBrowserSourceWidget);
  1779. smalltalk.addMethod(
  1780. "_refresh",
  1781. smalltalk.method({
  1782. selector: "refresh",
  1783. fn: function (){
  1784. var self=this;
  1785. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1786. $1=_st(self)._hasModification();
  1787. if(smalltalk.assert($1)){
  1788. $2=self;
  1789. return $2;
  1790. };
  1791. _st(self)._contents_(_st(_st(_st(self)._model())._selectedMethod())._source());
  1792. smalltalk.HLWidget.fn.prototype._refresh.apply(_st(self), []);
  1793. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{}, smalltalk.HLBrowserSourceWidget)})},
  1794. messageSends: ["ifTrue:", "hasModification", "contents:", "source", "selectedMethod", "model", "refresh"]}),
  1795. smalltalk.HLBrowserSourceWidget);
  1796. smalltalk.addMethod(
  1797. "_renderContentOn_",
  1798. smalltalk.method({
  1799. selector: "renderContentOn:",
  1800. fn: function (html){
  1801. var self=this;
  1802. return smalltalk.withContext(function($ctx1) { _st(_st(self)._codeWidget())._renderOn_(html);
  1803. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLBrowserSourceWidget)})},
  1804. messageSends: ["renderOn:", "codeWidget"]}),
  1805. smalltalk.HLBrowserSourceWidget);
  1806. smalltalk.addMethod(
  1807. "_on_",
  1808. smalltalk.method({
  1809. selector: "on:",
  1810. fn: function (aBrowserModel){
  1811. var self=this;
  1812. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1813. $2=_st(self)._new();
  1814. _st($2)._model_(aBrowserModel);
  1815. $3=_st($2)._yourself();
  1816. $1=$3;
  1817. return $1;
  1818. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget.klass)})},
  1819. messageSends: ["model:", "new", "yourself"]}),
  1820. smalltalk.HLBrowserSourceWidget.klass);
  1821. smalltalk.addClass('HLClassCache', smalltalk.Object, ['class', 'selectorsCache', 'overrideCache', 'overriddenCache'], 'Helios-Browser');
  1822. smalltalk.addMethod(
  1823. "_invalidateChildrenSelector_",
  1824. smalltalk.method({
  1825. selector: "invalidateChildrenSelector:",
  1826. fn: function (aSelector){
  1827. var self=this;
  1828. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1829. _st(_st(_st(self)._theClass())._subclasses())._do_((function(each){
  1830. return smalltalk.withContext(function($ctx2) { $1=_st(_st(self)._selectorsCache())._cacheFor_(each);
  1831. _st($1)._removeSelector_(aSelector);
  1832. $2=_st($1)._invalidateChildrenSelector_(aSelector);
  1833. return $2;
  1834. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1835. return self}, function($ctx1) {$ctx1.fill(self,"invalidateChildrenSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  1836. messageSends: ["do:", "removeSelector:", "cacheFor:", "selectorsCache", "invalidateChildrenSelector:", "subclasses", "theClass"]}),
  1837. smalltalk.HLClassCache);
  1838. smalltalk.addMethod(
  1839. "_invalidateParentSelector_",
  1840. smalltalk.method({
  1841. selector: "invalidateParentSelector:",
  1842. fn: function (aSelector){
  1843. var self=this;
  1844. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1845. $1=_st(_st(self)._theClass())._superclass();
  1846. if(($receiver = $1) == nil || $receiver == undefined){
  1847. $1;
  1848. } else {
  1849. $2=_st(_st(self)._selectorsCache())._cacheFor_(_st(_st(self)._theClass())._superclass());
  1850. _st($2)._removeSelector_(aSelector);
  1851. $3=_st($2)._invalidateParentSelector_(aSelector);
  1852. $3;
  1853. };
  1854. return self}, function($ctx1) {$ctx1.fill(self,"invalidateParentSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  1855. messageSends: ["ifNotNil:", "removeSelector:", "cacheFor:", "superclass", "theClass", "selectorsCache", "invalidateParentSelector:"]}),
  1856. smalltalk.HLClassCache);
  1857. smalltalk.addMethod(
  1858. "_invalidateSelector_",
  1859. smalltalk.method({
  1860. selector: "invalidateSelector:",
  1861. fn: function (aSelector){
  1862. var self=this;
  1863. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1864. $1=self;
  1865. _st($1)._invalidateParentSelector_(aSelector);
  1866. _st($1)._invalidateChildrenSelector_(aSelector);
  1867. $2=_st($1)._removeSelector_(aSelector);
  1868. return self}, function($ctx1) {$ctx1.fill(self,"invalidateSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  1869. messageSends: ["invalidateParentSelector:", "invalidateChildrenSelector:", "removeSelector:"]}),
  1870. smalltalk.HLClassCache);
  1871. smalltalk.addMethod(
  1872. "_isOverridden_",
  1873. smalltalk.method({
  1874. selector: "isOverridden:",
  1875. fn: function (aMethod){
  1876. var self=this;
  1877. return smalltalk.withContext(function($ctx1) { var $1;
  1878. $1=_st(_st(self)._overriddenCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  1879. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverridden();
  1880. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1881. return $1;
  1882. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  1883. messageSends: ["at:ifAbsentPut:", "selector", "isOverridden", "overriddenCache"]}),
  1884. smalltalk.HLClassCache);
  1885. smalltalk.addMethod(
  1886. "_isOverride_",
  1887. smalltalk.method({
  1888. selector: "isOverride:",
  1889. fn: function (aMethod){
  1890. var self=this;
  1891. return smalltalk.withContext(function($ctx1) { var $1;
  1892. $1=_st(_st(self)._overrideCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  1893. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverride();
  1894. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1895. return $1;
  1896. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  1897. messageSends: ["at:ifAbsentPut:", "selector", "isOverride", "overrideCache"]}),
  1898. smalltalk.HLClassCache);
  1899. smalltalk.addMethod(
  1900. "_overriddenCache",
  1901. smalltalk.method({
  1902. selector: "overriddenCache",
  1903. fn: function (){
  1904. var self=this;
  1905. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1906. $2=self["@overriddenCache"];
  1907. if(($receiver = $2) == nil || $receiver == undefined){
  1908. self["@overriddenCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  1909. $1=self["@overriddenCache"];
  1910. } else {
  1911. $1=$2;
  1912. };
  1913. return $1;
  1914. }, function($ctx1) {$ctx1.fill(self,"overriddenCache",{}, smalltalk.HLClassCache)})},
  1915. messageSends: ["ifNil:", "new"]}),
  1916. smalltalk.HLClassCache);
  1917. smalltalk.addMethod(
  1918. "_overrideCache",
  1919. smalltalk.method({
  1920. selector: "overrideCache",
  1921. fn: function (){
  1922. var self=this;
  1923. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1924. $2=self["@overrideCache"];
  1925. if(($receiver = $2) == nil || $receiver == undefined){
  1926. self["@overrideCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  1927. $1=self["@overrideCache"];
  1928. } else {
  1929. $1=$2;
  1930. };
  1931. return $1;
  1932. }, function($ctx1) {$ctx1.fill(self,"overrideCache",{}, smalltalk.HLClassCache)})},
  1933. messageSends: ["ifNil:", "new"]}),
  1934. smalltalk.HLClassCache);
  1935. smalltalk.addMethod(
  1936. "_removeSelector_",
  1937. smalltalk.method({
  1938. selector: "removeSelector:",
  1939. fn: function (aSelector){
  1940. var self=this;
  1941. return smalltalk.withContext(function($ctx1) { _st(_st(self)._overriddenCache())._removeKey_ifAbsent_(aSelector,(function(){
  1942. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1943. _st(_st(self)._overrideCache())._removeKey_ifAbsent_(aSelector,(function(){
  1944. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1945. return self}, function($ctx1) {$ctx1.fill(self,"removeSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  1946. messageSends: ["removeKey:ifAbsent:", "overriddenCache", "overrideCache"]}),
  1947. smalltalk.HLClassCache);
  1948. smalltalk.addMethod(
  1949. "_selectorsCache",
  1950. smalltalk.method({
  1951. selector: "selectorsCache",
  1952. fn: function (){
  1953. var self=this;
  1954. return smalltalk.withContext(function($ctx1) { var $1;
  1955. $1=self["@selectorsCache"];
  1956. return $1;
  1957. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLClassCache)})},
  1958. messageSends: []}),
  1959. smalltalk.HLClassCache);
  1960. smalltalk.addMethod(
  1961. "_selectorsCache_",
  1962. smalltalk.method({
  1963. selector: "selectorsCache:",
  1964. fn: function (aCache){
  1965. var self=this;
  1966. return smalltalk.withContext(function($ctx1) { self["@selectorsCache"]=aCache;
  1967. return self}, function($ctx1) {$ctx1.fill(self,"selectorsCache:",{aCache:aCache}, smalltalk.HLClassCache)})},
  1968. messageSends: []}),
  1969. smalltalk.HLClassCache);
  1970. smalltalk.addMethod(
  1971. "_theClass",
  1972. smalltalk.method({
  1973. selector: "theClass",
  1974. fn: function (){
  1975. var self=this;
  1976. return smalltalk.withContext(function($ctx1) { var $1;
  1977. $1=self["@class"];
  1978. return $1;
  1979. }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.HLClassCache)})},
  1980. messageSends: []}),
  1981. smalltalk.HLClassCache);
  1982. smalltalk.addMethod(
  1983. "_theClass_",
  1984. smalltalk.method({
  1985. selector: "theClass:",
  1986. fn: function (aClass){
  1987. var self=this;
  1988. return smalltalk.withContext(function($ctx1) { self["@class"]=aClass;
  1989. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.HLClassCache)})},
  1990. messageSends: []}),
  1991. smalltalk.HLClassCache);
  1992. smalltalk.addMethod(
  1993. "_on_selectorsCache_",
  1994. smalltalk.method({
  1995. selector: "on:selectorsCache:",
  1996. fn: function (aClass,aSelectorsCache){
  1997. var self=this;
  1998. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1999. $2=_st(self)._new();
  2000. _st($2)._theClass_(aClass);
  2001. _st($2)._selectorsCache_(aSelectorsCache);
  2002. $3=_st($2)._yourself();
  2003. $1=$3;
  2004. return $1;
  2005. }, function($ctx1) {$ctx1.fill(self,"on:selectorsCache:",{aClass:aClass,aSelectorsCache:aSelectorsCache}, smalltalk.HLClassCache.klass)})},
  2006. messageSends: ["theClass:", "new", "selectorsCache:", "yourself"]}),
  2007. smalltalk.HLClassCache.klass);
  2008. smalltalk.addClass('HLSelectorsCache', smalltalk.Object, ['classesCache'], 'Helios-Browser');
  2009. smalltalk.addMethod(
  2010. "_cacheFor_",
  2011. smalltalk.method({
  2012. selector: "cacheFor:",
  2013. fn: function (aClass){
  2014. var self=this;
  2015. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2016. $1=aClass;
  2017. if(($receiver = $1) == nil || $receiver == undefined){
  2018. return nil;
  2019. } else {
  2020. $1;
  2021. };
  2022. $2=_st(_st(self)._classesCache())._at_ifAbsentPut_(_st(aClass)._name(),(function(){
  2023. return smalltalk.withContext(function($ctx2) { return _st(self)._newCacheFor_(aClass);
  2024. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2025. return $2;
  2026. }, function($ctx1) {$ctx1.fill(self,"cacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2027. messageSends: ["ifNil:", "at:ifAbsentPut:", "name", "newCacheFor:", "classesCache"]}),
  2028. smalltalk.HLSelectorsCache);
  2029. smalltalk.addMethod(
  2030. "_classesCache",
  2031. smalltalk.method({
  2032. selector: "classesCache",
  2033. fn: function (){
  2034. var self=this;
  2035. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2036. $2=self["@classesCache"];
  2037. if(($receiver = $2) == nil || $receiver == undefined){
  2038. self["@classesCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2039. $1=self["@classesCache"];
  2040. } else {
  2041. $1=$2;
  2042. };
  2043. return $1;
  2044. }, function($ctx1) {$ctx1.fill(self,"classesCache",{}, smalltalk.HLSelectorsCache)})},
  2045. messageSends: ["ifNil:", "new"]}),
  2046. smalltalk.HLSelectorsCache);
  2047. smalltalk.addMethod(
  2048. "_initialize",
  2049. smalltalk.method({
  2050. selector: "initialize",
  2051. fn: function (){
  2052. var self=this;
  2053. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  2054. _st(self)._observeSystem();
  2055. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLSelectorsCache)})},
  2056. messageSends: ["initialize", "observeSystem"]}),
  2057. smalltalk.HLSelectorsCache);
  2058. smalltalk.addMethod(
  2059. "_invalidateCacheFor_",
  2060. smalltalk.method({
  2061. selector: "invalidateCacheFor:",
  2062. fn: function (aMethod){
  2063. var self=this;
  2064. return smalltalk.withContext(function($ctx1) { _st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._invalidateSelector_(_st(aMethod)._selector());
  2065. return self}, function($ctx1) {$ctx1.fill(self,"invalidateCacheFor:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2066. messageSends: ["invalidateSelector:", "selector", "cacheFor:", "methodClass"]}),
  2067. smalltalk.HLSelectorsCache);
  2068. smalltalk.addMethod(
  2069. "_isOverridden_",
  2070. smalltalk.method({
  2071. selector: "isOverridden:",
  2072. fn: function (aMethod){
  2073. var self=this;
  2074. return smalltalk.withContext(function($ctx1) { var $1;
  2075. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverridden_(aMethod);
  2076. return $1;
  2077. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2078. messageSends: ["isOverridden:", "cacheFor:", "methodClass"]}),
  2079. smalltalk.HLSelectorsCache);
  2080. smalltalk.addMethod(
  2081. "_isOverride_",
  2082. smalltalk.method({
  2083. selector: "isOverride:",
  2084. fn: function (aMethod){
  2085. var self=this;
  2086. return smalltalk.withContext(function($ctx1) { var $1;
  2087. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverride_(aMethod);
  2088. return $1;
  2089. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2090. messageSends: ["isOverride:", "cacheFor:", "methodClass"]}),
  2091. smalltalk.HLSelectorsCache);
  2092. smalltalk.addMethod(
  2093. "_newCacheFor_",
  2094. smalltalk.method({
  2095. selector: "newCacheFor:",
  2096. fn: function (aClass){
  2097. var self=this;
  2098. return smalltalk.withContext(function($ctx1) { var $1;
  2099. $1=_st((smalltalk.HLClassCache || HLClassCache))._on_selectorsCache_(aClass,self);
  2100. return $1;
  2101. }, function($ctx1) {$ctx1.fill(self,"newCacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2102. messageSends: ["on:selectorsCache:"]}),
  2103. smalltalk.HLSelectorsCache);
  2104. smalltalk.addMethod(
  2105. "_observeSystem",
  2106. smalltalk.method({
  2107. selector: "observeSystem",
  2108. fn: function (){
  2109. var self=this;
  2110. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2111. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  2112. _st($1)._on_do_((smalltalk.MethodAdded || MethodAdded),(function(ann){
  2113. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodAdded_(_st(ann)._method());
  2114. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2115. $2=_st($1)._on_do_((smalltalk.MethodRemoved || MethodRemoved),(function(ann){
  2116. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodRemoved_(_st(ann)._method());
  2117. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2118. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLSelectorsCache)})},
  2119. messageSends: ["on:do:", "onMethodAdded:", "method", "current", "onMethodRemoved:"]}),
  2120. smalltalk.HLSelectorsCache);
  2121. smalltalk.addMethod(
  2122. "_onMethodAdded_",
  2123. smalltalk.method({
  2124. selector: "onMethodAdded:",
  2125. fn: function (aMethod){
  2126. var self=this;
  2127. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2128. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2129. messageSends: ["invalidateCacheFor:"]}),
  2130. smalltalk.HLSelectorsCache);
  2131. smalltalk.addMethod(
  2132. "_onMethodRemoved_",
  2133. smalltalk.method({
  2134. selector: "onMethodRemoved:",
  2135. fn: function (aMethod){
  2136. var self=this;
  2137. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2138. return self}, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2139. messageSends: ["invalidateCacheFor:"]}),
  2140. smalltalk.HLSelectorsCache);
  2141. smalltalk.HLSelectorsCache.klass.iVarNames = ['current'];
  2142. smalltalk.addMethod(
  2143. "_current",
  2144. smalltalk.method({
  2145. selector: "current",
  2146. fn: function (){
  2147. var self=this;
  2148. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2149. $2=self["@current"];
  2150. if(($receiver = $2) == nil || $receiver == undefined){
  2151. self["@current"]=smalltalk.Object.klass.fn.prototype._new.apply(_st(self), []);
  2152. $1=self["@current"];
  2153. } else {
  2154. $1=$2;
  2155. };
  2156. return $1;
  2157. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.HLSelectorsCache.klass)})},
  2158. messageSends: ["ifNil:", "new"]}),
  2159. smalltalk.HLSelectorsCache.klass);
  2160. smalltalk.addMethod(
  2161. "_flush",
  2162. smalltalk.method({
  2163. selector: "flush",
  2164. fn: function (){
  2165. var self=this;
  2166. return smalltalk.withContext(function($ctx1) { self["@current"]=nil;
  2167. return self}, function($ctx1) {$ctx1.fill(self,"flush",{}, smalltalk.HLSelectorsCache.klass)})},
  2168. messageSends: []}),
  2169. smalltalk.HLSelectorsCache.klass);
  2170. smalltalk.addMethod(
  2171. "_new",
  2172. smalltalk.method({
  2173. selector: "new",
  2174. fn: function (){
  2175. var self=this;
  2176. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  2177. return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.HLSelectorsCache.klass)})},
  2178. messageSends: ["shouldNotImplement"]}),
  2179. smalltalk.HLSelectorsCache.klass);
  2180. smalltalk.addMethod(
  2181. "_isOverridden",
  2182. smalltalk.method({
  2183. selector: "isOverridden",
  2184. fn: function (){
  2185. var self=this;
  2186. var selector;
  2187. return smalltalk.withContext(function($ctx1) { var $1;
  2188. var $early={};
  2189. try {
  2190. selector=_st(self)._selector();
  2191. _st(_st(self)._methodClass())._allSubclassesDo_((function(each){
  2192. return smalltalk.withContext(function($ctx2) { $1=_st(each)._includesSelector_(selector);
  2193. if(smalltalk.assert($1)){
  2194. throw $early=[true];
  2195. };
  2196. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2197. return false;
  2198. }
  2199. catch(e) {if(e===$early)return e[0]; throw e}
  2200. }, function($ctx1) {$ctx1.fill(self,"isOverridden",{selector:selector}, smalltalk.CompiledMethod)})},
  2201. messageSends: ["selector", "allSubclassesDo:", "ifTrue:", "includesSelector:", "methodClass"]}),
  2202. smalltalk.CompiledMethod);
  2203. smalltalk.addMethod(
  2204. "_isOverride",
  2205. smalltalk.method({
  2206. selector: "isOverride",
  2207. fn: function (){
  2208. var self=this;
  2209. var superclass;
  2210. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2211. superclass=_st(_st(self)._methodClass())._superclass();
  2212. $1=superclass;
  2213. if(($receiver = $1) == nil || $receiver == undefined){
  2214. return false;
  2215. } else {
  2216. $1;
  2217. };
  2218. $2=_st(_st(_st(_st(self)._methodClass())._superclass())._lookupSelector_(_st(self)._selector()))._notNil();
  2219. return $2;
  2220. }, function($ctx1) {$ctx1.fill(self,"isOverride",{superclass:superclass}, smalltalk.CompiledMethod)})},
  2221. messageSends: ["superclass", "methodClass", "ifNil:", "notNil", "lookupSelector:", "selector"]}),
  2222. smalltalk.CompiledMethod);