Helios-Browser.deploy.js 123 KB

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