Helios-Browser.deploy.js 107 KB

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