Helios-Browser.deploy.js 107 KB

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