Helios-Browser.deploy.js 106 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866
  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. _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. $2=_st($1)._on_do_((smalltalk.HLClassesFocusRequested || HLClassesFocusRequested),(function(ann){
  382. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassesFocusRequested();
  383. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  384. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLClassesListWidget)})},
  385. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model", "onShowInstanceToggled", "onClassSelected:", "onClassesFocusRequested"]}),
  386. smalltalk.HLClassesListWidget);
  387. smalltalk.addMethod(
  388. "_observeSystem",
  389. smalltalk.method({
  390. selector: "observeSystem",
  391. fn: function (){
  392. var self=this;
  393. return smalltalk.withContext(function($ctx1) { var $1,$2;
  394. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  395. _st($1)._on_do_((smalltalk.ClassAdded || ClassAdded),(function(ann){
  396. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassAdded_(_st(ann)._theClass());
  397. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  398. $2=_st($1)._on_do_((smalltalk.ClassRemoved || ClassRemoved),(function(ann){
  399. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassRemoved_(_st(ann)._theClass());
  400. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  401. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLClassesListWidget)})},
  402. messageSends: ["on:do:", "onClassAdded:", "theClass", "current", "onClassRemoved:"]}),
  403. smalltalk.HLClassesListWidget);
  404. smalltalk.addMethod(
  405. "_onClassAdded_",
  406. smalltalk.method({
  407. selector: "onClassAdded:",
  408. fn: function (aClass){
  409. var self=this;
  410. return smalltalk.withContext(function($ctx1) { var $1,$2;
  411. $1=_st(_st(aClass)._package()).__eq(_st(_st(self)._model())._selectedPackage());
  412. if(! smalltalk.assert($1)){
  413. $2=self;
  414. return $2;
  415. };
  416. _st(self)._setItemsForSelectedPackage();
  417. _st(self)._refresh();
  418. return self}, function($ctx1) {$ctx1.fill(self,"onClassAdded:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  419. messageSends: ["ifFalse:", "=", "selectedPackage", "model", "package", "setItemsForSelectedPackage", "refresh"]}),
  420. smalltalk.HLClassesListWidget);
  421. smalltalk.addMethod(
  422. "_onClassRemoved_",
  423. smalltalk.method({
  424. selector: "onClassRemoved:",
  425. fn: function (aClass){
  426. var self=this;
  427. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  428. $1=_st(_st(aClass)._package()).__eq(_st(_st(self)._model())._selectedPackage());
  429. if(! smalltalk.assert($1)){
  430. $2=self;
  431. return $2;
  432. };
  433. $3=_st(aClass).__eq(_st(_st(self)._model())._selectedClass());
  434. if(smalltalk.assert($3)){
  435. _st(self)._selectItem_(nil);
  436. };
  437. _st(self)._setItemsForSelectedPackage();
  438. _st(self)._refresh();
  439. return self}, function($ctx1) {$ctx1.fill(self,"onClassRemoved:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  440. messageSends: ["ifFalse:", "=", "selectedPackage", "model", "package", "ifTrue:", "selectItem:", "selectedClass", "setItemsForSelectedPackage", "refresh"]}),
  441. smalltalk.HLClassesListWidget);
  442. smalltalk.addMethod(
  443. "_onClassSelected_",
  444. smalltalk.method({
  445. selector: "onClassSelected:",
  446. fn: function (aClass){
  447. var self=this;
  448. return smalltalk.withContext(function($ctx1) { var $1,$2;
  449. _st(self)._selectedItem_(aClass);
  450. $1=aClass;
  451. if(($receiver = $1) == nil || $receiver == undefined){
  452. $2=self;
  453. return $2;
  454. } else {
  455. $1;
  456. };
  457. _st(self)._focus();
  458. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  459. messageSends: ["selectedItem:", "ifNil:", "focus"]}),
  460. smalltalk.HLClassesListWidget);
  461. smalltalk.addMethod(
  462. "_onClassesFocusRequested",
  463. smalltalk.method({
  464. selector: "onClassesFocusRequested",
  465. fn: function (){
  466. var self=this;
  467. return smalltalk.withContext(function($ctx1) { _st(self)._focus();
  468. return self}, function($ctx1) {$ctx1.fill(self,"onClassesFocusRequested",{}, smalltalk.HLClassesListWidget)})},
  469. messageSends: ["focus"]}),
  470. smalltalk.HLClassesListWidget);
  471. smalltalk.addMethod(
  472. "_onPackageSelected_",
  473. smalltalk.method({
  474. selector: "onPackageSelected:",
  475. fn: function (aPackage){
  476. var self=this;
  477. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(nil);
  478. _st(self)._setItemsForSelectedPackage();
  479. _st(self)._refresh();
  480. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{aPackage:aPackage}, smalltalk.HLClassesListWidget)})},
  481. messageSends: ["selectedItem:", "setItemsForSelectedPackage", "refresh"]}),
  482. smalltalk.HLClassesListWidget);
  483. smalltalk.addMethod(
  484. "_onShowInstanceToggled",
  485. smalltalk.method({
  486. selector: "onShowInstanceToggled",
  487. fn: function (){
  488. var self=this;
  489. return smalltalk.withContext(function($ctx1) { _st(self)._refresh();
  490. return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{}, smalltalk.HLClassesListWidget)})},
  491. messageSends: ["refresh"]}),
  492. smalltalk.HLClassesListWidget);
  493. smalltalk.addMethod(
  494. "_renderButtonsOn_",
  495. smalltalk.method({
  496. selector: "renderButtonsOn:",
  497. fn: function (html){
  498. var self=this;
  499. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$6,$7,$8,$2,$9,$10;
  500. $1=_st(html)._div();
  501. _st($1)._class_("btn-group");
  502. _st($1)._at_put_("data-toggle","buttons-radio");
  503. $2=_st($1)._with_((function(){
  504. return smalltalk.withContext(function($ctx2) { $3=_st(html)._button();
  505. _st($3)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  506. return smalltalk.withContext(function($ctx3) { _st(str)._nextPutAll_("btn");
  507. $4=_st(self)._showInstance();
  508. if(smalltalk.assert($4)){
  509. return _st(str)._nextPutAll_(" active");
  510. };
  511. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  512. _st($3)._with_("Instance");
  513. $5=_st($3)._onClick_((function(){
  514. return smalltalk.withContext(function($ctx3) { return _st(self)._showInstance_(true);
  515. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  516. $5;
  517. $6=_st(html)._button();
  518. _st($6)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  519. return smalltalk.withContext(function($ctx3) { _st(str)._nextPutAll_("btn");
  520. $7=_st(_st(self)._model())._showInstance();
  521. if(! smalltalk.assert($7)){
  522. return _st(str)._nextPutAll_(" active");
  523. };
  524. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  525. _st($6)._with_("Class");
  526. $8=_st($6)._onClick_((function(){
  527. return smalltalk.withContext(function($ctx3) { return _st(_st(self)._model())._showInstance_(false);
  528. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  529. return $8;
  530. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  531. $9=_st(html)._button();
  532. _st($9)._class_("btn");
  533. _st($9)._at_put_("data-toggle","button");
  534. $10=_st($9)._with_("Comment");
  535. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.HLClassesListWidget)})},
  536. messageSends: ["class:", "div", "at:put:", "with:", "streamContents:", "nextPutAll:", "ifTrue:", "showInstance", "button", "onClick:", "showInstance:", "ifFalse:", "model"]}),
  537. smalltalk.HLClassesListWidget);
  538. smalltalk.addMethod(
  539. "_renderItem_level_on_",
  540. smalltalk.method({
  541. selector: "renderItem:level:on:",
  542. fn: function (aClass,anInteger,html){
  543. var self=this;
  544. var li;
  545. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  546. li=_st(html)._li();
  547. $1=li;
  548. _st($1)._at_put_("list-data",_st(_st(self)._items())._indexOf_(aClass));
  549. _st($1)._class_(_st(self)._cssClassForItem_(aClass));
  550. $2=_st($1)._with_((function(){
  551. return smalltalk.withContext(function($ctx2) { $3=_st(html)._a();
  552. _st($3)._with_((function(){
  553. return smalltalk.withContext(function($ctx3) { _st(_st(html)._tag_("i"))._class_(_st(self)._iconForItem_(aClass));
  554. return _st(self)._renderItemLabel_level_on_(aClass,anInteger,html);
  555. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  556. $4=_st($3)._onClick_((function(){
  557. return smalltalk.withContext(function($ctx3) { return _st(self)._activateListItem_(_st(li)._asJQuery());
  558. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  559. return $4;
  560. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  561. _st(_st(self)._getChildrenOf_(aClass))._do_((function(each){
  562. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_level_on_(each,_st(anInteger).__plus((1)),html);
  563. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  564. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:level:on:",{aClass:aClass,anInteger:anInteger,html:html,li:li}, smalltalk.HLClassesListWidget)})},
  565. messageSends: ["li", "at:put:", "indexOf:", "items", "class:", "cssClassForItem:", "with:", "iconForItem:", "tag:", "renderItemLabel:level:on:", "a", "onClick:", "activateListItem:", "asJQuery", "do:", "renderItem:level:on:", "+", "getChildrenOf:"]}),
  566. smalltalk.HLClassesListWidget);
  567. smalltalk.addMethod(
  568. "_renderItem_on_",
  569. smalltalk.method({
  570. selector: "renderItem:on:",
  571. fn: function (aClass,html){
  572. var self=this;
  573. return smalltalk.withContext(function($ctx1) { smalltalk.HLBrowserListWidget.fn.prototype._renderItem_on_.apply(_st(self), [aClass,html]);
  574. _st(_st(self)._getChildrenOf_(aClass))._do_((function(each){
  575. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_level_on_(each,(1),html);
  576. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  577. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{aClass:aClass,html:html}, smalltalk.HLClassesListWidget)})},
  578. messageSends: ["renderItem:on:", "do:", "renderItem:level:on:", "getChildrenOf:"]}),
  579. smalltalk.HLClassesListWidget);
  580. smalltalk.addMethod(
  581. "_renderItemLabel_level_on_",
  582. smalltalk.method({
  583. selector: "renderItemLabel:level:on:",
  584. fn: function (aClass,anInteger,html){
  585. var self=this;
  586. return smalltalk.withContext(function($ctx1) { _st(_st(_st(html)._span())._asJQuery())._html_(_st((smalltalk.String || String))._streamContents_((function(str){
  587. return smalltalk.withContext(function($ctx2) { _st(anInteger)._timesRepeat_((function(){
  588. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("    ");
  589. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  590. return _st(str)._nextPutAll_(_st(aClass)._name());
  591. }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1)})})));
  592. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:level:on:",{aClass:aClass,anInteger:anInteger,html:html}, smalltalk.HLClassesListWidget)})},
  593. messageSends: ["html:", "streamContents:", "timesRepeat:", "nextPutAll:", "name", "asJQuery", "span"]}),
  594. smalltalk.HLClassesListWidget);
  595. smalltalk.addMethod(
  596. "_renderItemLabel_on_",
  597. smalltalk.method({
  598. selector: "renderItemLabel:on:",
  599. fn: function (aClass,html){
  600. var self=this;
  601. return smalltalk.withContext(function($ctx1) { _st(self)._renderItemLabel_level_on_(aClass,(0),html);
  602. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aClass:aClass,html:html}, smalltalk.HLClassesListWidget)})},
  603. messageSends: ["renderItemLabel:level:on:"]}),
  604. smalltalk.HLClassesListWidget);
  605. smalltalk.addMethod(
  606. "_renderListOn_",
  607. smalltalk.method({
  608. selector: "renderListOn:",
  609. fn: function (html){
  610. var self=this;
  611. return smalltalk.withContext(function($ctx1) { _st(_st(self)._getRootClassesOf_(_st(self)._items()))._do_((function(each){
  612. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_on_(each,html);
  613. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  614. return self}, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html}, smalltalk.HLClassesListWidget)})},
  615. messageSends: ["do:", "renderItem:on:", "getRootClassesOf:", "items"]}),
  616. smalltalk.HLClassesListWidget);
  617. smalltalk.addMethod(
  618. "_selectItem_",
  619. smalltalk.method({
  620. selector: "selectItem:",
  621. fn: function (aClass){
  622. var self=this;
  623. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedClass_(aClass);
  624. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  625. messageSends: ["selectedClass:", "model"]}),
  626. smalltalk.HLClassesListWidget);
  627. smalltalk.addMethod(
  628. "_setItemsForPackage_",
  629. smalltalk.method({
  630. selector: "setItemsForPackage:",
  631. fn: function (aPackage){
  632. var self=this;
  633. return smalltalk.withContext(function($ctx1) { var $1,$3,$2;
  634. $1=self;
  635. $3=aPackage;
  636. if(($receiver = $3) == nil || $receiver == undefined){
  637. $2=[];
  638. } else {
  639. $2=_st(_st(_st(_st(_st(aPackage)._classes())._collect_((function(each){
  640. return smalltalk.withContext(function($ctx2) { return _st(each)._theNonMetaClass();
  641. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet())._asArray())._sort_((function(a,b){
  642. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._name()).__lt(_st(b)._name());
  643. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  644. };
  645. _st($1)._items_($2);
  646. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForPackage:",{aPackage:aPackage}, smalltalk.HLClassesListWidget)})},
  647. messageSends: ["items:", "ifNil:ifNotNil:", "sort:", "<", "name", "asArray", "asSet", "collect:", "theNonMetaClass", "classes"]}),
  648. smalltalk.HLClassesListWidget);
  649. smalltalk.addMethod(
  650. "_setItemsForSelectedPackage",
  651. smalltalk.method({
  652. selector: "setItemsForSelectedPackage",
  653. fn: function (){
  654. var self=this;
  655. return smalltalk.withContext(function($ctx1) { _st(self)._setItemsForPackage_(_st(_st(self)._model())._selectedPackage());
  656. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedPackage",{}, smalltalk.HLClassesListWidget)})},
  657. messageSends: ["setItemsForPackage:", "selectedPackage", "model"]}),
  658. smalltalk.HLClassesListWidget);
  659. smalltalk.addMethod(
  660. "_showInstance",
  661. smalltalk.method({
  662. selector: "showInstance",
  663. fn: function (){
  664. var self=this;
  665. return smalltalk.withContext(function($ctx1) { var $1;
  666. $1=_st(_st(self)._model())._showInstance();
  667. return $1;
  668. }, function($ctx1) {$ctx1.fill(self,"showInstance",{}, smalltalk.HLClassesListWidget)})},
  669. messageSends: ["showInstance", "model"]}),
  670. smalltalk.HLClassesListWidget);
  671. smalltalk.addMethod(
  672. "_showInstance_",
  673. smalltalk.method({
  674. selector: "showInstance:",
  675. fn: function (aBoolean){
  676. var self=this;
  677. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._showInstance_(aBoolean);
  678. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean}, smalltalk.HLClassesListWidget)})},
  679. messageSends: ["showInstance:", "model"]}),
  680. smalltalk.HLClassesListWidget);
  681. smalltalk.addClass('HLMethodsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  682. smalltalk.addMethod(
  683. "_allProtocol",
  684. smalltalk.method({
  685. selector: "allProtocol",
  686. fn: function (){
  687. var self=this;
  688. return smalltalk.withContext(function($ctx1) { var $1;
  689. $1=_st(_st(self)._model())._allProtocol();
  690. return $1;
  691. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLMethodsListWidget)})},
  692. messageSends: ["allProtocol", "model"]}),
  693. smalltalk.HLMethodsListWidget);
  694. smalltalk.addMethod(
  695. "_flushSelectorsCache",
  696. smalltalk.method({
  697. selector: "flushSelectorsCache",
  698. fn: function (){
  699. var self=this;
  700. return smalltalk.withContext(function($ctx1) { self["@selectorsCache"]=_st((smalltalk.Dictionary || Dictionary))._new();
  701. return self}, function($ctx1) {$ctx1.fill(self,"flushSelectorsCache",{}, smalltalk.HLMethodsListWidget)})},
  702. messageSends: ["new"]}),
  703. smalltalk.HLMethodsListWidget);
  704. smalltalk.addMethod(
  705. "_iconForItem_",
  706. smalltalk.method({
  707. selector: "iconForItem:",
  708. fn: function (aSelector){
  709. var self=this;
  710. var override,overriden,method;
  711. return smalltalk.withContext(function($ctx1) { var $2,$3,$4,$1;
  712. method=_st(self)._methodForSelector_(aSelector);
  713. override=_st(self)._isOverride_(method);
  714. overriden=_st(self)._isOverridden_(method);
  715. $2=override;
  716. if(smalltalk.assert($2)){
  717. $3=overriden;
  718. if(smalltalk.assert($3)){
  719. $1="icon-resize-vertical";
  720. } else {
  721. $1="icon-arrow-up";
  722. };
  723. } else {
  724. $4=overriden;
  725. if(smalltalk.assert($4)){
  726. $1="icon-arrow-down";
  727. } else {
  728. $1="icon-none";
  729. };
  730. };
  731. return $1;
  732. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{aSelector:aSelector,override:override,overriden:overriden,method:method}, smalltalk.HLMethodsListWidget)})},
  733. messageSends: ["methodForSelector:", "isOverride:", "isOverridden:", "ifTrue:ifFalse:"]}),
  734. smalltalk.HLMethodsListWidget);
  735. smalltalk.addMethod(
  736. "_initialize",
  737. smalltalk.method({
  738. selector: "initialize",
  739. fn: function (){
  740. var self=this;
  741. return smalltalk.withContext(function($ctx1) { smalltalk.HLBrowserListWidget.fn.prototype._initialize.apply(_st(self), []);
  742. _st(self)._flushSelectorsCache();
  743. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLMethodsListWidget)})},
  744. messageSends: ["initialize", "flushSelectorsCache"]}),
  745. smalltalk.HLMethodsListWidget);
  746. smalltalk.addMethod(
  747. "_isOverridden_",
  748. smalltalk.method({
  749. selector: "isOverridden:",
  750. fn: function (aMethod){
  751. var self=this;
  752. return smalltalk.withContext(function($ctx1) { var $1;
  753. $1=_st(_st(self)._selectorsCache())._isOverridden_(aMethod);
  754. return $1;
  755. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  756. messageSends: ["isOverridden:", "selectorsCache"]}),
  757. smalltalk.HLMethodsListWidget);
  758. smalltalk.addMethod(
  759. "_isOverride_",
  760. smalltalk.method({
  761. selector: "isOverride:",
  762. fn: function (aMethod){
  763. var self=this;
  764. return smalltalk.withContext(function($ctx1) { var $1;
  765. $1=_st(_st(self)._selectorsCache())._isOverride_(aMethod);
  766. return $1;
  767. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  768. messageSends: ["isOverride:", "selectorsCache"]}),
  769. smalltalk.HLMethodsListWidget);
  770. smalltalk.addMethod(
  771. "_methodForSelector_",
  772. smalltalk.method({
  773. selector: "methodForSelector:",
  774. fn: function (aSelector){
  775. var self=this;
  776. return smalltalk.withContext(function($ctx1) { var $1;
  777. $1=_st(_st(_st(_st(self)._model())._selectedClass())._methodDictionary())._at_(aSelector);
  778. return $1;
  779. }, function($ctx1) {$ctx1.fill(self,"methodForSelector:",{aSelector:aSelector}, smalltalk.HLMethodsListWidget)})},
  780. messageSends: ["at:", "methodDictionary", "selectedClass", "model"]}),
  781. smalltalk.HLMethodsListWidget);
  782. smalltalk.addMethod(
  783. "_methodsInProtocol_",
  784. smalltalk.method({
  785. selector: "methodsInProtocol:",
  786. fn: function (aString){
  787. var self=this;
  788. return smalltalk.withContext(function($ctx1) { var $1,$3,$2;
  789. $1=_st(_st(self)._model())._selectedClass();
  790. if(($receiver = $1) == nil || $receiver == undefined){
  791. return [];
  792. } else {
  793. $1;
  794. };
  795. $3=_st(aString).__eq(_st(self)._allProtocol());
  796. if(smalltalk.assert($3)){
  797. $2=_st(_st(_st(self)._model())._selectedClass())._methods();
  798. } else {
  799. $2=_st(_st(_st(self)._model())._selectedClass())._methodsInProtocol_(aString);
  800. };
  801. return $2;
  802. }, function($ctx1) {$ctx1.fill(self,"methodsInProtocol:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  803. messageSends: ["ifNil:", "selectedClass", "model", "ifTrue:ifFalse:", "methods", "methodsInProtocol:", "=", "allProtocol"]}),
  804. smalltalk.HLMethodsListWidget);
  805. smalltalk.addMethod(
  806. "_observeModel",
  807. smalltalk.method({
  808. selector: "observeModel",
  809. fn: function (){
  810. var self=this;
  811. return smalltalk.withContext(function($ctx1) { var $1,$2;
  812. $1=_st(_st(self)._model())._announcer();
  813. _st($1)._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  814. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  815. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  816. _st($1)._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  817. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(nil);
  818. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  819. _st($1)._on_do_((smalltalk.HLMethodSelected || HLMethodSelected),(function(ann){
  820. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodSelected_(_st(ann)._item());
  821. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  822. $2=_st($1)._on_do_((smalltalk.HLMethodsFocusRequested || HLMethodsFocusRequested),(function(ann){
  823. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodsFocusRequested();
  824. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  825. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLMethodsListWidget)})},
  826. messageSends: ["on:do:", "onProtocolSelected:", "item", "announcer", "model", "onMethodSelected:", "onMethodsFocusRequested"]}),
  827. smalltalk.HLMethodsListWidget);
  828. smalltalk.addMethod(
  829. "_observeSystem",
  830. smalltalk.method({
  831. selector: "observeSystem",
  832. fn: function (){
  833. var self=this;
  834. return smalltalk.withContext(function($ctx1) { var $1,$2;
  835. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  836. _st($1)._on_do_((smalltalk.MethodAdded || MethodAdded),(function(ann){
  837. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodAdded_(_st(ann)._method());
  838. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  839. $2=_st($1)._on_do_((smalltalk.MethodRemoved || MethodRemoved),(function(ann){
  840. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodRemoved_(_st(ann)._method());
  841. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  842. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLMethodsListWidget)})},
  843. messageSends: ["on:do:", "onMethodAdded:", "method", "current", "onMethodRemoved:"]}),
  844. smalltalk.HLMethodsListWidget);
  845. smalltalk.addMethod(
  846. "_onMethodAdded_",
  847. smalltalk.method({
  848. selector: "onMethodAdded:",
  849. fn: function (aMethod){
  850. var self=this;
  851. return smalltalk.withContext(function($ctx1) { var $1,$2;
  852. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(aMethod)._methodClass());
  853. if(! smalltalk.assert($1)){
  854. $2=self;
  855. return $2;
  856. };
  857. _st(self)._setItemsForSelectedProtocol();
  858. _st(self)._refresh();
  859. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  860. messageSends: ["ifFalse:", "=", "methodClass", "selectedClass", "model", "setItemsForSelectedProtocol", "refresh"]}),
  861. smalltalk.HLMethodsListWidget);
  862. smalltalk.addMethod(
  863. "_onMethodRemoved_",
  864. smalltalk.method({
  865. selector: "onMethodRemoved:",
  866. fn: function (aMethod){
  867. var self=this;
  868. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  869. var $early={};
  870. try {
  871. _st(_st(self)._items())._detect_ifNone_((function(each){
  872. return smalltalk.withContext(function($ctx2) { return _st(each).__eq(_st(aMethod)._selector());
  873. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  874. return smalltalk.withContext(function($ctx2) { $1=self;
  875. throw $early=[$1];
  876. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  877. $2=_st(self)._selectedItem();
  878. if(($receiver = $2) == nil || $receiver == undefined){
  879. $2;
  880. } else {
  881. $3=_st(_st(_st(aMethod)._methodClass()).__eq(_st(_st(self)._model())._selectedClass()))._and_((function(){
  882. return smalltalk.withContext(function($ctx2) { return _st(_st(aMethod)._selector()).__eq(_st(_st(self)._selectedItem())._selector());
  883. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  884. if(smalltalk.assert($3)){
  885. _st(self)._selectItem_(nil);
  886. };
  887. };
  888. _st(self)._setItemsForSelectedProtocol();
  889. _st(self)._refresh();
  890. return self}
  891. catch(e) {if(e===$early)return e[0]; throw e}
  892. }, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  893. messageSends: ["detect:ifNone:", "=", "selector", "items", "ifNotNil:", "ifTrue:", "selectItem:", "and:", "selectedItem", "selectedClass", "model", "methodClass", "setItemsForSelectedProtocol", "refresh"]}),
  894. smalltalk.HLMethodsListWidget);
  895. smalltalk.addMethod(
  896. "_onMethodSelected_",
  897. smalltalk.method({
  898. selector: "onMethodSelected:",
  899. fn: function (aMethod){
  900. var self=this;
  901. return smalltalk.withContext(function($ctx1) { var $1,$2;
  902. _st(self)._selectedItem_(aMethod);
  903. $1=aMethod;
  904. if(($receiver = $1) == nil || $receiver == undefined){
  905. $2=self;
  906. return $2;
  907. } else {
  908. $1;
  909. };
  910. _st(self)._focus();
  911. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  912. messageSends: ["selectedItem:", "ifNil:", "focus"]}),
  913. smalltalk.HLMethodsListWidget);
  914. smalltalk.addMethod(
  915. "_onMethodsFocusRequested",
  916. smalltalk.method({
  917. selector: "onMethodsFocusRequested",
  918. fn: function (){
  919. var self=this;
  920. return smalltalk.withContext(function($ctx1) { _st(self)._focus();
  921. return self}, function($ctx1) {$ctx1.fill(self,"onMethodsFocusRequested",{}, smalltalk.HLMethodsListWidget)})},
  922. messageSends: ["focus"]}),
  923. smalltalk.HLMethodsListWidget);
  924. smalltalk.addMethod(
  925. "_onProtocolSelected_",
  926. smalltalk.method({
  927. selector: "onProtocolSelected:",
  928. fn: function (aString){
  929. var self=this;
  930. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(nil);
  931. _st(self)._setItemsForSelectedProtocol();
  932. _st(self)._refresh();
  933. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  934. messageSends: ["selectedItem:", "setItemsForSelectedProtocol", "refresh"]}),
  935. smalltalk.HLMethodsListWidget);
  936. smalltalk.addMethod(
  937. "_overrideSelectors",
  938. smalltalk.method({
  939. selector: "overrideSelectors",
  940. fn: function (){
  941. var self=this;
  942. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  943. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("override",(function(){
  944. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(_st(self)._model())._selectedClass())._allSuperclasses())._inject_into_(_st((smalltalk.Set || Set))._new(),(function(acc,each){
  945. return smalltalk.withContext(function($ctx3) { $2=acc;
  946. _st($2)._addAll_(_st(each)._selectors());
  947. $3=_st($2)._yourself();
  948. return $3;
  949. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  950. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  951. return $1;
  952. }, function($ctx1) {$ctx1.fill(self,"overrideSelectors",{}, smalltalk.HLMethodsListWidget)})},
  953. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSuperclasses", "selectedClass", "model", "selectorsCache"]}),
  954. smalltalk.HLMethodsListWidget);
  955. smalltalk.addMethod(
  956. "_overridenSelectors",
  957. smalltalk.method({
  958. selector: "overridenSelectors",
  959. fn: function (){
  960. var self=this;
  961. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  962. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("overriden",(function(){
  963. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(_st(self)._model())._selectedClass())._allSubclasses())._inject_into_(_st((smalltalk.Set || Set))._new(),(function(acc,each){
  964. return smalltalk.withContext(function($ctx3) { $2=acc;
  965. _st($2)._addAll_(_st(each)._selectors());
  966. $3=_st($2)._yourself();
  967. return $3;
  968. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  969. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  970. return $1;
  971. }, function($ctx1) {$ctx1.fill(self,"overridenSelectors",{}, smalltalk.HLMethodsListWidget)})},
  972. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSubclasses", "selectedClass", "model", "selectorsCache"]}),
  973. smalltalk.HLMethodsListWidget);
  974. smalltalk.addMethod(
  975. "_renderContentOn_",
  976. smalltalk.method({
  977. selector: "renderContentOn:",
  978. fn: function (html){
  979. var self=this;
  980. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  981. $1=_st(_st(self)._model())._showInstance();
  982. if(smalltalk.assert($1)){
  983. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  984. } else {
  985. $2=_st(html)._div();
  986. _st($2)._class_("class_side");
  987. $3=_st($2)._with_((function(){
  988. return smalltalk.withContext(function($ctx2) { return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  989. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  990. $3;
  991. };
  992. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLMethodsListWidget)})},
  993. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"]}),
  994. smalltalk.HLMethodsListWidget);
  995. smalltalk.addMethod(
  996. "_renderItemLabel_on_",
  997. smalltalk.method({
  998. selector: "renderItemLabel:on:",
  999. fn: function (aSelector,html){
  1000. var self=this;
  1001. return smalltalk.withContext(function($ctx1) { _st(html)._with_(aSelector);
  1002. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aSelector:aSelector,html:html}, smalltalk.HLMethodsListWidget)})},
  1003. messageSends: ["with:"]}),
  1004. smalltalk.HLMethodsListWidget);
  1005. smalltalk.addMethod(
  1006. "_selectItem_",
  1007. smalltalk.method({
  1008. selector: "selectItem:",
  1009. fn: function (aSelector){
  1010. var self=this;
  1011. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1012. $1=aSelector;
  1013. if(($receiver = $1) == nil || $receiver == undefined){
  1014. $2=_st(_st(self)._model())._selectedMethod_(nil);
  1015. return $2;
  1016. } else {
  1017. $1;
  1018. };
  1019. _st(_st(self)._model())._selectedMethod_(_st(self)._methodForSelector_(aSelector));
  1020. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aSelector:aSelector}, smalltalk.HLMethodsListWidget)})},
  1021. messageSends: ["ifNil:", "selectedMethod:", "model", "methodForSelector:"]}),
  1022. smalltalk.HLMethodsListWidget);
  1023. smalltalk.addMethod(
  1024. "_selectorsCache",
  1025. smalltalk.method({
  1026. selector: "selectorsCache",
  1027. fn: function (){
  1028. var self=this;
  1029. return smalltalk.withContext(function($ctx1) { var $1;
  1030. $1=_st(_st(self)._class())._selectorsCache();
  1031. return $1;
  1032. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLMethodsListWidget)})},
  1033. messageSends: ["selectorsCache", "class"]}),
  1034. smalltalk.HLMethodsListWidget);
  1035. smalltalk.addMethod(
  1036. "_selectorsInProtocol_",
  1037. smalltalk.method({
  1038. selector: "selectorsInProtocol:",
  1039. fn: function (aString){
  1040. var self=this;
  1041. return smalltalk.withContext(function($ctx1) { var $1;
  1042. $1=_st(_st(self)._methodsInProtocol_(aString))._collect_((function(each){
  1043. return smalltalk.withContext(function($ctx2) { return _st(each)._selector();
  1044. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1045. return $1;
  1046. }, function($ctx1) {$ctx1.fill(self,"selectorsInProtocol:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  1047. messageSends: ["collect:", "selector", "methodsInProtocol:"]}),
  1048. smalltalk.HLMethodsListWidget);
  1049. smalltalk.addMethod(
  1050. "_setItemsForProtocol_",
  1051. smalltalk.method({
  1052. selector: "setItemsForProtocol:",
  1053. fn: function (aString){
  1054. var self=this;
  1055. return smalltalk.withContext(function($ctx1) { var $2,$4,$3,$1;
  1056. $2=self;
  1057. $4=aString;
  1058. if(($receiver = $4) == nil || $receiver == undefined){
  1059. $3=[];
  1060. } else {
  1061. $3=_st(self)._selectorsInProtocol_(aString);
  1062. };
  1063. $1=_st($2)._items_($3);
  1064. return $1;
  1065. }, function($ctx1) {$ctx1.fill(self,"setItemsForProtocol:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  1066. messageSends: ["items:", "ifNil:ifNotNil:", "selectorsInProtocol:"]}),
  1067. smalltalk.HLMethodsListWidget);
  1068. smalltalk.addMethod(
  1069. "_setItemsForSelectedProtocol",
  1070. smalltalk.method({
  1071. selector: "setItemsForSelectedProtocol",
  1072. fn: function (){
  1073. var self=this;
  1074. return smalltalk.withContext(function($ctx1) { _st(self)._setItemsForProtocol_(_st(_st(self)._model())._selectedProtocol());
  1075. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedProtocol",{}, smalltalk.HLMethodsListWidget)})},
  1076. messageSends: ["setItemsForProtocol:", "selectedProtocol", "model"]}),
  1077. smalltalk.HLMethodsListWidget);
  1078. smalltalk.HLMethodsListWidget.klass.iVarNames = ['selectorsCache'];
  1079. smalltalk.addMethod(
  1080. "_selectorsCache",
  1081. smalltalk.method({
  1082. selector: "selectorsCache",
  1083. fn: function (){
  1084. var self=this;
  1085. return smalltalk.withContext(function($ctx1) { var $1;
  1086. $1=_st((smalltalk.HLSelectorsCache || HLSelectorsCache))._current();
  1087. return $1;
  1088. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLMethodsListWidget.klass)})},
  1089. messageSends: ["current"]}),
  1090. smalltalk.HLMethodsListWidget.klass);
  1091. smalltalk.addClass('HLPackagesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1092. smalltalk.addMethod(
  1093. "_focusClassesListWidget",
  1094. smalltalk.method({
  1095. selector: "focusClassesListWidget",
  1096. fn: function (){
  1097. var self=this;
  1098. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._announce_(_st((smalltalk.HLClassesListFocus || HLClassesListFocus))._new());
  1099. return self}, function($ctx1) {$ctx1.fill(self,"focusClassesListWidget",{}, smalltalk.HLPackagesListWidget)})},
  1100. messageSends: ["announce:", "new", "announcer", "model"]}),
  1101. smalltalk.HLPackagesListWidget);
  1102. smalltalk.addMethod(
  1103. "_initializeItems",
  1104. smalltalk.method({
  1105. selector: "initializeItems",
  1106. fn: function (){
  1107. var self=this;
  1108. return smalltalk.withContext(function($ctx1) { var $1;
  1109. self["@items"]=_st(_st(_st(self)._model())._packages())._sort_((function(a,b){
  1110. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._name()).__lt(_st(b)._name());
  1111. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  1112. $1=self["@items"];
  1113. return $1;
  1114. }, function($ctx1) {$ctx1.fill(self,"initializeItems",{}, smalltalk.HLPackagesListWidget)})},
  1115. messageSends: ["sort:", "<", "name", "packages", "model"]}),
  1116. smalltalk.HLPackagesListWidget);
  1117. smalltalk.addMethod(
  1118. "_items",
  1119. smalltalk.method({
  1120. selector: "items",
  1121. fn: function (){
  1122. var self=this;
  1123. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1124. $2=self["@items"];
  1125. if(($receiver = $2) == nil || $receiver == undefined){
  1126. $1=_st(self)._initializeItems();
  1127. } else {
  1128. $1=$2;
  1129. };
  1130. return $1;
  1131. }, function($ctx1) {$ctx1.fill(self,"items",{}, smalltalk.HLPackagesListWidget)})},
  1132. messageSends: ["ifNil:", "initializeItems"]}),
  1133. smalltalk.HLPackagesListWidget);
  1134. smalltalk.addMethod(
  1135. "_observeModel",
  1136. smalltalk.method({
  1137. selector: "observeModel",
  1138. fn: function (){
  1139. var self=this;
  1140. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1141. $1=_st(_st(self)._model())._announcer();
  1142. _st($1)._on_do_((smalltalk.HLPackageSelected || HLPackageSelected),(function(ann){
  1143. return smalltalk.withContext(function($ctx2) { return _st(self)._onPackageSelected_(_st(ann)._item());
  1144. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1145. $2=_st($1)._on_do_((smalltalk.HLPackagesFocusRequested || HLPackagesFocusRequested),(function(ann){
  1146. return smalltalk.withContext(function($ctx2) { return _st(self)._onPackagesFocusRequested();
  1147. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1148. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLPackagesListWidget)})},
  1149. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model", "onPackagesFocusRequested"]}),
  1150. smalltalk.HLPackagesListWidget);
  1151. smalltalk.addMethod(
  1152. "_onPackageSelected_",
  1153. smalltalk.method({
  1154. selector: "onPackageSelected:",
  1155. fn: function (aPackage){
  1156. var self=this;
  1157. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(aPackage);
  1158. _st(self)._focus();
  1159. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{aPackage:aPackage}, smalltalk.HLPackagesListWidget)})},
  1160. messageSends: ["selectedItem:", "focus"]}),
  1161. smalltalk.HLPackagesListWidget);
  1162. smalltalk.addMethod(
  1163. "_onPackagesFocusRequested",
  1164. smalltalk.method({
  1165. selector: "onPackagesFocusRequested",
  1166. fn: function (){
  1167. var self=this;
  1168. return smalltalk.withContext(function($ctx1) { _st(self)._focus();
  1169. return self}, function($ctx1) {$ctx1.fill(self,"onPackagesFocusRequested",{}, smalltalk.HLPackagesListWidget)})},
  1170. messageSends: ["focus"]}),
  1171. smalltalk.HLPackagesListWidget);
  1172. smalltalk.addMethod(
  1173. "_renderButtonsOn_",
  1174. smalltalk.method({
  1175. selector: "renderButtonsOn:",
  1176. fn: function (html){
  1177. var self=this;
  1178. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$5,$6,$7,$8,$4,$9,$10;
  1179. $1=_st(html)._span();
  1180. _st($1)._class_("info");
  1181. $2=_st($1)._with_("Auto commit");
  1182. $3=_st(html)._div();
  1183. _st($3)._class_("btn-group switch");
  1184. _st($3)._at_put_("data-toggle","buttons-radio");
  1185. $4=_st($3)._with_((function(){
  1186. return smalltalk.withContext(function($ctx2) { $5=_st(html)._button();
  1187. _st($5)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  1188. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("btn");
  1189. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1190. $6=_st($5)._with_("On");
  1191. $6;
  1192. $7=_st(html)._button();
  1193. _st($7)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  1194. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("btn active");
  1195. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1196. $8=_st($7)._with_("Off");
  1197. return $8;
  1198. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1199. $9=_st(html)._a();
  1200. _st($9)._class_("btn");
  1201. $10=_st($9)._with_("Commit");
  1202. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.HLPackagesListWidget)})},
  1203. messageSends: ["class:", "span", "with:", "div", "at:put:", "streamContents:", "nextPutAll:", "button", "a"]}),
  1204. smalltalk.HLPackagesListWidget);
  1205. smalltalk.addMethod(
  1206. "_selectItem_",
  1207. smalltalk.method({
  1208. selector: "selectItem:",
  1209. fn: function (aPackage){
  1210. var self=this;
  1211. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedPackage_(aPackage);
  1212. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aPackage:aPackage}, smalltalk.HLPackagesListWidget)})},
  1213. messageSends: ["selectedPackage:", "model"]}),
  1214. smalltalk.HLPackagesListWidget);
  1215. smalltalk.addClass('HLProtocolsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1216. smalltalk.addMethod(
  1217. "_allProtocol",
  1218. smalltalk.method({
  1219. selector: "allProtocol",
  1220. fn: function (){
  1221. var self=this;
  1222. return smalltalk.withContext(function($ctx1) { var $1;
  1223. $1=_st(_st(self)._model())._allProtocol();
  1224. return $1;
  1225. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLProtocolsListWidget)})},
  1226. messageSends: ["allProtocol", "model"]}),
  1227. smalltalk.HLProtocolsListWidget);
  1228. smalltalk.addMethod(
  1229. "_observeModel",
  1230. smalltalk.method({
  1231. selector: "observeModel",
  1232. fn: function (){
  1233. var self=this;
  1234. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1235. $1=_st(_st(self)._model())._announcer();
  1236. _st($1)._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  1237. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  1238. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1239. _st($1)._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  1240. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(_st(self)._model())._selectedClass());
  1241. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1242. _st($1)._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  1243. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  1244. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1245. $2=_st($1)._on_do_((smalltalk.HLProtocolsFocusRequested || HLProtocolsFocusRequested),(function(ann){
  1246. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolsFocusRequested();
  1247. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1248. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLProtocolsListWidget)})},
  1249. messageSends: ["on:do:", "onClassSelected:", "item", "announcer", "model", "selectedClass", "onProtocolSelected:", "onProtocolsFocusRequested"]}),
  1250. smalltalk.HLProtocolsListWidget);
  1251. smalltalk.addMethod(
  1252. "_observeSystem",
  1253. smalltalk.method({
  1254. selector: "observeSystem",
  1255. fn: function (){
  1256. var self=this;
  1257. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1258. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  1259. _st($1)._on_do_((smalltalk.ProtocolAdded || ProtocolAdded),(function(ann){
  1260. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolAdded_to_(_st(ann)._protocol(),_st(ann)._theClass());
  1261. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1262. $2=_st($1)._on_do_((smalltalk.ProtocolRemoved || ProtocolRemoved),(function(ann){
  1263. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolRemoved_from_(_st(ann)._protocol(),_st(ann)._theClass());
  1264. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1265. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLProtocolsListWidget)})},
  1266. messageSends: ["on:do:", "onProtocolAdded:to:", "protocol", "theClass", "current", "onProtocolRemoved:from:"]}),
  1267. smalltalk.HLProtocolsListWidget);
  1268. smalltalk.addMethod(
  1269. "_onClassSelected_",
  1270. smalltalk.method({
  1271. selector: "onClassSelected:",
  1272. fn: function (aClass){
  1273. var self=this;
  1274. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(nil);
  1275. _st(self)._setItemsForSelectedClass();
  1276. _st(self)._refresh();
  1277. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLProtocolsListWidget)})},
  1278. messageSends: ["selectedItem:", "setItemsForSelectedClass", "refresh"]}),
  1279. smalltalk.HLProtocolsListWidget);
  1280. smalltalk.addMethod(
  1281. "_onProtocolAdded_to_",
  1282. smalltalk.method({
  1283. selector: "onProtocolAdded:to:",
  1284. fn: function (aString,aClass){
  1285. var self=this;
  1286. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1287. $1=_st(aClass).__eq(_st(_st(self)._model())._selectedClass());
  1288. if(! smalltalk.assert($1)){
  1289. $2=self;
  1290. return $2;
  1291. };
  1292. _st(self)._setItemsForSelectedClass();
  1293. _st(self)._refresh();
  1294. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolAdded:to:",{aString:aString,aClass:aClass}, smalltalk.HLProtocolsListWidget)})},
  1295. messageSends: ["ifFalse:", "=", "selectedClass", "model", "setItemsForSelectedClass", "refresh"]}),
  1296. smalltalk.HLProtocolsListWidget);
  1297. smalltalk.addMethod(
  1298. "_onProtocolRemoved_from_",
  1299. smalltalk.method({
  1300. selector: "onProtocolRemoved:from:",
  1301. fn: function (aString,aClass){
  1302. var self=this;
  1303. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1304. $1=_st(aClass).__eq(_st(_st(self)._model())._selectedClass());
  1305. if(! smalltalk.assert($1)){
  1306. $2=self;
  1307. return $2;
  1308. };
  1309. $3=_st(_st(_st(self)._model())._selectedProtocol()).__eq(aString);
  1310. if(smalltalk.assert($3)){
  1311. _st(self)._selectItem_(nil);
  1312. };
  1313. _st(self)._setItemsForSelectedClass();
  1314. _st(self)._refresh();
  1315. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolRemoved:from:",{aString:aString,aClass:aClass}, smalltalk.HLProtocolsListWidget)})},
  1316. messageSends: ["ifFalse:", "=", "selectedClass", "model", "ifTrue:", "selectItem:", "selectedProtocol", "setItemsForSelectedClass", "refresh"]}),
  1317. smalltalk.HLProtocolsListWidget);
  1318. smalltalk.addMethod(
  1319. "_onProtocolSelected_",
  1320. smalltalk.method({
  1321. selector: "onProtocolSelected:",
  1322. fn: function (aString){
  1323. var self=this;
  1324. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1325. _st(self)._selectedItem_(aString);
  1326. $1=aString;
  1327. if(($receiver = $1) == nil || $receiver == undefined){
  1328. $2=self;
  1329. return $2;
  1330. } else {
  1331. $1;
  1332. };
  1333. _st(self)._focus();
  1334. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLProtocolsListWidget)})},
  1335. messageSends: ["selectedItem:", "ifNil:", "focus"]}),
  1336. smalltalk.HLProtocolsListWidget);
  1337. smalltalk.addMethod(
  1338. "_onProtocolsFocusRequested",
  1339. smalltalk.method({
  1340. selector: "onProtocolsFocusRequested",
  1341. fn: function (){
  1342. var self=this;
  1343. return smalltalk.withContext(function($ctx1) { _st(self)._focus();
  1344. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolsFocusRequested",{}, smalltalk.HLProtocolsListWidget)})},
  1345. messageSends: ["focus"]}),
  1346. smalltalk.HLProtocolsListWidget);
  1347. smalltalk.addMethod(
  1348. "_renderContentOn_",
  1349. smalltalk.method({
  1350. selector: "renderContentOn:",
  1351. fn: function (html){
  1352. var self=this;
  1353. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1354. $1=_st(_st(self)._model())._showInstance();
  1355. if(smalltalk.assert($1)){
  1356. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1357. } else {
  1358. $2=_st(html)._div();
  1359. _st($2)._class_("class_side");
  1360. $3=_st($2)._with_((function(){
  1361. return smalltalk.withContext(function($ctx2) { return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1362. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1363. $3;
  1364. };
  1365. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLProtocolsListWidget)})},
  1366. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"]}),
  1367. smalltalk.HLProtocolsListWidget);
  1368. smalltalk.addMethod(
  1369. "_selectItem_",
  1370. smalltalk.method({
  1371. selector: "selectItem:",
  1372. fn: function (aString){
  1373. var self=this;
  1374. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedProtocol_(aString);
  1375. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aString:aString}, smalltalk.HLProtocolsListWidget)})},
  1376. messageSends: ["selectedProtocol:", "model"]}),
  1377. smalltalk.HLProtocolsListWidget);
  1378. smalltalk.addMethod(
  1379. "_selectedItem",
  1380. smalltalk.method({
  1381. selector: "selectedItem",
  1382. fn: function (){
  1383. var self=this;
  1384. return smalltalk.withContext(function($ctx1) { var $1;
  1385. $1=smalltalk.HLBrowserListWidget.fn.prototype._selectedItem.apply(_st(self), []);
  1386. return $1;
  1387. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{}, smalltalk.HLProtocolsListWidget)})},
  1388. messageSends: ["selectedItem"]}),
  1389. smalltalk.HLProtocolsListWidget);
  1390. smalltalk.addMethod(
  1391. "_setItemsForClass_",
  1392. smalltalk.method({
  1393. selector: "setItemsForClass:",
  1394. fn: function (aClass){
  1395. var self=this;
  1396. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$2;
  1397. $1=self;
  1398. $3=aClass;
  1399. if(($receiver = $3) == nil || $receiver == undefined){
  1400. $2=_st((smalltalk.Array || Array))._with_(_st(self)._allProtocol());
  1401. } else {
  1402. $4=_st((smalltalk.Array || Array))._with_(_st(self)._allProtocol());
  1403. _st($4)._addAll_(_st(aClass)._protocols());
  1404. $5=_st($4)._yourself();
  1405. $2=$5;
  1406. };
  1407. _st($1)._items_($2);
  1408. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForClass:",{aClass:aClass}, smalltalk.HLProtocolsListWidget)})},
  1409. messageSends: ["items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself"]}),
  1410. smalltalk.HLProtocolsListWidget);
  1411. smalltalk.addMethod(
  1412. "_setItemsForSelectedClass",
  1413. smalltalk.method({
  1414. selector: "setItemsForSelectedClass",
  1415. fn: function (){
  1416. var self=this;
  1417. return smalltalk.withContext(function($ctx1) { _st(self)._setItemsForClass_(_st(_st(self)._model())._selectedClass());
  1418. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedClass",{}, smalltalk.HLProtocolsListWidget)})},
  1419. messageSends: ["setItemsForClass:", "selectedClass", "model"]}),
  1420. smalltalk.HLProtocolsListWidget);
  1421. smalltalk.addClass('HLBrowserModel', smalltalk.Object, ['announcer', 'environment', 'selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedSelector', 'showInstance', 'showComment'], 'Helios-Browser');
  1422. smalltalk.addMethod(
  1423. "_addInstVarNamed_",
  1424. smalltalk.method({
  1425. selector: "addInstVarNamed:",
  1426. fn: function (aString){
  1427. var self=this;
  1428. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1429. _st(_st(self)._environment())._addInstVarNamed_to_(aString,_st(self)._selectedClass());
  1430. $1=_st((smalltalk.HLInstVarAdded || HLInstVarAdded))._new();
  1431. _st($1)._theClass_(_st(self)._selectedClass());
  1432. _st($1)._variableName_(aString);
  1433. $2=_st($1)._yourself();
  1434. _st(_st(self)._announcer())._announce_($2);
  1435. return self}, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1436. messageSends: ["addInstVarNamed:to:", "selectedClass", "environment", "announce:", "theClass:", "new", "variableName:", "yourself", "announcer"]}),
  1437. smalltalk.HLBrowserModel);
  1438. smalltalk.addMethod(
  1439. "_allProtocol",
  1440. smalltalk.method({
  1441. selector: "allProtocol",
  1442. fn: function (){
  1443. var self=this;
  1444. return smalltalk.withContext(function($ctx1) { return "-- All --";
  1445. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLBrowserModel)})},
  1446. messageSends: []}),
  1447. smalltalk.HLBrowserModel);
  1448. smalltalk.addMethod(
  1449. "_announcer",
  1450. smalltalk.method({
  1451. selector: "announcer",
  1452. fn: function (){
  1453. var self=this;
  1454. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1455. $2=self["@announcer"];
  1456. if(($receiver = $2) == nil || $receiver == undefined){
  1457. self["@announcer"]=_st((smalltalk.Announcer || Announcer))._new();
  1458. $1=self["@announcer"];
  1459. } else {
  1460. $1=$2;
  1461. };
  1462. return $1;
  1463. }, function($ctx1) {$ctx1.fill(self,"announcer",{}, smalltalk.HLBrowserModel)})},
  1464. messageSends: ["ifNil:", "new"]}),
  1465. smalltalk.HLBrowserModel);
  1466. smalltalk.addMethod(
  1467. "_compilationProtocol",
  1468. smalltalk.method({
  1469. selector: "compilationProtocol",
  1470. fn: function (){
  1471. var self=this;
  1472. var currentProtocol;
  1473. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1474. currentProtocol=_st(self)._selectedProtocol();
  1475. $2=_st(currentProtocol).__eq(_st(self)._allProtocol());
  1476. if(smalltalk.assert($2)){
  1477. $1=_st(self)._unclassifiedProtocol();
  1478. } else {
  1479. $1=currentProtocol;
  1480. };
  1481. return $1;
  1482. }, function($ctx1) {$ctx1.fill(self,"compilationProtocol",{currentProtocol:currentProtocol}, smalltalk.HLBrowserModel)})},
  1483. messageSends: ["selectedProtocol", "ifTrue:ifFalse:", "unclassifiedProtocol", "=", "allProtocol"]}),
  1484. smalltalk.HLBrowserModel);
  1485. smalltalk.addMethod(
  1486. "_compileClassComment_",
  1487. smalltalk.method({
  1488. selector: "compileClassComment:",
  1489. fn: function (aString){
  1490. var self=this;
  1491. return smalltalk.withContext(function($ctx1) { _st(_st(self)._environment())._compileClassComment_for_(aString,_st(self)._selectedClass());
  1492. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1493. messageSends: ["compileClassComment:for:", "selectedClass", "environment"]}),
  1494. smalltalk.HLBrowserModel);
  1495. smalltalk.addMethod(
  1496. "_compileClassDefinition_",
  1497. smalltalk.method({
  1498. selector: "compileClassDefinition:",
  1499. fn: function (aString){
  1500. var self=this;
  1501. return smalltalk.withContext(function($ctx1) { _st(_st(self)._environment())._compileClassDefinition_(aString);
  1502. return self}, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1503. messageSends: ["compileClassDefinition:", "environment"]}),
  1504. smalltalk.HLBrowserModel);
  1505. smalltalk.addMethod(
  1506. "_compileMethod_",
  1507. smalltalk.method({
  1508. selector: "compileMethod:",
  1509. fn: function (aString){
  1510. var self=this;
  1511. return smalltalk.withContext(function($ctx1) { _st(self)._withCompileErrorHandling_((function(){
  1512. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._environment())._compileMethod_for_protocol_(aString,_st(self)._selectedClass(),_st(self)._compilationProtocol());
  1513. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1514. return self}, function($ctx1) {$ctx1.fill(self,"compileMethod:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1515. messageSends: ["withCompileErrorHandling:", "compileMethod:for:protocol:", "selectedClass", "compilationProtocol", "environment"]}),
  1516. smalltalk.HLBrowserModel);
  1517. smalltalk.addMethod(
  1518. "_environment",
  1519. smalltalk.method({
  1520. selector: "environment",
  1521. fn: function (){
  1522. var self=this;
  1523. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1524. $2=self["@environment"];
  1525. if(($receiver = $2) == nil || $receiver == undefined){
  1526. $1=_st(_st((smalltalk.HLManager || HLManager))._current())._environment();
  1527. } else {
  1528. $1=$2;
  1529. };
  1530. return $1;
  1531. }, function($ctx1) {$ctx1.fill(self,"environment",{}, smalltalk.HLBrowserModel)})},
  1532. messageSends: ["ifNil:", "environment", "current"]}),
  1533. smalltalk.HLBrowserModel);
  1534. smalltalk.addMethod(
  1535. "_environment_",
  1536. smalltalk.method({
  1537. selector: "environment:",
  1538. fn: function (anEnvironment){
  1539. var self=this;
  1540. return smalltalk.withContext(function($ctx1) { self["@environment"]=anEnvironment;
  1541. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel)})},
  1542. messageSends: []}),
  1543. smalltalk.HLBrowserModel);
  1544. smalltalk.addMethod(
  1545. "_focusOnClasses",
  1546. smalltalk.method({
  1547. selector: "focusOnClasses",
  1548. fn: function (){
  1549. var self=this;
  1550. return smalltalk.withContext(function($ctx1) { _st(_st(self)._announcer())._announce_(_st((smalltalk.HLClassesFocusRequested || HLClassesFocusRequested))._new());
  1551. return self}, function($ctx1) {$ctx1.fill(self,"focusOnClasses",{}, smalltalk.HLBrowserModel)})},
  1552. messageSends: ["announce:", "new", "announcer"]}),
  1553. smalltalk.HLBrowserModel);
  1554. smalltalk.addMethod(
  1555. "_focusOnMethods",
  1556. smalltalk.method({
  1557. selector: "focusOnMethods",
  1558. fn: function (){
  1559. var self=this;
  1560. return smalltalk.withContext(function($ctx1) { _st(_st(self)._announcer())._announce_(_st((smalltalk.HLMethodsFocusRequested || HLMethodsFocusRequested))._new());
  1561. return self}, function($ctx1) {$ctx1.fill(self,"focusOnMethods",{}, smalltalk.HLBrowserModel)})},
  1562. messageSends: ["announce:", "new", "announcer"]}),
  1563. smalltalk.HLBrowserModel);
  1564. smalltalk.addMethod(
  1565. "_focusOnPackages",
  1566. smalltalk.method({
  1567. selector: "focusOnPackages",
  1568. fn: function (){
  1569. var self=this;
  1570. return smalltalk.withContext(function($ctx1) { _st(_st(self)._announcer())._announce_(_st((smalltalk.HLPackagesFocusRequested || HLPackagesFocusRequested))._new());
  1571. return self}, function($ctx1) {$ctx1.fill(self,"focusOnPackages",{}, smalltalk.HLBrowserModel)})},
  1572. messageSends: ["announce:", "new", "announcer"]}),
  1573. smalltalk.HLBrowserModel);
  1574. smalltalk.addMethod(
  1575. "_focusOnProtocols",
  1576. smalltalk.method({
  1577. selector: "focusOnProtocols",
  1578. fn: function (){
  1579. var self=this;
  1580. return smalltalk.withContext(function($ctx1) { _st(_st(self)._announcer())._announce_(_st((smalltalk.HLProtocolsFocusRequested || HLProtocolsFocusRequested))._new());
  1581. return self}, function($ctx1) {$ctx1.fill(self,"focusOnProtocols",{}, smalltalk.HLBrowserModel)})},
  1582. messageSends: ["announce:", "new", "announcer"]}),
  1583. smalltalk.HLBrowserModel);
  1584. smalltalk.addMethod(
  1585. "_focusOnSourceCode",
  1586. smalltalk.method({
  1587. selector: "focusOnSourceCode",
  1588. fn: function (){
  1589. var self=this;
  1590. return smalltalk.withContext(function($ctx1) { _st(_st(self)._announcer())._announce_(_st((smalltalk.HLSourceCodeFocusRequested || HLSourceCodeFocusRequested))._new());
  1591. return self}, function($ctx1) {$ctx1.fill(self,"focusOnSourceCode",{}, smalltalk.HLBrowserModel)})},
  1592. messageSends: ["announce:", "new", "announcer"]}),
  1593. smalltalk.HLBrowserModel);
  1594. smalltalk.addMethod(
  1595. "_handleCompileError_",
  1596. smalltalk.method({
  1597. selector: "handleCompileError:",
  1598. fn: function (anError){
  1599. var self=this;
  1600. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1601. $1=_st((smalltalk.HLCompileErrorRaised || HLCompileErrorRaised))._new();
  1602. _st($1)._error_(anError);
  1603. $2=_st($1)._yourself();
  1604. _st(_st(self)._announcer())._announce_($2);
  1605. return self}, function($ctx1) {$ctx1.fill(self,"handleCompileError:",{anError:anError}, smalltalk.HLBrowserModel)})},
  1606. messageSends: ["announce:", "error:", "new", "yourself", "announcer"]}),
  1607. smalltalk.HLBrowserModel);
  1608. smalltalk.addMethod(
  1609. "_handleParseError_",
  1610. smalltalk.method({
  1611. selector: "handleParseError:",
  1612. fn: function (anError){
  1613. var self=this;
  1614. var split,line,column,messageToInsert;
  1615. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1616. split=_st(_st(anError)._messageText())._tokenize_(" : ");
  1617. messageToInsert=_st(split)._second();
  1618. split=_st(_st(split)._first())._copyFrom_to_((21),_st(_st(split)._first())._size());
  1619. split=_st(split)._tokenize_(" column ");
  1620. line=_st(split)._first();
  1621. column=_st(split)._second();
  1622. $1=_st((smalltalk.HLParseErrorRaised || HLParseErrorRaised))._new();
  1623. _st($1)._line_(_st(line)._asNumber());
  1624. _st($1)._column_(_st(column)._asNumber());
  1625. _st($1)._message_(messageToInsert);
  1626. _st($1)._error_(anError);
  1627. $2=_st($1)._yourself();
  1628. _st(_st(self)._announcer())._announce_($2);
  1629. return self}, function($ctx1) {$ctx1.fill(self,"handleParseError:",{anError:anError,split:split,line:line,column:column,messageToInsert:messageToInsert}, smalltalk.HLBrowserModel)})},
  1630. messageSends: ["tokenize:", "messageText", "second", "copyFrom:to:", "size", "first", "announce:", "line:", "asNumber", "new", "column:", "message:", "error:", "yourself", "announcer"]}),
  1631. smalltalk.HLBrowserModel);
  1632. smalltalk.addMethod(
  1633. "_handleUnkownVariableError_",
  1634. smalltalk.method({
  1635. selector: "handleUnkownVariableError:",
  1636. fn: function (anError){
  1637. var self=this;
  1638. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1639. $1=_st((smalltalk.HLUnknownVariableErrorRaised || HLUnknownVariableErrorRaised))._new();
  1640. _st($1)._error_(anError);
  1641. $2=_st($1)._yourself();
  1642. _st(_st(self)._announcer())._announce_($2);
  1643. return self}, function($ctx1) {$ctx1.fill(self,"handleUnkownVariableError:",{anError:anError}, smalltalk.HLBrowserModel)})},
  1644. messageSends: ["announce:", "error:", "new", "yourself", "announcer"]}),
  1645. smalltalk.HLBrowserModel);
  1646. smalltalk.addMethod(
  1647. "_packages",
  1648. smalltalk.method({
  1649. selector: "packages",
  1650. fn: function (){
  1651. var self=this;
  1652. return smalltalk.withContext(function($ctx1) { var $1;
  1653. $1=_st(_st(self)._environment())._packages();
  1654. return $1;
  1655. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLBrowserModel)})},
  1656. messageSends: ["packages", "environment"]}),
  1657. smalltalk.HLBrowserModel);
  1658. smalltalk.addMethod(
  1659. "_save_",
  1660. smalltalk.method({
  1661. selector: "save:",
  1662. fn: function (aString){
  1663. var self=this;
  1664. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1665. $1=_st(self)._shouldCompileClassDefinition();
  1666. if(smalltalk.assert($1)){
  1667. _st(self)._compileClassDefinition_(aString);
  1668. } else {
  1669. $2=_st(self)._shouldCompileClassComment();
  1670. if(smalltalk.assert($2)){
  1671. _st(self)._compileClassComment_(aString);
  1672. } else {
  1673. _st(self)._compileMethod_(aString);
  1674. };
  1675. };
  1676. return self}, function($ctx1) {$ctx1.fill(self,"save:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1677. messageSends: ["ifTrue:ifFalse:", "compileClassDefinition:", "compileClassComment:", "compileMethod:", "shouldCompileClassComment", "shouldCompileClassDefinition"]}),
  1678. smalltalk.HLBrowserModel);
  1679. smalltalk.addMethod(
  1680. "_saveSourceCode",
  1681. smalltalk.method({
  1682. selector: "saveSourceCode",
  1683. fn: function (){
  1684. var self=this;
  1685. return smalltalk.withContext(function($ctx1) { _st(_st(self)._announcer())._announce_(_st((smalltalk.HLSaveSourceCode || HLSaveSourceCode))._new());
  1686. return self}, function($ctx1) {$ctx1.fill(self,"saveSourceCode",{}, smalltalk.HLBrowserModel)})},
  1687. messageSends: ["announce:", "new", "announcer"]}),
  1688. smalltalk.HLBrowserModel);
  1689. smalltalk.addMethod(
  1690. "_selectedClass",
  1691. smalltalk.method({
  1692. selector: "selectedClass",
  1693. fn: function (){
  1694. var self=this;
  1695. return smalltalk.withContext(function($ctx1) { var $1;
  1696. $1=self["@selectedClass"];
  1697. return $1;
  1698. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{}, smalltalk.HLBrowserModel)})},
  1699. messageSends: []}),
  1700. smalltalk.HLBrowserModel);
  1701. smalltalk.addMethod(
  1702. "_selectedClass_",
  1703. smalltalk.method({
  1704. selector: "selectedClass:",
  1705. fn: function (aClass){
  1706. var self=this;
  1707. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  1708. $1=_st(self["@selectedClass"]).__eq(aClass);
  1709. if(smalltalk.assert($1)){
  1710. $2=aClass;
  1711. if(($receiver = $2) == nil || $receiver == undefined){
  1712. $3=self;
  1713. return $3;
  1714. } else {
  1715. $2;
  1716. };
  1717. _st(self)._selectedProtocol_(nil);
  1718. };
  1719. $4=aClass;
  1720. if(($receiver = $4) == nil || $receiver == undefined){
  1721. self["@selectedClass"]=nil;
  1722. self["@selectedClass"];
  1723. } else {
  1724. $5=_st(self)._showInstance();
  1725. if(smalltalk.assert($5)){
  1726. self["@selectedClass"]=_st(aClass)._theNonMetaClass();
  1727. self["@selectedClass"];
  1728. } else {
  1729. self["@selectedClass"]=_st(aClass)._theMetaClass();
  1730. self["@selectedClass"];
  1731. };
  1732. };
  1733. _st(self)._selectedProtocol_(nil);
  1734. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLClassSelected || HLClassSelected))._on_(_st(self)._selectedClass()));
  1735. return self}, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass}, smalltalk.HLBrowserModel)})},
  1736. messageSends: ["ifTrue:", "ifNil:", "selectedProtocol:", "=", "ifNil:ifNotNil:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "showInstance", "announce:", "on:", "selectedClass", "announcer"]}),
  1737. smalltalk.HLBrowserModel);
  1738. smalltalk.addMethod(
  1739. "_selectedMethod",
  1740. smalltalk.method({
  1741. selector: "selectedMethod",
  1742. fn: function (){
  1743. var self=this;
  1744. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1745. $2=_st(self)._selectedClass();
  1746. if(($receiver = $2) == nil || $receiver == undefined){
  1747. $1=$2;
  1748. } else {
  1749. $1=_st(_st(_st(self)._selectedClass())._methodDictionary())._at_(self["@selectedSelector"]);
  1750. };
  1751. return $1;
  1752. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{}, smalltalk.HLBrowserModel)})},
  1753. messageSends: ["ifNotNil:", "at:", "methodDictionary", "selectedClass"]}),
  1754. smalltalk.HLBrowserModel);
  1755. smalltalk.addMethod(
  1756. "_selectedMethod_",
  1757. smalltalk.method({
  1758. selector: "selectedMethod:",
  1759. fn: function (aCompiledMethod){
  1760. var self=this;
  1761. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  1762. $1=_st(self["@selectedSelector"]).__eq(aCompiledMethod);
  1763. if(smalltalk.assert($1)){
  1764. $2=self;
  1765. return $2;
  1766. };
  1767. $3=aCompiledMethod;
  1768. if(($receiver = $3) == nil || $receiver == undefined){
  1769. self["@selectedSelector"]=nil;
  1770. self["@selectedSelector"];
  1771. } else {
  1772. $4=_st(self["@selectedSelector"]).__eq(_st(aCompiledMethod)._selector());
  1773. if(smalltalk.assert($4)){
  1774. $5=self;
  1775. return $5;
  1776. };
  1777. self["@selectedSelector"]=_st(aCompiledMethod)._selector();
  1778. self["@selectedSelector"];
  1779. };
  1780. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLMethodSelected || HLMethodSelected))._on_(aCompiledMethod));
  1781. return self}, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserModel)})},
  1782. messageSends: ["ifTrue:", "=", "ifNil:ifNotNil:", "selector", "announce:", "on:", "announcer"]}),
  1783. smalltalk.HLBrowserModel);
  1784. smalltalk.addMethod(
  1785. "_selectedPackage",
  1786. smalltalk.method({
  1787. selector: "selectedPackage",
  1788. fn: function (){
  1789. var self=this;
  1790. return smalltalk.withContext(function($ctx1) { var $1;
  1791. $1=self["@selectedPackage"];
  1792. return $1;
  1793. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{}, smalltalk.HLBrowserModel)})},
  1794. messageSends: []}),
  1795. smalltalk.HLBrowserModel);
  1796. smalltalk.addMethod(
  1797. "_selectedPackage_",
  1798. smalltalk.method({
  1799. selector: "selectedPackage:",
  1800. fn: function (aPackage){
  1801. var self=this;
  1802. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1803. $1=_st(self["@selectedPackage"]).__eq(aPackage);
  1804. if(smalltalk.assert($1)){
  1805. $2=self;
  1806. return $2;
  1807. };
  1808. self["@selectedPackage"]=aPackage;
  1809. _st(self)._selectedClass_(nil);
  1810. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLPackageSelected || HLPackageSelected))._on_(aPackage));
  1811. return self}, function($ctx1) {$ctx1.fill(self,"selectedPackage:",{aPackage:aPackage}, smalltalk.HLBrowserModel)})},
  1812. messageSends: ["ifTrue:", "=", "selectedClass:", "announce:", "on:", "announcer"]}),
  1813. smalltalk.HLBrowserModel);
  1814. smalltalk.addMethod(
  1815. "_selectedProtocol",
  1816. smalltalk.method({
  1817. selector: "selectedProtocol",
  1818. fn: function (){
  1819. var self=this;
  1820. return smalltalk.withContext(function($ctx1) { var $1;
  1821. $1=self["@selectedProtocol"];
  1822. return $1;
  1823. }, function($ctx1) {$ctx1.fill(self,"selectedProtocol",{}, smalltalk.HLBrowserModel)})},
  1824. messageSends: []}),
  1825. smalltalk.HLBrowserModel);
  1826. smalltalk.addMethod(
  1827. "_selectedProtocol_",
  1828. smalltalk.method({
  1829. selector: "selectedProtocol:",
  1830. fn: function (aString){
  1831. var self=this;
  1832. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1833. $1=_st(self["@selectedProtocol"]).__eq(aString);
  1834. if(smalltalk.assert($1)){
  1835. $2=self;
  1836. return $2;
  1837. };
  1838. self["@selectedProtocol"]=aString;
  1839. _st(self)._selectedMethod_(nil);
  1840. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLProtocolSelected || HLProtocolSelected))._on_(aString));
  1841. return self}, function($ctx1) {$ctx1.fill(self,"selectedProtocol:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1842. messageSends: ["ifTrue:", "=", "selectedMethod:", "announce:", "on:", "announcer"]}),
  1843. smalltalk.HLBrowserModel);
  1844. smalltalk.addMethod(
  1845. "_shouldCompileClassComment",
  1846. smalltalk.method({
  1847. selector: "shouldCompileClassComment",
  1848. fn: function (){
  1849. var self=this;
  1850. return smalltalk.withContext(function($ctx1) { return false;
  1851. }, function($ctx1) {$ctx1.fill(self,"shouldCompileClassComment",{}, smalltalk.HLBrowserModel)})},
  1852. messageSends: []}),
  1853. smalltalk.HLBrowserModel);
  1854. smalltalk.addMethod(
  1855. "_shouldCompileClassDefinition",
  1856. smalltalk.method({
  1857. selector: "shouldCompileClassDefinition",
  1858. fn: function (){
  1859. var self=this;
  1860. return smalltalk.withContext(function($ctx1) { var $1;
  1861. $1=_st(_st(self)._selectedProtocol())._isNil();
  1862. return $1;
  1863. }, function($ctx1) {$ctx1.fill(self,"shouldCompileClassDefinition",{}, smalltalk.HLBrowserModel)})},
  1864. messageSends: ["isNil", "selectedProtocol"]}),
  1865. smalltalk.HLBrowserModel);
  1866. smalltalk.addMethod(
  1867. "_showComment",
  1868. smalltalk.method({
  1869. selector: "showComment",
  1870. fn: function (){
  1871. var self=this;
  1872. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1873. $2=self["@showComment"];
  1874. if(($receiver = $2) == nil || $receiver == undefined){
  1875. $1=false;
  1876. } else {
  1877. $1=$2;
  1878. };
  1879. return $1;
  1880. }, function($ctx1) {$ctx1.fill(self,"showComment",{}, smalltalk.HLBrowserModel)})},
  1881. messageSends: ["ifNil:"]}),
  1882. smalltalk.HLBrowserModel);
  1883. smalltalk.addMethod(
  1884. "_showComment_",
  1885. smalltalk.method({
  1886. selector: "showComment:",
  1887. fn: function (aBoolean){
  1888. var self=this;
  1889. return smalltalk.withContext(function($ctx1) { self["@showComment"]=aBoolean;
  1890. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowCommentToggled || HLShowCommentToggled))._new());
  1891. return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  1892. messageSends: ["announce:", "new", "announcer"]}),
  1893. smalltalk.HLBrowserModel);
  1894. smalltalk.addMethod(
  1895. "_showInstance",
  1896. smalltalk.method({
  1897. selector: "showInstance",
  1898. fn: function (){
  1899. var self=this;
  1900. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1901. $2=self["@showInstance"];
  1902. if(($receiver = $2) == nil || $receiver == undefined){
  1903. $1=true;
  1904. } else {
  1905. $1=$2;
  1906. };
  1907. return $1;
  1908. }, function($ctx1) {$ctx1.fill(self,"showInstance",{}, smalltalk.HLBrowserModel)})},
  1909. messageSends: ["ifNil:"]}),
  1910. smalltalk.HLBrowserModel);
  1911. smalltalk.addMethod(
  1912. "_showInstance_",
  1913. smalltalk.method({
  1914. selector: "showInstance:",
  1915. fn: function (aBoolean){
  1916. var self=this;
  1917. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$3;
  1918. self["@showInstance"]=aBoolean;
  1919. $1=_st(self)._selectedClass();
  1920. if(($receiver = $1) == nil || $receiver == undefined){
  1921. $1;
  1922. } else {
  1923. $2=self;
  1924. $4=aBoolean;
  1925. if(smalltalk.assert($4)){
  1926. $3=_st(_st(self)._selectedClass())._theNonMetaClass();
  1927. } else {
  1928. $3=_st(_st(self)._selectedClass())._theMetaClass();
  1929. };
  1930. _st($2)._selectedClass_($3);
  1931. };
  1932. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled))._new());
  1933. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  1934. messageSends: ["ifNotNil:", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "selectedClass", "theMetaClass", "announce:", "new", "announcer"]}),
  1935. smalltalk.HLBrowserModel);
  1936. smalltalk.addMethod(
  1937. "_unclassifiedProtocol",
  1938. smalltalk.method({
  1939. selector: "unclassifiedProtocol",
  1940. fn: function (){
  1941. var self=this;
  1942. return smalltalk.withContext(function($ctx1) { return "as yet unclassified";
  1943. }, function($ctx1) {$ctx1.fill(self,"unclassifiedProtocol",{}, smalltalk.HLBrowserModel)})},
  1944. messageSends: []}),
  1945. smalltalk.HLBrowserModel);
  1946. smalltalk.addMethod(
  1947. "_withCompileErrorHandling_",
  1948. smalltalk.method({
  1949. selector: "withCompileErrorHandling:",
  1950. fn: function (aBlock){
  1951. var self=this;
  1952. return smalltalk.withContext(function($ctx1) { _st((function(){
  1953. return smalltalk.withContext(function($ctx2) { return _st((function(){
  1954. return smalltalk.withContext(function($ctx3) { return _st(aBlock)._on_do_((smalltalk.ParseError || ParseError),(function(ex){
  1955. return smalltalk.withContext(function($ctx4) { return _st(self)._handleParseError_(ex);
  1956. }, function($ctx4) {$ctx4.fillBlock({ex:ex},$ctx1)})}));
  1957. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._on_do_((smalltalk.UnknownVariableError || UnknownVariableError),(function(ex){
  1958. return smalltalk.withContext(function($ctx3) { return _st(self)._handleUnkownVariableError_(ex);
  1959. }, function($ctx3) {$ctx3.fillBlock({ex:ex},$ctx1)})}));
  1960. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.CompilerError || CompilerError),(function(ex){
  1961. return smalltalk.withContext(function($ctx2) { return _st(self)._handleCompileError_(ex);
  1962. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  1963. return self}, function($ctx1) {$ctx1.fill(self,"withCompileErrorHandling:",{aBlock:aBlock}, smalltalk.HLBrowserModel)})},
  1964. messageSends: ["on:do:", "handleCompileError:", "handleUnkownVariableError:", "handleParseError:"]}),
  1965. smalltalk.HLBrowserModel);
  1966. smalltalk.addMethod(
  1967. "_on_",
  1968. smalltalk.method({
  1969. selector: "on:",
  1970. fn: function (anEnvironment){
  1971. var self=this;
  1972. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1973. $2=_st(self)._new();
  1974. _st($2)._environment_(anEnvironment);
  1975. $3=_st($2)._yourself();
  1976. $1=$3;
  1977. return $1;
  1978. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel.klass)})},
  1979. messageSends: ["environment:", "new", "yourself"]}),
  1980. smalltalk.HLBrowserModel.klass);
  1981. smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'methodContents', 'codeWidget'], 'Helios-Browser');
  1982. smalltalk.addMethod(
  1983. "_codeWidget",
  1984. smalltalk.method({
  1985. selector: "codeWidget",
  1986. fn: function (){
  1987. var self=this;
  1988. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1989. $2=self["@codeWidget"];
  1990. if(($receiver = $2) == nil || $receiver == undefined){
  1991. self["@codeWidget"]=_st((smalltalk.HLSourceCodeWidget || HLSourceCodeWidget))._on_(_st(self)._model());
  1992. $1=self["@codeWidget"];
  1993. } else {
  1994. $1=$2;
  1995. };
  1996. return $1;
  1997. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{}, smalltalk.HLBrowserSourceWidget)})},
  1998. messageSends: ["ifNil:", "on:", "model"]}),
  1999. smalltalk.HLBrowserSourceWidget);
  2000. smalltalk.addMethod(
  2001. "_contents",
  2002. smalltalk.method({
  2003. selector: "contents",
  2004. fn: function (){
  2005. var self=this;
  2006. return smalltalk.withContext(function($ctx1) { var $1;
  2007. $1=_st(_st(self)._codeWidget())._contents();
  2008. return $1;
  2009. }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.HLBrowserSourceWidget)})},
  2010. messageSends: ["contents", "codeWidget"]}),
  2011. smalltalk.HLBrowserSourceWidget);
  2012. smalltalk.addMethod(
  2013. "_contents_",
  2014. smalltalk.method({
  2015. selector: "contents:",
  2016. fn: function (aString){
  2017. var self=this;
  2018. return smalltalk.withContext(function($ctx1) { _st(self)._methodContents_(aString);
  2019. _st(_st(self)._codeWidget())._contents_(aString);
  2020. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2021. messageSends: ["methodContents:", "contents:", "codeWidget"]}),
  2022. smalltalk.HLBrowserSourceWidget);
  2023. smalltalk.addMethod(
  2024. "_focus",
  2025. smalltalk.method({
  2026. selector: "focus",
  2027. fn: function (){
  2028. var self=this;
  2029. return smalltalk.withContext(function($ctx1) { _st(_st(self)._codeWidget())._focus();
  2030. return self}, function($ctx1) {$ctx1.fill(self,"focus",{}, smalltalk.HLBrowserSourceWidget)})},
  2031. messageSends: ["focus", "codeWidget"]}),
  2032. smalltalk.HLBrowserSourceWidget);
  2033. smalltalk.addMethod(
  2034. "_hasModification",
  2035. smalltalk.method({
  2036. selector: "hasModification",
  2037. fn: function (){
  2038. var self=this;
  2039. return smalltalk.withContext(function($ctx1) { var $1;
  2040. $1=_st(_st(_st(self)._methodContents()).__eq(_st(self)._contents()))._not();
  2041. return $1;
  2042. }, function($ctx1) {$ctx1.fill(self,"hasModification",{}, smalltalk.HLBrowserSourceWidget)})},
  2043. messageSends: ["not", "=", "contents", "methodContents"]}),
  2044. smalltalk.HLBrowserSourceWidget);
  2045. smalltalk.addMethod(
  2046. "_initialize",
  2047. smalltalk.method({
  2048. selector: "initialize",
  2049. fn: function (){
  2050. var self=this;
  2051. return smalltalk.withContext(function($ctx1) { smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  2052. _st(self)._observeSystem();
  2053. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLBrowserSourceWidget)})},
  2054. messageSends: ["initialize", "observeSystem"]}),
  2055. smalltalk.HLBrowserSourceWidget);
  2056. smalltalk.addMethod(
  2057. "_methodContents",
  2058. smalltalk.method({
  2059. selector: "methodContents",
  2060. fn: function (){
  2061. var self=this;
  2062. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2063. $2=self["@methodContents"];
  2064. if(($receiver = $2) == nil || $receiver == undefined){
  2065. self["@methodContents"]="";
  2066. $1=self["@methodContents"];
  2067. } else {
  2068. $1=$2;
  2069. };
  2070. return $1;
  2071. }, function($ctx1) {$ctx1.fill(self,"methodContents",{}, smalltalk.HLBrowserSourceWidget)})},
  2072. messageSends: ["ifNil:"]}),
  2073. smalltalk.HLBrowserSourceWidget);
  2074. smalltalk.addMethod(
  2075. "_methodContents_",
  2076. smalltalk.method({
  2077. selector: "methodContents:",
  2078. fn: function (aString){
  2079. var self=this;
  2080. return smalltalk.withContext(function($ctx1) { self["@methodContents"]=aString;
  2081. return self}, function($ctx1) {$ctx1.fill(self,"methodContents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2082. messageSends: []}),
  2083. smalltalk.HLBrowserSourceWidget);
  2084. smalltalk.addMethod(
  2085. "_model",
  2086. smalltalk.method({
  2087. selector: "model",
  2088. fn: function (){
  2089. var self=this;
  2090. return smalltalk.withContext(function($ctx1) { var $1;
  2091. $1=self["@model"];
  2092. return $1;
  2093. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLBrowserSourceWidget)})},
  2094. messageSends: []}),
  2095. smalltalk.HLBrowserSourceWidget);
  2096. smalltalk.addMethod(
  2097. "_model_",
  2098. smalltalk.method({
  2099. selector: "model:",
  2100. fn: function (aBrowserModel){
  2101. var self=this;
  2102. return smalltalk.withContext(function($ctx1) { self["@model"]=aBrowserModel;
  2103. _st(self)._observeModel();
  2104. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget)})},
  2105. messageSends: ["observeModel"]}),
  2106. smalltalk.HLBrowserSourceWidget);
  2107. smalltalk.addMethod(
  2108. "_observeModel",
  2109. smalltalk.method({
  2110. selector: "observeModel",
  2111. fn: function (){
  2112. var self=this;
  2113. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2114. $1=_st(_st(self)._model())._announcer();
  2115. _st($1)._on_do_((smalltalk.HLMethodSelected || HLMethodSelected),(function(ann){
  2116. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodSelected_(_st(ann)._item());
  2117. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2118. _st($1)._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  2119. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  2120. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2121. _st($1)._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  2122. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  2123. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2124. $2=_st($1)._on_do_((smalltalk.HLSourceCodeFocusRequested || HLSourceCodeFocusRequested),(function(ann){
  2125. return smalltalk.withContext(function($ctx2) { return _st(self)._onSourceCodeFocusRequested();
  2126. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2127. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLBrowserSourceWidget)})},
  2128. messageSends: ["on:do:", "onMethodSelected:", "item", "announcer", "model", "onClassSelected:", "onProtocolSelected:", "onSourceCodeFocusRequested"]}),
  2129. smalltalk.HLBrowserSourceWidget);
  2130. smalltalk.addMethod(
  2131. "_observeSystem",
  2132. smalltalk.method({
  2133. selector: "observeSystem",
  2134. fn: function (){
  2135. var self=this;
  2136. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._on_do_((smalltalk.MethodModified || MethodModified),(function(ann){
  2137. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodModified_(_st(ann)._method());
  2138. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2139. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLBrowserSourceWidget)})},
  2140. messageSends: ["on:do:", "onMethodModified:", "method", "current"]}),
  2141. smalltalk.HLBrowserSourceWidget);
  2142. smalltalk.addMethod(
  2143. "_onClassSelected_",
  2144. smalltalk.method({
  2145. selector: "onClassSelected:",
  2146. fn: function (aClass){
  2147. var self=this;
  2148. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2149. $1=aClass;
  2150. if(($receiver = $1) == nil || $receiver == undefined){
  2151. $2=_st(self)._contents_("");
  2152. return $2;
  2153. } else {
  2154. $1;
  2155. };
  2156. _st(self)._contents_(_st(aClass)._definition());
  2157. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLBrowserSourceWidget)})},
  2158. messageSends: ["ifNil:", "contents:", "definition"]}),
  2159. smalltalk.HLBrowserSourceWidget);
  2160. smalltalk.addMethod(
  2161. "_onMethodModified_",
  2162. smalltalk.method({
  2163. selector: "onMethodModified:",
  2164. fn: function (aMethod){
  2165. var self=this;
  2166. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2167. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(aMethod)._methodClass());
  2168. if(! smalltalk.assert($1)){
  2169. $2=self;
  2170. return $2;
  2171. };
  2172. $3=_st(_st(_st(_st(self)._model())._selectedMethod())._selector()).__eq(_st(aMethod)._selector());
  2173. if(! smalltalk.assert($3)){
  2174. $4=self;
  2175. return $4;
  2176. };
  2177. _st(self)._refresh();
  2178. return self}, function($ctx1) {$ctx1.fill(self,"onMethodModified:",{aMethod:aMethod}, smalltalk.HLBrowserSourceWidget)})},
  2179. messageSends: ["ifFalse:", "=", "methodClass", "selectedClass", "model", "selector", "selectedMethod", "refresh"]}),
  2180. smalltalk.HLBrowserSourceWidget);
  2181. smalltalk.addMethod(
  2182. "_onMethodSelected_",
  2183. smalltalk.method({
  2184. selector: "onMethodSelected:",
  2185. fn: function (aCompiledMethod){
  2186. var self=this;
  2187. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2188. $1=aCompiledMethod;
  2189. if(($receiver = $1) == nil || $receiver == undefined){
  2190. $2=_st(self)._contents_("");
  2191. return $2;
  2192. } else {
  2193. $1;
  2194. };
  2195. _st(self)._contents_(_st(aCompiledMethod)._source());
  2196. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserSourceWidget)})},
  2197. messageSends: ["ifNil:", "contents:", "source"]}),
  2198. smalltalk.HLBrowserSourceWidget);
  2199. smalltalk.addMethod(
  2200. "_onProtocolSelected_",
  2201. smalltalk.method({
  2202. selector: "onProtocolSelected:",
  2203. fn: function (aString){
  2204. var self=this;
  2205. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2206. $1=_st(_st(self)._model())._selectedClass();
  2207. if(($receiver = $1) == nil || $receiver == undefined){
  2208. $2=_st(self)._contents_("");
  2209. return $2;
  2210. } else {
  2211. $1;
  2212. };
  2213. _st(self)._contents_(_st(_st(_st(self)._model())._selectedClass())._definition());
  2214. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2215. messageSends: ["ifNil:", "contents:", "selectedClass", "model", "definition"]}),
  2216. smalltalk.HLBrowserSourceWidget);
  2217. smalltalk.addMethod(
  2218. "_onSourceCodeFocusRequested",
  2219. smalltalk.method({
  2220. selector: "onSourceCodeFocusRequested",
  2221. fn: function (){
  2222. var self=this;
  2223. return smalltalk.withContext(function($ctx1) { _st(self)._focus();
  2224. return self}, function($ctx1) {$ctx1.fill(self,"onSourceCodeFocusRequested",{}, smalltalk.HLBrowserSourceWidget)})},
  2225. messageSends: ["focus"]}),
  2226. smalltalk.HLBrowserSourceWidget);
  2227. smalltalk.addMethod(
  2228. "_refresh",
  2229. smalltalk.method({
  2230. selector: "refresh",
  2231. fn: function (){
  2232. var self=this;
  2233. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2234. $1=_st(self)._hasModification();
  2235. if(smalltalk.assert($1)){
  2236. $2=self;
  2237. return $2;
  2238. };
  2239. _st(self)._contents_(_st(_st(_st(self)._model())._selectedMethod())._source());
  2240. smalltalk.HLWidget.fn.prototype._refresh.apply(_st(self), []);
  2241. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{}, smalltalk.HLBrowserSourceWidget)})},
  2242. messageSends: ["ifTrue:", "hasModification", "contents:", "source", "selectedMethod", "model", "refresh"]}),
  2243. smalltalk.HLBrowserSourceWidget);
  2244. smalltalk.addMethod(
  2245. "_renderContentOn_",
  2246. smalltalk.method({
  2247. selector: "renderContentOn:",
  2248. fn: function (html){
  2249. var self=this;
  2250. return smalltalk.withContext(function($ctx1) { _st(_st(self)._codeWidget())._renderOn_(html);
  2251. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLBrowserSourceWidget)})},
  2252. messageSends: ["renderOn:", "codeWidget"]}),
  2253. smalltalk.HLBrowserSourceWidget);
  2254. smalltalk.addMethod(
  2255. "_on_",
  2256. smalltalk.method({
  2257. selector: "on:",
  2258. fn: function (aBrowserModel){
  2259. var self=this;
  2260. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2261. $2=_st(self)._new();
  2262. _st($2)._model_(aBrowserModel);
  2263. $3=_st($2)._yourself();
  2264. $1=$3;
  2265. return $1;
  2266. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget.klass)})},
  2267. messageSends: ["model:", "new", "yourself"]}),
  2268. smalltalk.HLBrowserSourceWidget.klass);
  2269. smalltalk.addClass('HLClassCache', smalltalk.Object, ['class', 'selectorsCache', 'overrideCache', 'overriddenCache'], 'Helios-Browser');
  2270. smalltalk.addMethod(
  2271. "_invalidateChildrenSelector_",
  2272. smalltalk.method({
  2273. selector: "invalidateChildrenSelector:",
  2274. fn: function (aSelector){
  2275. var self=this;
  2276. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2277. _st(_st(_st(self)._theClass())._subclasses())._do_((function(each){
  2278. return smalltalk.withContext(function($ctx2) { $1=_st(_st(self)._selectorsCache())._cacheFor_(each);
  2279. _st($1)._removeSelector_(aSelector);
  2280. $2=_st($1)._invalidateChildrenSelector_(aSelector);
  2281. return $2;
  2282. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2283. return self}, function($ctx1) {$ctx1.fill(self,"invalidateChildrenSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2284. messageSends: ["do:", "removeSelector:", "cacheFor:", "selectorsCache", "invalidateChildrenSelector:", "subclasses", "theClass"]}),
  2285. smalltalk.HLClassCache);
  2286. smalltalk.addMethod(
  2287. "_invalidateParentSelector_",
  2288. smalltalk.method({
  2289. selector: "invalidateParentSelector:",
  2290. fn: function (aSelector){
  2291. var self=this;
  2292. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2293. $1=_st(_st(self)._theClass())._superclass();
  2294. if(($receiver = $1) == nil || $receiver == undefined){
  2295. $1;
  2296. } else {
  2297. $2=_st(_st(self)._selectorsCache())._cacheFor_(_st(_st(self)._theClass())._superclass());
  2298. _st($2)._removeSelector_(aSelector);
  2299. $3=_st($2)._invalidateParentSelector_(aSelector);
  2300. $3;
  2301. };
  2302. return self}, function($ctx1) {$ctx1.fill(self,"invalidateParentSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2303. messageSends: ["ifNotNil:", "removeSelector:", "cacheFor:", "superclass", "theClass", "selectorsCache", "invalidateParentSelector:"]}),
  2304. smalltalk.HLClassCache);
  2305. smalltalk.addMethod(
  2306. "_invalidateSelector_",
  2307. smalltalk.method({
  2308. selector: "invalidateSelector:",
  2309. fn: function (aSelector){
  2310. var self=this;
  2311. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2312. $1=self;
  2313. _st($1)._invalidateParentSelector_(aSelector);
  2314. _st($1)._invalidateChildrenSelector_(aSelector);
  2315. $2=_st($1)._removeSelector_(aSelector);
  2316. return self}, function($ctx1) {$ctx1.fill(self,"invalidateSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2317. messageSends: ["invalidateParentSelector:", "invalidateChildrenSelector:", "removeSelector:"]}),
  2318. smalltalk.HLClassCache);
  2319. smalltalk.addMethod(
  2320. "_isOverridden_",
  2321. smalltalk.method({
  2322. selector: "isOverridden:",
  2323. fn: function (aMethod){
  2324. var self=this;
  2325. return smalltalk.withContext(function($ctx1) { var $1;
  2326. $1=_st(_st(self)._overriddenCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  2327. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverridden();
  2328. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2329. return $1;
  2330. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  2331. messageSends: ["at:ifAbsentPut:", "selector", "isOverridden", "overriddenCache"]}),
  2332. smalltalk.HLClassCache);
  2333. smalltalk.addMethod(
  2334. "_isOverride_",
  2335. smalltalk.method({
  2336. selector: "isOverride:",
  2337. fn: function (aMethod){
  2338. var self=this;
  2339. return smalltalk.withContext(function($ctx1) { var $1;
  2340. $1=_st(_st(self)._overrideCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  2341. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverride();
  2342. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2343. return $1;
  2344. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  2345. messageSends: ["at:ifAbsentPut:", "selector", "isOverride", "overrideCache"]}),
  2346. smalltalk.HLClassCache);
  2347. smalltalk.addMethod(
  2348. "_overriddenCache",
  2349. smalltalk.method({
  2350. selector: "overriddenCache",
  2351. fn: function (){
  2352. var self=this;
  2353. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2354. $2=self["@overriddenCache"];
  2355. if(($receiver = $2) == nil || $receiver == undefined){
  2356. self["@overriddenCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2357. $1=self["@overriddenCache"];
  2358. } else {
  2359. $1=$2;
  2360. };
  2361. return $1;
  2362. }, function($ctx1) {$ctx1.fill(self,"overriddenCache",{}, smalltalk.HLClassCache)})},
  2363. messageSends: ["ifNil:", "new"]}),
  2364. smalltalk.HLClassCache);
  2365. smalltalk.addMethod(
  2366. "_overrideCache",
  2367. smalltalk.method({
  2368. selector: "overrideCache",
  2369. fn: function (){
  2370. var self=this;
  2371. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2372. $2=self["@overrideCache"];
  2373. if(($receiver = $2) == nil || $receiver == undefined){
  2374. self["@overrideCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2375. $1=self["@overrideCache"];
  2376. } else {
  2377. $1=$2;
  2378. };
  2379. return $1;
  2380. }, function($ctx1) {$ctx1.fill(self,"overrideCache",{}, smalltalk.HLClassCache)})},
  2381. messageSends: ["ifNil:", "new"]}),
  2382. smalltalk.HLClassCache);
  2383. smalltalk.addMethod(
  2384. "_removeSelector_",
  2385. smalltalk.method({
  2386. selector: "removeSelector:",
  2387. fn: function (aSelector){
  2388. var self=this;
  2389. return smalltalk.withContext(function($ctx1) { _st(_st(self)._overriddenCache())._removeKey_ifAbsent_(aSelector,(function(){
  2390. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2391. _st(_st(self)._overrideCache())._removeKey_ifAbsent_(aSelector,(function(){
  2392. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2393. return self}, function($ctx1) {$ctx1.fill(self,"removeSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2394. messageSends: ["removeKey:ifAbsent:", "overriddenCache", "overrideCache"]}),
  2395. smalltalk.HLClassCache);
  2396. smalltalk.addMethod(
  2397. "_selectorsCache",
  2398. smalltalk.method({
  2399. selector: "selectorsCache",
  2400. fn: function (){
  2401. var self=this;
  2402. return smalltalk.withContext(function($ctx1) { var $1;
  2403. $1=self["@selectorsCache"];
  2404. return $1;
  2405. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLClassCache)})},
  2406. messageSends: []}),
  2407. smalltalk.HLClassCache);
  2408. smalltalk.addMethod(
  2409. "_selectorsCache_",
  2410. smalltalk.method({
  2411. selector: "selectorsCache:",
  2412. fn: function (aCache){
  2413. var self=this;
  2414. return smalltalk.withContext(function($ctx1) { self["@selectorsCache"]=aCache;
  2415. return self}, function($ctx1) {$ctx1.fill(self,"selectorsCache:",{aCache:aCache}, smalltalk.HLClassCache)})},
  2416. messageSends: []}),
  2417. smalltalk.HLClassCache);
  2418. smalltalk.addMethod(
  2419. "_theClass",
  2420. smalltalk.method({
  2421. selector: "theClass",
  2422. fn: function (){
  2423. var self=this;
  2424. return smalltalk.withContext(function($ctx1) { var $1;
  2425. $1=self["@class"];
  2426. return $1;
  2427. }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.HLClassCache)})},
  2428. messageSends: []}),
  2429. smalltalk.HLClassCache);
  2430. smalltalk.addMethod(
  2431. "_theClass_",
  2432. smalltalk.method({
  2433. selector: "theClass:",
  2434. fn: function (aClass){
  2435. var self=this;
  2436. return smalltalk.withContext(function($ctx1) { self["@class"]=aClass;
  2437. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.HLClassCache)})},
  2438. messageSends: []}),
  2439. smalltalk.HLClassCache);
  2440. smalltalk.addMethod(
  2441. "_on_selectorsCache_",
  2442. smalltalk.method({
  2443. selector: "on:selectorsCache:",
  2444. fn: function (aClass,aSelectorsCache){
  2445. var self=this;
  2446. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2447. $2=_st(self)._new();
  2448. _st($2)._theClass_(aClass);
  2449. _st($2)._selectorsCache_(aSelectorsCache);
  2450. $3=_st($2)._yourself();
  2451. $1=$3;
  2452. return $1;
  2453. }, function($ctx1) {$ctx1.fill(self,"on:selectorsCache:",{aClass:aClass,aSelectorsCache:aSelectorsCache}, smalltalk.HLClassCache.klass)})},
  2454. messageSends: ["theClass:", "new", "selectorsCache:", "yourself"]}),
  2455. smalltalk.HLClassCache.klass);
  2456. smalltalk.addClass('HLSelectorsCache', smalltalk.Object, ['classesCache'], 'Helios-Browser');
  2457. smalltalk.addMethod(
  2458. "_cacheFor_",
  2459. smalltalk.method({
  2460. selector: "cacheFor:",
  2461. fn: function (aClass){
  2462. var self=this;
  2463. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2464. $1=aClass;
  2465. if(($receiver = $1) == nil || $receiver == undefined){
  2466. return nil;
  2467. } else {
  2468. $1;
  2469. };
  2470. $2=_st(_st(self)._classesCache())._at_ifAbsentPut_(_st(aClass)._name(),(function(){
  2471. return smalltalk.withContext(function($ctx2) { return _st(self)._newCacheFor_(aClass);
  2472. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2473. return $2;
  2474. }, function($ctx1) {$ctx1.fill(self,"cacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2475. messageSends: ["ifNil:", "at:ifAbsentPut:", "name", "newCacheFor:", "classesCache"]}),
  2476. smalltalk.HLSelectorsCache);
  2477. smalltalk.addMethod(
  2478. "_classesCache",
  2479. smalltalk.method({
  2480. selector: "classesCache",
  2481. fn: function (){
  2482. var self=this;
  2483. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2484. $2=self["@classesCache"];
  2485. if(($receiver = $2) == nil || $receiver == undefined){
  2486. self["@classesCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2487. $1=self["@classesCache"];
  2488. } else {
  2489. $1=$2;
  2490. };
  2491. return $1;
  2492. }, function($ctx1) {$ctx1.fill(self,"classesCache",{}, smalltalk.HLSelectorsCache)})},
  2493. messageSends: ["ifNil:", "new"]}),
  2494. smalltalk.HLSelectorsCache);
  2495. smalltalk.addMethod(
  2496. "_initialize",
  2497. smalltalk.method({
  2498. selector: "initialize",
  2499. fn: function (){
  2500. var self=this;
  2501. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  2502. _st(self)._observeSystem();
  2503. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLSelectorsCache)})},
  2504. messageSends: ["initialize", "observeSystem"]}),
  2505. smalltalk.HLSelectorsCache);
  2506. smalltalk.addMethod(
  2507. "_invalidateCacheFor_",
  2508. smalltalk.method({
  2509. selector: "invalidateCacheFor:",
  2510. fn: function (aMethod){
  2511. var self=this;
  2512. return smalltalk.withContext(function($ctx1) { _st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._invalidateSelector_(_st(aMethod)._selector());
  2513. return self}, function($ctx1) {$ctx1.fill(self,"invalidateCacheFor:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2514. messageSends: ["invalidateSelector:", "selector", "cacheFor:", "methodClass"]}),
  2515. smalltalk.HLSelectorsCache);
  2516. smalltalk.addMethod(
  2517. "_isOverridden_",
  2518. smalltalk.method({
  2519. selector: "isOverridden:",
  2520. fn: function (aMethod){
  2521. var self=this;
  2522. return smalltalk.withContext(function($ctx1) { var $1;
  2523. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverridden_(aMethod);
  2524. return $1;
  2525. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2526. messageSends: ["isOverridden:", "cacheFor:", "methodClass"]}),
  2527. smalltalk.HLSelectorsCache);
  2528. smalltalk.addMethod(
  2529. "_isOverride_",
  2530. smalltalk.method({
  2531. selector: "isOverride:",
  2532. fn: function (aMethod){
  2533. var self=this;
  2534. return smalltalk.withContext(function($ctx1) { var $1;
  2535. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverride_(aMethod);
  2536. return $1;
  2537. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2538. messageSends: ["isOverride:", "cacheFor:", "methodClass"]}),
  2539. smalltalk.HLSelectorsCache);
  2540. smalltalk.addMethod(
  2541. "_newCacheFor_",
  2542. smalltalk.method({
  2543. selector: "newCacheFor:",
  2544. fn: function (aClass){
  2545. var self=this;
  2546. return smalltalk.withContext(function($ctx1) { var $1;
  2547. $1=_st((smalltalk.HLClassCache || HLClassCache))._on_selectorsCache_(aClass,self);
  2548. return $1;
  2549. }, function($ctx1) {$ctx1.fill(self,"newCacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2550. messageSends: ["on:selectorsCache:"]}),
  2551. smalltalk.HLSelectorsCache);
  2552. smalltalk.addMethod(
  2553. "_observeSystem",
  2554. smalltalk.method({
  2555. selector: "observeSystem",
  2556. fn: function (){
  2557. var self=this;
  2558. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2559. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  2560. _st($1)._on_do_((smalltalk.MethodAdded || MethodAdded),(function(ann){
  2561. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodAdded_(_st(ann)._method());
  2562. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2563. $2=_st($1)._on_do_((smalltalk.MethodRemoved || MethodRemoved),(function(ann){
  2564. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodRemoved_(_st(ann)._method());
  2565. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2566. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLSelectorsCache)})},
  2567. messageSends: ["on:do:", "onMethodAdded:", "method", "current", "onMethodRemoved:"]}),
  2568. smalltalk.HLSelectorsCache);
  2569. smalltalk.addMethod(
  2570. "_onMethodAdded_",
  2571. smalltalk.method({
  2572. selector: "onMethodAdded:",
  2573. fn: function (aMethod){
  2574. var self=this;
  2575. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2576. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2577. messageSends: ["invalidateCacheFor:"]}),
  2578. smalltalk.HLSelectorsCache);
  2579. smalltalk.addMethod(
  2580. "_onMethodRemoved_",
  2581. smalltalk.method({
  2582. selector: "onMethodRemoved:",
  2583. fn: function (aMethod){
  2584. var self=this;
  2585. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2586. return self}, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2587. messageSends: ["invalidateCacheFor:"]}),
  2588. smalltalk.HLSelectorsCache);
  2589. smalltalk.HLSelectorsCache.klass.iVarNames = ['current'];
  2590. smalltalk.addMethod(
  2591. "_current",
  2592. smalltalk.method({
  2593. selector: "current",
  2594. fn: function (){
  2595. var self=this;
  2596. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2597. $2=self["@current"];
  2598. if(($receiver = $2) == nil || $receiver == undefined){
  2599. self["@current"]=smalltalk.Object.klass.fn.prototype._new.apply(_st(self), []);
  2600. $1=self["@current"];
  2601. } else {
  2602. $1=$2;
  2603. };
  2604. return $1;
  2605. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.HLSelectorsCache.klass)})},
  2606. messageSends: ["ifNil:", "new"]}),
  2607. smalltalk.HLSelectorsCache.klass);
  2608. smalltalk.addMethod(
  2609. "_flush",
  2610. smalltalk.method({
  2611. selector: "flush",
  2612. fn: function (){
  2613. var self=this;
  2614. return smalltalk.withContext(function($ctx1) { self["@current"]=nil;
  2615. return self}, function($ctx1) {$ctx1.fill(self,"flush",{}, smalltalk.HLSelectorsCache.klass)})},
  2616. messageSends: []}),
  2617. smalltalk.HLSelectorsCache.klass);
  2618. smalltalk.addMethod(
  2619. "_new",
  2620. smalltalk.method({
  2621. selector: "new",
  2622. fn: function (){
  2623. var self=this;
  2624. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  2625. return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.HLSelectorsCache.klass)})},
  2626. messageSends: ["shouldNotImplement"]}),
  2627. smalltalk.HLSelectorsCache.klass);
  2628. smalltalk.addMethod(
  2629. "_isOverridden",
  2630. smalltalk.method({
  2631. selector: "isOverridden",
  2632. fn: function (){
  2633. var self=this;
  2634. var selector;
  2635. return smalltalk.withContext(function($ctx1) { var $1;
  2636. var $early={};
  2637. try {
  2638. selector=_st(self)._selector();
  2639. _st(_st(self)._methodClass())._allSubclassesDo_((function(each){
  2640. return smalltalk.withContext(function($ctx2) { $1=_st(each)._includesSelector_(selector);
  2641. if(smalltalk.assert($1)){
  2642. throw $early=[true];
  2643. };
  2644. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2645. return false;
  2646. }
  2647. catch(e) {if(e===$early)return e[0]; throw e}
  2648. }, function($ctx1) {$ctx1.fill(self,"isOverridden",{selector:selector}, smalltalk.CompiledMethod)})},
  2649. messageSends: ["selector", "allSubclassesDo:", "ifTrue:", "includesSelector:", "methodClass"]}),
  2650. smalltalk.CompiledMethod);
  2651. smalltalk.addMethod(
  2652. "_isOverride",
  2653. smalltalk.method({
  2654. selector: "isOverride",
  2655. fn: function (){
  2656. var self=this;
  2657. var superclass;
  2658. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2659. superclass=_st(_st(self)._methodClass())._superclass();
  2660. $1=superclass;
  2661. if(($receiver = $1) == nil || $receiver == undefined){
  2662. return false;
  2663. } else {
  2664. $1;
  2665. };
  2666. $2=_st(_st(_st(_st(self)._methodClass())._superclass())._lookupSelector_(_st(self)._selector()))._notNil();
  2667. return $2;
  2668. }, function($ctx1) {$ctx1.fill(self,"isOverride",{superclass:superclass}, smalltalk.CompiledMethod)})},
  2669. messageSends: ["superclass", "methodClass", "ifNil:", "notNil", "lookupSelector:", "selector"]}),
  2670. smalltalk.CompiledMethod);