Helios-Browser.deploy.js 107 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890
  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 $1,$3,$2;
  1474. currentProtocol=_st(self)._selectedProtocol();
  1475. $1=_st(self)._selectedMethod();
  1476. if(($receiver = $1) == nil || $receiver == undefined){
  1477. $1;
  1478. } else {
  1479. currentProtocol=_st(_st(self)._selectedMethod())._protocol();
  1480. currentProtocol;
  1481. };
  1482. $3=_st(currentProtocol).__eq(_st(self)._allProtocol());
  1483. if(smalltalk.assert($3)){
  1484. $2=_st(self)._unclassifiedProtocol();
  1485. } else {
  1486. $2=currentProtocol;
  1487. };
  1488. return $2;
  1489. }, function($ctx1) {$ctx1.fill(self,"compilationProtocol",{currentProtocol:currentProtocol}, smalltalk.HLBrowserModel)})},
  1490. messageSends: ["selectedProtocol", "ifNotNil:", "protocol", "selectedMethod", "ifTrue:ifFalse:", "unclassifiedProtocol", "=", "allProtocol"]}),
  1491. smalltalk.HLBrowserModel);
  1492. smalltalk.addMethod(
  1493. "_compileClassComment_",
  1494. smalltalk.method({
  1495. selector: "compileClassComment:",
  1496. fn: function (aString){
  1497. var self=this;
  1498. return smalltalk.withContext(function($ctx1) { _st(_st(self)._environment())._compileClassComment_for_(aString,_st(self)._selectedClass());
  1499. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1500. messageSends: ["compileClassComment:for:", "selectedClass", "environment"]}),
  1501. smalltalk.HLBrowserModel);
  1502. smalltalk.addMethod(
  1503. "_compileClassDefinition_",
  1504. smalltalk.method({
  1505. selector: "compileClassDefinition:",
  1506. fn: function (aString){
  1507. var self=this;
  1508. return smalltalk.withContext(function($ctx1) { _st(_st(self)._environment())._compileClassDefinition_(aString);
  1509. return self}, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1510. messageSends: ["compileClassDefinition:", "environment"]}),
  1511. smalltalk.HLBrowserModel);
  1512. smalltalk.addMethod(
  1513. "_compileMethod_",
  1514. smalltalk.method({
  1515. selector: "compileMethod:",
  1516. fn: function (aString){
  1517. var self=this;
  1518. return smalltalk.withContext(function($ctx1) { _st(self)._withCompileErrorHandling_((function(){
  1519. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._environment())._compileMethod_for_protocol_(aString,_st(self)._selectedClass(),_st(self)._compilationProtocol());
  1520. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1521. return self}, function($ctx1) {$ctx1.fill(self,"compileMethod:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1522. messageSends: ["withCompileErrorHandling:", "compileMethod:for:protocol:", "selectedClass", "compilationProtocol", "environment"]}),
  1523. smalltalk.HLBrowserModel);
  1524. smalltalk.addMethod(
  1525. "_environment",
  1526. smalltalk.method({
  1527. selector: "environment",
  1528. fn: function (){
  1529. var self=this;
  1530. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1531. $2=self["@environment"];
  1532. if(($receiver = $2) == nil || $receiver == undefined){
  1533. $1=_st(_st((smalltalk.HLManager || HLManager))._current())._environment();
  1534. } else {
  1535. $1=$2;
  1536. };
  1537. return $1;
  1538. }, function($ctx1) {$ctx1.fill(self,"environment",{}, smalltalk.HLBrowserModel)})},
  1539. messageSends: ["ifNil:", "environment", "current"]}),
  1540. smalltalk.HLBrowserModel);
  1541. smalltalk.addMethod(
  1542. "_environment_",
  1543. smalltalk.method({
  1544. selector: "environment:",
  1545. fn: function (anEnvironment){
  1546. var self=this;
  1547. return smalltalk.withContext(function($ctx1) { self["@environment"]=anEnvironment;
  1548. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel)})},
  1549. messageSends: []}),
  1550. smalltalk.HLBrowserModel);
  1551. smalltalk.addMethod(
  1552. "_focusOnClasses",
  1553. smalltalk.method({
  1554. selector: "focusOnClasses",
  1555. fn: function (){
  1556. var self=this;
  1557. return smalltalk.withContext(function($ctx1) { _st(_st(self)._announcer())._announce_(_st((smalltalk.HLClassesFocusRequested || HLClassesFocusRequested))._new());
  1558. return self}, function($ctx1) {$ctx1.fill(self,"focusOnClasses",{}, smalltalk.HLBrowserModel)})},
  1559. messageSends: ["announce:", "new", "announcer"]}),
  1560. smalltalk.HLBrowserModel);
  1561. smalltalk.addMethod(
  1562. "_focusOnMethods",
  1563. smalltalk.method({
  1564. selector: "focusOnMethods",
  1565. fn: function (){
  1566. var self=this;
  1567. return smalltalk.withContext(function($ctx1) { _st(_st(self)._announcer())._announce_(_st((smalltalk.HLMethodsFocusRequested || HLMethodsFocusRequested))._new());
  1568. return self}, function($ctx1) {$ctx1.fill(self,"focusOnMethods",{}, smalltalk.HLBrowserModel)})},
  1569. messageSends: ["announce:", "new", "announcer"]}),
  1570. smalltalk.HLBrowserModel);
  1571. smalltalk.addMethod(
  1572. "_focusOnPackages",
  1573. smalltalk.method({
  1574. selector: "focusOnPackages",
  1575. fn: function (){
  1576. var self=this;
  1577. return smalltalk.withContext(function($ctx1) { _st(_st(self)._announcer())._announce_(_st((smalltalk.HLPackagesFocusRequested || HLPackagesFocusRequested))._new());
  1578. return self}, function($ctx1) {$ctx1.fill(self,"focusOnPackages",{}, smalltalk.HLBrowserModel)})},
  1579. messageSends: ["announce:", "new", "announcer"]}),
  1580. smalltalk.HLBrowserModel);
  1581. smalltalk.addMethod(
  1582. "_focusOnProtocols",
  1583. smalltalk.method({
  1584. selector: "focusOnProtocols",
  1585. fn: function (){
  1586. var self=this;
  1587. return smalltalk.withContext(function($ctx1) { _st(_st(self)._announcer())._announce_(_st((smalltalk.HLProtocolsFocusRequested || HLProtocolsFocusRequested))._new());
  1588. return self}, function($ctx1) {$ctx1.fill(self,"focusOnProtocols",{}, smalltalk.HLBrowserModel)})},
  1589. messageSends: ["announce:", "new", "announcer"]}),
  1590. smalltalk.HLBrowserModel);
  1591. smalltalk.addMethod(
  1592. "_focusOnSourceCode",
  1593. smalltalk.method({
  1594. selector: "focusOnSourceCode",
  1595. fn: function (){
  1596. var self=this;
  1597. return smalltalk.withContext(function($ctx1) { _st(_st(self)._announcer())._announce_(_st((smalltalk.HLSourceCodeFocusRequested || HLSourceCodeFocusRequested))._new());
  1598. return self}, function($ctx1) {$ctx1.fill(self,"focusOnSourceCode",{}, smalltalk.HLBrowserModel)})},
  1599. messageSends: ["announce:", "new", "announcer"]}),
  1600. smalltalk.HLBrowserModel);
  1601. smalltalk.addMethod(
  1602. "_handleCompileError_",
  1603. smalltalk.method({
  1604. selector: "handleCompileError:",
  1605. fn: function (anError){
  1606. var self=this;
  1607. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1608. $1=_st((smalltalk.HLCompileErrorRaised || HLCompileErrorRaised))._new();
  1609. _st($1)._error_(anError);
  1610. $2=_st($1)._yourself();
  1611. _st(_st(self)._announcer())._announce_($2);
  1612. return self}, function($ctx1) {$ctx1.fill(self,"handleCompileError:",{anError:anError}, smalltalk.HLBrowserModel)})},
  1613. messageSends: ["announce:", "error:", "new", "yourself", "announcer"]}),
  1614. smalltalk.HLBrowserModel);
  1615. smalltalk.addMethod(
  1616. "_handleParseError_",
  1617. smalltalk.method({
  1618. selector: "handleParseError:",
  1619. fn: function (anError){
  1620. var self=this;
  1621. var split,line,column,messageToInsert;
  1622. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1623. split=_st(_st(anError)._messageText())._tokenize_(" : ");
  1624. messageToInsert=_st(split)._second();
  1625. split=_st(_st(split)._first())._copyFrom_to_((21),_st(_st(split)._first())._size());
  1626. split=_st(split)._tokenize_(" column ");
  1627. line=_st(split)._first();
  1628. column=_st(split)._second();
  1629. $1=_st((smalltalk.HLParseErrorRaised || HLParseErrorRaised))._new();
  1630. _st($1)._line_(_st(line)._asNumber());
  1631. _st($1)._column_(_st(column)._asNumber());
  1632. _st($1)._message_(messageToInsert);
  1633. _st($1)._error_(anError);
  1634. $2=_st($1)._yourself();
  1635. _st(_st(self)._announcer())._announce_($2);
  1636. return self}, function($ctx1) {$ctx1.fill(self,"handleParseError:",{anError:anError,split:split,line:line,column:column,messageToInsert:messageToInsert}, smalltalk.HLBrowserModel)})},
  1637. messageSends: ["tokenize:", "messageText", "second", "copyFrom:to:", "size", "first", "announce:", "line:", "asNumber", "new", "column:", "message:", "error:", "yourself", "announcer"]}),
  1638. smalltalk.HLBrowserModel);
  1639. smalltalk.addMethod(
  1640. "_handleUnkownVariableError_",
  1641. smalltalk.method({
  1642. selector: "handleUnkownVariableError:",
  1643. fn: function (anError){
  1644. var self=this;
  1645. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1646. $1=_st((smalltalk.HLUnknownVariableErrorRaised || HLUnknownVariableErrorRaised))._new();
  1647. _st($1)._error_(anError);
  1648. $2=_st($1)._yourself();
  1649. _st(_st(self)._announcer())._announce_($2);
  1650. return self}, function($ctx1) {$ctx1.fill(self,"handleUnkownVariableError:",{anError:anError}, smalltalk.HLBrowserModel)})},
  1651. messageSends: ["announce:", "error:", "new", "yourself", "announcer"]}),
  1652. smalltalk.HLBrowserModel);
  1653. smalltalk.addMethod(
  1654. "_packages",
  1655. smalltalk.method({
  1656. selector: "packages",
  1657. fn: function (){
  1658. var self=this;
  1659. return smalltalk.withContext(function($ctx1) { var $1;
  1660. $1=_st(_st(self)._environment())._packages();
  1661. return $1;
  1662. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLBrowserModel)})},
  1663. messageSends: ["packages", "environment"]}),
  1664. smalltalk.HLBrowserModel);
  1665. smalltalk.addMethod(
  1666. "_save_",
  1667. smalltalk.method({
  1668. selector: "save:",
  1669. fn: function (aString){
  1670. var self=this;
  1671. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1672. $1=_st(self)._shouldCompileClassDefinition();
  1673. if(smalltalk.assert($1)){
  1674. _st(self)._compileClassDefinition_(aString);
  1675. } else {
  1676. $2=_st(self)._shouldCompileClassComment();
  1677. if(smalltalk.assert($2)){
  1678. _st(self)._compileClassComment_(aString);
  1679. } else {
  1680. _st(self)._compileMethod_(aString);
  1681. };
  1682. };
  1683. return self}, function($ctx1) {$ctx1.fill(self,"save:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1684. messageSends: ["ifTrue:ifFalse:", "compileClassDefinition:", "compileClassComment:", "compileMethod:", "shouldCompileClassComment", "shouldCompileClassDefinition"]}),
  1685. smalltalk.HLBrowserModel);
  1686. smalltalk.addMethod(
  1687. "_saveSourceCode",
  1688. smalltalk.method({
  1689. selector: "saveSourceCode",
  1690. fn: function (){
  1691. var self=this;
  1692. return smalltalk.withContext(function($ctx1) { _st(_st(self)._announcer())._announce_(_st((smalltalk.HLSaveSourceCode || HLSaveSourceCode))._new());
  1693. return self}, function($ctx1) {$ctx1.fill(self,"saveSourceCode",{}, smalltalk.HLBrowserModel)})},
  1694. messageSends: ["announce:", "new", "announcer"]}),
  1695. smalltalk.HLBrowserModel);
  1696. smalltalk.addMethod(
  1697. "_selectedClass",
  1698. smalltalk.method({
  1699. selector: "selectedClass",
  1700. fn: function (){
  1701. var self=this;
  1702. return smalltalk.withContext(function($ctx1) { var $1;
  1703. $1=self["@selectedClass"];
  1704. return $1;
  1705. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{}, smalltalk.HLBrowserModel)})},
  1706. messageSends: []}),
  1707. smalltalk.HLBrowserModel);
  1708. smalltalk.addMethod(
  1709. "_selectedClass_",
  1710. smalltalk.method({
  1711. selector: "selectedClass:",
  1712. fn: function (aClass){
  1713. var self=this;
  1714. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  1715. $1=_st(self["@selectedClass"]).__eq(aClass);
  1716. if(smalltalk.assert($1)){
  1717. $2=aClass;
  1718. if(($receiver = $2) == nil || $receiver == undefined){
  1719. $3=self;
  1720. return $3;
  1721. } else {
  1722. $2;
  1723. };
  1724. _st(self)._selectedProtocol_(nil);
  1725. };
  1726. $4=aClass;
  1727. if(($receiver = $4) == nil || $receiver == undefined){
  1728. self["@selectedClass"]=nil;
  1729. self["@selectedClass"];
  1730. } else {
  1731. $5=_st(self)._showInstance();
  1732. if(smalltalk.assert($5)){
  1733. self["@selectedClass"]=_st(aClass)._theNonMetaClass();
  1734. self["@selectedClass"];
  1735. } else {
  1736. self["@selectedClass"]=_st(aClass)._theMetaClass();
  1737. self["@selectedClass"];
  1738. };
  1739. };
  1740. _st(self)._selectedProtocol_(nil);
  1741. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLClassSelected || HLClassSelected))._on_(_st(self)._selectedClass()));
  1742. return self}, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass}, smalltalk.HLBrowserModel)})},
  1743. messageSends: ["ifTrue:", "ifNil:", "selectedProtocol:", "=", "ifNil:ifNotNil:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "showInstance", "announce:", "on:", "selectedClass", "announcer"]}),
  1744. smalltalk.HLBrowserModel);
  1745. smalltalk.addMethod(
  1746. "_selectedMethod",
  1747. smalltalk.method({
  1748. selector: "selectedMethod",
  1749. fn: function (){
  1750. var self=this;
  1751. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1752. $2=_st(self)._selectedClass();
  1753. if(($receiver = $2) == nil || $receiver == undefined){
  1754. $1=$2;
  1755. } else {
  1756. $1=_st(_st(_st(self)._selectedClass())._methodDictionary())._at_(self["@selectedSelector"]);
  1757. };
  1758. return $1;
  1759. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{}, smalltalk.HLBrowserModel)})},
  1760. messageSends: ["ifNotNil:", "at:", "methodDictionary", "selectedClass"]}),
  1761. smalltalk.HLBrowserModel);
  1762. smalltalk.addMethod(
  1763. "_selectedMethod_",
  1764. smalltalk.method({
  1765. selector: "selectedMethod:",
  1766. fn: function (aCompiledMethod){
  1767. var self=this;
  1768. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  1769. $1=_st(self["@selectedSelector"]).__eq(aCompiledMethod);
  1770. if(smalltalk.assert($1)){
  1771. $2=self;
  1772. return $2;
  1773. };
  1774. $3=aCompiledMethod;
  1775. if(($receiver = $3) == nil || $receiver == undefined){
  1776. self["@selectedSelector"]=nil;
  1777. self["@selectedSelector"];
  1778. } else {
  1779. $4=_st(self["@selectedSelector"]).__eq(_st(aCompiledMethod)._selector());
  1780. if(smalltalk.assert($4)){
  1781. $5=self;
  1782. return $5;
  1783. };
  1784. self["@selectedSelector"]=_st(aCompiledMethod)._selector();
  1785. self["@selectedSelector"];
  1786. };
  1787. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLMethodSelected || HLMethodSelected))._on_(aCompiledMethod));
  1788. return self}, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserModel)})},
  1789. messageSends: ["ifTrue:", "=", "ifNil:ifNotNil:", "selector", "announce:", "on:", "announcer"]}),
  1790. smalltalk.HLBrowserModel);
  1791. smalltalk.addMethod(
  1792. "_selectedPackage",
  1793. smalltalk.method({
  1794. selector: "selectedPackage",
  1795. fn: function (){
  1796. var self=this;
  1797. return smalltalk.withContext(function($ctx1) { var $1;
  1798. $1=self["@selectedPackage"];
  1799. return $1;
  1800. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{}, smalltalk.HLBrowserModel)})},
  1801. messageSends: []}),
  1802. smalltalk.HLBrowserModel);
  1803. smalltalk.addMethod(
  1804. "_selectedPackage_",
  1805. smalltalk.method({
  1806. selector: "selectedPackage:",
  1807. fn: function (aPackage){
  1808. var self=this;
  1809. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1810. $1=_st(self["@selectedPackage"]).__eq(aPackage);
  1811. if(smalltalk.assert($1)){
  1812. $2=self;
  1813. return $2;
  1814. };
  1815. self["@selectedPackage"]=aPackage;
  1816. _st(self)._selectedClass_(nil);
  1817. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLPackageSelected || HLPackageSelected))._on_(aPackage));
  1818. return self}, function($ctx1) {$ctx1.fill(self,"selectedPackage:",{aPackage:aPackage}, smalltalk.HLBrowserModel)})},
  1819. messageSends: ["ifTrue:", "=", "selectedClass:", "announce:", "on:", "announcer"]}),
  1820. smalltalk.HLBrowserModel);
  1821. smalltalk.addMethod(
  1822. "_selectedProtocol",
  1823. smalltalk.method({
  1824. selector: "selectedProtocol",
  1825. fn: function (){
  1826. var self=this;
  1827. return smalltalk.withContext(function($ctx1) { var $1;
  1828. $1=self["@selectedProtocol"];
  1829. return $1;
  1830. }, function($ctx1) {$ctx1.fill(self,"selectedProtocol",{}, smalltalk.HLBrowserModel)})},
  1831. messageSends: []}),
  1832. smalltalk.HLBrowserModel);
  1833. smalltalk.addMethod(
  1834. "_selectedProtocol_",
  1835. smalltalk.method({
  1836. selector: "selectedProtocol:",
  1837. fn: function (aString){
  1838. var self=this;
  1839. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1840. $1=_st(self["@selectedProtocol"]).__eq(aString);
  1841. if(smalltalk.assert($1)){
  1842. $2=self;
  1843. return $2;
  1844. };
  1845. self["@selectedProtocol"]=aString;
  1846. _st(self)._selectedMethod_(nil);
  1847. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLProtocolSelected || HLProtocolSelected))._on_(aString));
  1848. return self}, function($ctx1) {$ctx1.fill(self,"selectedProtocol:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1849. messageSends: ["ifTrue:", "=", "selectedMethod:", "announce:", "on:", "announcer"]}),
  1850. smalltalk.HLBrowserModel);
  1851. smalltalk.addMethod(
  1852. "_shouldCompileClassComment",
  1853. smalltalk.method({
  1854. selector: "shouldCompileClassComment",
  1855. fn: function (){
  1856. var self=this;
  1857. return smalltalk.withContext(function($ctx1) { return false;
  1858. }, function($ctx1) {$ctx1.fill(self,"shouldCompileClassComment",{}, smalltalk.HLBrowserModel)})},
  1859. messageSends: []}),
  1860. smalltalk.HLBrowserModel);
  1861. smalltalk.addMethod(
  1862. "_shouldCompileClassDefinition",
  1863. smalltalk.method({
  1864. selector: "shouldCompileClassDefinition",
  1865. fn: function (){
  1866. var self=this;
  1867. return smalltalk.withContext(function($ctx1) { var $1;
  1868. $1=_st(_st(self)._selectedProtocol())._isNil();
  1869. return $1;
  1870. }, function($ctx1) {$ctx1.fill(self,"shouldCompileClassDefinition",{}, smalltalk.HLBrowserModel)})},
  1871. messageSends: ["isNil", "selectedProtocol"]}),
  1872. smalltalk.HLBrowserModel);
  1873. smalltalk.addMethod(
  1874. "_showComment",
  1875. smalltalk.method({
  1876. selector: "showComment",
  1877. fn: function (){
  1878. var self=this;
  1879. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1880. $2=self["@showComment"];
  1881. if(($receiver = $2) == nil || $receiver == undefined){
  1882. $1=false;
  1883. } else {
  1884. $1=$2;
  1885. };
  1886. return $1;
  1887. }, function($ctx1) {$ctx1.fill(self,"showComment",{}, smalltalk.HLBrowserModel)})},
  1888. messageSends: ["ifNil:"]}),
  1889. smalltalk.HLBrowserModel);
  1890. smalltalk.addMethod(
  1891. "_showComment_",
  1892. smalltalk.method({
  1893. selector: "showComment:",
  1894. fn: function (aBoolean){
  1895. var self=this;
  1896. return smalltalk.withContext(function($ctx1) { self["@showComment"]=aBoolean;
  1897. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowCommentToggled || HLShowCommentToggled))._new());
  1898. return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  1899. messageSends: ["announce:", "new", "announcer"]}),
  1900. smalltalk.HLBrowserModel);
  1901. smalltalk.addMethod(
  1902. "_showInstance",
  1903. smalltalk.method({
  1904. selector: "showInstance",
  1905. fn: function (){
  1906. var self=this;
  1907. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1908. $2=self["@showInstance"];
  1909. if(($receiver = $2) == nil || $receiver == undefined){
  1910. $1=true;
  1911. } else {
  1912. $1=$2;
  1913. };
  1914. return $1;
  1915. }, function($ctx1) {$ctx1.fill(self,"showInstance",{}, smalltalk.HLBrowserModel)})},
  1916. messageSends: ["ifNil:"]}),
  1917. smalltalk.HLBrowserModel);
  1918. smalltalk.addMethod(
  1919. "_showInstance_",
  1920. smalltalk.method({
  1921. selector: "showInstance:",
  1922. fn: function (aBoolean){
  1923. var self=this;
  1924. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$3;
  1925. self["@showInstance"]=aBoolean;
  1926. $1=_st(self)._selectedClass();
  1927. if(($receiver = $1) == nil || $receiver == undefined){
  1928. $1;
  1929. } else {
  1930. $2=self;
  1931. $4=aBoolean;
  1932. if(smalltalk.assert($4)){
  1933. $3=_st(_st(self)._selectedClass())._theNonMetaClass();
  1934. } else {
  1935. $3=_st(_st(self)._selectedClass())._theMetaClass();
  1936. };
  1937. _st($2)._selectedClass_($3);
  1938. };
  1939. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled))._new());
  1940. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  1941. messageSends: ["ifNotNil:", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "selectedClass", "theMetaClass", "announce:", "new", "announcer"]}),
  1942. smalltalk.HLBrowserModel);
  1943. smalltalk.addMethod(
  1944. "_unclassifiedProtocol",
  1945. smalltalk.method({
  1946. selector: "unclassifiedProtocol",
  1947. fn: function (){
  1948. var self=this;
  1949. return smalltalk.withContext(function($ctx1) { return "as yet unclassified";
  1950. }, function($ctx1) {$ctx1.fill(self,"unclassifiedProtocol",{}, smalltalk.HLBrowserModel)})},
  1951. messageSends: []}),
  1952. smalltalk.HLBrowserModel);
  1953. smalltalk.addMethod(
  1954. "_withCompileErrorHandling_",
  1955. smalltalk.method({
  1956. selector: "withCompileErrorHandling:",
  1957. fn: function (aBlock){
  1958. var self=this;
  1959. return smalltalk.withContext(function($ctx1) { _st((function(){
  1960. return smalltalk.withContext(function($ctx2) { return _st((function(){
  1961. return smalltalk.withContext(function($ctx3) { return _st(aBlock)._on_do_((smalltalk.ParseError || ParseError),(function(ex){
  1962. return smalltalk.withContext(function($ctx4) { return _st(self)._handleParseError_(ex);
  1963. }, function($ctx4) {$ctx4.fillBlock({ex:ex},$ctx1)})}));
  1964. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._on_do_((smalltalk.UnknownVariableError || UnknownVariableError),(function(ex){
  1965. return smalltalk.withContext(function($ctx3) { return _st(self)._handleUnkownVariableError_(ex);
  1966. }, function($ctx3) {$ctx3.fillBlock({ex:ex},$ctx1)})}));
  1967. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.CompilerError || CompilerError),(function(ex){
  1968. return smalltalk.withContext(function($ctx2) { return _st(self)._handleCompileError_(ex);
  1969. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  1970. return self}, function($ctx1) {$ctx1.fill(self,"withCompileErrorHandling:",{aBlock:aBlock}, smalltalk.HLBrowserModel)})},
  1971. messageSends: ["on:do:", "handleCompileError:", "handleUnkownVariableError:", "handleParseError:"]}),
  1972. smalltalk.HLBrowserModel);
  1973. smalltalk.addMethod(
  1974. "_on_",
  1975. smalltalk.method({
  1976. selector: "on:",
  1977. fn: function (anEnvironment){
  1978. var self=this;
  1979. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1980. $2=_st(self)._new();
  1981. _st($2)._environment_(anEnvironment);
  1982. $3=_st($2)._yourself();
  1983. $1=$3;
  1984. return $1;
  1985. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel.klass)})},
  1986. messageSends: ["environment:", "new", "yourself"]}),
  1987. smalltalk.HLBrowserModel.klass);
  1988. smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'methodContents', 'codeWidget'], 'Helios-Browser');
  1989. smalltalk.addMethod(
  1990. "_codeWidget",
  1991. smalltalk.method({
  1992. selector: "codeWidget",
  1993. fn: function (){
  1994. var self=this;
  1995. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1996. $2=self["@codeWidget"];
  1997. if(($receiver = $2) == nil || $receiver == undefined){
  1998. self["@codeWidget"]=_st((smalltalk.HLSourceCodeWidget || HLSourceCodeWidget))._on_(_st(self)._model());
  1999. $1=self["@codeWidget"];
  2000. } else {
  2001. $1=$2;
  2002. };
  2003. return $1;
  2004. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{}, smalltalk.HLBrowserSourceWidget)})},
  2005. messageSends: ["ifNil:", "on:", "model"]}),
  2006. smalltalk.HLBrowserSourceWidget);
  2007. smalltalk.addMethod(
  2008. "_contents",
  2009. smalltalk.method({
  2010. selector: "contents",
  2011. fn: function (){
  2012. var self=this;
  2013. return smalltalk.withContext(function($ctx1) { var $1;
  2014. $1=_st(_st(self)._codeWidget())._contents();
  2015. return $1;
  2016. }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.HLBrowserSourceWidget)})},
  2017. messageSends: ["contents", "codeWidget"]}),
  2018. smalltalk.HLBrowserSourceWidget);
  2019. smalltalk.addMethod(
  2020. "_contents_",
  2021. smalltalk.method({
  2022. selector: "contents:",
  2023. fn: function (aString){
  2024. var self=this;
  2025. return smalltalk.withContext(function($ctx1) { _st(self)._methodContents_(aString);
  2026. _st(_st(self)._codeWidget())._contents_(aString);
  2027. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2028. messageSends: ["methodContents:", "contents:", "codeWidget"]}),
  2029. smalltalk.HLBrowserSourceWidget);
  2030. smalltalk.addMethod(
  2031. "_focus",
  2032. smalltalk.method({
  2033. selector: "focus",
  2034. fn: function (){
  2035. var self=this;
  2036. return smalltalk.withContext(function($ctx1) { _st(_st(self)._codeWidget())._focus();
  2037. return self}, function($ctx1) {$ctx1.fill(self,"focus",{}, smalltalk.HLBrowserSourceWidget)})},
  2038. messageSends: ["focus", "codeWidget"]}),
  2039. smalltalk.HLBrowserSourceWidget);
  2040. smalltalk.addMethod(
  2041. "_hasFocus",
  2042. smalltalk.method({
  2043. selector: "hasFocus",
  2044. fn: function (){
  2045. var self=this;
  2046. return smalltalk.withContext(function($ctx1) { var $1;
  2047. $1=_st(_st(self)._codeWidget())._hasFocus();
  2048. return $1;
  2049. }, function($ctx1) {$ctx1.fill(self,"hasFocus",{}, smalltalk.HLBrowserSourceWidget)})},
  2050. messageSends: ["hasFocus", "codeWidget"]}),
  2051. smalltalk.HLBrowserSourceWidget);
  2052. smalltalk.addMethod(
  2053. "_hasModification",
  2054. smalltalk.method({
  2055. selector: "hasModification",
  2056. fn: function (){
  2057. var self=this;
  2058. return smalltalk.withContext(function($ctx1) { var $1;
  2059. $1=_st(_st(_st(self)._methodContents()).__eq(_st(self)._contents()))._not();
  2060. return $1;
  2061. }, function($ctx1) {$ctx1.fill(self,"hasModification",{}, smalltalk.HLBrowserSourceWidget)})},
  2062. messageSends: ["not", "=", "contents", "methodContents"]}),
  2063. smalltalk.HLBrowserSourceWidget);
  2064. smalltalk.addMethod(
  2065. "_initialize",
  2066. smalltalk.method({
  2067. selector: "initialize",
  2068. fn: function (){
  2069. var self=this;
  2070. return smalltalk.withContext(function($ctx1) { smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  2071. _st(self)._observeSystem();
  2072. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLBrowserSourceWidget)})},
  2073. messageSends: ["initialize", "observeSystem"]}),
  2074. smalltalk.HLBrowserSourceWidget);
  2075. smalltalk.addMethod(
  2076. "_methodContents",
  2077. smalltalk.method({
  2078. selector: "methodContents",
  2079. fn: function (){
  2080. var self=this;
  2081. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2082. $2=self["@methodContents"];
  2083. if(($receiver = $2) == nil || $receiver == undefined){
  2084. self["@methodContents"]="";
  2085. $1=self["@methodContents"];
  2086. } else {
  2087. $1=$2;
  2088. };
  2089. return $1;
  2090. }, function($ctx1) {$ctx1.fill(self,"methodContents",{}, smalltalk.HLBrowserSourceWidget)})},
  2091. messageSends: ["ifNil:"]}),
  2092. smalltalk.HLBrowserSourceWidget);
  2093. smalltalk.addMethod(
  2094. "_methodContents_",
  2095. smalltalk.method({
  2096. selector: "methodContents:",
  2097. fn: function (aString){
  2098. var self=this;
  2099. return smalltalk.withContext(function($ctx1) { self["@methodContents"]=aString;
  2100. return self}, function($ctx1) {$ctx1.fill(self,"methodContents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2101. messageSends: []}),
  2102. smalltalk.HLBrowserSourceWidget);
  2103. smalltalk.addMethod(
  2104. "_model",
  2105. smalltalk.method({
  2106. selector: "model",
  2107. fn: function (){
  2108. var self=this;
  2109. return smalltalk.withContext(function($ctx1) { var $1;
  2110. $1=self["@model"];
  2111. return $1;
  2112. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLBrowserSourceWidget)})},
  2113. messageSends: []}),
  2114. smalltalk.HLBrowserSourceWidget);
  2115. smalltalk.addMethod(
  2116. "_model_",
  2117. smalltalk.method({
  2118. selector: "model:",
  2119. fn: function (aBrowserModel){
  2120. var self=this;
  2121. return smalltalk.withContext(function($ctx1) { self["@model"]=aBrowserModel;
  2122. _st(self)._observeModel();
  2123. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget)})},
  2124. messageSends: ["observeModel"]}),
  2125. smalltalk.HLBrowserSourceWidget);
  2126. smalltalk.addMethod(
  2127. "_observeModel",
  2128. smalltalk.method({
  2129. selector: "observeModel",
  2130. fn: function (){
  2131. var self=this;
  2132. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2133. $1=_st(_st(self)._model())._announcer();
  2134. _st($1)._on_do_((smalltalk.HLMethodSelected || HLMethodSelected),(function(ann){
  2135. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodSelected_(_st(ann)._item());
  2136. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2137. _st($1)._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  2138. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  2139. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2140. _st($1)._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  2141. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  2142. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2143. $2=_st($1)._on_do_((smalltalk.HLSourceCodeFocusRequested || HLSourceCodeFocusRequested),(function(ann){
  2144. return smalltalk.withContext(function($ctx2) { return _st(self)._onSourceCodeFocusRequested();
  2145. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2146. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLBrowserSourceWidget)})},
  2147. messageSends: ["on:do:", "onMethodSelected:", "item", "announcer", "model", "onClassSelected:", "onProtocolSelected:", "onSourceCodeFocusRequested"]}),
  2148. smalltalk.HLBrowserSourceWidget);
  2149. smalltalk.addMethod(
  2150. "_observeSystem",
  2151. smalltalk.method({
  2152. selector: "observeSystem",
  2153. fn: function (){
  2154. var self=this;
  2155. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._on_do_((smalltalk.MethodModified || MethodModified),(function(ann){
  2156. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodModified_(_st(ann)._method());
  2157. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2158. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLBrowserSourceWidget)})},
  2159. messageSends: ["on:do:", "onMethodModified:", "method", "current"]}),
  2160. smalltalk.HLBrowserSourceWidget);
  2161. smalltalk.addMethod(
  2162. "_onClassSelected_",
  2163. smalltalk.method({
  2164. selector: "onClassSelected:",
  2165. fn: function (aClass){
  2166. var self=this;
  2167. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2168. $1=aClass;
  2169. if(($receiver = $1) == nil || $receiver == undefined){
  2170. $2=_st(self)._contents_("");
  2171. return $2;
  2172. } else {
  2173. $1;
  2174. };
  2175. _st(self)._contents_(_st(aClass)._definition());
  2176. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLBrowserSourceWidget)})},
  2177. messageSends: ["ifNil:", "contents:", "definition"]}),
  2178. smalltalk.HLBrowserSourceWidget);
  2179. smalltalk.addMethod(
  2180. "_onMethodModified_",
  2181. smalltalk.method({
  2182. selector: "onMethodModified:",
  2183. fn: function (aMethod){
  2184. var self=this;
  2185. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2186. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(aMethod)._methodClass());
  2187. if(! smalltalk.assert($1)){
  2188. $2=self;
  2189. return $2;
  2190. };
  2191. $3=_st(_st(_st(_st(self)._model())._selectedMethod())._selector()).__eq(_st(aMethod)._selector());
  2192. if(! smalltalk.assert($3)){
  2193. $4=self;
  2194. return $4;
  2195. };
  2196. _st(self)._refresh();
  2197. return self}, function($ctx1) {$ctx1.fill(self,"onMethodModified:",{aMethod:aMethod}, smalltalk.HLBrowserSourceWidget)})},
  2198. messageSends: ["ifFalse:", "=", "methodClass", "selectedClass", "model", "selector", "selectedMethod", "refresh"]}),
  2199. smalltalk.HLBrowserSourceWidget);
  2200. smalltalk.addMethod(
  2201. "_onMethodSelected_",
  2202. smalltalk.method({
  2203. selector: "onMethodSelected:",
  2204. fn: function (aCompiledMethod){
  2205. var self=this;
  2206. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2207. $1=aCompiledMethod;
  2208. if(($receiver = $1) == nil || $receiver == undefined){
  2209. $2=_st(self)._contents_("");
  2210. return $2;
  2211. } else {
  2212. $1;
  2213. };
  2214. _st(self)._contents_(_st(aCompiledMethod)._source());
  2215. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserSourceWidget)})},
  2216. messageSends: ["ifNil:", "contents:", "source"]}),
  2217. smalltalk.HLBrowserSourceWidget);
  2218. smalltalk.addMethod(
  2219. "_onProtocolSelected_",
  2220. smalltalk.method({
  2221. selector: "onProtocolSelected:",
  2222. fn: function (aString){
  2223. var self=this;
  2224. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2225. $1=_st(_st(self)._model())._selectedClass();
  2226. if(($receiver = $1) == nil || $receiver == undefined){
  2227. $2=_st(self)._contents_("");
  2228. return $2;
  2229. } else {
  2230. $1;
  2231. };
  2232. _st(self)._contents_(_st(_st(_st(self)._model())._selectedClass())._definition());
  2233. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2234. messageSends: ["ifNil:", "contents:", "selectedClass", "model", "definition"]}),
  2235. smalltalk.HLBrowserSourceWidget);
  2236. smalltalk.addMethod(
  2237. "_onSourceCodeFocusRequested",
  2238. smalltalk.method({
  2239. selector: "onSourceCodeFocusRequested",
  2240. fn: function (){
  2241. var self=this;
  2242. return smalltalk.withContext(function($ctx1) { _st(self)._focus();
  2243. return self}, function($ctx1) {$ctx1.fill(self,"onSourceCodeFocusRequested",{}, smalltalk.HLBrowserSourceWidget)})},
  2244. messageSends: ["focus"]}),
  2245. smalltalk.HLBrowserSourceWidget);
  2246. smalltalk.addMethod(
  2247. "_refresh",
  2248. smalltalk.method({
  2249. selector: "refresh",
  2250. fn: function (){
  2251. var self=this;
  2252. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2253. $1=_st(self)._hasModification();
  2254. if(smalltalk.assert($1)){
  2255. $2=self;
  2256. return $2;
  2257. };
  2258. $3=_st(self)._hasFocus();
  2259. if(smalltalk.assert($3)){
  2260. $4=self;
  2261. return $4;
  2262. };
  2263. _st(self)._contents_(_st(_st(_st(self)._model())._selectedMethod())._source());
  2264. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{}, smalltalk.HLBrowserSourceWidget)})},
  2265. messageSends: ["ifTrue:", "hasModification", "hasFocus", "contents:", "source", "selectedMethod", "model"]}),
  2266. smalltalk.HLBrowserSourceWidget);
  2267. smalltalk.addMethod(
  2268. "_renderContentOn_",
  2269. smalltalk.method({
  2270. selector: "renderContentOn:",
  2271. fn: function (html){
  2272. var self=this;
  2273. return smalltalk.withContext(function($ctx1) { _st(_st(self)._codeWidget())._renderOn_(html);
  2274. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLBrowserSourceWidget)})},
  2275. messageSends: ["renderOn:", "codeWidget"]}),
  2276. smalltalk.HLBrowserSourceWidget);
  2277. smalltalk.addMethod(
  2278. "_on_",
  2279. smalltalk.method({
  2280. selector: "on:",
  2281. fn: function (aBrowserModel){
  2282. var self=this;
  2283. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2284. $2=_st(self)._new();
  2285. _st($2)._model_(aBrowserModel);
  2286. $3=_st($2)._yourself();
  2287. $1=$3;
  2288. return $1;
  2289. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget.klass)})},
  2290. messageSends: ["model:", "new", "yourself"]}),
  2291. smalltalk.HLBrowserSourceWidget.klass);
  2292. smalltalk.addClass('HLClassCache', smalltalk.Object, ['class', 'selectorsCache', 'overrideCache', 'overriddenCache'], 'Helios-Browser');
  2293. smalltalk.addMethod(
  2294. "_invalidateChildrenSelector_",
  2295. smalltalk.method({
  2296. selector: "invalidateChildrenSelector:",
  2297. fn: function (aSelector){
  2298. var self=this;
  2299. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2300. _st(_st(_st(self)._theClass())._subclasses())._do_((function(each){
  2301. return smalltalk.withContext(function($ctx2) { $1=_st(_st(self)._selectorsCache())._cacheFor_(each);
  2302. _st($1)._removeSelector_(aSelector);
  2303. $2=_st($1)._invalidateChildrenSelector_(aSelector);
  2304. return $2;
  2305. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2306. return self}, function($ctx1) {$ctx1.fill(self,"invalidateChildrenSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2307. messageSends: ["do:", "removeSelector:", "cacheFor:", "selectorsCache", "invalidateChildrenSelector:", "subclasses", "theClass"]}),
  2308. smalltalk.HLClassCache);
  2309. smalltalk.addMethod(
  2310. "_invalidateParentSelector_",
  2311. smalltalk.method({
  2312. selector: "invalidateParentSelector:",
  2313. fn: function (aSelector){
  2314. var self=this;
  2315. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2316. $1=_st(_st(self)._theClass())._superclass();
  2317. if(($receiver = $1) == nil || $receiver == undefined){
  2318. $1;
  2319. } else {
  2320. $2=_st(_st(self)._selectorsCache())._cacheFor_(_st(_st(self)._theClass())._superclass());
  2321. _st($2)._removeSelector_(aSelector);
  2322. $3=_st($2)._invalidateParentSelector_(aSelector);
  2323. $3;
  2324. };
  2325. return self}, function($ctx1) {$ctx1.fill(self,"invalidateParentSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2326. messageSends: ["ifNotNil:", "removeSelector:", "cacheFor:", "superclass", "theClass", "selectorsCache", "invalidateParentSelector:"]}),
  2327. smalltalk.HLClassCache);
  2328. smalltalk.addMethod(
  2329. "_invalidateSelector_",
  2330. smalltalk.method({
  2331. selector: "invalidateSelector:",
  2332. fn: function (aSelector){
  2333. var self=this;
  2334. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2335. $1=self;
  2336. _st($1)._invalidateParentSelector_(aSelector);
  2337. _st($1)._invalidateChildrenSelector_(aSelector);
  2338. $2=_st($1)._removeSelector_(aSelector);
  2339. return self}, function($ctx1) {$ctx1.fill(self,"invalidateSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2340. messageSends: ["invalidateParentSelector:", "invalidateChildrenSelector:", "removeSelector:"]}),
  2341. smalltalk.HLClassCache);
  2342. smalltalk.addMethod(
  2343. "_isOverridden_",
  2344. smalltalk.method({
  2345. selector: "isOverridden:",
  2346. fn: function (aMethod){
  2347. var self=this;
  2348. return smalltalk.withContext(function($ctx1) { var $1;
  2349. $1=_st(_st(self)._overriddenCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  2350. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverridden();
  2351. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2352. return $1;
  2353. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  2354. messageSends: ["at:ifAbsentPut:", "selector", "isOverridden", "overriddenCache"]}),
  2355. smalltalk.HLClassCache);
  2356. smalltalk.addMethod(
  2357. "_isOverride_",
  2358. smalltalk.method({
  2359. selector: "isOverride:",
  2360. fn: function (aMethod){
  2361. var self=this;
  2362. return smalltalk.withContext(function($ctx1) { var $1;
  2363. $1=_st(_st(self)._overrideCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  2364. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverride();
  2365. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2366. return $1;
  2367. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  2368. messageSends: ["at:ifAbsentPut:", "selector", "isOverride", "overrideCache"]}),
  2369. smalltalk.HLClassCache);
  2370. smalltalk.addMethod(
  2371. "_overriddenCache",
  2372. smalltalk.method({
  2373. selector: "overriddenCache",
  2374. fn: function (){
  2375. var self=this;
  2376. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2377. $2=self["@overriddenCache"];
  2378. if(($receiver = $2) == nil || $receiver == undefined){
  2379. self["@overriddenCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2380. $1=self["@overriddenCache"];
  2381. } else {
  2382. $1=$2;
  2383. };
  2384. return $1;
  2385. }, function($ctx1) {$ctx1.fill(self,"overriddenCache",{}, smalltalk.HLClassCache)})},
  2386. messageSends: ["ifNil:", "new"]}),
  2387. smalltalk.HLClassCache);
  2388. smalltalk.addMethod(
  2389. "_overrideCache",
  2390. smalltalk.method({
  2391. selector: "overrideCache",
  2392. fn: function (){
  2393. var self=this;
  2394. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2395. $2=self["@overrideCache"];
  2396. if(($receiver = $2) == nil || $receiver == undefined){
  2397. self["@overrideCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2398. $1=self["@overrideCache"];
  2399. } else {
  2400. $1=$2;
  2401. };
  2402. return $1;
  2403. }, function($ctx1) {$ctx1.fill(self,"overrideCache",{}, smalltalk.HLClassCache)})},
  2404. messageSends: ["ifNil:", "new"]}),
  2405. smalltalk.HLClassCache);
  2406. smalltalk.addMethod(
  2407. "_removeSelector_",
  2408. smalltalk.method({
  2409. selector: "removeSelector:",
  2410. fn: function (aSelector){
  2411. var self=this;
  2412. return smalltalk.withContext(function($ctx1) { _st(_st(self)._overriddenCache())._removeKey_ifAbsent_(aSelector,(function(){
  2413. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2414. _st(_st(self)._overrideCache())._removeKey_ifAbsent_(aSelector,(function(){
  2415. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2416. return self}, function($ctx1) {$ctx1.fill(self,"removeSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2417. messageSends: ["removeKey:ifAbsent:", "overriddenCache", "overrideCache"]}),
  2418. smalltalk.HLClassCache);
  2419. smalltalk.addMethod(
  2420. "_selectorsCache",
  2421. smalltalk.method({
  2422. selector: "selectorsCache",
  2423. fn: function (){
  2424. var self=this;
  2425. return smalltalk.withContext(function($ctx1) { var $1;
  2426. $1=self["@selectorsCache"];
  2427. return $1;
  2428. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLClassCache)})},
  2429. messageSends: []}),
  2430. smalltalk.HLClassCache);
  2431. smalltalk.addMethod(
  2432. "_selectorsCache_",
  2433. smalltalk.method({
  2434. selector: "selectorsCache:",
  2435. fn: function (aCache){
  2436. var self=this;
  2437. return smalltalk.withContext(function($ctx1) { self["@selectorsCache"]=aCache;
  2438. return self}, function($ctx1) {$ctx1.fill(self,"selectorsCache:",{aCache:aCache}, smalltalk.HLClassCache)})},
  2439. messageSends: []}),
  2440. smalltalk.HLClassCache);
  2441. smalltalk.addMethod(
  2442. "_theClass",
  2443. smalltalk.method({
  2444. selector: "theClass",
  2445. fn: function (){
  2446. var self=this;
  2447. return smalltalk.withContext(function($ctx1) { var $1;
  2448. $1=self["@class"];
  2449. return $1;
  2450. }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.HLClassCache)})},
  2451. messageSends: []}),
  2452. smalltalk.HLClassCache);
  2453. smalltalk.addMethod(
  2454. "_theClass_",
  2455. smalltalk.method({
  2456. selector: "theClass:",
  2457. fn: function (aClass){
  2458. var self=this;
  2459. return smalltalk.withContext(function($ctx1) { self["@class"]=aClass;
  2460. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.HLClassCache)})},
  2461. messageSends: []}),
  2462. smalltalk.HLClassCache);
  2463. smalltalk.addMethod(
  2464. "_on_selectorsCache_",
  2465. smalltalk.method({
  2466. selector: "on:selectorsCache:",
  2467. fn: function (aClass,aSelectorsCache){
  2468. var self=this;
  2469. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2470. $2=_st(self)._new();
  2471. _st($2)._theClass_(aClass);
  2472. _st($2)._selectorsCache_(aSelectorsCache);
  2473. $3=_st($2)._yourself();
  2474. $1=$3;
  2475. return $1;
  2476. }, function($ctx1) {$ctx1.fill(self,"on:selectorsCache:",{aClass:aClass,aSelectorsCache:aSelectorsCache}, smalltalk.HLClassCache.klass)})},
  2477. messageSends: ["theClass:", "new", "selectorsCache:", "yourself"]}),
  2478. smalltalk.HLClassCache.klass);
  2479. smalltalk.addClass('HLSelectorsCache', smalltalk.Object, ['classesCache'], 'Helios-Browser');
  2480. smalltalk.addMethod(
  2481. "_cacheFor_",
  2482. smalltalk.method({
  2483. selector: "cacheFor:",
  2484. fn: function (aClass){
  2485. var self=this;
  2486. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2487. $1=aClass;
  2488. if(($receiver = $1) == nil || $receiver == undefined){
  2489. return nil;
  2490. } else {
  2491. $1;
  2492. };
  2493. $2=_st(_st(self)._classesCache())._at_ifAbsentPut_(_st(aClass)._name(),(function(){
  2494. return smalltalk.withContext(function($ctx2) { return _st(self)._newCacheFor_(aClass);
  2495. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2496. return $2;
  2497. }, function($ctx1) {$ctx1.fill(self,"cacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2498. messageSends: ["ifNil:", "at:ifAbsentPut:", "name", "newCacheFor:", "classesCache"]}),
  2499. smalltalk.HLSelectorsCache);
  2500. smalltalk.addMethod(
  2501. "_classesCache",
  2502. smalltalk.method({
  2503. selector: "classesCache",
  2504. fn: function (){
  2505. var self=this;
  2506. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2507. $2=self["@classesCache"];
  2508. if(($receiver = $2) == nil || $receiver == undefined){
  2509. self["@classesCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2510. $1=self["@classesCache"];
  2511. } else {
  2512. $1=$2;
  2513. };
  2514. return $1;
  2515. }, function($ctx1) {$ctx1.fill(self,"classesCache",{}, smalltalk.HLSelectorsCache)})},
  2516. messageSends: ["ifNil:", "new"]}),
  2517. smalltalk.HLSelectorsCache);
  2518. smalltalk.addMethod(
  2519. "_initialize",
  2520. smalltalk.method({
  2521. selector: "initialize",
  2522. fn: function (){
  2523. var self=this;
  2524. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  2525. _st(self)._observeSystem();
  2526. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLSelectorsCache)})},
  2527. messageSends: ["initialize", "observeSystem"]}),
  2528. smalltalk.HLSelectorsCache);
  2529. smalltalk.addMethod(
  2530. "_invalidateCacheFor_",
  2531. smalltalk.method({
  2532. selector: "invalidateCacheFor:",
  2533. fn: function (aMethod){
  2534. var self=this;
  2535. return smalltalk.withContext(function($ctx1) { _st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._invalidateSelector_(_st(aMethod)._selector());
  2536. return self}, function($ctx1) {$ctx1.fill(self,"invalidateCacheFor:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2537. messageSends: ["invalidateSelector:", "selector", "cacheFor:", "methodClass"]}),
  2538. smalltalk.HLSelectorsCache);
  2539. smalltalk.addMethod(
  2540. "_isOverridden_",
  2541. smalltalk.method({
  2542. selector: "isOverridden:",
  2543. fn: function (aMethod){
  2544. var self=this;
  2545. return smalltalk.withContext(function($ctx1) { var $1;
  2546. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverridden_(aMethod);
  2547. return $1;
  2548. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2549. messageSends: ["isOverridden:", "cacheFor:", "methodClass"]}),
  2550. smalltalk.HLSelectorsCache);
  2551. smalltalk.addMethod(
  2552. "_isOverride_",
  2553. smalltalk.method({
  2554. selector: "isOverride:",
  2555. fn: function (aMethod){
  2556. var self=this;
  2557. return smalltalk.withContext(function($ctx1) { var $1;
  2558. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverride_(aMethod);
  2559. return $1;
  2560. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2561. messageSends: ["isOverride:", "cacheFor:", "methodClass"]}),
  2562. smalltalk.HLSelectorsCache);
  2563. smalltalk.addMethod(
  2564. "_newCacheFor_",
  2565. smalltalk.method({
  2566. selector: "newCacheFor:",
  2567. fn: function (aClass){
  2568. var self=this;
  2569. return smalltalk.withContext(function($ctx1) { var $1;
  2570. $1=_st((smalltalk.HLClassCache || HLClassCache))._on_selectorsCache_(aClass,self);
  2571. return $1;
  2572. }, function($ctx1) {$ctx1.fill(self,"newCacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2573. messageSends: ["on:selectorsCache:"]}),
  2574. smalltalk.HLSelectorsCache);
  2575. smalltalk.addMethod(
  2576. "_observeSystem",
  2577. smalltalk.method({
  2578. selector: "observeSystem",
  2579. fn: function (){
  2580. var self=this;
  2581. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2582. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  2583. _st($1)._on_do_((smalltalk.MethodAdded || MethodAdded),(function(ann){
  2584. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodAdded_(_st(ann)._method());
  2585. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2586. $2=_st($1)._on_do_((smalltalk.MethodRemoved || MethodRemoved),(function(ann){
  2587. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodRemoved_(_st(ann)._method());
  2588. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2589. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLSelectorsCache)})},
  2590. messageSends: ["on:do:", "onMethodAdded:", "method", "current", "onMethodRemoved:"]}),
  2591. smalltalk.HLSelectorsCache);
  2592. smalltalk.addMethod(
  2593. "_onMethodAdded_",
  2594. smalltalk.method({
  2595. selector: "onMethodAdded:",
  2596. fn: function (aMethod){
  2597. var self=this;
  2598. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2599. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2600. messageSends: ["invalidateCacheFor:"]}),
  2601. smalltalk.HLSelectorsCache);
  2602. smalltalk.addMethod(
  2603. "_onMethodRemoved_",
  2604. smalltalk.method({
  2605. selector: "onMethodRemoved:",
  2606. fn: function (aMethod){
  2607. var self=this;
  2608. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2609. return self}, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2610. messageSends: ["invalidateCacheFor:"]}),
  2611. smalltalk.HLSelectorsCache);
  2612. smalltalk.HLSelectorsCache.klass.iVarNames = ['current'];
  2613. smalltalk.addMethod(
  2614. "_current",
  2615. smalltalk.method({
  2616. selector: "current",
  2617. fn: function (){
  2618. var self=this;
  2619. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2620. $2=self["@current"];
  2621. if(($receiver = $2) == nil || $receiver == undefined){
  2622. self["@current"]=smalltalk.Object.klass.fn.prototype._new.apply(_st(self), []);
  2623. $1=self["@current"];
  2624. } else {
  2625. $1=$2;
  2626. };
  2627. return $1;
  2628. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.HLSelectorsCache.klass)})},
  2629. messageSends: ["ifNil:", "new"]}),
  2630. smalltalk.HLSelectorsCache.klass);
  2631. smalltalk.addMethod(
  2632. "_flush",
  2633. smalltalk.method({
  2634. selector: "flush",
  2635. fn: function (){
  2636. var self=this;
  2637. return smalltalk.withContext(function($ctx1) { self["@current"]=nil;
  2638. return self}, function($ctx1) {$ctx1.fill(self,"flush",{}, smalltalk.HLSelectorsCache.klass)})},
  2639. messageSends: []}),
  2640. smalltalk.HLSelectorsCache.klass);
  2641. smalltalk.addMethod(
  2642. "_new",
  2643. smalltalk.method({
  2644. selector: "new",
  2645. fn: function (){
  2646. var self=this;
  2647. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  2648. return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.HLSelectorsCache.klass)})},
  2649. messageSends: ["shouldNotImplement"]}),
  2650. smalltalk.HLSelectorsCache.klass);
  2651. smalltalk.addMethod(
  2652. "_isOverridden",
  2653. smalltalk.method({
  2654. selector: "isOverridden",
  2655. fn: function (){
  2656. var self=this;
  2657. var selector;
  2658. return smalltalk.withContext(function($ctx1) { var $1;
  2659. var $early={};
  2660. try {
  2661. selector=_st(self)._selector();
  2662. _st(_st(self)._methodClass())._allSubclassesDo_((function(each){
  2663. return smalltalk.withContext(function($ctx2) { $1=_st(each)._includesSelector_(selector);
  2664. if(smalltalk.assert($1)){
  2665. throw $early=[true];
  2666. };
  2667. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2668. return false;
  2669. }
  2670. catch(e) {if(e===$early)return e[0]; throw e}
  2671. }, function($ctx1) {$ctx1.fill(self,"isOverridden",{selector:selector}, smalltalk.CompiledMethod)})},
  2672. messageSends: ["selector", "allSubclassesDo:", "ifTrue:", "includesSelector:", "methodClass"]}),
  2673. smalltalk.CompiledMethod);
  2674. smalltalk.addMethod(
  2675. "_isOverride",
  2676. smalltalk.method({
  2677. selector: "isOverride",
  2678. fn: function (){
  2679. var self=this;
  2680. var superclass;
  2681. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2682. superclass=_st(_st(self)._methodClass())._superclass();
  2683. $1=superclass;
  2684. if(($receiver = $1) == nil || $receiver == undefined){
  2685. return false;
  2686. } else {
  2687. $1;
  2688. };
  2689. $2=_st(_st(_st(_st(self)._methodClass())._superclass())._lookupSelector_(_st(self)._selector()))._notNil();
  2690. return $2;
  2691. }, function($ctx1) {$ctx1.fill(self,"isOverride",{superclass:superclass}, smalltalk.CompiledMethod)})},
  2692. messageSends: ["superclass", "methodClass", "ifNil:", "notNil", "lookupSelector:", "selector"]}),
  2693. smalltalk.CompiledMethod);