Helios-Browser.js 164 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384
  1. define("helios/Helios-Browser", ["amber/boot", "helios/Helios-Core", "amber_core/Kernel-Objects"], function($boot){
  2. var smalltalk=$boot.vm,nil=$boot.nil,_st=$boot.asReceiver,globals=$boot.globals;
  3. smalltalk.addPackage('Helios-Browser');
  4. smalltalk.packages["Helios-Browser"].transport = {"type":"amd","amdNamespace":"helios"};
  5. smalltalk.addClass('HLBrowser', globals.HLWidget, ['model', 'packagesListWidget', 'classesListWidget', 'protocolsListWidget', 'methodsListWidget', 'sourceWidget', 'bottomDiv'], 'Helios-Browser');
  6. globals.HLBrowser.comment="I render a system browser with 4 panes (Packages, Classes, Protocols, Methods) and a source area.";
  7. smalltalk.addMethod(
  8. smalltalk.method({
  9. selector: "canHaveFocus",
  10. protocol: 'testing',
  11. fn: function (){
  12. var self=this;
  13. return true;
  14. },
  15. args: [],
  16. source: "canHaveFocus\x0a\x09^ true",
  17. messageSends: [],
  18. referencedClasses: []
  19. }),
  20. globals.HLBrowser);
  21. smalltalk.addMethod(
  22. smalltalk.method({
  23. selector: "classesListWidget",
  24. protocol: 'widgets',
  25. fn: function (){
  26. var self=this;
  27. function $HLClassesListWidget(){return globals.HLClassesListWidget||(typeof HLClassesListWidget=="undefined"?nil:HLClassesListWidget)}
  28. return smalltalk.withContext(function($ctx1) {
  29. var $2,$1,$receiver;
  30. $2=self["@classesListWidget"];
  31. if(($receiver = $2) == null || $receiver.isNil){
  32. self["@classesListWidget"]=_st($HLClassesListWidget())._on_(self._model());
  33. self["@classesListWidget"];
  34. $1=_st(self["@classesListWidget"])._next_(self._protocolsListWidget());
  35. } else {
  36. $1=$2;
  37. };
  38. return $1;
  39. }, function($ctx1) {$ctx1.fill(self,"classesListWidget",{},globals.HLBrowser)})},
  40. args: [],
  41. source: "classesListWidget\x0a\x09^ classesListWidget ifNil: [\x0a \x09classesListWidget := HLClassesListWidget on: self model.\x0a\x09\x09classesListWidget next: self protocolsListWidget ]",
  42. messageSends: ["ifNil:", "on:", "model", "next:", "protocolsListWidget"],
  43. referencedClasses: ["HLClassesListWidget"]
  44. }),
  45. globals.HLBrowser);
  46. smalltalk.addMethod(
  47. smalltalk.method({
  48. selector: "environment",
  49. protocol: 'accessing',
  50. fn: function (){
  51. var self=this;
  52. return smalltalk.withContext(function($ctx1) {
  53. var $1;
  54. $1=_st(self._model())._environment();
  55. return $1;
  56. }, function($ctx1) {$ctx1.fill(self,"environment",{},globals.HLBrowser)})},
  57. args: [],
  58. source: "environment\x0a\x09^ self model environment",
  59. messageSends: ["environment", "model"],
  60. referencedClasses: []
  61. }),
  62. globals.HLBrowser);
  63. smalltalk.addMethod(
  64. smalltalk.method({
  65. selector: "focus",
  66. protocol: 'actions',
  67. fn: function (){
  68. var self=this;
  69. return smalltalk.withContext(function($ctx1) {
  70. var $1;
  71. $1=_st(self._packagesListWidget())._focus();
  72. return $1;
  73. }, function($ctx1) {$ctx1.fill(self,"focus",{},globals.HLBrowser)})},
  74. args: [],
  75. source: "focus\x0a\x09^ self packagesListWidget focus",
  76. messageSends: ["focus", "packagesListWidget"],
  77. referencedClasses: []
  78. }),
  79. globals.HLBrowser);
  80. smalltalk.addMethod(
  81. smalltalk.method({
  82. selector: "methodsListWidget",
  83. protocol: 'widgets',
  84. fn: function (){
  85. var self=this;
  86. function $HLMethodsListWidget(){return globals.HLMethodsListWidget||(typeof HLMethodsListWidget=="undefined"?nil:HLMethodsListWidget)}
  87. return smalltalk.withContext(function($ctx1) {
  88. var $2,$1,$receiver;
  89. $2=self["@methodsListWidget"];
  90. if(($receiver = $2) == null || $receiver.isNil){
  91. self["@methodsListWidget"]=_st($HLMethodsListWidget())._on_(self._model());
  92. self["@methodsListWidget"];
  93. $1=_st(self["@methodsListWidget"])._next_(self._sourceWidget());
  94. } else {
  95. $1=$2;
  96. };
  97. return $1;
  98. }, function($ctx1) {$ctx1.fill(self,"methodsListWidget",{},globals.HLBrowser)})},
  99. args: [],
  100. source: "methodsListWidget\x0a\x09^ methodsListWidget ifNil: [\x0a \x09methodsListWidget := HLMethodsListWidget on: self model.\x0a\x09\x09methodsListWidget next: self sourceWidget ]",
  101. messageSends: ["ifNil:", "on:", "model", "next:", "sourceWidget"],
  102. referencedClasses: ["HLMethodsListWidget"]
  103. }),
  104. globals.HLBrowser);
  105. smalltalk.addMethod(
  106. smalltalk.method({
  107. selector: "model",
  108. protocol: 'accessing',
  109. fn: function (){
  110. var self=this;
  111. function $HLBrowserModel(){return globals.HLBrowserModel||(typeof HLBrowserModel=="undefined"?nil:HLBrowserModel)}
  112. return smalltalk.withContext(function($ctx1) {
  113. var $2,$1,$receiver;
  114. $2=self["@model"];
  115. if(($receiver = $2) == null || $receiver.isNil){
  116. self._model_(_st($HLBrowserModel())._new());
  117. $1=self["@model"];
  118. } else {
  119. $1=$2;
  120. };
  121. return $1;
  122. }, function($ctx1) {$ctx1.fill(self,"model",{},globals.HLBrowser)})},
  123. args: [],
  124. source: "model\x0a\x09^ model ifNil: [ self model: HLBrowserModel new. model ]",
  125. messageSends: ["ifNil:", "model:", "new"],
  126. referencedClasses: ["HLBrowserModel"]
  127. }),
  128. globals.HLBrowser);
  129. smalltalk.addMethod(
  130. smalltalk.method({
  131. selector: "model:",
  132. protocol: 'accessing',
  133. fn: function (aModel){
  134. var self=this;
  135. return smalltalk.withContext(function($ctx1) {
  136. self["@model"]=aModel;
  137. self._observeModel();
  138. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},globals.HLBrowser)})},
  139. args: ["aModel"],
  140. source: "model: aModel\x0a\x09model := aModel.\x0a\x09self observeModel",
  141. messageSends: ["observeModel"],
  142. referencedClasses: []
  143. }),
  144. globals.HLBrowser);
  145. smalltalk.addMethod(
  146. smalltalk.method({
  147. selector: "observeModel",
  148. protocol: 'actions',
  149. fn: function (){
  150. var self=this;
  151. function $HLPackageSelected(){return globals.HLPackageSelected||(typeof HLPackageSelected=="undefined"?nil:HLPackageSelected)}
  152. function $HLClassSelected(){return globals.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  153. return smalltalk.withContext(function($ctx1) {
  154. var $2,$1;
  155. $2=self._model();
  156. $ctx1.sendIdx["model"]=1;
  157. $1=_st($2)._announcer();
  158. $ctx1.sendIdx["announcer"]=1;
  159. _st($1)._on_send_to_($HLPackageSelected(),"onPackageSelected:",self);
  160. $ctx1.sendIdx["on:send:to:"]=1;
  161. _st(_st(self._model())._announcer())._on_send_to_($HLClassSelected(),"onClassSelected:",self);
  162. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},globals.HLBrowser)})},
  163. args: [],
  164. source: "observeModel\x0a\x09self model announcer\x0a\x09\x09on: HLPackageSelected\x0a\x09\x09send: #onPackageSelected:\x0a\x09\x09to: self.\x0a\x09\x09\x0a\x09self model announcer\x0a\x09\x09on: HLClassSelected\x0a\x09\x09send: #onClassSelected:\x0a\x09\x09to: self",
  165. messageSends: ["on:send:to:", "announcer", "model"],
  166. referencedClasses: ["HLPackageSelected", "HLClassSelected"]
  167. }),
  168. globals.HLBrowser);
  169. smalltalk.addMethod(
  170. smalltalk.method({
  171. selector: "onClassSelected:",
  172. protocol: 'reactions',
  173. fn: function (anAnnouncement){
  174. var self=this;
  175. return smalltalk.withContext(function($ctx1) {
  176. var $1,$3,$2,$receiver;
  177. $1=_st(anAnnouncement)._item();
  178. if(($receiver = $1) == null || $receiver.isNil){
  179. $3=_st(self._model())._selectedPackage();
  180. if(($receiver = $3) == null || $receiver.isNil){
  181. $2=self._defaultTabLabel();
  182. } else {
  183. var package_;
  184. package_=$receiver;
  185. $2=_st(package_)._name();
  186. $ctx1.sendIdx["name"]=1;
  187. };
  188. self._setTabLabel_($2);
  189. $ctx1.sendIdx["setTabLabel:"]=1;
  190. } else {
  191. var item;
  192. item=$receiver;
  193. self._setTabLabel_(_st(item)._name());
  194. };
  195. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncement:anAnnouncement},globals.HLBrowser)})},
  196. args: ["anAnnouncement"],
  197. source: "onClassSelected: anAnnouncement\x0a\x09anAnnouncement item \x0a\x09\x09ifNil: [ self setTabLabel: (self model selectedPackage \x0a\x09\x09\x09ifNil: [ self defaultTabLabel ]\x0a\x09\x09\x09ifNotNil: [ :package | package name ]) ] \x0a\x09\x09ifNotNil: [ :item | self setTabLabel: item name ]",
  198. messageSends: ["ifNil:ifNotNil:", "item", "setTabLabel:", "selectedPackage", "model", "defaultTabLabel", "name"],
  199. referencedClasses: []
  200. }),
  201. globals.HLBrowser);
  202. smalltalk.addMethod(
  203. smalltalk.method({
  204. selector: "onPackageSelected:",
  205. protocol: 'reactions',
  206. fn: function (anAnnouncement){
  207. var self=this;
  208. return smalltalk.withContext(function($ctx1) {
  209. var $1,$receiver;
  210. $1=_st(anAnnouncement)._item();
  211. if(($receiver = $1) == null || $receiver.isNil){
  212. $1;
  213. } else {
  214. var item;
  215. item=$receiver;
  216. self._setTabLabel_(_st(item)._name());
  217. };
  218. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{anAnnouncement:anAnnouncement},globals.HLBrowser)})},
  219. args: ["anAnnouncement"],
  220. source: "onPackageSelected: anAnnouncement\x0a\x09anAnnouncement item ifNotNil: [ :item |\x0a\x09self setTabLabel: item name ]",
  221. messageSends: ["ifNotNil:", "item", "setTabLabel:", "name"],
  222. referencedClasses: []
  223. }),
  224. globals.HLBrowser);
  225. smalltalk.addMethod(
  226. smalltalk.method({
  227. selector: "openClassNamed:",
  228. protocol: 'actions',
  229. fn: function (aString){
  230. var self=this;
  231. return smalltalk.withContext(function($ctx1) {
  232. _st(self._model())._openClassNamed_(aString);
  233. return self}, function($ctx1) {$ctx1.fill(self,"openClassNamed:",{aString:aString},globals.HLBrowser)})},
  234. args: ["aString"],
  235. source: "openClassNamed: aString\x0a\x09self model openClassNamed: aString",
  236. messageSends: ["openClassNamed:", "model"],
  237. referencedClasses: []
  238. }),
  239. globals.HLBrowser);
  240. smalltalk.addMethod(
  241. smalltalk.method({
  242. selector: "openMethod:",
  243. protocol: 'actions',
  244. fn: function (aCompiledMethod){
  245. var self=this;
  246. return smalltalk.withContext(function($ctx1) {
  247. var $1,$2,$4,$3,$5;
  248. $1=self._model();
  249. _st($1)._focusOnSourceCode();
  250. $ctx1.sendIdx["focusOnSourceCode"]=1;
  251. $2=$1;
  252. $4=_st(aCompiledMethod)._methodClass();
  253. $ctx1.sendIdx["methodClass"]=1;
  254. $3=_st($4)._package();
  255. _st($2)._selectedPackage_($3);
  256. _st($1)._selectedClass_(_st(aCompiledMethod)._methodClass());
  257. _st($1)._selectedProtocol_(_st(aCompiledMethod)._protocol());
  258. _st($1)._selectedMethod_(aCompiledMethod);
  259. $5=_st($1)._focusOnSourceCode();
  260. return self}, function($ctx1) {$ctx1.fill(self,"openMethod:",{aCompiledMethod:aCompiledMethod},globals.HLBrowser)})},
  261. args: ["aCompiledMethod"],
  262. source: "openMethod: aCompiledMethod\x0a\x09self model\x0a\x09\x09\x22Workaround for the package selection announcement when the package list is focused\x22\x09\x0a\x09\x09focusOnSourceCode;\x0a\x09\x09selectedPackage: aCompiledMethod methodClass package;\x0a\x09\x09selectedClass: aCompiledMethod methodClass;\x0a\x09\x09selectedProtocol: aCompiledMethod protocol;\x0a\x09\x09selectedMethod: aCompiledMethod;\x0a\x09\x09focusOnSourceCode",
  263. messageSends: ["focusOnSourceCode", "model", "selectedPackage:", "package", "methodClass", "selectedClass:", "selectedProtocol:", "protocol", "selectedMethod:"],
  264. referencedClasses: []
  265. }),
  266. globals.HLBrowser);
  267. smalltalk.addMethod(
  268. smalltalk.method({
  269. selector: "packagesListWidget",
  270. protocol: 'widgets',
  271. fn: function (){
  272. var self=this;
  273. function $HLPackagesListWidget(){return globals.HLPackagesListWidget||(typeof HLPackagesListWidget=="undefined"?nil:HLPackagesListWidget)}
  274. return smalltalk.withContext(function($ctx1) {
  275. var $2,$1,$receiver;
  276. $2=self["@packagesListWidget"];
  277. if(($receiver = $2) == null || $receiver.isNil){
  278. self["@packagesListWidget"]=_st($HLPackagesListWidget())._on_(self._model());
  279. self["@packagesListWidget"];
  280. $1=_st(self["@packagesListWidget"])._next_(self._classesListWidget());
  281. } else {
  282. $1=$2;
  283. };
  284. return $1;
  285. }, function($ctx1) {$ctx1.fill(self,"packagesListWidget",{},globals.HLBrowser)})},
  286. args: [],
  287. source: "packagesListWidget\x0a\x09^ packagesListWidget ifNil: [\x0a \x09packagesListWidget := HLPackagesListWidget on: self model.\x0a\x09\x09packagesListWidget next: self classesListWidget ]",
  288. messageSends: ["ifNil:", "on:", "model", "next:", "classesListWidget"],
  289. referencedClasses: ["HLPackagesListWidget"]
  290. }),
  291. globals.HLBrowser);
  292. smalltalk.addMethod(
  293. smalltalk.method({
  294. selector: "protocolsListWidget",
  295. protocol: 'widgets',
  296. fn: function (){
  297. var self=this;
  298. function $HLProtocolsListWidget(){return globals.HLProtocolsListWidget||(typeof HLProtocolsListWidget=="undefined"?nil:HLProtocolsListWidget)}
  299. return smalltalk.withContext(function($ctx1) {
  300. var $2,$1,$receiver;
  301. $2=self["@protocolsListWidget"];
  302. if(($receiver = $2) == null || $receiver.isNil){
  303. self["@protocolsListWidget"]=_st($HLProtocolsListWidget())._on_(self._model());
  304. self["@protocolsListWidget"];
  305. $1=_st(self["@protocolsListWidget"])._next_(self._methodsListWidget());
  306. } else {
  307. $1=$2;
  308. };
  309. return $1;
  310. }, function($ctx1) {$ctx1.fill(self,"protocolsListWidget",{},globals.HLBrowser)})},
  311. args: [],
  312. source: "protocolsListWidget\x0a\x09^ protocolsListWidget ifNil: [\x0a \x09protocolsListWidget := HLProtocolsListWidget on: self model.\x0a\x09\x09protocolsListWidget next: self methodsListWidget ]",
  313. messageSends: ["ifNil:", "on:", "model", "next:", "methodsListWidget"],
  314. referencedClasses: ["HLProtocolsListWidget"]
  315. }),
  316. globals.HLBrowser);
  317. smalltalk.addMethod(
  318. smalltalk.method({
  319. selector: "registerBindingsOn:",
  320. protocol: 'keybindings',
  321. fn: function (aBindingGroup){
  322. var self=this;
  323. function $HLToolCommand(){return globals.HLToolCommand||(typeof HLToolCommand=="undefined"?nil:HLToolCommand)}
  324. return smalltalk.withContext(function($ctx1) {
  325. _st($HLToolCommand())._registerConcreteClassesOn_for_(aBindingGroup,self._model());
  326. return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup},globals.HLBrowser)})},
  327. args: ["aBindingGroup"],
  328. source: "registerBindingsOn: aBindingGroup\x0a\x09HLToolCommand \x0a\x09\x09registerConcreteClassesOn: aBindingGroup \x0a\x09\x09for: self model",
  329. messageSends: ["registerConcreteClassesOn:for:", "model"],
  330. referencedClasses: ["HLToolCommand"]
  331. }),
  332. globals.HLBrowser);
  333. smalltalk.addMethod(
  334. smalltalk.method({
  335. selector: "renderContentOn:",
  336. protocol: 'rendering',
  337. fn: function (html){
  338. var self=this;
  339. function $HLContainer(){return globals.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  340. function $HLHorizontalSplitter(){return globals.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  341. function $HLVerticalSplitter(){return globals.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  342. return smalltalk.withContext(function($ctx1) {
  343. var $5,$4,$3,$2,$1;
  344. $5=self._packagesListWidget();
  345. $ctx1.sendIdx["packagesListWidget"]=1;
  346. $4=_st($HLVerticalSplitter())._with_with_($5,self._classesListWidget());
  347. $ctx1.sendIdx["with:with:"]=3;
  348. $3=_st($HLVerticalSplitter())._with_with_($4,_st($HLVerticalSplitter())._with_with_(self._protocolsListWidget(),self._methodsListWidget()));
  349. $ctx1.sendIdx["with:with:"]=2;
  350. $2=_st($HLHorizontalSplitter())._with_with_($3,self._sourceWidget());
  351. $ctx1.sendIdx["with:with:"]=1;
  352. $1=_st($HLContainer())._with_($2);
  353. _st(html)._with_($1);
  354. $ctx1.sendIdx["with:"]=1;
  355. _st(self._packagesListWidget())._focus();
  356. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},globals.HLBrowser)})},
  357. args: ["html"],
  358. source: "renderContentOn: html\x0a\x09html with: (HLContainer with: (HLHorizontalSplitter \x0a \x09with: (HLVerticalSplitter\x0a \x09with: (HLVerticalSplitter\x0a \x09with: self packagesListWidget\x0a with: self classesListWidget)\x0a with: (HLVerticalSplitter\x0a \x09with: self protocolsListWidget\x0a with: self methodsListWidget)) \x0a with: self sourceWidget)).\x0a\x09\x0a\x09self packagesListWidget focus",
  359. messageSends: ["with:", "with:with:", "packagesListWidget", "classesListWidget", "protocolsListWidget", "methodsListWidget", "sourceWidget", "focus"],
  360. referencedClasses: ["HLContainer", "HLHorizontalSplitter", "HLVerticalSplitter"]
  361. }),
  362. globals.HLBrowser);
  363. smalltalk.addMethod(
  364. smalltalk.method({
  365. selector: "sourceWidget",
  366. protocol: 'widgets',
  367. fn: function (){
  368. var self=this;
  369. function $HLBrowserBottomWidget(){return globals.HLBrowserBottomWidget||(typeof HLBrowserBottomWidget=="undefined"?nil:HLBrowserBottomWidget)}
  370. return smalltalk.withContext(function($ctx1) {
  371. var $2,$3,$4,$1,$receiver;
  372. $2=self["@sourceWidget"];
  373. if(($receiver = $2) == null || $receiver.isNil){
  374. $3=_st($HLBrowserBottomWidget())._new();
  375. _st($3)._model_(self._model());
  376. $4=_st($3)._yourself();
  377. self["@sourceWidget"]=$4;
  378. $1=self["@sourceWidget"];
  379. } else {
  380. $1=$2;
  381. };
  382. return $1;
  383. }, function($ctx1) {$ctx1.fill(self,"sourceWidget",{},globals.HLBrowser)})},
  384. args: [],
  385. source: "sourceWidget\x0a\x09^ sourceWidget ifNil: [\x0a \x09sourceWidget := HLBrowserBottomWidget new\x0a\x09\x09\x09model: self model;\x0a\x09\x09\x09yourself ]",
  386. messageSends: ["ifNil:", "model:", "new", "model", "yourself"],
  387. referencedClasses: ["HLBrowserBottomWidget"]
  388. }),
  389. globals.HLBrowser);
  390. smalltalk.addMethod(
  391. smalltalk.method({
  392. selector: "unregister",
  393. protocol: 'actions',
  394. fn: function (){
  395. var self=this;
  396. return smalltalk.withContext(function($ctx1) {
  397. ($ctx1.supercall = true, globals.HLBrowser.superclass.fn.prototype._unregister.apply(_st(self), []));
  398. $ctx1.supercall = false;
  399. $ctx1.sendIdx["unregister"]=1;
  400. _st([self._packagesListWidget(),self._classesListWidget(),self._protocolsListWidget(),self._methodsListWidget(),self._sourceWidget()])._do_((function(each){
  401. return smalltalk.withContext(function($ctx2) {
  402. return _st(each)._unregister();
  403. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  404. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},globals.HLBrowser)})},
  405. args: [],
  406. source: "unregister\x0a\x09super unregister.\x0a\x0a\x09{ \x0a\x09\x09self packagesListWidget.\x0a\x09\x09self classesListWidget.\x0a\x09\x09self protocolsListWidget.\x0a\x09\x09self methodsListWidget.\x0a\x09\x09self sourceWidget\x0a\x09} \x0a\x09\x09do: [ :each | each unregister ]",
  407. messageSends: ["unregister", "do:", "packagesListWidget", "classesListWidget", "protocolsListWidget", "methodsListWidget", "sourceWidget"],
  408. referencedClasses: []
  409. }),
  410. globals.HLBrowser);
  411. globals.HLBrowser.klass.iVarNames = ['nextId'];
  412. smalltalk.addMethod(
  413. smalltalk.method({
  414. selector: "canBeOpenAsTab",
  415. protocol: 'testing',
  416. fn: function (){
  417. var self=this;
  418. return true;
  419. },
  420. args: [],
  421. source: "canBeOpenAsTab\x0a\x09^ true",
  422. messageSends: [],
  423. referencedClasses: []
  424. }),
  425. globals.HLBrowser.klass);
  426. smalltalk.addMethod(
  427. smalltalk.method({
  428. selector: "nextId",
  429. protocol: 'accessing',
  430. fn: function (){
  431. var self=this;
  432. return smalltalk.withContext(function($ctx1) {
  433. var $1,$2,$receiver;
  434. $1=self["@nextId"];
  435. if(($receiver = $1) == null || $receiver.isNil){
  436. self["@nextId"]=(0);
  437. self["@nextId"];
  438. } else {
  439. $1;
  440. };
  441. $2="browser_".__comma(_st(_st(self["@nextId"]).__plus((1)))._asString());
  442. return $2;
  443. }, function($ctx1) {$ctx1.fill(self,"nextId",{},globals.HLBrowser.klass)})},
  444. args: [],
  445. source: "nextId\x0a\x09nextId ifNil: [ nextId := 0 ].\x0a ^ 'browser_', (nextId + 1) asString",
  446. messageSends: ["ifNil:", ",", "asString", "+"],
  447. referencedClasses: []
  448. }),
  449. globals.HLBrowser.klass);
  450. smalltalk.addMethod(
  451. smalltalk.method({
  452. selector: "tabClass",
  453. protocol: 'accessing',
  454. fn: function (){
  455. var self=this;
  456. return "browser";
  457. },
  458. args: [],
  459. source: "tabClass\x0a\x09^ 'browser'",
  460. messageSends: [],
  461. referencedClasses: []
  462. }),
  463. globals.HLBrowser.klass);
  464. smalltalk.addMethod(
  465. smalltalk.method({
  466. selector: "tabLabel",
  467. protocol: 'accessing',
  468. fn: function (){
  469. var self=this;
  470. return "Browser";
  471. },
  472. args: [],
  473. source: "tabLabel\x0a\x09^ 'Browser'",
  474. messageSends: [],
  475. referencedClasses: []
  476. }),
  477. globals.HLBrowser.klass);
  478. smalltalk.addMethod(
  479. smalltalk.method({
  480. selector: "tabPriority",
  481. protocol: 'accessing',
  482. fn: function (){
  483. var self=this;
  484. return (0);
  485. },
  486. args: [],
  487. source: "tabPriority\x0a\x09^ 0",
  488. messageSends: [],
  489. referencedClasses: []
  490. }),
  491. globals.HLBrowser.klass);
  492. smalltalk.addClass('HLBrowserBottomWidget', globals.HLWidget, ['model', 'codeWidget', 'documentationWidget'], 'Helios-Browser');
  493. globals.HLBrowserBottomWidget.comment="I render the code area of a browser and optionally the documentation for the selected class.";
  494. smalltalk.addMethod(
  495. smalltalk.method({
  496. selector: "canHaveFocus",
  497. protocol: 'testing',
  498. fn: function (){
  499. var self=this;
  500. return true;
  501. },
  502. args: [],
  503. source: "canHaveFocus\x0a\x09^ true",
  504. messageSends: [],
  505. referencedClasses: []
  506. }),
  507. globals.HLBrowserBottomWidget);
  508. smalltalk.addMethod(
  509. smalltalk.method({
  510. selector: "codeWidget",
  511. protocol: 'accessing',
  512. fn: function (){
  513. var self=this;
  514. function $HLBrowserCodeWidget(){return globals.HLBrowserCodeWidget||(typeof HLBrowserCodeWidget=="undefined"?nil:HLBrowserCodeWidget)}
  515. return smalltalk.withContext(function($ctx1) {
  516. var $2,$3,$4,$1,$receiver;
  517. $2=self["@codeWidget"];
  518. if(($receiver = $2) == null || $receiver.isNil){
  519. $3=_st($HLBrowserCodeWidget())._new();
  520. _st($3)._browserModel_(self._model());
  521. $4=_st($3)._yourself();
  522. self["@codeWidget"]=$4;
  523. $1=self["@codeWidget"];
  524. } else {
  525. $1=$2;
  526. };
  527. return $1;
  528. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{},globals.HLBrowserBottomWidget)})},
  529. args: [],
  530. source: "codeWidget\x0a\x09^ codeWidget ifNil: [ codeWidget := HLBrowserCodeWidget new\x0a\x09\x09browserModel: self model;\x0a\x09\x09yourself ]",
  531. messageSends: ["ifNil:", "browserModel:", "new", "model", "yourself"],
  532. referencedClasses: ["HLBrowserCodeWidget"]
  533. }),
  534. globals.HLBrowserBottomWidget);
  535. smalltalk.addMethod(
  536. smalltalk.method({
  537. selector: "documentationWidget",
  538. protocol: 'accessing',
  539. fn: function (){
  540. var self=this;
  541. function $HLDocumentationWidget(){return globals.HLDocumentationWidget||(typeof HLDocumentationWidget=="undefined"?nil:HLDocumentationWidget)}
  542. return smalltalk.withContext(function($ctx1) {
  543. var $2,$3,$4,$1,$receiver;
  544. $2=self["@documentationWidget"];
  545. if(($receiver = $2) == null || $receiver.isNil){
  546. $3=_st($HLDocumentationWidget())._new();
  547. _st($3)._model_(self._model());
  548. $4=_st($3)._yourself();
  549. self["@documentationWidget"]=$4;
  550. $1=self["@documentationWidget"];
  551. } else {
  552. $1=$2;
  553. };
  554. return $1;
  555. }, function($ctx1) {$ctx1.fill(self,"documentationWidget",{},globals.HLBrowserBottomWidget)})},
  556. args: [],
  557. source: "documentationWidget\x0a\x09^ documentationWidget ifNil: [ documentationWidget := HLDocumentationWidget new\x0a\x09\x09model: self model;\x0a\x09\x09yourself ]",
  558. messageSends: ["ifNil:", "model:", "new", "model", "yourself"],
  559. referencedClasses: ["HLDocumentationWidget"]
  560. }),
  561. globals.HLBrowserBottomWidget);
  562. smalltalk.addMethod(
  563. smalltalk.method({
  564. selector: "focus",
  565. protocol: 'actions',
  566. fn: function (){
  567. var self=this;
  568. return smalltalk.withContext(function($ctx1) {
  569. _st(self._codeWidget())._focus();
  570. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},globals.HLBrowserBottomWidget)})},
  571. args: [],
  572. source: "focus\x0a\x09self codeWidget focus",
  573. messageSends: ["focus", "codeWidget"],
  574. referencedClasses: []
  575. }),
  576. globals.HLBrowserBottomWidget);
  577. smalltalk.addMethod(
  578. smalltalk.method({
  579. selector: "model",
  580. protocol: 'accessing',
  581. fn: function (){
  582. var self=this;
  583. var $1;
  584. $1=self["@model"];
  585. return $1;
  586. },
  587. args: [],
  588. source: "model\x0a\x09^ model",
  589. messageSends: [],
  590. referencedClasses: []
  591. }),
  592. globals.HLBrowserBottomWidget);
  593. smalltalk.addMethod(
  594. smalltalk.method({
  595. selector: "model:",
  596. protocol: 'accessing',
  597. fn: function (aModel){
  598. var self=this;
  599. return smalltalk.withContext(function($ctx1) {
  600. self["@model"]=aModel;
  601. self._observeModel();
  602. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},globals.HLBrowserBottomWidget)})},
  603. args: ["aModel"],
  604. source: "model: aModel\x0a\x09model := aModel.\x0a\x09self observeModel",
  605. messageSends: ["observeModel"],
  606. referencedClasses: []
  607. }),
  608. globals.HLBrowserBottomWidget);
  609. smalltalk.addMethod(
  610. smalltalk.method({
  611. selector: "observeModel",
  612. protocol: 'actions',
  613. fn: function (){
  614. var self=this;
  615. function $HLShowInstanceToggled(){return globals.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  616. function $HLShowCommentToggled(){return globals.HLShowCommentToggled||(typeof HLShowCommentToggled=="undefined"?nil:HLShowCommentToggled)}
  617. return smalltalk.withContext(function($ctx1) {
  618. var $1,$2;
  619. $1=_st(self._model())._announcer();
  620. _st($1)._on_send_to_($HLShowInstanceToggled(),"onShowInstanceToggled",self);
  621. $ctx1.sendIdx["on:send:to:"]=1;
  622. $2=_st($1)._on_send_to_($HLShowCommentToggled(),"onShowCommentToggled",self);
  623. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},globals.HLBrowserBottomWidget)})},
  624. args: [],
  625. source: "observeModel\x0a\x09self model announcer \x0a\x09\x09on: HLShowInstanceToggled\x0a\x09\x09send: #onShowInstanceToggled\x0a\x09\x09to: self;\x0a\x09\x09on: HLShowCommentToggled\x0a\x09\x09send: #onShowCommentToggled\x0a\x09\x09to: self",
  626. messageSends: ["on:send:to:", "announcer", "model"],
  627. referencedClasses: ["HLShowInstanceToggled", "HLShowCommentToggled"]
  628. }),
  629. globals.HLBrowserBottomWidget);
  630. smalltalk.addMethod(
  631. smalltalk.method({
  632. selector: "onShowCommentToggled",
  633. protocol: 'reactions',
  634. fn: function (){
  635. var self=this;
  636. return smalltalk.withContext(function($ctx1) {
  637. self._refresh();
  638. return self}, function($ctx1) {$ctx1.fill(self,"onShowCommentToggled",{},globals.HLBrowserBottomWidget)})},
  639. args: [],
  640. source: "onShowCommentToggled\x0a\x09self refresh",
  641. messageSends: ["refresh"],
  642. referencedClasses: []
  643. }),
  644. globals.HLBrowserBottomWidget);
  645. smalltalk.addMethod(
  646. smalltalk.method({
  647. selector: "onShowInstanceToggled",
  648. protocol: 'reactions',
  649. fn: function (){
  650. var self=this;
  651. return smalltalk.withContext(function($ctx1) {
  652. self._refresh();
  653. return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{},globals.HLBrowserBottomWidget)})},
  654. args: [],
  655. source: "onShowInstanceToggled\x0a\x09self refresh",
  656. messageSends: ["refresh"],
  657. referencedClasses: []
  658. }),
  659. globals.HLBrowserBottomWidget);
  660. smalltalk.addMethod(
  661. smalltalk.method({
  662. selector: "previous",
  663. protocol: 'accessing',
  664. fn: function (){
  665. var self=this;
  666. return self},
  667. args: [],
  668. source: "previous\x0a\x09\x22For navigation\x22",
  669. messageSends: [],
  670. referencedClasses: []
  671. }),
  672. globals.HLBrowserBottomWidget);
  673. smalltalk.addMethod(
  674. smalltalk.method({
  675. selector: "previous:",
  676. protocol: 'accessing',
  677. fn: function (aWidget){
  678. var self=this;
  679. return self},
  680. args: ["aWidget"],
  681. source: "previous: aWidget\x0a\x09\x22For navigation\x22",
  682. messageSends: [],
  683. referencedClasses: []
  684. }),
  685. globals.HLBrowserBottomWidget);
  686. smalltalk.addMethod(
  687. smalltalk.method({
  688. selector: "renderContentOn:",
  689. protocol: 'rendering',
  690. fn: function (html){
  691. var self=this;
  692. return smalltalk.withContext(function($ctx1) {
  693. var $1;
  694. $1=_st(self._model())._showComment();
  695. if(smalltalk.assert($1)){
  696. self._renderPanesOn_(html);
  697. } else {
  698. _st(html)._with_(self._codeWidget());
  699. };
  700. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},globals.HLBrowserBottomWidget)})},
  701. args: ["html"],
  702. source: "renderContentOn: html\x0a\x09self model showComment \x0a\x09\x09ifTrue: [ self renderPanesOn: html ]\x0a\x09\x09ifFalse: [ html with: self codeWidget ]",
  703. messageSends: ["ifTrue:ifFalse:", "showComment", "model", "renderPanesOn:", "with:", "codeWidget"],
  704. referencedClasses: []
  705. }),
  706. globals.HLBrowserBottomWidget);
  707. smalltalk.addMethod(
  708. smalltalk.method({
  709. selector: "renderPanesOn:",
  710. protocol: 'rendering',
  711. fn: function (html){
  712. var self=this;
  713. function $HLVerticalSplitter(){return globals.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  714. return smalltalk.withContext(function($ctx1) {
  715. _st(html)._with_(_st($HLVerticalSplitter())._with_with_(self._codeWidget(),self._documentationWidget()));
  716. return self}, function($ctx1) {$ctx1.fill(self,"renderPanesOn:",{html:html},globals.HLBrowserBottomWidget)})},
  717. args: ["html"],
  718. source: "renderPanesOn: html\x0a\x09html with: (HLVerticalSplitter\x0a\x09\x09with: self codeWidget\x0a\x09\x09with: self documentationWidget)",
  719. messageSends: ["with:", "with:with:", "codeWidget", "documentationWidget"],
  720. referencedClasses: ["HLVerticalSplitter"]
  721. }),
  722. globals.HLBrowserBottomWidget);
  723. smalltalk.addClass('HLBrowserModel', globals.HLToolModel, ['showInstance', 'showComment'], 'Helios-Browser');
  724. smalltalk.addMethod(
  725. smalltalk.method({
  726. selector: "editComment",
  727. protocol: 'commands actions',
  728. fn: function (){
  729. var self=this;
  730. function $HLEditComment(){return globals.HLEditComment||(typeof HLEditComment=="undefined"?nil:HLEditComment)}
  731. return smalltalk.withContext(function($ctx1) {
  732. _st(self._announcer())._announce_(_st($HLEditComment())._new());
  733. return self}, function($ctx1) {$ctx1.fill(self,"editComment",{},globals.HLBrowserModel)})},
  734. args: [],
  735. source: "editComment\x0a\x09self announcer announce: HLEditComment new",
  736. messageSends: ["announce:", "announcer", "new"],
  737. referencedClasses: ["HLEditComment"]
  738. }),
  739. globals.HLBrowserModel);
  740. smalltalk.addMethod(
  741. smalltalk.method({
  742. selector: "focusOnClasses",
  743. protocol: 'actions',
  744. fn: function (){
  745. var self=this;
  746. function $HLClassesFocusRequested(){return globals.HLClassesFocusRequested||(typeof HLClassesFocusRequested=="undefined"?nil:HLClassesFocusRequested)}
  747. return smalltalk.withContext(function($ctx1) {
  748. _st(self._announcer())._announce_(_st($HLClassesFocusRequested())._new());
  749. return self}, function($ctx1) {$ctx1.fill(self,"focusOnClasses",{},globals.HLBrowserModel)})},
  750. args: [],
  751. source: "focusOnClasses\x0a\x09self announcer announce: HLClassesFocusRequested new",
  752. messageSends: ["announce:", "announcer", "new"],
  753. referencedClasses: ["HLClassesFocusRequested"]
  754. }),
  755. globals.HLBrowserModel);
  756. smalltalk.addMethod(
  757. smalltalk.method({
  758. selector: "focusOnDocumentation",
  759. protocol: 'actions',
  760. fn: function (){
  761. var self=this;
  762. function $HLDocumentationFocusRequested(){return globals.HLDocumentationFocusRequested||(typeof HLDocumentationFocusRequested=="undefined"?nil:HLDocumentationFocusRequested)}
  763. return smalltalk.withContext(function($ctx1) {
  764. _st(self._announcer())._announce_(_st($HLDocumentationFocusRequested())._new());
  765. return self}, function($ctx1) {$ctx1.fill(self,"focusOnDocumentation",{},globals.HLBrowserModel)})},
  766. args: [],
  767. source: "focusOnDocumentation\x0a\x09self announcer announce: HLDocumentationFocusRequested new",
  768. messageSends: ["announce:", "announcer", "new"],
  769. referencedClasses: ["HLDocumentationFocusRequested"]
  770. }),
  771. globals.HLBrowserModel);
  772. smalltalk.addMethod(
  773. smalltalk.method({
  774. selector: "focusOnMethods",
  775. protocol: 'actions',
  776. fn: function (){
  777. var self=this;
  778. function $HLMethodsFocusRequested(){return globals.HLMethodsFocusRequested||(typeof HLMethodsFocusRequested=="undefined"?nil:HLMethodsFocusRequested)}
  779. return smalltalk.withContext(function($ctx1) {
  780. _st(self._announcer())._announce_(_st($HLMethodsFocusRequested())._new());
  781. return self}, function($ctx1) {$ctx1.fill(self,"focusOnMethods",{},globals.HLBrowserModel)})},
  782. args: [],
  783. source: "focusOnMethods\x0a\x09self announcer announce: HLMethodsFocusRequested new",
  784. messageSends: ["announce:", "announcer", "new"],
  785. referencedClasses: ["HLMethodsFocusRequested"]
  786. }),
  787. globals.HLBrowserModel);
  788. smalltalk.addMethod(
  789. smalltalk.method({
  790. selector: "focusOnPackages",
  791. protocol: 'actions',
  792. fn: function (){
  793. var self=this;
  794. function $HLPackagesFocusRequested(){return globals.HLPackagesFocusRequested||(typeof HLPackagesFocusRequested=="undefined"?nil:HLPackagesFocusRequested)}
  795. return smalltalk.withContext(function($ctx1) {
  796. _st(self._announcer())._announce_(_st($HLPackagesFocusRequested())._new());
  797. return self}, function($ctx1) {$ctx1.fill(self,"focusOnPackages",{},globals.HLBrowserModel)})},
  798. args: [],
  799. source: "focusOnPackages\x0a\x09self announcer announce: HLPackagesFocusRequested new",
  800. messageSends: ["announce:", "announcer", "new"],
  801. referencedClasses: ["HLPackagesFocusRequested"]
  802. }),
  803. globals.HLBrowserModel);
  804. smalltalk.addMethod(
  805. smalltalk.method({
  806. selector: "focusOnProtocols",
  807. protocol: 'actions',
  808. fn: function (){
  809. var self=this;
  810. function $HLProtocolsFocusRequested(){return globals.HLProtocolsFocusRequested||(typeof HLProtocolsFocusRequested=="undefined"?nil:HLProtocolsFocusRequested)}
  811. return smalltalk.withContext(function($ctx1) {
  812. _st(self._announcer())._announce_(_st($HLProtocolsFocusRequested())._new());
  813. return self}, function($ctx1) {$ctx1.fill(self,"focusOnProtocols",{},globals.HLBrowserModel)})},
  814. args: [],
  815. source: "focusOnProtocols\x0a\x09self announcer announce: HLProtocolsFocusRequested new",
  816. messageSends: ["announce:", "announcer", "new"],
  817. referencedClasses: ["HLProtocolsFocusRequested"]
  818. }),
  819. globals.HLBrowserModel);
  820. smalltalk.addMethod(
  821. smalltalk.method({
  822. selector: "focusOnSourceCode",
  823. protocol: 'actions',
  824. fn: function (){
  825. var self=this;
  826. function $HLSourceCodeFocusRequested(){return globals.HLSourceCodeFocusRequested||(typeof HLSourceCodeFocusRequested=="undefined"?nil:HLSourceCodeFocusRequested)}
  827. return smalltalk.withContext(function($ctx1) {
  828. _st(self._announcer())._announce_(_st($HLSourceCodeFocusRequested())._new());
  829. return self}, function($ctx1) {$ctx1.fill(self,"focusOnSourceCode",{},globals.HLBrowserModel)})},
  830. args: [],
  831. source: "focusOnSourceCode\x0a\x09self announcer announce: HLSourceCodeFocusRequested new",
  832. messageSends: ["announce:", "announcer", "new"],
  833. referencedClasses: ["HLSourceCodeFocusRequested"]
  834. }),
  835. globals.HLBrowserModel);
  836. smalltalk.addMethod(
  837. smalltalk.method({
  838. selector: "isBrowserModel",
  839. protocol: 'testing',
  840. fn: function (){
  841. var self=this;
  842. return true;
  843. },
  844. args: [],
  845. source: "isBrowserModel\x0a\x09^ true",
  846. messageSends: [],
  847. referencedClasses: []
  848. }),
  849. globals.HLBrowserModel);
  850. smalltalk.addMethod(
  851. smalltalk.method({
  852. selector: "setClassComment:",
  853. protocol: 'actions',
  854. fn: function (aString){
  855. var self=this;
  856. return smalltalk.withContext(function($ctx1) {
  857. _st(self._environment())._setClassCommentOf_to_(_st(self._selectedClass())._theNonMetaClass(),aString);
  858. return self}, function($ctx1) {$ctx1.fill(self,"setClassComment:",{aString:aString},globals.HLBrowserModel)})},
  859. args: ["aString"],
  860. source: "setClassComment: aString\x0a\x09self environment\x0a\x09\x09setClassCommentOf: self selectedClass theNonMetaClass\x0a\x09\x09to: aString",
  861. messageSends: ["setClassCommentOf:to:", "environment", "theNonMetaClass", "selectedClass"],
  862. referencedClasses: []
  863. }),
  864. globals.HLBrowserModel);
  865. smalltalk.addMethod(
  866. smalltalk.method({
  867. selector: "showClassTemplate",
  868. protocol: 'actions',
  869. fn: function (){
  870. var self=this;
  871. function $HLShowTemplate(){return globals.HLShowTemplate||(typeof HLShowTemplate=="undefined"?nil:HLShowTemplate)}
  872. return smalltalk.withContext(function($ctx1) {
  873. var $1,$2,$3,$receiver;
  874. $1=self._selectedPackage();
  875. if(($receiver = $1) == null || $receiver.isNil){
  876. $1;
  877. } else {
  878. var package_;
  879. package_=$receiver;
  880. $2=_st($HLShowTemplate())._new();
  881. _st($2)._template_(_st(package_)._classTemplate());
  882. $3=_st($2)._yourself();
  883. _st(self._announcer())._announce_($3);
  884. };
  885. return self}, function($ctx1) {$ctx1.fill(self,"showClassTemplate",{},globals.HLBrowserModel)})},
  886. args: [],
  887. source: "showClassTemplate\x0a\x09self selectedPackage ifNotNil: [ :package |\x0a\x09\x09self announcer announce: (HLShowTemplate new\x0a\x09\x09\x09template: package classTemplate;\x0a\x09\x09\x09yourself) ]",
  888. messageSends: ["ifNotNil:", "selectedPackage", "announce:", "announcer", "template:", "new", "classTemplate", "yourself"],
  889. referencedClasses: ["HLShowTemplate"]
  890. }),
  891. globals.HLBrowserModel);
  892. smalltalk.addMethod(
  893. smalltalk.method({
  894. selector: "showComment",
  895. protocol: 'accessing',
  896. fn: function (){
  897. var self=this;
  898. return smalltalk.withContext(function($ctx1) {
  899. var $2,$1,$receiver;
  900. $2=self["@showComment"];
  901. if(($receiver = $2) == null || $receiver.isNil){
  902. $1=true;
  903. } else {
  904. $1=$2;
  905. };
  906. return $1;
  907. }, function($ctx1) {$ctx1.fill(self,"showComment",{},globals.HLBrowserModel)})},
  908. args: [],
  909. source: "showComment\x0a\x09^ showComment ifNil: [ true ]",
  910. messageSends: ["ifNil:"],
  911. referencedClasses: []
  912. }),
  913. globals.HLBrowserModel);
  914. smalltalk.addMethod(
  915. smalltalk.method({
  916. selector: "showComment:",
  917. protocol: 'accessing',
  918. fn: function (aBoolean){
  919. var self=this;
  920. function $HLShowCommentToggled(){return globals.HLShowCommentToggled||(typeof HLShowCommentToggled=="undefined"?nil:HLShowCommentToggled)}
  921. return smalltalk.withContext(function($ctx1) {
  922. self._withChangesDo_((function(){
  923. return smalltalk.withContext(function($ctx2) {
  924. self["@showComment"]=aBoolean;
  925. self["@showComment"];
  926. return _st(self._announcer())._announce_(_st($HLShowCommentToggled())._new());
  927. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  928. return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean},globals.HLBrowserModel)})},
  929. args: ["aBoolean"],
  930. source: "showComment: aBoolean\x0a\x09self withChangesDo: [\x0a\x09\x09showComment := aBoolean.\x0a\x09\x09self announcer announce: HLShowCommentToggled new ]",
  931. messageSends: ["withChangesDo:", "announce:", "announcer", "new"],
  932. referencedClasses: ["HLShowCommentToggled"]
  933. }),
  934. globals.HLBrowserModel);
  935. smalltalk.addMethod(
  936. smalltalk.method({
  937. selector: "showInstance",
  938. protocol: 'accessing',
  939. fn: function (){
  940. var self=this;
  941. return smalltalk.withContext(function($ctx1) {
  942. var $2,$1,$receiver;
  943. $2=self["@showInstance"];
  944. if(($receiver = $2) == null || $receiver.isNil){
  945. $1=true;
  946. } else {
  947. $1=$2;
  948. };
  949. return $1;
  950. }, function($ctx1) {$ctx1.fill(self,"showInstance",{},globals.HLBrowserModel)})},
  951. args: [],
  952. source: "showInstance\x0a\x09^ showInstance ifNil: [ true ]",
  953. messageSends: ["ifNil:"],
  954. referencedClasses: []
  955. }),
  956. globals.HLBrowserModel);
  957. smalltalk.addMethod(
  958. smalltalk.method({
  959. selector: "showInstance:",
  960. protocol: 'accessing',
  961. fn: function (aBoolean){
  962. var self=this;
  963. function $HLShowInstanceToggled(){return globals.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  964. return smalltalk.withContext(function($ctx1) {
  965. var $1,$3,$2,$receiver;
  966. self._withChangesDo_((function(){
  967. return smalltalk.withContext(function($ctx2) {
  968. self["@showInstance"]=aBoolean;
  969. self["@showInstance"];
  970. $1=self._selectedClass();
  971. $ctx2.sendIdx["selectedClass"]=1;
  972. if(($receiver = $1) == null || $receiver.isNil){
  973. $1;
  974. } else {
  975. if(smalltalk.assert(aBoolean)){
  976. $3=self._selectedClass();
  977. $ctx2.sendIdx["selectedClass"]=2;
  978. $2=_st($3)._theNonMetaClass();
  979. } else {
  980. $2=_st(self._selectedClass())._theMetaClass();
  981. };
  982. self._selectedClass_($2);
  983. };
  984. return _st(self._announcer())._announce_(_st($HLShowInstanceToggled())._new());
  985. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  986. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean},globals.HLBrowserModel)})},
  987. args: ["aBoolean"],
  988. source: "showInstance: aBoolean\x0a\x0a\x09self withChangesDo: [\x0a\x09\x09showInstance := aBoolean.\x0a\x0a \x09self selectedClass ifNotNil: [\x0a \x09\x09self selectedClass: (aBoolean\x0a \x09\x09\x09ifTrue: [ self selectedClass theNonMetaClass ]\x0a\x09 \x09 \x09ifFalse: [ self selectedClass theMetaClass ]) ].\x0a \x0a\x09\x09self announcer announce: HLShowInstanceToggled new ]",
  989. messageSends: ["withChangesDo:", "ifNotNil:", "selectedClass", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "announce:", "announcer", "new"],
  990. referencedClasses: ["HLShowInstanceToggled"]
  991. }),
  992. globals.HLBrowserModel);
  993. smalltalk.addMethod(
  994. smalltalk.method({
  995. selector: "showMethodTemplate",
  996. protocol: 'actions',
  997. fn: function (){
  998. var self=this;
  999. function $HLShowTemplate(){return globals.HLShowTemplate||(typeof HLShowTemplate=="undefined"?nil:HLShowTemplate)}
  1000. return smalltalk.withContext(function($ctx1) {
  1001. var $1,$2,$3,$receiver;
  1002. $1=self._selectedClass();
  1003. if(($receiver = $1) == null || $receiver.isNil){
  1004. $1;
  1005. } else {
  1006. var theClass;
  1007. theClass=$receiver;
  1008. $2=_st($HLShowTemplate())._new();
  1009. _st($2)._template_(_st(theClass)._methodTemplate());
  1010. $3=_st($2)._yourself();
  1011. _st(self._announcer())._announce_($3);
  1012. };
  1013. return self}, function($ctx1) {$ctx1.fill(self,"showMethodTemplate",{},globals.HLBrowserModel)})},
  1014. args: [],
  1015. source: "showMethodTemplate\x0a\x09self selectedClass ifNotNil: [ :theClass |\x0a\x09\x09self announcer announce: (HLShowTemplate new\x0a\x09\x09\x09template: theClass methodTemplate;\x0a\x09\x09\x09yourself) ]",
  1016. messageSends: ["ifNotNil:", "selectedClass", "announce:", "announcer", "template:", "new", "methodTemplate", "yourself"],
  1017. referencedClasses: ["HLShowTemplate"]
  1018. }),
  1019. globals.HLBrowserModel);
  1020. smalltalk.addMethod(
  1021. smalltalk.method({
  1022. selector: "on:",
  1023. protocol: 'instance creation',
  1024. fn: function (anEnvironment){
  1025. var self=this;
  1026. return smalltalk.withContext(function($ctx1) {
  1027. var $2,$3,$1;
  1028. $2=self._new();
  1029. _st($2)._environment_(anEnvironment);
  1030. $3=_st($2)._yourself();
  1031. $1=$3;
  1032. return $1;
  1033. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment},globals.HLBrowserModel.klass)})},
  1034. args: ["anEnvironment"],
  1035. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  1036. messageSends: ["environment:", "new", "yourself"],
  1037. referencedClasses: []
  1038. }),
  1039. globals.HLBrowserModel.klass);
  1040. smalltalk.addClass('HLClassCache', globals.Object, ['class', 'selectorsCache', 'overrideCache', 'overriddenCache'], 'Helios-Browser');
  1041. smalltalk.addMethod(
  1042. smalltalk.method({
  1043. selector: "invalidateChildrenSelector:",
  1044. protocol: 'actions',
  1045. fn: function (aSelector){
  1046. var self=this;
  1047. return smalltalk.withContext(function($ctx1) {
  1048. var $1,$2;
  1049. _st(_st(self._theClass())._subclasses())._do_((function(each){
  1050. return smalltalk.withContext(function($ctx2) {
  1051. $1=_st(self._selectorsCache())._cacheFor_(each);
  1052. _st($1)._removeSelector_(aSelector);
  1053. $2=_st($1)._invalidateChildrenSelector_(aSelector);
  1054. return $2;
  1055. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  1056. return self}, function($ctx1) {$ctx1.fill(self,"invalidateChildrenSelector:",{aSelector:aSelector},globals.HLClassCache)})},
  1057. args: ["aSelector"],
  1058. source: "invalidateChildrenSelector: aSelector\x0a\x09self theClass subclasses do: [ :each |\x0a \x09(self selectorsCache cacheFor: each)\x0a \x09removeSelector: aSelector;\x0a \x09invalidateChildrenSelector: aSelector ]",
  1059. messageSends: ["do:", "subclasses", "theClass", "removeSelector:", "cacheFor:", "selectorsCache", "invalidateChildrenSelector:"],
  1060. referencedClasses: []
  1061. }),
  1062. globals.HLClassCache);
  1063. smalltalk.addMethod(
  1064. smalltalk.method({
  1065. selector: "invalidateParentSelector:",
  1066. protocol: 'actions',
  1067. fn: function (aSelector){
  1068. var self=this;
  1069. return smalltalk.withContext(function($ctx1) {
  1070. var $2,$1,$3,$4,$receiver;
  1071. $2=self._theClass();
  1072. $ctx1.sendIdx["theClass"]=1;
  1073. $1=_st($2)._superclass();
  1074. $ctx1.sendIdx["superclass"]=1;
  1075. if(($receiver = $1) == null || $receiver.isNil){
  1076. $1;
  1077. } else {
  1078. $3=_st(self._selectorsCache())._cacheFor_(_st(self._theClass())._superclass());
  1079. _st($3)._removeSelector_(aSelector);
  1080. $4=_st($3)._invalidateParentSelector_(aSelector);
  1081. $4;
  1082. };
  1083. return self}, function($ctx1) {$ctx1.fill(self,"invalidateParentSelector:",{aSelector:aSelector},globals.HLClassCache)})},
  1084. args: ["aSelector"],
  1085. source: "invalidateParentSelector: aSelector\x0a\x09self theClass superclass ifNotNil: [\x0a \x09(self selectorsCache cacheFor: self theClass superclass)\x0a \x09removeSelector: aSelector;\x0a\x09\x09\x09invalidateParentSelector: aSelector ]",
  1086. messageSends: ["ifNotNil:", "superclass", "theClass", "removeSelector:", "cacheFor:", "selectorsCache", "invalidateParentSelector:"],
  1087. referencedClasses: []
  1088. }),
  1089. globals.HLClassCache);
  1090. smalltalk.addMethod(
  1091. smalltalk.method({
  1092. selector: "invalidateSelector:",
  1093. protocol: 'actions',
  1094. fn: function (aSelector){
  1095. var self=this;
  1096. return smalltalk.withContext(function($ctx1) {
  1097. var $1;
  1098. self._invalidateParentSelector_(aSelector);
  1099. self._invalidateChildrenSelector_(aSelector);
  1100. $1=self._removeSelector_(aSelector);
  1101. return self}, function($ctx1) {$ctx1.fill(self,"invalidateSelector:",{aSelector:aSelector},globals.HLClassCache)})},
  1102. args: ["aSelector"],
  1103. source: "invalidateSelector: aSelector\x0a\x09self \x0a \x09invalidateParentSelector: aSelector;\x0a invalidateChildrenSelector: aSelector;\x0a removeSelector: aSelector",
  1104. messageSends: ["invalidateParentSelector:", "invalidateChildrenSelector:", "removeSelector:"],
  1105. referencedClasses: []
  1106. }),
  1107. globals.HLClassCache);
  1108. smalltalk.addMethod(
  1109. smalltalk.method({
  1110. selector: "isOverridden:",
  1111. protocol: 'testing',
  1112. fn: function (aMethod){
  1113. var self=this;
  1114. return smalltalk.withContext(function($ctx1) {
  1115. var $1;
  1116. $1=_st(self._overriddenCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  1117. return smalltalk.withContext(function($ctx2) {
  1118. return _st(aMethod)._isOverridden();
  1119. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1120. return $1;
  1121. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod},globals.HLClassCache)})},
  1122. args: ["aMethod"],
  1123. source: "isOverridden: aMethod\x0a\x09^ self overriddenCache \x0a \x09at: aMethod selector\x0a \x09ifAbsentPut: [ aMethod isOverridden ]",
  1124. messageSends: ["at:ifAbsentPut:", "overriddenCache", "selector", "isOverridden"],
  1125. referencedClasses: []
  1126. }),
  1127. globals.HLClassCache);
  1128. smalltalk.addMethod(
  1129. smalltalk.method({
  1130. selector: "isOverride:",
  1131. protocol: 'testing',
  1132. fn: function (aMethod){
  1133. var self=this;
  1134. return smalltalk.withContext(function($ctx1) {
  1135. var $1;
  1136. $1=_st(self._overrideCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  1137. return smalltalk.withContext(function($ctx2) {
  1138. return _st(aMethod)._isOverride();
  1139. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1140. return $1;
  1141. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod},globals.HLClassCache)})},
  1142. args: ["aMethod"],
  1143. source: "isOverride: aMethod\x0a\x09^ self overrideCache\x0a \x09at: aMethod selector\x0a \x09ifAbsentPut: [ aMethod isOverride ]",
  1144. messageSends: ["at:ifAbsentPut:", "overrideCache", "selector", "isOverride"],
  1145. referencedClasses: []
  1146. }),
  1147. globals.HLClassCache);
  1148. smalltalk.addMethod(
  1149. smalltalk.method({
  1150. selector: "overriddenCache",
  1151. protocol: 'accessing',
  1152. fn: function (){
  1153. var self=this;
  1154. function $HashedCollection(){return globals.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  1155. return smalltalk.withContext(function($ctx1) {
  1156. var $2,$1,$receiver;
  1157. $2=self["@overriddenCache"];
  1158. if(($receiver = $2) == null || $receiver.isNil){
  1159. self["@overriddenCache"]=_st($HashedCollection())._new();
  1160. $1=self["@overriddenCache"];
  1161. } else {
  1162. $1=$2;
  1163. };
  1164. return $1;
  1165. }, function($ctx1) {$ctx1.fill(self,"overriddenCache",{},globals.HLClassCache)})},
  1166. args: [],
  1167. source: "overriddenCache\x0a\x09^ overriddenCache ifNil: [ overriddenCache := HashedCollection new ]",
  1168. messageSends: ["ifNil:", "new"],
  1169. referencedClasses: ["HashedCollection"]
  1170. }),
  1171. globals.HLClassCache);
  1172. smalltalk.addMethod(
  1173. smalltalk.method({
  1174. selector: "overrideCache",
  1175. protocol: 'accessing',
  1176. fn: function (){
  1177. var self=this;
  1178. function $HashedCollection(){return globals.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  1179. return smalltalk.withContext(function($ctx1) {
  1180. var $2,$1,$receiver;
  1181. $2=self["@overrideCache"];
  1182. if(($receiver = $2) == null || $receiver.isNil){
  1183. self["@overrideCache"]=_st($HashedCollection())._new();
  1184. $1=self["@overrideCache"];
  1185. } else {
  1186. $1=$2;
  1187. };
  1188. return $1;
  1189. }, function($ctx1) {$ctx1.fill(self,"overrideCache",{},globals.HLClassCache)})},
  1190. args: [],
  1191. source: "overrideCache\x0a\x09^ overrideCache ifNil: [ overrideCache := HashedCollection new ]",
  1192. messageSends: ["ifNil:", "new"],
  1193. referencedClasses: ["HashedCollection"]
  1194. }),
  1195. globals.HLClassCache);
  1196. smalltalk.addMethod(
  1197. smalltalk.method({
  1198. selector: "removeSelector:",
  1199. protocol: 'private',
  1200. fn: function (aSelector){
  1201. var self=this;
  1202. return smalltalk.withContext(function($ctx1) {
  1203. _st(self._overriddenCache())._removeKey_ifAbsent_(aSelector,(function(){
  1204. }));
  1205. $ctx1.sendIdx["removeKey:ifAbsent:"]=1;
  1206. _st(self._overrideCache())._removeKey_ifAbsent_(aSelector,(function(){
  1207. }));
  1208. return self}, function($ctx1) {$ctx1.fill(self,"removeSelector:",{aSelector:aSelector},globals.HLClassCache)})},
  1209. args: ["aSelector"],
  1210. source: "removeSelector: aSelector\x0a\x09self overriddenCache \x0a \x09removeKey: aSelector\x0a ifAbsent: [ ].\x0a self overrideCache \x0a \x09removeKey: aSelector\x0a ifAbsent: [ ]",
  1211. messageSends: ["removeKey:ifAbsent:", "overriddenCache", "overrideCache"],
  1212. referencedClasses: []
  1213. }),
  1214. globals.HLClassCache);
  1215. smalltalk.addMethod(
  1216. smalltalk.method({
  1217. selector: "selectorsCache",
  1218. protocol: 'accessing',
  1219. fn: function (){
  1220. var self=this;
  1221. var $1;
  1222. $1=self["@selectorsCache"];
  1223. return $1;
  1224. },
  1225. args: [],
  1226. source: "selectorsCache\x0a\x09^ selectorsCache",
  1227. messageSends: [],
  1228. referencedClasses: []
  1229. }),
  1230. globals.HLClassCache);
  1231. smalltalk.addMethod(
  1232. smalltalk.method({
  1233. selector: "selectorsCache:",
  1234. protocol: 'accessing',
  1235. fn: function (aCache){
  1236. var self=this;
  1237. self["@selectorsCache"]=aCache;
  1238. return self},
  1239. args: ["aCache"],
  1240. source: "selectorsCache: aCache\x0a\x09selectorsCache := aCache",
  1241. messageSends: [],
  1242. referencedClasses: []
  1243. }),
  1244. globals.HLClassCache);
  1245. smalltalk.addMethod(
  1246. smalltalk.method({
  1247. selector: "theClass",
  1248. protocol: 'accessing',
  1249. fn: function (){
  1250. var self=this;
  1251. var $1;
  1252. $1=self["@class"];
  1253. return $1;
  1254. },
  1255. args: [],
  1256. source: "theClass\x0a\x09^ class",
  1257. messageSends: [],
  1258. referencedClasses: []
  1259. }),
  1260. globals.HLClassCache);
  1261. smalltalk.addMethod(
  1262. smalltalk.method({
  1263. selector: "theClass:",
  1264. protocol: 'accessing',
  1265. fn: function (aClass){
  1266. var self=this;
  1267. self["@class"]=aClass;
  1268. return self},
  1269. args: ["aClass"],
  1270. source: "theClass: aClass\x0a\x09class := aClass",
  1271. messageSends: [],
  1272. referencedClasses: []
  1273. }),
  1274. globals.HLClassCache);
  1275. smalltalk.addMethod(
  1276. smalltalk.method({
  1277. selector: "on:selectorsCache:",
  1278. protocol: 'instance creation',
  1279. fn: function (aClass,aSelectorsCache){
  1280. var self=this;
  1281. return smalltalk.withContext(function($ctx1) {
  1282. var $2,$3,$1;
  1283. $2=self._new();
  1284. _st($2)._theClass_(aClass);
  1285. _st($2)._selectorsCache_(aSelectorsCache);
  1286. $3=_st($2)._yourself();
  1287. $1=$3;
  1288. return $1;
  1289. }, function($ctx1) {$ctx1.fill(self,"on:selectorsCache:",{aClass:aClass,aSelectorsCache:aSelectorsCache},globals.HLClassCache.klass)})},
  1290. args: ["aClass", "aSelectorsCache"],
  1291. source: "on: aClass selectorsCache: aSelectorsCache\x0a\x09^ self new\x0a \x09theClass: aClass;\x0a selectorsCache: aSelectorsCache;\x0a yourself",
  1292. messageSends: ["theClass:", "new", "selectorsCache:", "yourself"],
  1293. referencedClasses: []
  1294. }),
  1295. globals.HLClassCache.klass);
  1296. smalltalk.addClass('HLClassesListWidget', globals.HLToolListWidget, [], 'Helios-Browser');
  1297. globals.HLClassesListWidget.comment="I render a list of classes in the selected package.";
  1298. smalltalk.addMethod(
  1299. smalltalk.method({
  1300. selector: "cssClassForItem:",
  1301. protocol: 'accessing',
  1302. fn: function (aClass){
  1303. var self=this;
  1304. return smalltalk.withContext(function($ctx1) {
  1305. var $1;
  1306. $1=_st(_st(aClass)._theNonMetaClass())._heliosClass();
  1307. return $1;
  1308. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{aClass:aClass},globals.HLClassesListWidget)})},
  1309. args: ["aClass"],
  1310. source: "cssClassForItem: aClass\x0a\x09^ aClass theNonMetaClass heliosClass",
  1311. messageSends: ["heliosClass", "theNonMetaClass"],
  1312. referencedClasses: []
  1313. }),
  1314. globals.HLClassesListWidget);
  1315. smalltalk.addMethod(
  1316. smalltalk.method({
  1317. selector: "focus",
  1318. protocol: 'actions',
  1319. fn: function (){
  1320. var self=this;
  1321. return smalltalk.withContext(function($ctx1) {
  1322. var $1,$receiver;
  1323. ($ctx1.supercall = true, globals.HLClassesListWidget.superclass.fn.prototype._focus.apply(_st(self), []));
  1324. $ctx1.supercall = false;
  1325. $1=self._selectedItem();
  1326. if(($receiver = $1) == null || $receiver.isNil){
  1327. _st(self._model())._showClassTemplate();
  1328. } else {
  1329. $1;
  1330. };
  1331. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},globals.HLClassesListWidget)})},
  1332. args: [],
  1333. source: "focus\x0a\x09super focus.\x0a\x09\x0a\x09self selectedItem \x0a\x09\x09ifNil: [ self model showClassTemplate ]",
  1334. messageSends: ["focus", "ifNil:", "selectedItem", "showClassTemplate", "model"],
  1335. referencedClasses: []
  1336. }),
  1337. globals.HLClassesListWidget);
  1338. smalltalk.addMethod(
  1339. smalltalk.method({
  1340. selector: "focusMethodsListWidget",
  1341. protocol: 'actions',
  1342. fn: function (){
  1343. var self=this;
  1344. function $HLMethodsListFocus(){return globals.HLMethodsListFocus||(typeof HLMethodsListFocus=="undefined"?nil:HLMethodsListFocus)}
  1345. return smalltalk.withContext(function($ctx1) {
  1346. _st(_st(self._model())._announcer())._announce_(_st($HLMethodsListFocus())._new());
  1347. return self}, function($ctx1) {$ctx1.fill(self,"focusMethodsListWidget",{},globals.HLClassesListWidget)})},
  1348. args: [],
  1349. source: "focusMethodsListWidget\x0a\x09self model announcer announce: HLMethodsListFocus new",
  1350. messageSends: ["announce:", "announcer", "model", "new"],
  1351. referencedClasses: ["HLMethodsListFocus"]
  1352. }),
  1353. globals.HLClassesListWidget);
  1354. smalltalk.addMethod(
  1355. smalltalk.method({
  1356. selector: "focusProtocolsListWidget",
  1357. protocol: 'actions',
  1358. fn: function (){
  1359. var self=this;
  1360. function $HLProtocolsListFocus(){return globals.HLProtocolsListFocus||(typeof HLProtocolsListFocus=="undefined"?nil:HLProtocolsListFocus)}
  1361. return smalltalk.withContext(function($ctx1) {
  1362. _st(_st(self._model())._announcer())._announce_(_st($HLProtocolsListFocus())._new());
  1363. return self}, function($ctx1) {$ctx1.fill(self,"focusProtocolsListWidget",{},globals.HLClassesListWidget)})},
  1364. args: [],
  1365. source: "focusProtocolsListWidget\x0a\x09self model announcer announce: HLProtocolsListFocus new",
  1366. messageSends: ["announce:", "announcer", "model", "new"],
  1367. referencedClasses: ["HLProtocolsListFocus"]
  1368. }),
  1369. globals.HLClassesListWidget);
  1370. smalltalk.addMethod(
  1371. smalltalk.method({
  1372. selector: "getChildrenOf:",
  1373. protocol: 'accessing',
  1374. fn: function (aClass){
  1375. var self=this;
  1376. return smalltalk.withContext(function($ctx1) {
  1377. var $1;
  1378. $1=_st(self._items())._select_((function(each){
  1379. return smalltalk.withContext(function($ctx2) {
  1380. return _st(_st(each)._superclass()).__eq(aClass);
  1381. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  1382. return $1;
  1383. }, function($ctx1) {$ctx1.fill(self,"getChildrenOf:",{aClass:aClass},globals.HLClassesListWidget)})},
  1384. args: ["aClass"],
  1385. source: "getChildrenOf: aClass\x0a\x09^ self items select: [ :each | each superclass = aClass ]",
  1386. messageSends: ["select:", "items", "=", "superclass"],
  1387. referencedClasses: []
  1388. }),
  1389. globals.HLClassesListWidget);
  1390. smalltalk.addMethod(
  1391. smalltalk.method({
  1392. selector: "getRootClassesOf:",
  1393. protocol: 'accessing',
  1394. fn: function (aCollection){
  1395. var self=this;
  1396. return smalltalk.withContext(function($ctx1) {
  1397. var $1;
  1398. $1=_st(aCollection)._select_((function(each){
  1399. return smalltalk.withContext(function($ctx2) {
  1400. return _st(_st(aCollection)._includes_(_st(each)._superclass()))._not();
  1401. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  1402. return $1;
  1403. }, function($ctx1) {$ctx1.fill(self,"getRootClassesOf:",{aCollection:aCollection},globals.HLClassesListWidget)})},
  1404. args: ["aCollection"],
  1405. source: "getRootClassesOf: aCollection\x0a\x09^ aCollection select: [ :each |\x0a \x09\x09(aCollection includes: each superclass) not ]",
  1406. messageSends: ["select:", "not", "includes:", "superclass"],
  1407. referencedClasses: []
  1408. }),
  1409. globals.HLClassesListWidget);
  1410. smalltalk.addMethod(
  1411. smalltalk.method({
  1412. selector: "label",
  1413. protocol: 'accessing',
  1414. fn: function (){
  1415. var self=this;
  1416. return "Classes";
  1417. },
  1418. args: [],
  1419. source: "label\x0a\x09^ 'Classes'",
  1420. messageSends: [],
  1421. referencedClasses: []
  1422. }),
  1423. globals.HLClassesListWidget);
  1424. smalltalk.addMethod(
  1425. smalltalk.method({
  1426. selector: "observeModel",
  1427. protocol: 'actions',
  1428. fn: function (){
  1429. var self=this;
  1430. function $HLPackageSelected(){return globals.HLPackageSelected||(typeof HLPackageSelected=="undefined"?nil:HLPackageSelected)}
  1431. function $HLShowInstanceToggled(){return globals.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  1432. function $HLShowCommentToggled(){return globals.HLShowCommentToggled||(typeof HLShowCommentToggled=="undefined"?nil:HLShowCommentToggled)}
  1433. function $HLClassSelected(){return globals.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  1434. function $HLClassesFocusRequested(){return globals.HLClassesFocusRequested||(typeof HLClassesFocusRequested=="undefined"?nil:HLClassesFocusRequested)}
  1435. return smalltalk.withContext(function($ctx1) {
  1436. var $1,$2;
  1437. $1=_st(self._model())._announcer();
  1438. _st($1)._on_send_to_($HLPackageSelected(),"onPackageSelected:",self);
  1439. $ctx1.sendIdx["on:send:to:"]=1;
  1440. _st($1)._on_send_to_($HLShowInstanceToggled(),"onShowInstanceToggled",self);
  1441. $ctx1.sendIdx["on:send:to:"]=2;
  1442. _st($1)._on_send_to_($HLShowCommentToggled(),"onShowCommentToggled",self);
  1443. $ctx1.sendIdx["on:send:to:"]=3;
  1444. _st($1)._on_send_to_($HLClassSelected(),"onClassSelected:",self);
  1445. $ctx1.sendIdx["on:send:to:"]=4;
  1446. $2=_st($1)._on_send_to_($HLClassesFocusRequested(),"onClassesFocusRequested",self);
  1447. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},globals.HLClassesListWidget)})},
  1448. args: [],
  1449. source: "observeModel\x0a\x09self model announcer \x0a \x09on: HLPackageSelected\x0a\x09\x09send: #onPackageSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a \x09on: HLShowInstanceToggled \x0a\x09\x09send: #onShowInstanceToggled\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLShowCommentToggled\x0a\x09\x09send: #onShowCommentToggled\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLClassSelected\x0a\x09\x09send: #onClassSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLClassesFocusRequested\x0a\x09\x09send: #onClassesFocusRequested\x0a\x09\x09to: self",
  1450. messageSends: ["on:send:to:", "announcer", "model"],
  1451. referencedClasses: ["HLPackageSelected", "HLShowInstanceToggled", "HLShowCommentToggled", "HLClassSelected", "HLClassesFocusRequested"]
  1452. }),
  1453. globals.HLClassesListWidget);
  1454. smalltalk.addMethod(
  1455. smalltalk.method({
  1456. selector: "observeSystem",
  1457. protocol: 'actions',
  1458. fn: function (){
  1459. var self=this;
  1460. function $ClassAdded(){return globals.ClassAdded||(typeof ClassAdded=="undefined"?nil:ClassAdded)}
  1461. function $ClassRemoved(){return globals.ClassRemoved||(typeof ClassRemoved=="undefined"?nil:ClassRemoved)}
  1462. function $ClassMoved(){return globals.ClassMoved||(typeof ClassMoved=="undefined"?nil:ClassMoved)}
  1463. function $ClassRenamed(){return globals.ClassRenamed||(typeof ClassRenamed=="undefined"?nil:ClassRenamed)}
  1464. function $ClassMigrated(){return globals.ClassMigrated||(typeof ClassMigrated=="undefined"?nil:ClassMigrated)}
  1465. function $ClassCommentChanged(){return globals.ClassCommentChanged||(typeof ClassCommentChanged=="undefined"?nil:ClassCommentChanged)}
  1466. return smalltalk.withContext(function($ctx1) {
  1467. var $1,$2;
  1468. $1=_st(self._model())._systemAnnouncer();
  1469. _st($1)._on_send_to_($ClassAdded(),"onClassAdded:",self);
  1470. $ctx1.sendIdx["on:send:to:"]=1;
  1471. _st($1)._on_send_to_($ClassRemoved(),"onClassRemoved:",self);
  1472. $ctx1.sendIdx["on:send:to:"]=2;
  1473. _st($1)._on_send_to_($ClassMoved(),"onClassMoved:",self);
  1474. $ctx1.sendIdx["on:send:to:"]=3;
  1475. _st($1)._on_send_to_($ClassRenamed(),"onClassRenamed:",self);
  1476. $ctx1.sendIdx["on:send:to:"]=4;
  1477. _st($1)._on_send_to_($ClassMigrated(),"onClassMigrated:",self);
  1478. $ctx1.sendIdx["on:send:to:"]=5;
  1479. $2=_st($1)._on_send_to_($ClassCommentChanged(),"onClassCommentChanged:",self);
  1480. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},globals.HLClassesListWidget)})},
  1481. args: [],
  1482. source: "observeSystem\x0a\x09self model systemAnnouncer\x0a \x09on: ClassAdded\x0a\x09\x09send: #onClassAdded:\x0a\x09\x09to: self;\x0a\x09\x09\x0a on: ClassRemoved\x0a send: #onClassRemoved:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: ClassMoved\x0a\x09\x09send: #onClassMoved:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: ClassRenamed\x0a\x09\x09send: #onClassRenamed:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: ClassMigrated\x0a\x09\x09send: #onClassMigrated:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: ClassCommentChanged\x0a send: #onClassCommentChanged:\x0a\x09\x09to: self",
  1483. messageSends: ["on:send:to:", "systemAnnouncer", "model"],
  1484. referencedClasses: ["ClassAdded", "ClassRemoved", "ClassMoved", "ClassRenamed", "ClassMigrated", "ClassCommentChanged"]
  1485. }),
  1486. globals.HLClassesListWidget);
  1487. smalltalk.addMethod(
  1488. smalltalk.method({
  1489. selector: "onClassAdded:",
  1490. protocol: 'reactions',
  1491. fn: function (anAnnouncement){
  1492. var self=this;
  1493. var class_;
  1494. return smalltalk.withContext(function($ctx1) {
  1495. var $1,$2;
  1496. class_=_st(anAnnouncement)._theClass();
  1497. $1=_st(_st(_st(class_)._package()).__eq(_st(self._model())._selectedPackage()))._or_((function(){
  1498. return smalltalk.withContext(function($ctx2) {
  1499. return _st(self._items())._includes_(class_);
  1500. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1501. if(! smalltalk.assert($1)){
  1502. return self;
  1503. };
  1504. self._setItemsForSelectedPackage();
  1505. self._refresh();
  1506. $2=self._focus();
  1507. return self}, function($ctx1) {$ctx1.fill(self,"onClassAdded:",{anAnnouncement:anAnnouncement,class_:class_},globals.HLClassesListWidget)})},
  1508. args: ["anAnnouncement"],
  1509. source: "onClassAdded: anAnnouncement\x0a\x09| class |\x0a\x09\x0a\x09class := anAnnouncement theClass.\x0a\x09\x0a\x09(class package = self model selectedPackage or: [\x0a\x09\x09self items includes: class ]) ifFalse: [ ^ self ].\x0a \x0a self \x0a\x09\x09setItemsForSelectedPackage;\x0a\x09\x09refresh;\x0a\x09\x09focus",
  1510. messageSends: ["theClass", "ifFalse:", "or:", "=", "package", "selectedPackage", "model", "includes:", "items", "setItemsForSelectedPackage", "refresh", "focus"],
  1511. referencedClasses: []
  1512. }),
  1513. globals.HLClassesListWidget);
  1514. smalltalk.addMethod(
  1515. smalltalk.method({
  1516. selector: "onClassCommentChanged:",
  1517. protocol: 'reactions',
  1518. fn: function (anAnnouncement){
  1519. var self=this;
  1520. var class_;
  1521. return smalltalk.withContext(function($ctx1) {
  1522. var $1,$2;
  1523. class_=_st(anAnnouncement)._theClass();
  1524. $1=_st(_st(class_)._package()).__eq(_st(self._model())._selectedPackage());
  1525. if(! smalltalk.assert($1)){
  1526. return self;
  1527. };
  1528. self._refresh();
  1529. $2=self._focus();
  1530. return self}, function($ctx1) {$ctx1.fill(self,"onClassCommentChanged:",{anAnnouncement:anAnnouncement,class_:class_},globals.HLClassesListWidget)})},
  1531. args: ["anAnnouncement"],
  1532. source: "onClassCommentChanged: anAnnouncement\x0a\x09| class |\x0a\x09class := anAnnouncement theClass.\x0a\x0a\x09class package = self model selectedPackage ifFalse: [ ^ self ].\x0a \x0a self \x0a\x09\x09refresh;\x0a\x09\x09focus",
  1533. messageSends: ["theClass", "ifFalse:", "=", "package", "selectedPackage", "model", "refresh", "focus"],
  1534. referencedClasses: []
  1535. }),
  1536. globals.HLClassesListWidget);
  1537. smalltalk.addMethod(
  1538. smalltalk.method({
  1539. selector: "onClassMigrated:",
  1540. protocol: 'reactions',
  1541. fn: function (anAnnouncement){
  1542. var self=this;
  1543. var class_,oldClass;
  1544. return smalltalk.withContext(function($ctx1) {
  1545. var $1,$4,$3,$2,$5;
  1546. class_=_st(anAnnouncement)._theClass();
  1547. oldClass=_st(anAnnouncement)._oldClass();
  1548. $1=_st(self._items())._includes_(oldClass);
  1549. if(! smalltalk.assert($1)){
  1550. return self;
  1551. };
  1552. $4=self._model();
  1553. $ctx1.sendIdx["model"]=1;
  1554. $3=_st($4)._selectedClass();
  1555. $2=_st($3).__eq(oldClass);
  1556. if(smalltalk.assert($2)){
  1557. _st(self._model())._selectedClass_(class_);
  1558. };
  1559. self._setItemsForSelectedPackage();
  1560. self._refresh();
  1561. $5=self._focus();
  1562. return self}, function($ctx1) {$ctx1.fill(self,"onClassMigrated:",{anAnnouncement:anAnnouncement,class_:class_,oldClass:oldClass},globals.HLClassesListWidget)})},
  1563. args: ["anAnnouncement"],
  1564. source: "onClassMigrated: anAnnouncement\x0a\x09| class oldClass |\x0a\x09\x0a\x09class := anAnnouncement theClass.\x0a\x09oldClass := anAnnouncement oldClass.\x0a\x0a\x09(self items includes: oldClass) ifFalse: [ ^ self ].\x0a\x0a\x09self model selectedClass = oldClass ifTrue: [\x0a\x09\x09self model selectedClass: class ].\x0a \x0a self setItemsForSelectedPackage.\x0a self \x0a\x09\x09refresh;\x0a\x09\x09focus",
  1565. messageSends: ["theClass", "oldClass", "ifFalse:", "includes:", "items", "ifTrue:", "=", "selectedClass", "model", "selectedClass:", "setItemsForSelectedPackage", "refresh", "focus"],
  1566. referencedClasses: []
  1567. }),
  1568. globals.HLClassesListWidget);
  1569. smalltalk.addMethod(
  1570. smalltalk.method({
  1571. selector: "onClassMoved:",
  1572. protocol: 'reactions',
  1573. fn: function (anAnnouncement){
  1574. var self=this;
  1575. var class_,oldPackage;
  1576. return smalltalk.withContext(function($ctx1) {
  1577. var $3,$5,$4,$2,$6,$8,$7,$1,$9,$10,$11;
  1578. class_=_st(anAnnouncement)._theClass();
  1579. oldPackage=_st(anAnnouncement)._oldPackage();
  1580. $3=oldPackage;
  1581. $5=self._model();
  1582. $ctx1.sendIdx["model"]=1;
  1583. $4=_st($5)._selectedPackage();
  1584. $ctx1.sendIdx["selectedPackage"]=1;
  1585. $2=_st($3).__eq($4);
  1586. $ctx1.sendIdx["="]=1;
  1587. $1=_st($2)._or_((function(){
  1588. return smalltalk.withContext(function($ctx2) {
  1589. $6=_st(class_)._package();
  1590. $8=self._model();
  1591. $ctx2.sendIdx["model"]=2;
  1592. $7=_st($8)._selectedPackage();
  1593. $ctx2.sendIdx["selectedPackage"]=2;
  1594. return _st($6).__eq($7);
  1595. $ctx2.sendIdx["="]=2;
  1596. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1597. if(! smalltalk.assert($1)){
  1598. return self;
  1599. };
  1600. $9=_st(oldPackage).__eq(_st(self._model())._selectedPackage());
  1601. if(smalltalk.assert($9)){
  1602. self._selectedItem_(nil);
  1603. $10=self._selectItem_(nil);
  1604. $10;
  1605. };
  1606. self._setItemsForSelectedPackage();
  1607. self._refresh();
  1608. $11=self._focus();
  1609. return self}, function($ctx1) {$ctx1.fill(self,"onClassMoved:",{anAnnouncement:anAnnouncement,class_:class_,oldPackage:oldPackage},globals.HLClassesListWidget)})},
  1610. args: ["anAnnouncement"],
  1611. source: "onClassMoved: anAnnouncement\x0a\x09| class oldPackage |\x0a\x09\x0a\x09class := anAnnouncement theClass.\x0a\x09oldPackage := anAnnouncement oldPackage.\x0a\x09\x0a\x09(oldPackage = self model selectedPackage or: [\x0a\x09\x09class package = self model selectedPackage ])\x0a\x09\x09\x09ifFalse: [ ^ self ].\x0a\x09\x0a\x09oldPackage = self model selectedPackage ifTrue: [ \x0a\x09\x09self \x0a\x09\x09\x09selectedItem: nil;\x0a\x09\x09\x09selectItem: nil ].\x0a \x0a self setItemsForSelectedPackage.\x0a self \x09\x0a\x09\x09refresh;\x0a\x09\x09focus",
  1612. messageSends: ["theClass", "oldPackage", "ifFalse:", "or:", "=", "selectedPackage", "model", "package", "ifTrue:", "selectedItem:", "selectItem:", "setItemsForSelectedPackage", "refresh", "focus"],
  1613. referencedClasses: []
  1614. }),
  1615. globals.HLClassesListWidget);
  1616. smalltalk.addMethod(
  1617. smalltalk.method({
  1618. selector: "onClassRemoved:",
  1619. protocol: 'reactions',
  1620. fn: function (anAnnouncement){
  1621. var self=this;
  1622. var class_;
  1623. return smalltalk.withContext(function($ctx1) {
  1624. var $1,$2,$3;
  1625. class_=_st(anAnnouncement)._theClass();
  1626. $1=_st(_st(class_)._package()).__eq(_st(self._model())._selectedPackage());
  1627. if(! smalltalk.assert($1)){
  1628. return self;
  1629. };
  1630. self._selectItem_(nil);
  1631. $2=self._selectedItem_(nil);
  1632. self._setItemsForSelectedPackage();
  1633. self._refresh();
  1634. $3=self._focus();
  1635. return self}, function($ctx1) {$ctx1.fill(self,"onClassRemoved:",{anAnnouncement:anAnnouncement,class_:class_},globals.HLClassesListWidget)})},
  1636. args: ["anAnnouncement"],
  1637. source: "onClassRemoved: anAnnouncement\x0a\x09| class |\x0a\x09class := anAnnouncement theClass.\x0a\x0a\x09class package = self model selectedPackage ifFalse: [ ^ self ].\x0a \x0a\x09self \x0a\x09\x09selectItem: nil;\x0a\x09\x09selectedItem: nil.\x0a self setItemsForSelectedPackage.\x0a self \x0a\x09\x09refresh;\x0a\x09\x09focus",
  1638. messageSends: ["theClass", "ifFalse:", "=", "package", "selectedPackage", "model", "selectItem:", "selectedItem:", "setItemsForSelectedPackage", "refresh", "focus"],
  1639. referencedClasses: []
  1640. }),
  1641. globals.HLClassesListWidget);
  1642. smalltalk.addMethod(
  1643. smalltalk.method({
  1644. selector: "onClassRenamed:",
  1645. protocol: 'reactions',
  1646. fn: function (anAnnouncement){
  1647. var self=this;
  1648. return smalltalk.withContext(function($ctx1) {
  1649. var $1,$2;
  1650. $1=_st(_st(_st(anAnnouncement)._theClass())._package()).__eq(_st(self._model())._selectedPackage());
  1651. if(! smalltalk.assert($1)){
  1652. return self;
  1653. };
  1654. self._setItemsForSelectedPackage();
  1655. self._refresh();
  1656. $2=self._focus();
  1657. return self}, function($ctx1) {$ctx1.fill(self,"onClassRenamed:",{anAnnouncement:anAnnouncement},globals.HLClassesListWidget)})},
  1658. args: ["anAnnouncement"],
  1659. source: "onClassRenamed: anAnnouncement\x0a\x09anAnnouncement theClass package = self model selectedPackage ifFalse: [ ^ self ].\x0a \x0a self setItemsForSelectedPackage.\x0a self \x0a\x09\x09refresh;\x0a\x09\x09focus",
  1660. messageSends: ["ifFalse:", "=", "package", "theClass", "selectedPackage", "model", "setItemsForSelectedPackage", "refresh", "focus"],
  1661. referencedClasses: []
  1662. }),
  1663. globals.HLClassesListWidget);
  1664. smalltalk.addMethod(
  1665. smalltalk.method({
  1666. selector: "onClassSelected:",
  1667. protocol: 'reactions',
  1668. fn: function (anAnnouncement){
  1669. var self=this;
  1670. var selectedClass;
  1671. return smalltalk.withContext(function($ctx1) {
  1672. var $1,$2,$3,$receiver;
  1673. $1=_st(anAnnouncement)._item();
  1674. $ctx1.sendIdx["item"]=1;
  1675. if(($receiver = $1) == null || $receiver.isNil){
  1676. return self;
  1677. } else {
  1678. $1;
  1679. };
  1680. selectedClass=_st(_st(anAnnouncement)._item())._theNonMetaClass();
  1681. self._selectedItem_(selectedClass);
  1682. $2=self._hasFocus();
  1683. if(! smalltalk.assert($2)){
  1684. self._activateItem_(selectedClass);
  1685. $3=self._focus();
  1686. $3;
  1687. };
  1688. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncement:anAnnouncement,selectedClass:selectedClass},globals.HLClassesListWidget)})},
  1689. args: ["anAnnouncement"],
  1690. source: "onClassSelected: anAnnouncement\x0a\x09| selectedClass |\x0a\x09\x0a\x09anAnnouncement item ifNil: [ ^ self ].\x0a\x09\x0a\x09selectedClass := anAnnouncement item theNonMetaClass.\x0a\x09self selectedItem: selectedClass.\x0a\x0a\x09self hasFocus ifFalse: [\x0a\x09\x09self \x0a\x09\x09\x09activateItem: selectedClass;\x0a\x09\x09\x09focus ]",
  1691. messageSends: ["ifNil:", "item", "theNonMetaClass", "selectedItem:", "ifFalse:", "hasFocus", "activateItem:", "focus"],
  1692. referencedClasses: []
  1693. }),
  1694. globals.HLClassesListWidget);
  1695. smalltalk.addMethod(
  1696. smalltalk.method({
  1697. selector: "onClassesFocusRequested",
  1698. protocol: 'reactions',
  1699. fn: function (){
  1700. var self=this;
  1701. return smalltalk.withContext(function($ctx1) {
  1702. self._focus();
  1703. return self}, function($ctx1) {$ctx1.fill(self,"onClassesFocusRequested",{},globals.HLClassesListWidget)})},
  1704. args: [],
  1705. source: "onClassesFocusRequested\x0a\x09self focus",
  1706. messageSends: ["focus"],
  1707. referencedClasses: []
  1708. }),
  1709. globals.HLClassesListWidget);
  1710. smalltalk.addMethod(
  1711. smalltalk.method({
  1712. selector: "onPackageSelected:",
  1713. protocol: 'reactions',
  1714. fn: function (anAnnouncement){
  1715. var self=this;
  1716. return smalltalk.withContext(function($ctx1) {
  1717. self._selectedItem_(nil);
  1718. self._setItemsForSelectedPackage();
  1719. self._refresh();
  1720. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{anAnnouncement:anAnnouncement},globals.HLClassesListWidget)})},
  1721. args: ["anAnnouncement"],
  1722. source: "onPackageSelected: anAnnouncement\x0a self selectedItem: nil.\x0a \x0a self setItemsForSelectedPackage.\x0a self refresh",
  1723. messageSends: ["selectedItem:", "setItemsForSelectedPackage", "refresh"],
  1724. referencedClasses: []
  1725. }),
  1726. globals.HLClassesListWidget);
  1727. smalltalk.addMethod(
  1728. smalltalk.method({
  1729. selector: "onShowCommentToggled",
  1730. protocol: 'reactions',
  1731. fn: function (){
  1732. var self=this;
  1733. return smalltalk.withContext(function($ctx1) {
  1734. self._refresh();
  1735. return self}, function($ctx1) {$ctx1.fill(self,"onShowCommentToggled",{},globals.HLClassesListWidget)})},
  1736. args: [],
  1737. source: "onShowCommentToggled\x0a\x09self refresh",
  1738. messageSends: ["refresh"],
  1739. referencedClasses: []
  1740. }),
  1741. globals.HLClassesListWidget);
  1742. smalltalk.addMethod(
  1743. smalltalk.method({
  1744. selector: "onShowInstanceToggled",
  1745. protocol: 'reactions',
  1746. fn: function (){
  1747. var self=this;
  1748. return smalltalk.withContext(function($ctx1) {
  1749. self._refresh();
  1750. return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{},globals.HLClassesListWidget)})},
  1751. args: [],
  1752. source: "onShowInstanceToggled\x0a\x09self refresh",
  1753. messageSends: ["refresh"],
  1754. referencedClasses: []
  1755. }),
  1756. globals.HLClassesListWidget);
  1757. smalltalk.addMethod(
  1758. smalltalk.method({
  1759. selector: "renderButtonsOn:",
  1760. protocol: 'rendering',
  1761. fn: function (html){
  1762. var self=this;
  1763. var checkbox;
  1764. function $String(){return globals.String||(typeof String=="undefined"?nil:String)}
  1765. return smalltalk.withContext(function($ctx1) {
  1766. var $1,$3,$4,$6,$5,$7,$8,$9,$10,$2,$11,$13,$14,$12,$15;
  1767. $1=_st(html)._div();
  1768. _st($1)._class_("btn-group");
  1769. $ctx1.sendIdx["class:"]=1;
  1770. $2=_st($1)._with_((function(){
  1771. return smalltalk.withContext(function($ctx2) {
  1772. $3=_st(html)._button();
  1773. $ctx2.sendIdx["button"]=1;
  1774. $4=$3;
  1775. $5=_st($String())._streamContents_((function(str){
  1776. return smalltalk.withContext(function($ctx3) {
  1777. _st(str)._nextPutAll_("btn");
  1778. $ctx3.sendIdx["nextPutAll:"]=1;
  1779. $6=self._showInstance();
  1780. if(smalltalk.assert($6)){
  1781. return _st(str)._nextPutAll_(" active");
  1782. $ctx3.sendIdx["nextPutAll:"]=2;
  1783. };
  1784. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx2,2)})}));
  1785. $ctx2.sendIdx["streamContents:"]=1;
  1786. _st($4)._class_($5);
  1787. $ctx2.sendIdx["class:"]=2;
  1788. _st($3)._with_("Instance");
  1789. $ctx2.sendIdx["with:"]=2;
  1790. $7=_st($3)._onClick_((function(){
  1791. return smalltalk.withContext(function($ctx3) {
  1792. return self._showInstance_(true);
  1793. $ctx3.sendIdx["showInstance:"]=1;
  1794. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  1795. $ctx2.sendIdx["onClick:"]=1;
  1796. $7;
  1797. $8=_st(html)._button();
  1798. _st($8)._class_(_st($String())._streamContents_((function(str){
  1799. return smalltalk.withContext(function($ctx3) {
  1800. _st(str)._nextPutAll_("btn");
  1801. $ctx3.sendIdx["nextPutAll:"]=3;
  1802. $9=self._showClass();
  1803. if(smalltalk.assert($9)){
  1804. return _st(str)._nextPutAll_(" active");
  1805. };
  1806. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx2,5)})})));
  1807. $ctx2.sendIdx["class:"]=3;
  1808. _st($8)._with_("Class");
  1809. $ctx2.sendIdx["with:"]=3;
  1810. $10=_st($8)._onClick_((function(){
  1811. return smalltalk.withContext(function($ctx3) {
  1812. return self._showInstance_(false);
  1813. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)})}));
  1814. $ctx2.sendIdx["onClick:"]=2;
  1815. return $10;
  1816. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1817. $ctx1.sendIdx["with:"]=1;
  1818. $11=_st(html)._label();
  1819. _st($11)._class_("checkbox");
  1820. $12=_st($11)._with_((function(){
  1821. return smalltalk.withContext(function($ctx2) {
  1822. $13=_st(html)._input();
  1823. _st($13)._type_("checkbox");
  1824. $14=_st($13)._onClick_((function(){
  1825. return smalltalk.withContext(function($ctx3) {
  1826. return self._toggleShowComment();
  1827. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)})}));
  1828. checkbox=$14;
  1829. checkbox;
  1830. return _st(html)._with_("Doc");
  1831. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,8)})}));
  1832. $ctx1.sendIdx["with:"]=4;
  1833. $15=self._showComment();
  1834. if(smalltalk.assert($15)){
  1835. _st(checkbox)._at_put_("checked","checked");
  1836. };
  1837. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,checkbox:checkbox},globals.HLClassesListWidget)})},
  1838. args: ["html"],
  1839. source: "renderButtonsOn: html\x0a\x09| checkbox |\x0a\x09\x0a\x09html div \x0a class: 'btn-group';\x0a\x09\x09with: [ \x0a \x09html button \x0a class: (String streamContents: [ :str |\x0a \x09str nextPutAll: 'btn'.\x0a self showInstance ifTrue: [ \x0a \x09str nextPutAll: ' active' ] ]);\x0a \x09\x09\x09\x09with: 'Instance';\x0a onClick: [ self showInstance: true ].\x0a \x09\x09\x09html button\x0a \x09\x09\x09\x09class: (String streamContents: [ :str |\x0a \x09str nextPutAll: 'btn'.\x0a self showClass ifTrue: [ \x0a \x09str nextPutAll: ' active' ] ]);\x0a \x09\x09\x09\x09with: 'Class';\x0a\x09\x09\x09\x09onClick: [ self showInstance: false ] ].\x0a\x09\x09html label \x0a\x09\x09\x09class: 'checkbox';\x0a\x09\x09\x09with: [\x0a\x09\x09\x09\x09checkbox := html input\x0a\x09\x09\x09\x09\x09type: 'checkbox';\x0a\x09\x09\x09\x09\x09onClick: [ self toggleShowComment ].\x0a\x09\x09\x09\x09html with: 'Doc' ].\x0a\x09\x09\x09\x09\x0a\x09\x09self showComment ifTrue: [\x0a\x09\x09\x09checkbox at: 'checked' put: 'checked' ]",
  1840. messageSends: ["class:", "div", "with:", "button", "streamContents:", "nextPutAll:", "ifTrue:", "showInstance", "onClick:", "showInstance:", "showClass", "label", "type:", "input", "toggleShowComment", "showComment", "at:put:"],
  1841. referencedClasses: ["String"]
  1842. }),
  1843. globals.HLClassesListWidget);
  1844. smalltalk.addMethod(
  1845. smalltalk.method({
  1846. selector: "renderItem:level:on:",
  1847. protocol: 'rendering',
  1848. fn: function (aClass,anInteger,html){
  1849. var self=this;
  1850. var li;
  1851. return smalltalk.withContext(function($ctx1) {
  1852. var $1,$2,$4,$5,$3;
  1853. li=_st(html)._li();
  1854. $1=_st(li)._asJQuery();
  1855. $ctx1.sendIdx["asJQuery"]=1;
  1856. _st($1)._data_put_("item",aClass);
  1857. $2=li;
  1858. _st($2)._class_(self._listCssClassForItem_(aClass));
  1859. $ctx1.sendIdx["class:"]=1;
  1860. $3=_st($2)._with_((function(){
  1861. return smalltalk.withContext(function($ctx2) {
  1862. $4=_st(html)._a();
  1863. _st($4)._with_((function(){
  1864. return smalltalk.withContext(function($ctx3) {
  1865. _st(_st(html)._tag_("i"))._class_(self._cssClassForItem_(aClass));
  1866. return self._renderItemLabel_level_on_(aClass,anInteger,html);
  1867. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  1868. $5=_st($4)._onClick_((function(){
  1869. return smalltalk.withContext(function($ctx3) {
  1870. return self._reactivateListItem_(_st(li)._asJQuery());
  1871. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1872. return $5;
  1873. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1874. $ctx1.sendIdx["with:"]=1;
  1875. _st(self._getChildrenOf_(aClass))._do_((function(each){
  1876. return smalltalk.withContext(function($ctx2) {
  1877. return self._renderItem_level_on_(each,_st(anInteger).__plus((1)),html);
  1878. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
  1879. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:level:on:",{aClass:aClass,anInteger:anInteger,html:html,li:li},globals.HLClassesListWidget)})},
  1880. args: ["aClass", "anInteger", "html"],
  1881. source: "renderItem: aClass level: anInteger on: html\x0a\x09| li |\x0a \x0a\x09li := html li.\x0a\x09li asJQuery data: 'item' put: aClass.\x0a li\x0a\x09\x09class: (self listCssClassForItem: aClass);\x0a\x09\x09with: [ \x0a \x09html a\x0a \x09with: [ \x0a \x09\x09(html tag: 'i') class: (self cssClassForItem: aClass).\x0a \x09\x09\x09\x09\x09self renderItemLabel: aClass level: anInteger on: html ];\x0a\x09\x09\x09\x09onClick: [\x0a \x09self reactivateListItem: li asJQuery ] ].\x0a \x0a (self getChildrenOf: aClass) do: [ :each |\x0a \x09self renderItem: each level: anInteger + 1 on: html ]",
  1882. messageSends: ["li", "data:put:", "asJQuery", "class:", "listCssClassForItem:", "with:", "a", "tag:", "cssClassForItem:", "renderItemLabel:level:on:", "onClick:", "reactivateListItem:", "do:", "getChildrenOf:", "renderItem:level:on:", "+"],
  1883. referencedClasses: []
  1884. }),
  1885. globals.HLClassesListWidget);
  1886. smalltalk.addMethod(
  1887. smalltalk.method({
  1888. selector: "renderItem:on:",
  1889. protocol: 'rendering',
  1890. fn: function (aClass,html){
  1891. var self=this;
  1892. return smalltalk.withContext(function($ctx1) {
  1893. ($ctx1.supercall = true, globals.HLClassesListWidget.superclass.fn.prototype._renderItem_on_.apply(_st(self), [aClass,html]));
  1894. $ctx1.supercall = false;
  1895. _st(self._getChildrenOf_(aClass))._do_((function(each){
  1896. return smalltalk.withContext(function($ctx2) {
  1897. return self._renderItem_level_on_(each,(1),html);
  1898. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  1899. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{aClass:aClass,html:html},globals.HLClassesListWidget)})},
  1900. args: ["aClass", "html"],
  1901. source: "renderItem: aClass on: html\x0a\x09super renderItem: aClass on: html.\x0a (self getChildrenOf: aClass) do: [ :each |\x0a \x09self renderItem: each level: 1 on: html ]",
  1902. messageSends: ["renderItem:on:", "do:", "getChildrenOf:", "renderItem:level:on:"],
  1903. referencedClasses: []
  1904. }),
  1905. globals.HLClassesListWidget);
  1906. smalltalk.addMethod(
  1907. smalltalk.method({
  1908. selector: "renderItemLabel:level:on:",
  1909. protocol: 'rendering',
  1910. fn: function (aClass,anInteger,html){
  1911. var self=this;
  1912. function $String(){return globals.String||(typeof String=="undefined"?nil:String)}
  1913. return smalltalk.withContext(function($ctx1) {
  1914. _st(_st(_st(html)._span())._asJQuery())._html_(_st($String())._streamContents_((function(str){
  1915. return smalltalk.withContext(function($ctx2) {
  1916. _st(anInteger)._timesRepeat_((function(){
  1917. return smalltalk.withContext(function($ctx3) {
  1918. return _st(str)._nextPutAll_("    ");
  1919. $ctx3.sendIdx["nextPutAll:"]=1;
  1920. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  1921. return _st(str)._nextPutAll_(_st(aClass)._name());
  1922. }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1,1)})})));
  1923. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:level:on:",{aClass:aClass,anInteger:anInteger,html:html},globals.HLClassesListWidget)})},
  1924. args: ["aClass", "anInteger", "html"],
  1925. source: "renderItemLabel: aClass level: anInteger on: html\x0a\x09html span asJQuery html: (String streamContents: [ :str |\x0a\x09\x09anInteger timesRepeat: [\x0a\x09\x09\x09str nextPutAll: '    ' ].\x0a\x09\x09\x09str nextPutAll: aClass name ])",
  1926. messageSends: ["html:", "asJQuery", "span", "streamContents:", "timesRepeat:", "nextPutAll:", "name"],
  1927. referencedClasses: ["String"]
  1928. }),
  1929. globals.HLClassesListWidget);
  1930. smalltalk.addMethod(
  1931. smalltalk.method({
  1932. selector: "renderItemLabel:on:",
  1933. protocol: 'rendering',
  1934. fn: function (aClass,html){
  1935. var self=this;
  1936. return smalltalk.withContext(function($ctx1) {
  1937. self._renderItemLabel_level_on_(aClass,(0),html);
  1938. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aClass:aClass,html:html},globals.HLClassesListWidget)})},
  1939. args: ["aClass", "html"],
  1940. source: "renderItemLabel: aClass on: html\x0a\x09self renderItemLabel: aClass level: 0 on: html",
  1941. messageSends: ["renderItemLabel:level:on:"],
  1942. referencedClasses: []
  1943. }),
  1944. globals.HLClassesListWidget);
  1945. smalltalk.addMethod(
  1946. smalltalk.method({
  1947. selector: "renderListOn:",
  1948. protocol: 'rendering',
  1949. fn: function (html){
  1950. var self=this;
  1951. return smalltalk.withContext(function($ctx1) {
  1952. _st(self._getRootClassesOf_(self._items()))._do_((function(each){
  1953. return smalltalk.withContext(function($ctx2) {
  1954. return self._renderItem_on_(each,html);
  1955. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  1956. return self}, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html},globals.HLClassesListWidget)})},
  1957. args: ["html"],
  1958. source: "renderListOn: html\x0a\x09(self getRootClassesOf: self items)\x0a \x09do: [ :each | self renderItem: each on: html ]",
  1959. messageSends: ["do:", "getRootClassesOf:", "items", "renderItem:on:"],
  1960. referencedClasses: []
  1961. }),
  1962. globals.HLClassesListWidget);
  1963. smalltalk.addMethod(
  1964. smalltalk.method({
  1965. selector: "reselectItem:",
  1966. protocol: 'actions',
  1967. fn: function (anItem){
  1968. var self=this;
  1969. return smalltalk.withContext(function($ctx1) {
  1970. _st(self._model())._forceSelectedClass_(anItem);
  1971. return self}, function($ctx1) {$ctx1.fill(self,"reselectItem:",{anItem:anItem},globals.HLClassesListWidget)})},
  1972. args: ["anItem"],
  1973. source: "reselectItem: anItem\x0a\x09self model forceSelectedClass: anItem",
  1974. messageSends: ["forceSelectedClass:", "model"],
  1975. referencedClasses: []
  1976. }),
  1977. globals.HLClassesListWidget);
  1978. smalltalk.addMethod(
  1979. smalltalk.method({
  1980. selector: "selectItem:",
  1981. protocol: 'actions',
  1982. fn: function (aClass){
  1983. var self=this;
  1984. return smalltalk.withContext(function($ctx1) {
  1985. _st(self._model())._selectedClass_(aClass);
  1986. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aClass:aClass},globals.HLClassesListWidget)})},
  1987. args: ["aClass"],
  1988. source: "selectItem: aClass\x0a self model selectedClass: aClass",
  1989. messageSends: ["selectedClass:", "model"],
  1990. referencedClasses: []
  1991. }),
  1992. globals.HLClassesListWidget);
  1993. smalltalk.addMethod(
  1994. smalltalk.method({
  1995. selector: "setItemsForPackage:",
  1996. protocol: 'private',
  1997. fn: function (aPackage){
  1998. var self=this;
  1999. return smalltalk.withContext(function($ctx1) {
  2000. var $2,$1,$receiver;
  2001. if(($receiver = aPackage) == null || $receiver.isNil){
  2002. $1=[];
  2003. } else {
  2004. $1=_st(_st(_st(aPackage)._classes())._collect_((function(each){
  2005. return smalltalk.withContext(function($ctx2) {
  2006. return _st(each)._theNonMetaClass();
  2007. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})})))._sort_((function(a,b){
  2008. return smalltalk.withContext(function($ctx2) {
  2009. $2=_st(a)._name();
  2010. $ctx2.sendIdx["name"]=1;
  2011. return _st($2).__lt(_st(b)._name());
  2012. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,4)})}));
  2013. };
  2014. self._items_($1);
  2015. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForPackage:",{aPackage:aPackage},globals.HLClassesListWidget)})},
  2016. args: ["aPackage"],
  2017. source: "setItemsForPackage: aPackage\x0a\x09self items: (aPackage \x0a \x09ifNil: [ #() ]\x0a \x09\x09ifNotNil: [ (aPackage classes \x0a \x09collect: [ :each | each theNonMetaClass ]) \x0a \x09sort: [ :a :b | a name < b name ] ]).",
  2018. messageSends: ["items:", "ifNil:ifNotNil:", "sort:", "collect:", "classes", "theNonMetaClass", "<", "name"],
  2019. referencedClasses: []
  2020. }),
  2021. globals.HLClassesListWidget);
  2022. smalltalk.addMethod(
  2023. smalltalk.method({
  2024. selector: "setItemsForSelectedPackage",
  2025. protocol: 'private',
  2026. fn: function (){
  2027. var self=this;
  2028. return smalltalk.withContext(function($ctx1) {
  2029. self._setItemsForPackage_(_st(self._model())._selectedPackage());
  2030. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedPackage",{},globals.HLClassesListWidget)})},
  2031. args: [],
  2032. source: "setItemsForSelectedPackage\x0a\x09self setItemsForPackage: self model selectedPackage",
  2033. messageSends: ["setItemsForPackage:", "selectedPackage", "model"],
  2034. referencedClasses: []
  2035. }),
  2036. globals.HLClassesListWidget);
  2037. smalltalk.addMethod(
  2038. smalltalk.method({
  2039. selector: "showClass",
  2040. protocol: 'testing',
  2041. fn: function (){
  2042. var self=this;
  2043. return smalltalk.withContext(function($ctx1) {
  2044. var $1;
  2045. $1=_st(_st(self._model())._showInstance())._not();
  2046. return $1;
  2047. }, function($ctx1) {$ctx1.fill(self,"showClass",{},globals.HLClassesListWidget)})},
  2048. args: [],
  2049. source: "showClass\x0a\x09^ self model showInstance not",
  2050. messageSends: ["not", "showInstance", "model"],
  2051. referencedClasses: []
  2052. }),
  2053. globals.HLClassesListWidget);
  2054. smalltalk.addMethod(
  2055. smalltalk.method({
  2056. selector: "showComment",
  2057. protocol: 'testing',
  2058. fn: function (){
  2059. var self=this;
  2060. return smalltalk.withContext(function($ctx1) {
  2061. var $1;
  2062. $1=_st(self._model())._showComment();
  2063. return $1;
  2064. }, function($ctx1) {$ctx1.fill(self,"showComment",{},globals.HLClassesListWidget)})},
  2065. args: [],
  2066. source: "showComment\x0a\x09^ self model showComment",
  2067. messageSends: ["showComment", "model"],
  2068. referencedClasses: []
  2069. }),
  2070. globals.HLClassesListWidget);
  2071. smalltalk.addMethod(
  2072. smalltalk.method({
  2073. selector: "showComment:",
  2074. protocol: 'actions',
  2075. fn: function (aBoolean){
  2076. var self=this;
  2077. return smalltalk.withContext(function($ctx1) {
  2078. _st(self._model())._showComment_(aBoolean);
  2079. return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean},globals.HLClassesListWidget)})},
  2080. args: ["aBoolean"],
  2081. source: "showComment: aBoolean\x0a\x09self model showComment: aBoolean",
  2082. messageSends: ["showComment:", "model"],
  2083. referencedClasses: []
  2084. }),
  2085. globals.HLClassesListWidget);
  2086. smalltalk.addMethod(
  2087. smalltalk.method({
  2088. selector: "showInstance",
  2089. protocol: 'testing',
  2090. fn: function (){
  2091. var self=this;
  2092. return smalltalk.withContext(function($ctx1) {
  2093. var $1;
  2094. $1=_st(self._model())._showInstance();
  2095. return $1;
  2096. }, function($ctx1) {$ctx1.fill(self,"showInstance",{},globals.HLClassesListWidget)})},
  2097. args: [],
  2098. source: "showInstance\x0a\x09^ self model showInstance",
  2099. messageSends: ["showInstance", "model"],
  2100. referencedClasses: []
  2101. }),
  2102. globals.HLClassesListWidget);
  2103. smalltalk.addMethod(
  2104. smalltalk.method({
  2105. selector: "showInstance:",
  2106. protocol: 'actions',
  2107. fn: function (aBoolean){
  2108. var self=this;
  2109. return smalltalk.withContext(function($ctx1) {
  2110. _st(self._model())._showInstance_(aBoolean);
  2111. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean},globals.HLClassesListWidget)})},
  2112. args: ["aBoolean"],
  2113. source: "showInstance: aBoolean\x0a\x09self model showInstance: aBoolean",
  2114. messageSends: ["showInstance:", "model"],
  2115. referencedClasses: []
  2116. }),
  2117. globals.HLClassesListWidget);
  2118. smalltalk.addMethod(
  2119. smalltalk.method({
  2120. selector: "toggleShowComment",
  2121. protocol: 'actions',
  2122. fn: function (){
  2123. var self=this;
  2124. return smalltalk.withContext(function($ctx1) {
  2125. _st(self._model())._showComment_(_st(self._showComment())._not());
  2126. return self}, function($ctx1) {$ctx1.fill(self,"toggleShowComment",{},globals.HLClassesListWidget)})},
  2127. args: [],
  2128. source: "toggleShowComment\x0a\x09self model showComment: self showComment not",
  2129. messageSends: ["showComment:", "model", "not", "showComment"],
  2130. referencedClasses: []
  2131. }),
  2132. globals.HLClassesListWidget);
  2133. smalltalk.addClass('HLDocumentationWidget', globals.HLFocusableWidget, ['model'], 'Helios-Browser');
  2134. globals.HLDocumentationWidget.comment="I render the documentation for the selected class";
  2135. smalltalk.addMethod(
  2136. smalltalk.method({
  2137. selector: "defaultDocumentation",
  2138. protocol: 'defaults',
  2139. fn: function (){
  2140. var self=this;
  2141. return "No documentation is available for this class.";
  2142. },
  2143. args: [],
  2144. source: "defaultDocumentation\x0a\x09^ 'No documentation is available for this class.'",
  2145. messageSends: [],
  2146. referencedClasses: []
  2147. }),
  2148. globals.HLDocumentationWidget);
  2149. smalltalk.addMethod(
  2150. smalltalk.method({
  2151. selector: "defaultHead",
  2152. protocol: 'defaults',
  2153. fn: function (){
  2154. var self=this;
  2155. return "No class selected";
  2156. },
  2157. args: [],
  2158. source: "defaultHead\x0a\x09^ 'No class selected'",
  2159. messageSends: [],
  2160. referencedClasses: []
  2161. }),
  2162. globals.HLDocumentationWidget);
  2163. smalltalk.addMethod(
  2164. smalltalk.method({
  2165. selector: "documentation",
  2166. protocol: 'accessing',
  2167. fn: function (){
  2168. var self=this;
  2169. return smalltalk.withContext(function($ctx1) {
  2170. var $2,$1,$receiver;
  2171. $2=self._selectedItem();
  2172. if(($receiver = $2) == null || $receiver.isNil){
  2173. $1="";
  2174. } else {
  2175. var item;
  2176. item=$receiver;
  2177. $1=_st(_st(item)._comment())._ifEmpty_((function(){
  2178. return smalltalk.withContext(function($ctx2) {
  2179. return self._defaultDocumentation();
  2180. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  2181. };
  2182. return $1;
  2183. }, function($ctx1) {$ctx1.fill(self,"documentation",{},globals.HLDocumentationWidget)})},
  2184. args: [],
  2185. source: "documentation\x0a\x09^ self selectedItem \x0a\x09\x09ifNil: [ '' ]\x0a\x09\x09ifNotNil: [ :item | item comment ifEmpty: [ self defaultDocumentation ] ]",
  2186. messageSends: ["ifNil:ifNotNil:", "selectedItem", "ifEmpty:", "comment", "defaultDocumentation"],
  2187. referencedClasses: []
  2188. }),
  2189. globals.HLDocumentationWidget);
  2190. smalltalk.addMethod(
  2191. smalltalk.method({
  2192. selector: "editDocumentation",
  2193. protocol: 'actions',
  2194. fn: function (){
  2195. var self=this;
  2196. return smalltalk.withContext(function($ctx1) {
  2197. _st(self._model())._editComment();
  2198. return self}, function($ctx1) {$ctx1.fill(self,"editDocumentation",{},globals.HLDocumentationWidget)})},
  2199. args: [],
  2200. source: "editDocumentation\x0a\x09self model editComment",
  2201. messageSends: ["editComment", "model"],
  2202. referencedClasses: []
  2203. }),
  2204. globals.HLDocumentationWidget);
  2205. smalltalk.addMethod(
  2206. smalltalk.method({
  2207. selector: "head",
  2208. protocol: 'accessing',
  2209. fn: function (){
  2210. var self=this;
  2211. return smalltalk.withContext(function($ctx1) {
  2212. var $2,$1,$receiver;
  2213. $2=self._selectedItem();
  2214. if(($receiver = $2) == null || $receiver.isNil){
  2215. $1=self._defaultHead();
  2216. } else {
  2217. var item;
  2218. item=$receiver;
  2219. $1=_st(item)._name();
  2220. };
  2221. return $1;
  2222. }, function($ctx1) {$ctx1.fill(self,"head",{},globals.HLDocumentationWidget)})},
  2223. args: [],
  2224. source: "head\x0a\x09^ self selectedItem \x0a\x09\x09ifNil: [ self defaultHead ]\x0a\x09\x09ifNotNil: [ :item | item name ]",
  2225. messageSends: ["ifNil:ifNotNil:", "selectedItem", "defaultHead", "name"],
  2226. referencedClasses: []
  2227. }),
  2228. globals.HLDocumentationWidget);
  2229. smalltalk.addMethod(
  2230. smalltalk.method({
  2231. selector: "model",
  2232. protocol: 'accessing',
  2233. fn: function (){
  2234. var self=this;
  2235. var $1;
  2236. $1=self["@model"];
  2237. return $1;
  2238. },
  2239. args: [],
  2240. source: "model\x0a\x09^ model",
  2241. messageSends: [],
  2242. referencedClasses: []
  2243. }),
  2244. globals.HLDocumentationWidget);
  2245. smalltalk.addMethod(
  2246. smalltalk.method({
  2247. selector: "model:",
  2248. protocol: 'accessing',
  2249. fn: function (aModel){
  2250. var self=this;
  2251. return smalltalk.withContext(function($ctx1) {
  2252. var $1;
  2253. self["@model"]=aModel;
  2254. self._observeSystem();
  2255. $1=self._observeModel();
  2256. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},globals.HLDocumentationWidget)})},
  2257. args: ["aModel"],
  2258. source: "model: aModel\x0a\x09model := aModel.\x0a\x09self \x0a\x09\x09observeSystem;\x0a\x09\x09observeModel",
  2259. messageSends: ["observeSystem", "observeModel"],
  2260. referencedClasses: []
  2261. }),
  2262. globals.HLDocumentationWidget);
  2263. smalltalk.addMethod(
  2264. smalltalk.method({
  2265. selector: "observeModel",
  2266. protocol: 'actions',
  2267. fn: function (){
  2268. var self=this;
  2269. function $HLClassSelected(){return globals.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  2270. function $HLEditComment(){return globals.HLEditComment||(typeof HLEditComment=="undefined"?nil:HLEditComment)}
  2271. function $HLDocumentationFocusRequested(){return globals.HLDocumentationFocusRequested||(typeof HLDocumentationFocusRequested=="undefined"?nil:HLDocumentationFocusRequested)}
  2272. return smalltalk.withContext(function($ctx1) {
  2273. var $1,$2;
  2274. $1=_st(self._model())._announcer();
  2275. _st($1)._on_send_to_($HLClassSelected(),"onClassSelected:",self);
  2276. $ctx1.sendIdx["on:send:to:"]=1;
  2277. _st($1)._on_send_to_($HLEditComment(),"onEditDocumentation",self);
  2278. $ctx1.sendIdx["on:send:to:"]=2;
  2279. $2=_st($1)._on_send_to_($HLDocumentationFocusRequested(),"onDocumentationFocusRequested",self);
  2280. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},globals.HLDocumentationWidget)})},
  2281. args: [],
  2282. source: "observeModel\x0a\x09self model announcer \x0a\x09\x09on: HLClassSelected\x0a\x09\x09send: #onClassSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLEditComment\x0a\x09\x09send: #onEditDocumentation\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLDocumentationFocusRequested\x0a\x09\x09send: #onDocumentationFocusRequested\x0a\x09\x09to: self",
  2283. messageSends: ["on:send:to:", "announcer", "model"],
  2284. referencedClasses: ["HLClassSelected", "HLEditComment", "HLDocumentationFocusRequested"]
  2285. }),
  2286. globals.HLDocumentationWidget);
  2287. smalltalk.addMethod(
  2288. smalltalk.method({
  2289. selector: "observeSystem",
  2290. protocol: 'actions',
  2291. fn: function (){
  2292. var self=this;
  2293. function $ClassCommentChanged(){return globals.ClassCommentChanged||(typeof ClassCommentChanged=="undefined"?nil:ClassCommentChanged)}
  2294. return smalltalk.withContext(function($ctx1) {
  2295. _st(_st(self._model())._systemAnnouncer())._on_send_to_($ClassCommentChanged(),"onClassCommentChanged:",self);
  2296. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},globals.HLDocumentationWidget)})},
  2297. args: [],
  2298. source: "observeSystem\x0a\x09self model systemAnnouncer \x0a\x09\x09on: ClassCommentChanged\x0a\x09\x09send: #onClassCommentChanged:\x0a\x09\x09to: self",
  2299. messageSends: ["on:send:to:", "systemAnnouncer", "model"],
  2300. referencedClasses: ["ClassCommentChanged"]
  2301. }),
  2302. globals.HLDocumentationWidget);
  2303. smalltalk.addMethod(
  2304. smalltalk.method({
  2305. selector: "onClassCommentChanged:",
  2306. protocol: 'reactions',
  2307. fn: function (anAnnouncement){
  2308. var self=this;
  2309. return smalltalk.withContext(function($ctx1) {
  2310. var $2,$1,$3,$receiver;
  2311. $2=self._model();
  2312. $ctx1.sendIdx["model"]=1;
  2313. $1=_st($2)._selectedClass();
  2314. $ctx1.sendIdx["selectedClass"]=1;
  2315. if(($receiver = $1) == null || $receiver.isNil){
  2316. return self;
  2317. } else {
  2318. $1;
  2319. };
  2320. $3=_st(_st(anAnnouncement)._theClass()).__eq(_st(_st(self._model())._selectedClass())._theNonMetaClass());
  2321. if(smalltalk.assert($3)){
  2322. self._refresh();
  2323. };
  2324. return self}, function($ctx1) {$ctx1.fill(self,"onClassCommentChanged:",{anAnnouncement:anAnnouncement},globals.HLDocumentationWidget)})},
  2325. args: ["anAnnouncement"],
  2326. source: "onClassCommentChanged: anAnnouncement\x0a\x09self model selectedClass ifNil: [ ^ self ].\x0a\x09\x0a\x09anAnnouncement theClass = self model selectedClass theNonMetaClass\x0a\x09\x09ifTrue: [ self refresh ]",
  2327. messageSends: ["ifNil:", "selectedClass", "model", "ifTrue:", "=", "theClass", "theNonMetaClass", "refresh"],
  2328. referencedClasses: []
  2329. }),
  2330. globals.HLDocumentationWidget);
  2331. smalltalk.addMethod(
  2332. smalltalk.method({
  2333. selector: "onClassSelected:",
  2334. protocol: 'reactions',
  2335. fn: function (anAnnouncement){
  2336. var self=this;
  2337. return smalltalk.withContext(function($ctx1) {
  2338. self._refresh();
  2339. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncement:anAnnouncement},globals.HLDocumentationWidget)})},
  2340. args: ["anAnnouncement"],
  2341. source: "onClassSelected: anAnnouncement\x0a\x09self refresh",
  2342. messageSends: ["refresh"],
  2343. referencedClasses: []
  2344. }),
  2345. globals.HLDocumentationWidget);
  2346. smalltalk.addMethod(
  2347. smalltalk.method({
  2348. selector: "onDocumentationFocusRequested",
  2349. protocol: 'reactions',
  2350. fn: function (){
  2351. var self=this;
  2352. return smalltalk.withContext(function($ctx1) {
  2353. self._focus();
  2354. return self}, function($ctx1) {$ctx1.fill(self,"onDocumentationFocusRequested",{},globals.HLDocumentationWidget)})},
  2355. args: [],
  2356. source: "onDocumentationFocusRequested\x0a\x09self focus",
  2357. messageSends: ["focus"],
  2358. referencedClasses: []
  2359. }),
  2360. globals.HLDocumentationWidget);
  2361. smalltalk.addMethod(
  2362. smalltalk.method({
  2363. selector: "onEditDocumentation",
  2364. protocol: 'reactions',
  2365. fn: function (){
  2366. var self=this;
  2367. return smalltalk.withContext(function($ctx1) {
  2368. var $5,$4,$3,$2,$1;
  2369. $5=self._model();
  2370. $ctx1.sendIdx["model"]=1;
  2371. $4=_st($5)._selectedClass();
  2372. $ctx1.sendIdx["selectedClass"]=1;
  2373. $3=_st($4)._theNonMetaClass();
  2374. $ctx1.sendIdx["theNonMetaClass"]=1;
  2375. $2=_st($3)._name();
  2376. $1=_st($2).__comma(" comment");
  2377. self._request_value_do_($1,_st(_st(_st(self._model())._selectedClass())._theNonMetaClass())._comment(),(function(comment){
  2378. return smalltalk.withContext(function($ctx2) {
  2379. return self._setClassComment_(comment);
  2380. }, function($ctx2) {$ctx2.fillBlock({comment:comment},$ctx1,1)})}));
  2381. return self}, function($ctx1) {$ctx1.fill(self,"onEditDocumentation",{},globals.HLDocumentationWidget)})},
  2382. args: [],
  2383. source: "onEditDocumentation\x0a\x09self \x0a\x09\x09request: self model selectedClass theNonMetaClass name, ' comment'\x0a\x09\x09value: self model selectedClass theNonMetaClass comment\x0a\x09\x09do: [ :comment | self setClassComment: comment ]",
  2384. messageSends: ["request:value:do:", ",", "name", "theNonMetaClass", "selectedClass", "model", "comment", "setClassComment:"],
  2385. referencedClasses: []
  2386. }),
  2387. globals.HLDocumentationWidget);
  2388. smalltalk.addMethod(
  2389. smalltalk.method({
  2390. selector: "renderContentOn:",
  2391. protocol: 'rendering',
  2392. fn: function (html){
  2393. var self=this;
  2394. return smalltalk.withContext(function($ctx1) {
  2395. var $1,$3,$2;
  2396. $1=_st(html)._div();
  2397. _st($1)._class_("doc");
  2398. $2=_st($1)._with_((function(){
  2399. return smalltalk.withContext(function($ctx2) {
  2400. self._renderHeadOn_(html);
  2401. $3=self._renderDocOn_(html);
  2402. return $3;
  2403. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2404. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},globals.HLDocumentationWidget)})},
  2405. args: ["html"],
  2406. source: "renderContentOn: html\x0a\x09html div \x0a\x09\x09class: 'doc';\x0a\x09\x09with: [\x0a\x09\x09\x09self \x0a\x09\x09\x09\x09renderHeadOn: html;\x0a\x09\x09\x09\x09renderDocOn: html ]",
  2407. messageSends: ["class:", "div", "with:", "renderHeadOn:", "renderDocOn:"],
  2408. referencedClasses: []
  2409. }),
  2410. globals.HLDocumentationWidget);
  2411. smalltalk.addMethod(
  2412. smalltalk.method({
  2413. selector: "renderDocOn:",
  2414. protocol: 'rendering',
  2415. fn: function (html){
  2416. var self=this;
  2417. function $Showdown(){return globals.Showdown||(typeof Showdown=="undefined"?nil:Showdown)}
  2418. return smalltalk.withContext(function($ctx1) {
  2419. var $1,$2,$4,$5,$3,$6,$7,$receiver;
  2420. $1=self._selectedItem();
  2421. if(($receiver = $1) == null || $receiver.isNil){
  2422. $1;
  2423. } else {
  2424. self._renderInheritanceOn_(html);
  2425. $2=_st(html)._h1();
  2426. _st($2)._with_("Overview");
  2427. $ctx1.sendIdx["with:"]=1;
  2428. $3=_st($2)._with_((function(){
  2429. return smalltalk.withContext(function($ctx2) {
  2430. $4=_st(html)._button();
  2431. _st($4)._class_("button default");
  2432. $ctx2.sendIdx["class:"]=1;
  2433. _st($4)._with_("Edit");
  2434. $5=_st($4)._onClick_((function(){
  2435. return smalltalk.withContext(function($ctx3) {
  2436. return self._editDocumentation();
  2437. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  2438. return $5;
  2439. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  2440. $ctx1.sendIdx["with:"]=2;
  2441. $3;
  2442. $6=_st(html)._div();
  2443. _st($6)._class_("markdown");
  2444. $7=_st($6)._asJQuery();
  2445. _st($7)._html_(_st(_st(_st($Showdown())._at_("converter"))._new())._makeHtml_(self._documentation()));
  2446. };
  2447. return self}, function($ctx1) {$ctx1.fill(self,"renderDocOn:",{html:html},globals.HLDocumentationWidget)})},
  2448. args: ["html"],
  2449. source: "renderDocOn: html\x0a\x09self selectedItem ifNotNil: [\x0a\x09\x09self renderInheritanceOn: html.\x0a\x09\x09html h1 \x0a\x09\x09\x09with: 'Overview';\x0a\x09\x09\x09with: [ \x0a\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09class: 'button default';\x0a\x09\x09\x09\x09\x09with: 'Edit';\x0a\x09\x09\x09\x09\x09onClick: [ self editDocumentation ] ].\x0a\x09\x09(html div \x0a\x09\x09\x09class: 'markdown';\x0a\x09\x09\x09asJQuery) html: ((Showdown at: 'converter') new makeHtml: self documentation) ]",
  2450. messageSends: ["ifNotNil:", "selectedItem", "renderInheritanceOn:", "with:", "h1", "class:", "button", "onClick:", "editDocumentation", "html:", "div", "asJQuery", "makeHtml:", "new", "at:", "documentation"],
  2451. referencedClasses: ["Showdown"]
  2452. }),
  2453. globals.HLDocumentationWidget);
  2454. smalltalk.addMethod(
  2455. smalltalk.method({
  2456. selector: "renderHeadOn:",
  2457. protocol: 'rendering',
  2458. fn: function (html){
  2459. var self=this;
  2460. return smalltalk.withContext(function($ctx1) {
  2461. var $1,$2;
  2462. $1=_st(html)._div();
  2463. _st($1)._class_("head");
  2464. $2=_st($1)._with_(self._head());
  2465. return self}, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},globals.HLDocumentationWidget)})},
  2466. args: ["html"],
  2467. source: "renderHeadOn: html\x0a\x09html div \x0a\x09\x09class: 'head';\x0a\x09\x09with: self head",
  2468. messageSends: ["class:", "div", "with:", "head"],
  2469. referencedClasses: []
  2470. }),
  2471. globals.HLDocumentationWidget);
  2472. smalltalk.addMethod(
  2473. smalltalk.method({
  2474. selector: "renderInheritanceOn:",
  2475. protocol: 'rendering',
  2476. fn: function (html){
  2477. var self=this;
  2478. return smalltalk.withContext(function($ctx1) {
  2479. var $1,$4,$3,$5,$6,$9,$8,$7,$10,$2,$receiver;
  2480. $1=_st(html)._div();
  2481. _st($1)._class_("inheritance");
  2482. $2=_st($1)._with_((function(){
  2483. return smalltalk.withContext(function($ctx2) {
  2484. _st(html)._with_("Subclass of ");
  2485. $ctx2.sendIdx["with:"]=2;
  2486. $4=self._selectedItem();
  2487. $ctx2.sendIdx["selectedItem"]=1;
  2488. $3=_st($4)._superclass();
  2489. $ctx2.sendIdx["superclass"]=1;
  2490. if(($receiver = $3) == null || $receiver.isNil){
  2491. return _st(_st(html)._em())._with_("nil");
  2492. $ctx2.sendIdx["with:"]=3;
  2493. } else {
  2494. $5=_st(html)._a();
  2495. $6=$5;
  2496. $9=self._selectedItem();
  2497. $ctx2.sendIdx["selectedItem"]=2;
  2498. $8=_st($9)._superclass();
  2499. $ctx2.sendIdx["superclass"]=2;
  2500. $7=_st($8)._name();
  2501. _st($6)._with_($7);
  2502. $10=_st($5)._onClick_((function(){
  2503. return smalltalk.withContext(function($ctx3) {
  2504. return self._selectClass_(_st(self._selectedItem())._superclass());
  2505. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  2506. return $10;
  2507. };
  2508. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2509. $ctx1.sendIdx["with:"]=1;
  2510. return self}, function($ctx1) {$ctx1.fill(self,"renderInheritanceOn:",{html:html},globals.HLDocumentationWidget)})},
  2511. args: ["html"],
  2512. source: "renderInheritanceOn: html\x0a\x09html div \x09\x0a\x09\x09class: 'inheritance';\x0a\x09\x09with: [\x0a\x09\x09\x09html with: 'Subclass of '.\x0a\x09\x09\x09self selectedItem superclass \x0a\x09\x09\x09\x09ifNil: [ html em with: 'nil' ]\x0a\x09\x09\x09\x09ifNotNil: [\x0a\x09\x09\x09\x09\x09html a \x0a\x09\x09\x09\x09\x09\x09with: self selectedItem superclass name;\x0a\x09\x09\x09\x09\x09\x09onClick: [ self selectClass: self selectedItem superclass ] ] ]",
  2513. messageSends: ["class:", "div", "with:", "ifNil:ifNotNil:", "superclass", "selectedItem", "em", "a", "name", "onClick:", "selectClass:"],
  2514. referencedClasses: []
  2515. }),
  2516. globals.HLDocumentationWidget);
  2517. smalltalk.addMethod(
  2518. smalltalk.method({
  2519. selector: "selectClass:",
  2520. protocol: 'actions',
  2521. fn: function (aClass){
  2522. var self=this;
  2523. return smalltalk.withContext(function($ctx1) {
  2524. _st(self._model())._selectedClass_(aClass);
  2525. return self}, function($ctx1) {$ctx1.fill(self,"selectClass:",{aClass:aClass},globals.HLDocumentationWidget)})},
  2526. args: ["aClass"],
  2527. source: "selectClass: aClass\x0a\x09self model selectedClass: aClass",
  2528. messageSends: ["selectedClass:", "model"],
  2529. referencedClasses: []
  2530. }),
  2531. globals.HLDocumentationWidget);
  2532. smalltalk.addMethod(
  2533. smalltalk.method({
  2534. selector: "selectedItem",
  2535. protocol: 'accessing',
  2536. fn: function (){
  2537. var self=this;
  2538. return smalltalk.withContext(function($ctx1) {
  2539. var $2,$1,$receiver;
  2540. $2=_st(self._model())._selectedClass();
  2541. if(($receiver = $2) == null || $receiver.isNil){
  2542. $1=$2;
  2543. } else {
  2544. var class_;
  2545. class_=$receiver;
  2546. $1=_st(class_)._theNonMetaClass();
  2547. };
  2548. return $1;
  2549. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{},globals.HLDocumentationWidget)})},
  2550. args: [],
  2551. source: "selectedItem\x0a\x09^ self model selectedClass ifNotNil: [ :class | class theNonMetaClass ]",
  2552. messageSends: ["ifNotNil:", "selectedClass", "model", "theNonMetaClass"],
  2553. referencedClasses: []
  2554. }),
  2555. globals.HLDocumentationWidget);
  2556. smalltalk.addMethod(
  2557. smalltalk.method({
  2558. selector: "setClassComment:",
  2559. protocol: 'reactions',
  2560. fn: function (aString){
  2561. var self=this;
  2562. return smalltalk.withContext(function($ctx1) {
  2563. _st(self._model())._setClassComment_(aString);
  2564. return self}, function($ctx1) {$ctx1.fill(self,"setClassComment:",{aString:aString},globals.HLDocumentationWidget)})},
  2565. args: ["aString"],
  2566. source: "setClassComment: aString\x0a\x09self model setClassComment: aString",
  2567. messageSends: ["setClassComment:", "model"],
  2568. referencedClasses: []
  2569. }),
  2570. globals.HLDocumentationWidget);
  2571. smalltalk.addMethod(
  2572. smalltalk.method({
  2573. selector: "unregister",
  2574. protocol: 'actions',
  2575. fn: function (){
  2576. var self=this;
  2577. return smalltalk.withContext(function($ctx1) {
  2578. ($ctx1.supercall = true, globals.HLDocumentationWidget.superclass.fn.prototype._unregister.apply(_st(self), []));
  2579. $ctx1.supercall = false;
  2580. _st(_st(self._model())._announcer())._unregister_(self);
  2581. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},globals.HLDocumentationWidget)})},
  2582. args: [],
  2583. source: "unregister\x0a\x09super unregister.\x0a\x09self model announcer unregister: self",
  2584. messageSends: ["unregister", "unregister:", "announcer", "model"],
  2585. referencedClasses: []
  2586. }),
  2587. globals.HLDocumentationWidget);
  2588. smalltalk.addClass('HLMethodsListWidget', globals.HLToolListWidget, ['selectorsCache'], 'Helios-Browser');
  2589. globals.HLMethodsListWidget.comment="I render a list of methods for the selected protocol.";
  2590. smalltalk.addMethod(
  2591. smalltalk.method({
  2592. selector: "allProtocol",
  2593. protocol: 'accessing',
  2594. fn: function (){
  2595. var self=this;
  2596. return smalltalk.withContext(function($ctx1) {
  2597. var $1;
  2598. $1=_st(self._model())._allProtocol();
  2599. return $1;
  2600. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{},globals.HLMethodsListWidget)})},
  2601. args: [],
  2602. source: "allProtocol\x0a\x09^ self model allProtocol",
  2603. messageSends: ["allProtocol", "model"],
  2604. referencedClasses: []
  2605. }),
  2606. globals.HLMethodsListWidget);
  2607. smalltalk.addMethod(
  2608. smalltalk.method({
  2609. selector: "cssClassForItem:",
  2610. protocol: 'accessing',
  2611. fn: function (aSelector){
  2612. var self=this;
  2613. var override,overriden,method;
  2614. return smalltalk.withContext(function($ctx1) {
  2615. var $2,$3,$4,$1;
  2616. method=self._methodForSelector_(aSelector);
  2617. override=self._isOverride_(method);
  2618. overriden=self._isOverridden_(method);
  2619. $2=override;
  2620. if(smalltalk.assert($2)){
  2621. $3=overriden;
  2622. if(smalltalk.assert($3)){
  2623. $1="override-overridden";
  2624. } else {
  2625. $1="override";
  2626. };
  2627. } else {
  2628. $4=overriden;
  2629. if(smalltalk.assert($4)){
  2630. $1="overridden";
  2631. } else {
  2632. $1="";
  2633. };
  2634. };
  2635. return $1;
  2636. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{aSelector:aSelector,override:override,overriden:overriden,method:method},globals.HLMethodsListWidget)})},
  2637. args: ["aSelector"],
  2638. source: "cssClassForItem: aSelector\x0a\x09| override overriden method |\x0a \x0a method := self methodForSelector: aSelector.\x0a override := self isOverride: method.\x0a overriden := self isOverridden: method.\x0a \x0a\x09^ override\x0a \x09ifTrue: [ overriden\x0a\x09\x09\x09ifTrue: [ 'override-overridden' ]\x0a\x09\x09\x09ifFalse: [ 'override' ] ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09overriden\x0a\x09\x09\x09ifTrue: [ 'overridden' ]\x0a\x09\x09\x09ifFalse: [ '' ] ]",
  2639. messageSends: ["methodForSelector:", "isOverride:", "isOverridden:", "ifTrue:ifFalse:"],
  2640. referencedClasses: []
  2641. }),
  2642. globals.HLMethodsListWidget);
  2643. smalltalk.addMethod(
  2644. smalltalk.method({
  2645. selector: "focus",
  2646. protocol: 'actions',
  2647. fn: function (){
  2648. var self=this;
  2649. return smalltalk.withContext(function($ctx1) {
  2650. var $1,$receiver;
  2651. ($ctx1.supercall = true, globals.HLMethodsListWidget.superclass.fn.prototype._focus.apply(_st(self), []));
  2652. $ctx1.supercall = false;
  2653. $1=self._selectedItem();
  2654. if(($receiver = $1) == null || $receiver.isNil){
  2655. _st(self._model())._showMethodTemplate();
  2656. } else {
  2657. $1;
  2658. };
  2659. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},globals.HLMethodsListWidget)})},
  2660. args: [],
  2661. source: "focus\x0a\x09super focus.\x0a\x09\x0a\x09self selectedItem ifNil: [\x0a\x09\x09self model showMethodTemplate ]",
  2662. messageSends: ["focus", "ifNil:", "selectedItem", "showMethodTemplate", "model"],
  2663. referencedClasses: []
  2664. }),
  2665. globals.HLMethodsListWidget);
  2666. smalltalk.addMethod(
  2667. smalltalk.method({
  2668. selector: "isOverridden:",
  2669. protocol: 'testing',
  2670. fn: function (aMethod){
  2671. var self=this;
  2672. return smalltalk.withContext(function($ctx1) {
  2673. var $1;
  2674. $1=_st(self._selectorsCache())._isOverridden_(aMethod);
  2675. return $1;
  2676. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod},globals.HLMethodsListWidget)})},
  2677. args: ["aMethod"],
  2678. source: "isOverridden: aMethod\x0a ^ self selectorsCache isOverridden: aMethod",
  2679. messageSends: ["isOverridden:", "selectorsCache"],
  2680. referencedClasses: []
  2681. }),
  2682. globals.HLMethodsListWidget);
  2683. smalltalk.addMethod(
  2684. smalltalk.method({
  2685. selector: "isOverride:",
  2686. protocol: 'testing',
  2687. fn: function (aMethod){
  2688. var self=this;
  2689. return smalltalk.withContext(function($ctx1) {
  2690. var $1;
  2691. $1=_st(self._selectorsCache())._isOverride_(aMethod);
  2692. return $1;
  2693. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod},globals.HLMethodsListWidget)})},
  2694. args: ["aMethod"],
  2695. source: "isOverride: aMethod\x0a ^ self selectorsCache isOverride: aMethod",
  2696. messageSends: ["isOverride:", "selectorsCache"],
  2697. referencedClasses: []
  2698. }),
  2699. globals.HLMethodsListWidget);
  2700. smalltalk.addMethod(
  2701. smalltalk.method({
  2702. selector: "label",
  2703. protocol: 'accessing',
  2704. fn: function (){
  2705. var self=this;
  2706. return "Methods";
  2707. },
  2708. args: [],
  2709. source: "label\x0a\x09^ 'Methods'",
  2710. messageSends: [],
  2711. referencedClasses: []
  2712. }),
  2713. globals.HLMethodsListWidget);
  2714. smalltalk.addMethod(
  2715. smalltalk.method({
  2716. selector: "methodForSelector:",
  2717. protocol: 'accessing',
  2718. fn: function (aSelector){
  2719. var self=this;
  2720. return smalltalk.withContext(function($ctx1) {
  2721. var $1;
  2722. $1=_st(_st(_st(self._model())._selectedClass())._methodDictionary())._at_(aSelector);
  2723. return $1;
  2724. }, function($ctx1) {$ctx1.fill(self,"methodForSelector:",{aSelector:aSelector},globals.HLMethodsListWidget)})},
  2725. args: ["aSelector"],
  2726. source: "methodForSelector: aSelector\x0a\x09^ self model selectedClass\x0a \x09methodDictionary at: aSelector",
  2727. messageSends: ["at:", "methodDictionary", "selectedClass", "model"],
  2728. referencedClasses: []
  2729. }),
  2730. globals.HLMethodsListWidget);
  2731. smalltalk.addMethod(
  2732. smalltalk.method({
  2733. selector: "methodsInProtocol:",
  2734. protocol: 'accessing',
  2735. fn: function (aString){
  2736. var self=this;
  2737. return smalltalk.withContext(function($ctx1) {
  2738. var $2,$1,$3,$5,$7,$6,$4,$receiver;
  2739. $2=self._model();
  2740. $ctx1.sendIdx["model"]=1;
  2741. $1=_st($2)._selectedClass();
  2742. $ctx1.sendIdx["selectedClass"]=1;
  2743. if(($receiver = $1) == null || $receiver.isNil){
  2744. $3=[];
  2745. return $3;
  2746. } else {
  2747. $1;
  2748. };
  2749. $5=_st(aString).__eq(self._allProtocol());
  2750. if(smalltalk.assert($5)){
  2751. $7=self._model();
  2752. $ctx1.sendIdx["model"]=2;
  2753. $6=_st($7)._selectedClass();
  2754. $ctx1.sendIdx["selectedClass"]=2;
  2755. $4=_st($6)._methods();
  2756. } else {
  2757. $4=_st(_st(self._model())._selectedClass())._methodsInProtocol_(aString);
  2758. };
  2759. return $4;
  2760. }, function($ctx1) {$ctx1.fill(self,"methodsInProtocol:",{aString:aString},globals.HLMethodsListWidget)})},
  2761. args: ["aString"],
  2762. source: "methodsInProtocol: aString\x0a\x09self model selectedClass ifNil: [ ^ #() ].\x0a \x0a\x09^ aString = self allProtocol\x0a \x09ifTrue: [ self model selectedClass methods ]\x0a \x09ifFalse: [ self model selectedClass methodsInProtocol: aString ]",
  2763. messageSends: ["ifNil:", "selectedClass", "model", "ifTrue:ifFalse:", "=", "allProtocol", "methods", "methodsInProtocol:"],
  2764. referencedClasses: []
  2765. }),
  2766. globals.HLMethodsListWidget);
  2767. smalltalk.addMethod(
  2768. smalltalk.method({
  2769. selector: "observeModel",
  2770. protocol: 'actions',
  2771. fn: function (){
  2772. var self=this;
  2773. function $HLProtocolSelected(){return globals.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  2774. function $HLShowInstanceToggled(){return globals.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  2775. function $HLMethodSelected(){return globals.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  2776. function $HLMethodsFocusRequested(){return globals.HLMethodsFocusRequested||(typeof HLMethodsFocusRequested=="undefined"?nil:HLMethodsFocusRequested)}
  2777. return smalltalk.withContext(function($ctx1) {
  2778. var $1,$2;
  2779. $1=_st(self._model())._announcer();
  2780. _st($1)._on_send_to_($HLProtocolSelected(),"onProtocolSelected:",self);
  2781. $ctx1.sendIdx["on:send:to:"]=1;
  2782. _st($1)._on_send_to_($HLShowInstanceToggled(),"onShowInstanceToggled",self);
  2783. $ctx1.sendIdx["on:send:to:"]=2;
  2784. _st($1)._on_send_to_($HLMethodSelected(),"onMethodSelected:",self);
  2785. $ctx1.sendIdx["on:send:to:"]=3;
  2786. $2=_st($1)._on_send_to_($HLMethodsFocusRequested(),"onMethodsFocusRequested",self);
  2787. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},globals.HLMethodsListWidget)})},
  2788. args: [],
  2789. source: "observeModel\x0a\x09self model announcer \x0a\x09\x09on: HLProtocolSelected \x0a\x09\x09send: #onProtocolSelected: \x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLShowInstanceToggled \x0a\x09\x09send: #onShowInstanceToggled\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLMethodSelected \x0a\x09\x09send: #onMethodSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLMethodsFocusRequested \x0a\x09\x09send: #onMethodsFocusRequested\x0a\x09\x09to: self",
  2790. messageSends: ["on:send:to:", "announcer", "model"],
  2791. referencedClasses: ["HLProtocolSelected", "HLShowInstanceToggled", "HLMethodSelected", "HLMethodsFocusRequested"]
  2792. }),
  2793. globals.HLMethodsListWidget);
  2794. smalltalk.addMethod(
  2795. smalltalk.method({
  2796. selector: "observeSystem",
  2797. protocol: 'actions',
  2798. fn: function (){
  2799. var self=this;
  2800. function $ProtocolAdded(){return globals.ProtocolAdded||(typeof ProtocolAdded=="undefined"?nil:ProtocolAdded)}
  2801. function $ProtocolRemoved(){return globals.ProtocolRemoved||(typeof ProtocolRemoved=="undefined"?nil:ProtocolRemoved)}
  2802. function $MethodAdded(){return globals.MethodAdded||(typeof MethodAdded=="undefined"?nil:MethodAdded)}
  2803. function $MethodRemoved(){return globals.MethodRemoved||(typeof MethodRemoved=="undefined"?nil:MethodRemoved)}
  2804. function $MethodMoved(){return globals.MethodMoved||(typeof MethodMoved=="undefined"?nil:MethodMoved)}
  2805. return smalltalk.withContext(function($ctx1) {
  2806. var $1,$2;
  2807. $1=_st(self._model())._systemAnnouncer();
  2808. _st($1)._on_send_to_($ProtocolAdded(),"onProtocolAdded:",self);
  2809. $ctx1.sendIdx["on:send:to:"]=1;
  2810. _st($1)._on_send_to_($ProtocolRemoved(),"onProtocolRemoved:",self);
  2811. $ctx1.sendIdx["on:send:to:"]=2;
  2812. _st($1)._on_send_to_($MethodAdded(),"onMethodAdded:",self);
  2813. $ctx1.sendIdx["on:send:to:"]=3;
  2814. _st($1)._on_send_to_($MethodRemoved(),"onMethodRemoved:",self);
  2815. $ctx1.sendIdx["on:send:to:"]=4;
  2816. $2=_st($1)._on_send_to_($MethodMoved(),"onMethodMoved:",self);
  2817. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},globals.HLMethodsListWidget)})},
  2818. args: [],
  2819. source: "observeSystem\x0a\x09self model systemAnnouncer \x0a \x09on: ProtocolAdded\x0a send: #onProtocolAdded:\x0a\x09\x09to: self;\x0a \x09\x0a\x09\x09on: ProtocolRemoved\x0a send: #onProtocolRemoved:\x0a\x09\x09to: self;\x0a\x09\x09\x0a \x09on: MethodAdded \x0a send: #onMethodAdded:\x0a\x09\x09to: self;\x0a\x09\x09\x0a on: MethodRemoved \x0a send: #onMethodRemoved:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: MethodMoved \x0a send: #onMethodMoved:\x0a\x09\x09to: self",
  2820. messageSends: ["on:send:to:", "systemAnnouncer", "model"],
  2821. referencedClasses: ["ProtocolAdded", "ProtocolRemoved", "MethodAdded", "MethodRemoved", "MethodMoved"]
  2822. }),
  2823. globals.HLMethodsListWidget);
  2824. smalltalk.addMethod(
  2825. smalltalk.method({
  2826. selector: "onMethodAdded:",
  2827. protocol: 'reactions',
  2828. fn: function (anAnnouncement){
  2829. var self=this;
  2830. return smalltalk.withContext(function($ctx1) {
  2831. var $1;
  2832. $1=_st(_st(self._model())._selectedClass()).__eq(_st(_st(anAnnouncement)._method())._methodClass());
  2833. if(! smalltalk.assert($1)){
  2834. return self;
  2835. };
  2836. self._setItemsForSelectedProtocol();
  2837. self._refresh();
  2838. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{anAnnouncement:anAnnouncement},globals.HLMethodsListWidget)})},
  2839. args: ["anAnnouncement"],
  2840. source: "onMethodAdded: anAnnouncement\x0a\x09self model selectedClass = anAnnouncement method methodClass ifFalse: [ ^ self ].\x0a \x0a self setItemsForSelectedProtocol.\x0a self refresh",
  2841. messageSends: ["ifFalse:", "=", "selectedClass", "model", "methodClass", "method", "setItemsForSelectedProtocol", "refresh"],
  2842. referencedClasses: []
  2843. }),
  2844. globals.HLMethodsListWidget);
  2845. smalltalk.addMethod(
  2846. smalltalk.method({
  2847. selector: "onMethodMoved:",
  2848. protocol: 'reactions',
  2849. fn: function (anAnnouncement){
  2850. var self=this;
  2851. return smalltalk.withContext(function($ctx1) {
  2852. var $3,$2,$1,$6,$5,$4,$7;
  2853. $3=self._model();
  2854. $ctx1.sendIdx["model"]=1;
  2855. $2=_st($3)._selectedMethod();
  2856. $1=_st($2).__eq(_st(anAnnouncement)._method());
  2857. $ctx1.sendIdx["="]=1;
  2858. if(! smalltalk.assert($1)){
  2859. return self;
  2860. };
  2861. $6=self._model();
  2862. $ctx1.sendIdx["model"]=2;
  2863. $5=_st($6)._selectedProtocol();
  2864. $4=_st($5).__eq(_st(self._model())._allProtocol());
  2865. if(! smalltalk.assert($4)){
  2866. self._selectedItem_(nil);
  2867. self._selectItem_(nil);
  2868. self._setItemsForSelectedProtocol();
  2869. $7=self._refresh();
  2870. $7;
  2871. };
  2872. return self}, function($ctx1) {$ctx1.fill(self,"onMethodMoved:",{anAnnouncement:anAnnouncement},globals.HLMethodsListWidget)})},
  2873. args: ["anAnnouncement"],
  2874. source: "onMethodMoved: anAnnouncement\x0a\x09self model selectedMethod = anAnnouncement method ifFalse: [ ^ self ].\x0a \x0a\x09self model selectedProtocol = self model allProtocol ifFalse: [\x0a\x09\x09self \x0a\x09\x09\x09selectedItem: nil; \x0a\x09\x09\x09selectItem: nil;\x0a\x09\x09\x09setItemsForSelectedProtocol;\x0a \x09\x09refresh ]",
  2875. messageSends: ["ifFalse:", "=", "selectedMethod", "model", "method", "selectedProtocol", "allProtocol", "selectedItem:", "selectItem:", "setItemsForSelectedProtocol", "refresh"],
  2876. referencedClasses: []
  2877. }),
  2878. globals.HLMethodsListWidget);
  2879. smalltalk.addMethod(
  2880. smalltalk.method({
  2881. selector: "onMethodRemoved:",
  2882. protocol: 'reactions',
  2883. fn: function (anAnnouncement){
  2884. var self=this;
  2885. var method;
  2886. return smalltalk.withContext(function($ctx1) {
  2887. var $1,$2,$4,$3,$5,$6,$receiver;
  2888. var $early={};
  2889. try {
  2890. method=_st(anAnnouncement)._method();
  2891. _st(self._items())._detect_ifNone_((function(each){
  2892. return smalltalk.withContext(function($ctx2) {
  2893. $1=_st(method)._selector();
  2894. $ctx2.sendIdx["selector"]=1;
  2895. return _st(each).__eq($1);
  2896. $ctx2.sendIdx["="]=1;
  2897. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
  2898. throw $early=[self];
  2899. }));
  2900. $2=self._selectedItem();
  2901. $ctx1.sendIdx["selectedItem"]=1;
  2902. if(($receiver = $2) == null || $receiver.isNil){
  2903. $2;
  2904. } else {
  2905. $4=_st(_st(method)._methodClass()).__eq(_st(self._model())._selectedClass());
  2906. $ctx1.sendIdx["="]=2;
  2907. $3=_st($4)._and_((function(){
  2908. return smalltalk.withContext(function($ctx2) {
  2909. return _st(_st(method)._selector()).__eq(self._selectedItem());
  2910. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  2911. if(smalltalk.assert($3)){
  2912. self._selectedItem_(nil);
  2913. $5=self._selectItem_(nil);
  2914. $5;
  2915. };
  2916. };
  2917. self._setItemsForSelectedProtocol();
  2918. self._refresh();
  2919. $6=self._focus();
  2920. return self}
  2921. catch(e) {if(e===$early)return e[0]; throw e}
  2922. }, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{anAnnouncement:anAnnouncement,method:method},globals.HLMethodsListWidget)})},
  2923. args: ["anAnnouncement"],
  2924. source: "onMethodRemoved: anAnnouncement\x0a\x09| method |\x0a\x09\x0a\x09method := anAnnouncement method.\x0a\x09\x0a\x09self items detect: [ :each | each = method selector ] ifNone: [ ^ self ].\x0a\x0a self selectedItem ifNotNil: [\x0a \x09(method methodClass = self model selectedClass and: [ method selector = self selectedItem ])\x0a \x09\x09\x09ifTrue: [ \x0a\x09\x09\x09\x09self selectedItem: nil; \x0a\x09\x09\x09\x09selectItem: nil ] ].\x0a\x0a self setItemsForSelectedProtocol.\x0a\x09self \x0a\x09\x09refresh;\x0a\x09\x09focus",
  2925. messageSends: ["method", "detect:ifNone:", "items", "=", "selector", "ifNotNil:", "selectedItem", "ifTrue:", "and:", "methodClass", "selectedClass", "model", "selectedItem:", "selectItem:", "setItemsForSelectedProtocol", "refresh", "focus"],
  2926. referencedClasses: []
  2927. }),
  2928. globals.HLMethodsListWidget);
  2929. smalltalk.addMethod(
  2930. smalltalk.method({
  2931. selector: "onMethodSelected:",
  2932. protocol: 'reactions',
  2933. fn: function (anAnnouncement){
  2934. var self=this;
  2935. var selector,method;
  2936. return smalltalk.withContext(function($ctx1) {
  2937. var $1,$2;
  2938. method=_st(anAnnouncement)._item();
  2939. $1=_st(method)._isCompiledMethod();
  2940. if(smalltalk.assert($1)){
  2941. selector=_st(method)._selector();
  2942. } else {
  2943. selector=nil;
  2944. };
  2945. self._selectedItem_(selector);
  2946. $2=self._activateItem_(selector);
  2947. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{anAnnouncement:anAnnouncement,selector:selector,method:method},globals.HLMethodsListWidget)})},
  2948. args: ["anAnnouncement"],
  2949. source: "onMethodSelected: anAnnouncement\x0a\x09| selector method |\x0a\x09\x0a\x09method := anAnnouncement item.\x0a\x09\x0a\x09selector := method isCompiledMethod \x0a\x09\x09ifTrue: [ method selector ]\x0a\x09\x09ifFalse: [ nil ].\x0a\x09\x09\x0a\x09self \x0a\x09\x09selectedItem: selector;\x0a\x09\x09activateItem: selector",
  2950. messageSends: ["item", "ifTrue:ifFalse:", "isCompiledMethod", "selector", "selectedItem:", "activateItem:"],
  2951. referencedClasses: []
  2952. }),
  2953. globals.HLMethodsListWidget);
  2954. smalltalk.addMethod(
  2955. smalltalk.method({
  2956. selector: "onMethodsFocusRequested",
  2957. protocol: 'reactions',
  2958. fn: function (){
  2959. var self=this;
  2960. return smalltalk.withContext(function($ctx1) {
  2961. self._focus();
  2962. return self}, function($ctx1) {$ctx1.fill(self,"onMethodsFocusRequested",{},globals.HLMethodsListWidget)})},
  2963. args: [],
  2964. source: "onMethodsFocusRequested\x0a\x09self focus",
  2965. messageSends: ["focus"],
  2966. referencedClasses: []
  2967. }),
  2968. globals.HLMethodsListWidget);
  2969. smalltalk.addMethod(
  2970. smalltalk.method({
  2971. selector: "onProtocolAdded:",
  2972. protocol: 'reactions',
  2973. fn: function (anAnnouncement){
  2974. var self=this;
  2975. return smalltalk.withContext(function($ctx1) {
  2976. var $1;
  2977. $1=_st(_st(self._model())._selectedClass()).__eq(_st(anAnnouncement)._theClass());
  2978. if(! smalltalk.assert($1)){
  2979. return self;
  2980. };
  2981. self._setItemsForSelectedProtocol();
  2982. self._refresh();
  2983. self._focus();
  2984. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolAdded:",{anAnnouncement:anAnnouncement},globals.HLMethodsListWidget)})},
  2985. args: ["anAnnouncement"],
  2986. source: "onProtocolAdded: anAnnouncement\x0a\x09self model selectedClass = anAnnouncement theClass ifFalse: [ ^ self ].\x0a\x09\x0a\x09self setItemsForSelectedProtocol.\x0a self refresh.\x0a\x09self focus",
  2987. messageSends: ["ifFalse:", "=", "selectedClass", "model", "theClass", "setItemsForSelectedProtocol", "refresh", "focus"],
  2988. referencedClasses: []
  2989. }),
  2990. globals.HLMethodsListWidget);
  2991. smalltalk.addMethod(
  2992. smalltalk.method({
  2993. selector: "onProtocolRemoved:",
  2994. protocol: 'reactions',
  2995. fn: function (anAnnouncement){
  2996. var self=this;
  2997. return smalltalk.withContext(function($ctx1) {
  2998. var $1;
  2999. $1=_st(_st(self._model())._selectedClass()).__eq(_st(anAnnouncement)._theClass());
  3000. if(! smalltalk.assert($1)){
  3001. return self;
  3002. };
  3003. self._setItemsForSelectedProtocol();
  3004. self._refresh();
  3005. self._focus();
  3006. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolRemoved:",{anAnnouncement:anAnnouncement},globals.HLMethodsListWidget)})},
  3007. args: ["anAnnouncement"],
  3008. source: "onProtocolRemoved: anAnnouncement\x0a\x09self model selectedClass = anAnnouncement theClass ifFalse: [ ^ self ].\x0a\x09\x0a\x09self setItemsForSelectedProtocol.\x0a self refresh.\x0a\x09self focus",
  3009. messageSends: ["ifFalse:", "=", "selectedClass", "model", "theClass", "setItemsForSelectedProtocol", "refresh", "focus"],
  3010. referencedClasses: []
  3011. }),
  3012. globals.HLMethodsListWidget);
  3013. smalltalk.addMethod(
  3014. smalltalk.method({
  3015. selector: "onProtocolSelected:",
  3016. protocol: 'reactions',
  3017. fn: function (anAnnouncement){
  3018. var self=this;
  3019. return smalltalk.withContext(function($ctx1) {
  3020. self._selectedItem_(nil);
  3021. self._setItemsForSelectedProtocol();
  3022. self._refresh();
  3023. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{anAnnouncement:anAnnouncement},globals.HLMethodsListWidget)})},
  3024. args: ["anAnnouncement"],
  3025. source: "onProtocolSelected: anAnnouncement\x0a self selectedItem: nil.\x0a \x0a\x09self setItemsForSelectedProtocol.\x0a self refresh",
  3026. messageSends: ["selectedItem:", "setItemsForSelectedProtocol", "refresh"],
  3027. referencedClasses: []
  3028. }),
  3029. globals.HLMethodsListWidget);
  3030. smalltalk.addMethod(
  3031. smalltalk.method({
  3032. selector: "onShowInstanceToggled",
  3033. protocol: 'reactions',
  3034. fn: function (){
  3035. var self=this;
  3036. return smalltalk.withContext(function($ctx1) {
  3037. self._onProtocolSelected_(nil);
  3038. return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{},globals.HLMethodsListWidget)})},
  3039. args: [],
  3040. source: "onShowInstanceToggled\x0a\x09self onProtocolSelected: nil",
  3041. messageSends: ["onProtocolSelected:"],
  3042. referencedClasses: []
  3043. }),
  3044. globals.HLMethodsListWidget);
  3045. smalltalk.addMethod(
  3046. smalltalk.method({
  3047. selector: "overrideSelectors",
  3048. protocol: 'accessing',
  3049. fn: function (){
  3050. var self=this;
  3051. function $Set(){return globals.Set||(typeof Set=="undefined"?nil:Set)}
  3052. return smalltalk.withContext(function($ctx1) {
  3053. var $2,$1;
  3054. $1=_st(self._selectorsCache())._at_ifAbsentPut_("override",(function(){
  3055. return smalltalk.withContext(function($ctx2) {
  3056. return _st(_st(_st(self._model())._selectedClass())._allSuperclasses())._inject_into_(_st($Set())._new(),(function(acc,each){
  3057. return smalltalk.withContext(function($ctx3) {
  3058. _st(acc)._addAll_(_st(each)._selectors());
  3059. $2=_st(acc)._yourself();
  3060. return $2;
  3061. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx2,2)})}));
  3062. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  3063. return $1;
  3064. }, function($ctx1) {$ctx1.fill(self,"overrideSelectors",{},globals.HLMethodsListWidget)})},
  3065. args: [],
  3066. source: "overrideSelectors\x0a\x09^ self selectorsCache \x0a \x09at: 'override'\x0a ifAbsentPut: [ \x0a \x09self model selectedClass allSuperclasses\x0a\x09\x09\x09\x09inject: Set new into: [ :acc :each | acc addAll: each selectors; yourself ] ]",
  3067. messageSends: ["at:ifAbsentPut:", "selectorsCache", "inject:into:", "allSuperclasses", "selectedClass", "model", "new", "addAll:", "selectors", "yourself"],
  3068. referencedClasses: ["Set"]
  3069. }),
  3070. globals.HLMethodsListWidget);
  3071. smalltalk.addMethod(
  3072. smalltalk.method({
  3073. selector: "overridenSelectors",
  3074. protocol: 'accessing',
  3075. fn: function (){
  3076. var self=this;
  3077. function $Set(){return globals.Set||(typeof Set=="undefined"?nil:Set)}
  3078. return smalltalk.withContext(function($ctx1) {
  3079. var $2,$1;
  3080. $1=_st(self._selectorsCache())._at_ifAbsentPut_("overriden",(function(){
  3081. return smalltalk.withContext(function($ctx2) {
  3082. return _st(_st(_st(self._model())._selectedClass())._allSubclasses())._inject_into_(_st($Set())._new(),(function(acc,each){
  3083. return smalltalk.withContext(function($ctx3) {
  3084. _st(acc)._addAll_(_st(each)._selectors());
  3085. $2=_st(acc)._yourself();
  3086. return $2;
  3087. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx2,2)})}));
  3088. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  3089. return $1;
  3090. }, function($ctx1) {$ctx1.fill(self,"overridenSelectors",{},globals.HLMethodsListWidget)})},
  3091. args: [],
  3092. source: "overridenSelectors\x0a\x09^ self selectorsCache \x0a \x09at: 'overriden'\x0a ifAbsentPut: [ \x0a \x09self model selectedClass allSubclasses\x0a\x09\x09\x09\x09inject: Set new into: [ :acc :each | acc addAll: each selectors; yourself ] ]",
  3093. messageSends: ["at:ifAbsentPut:", "selectorsCache", "inject:into:", "allSubclasses", "selectedClass", "model", "new", "addAll:", "selectors", "yourself"],
  3094. referencedClasses: ["Set"]
  3095. }),
  3096. globals.HLMethodsListWidget);
  3097. smalltalk.addMethod(
  3098. smalltalk.method({
  3099. selector: "renderContentOn:",
  3100. protocol: 'rendering',
  3101. fn: function (html){
  3102. var self=this;
  3103. return smalltalk.withContext(function($ctx1) {
  3104. var $1,$2,$3;
  3105. $1=_st(self._model())._showInstance();
  3106. if(smalltalk.assert($1)){
  3107. ($ctx1.supercall = true, globals.HLMethodsListWidget.superclass.fn.prototype._renderContentOn_.apply(_st(self), [html]));
  3108. $ctx1.supercall = false;
  3109. } else {
  3110. $2=_st(html)._div();
  3111. _st($2)._class_("class_side");
  3112. $3=_st($2)._with_((function(){
  3113. return smalltalk.withContext(function($ctx2) {
  3114. return ($ctx2.supercall = true, globals.HLMethodsListWidget.superclass.fn.prototype._renderContentOn_.apply(_st(self), [html]));
  3115. $ctx2.supercall = false;
  3116. $ctx2.sendIdx["renderContentOn:"]=1;
  3117. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  3118. $3;
  3119. };
  3120. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},globals.HLMethodsListWidget)})},
  3121. args: ["html"],
  3122. source: "renderContentOn: html\x0a\x09self model showInstance\x0a \x09ifFalse: [ html div \x0a \x09class: 'class_side'; \x0a with: [ super renderContentOn: html ] ]\x0a \x09ifTrue: [ super renderContentOn: html ]",
  3123. messageSends: ["ifFalse:ifTrue:", "showInstance", "model", "class:", "div", "with:", "renderContentOn:"],
  3124. referencedClasses: []
  3125. }),
  3126. globals.HLMethodsListWidget);
  3127. smalltalk.addMethod(
  3128. smalltalk.method({
  3129. selector: "renderItemLabel:on:",
  3130. protocol: 'rendering',
  3131. fn: function (aSelector,html){
  3132. var self=this;
  3133. return smalltalk.withContext(function($ctx1) {
  3134. _st(html)._with_(aSelector);
  3135. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aSelector:aSelector,html:html},globals.HLMethodsListWidget)})},
  3136. args: ["aSelector", "html"],
  3137. source: "renderItemLabel: aSelector on: html\x0a\x09html with: aSelector",
  3138. messageSends: ["with:"],
  3139. referencedClasses: []
  3140. }),
  3141. globals.HLMethodsListWidget);
  3142. smalltalk.addMethod(
  3143. smalltalk.method({
  3144. selector: "reselectItem:",
  3145. protocol: 'actions',
  3146. fn: function (aSelector){
  3147. var self=this;
  3148. return smalltalk.withContext(function($ctx1) {
  3149. _st(self._model())._forceSelectedMethod_(self._methodForSelector_(aSelector));
  3150. return self}, function($ctx1) {$ctx1.fill(self,"reselectItem:",{aSelector:aSelector},globals.HLMethodsListWidget)})},
  3151. args: ["aSelector"],
  3152. source: "reselectItem: aSelector\x0a\x09self model forceSelectedMethod: (self methodForSelector: aSelector)",
  3153. messageSends: ["forceSelectedMethod:", "model", "methodForSelector:"],
  3154. referencedClasses: []
  3155. }),
  3156. globals.HLMethodsListWidget);
  3157. smalltalk.addMethod(
  3158. smalltalk.method({
  3159. selector: "selectItem:",
  3160. protocol: 'actions',
  3161. fn: function (aSelector){
  3162. var self=this;
  3163. return smalltalk.withContext(function($ctx1) {
  3164. var $2,$1,$receiver;
  3165. if(($receiver = aSelector) == null || $receiver.isNil){
  3166. $2=self._model();
  3167. $ctx1.sendIdx["model"]=1;
  3168. $1=_st($2)._selectedMethod_(nil);
  3169. $ctx1.sendIdx["selectedMethod:"]=1;
  3170. return $1;
  3171. } else {
  3172. aSelector;
  3173. };
  3174. _st(self._model())._selectedMethod_(self._methodForSelector_(aSelector));
  3175. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aSelector:aSelector},globals.HLMethodsListWidget)})},
  3176. args: ["aSelector"],
  3177. source: "selectItem: aSelector\x0a\x09aSelector ifNil: [ ^ self model selectedMethod: nil ].\x0a\x0a \x09self model selectedMethod: (self methodForSelector: aSelector)",
  3178. messageSends: ["ifNil:", "selectedMethod:", "model", "methodForSelector:"],
  3179. referencedClasses: []
  3180. }),
  3181. globals.HLMethodsListWidget);
  3182. smalltalk.addMethod(
  3183. smalltalk.method({
  3184. selector: "selectorsCache",
  3185. protocol: 'accessing',
  3186. fn: function (){
  3187. var self=this;
  3188. return smalltalk.withContext(function($ctx1) {
  3189. var $1;
  3190. $1=_st(self._class())._selectorsCache();
  3191. return $1;
  3192. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{},globals.HLMethodsListWidget)})},
  3193. args: [],
  3194. source: "selectorsCache\x0a\x09^ self class selectorsCache",
  3195. messageSends: ["selectorsCache", "class"],
  3196. referencedClasses: []
  3197. }),
  3198. globals.HLMethodsListWidget);
  3199. smalltalk.addMethod(
  3200. smalltalk.method({
  3201. selector: "selectorsInProtocol:",
  3202. protocol: 'accessing',
  3203. fn: function (aString){
  3204. var self=this;
  3205. return smalltalk.withContext(function($ctx1) {
  3206. var $1;
  3207. $1=_st(_st(self._methodsInProtocol_(aString))._collect_((function(each){
  3208. return smalltalk.withContext(function($ctx2) {
  3209. return _st(each)._selector();
  3210. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._sorted();
  3211. return $1;
  3212. }, function($ctx1) {$ctx1.fill(self,"selectorsInProtocol:",{aString:aString},globals.HLMethodsListWidget)})},
  3213. args: ["aString"],
  3214. source: "selectorsInProtocol: aString\x0a\x09^ ((self methodsInProtocol: aString)\x0a \x09collect: [ :each | each selector ]) sorted",
  3215. messageSends: ["sorted", "collect:", "methodsInProtocol:", "selector"],
  3216. referencedClasses: []
  3217. }),
  3218. globals.HLMethodsListWidget);
  3219. smalltalk.addMethod(
  3220. smalltalk.method({
  3221. selector: "setItemsForProtocol:",
  3222. protocol: 'private',
  3223. fn: function (aString){
  3224. var self=this;
  3225. return smalltalk.withContext(function($ctx1) {
  3226. var $2,$1,$receiver;
  3227. if(($receiver = aString) == null || $receiver.isNil){
  3228. $2=[];
  3229. } else {
  3230. $2=self._selectorsInProtocol_(aString);
  3231. };
  3232. $1=self._items_($2);
  3233. return $1;
  3234. }, function($ctx1) {$ctx1.fill(self,"setItemsForProtocol:",{aString:aString},globals.HLMethodsListWidget)})},
  3235. args: ["aString"],
  3236. source: "setItemsForProtocol: aString\x0a\x09^ self items: (aString\x0a \x09ifNil: [ #() ]\x0a \x09ifNotNil: [ self selectorsInProtocol: aString ])",
  3237. messageSends: ["items:", "ifNil:ifNotNil:", "selectorsInProtocol:"],
  3238. referencedClasses: []
  3239. }),
  3240. globals.HLMethodsListWidget);
  3241. smalltalk.addMethod(
  3242. smalltalk.method({
  3243. selector: "setItemsForSelectedProtocol",
  3244. protocol: 'private',
  3245. fn: function (){
  3246. var self=this;
  3247. return smalltalk.withContext(function($ctx1) {
  3248. self._setItemsForProtocol_(_st(self._model())._selectedProtocol());
  3249. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedProtocol",{},globals.HLMethodsListWidget)})},
  3250. args: [],
  3251. source: "setItemsForSelectedProtocol\x0a\x09self setItemsForProtocol: self model selectedProtocol",
  3252. messageSends: ["setItemsForProtocol:", "selectedProtocol", "model"],
  3253. referencedClasses: []
  3254. }),
  3255. globals.HLMethodsListWidget);
  3256. globals.HLMethodsListWidget.klass.iVarNames = ['selectorsCache'];
  3257. smalltalk.addMethod(
  3258. smalltalk.method({
  3259. selector: "selectorsCache",
  3260. protocol: 'accessing',
  3261. fn: function (){
  3262. var self=this;
  3263. function $HLSelectorsCache(){return globals.HLSelectorsCache||(typeof HLSelectorsCache=="undefined"?nil:HLSelectorsCache)}
  3264. return smalltalk.withContext(function($ctx1) {
  3265. var $1;
  3266. $1=_st($HLSelectorsCache())._current();
  3267. return $1;
  3268. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{},globals.HLMethodsListWidget.klass)})},
  3269. args: [],
  3270. source: "selectorsCache\x0a\x09^ HLSelectorsCache current",
  3271. messageSends: ["current"],
  3272. referencedClasses: ["HLSelectorsCache"]
  3273. }),
  3274. globals.HLMethodsListWidget.klass);
  3275. smalltalk.addClass('HLPackagesListWidget', globals.HLToolListWidget, [], 'Helios-Browser');
  3276. globals.HLPackagesListWidget.comment="I render a list of the system packages.";
  3277. smalltalk.addMethod(
  3278. smalltalk.method({
  3279. selector: "cssClassForItem:",
  3280. protocol: 'accessing',
  3281. fn: function (anItem){
  3282. var self=this;
  3283. return smalltalk.withContext(function($ctx1) {
  3284. var $2,$1;
  3285. $2=_st(anItem)._isDirty();
  3286. if(smalltalk.assert($2)){
  3287. $1="package_dirty";
  3288. } else {
  3289. $1="package";
  3290. };
  3291. return $1;
  3292. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{anItem:anItem},globals.HLPackagesListWidget)})},
  3293. args: ["anItem"],
  3294. source: "cssClassForItem: anItem\x09\x0a\x09^ anItem isDirty \x0a\x09\x09ifTrue: [ 'package_dirty' ]\x0a\x09\x09ifFalse: [ 'package' ]",
  3295. messageSends: ["ifTrue:ifFalse:", "isDirty"],
  3296. referencedClasses: []
  3297. }),
  3298. globals.HLPackagesListWidget);
  3299. smalltalk.addMethod(
  3300. smalltalk.method({
  3301. selector: "focusClassesListWidget",
  3302. protocol: 'actions',
  3303. fn: function (){
  3304. var self=this;
  3305. function $HLClassesListFocus(){return globals.HLClassesListFocus||(typeof HLClassesListFocus=="undefined"?nil:HLClassesListFocus)}
  3306. return smalltalk.withContext(function($ctx1) {
  3307. _st(_st(self._model())._announcer())._announce_(_st($HLClassesListFocus())._new());
  3308. return self}, function($ctx1) {$ctx1.fill(self,"focusClassesListWidget",{},globals.HLPackagesListWidget)})},
  3309. args: [],
  3310. source: "focusClassesListWidget\x0a\x09self model announcer announce: HLClassesListFocus new",
  3311. messageSends: ["announce:", "announcer", "model", "new"],
  3312. referencedClasses: ["HLClassesListFocus"]
  3313. }),
  3314. globals.HLPackagesListWidget);
  3315. smalltalk.addMethod(
  3316. smalltalk.method({
  3317. selector: "initializeItems",
  3318. protocol: 'initialization',
  3319. fn: function (){
  3320. var self=this;
  3321. return smalltalk.withContext(function($ctx1) {
  3322. var $2,$1;
  3323. self["@items"]=_st(_st(self._model())._packages())._sort_((function(a,b){
  3324. return smalltalk.withContext(function($ctx2) {
  3325. $2=_st(a)._name();
  3326. $ctx2.sendIdx["name"]=1;
  3327. return _st($2).__lt(_st(b)._name());
  3328. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)})}));
  3329. $1=self["@items"];
  3330. return $1;
  3331. }, function($ctx1) {$ctx1.fill(self,"initializeItems",{},globals.HLPackagesListWidget)})},
  3332. args: [],
  3333. source: "initializeItems\x0a\x09^ items := self model packages \x0a\x09\x09sort: [ :a :b | a name < b name ]",
  3334. messageSends: ["sort:", "packages", "model", "<", "name"],
  3335. referencedClasses: []
  3336. }),
  3337. globals.HLPackagesListWidget);
  3338. smalltalk.addMethod(
  3339. smalltalk.method({
  3340. selector: "items",
  3341. protocol: 'accessing',
  3342. fn: function (){
  3343. var self=this;
  3344. return smalltalk.withContext(function($ctx1) {
  3345. var $2,$1,$receiver;
  3346. $2=self["@items"];
  3347. if(($receiver = $2) == null || $receiver.isNil){
  3348. $1=self._initializeItems();
  3349. } else {
  3350. $1=$2;
  3351. };
  3352. return $1;
  3353. }, function($ctx1) {$ctx1.fill(self,"items",{},globals.HLPackagesListWidget)})},
  3354. args: [],
  3355. source: "items\x0a\x09^ items ifNil: [ self initializeItems ]",
  3356. messageSends: ["ifNil:", "initializeItems"],
  3357. referencedClasses: []
  3358. }),
  3359. globals.HLPackagesListWidget);
  3360. smalltalk.addMethod(
  3361. smalltalk.method({
  3362. selector: "label",
  3363. protocol: 'accessing',
  3364. fn: function (){
  3365. var self=this;
  3366. return "Packages";
  3367. },
  3368. args: [],
  3369. source: "label\x0a\x09^ 'Packages'",
  3370. messageSends: [],
  3371. referencedClasses: []
  3372. }),
  3373. globals.HLPackagesListWidget);
  3374. smalltalk.addMethod(
  3375. smalltalk.method({
  3376. selector: "observeModel",
  3377. protocol: 'actions',
  3378. fn: function (){
  3379. var self=this;
  3380. function $HLPackageSelected(){return globals.HLPackageSelected||(typeof HLPackageSelected=="undefined"?nil:HLPackageSelected)}
  3381. function $HLPackagesFocusRequested(){return globals.HLPackagesFocusRequested||(typeof HLPackagesFocusRequested=="undefined"?nil:HLPackagesFocusRequested)}
  3382. return smalltalk.withContext(function($ctx1) {
  3383. var $1,$2;
  3384. $1=_st(self._model())._announcer();
  3385. _st($1)._on_send_to_($HLPackageSelected(),"onPackageSelected:",self);
  3386. $ctx1.sendIdx["on:send:to:"]=1;
  3387. $2=_st($1)._on_send_to_($HLPackagesFocusRequested(),"onPackagesFocusRequested",self);
  3388. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},globals.HLPackagesListWidget)})},
  3389. args: [],
  3390. source: "observeModel\x0a self model announcer \x0a\x09\x09on: HLPackageSelected\x0a\x09\x09send: #onPackageSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLPackagesFocusRequested \x0a\x09\x09send: #onPackagesFocusRequested\x0a\x09\x09to: self",
  3391. messageSends: ["on:send:to:", "announcer", "model"],
  3392. referencedClasses: ["HLPackageSelected", "HLPackagesFocusRequested"]
  3393. }),
  3394. globals.HLPackagesListWidget);
  3395. smalltalk.addMethod(
  3396. smalltalk.method({
  3397. selector: "observeSystem",
  3398. protocol: 'actions',
  3399. fn: function (){
  3400. var self=this;
  3401. function $ClassAdded(){return globals.ClassAdded||(typeof ClassAdded=="undefined"?nil:ClassAdded)}
  3402. function $PackageAdded(){return globals.PackageAdded||(typeof PackageAdded=="undefined"?nil:PackageAdded)}
  3403. function $PackageClean(){return globals.PackageClean||(typeof PackageClean=="undefined"?nil:PackageClean)}
  3404. function $PackageDirty(){return globals.PackageDirty||(typeof PackageDirty=="undefined"?nil:PackageDirty)}
  3405. return smalltalk.withContext(function($ctx1) {
  3406. var $2,$1,$4,$3,$6,$5;
  3407. $2=self._model();
  3408. $ctx1.sendIdx["model"]=1;
  3409. $1=_st($2)._systemAnnouncer();
  3410. $ctx1.sendIdx["systemAnnouncer"]=1;
  3411. _st($1)._on_send_to_($ClassAdded(),"onClassAdded:",self);
  3412. $ctx1.sendIdx["on:send:to:"]=1;
  3413. $4=self._model();
  3414. $ctx1.sendIdx["model"]=2;
  3415. $3=_st($4)._systemAnnouncer();
  3416. $ctx1.sendIdx["systemAnnouncer"]=2;
  3417. _st($3)._on_send_to_($PackageAdded(),"onPackageAdded:",self);
  3418. $ctx1.sendIdx["on:send:to:"]=2;
  3419. $6=self._model();
  3420. $ctx1.sendIdx["model"]=3;
  3421. $5=_st($6)._systemAnnouncer();
  3422. $ctx1.sendIdx["systemAnnouncer"]=3;
  3423. _st($5)._on_send_to_($PackageClean(),"onPackageStateChanged",self);
  3424. $ctx1.sendIdx["on:send:to:"]=3;
  3425. _st(_st(self._model())._systemAnnouncer())._on_send_to_($PackageDirty(),"onPackageStateChanged",self);
  3426. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},globals.HLPackagesListWidget)})},
  3427. args: [],
  3428. source: "observeSystem\x0a self model systemAnnouncer \x0a\x09\x09on: ClassAdded \x0a\x09\x09send: #onClassAdded:\x0a\x09\x09to: self.\x0a\x09\x09\x0a\x09self model systemAnnouncer\x0a\x09\x09on: PackageAdded\x0a\x09\x09send: #onPackageAdded:\x0a\x09\x09to: self.\x0a\x09\x09\x0a\x09self model systemAnnouncer\x0a\x09\x09on: PackageClean\x0a\x09\x09send: #onPackageStateChanged\x0a\x09\x09to: self.\x0a\x09\x09\x0a\x09self model systemAnnouncer\x0a\x09\x09on: PackageDirty\x0a\x09\x09send: #onPackageStateChanged\x0a\x09\x09to: self.",
  3429. messageSends: ["on:send:to:", "systemAnnouncer", "model"],
  3430. referencedClasses: ["ClassAdded", "PackageAdded", "PackageClean", "PackageDirty"]
  3431. }),
  3432. globals.HLPackagesListWidget);
  3433. smalltalk.addMethod(
  3434. smalltalk.method({
  3435. selector: "onClassAdded:",
  3436. protocol: 'reactions',
  3437. fn: function (anAnnouncement){
  3438. var self=this;
  3439. return smalltalk.withContext(function($ctx1) {
  3440. var $1,$2;
  3441. $1=_st(self._items())._includes_(_st(_st(anAnnouncement)._theClass())._package());
  3442. if(! smalltalk.assert($1)){
  3443. self._initializeItems();
  3444. $2=self._refresh();
  3445. $2;
  3446. };
  3447. return self}, function($ctx1) {$ctx1.fill(self,"onClassAdded:",{anAnnouncement:anAnnouncement},globals.HLPackagesListWidget)})},
  3448. args: ["anAnnouncement"],
  3449. source: "onClassAdded: anAnnouncement\x0a\x09\x22Amber doesn't have yet a global organizer for packages\x22\x0a\x09\x0a\x09(self items includes: anAnnouncement theClass package) ifFalse: [ \x0a\x09\x09self \x0a\x09\x09\x09initializeItems;\x0a\x09\x09\x09refresh ]",
  3450. messageSends: ["ifFalse:", "includes:", "items", "package", "theClass", "initializeItems", "refresh"],
  3451. referencedClasses: []
  3452. }),
  3453. globals.HLPackagesListWidget);
  3454. smalltalk.addMethod(
  3455. smalltalk.method({
  3456. selector: "onPackageAdded:",
  3457. protocol: 'reactions',
  3458. fn: function (anAnnouncement){
  3459. var self=this;
  3460. return smalltalk.withContext(function($ctx1) {
  3461. var $1;
  3462. self._initializeItems();
  3463. $1=self._refresh();
  3464. return self}, function($ctx1) {$ctx1.fill(self,"onPackageAdded:",{anAnnouncement:anAnnouncement},globals.HLPackagesListWidget)})},
  3465. args: ["anAnnouncement"],
  3466. source: "onPackageAdded: anAnnouncement\x0a\x09self \x0a\x09\x09initializeItems;\x0a\x09\x09refresh",
  3467. messageSends: ["initializeItems", "refresh"],
  3468. referencedClasses: []
  3469. }),
  3470. globals.HLPackagesListWidget);
  3471. smalltalk.addMethod(
  3472. smalltalk.method({
  3473. selector: "onPackageSelected:",
  3474. protocol: 'reactions',
  3475. fn: function (anAnnouncement){
  3476. var self=this;
  3477. var package_;
  3478. return smalltalk.withContext(function($ctx1) {
  3479. var $1,$2;
  3480. package_=_st(anAnnouncement)._item();
  3481. self._selectedItem_(package_);
  3482. $1=self._hasFocus();
  3483. if(! smalltalk.assert($1)){
  3484. self._activateItem_(package_);
  3485. $2=self._focus();
  3486. $2;
  3487. };
  3488. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{anAnnouncement:anAnnouncement,package_:package_},globals.HLPackagesListWidget)})},
  3489. args: ["anAnnouncement"],
  3490. source: "onPackageSelected: anAnnouncement\x0a\x09| package |\x0a\x09\x0a\x09package := anAnnouncement item.\x0a\x09\x0a\x09self selectedItem: package.\x0a\x09self hasFocus ifFalse: [\x0a\x09\x09self\x0a\x09\x09\x09activateItem: package;\x0a\x09\x09\x09focus ]",
  3491. messageSends: ["item", "selectedItem:", "ifFalse:", "hasFocus", "activateItem:", "focus"],
  3492. referencedClasses: []
  3493. }),
  3494. globals.HLPackagesListWidget);
  3495. smalltalk.addMethod(
  3496. smalltalk.method({
  3497. selector: "onPackageStateChanged",
  3498. protocol: 'reactions',
  3499. fn: function (){
  3500. var self=this;
  3501. return smalltalk.withContext(function($ctx1) {
  3502. self._refresh();
  3503. return self}, function($ctx1) {$ctx1.fill(self,"onPackageStateChanged",{},globals.HLPackagesListWidget)})},
  3504. args: [],
  3505. source: "onPackageStateChanged\x0a\x09self refresh",
  3506. messageSends: ["refresh"],
  3507. referencedClasses: []
  3508. }),
  3509. globals.HLPackagesListWidget);
  3510. smalltalk.addMethod(
  3511. smalltalk.method({
  3512. selector: "onPackagesFocusRequested",
  3513. protocol: 'reactions',
  3514. fn: function (){
  3515. var self=this;
  3516. return smalltalk.withContext(function($ctx1) {
  3517. self._focus();
  3518. return self}, function($ctx1) {$ctx1.fill(self,"onPackagesFocusRequested",{},globals.HLPackagesListWidget)})},
  3519. args: [],
  3520. source: "onPackagesFocusRequested\x0a\x09self focus",
  3521. messageSends: ["focus"],
  3522. referencedClasses: []
  3523. }),
  3524. globals.HLPackagesListWidget);
  3525. smalltalk.addMethod(
  3526. smalltalk.method({
  3527. selector: "renderItemLabel:on:",
  3528. protocol: 'rendering',
  3529. fn: function (aPackage,html){
  3530. var self=this;
  3531. return smalltalk.withContext(function($ctx1) {
  3532. _st(html)._with_(_st(aPackage)._name());
  3533. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aPackage:aPackage,html:html},globals.HLPackagesListWidget)})},
  3534. args: ["aPackage", "html"],
  3535. source: "renderItemLabel: aPackage on: html\x0a\x09html with: aPackage name",
  3536. messageSends: ["with:", "name"],
  3537. referencedClasses: []
  3538. }),
  3539. globals.HLPackagesListWidget);
  3540. smalltalk.addMethod(
  3541. smalltalk.method({
  3542. selector: "reselectItem:",
  3543. protocol: 'actions',
  3544. fn: function (anItem){
  3545. var self=this;
  3546. return smalltalk.withContext(function($ctx1) {
  3547. _st(self._model())._forceSelectedPackage_(anItem);
  3548. return self}, function($ctx1) {$ctx1.fill(self,"reselectItem:",{anItem:anItem},globals.HLPackagesListWidget)})},
  3549. args: ["anItem"],
  3550. source: "reselectItem: anItem\x0a\x09self model forceSelectedPackage: anItem",
  3551. messageSends: ["forceSelectedPackage:", "model"],
  3552. referencedClasses: []
  3553. }),
  3554. globals.HLPackagesListWidget);
  3555. smalltalk.addMethod(
  3556. smalltalk.method({
  3557. selector: "selectItem:",
  3558. protocol: 'actions',
  3559. fn: function (aPackage){
  3560. var self=this;
  3561. return smalltalk.withContext(function($ctx1) {
  3562. ($ctx1.supercall = true, globals.HLPackagesListWidget.superclass.fn.prototype._selectItem_.apply(_st(self), [aPackage]));
  3563. $ctx1.supercall = false;
  3564. _st(self._model())._selectedPackage_(aPackage);
  3565. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aPackage:aPackage},globals.HLPackagesListWidget)})},
  3566. args: ["aPackage"],
  3567. source: "selectItem: aPackage\x0a\x09super selectItem: aPackage.\x0a\x09self model selectedPackage: aPackage",
  3568. messageSends: ["selectItem:", "selectedPackage:", "model"],
  3569. referencedClasses: []
  3570. }),
  3571. globals.HLPackagesListWidget);
  3572. smalltalk.addClass('HLProtocolsListWidget', globals.HLToolListWidget, [], 'Helios-Browser');
  3573. globals.HLProtocolsListWidget.comment="I render a list of protocols for the selected class.";
  3574. smalltalk.addMethod(
  3575. smalltalk.method({
  3576. selector: "allProtocol",
  3577. protocol: 'accessing',
  3578. fn: function (){
  3579. var self=this;
  3580. return smalltalk.withContext(function($ctx1) {
  3581. var $1;
  3582. $1=_st(self._model())._allProtocol();
  3583. return $1;
  3584. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{},globals.HLProtocolsListWidget)})},
  3585. args: [],
  3586. source: "allProtocol\x0a\x09^ self model allProtocol",
  3587. messageSends: ["allProtocol", "model"],
  3588. referencedClasses: []
  3589. }),
  3590. globals.HLProtocolsListWidget);
  3591. smalltalk.addMethod(
  3592. smalltalk.method({
  3593. selector: "cssClassForItem:",
  3594. protocol: 'accessing',
  3595. fn: function (anItem){
  3596. var self=this;
  3597. return smalltalk.withContext(function($ctx1) {
  3598. var $1,$2,$3,$4;
  3599. $1=_st(anItem).__eq(self._allProtocol());
  3600. $ctx1.sendIdx["="]=1;
  3601. if(smalltalk.assert($1)){
  3602. return "";
  3603. };
  3604. $2=_st(anItem).__eq("private");
  3605. $ctx1.sendIdx["="]=2;
  3606. if(smalltalk.assert($2)){
  3607. return "private";
  3608. };
  3609. $3=_st(anItem).__eq("initialization");
  3610. if(smalltalk.assert($3)){
  3611. return "initialization";
  3612. };
  3613. $4=_st(anItem)._match_("^\x5c*");
  3614. if(smalltalk.assert($4)){
  3615. return "extension";
  3616. };
  3617. return "";
  3618. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{anItem:anItem},globals.HLProtocolsListWidget)})},
  3619. args: ["anItem"],
  3620. source: "cssClassForItem: anItem\x0a\x09anItem = self allProtocol ifTrue: [ ^ '' ].\x0a\x09anItem = 'private' ifTrue: [ ^ 'private' ].\x0a\x09anItem = 'initialization' ifTrue: [ ^ 'initialization' ].\x0a\x09(anItem match: '^\x5c*') ifTrue: [ ^ 'extension' ].\x0a\x09^ ''",
  3621. messageSends: ["ifTrue:", "=", "allProtocol", "match:"],
  3622. referencedClasses: []
  3623. }),
  3624. globals.HLProtocolsListWidget);
  3625. smalltalk.addMethod(
  3626. smalltalk.method({
  3627. selector: "label",
  3628. protocol: 'accessing',
  3629. fn: function (){
  3630. var self=this;
  3631. return "Protocols";
  3632. },
  3633. args: [],
  3634. source: "label\x0a\x09^ 'Protocols'",
  3635. messageSends: [],
  3636. referencedClasses: []
  3637. }),
  3638. globals.HLProtocolsListWidget);
  3639. smalltalk.addMethod(
  3640. smalltalk.method({
  3641. selector: "observeModel",
  3642. protocol: 'actions',
  3643. fn: function (){
  3644. var self=this;
  3645. function $HLClassSelected(){return globals.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  3646. function $HLShowInstanceToggled(){return globals.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  3647. function $HLProtocolSelected(){return globals.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  3648. function $HLProtocolsFocusRequested(){return globals.HLProtocolsFocusRequested||(typeof HLProtocolsFocusRequested=="undefined"?nil:HLProtocolsFocusRequested)}
  3649. return smalltalk.withContext(function($ctx1) {
  3650. var $1,$2;
  3651. $1=_st(self._model())._announcer();
  3652. _st($1)._on_send_to_($HLClassSelected(),"onClassSelected:",self);
  3653. $ctx1.sendIdx["on:send:to:"]=1;
  3654. _st($1)._on_send_to_($HLShowInstanceToggled(),"onClassSelected:",self);
  3655. $ctx1.sendIdx["on:send:to:"]=2;
  3656. _st($1)._on_send_to_($HLProtocolSelected(),"onProtocolSelected:",self);
  3657. $ctx1.sendIdx["on:send:to:"]=3;
  3658. $2=_st($1)._on_send_to_($HLProtocolsFocusRequested(),"onProtocolsFocusRequested",self);
  3659. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},globals.HLProtocolsListWidget)})},
  3660. args: [],
  3661. source: "observeModel\x0a self model announcer \x0a\x09\x09on: HLClassSelected\x0a\x09\x09send: #onClassSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a \x09on: HLShowInstanceToggled \x0a\x09\x09send: #onClassSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a \x09on: HLProtocolSelected\x0a\x09\x09send: #onProtocolSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLProtocolsFocusRequested \x0a\x09\x09send: #onProtocolsFocusRequested\x0a\x09\x09to: self",
  3662. messageSends: ["on:send:to:", "announcer", "model"],
  3663. referencedClasses: ["HLClassSelected", "HLShowInstanceToggled", "HLProtocolSelected", "HLProtocolsFocusRequested"]
  3664. }),
  3665. globals.HLProtocolsListWidget);
  3666. smalltalk.addMethod(
  3667. smalltalk.method({
  3668. selector: "observeSystem",
  3669. protocol: 'actions',
  3670. fn: function (){
  3671. var self=this;
  3672. function $ProtocolAdded(){return globals.ProtocolAdded||(typeof ProtocolAdded=="undefined"?nil:ProtocolAdded)}
  3673. function $ProtocolRemoved(){return globals.ProtocolRemoved||(typeof ProtocolRemoved=="undefined"?nil:ProtocolRemoved)}
  3674. return smalltalk.withContext(function($ctx1) {
  3675. var $1,$2;
  3676. $1=_st(self._model())._systemAnnouncer();
  3677. _st($1)._on_send_to_($ProtocolAdded(),"onProtocolAdded:",self);
  3678. $ctx1.sendIdx["on:send:to:"]=1;
  3679. $2=_st($1)._on_send_to_($ProtocolRemoved(),"onProtocolRemoved:",self);
  3680. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},globals.HLProtocolsListWidget)})},
  3681. args: [],
  3682. source: "observeSystem\x0a\x09self model systemAnnouncer\x0a\x09\x09on: ProtocolAdded \x0a\x09\x09send: #onProtocolAdded:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: ProtocolRemoved\x0a\x09\x09send: #onProtocolRemoved:\x0a\x09\x09to: self",
  3683. messageSends: ["on:send:to:", "systemAnnouncer", "model"],
  3684. referencedClasses: ["ProtocolAdded", "ProtocolRemoved"]
  3685. }),
  3686. globals.HLProtocolsListWidget);
  3687. smalltalk.addMethod(
  3688. smalltalk.method({
  3689. selector: "onClassSelected:",
  3690. protocol: 'reactions',
  3691. fn: function (anAnnouncement){
  3692. var self=this;
  3693. return smalltalk.withContext(function($ctx1) {
  3694. self._selectedItem_(nil);
  3695. self._setItemsForSelectedClass();
  3696. self._refresh();
  3697. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncement:anAnnouncement},globals.HLProtocolsListWidget)})},
  3698. args: ["anAnnouncement"],
  3699. source: "onClassSelected: anAnnouncement\x0a self selectedItem: nil.\x0a \x0a self setItemsForSelectedClass.\x0a self refresh",
  3700. messageSends: ["selectedItem:", "setItemsForSelectedClass", "refresh"],
  3701. referencedClasses: []
  3702. }),
  3703. globals.HLProtocolsListWidget);
  3704. smalltalk.addMethod(
  3705. smalltalk.method({
  3706. selector: "onProtocolAdded:",
  3707. protocol: 'reactions',
  3708. fn: function (anAnnouncement){
  3709. var self=this;
  3710. var class_;
  3711. return smalltalk.withContext(function($ctx1) {
  3712. var $1;
  3713. class_=_st(anAnnouncement)._theClass();
  3714. $1=_st(class_).__eq(_st(self._model())._selectedClass());
  3715. if(! smalltalk.assert($1)){
  3716. return self;
  3717. };
  3718. self._setItemsForSelectedClass();
  3719. self._refresh();
  3720. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolAdded:",{anAnnouncement:anAnnouncement,class_:class_},globals.HLProtocolsListWidget)})},
  3721. args: ["anAnnouncement"],
  3722. source: "onProtocolAdded: anAnnouncement\x0a\x09| class |\x0a\x09\x0a\x09class := anAnnouncement theClass.\x0a\x09\x0a\x09class = self model selectedClass ifFalse: [ ^ self ].\x0a \x0a self setItemsForSelectedClass.\x0a self refresh",
  3723. messageSends: ["theClass", "ifFalse:", "=", "selectedClass", "model", "setItemsForSelectedClass", "refresh"],
  3724. referencedClasses: []
  3725. }),
  3726. globals.HLProtocolsListWidget);
  3727. smalltalk.addMethod(
  3728. smalltalk.method({
  3729. selector: "onProtocolRemoved:",
  3730. protocol: 'reactions',
  3731. fn: function (anAnnouncement){
  3732. var self=this;
  3733. var class_,protocol;
  3734. return smalltalk.withContext(function($ctx1) {
  3735. var $2,$4,$3,$1,$5,$6;
  3736. class_=_st(anAnnouncement)._theClass();
  3737. protocol=_st(anAnnouncement)._protocol();
  3738. $2=class_;
  3739. $4=self._model();
  3740. $ctx1.sendIdx["model"]=1;
  3741. $3=_st($4)._selectedClass();
  3742. $1=_st($2).__eq($3);
  3743. $ctx1.sendIdx["="]=1;
  3744. if(! smalltalk.assert($1)){
  3745. return self;
  3746. };
  3747. $5=_st(_st(self._model())._selectedProtocol()).__eq(protocol);
  3748. if(smalltalk.assert($5)){
  3749. self._selectedItem_(nil);
  3750. $6=self._selectItem_(nil);
  3751. $6;
  3752. };
  3753. self._setItemsForSelectedClass();
  3754. self._refresh();
  3755. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolRemoved:",{anAnnouncement:anAnnouncement,class_:class_,protocol:protocol},globals.HLProtocolsListWidget)})},
  3756. args: ["anAnnouncement"],
  3757. source: "onProtocolRemoved: anAnnouncement\x0a\x09| class protocol |\x0a\x09\x0a\x09class := anAnnouncement theClass.\x0a\x09protocol := anAnnouncement protocol.\x0a\x09\x0a\x09class = self model selectedClass ifFalse: [ ^ self ].\x0a \x0a self model selectedProtocol = protocol \x0a \x09ifTrue: [ \x0a\x09\x09\x09self \x0a\x09\x09\x09\x09selectedItem: nil;\x0a\x09\x09\x09\x09selectItem: nil ].\x0a \x0a self setItemsForSelectedClass.\x0a self refresh",
  3758. messageSends: ["theClass", "protocol", "ifFalse:", "=", "selectedClass", "model", "ifTrue:", "selectedProtocol", "selectedItem:", "selectItem:", "setItemsForSelectedClass", "refresh"],
  3759. referencedClasses: []
  3760. }),
  3761. globals.HLProtocolsListWidget);
  3762. smalltalk.addMethod(
  3763. smalltalk.method({
  3764. selector: "onProtocolSelected:",
  3765. protocol: 'reactions',
  3766. fn: function (anAnnouncement){
  3767. var self=this;
  3768. var protocol;
  3769. return smalltalk.withContext(function($ctx1) {
  3770. var $1,$2,$3,$receiver;
  3771. protocol=_st(anAnnouncement)._item();
  3772. self._selectedItem_(protocol);
  3773. $1=protocol;
  3774. if(($receiver = $1) == null || $receiver.isNil){
  3775. return self;
  3776. } else {
  3777. $1;
  3778. };
  3779. $2=self._hasFocus();
  3780. if(! smalltalk.assert($2)){
  3781. self._activateItem_(protocol);
  3782. $3=self._focus();
  3783. $3;
  3784. };
  3785. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{anAnnouncement:anAnnouncement,protocol:protocol},globals.HLProtocolsListWidget)})},
  3786. args: ["anAnnouncement"],
  3787. source: "onProtocolSelected: anAnnouncement\x0a\x09| protocol |\x0a\x09\x0a\x09protocol := anAnnouncement item.\x0a\x09\x0a\x09self selectedItem: protocol.\x0a\x09protocol ifNil: [ ^ self ].\x0a \x0a\x09self hasFocus ifFalse: [\x0a\x09\x09self \x0a\x09\x09\x09activateItem: protocol;\x0a\x09\x09\x09focus ]",
  3788. messageSends: ["item", "selectedItem:", "ifNil:", "ifFalse:", "hasFocus", "activateItem:", "focus"],
  3789. referencedClasses: []
  3790. }),
  3791. globals.HLProtocolsListWidget);
  3792. smalltalk.addMethod(
  3793. smalltalk.method({
  3794. selector: "onProtocolsFocusRequested",
  3795. protocol: 'reactions',
  3796. fn: function (){
  3797. var self=this;
  3798. return smalltalk.withContext(function($ctx1) {
  3799. self._focus();
  3800. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolsFocusRequested",{},globals.HLProtocolsListWidget)})},
  3801. args: [],
  3802. source: "onProtocolsFocusRequested\x0a\x09self focus",
  3803. messageSends: ["focus"],
  3804. referencedClasses: []
  3805. }),
  3806. globals.HLProtocolsListWidget);
  3807. smalltalk.addMethod(
  3808. smalltalk.method({
  3809. selector: "renderContentOn:",
  3810. protocol: 'rendering',
  3811. fn: function (html){
  3812. var self=this;
  3813. return smalltalk.withContext(function($ctx1) {
  3814. var $1,$2,$3;
  3815. $1=_st(self._model())._showInstance();
  3816. if(smalltalk.assert($1)){
  3817. ($ctx1.supercall = true, globals.HLProtocolsListWidget.superclass.fn.prototype._renderContentOn_.apply(_st(self), [html]));
  3818. $ctx1.supercall = false;
  3819. } else {
  3820. $2=_st(html)._div();
  3821. _st($2)._class_("class_side");
  3822. $3=_st($2)._with_((function(){
  3823. return smalltalk.withContext(function($ctx2) {
  3824. return ($ctx2.supercall = true, globals.HLProtocolsListWidget.superclass.fn.prototype._renderContentOn_.apply(_st(self), [html]));
  3825. $ctx2.supercall = false;
  3826. $ctx2.sendIdx["renderContentOn:"]=1;
  3827. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  3828. $3;
  3829. };
  3830. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},globals.HLProtocolsListWidget)})},
  3831. args: ["html"],
  3832. source: "renderContentOn: html\x0a\x09self model showInstance\x0a \x09ifFalse: [ html div \x0a \x09class: 'class_side'; \x0a with: [ super renderContentOn: html ] ]\x0a \x09ifTrue: [ super renderContentOn: html ]",
  3833. messageSends: ["ifFalse:ifTrue:", "showInstance", "model", "class:", "div", "with:", "renderContentOn:"],
  3834. referencedClasses: []
  3835. }),
  3836. globals.HLProtocolsListWidget);
  3837. smalltalk.addMethod(
  3838. smalltalk.method({
  3839. selector: "reselectItem:",
  3840. protocol: 'actions',
  3841. fn: function (anItem){
  3842. var self=this;
  3843. return smalltalk.withContext(function($ctx1) {
  3844. _st(self._model())._forceSelectedProtocol_(anItem);
  3845. return self}, function($ctx1) {$ctx1.fill(self,"reselectItem:",{anItem:anItem},globals.HLProtocolsListWidget)})},
  3846. args: ["anItem"],
  3847. source: "reselectItem: anItem\x0a\x09self model forceSelectedProtocol: anItem",
  3848. messageSends: ["forceSelectedProtocol:", "model"],
  3849. referencedClasses: []
  3850. }),
  3851. globals.HLProtocolsListWidget);
  3852. smalltalk.addMethod(
  3853. smalltalk.method({
  3854. selector: "selectItem:",
  3855. protocol: 'actions',
  3856. fn: function (aString){
  3857. var self=this;
  3858. return smalltalk.withContext(function($ctx1) {
  3859. _st(self._model())._selectedProtocol_(aString);
  3860. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aString:aString},globals.HLProtocolsListWidget)})},
  3861. args: ["aString"],
  3862. source: "selectItem: aString\x0a self model selectedProtocol: aString",
  3863. messageSends: ["selectedProtocol:", "model"],
  3864. referencedClasses: []
  3865. }),
  3866. globals.HLProtocolsListWidget);
  3867. smalltalk.addMethod(
  3868. smalltalk.method({
  3869. selector: "selectedItem",
  3870. protocol: 'accessing',
  3871. fn: function (){
  3872. var self=this;
  3873. return smalltalk.withContext(function($ctx1) {
  3874. var $1;
  3875. $1=($ctx1.supercall = true, globals.HLProtocolsListWidget.superclass.fn.prototype._selectedItem.apply(_st(self), []));
  3876. $ctx1.supercall = false;
  3877. return $1;
  3878. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{},globals.HLProtocolsListWidget)})},
  3879. args: [],
  3880. source: "selectedItem\x0a\x09^ super selectedItem\x22 ifNil: [ self allProtocol ]\x22",
  3881. messageSends: ["selectedItem"],
  3882. referencedClasses: []
  3883. }),
  3884. globals.HLProtocolsListWidget);
  3885. smalltalk.addMethod(
  3886. smalltalk.method({
  3887. selector: "setItemsForClass:",
  3888. protocol: 'private',
  3889. fn: function (aClass){
  3890. var self=this;
  3891. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  3892. return smalltalk.withContext(function($ctx1) {
  3893. var $2,$3,$4,$1,$receiver;
  3894. if(($receiver = aClass) == null || $receiver.isNil){
  3895. $2=self._allProtocol();
  3896. $ctx1.sendIdx["allProtocol"]=1;
  3897. $1=_st($Array())._with_($2);
  3898. $ctx1.sendIdx["with:"]=1;
  3899. } else {
  3900. $3=_st($Array())._with_(self._allProtocol());
  3901. _st($3)._addAll_(_st(aClass)._protocols());
  3902. $4=_st($3)._yourself();
  3903. $1=$4;
  3904. };
  3905. self._items_($1);
  3906. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForClass:",{aClass:aClass},globals.HLProtocolsListWidget)})},
  3907. args: ["aClass"],
  3908. source: "setItemsForClass: aClass\x0a\x09self items: (aClass\x0a \x09ifNil: [ Array with: self allProtocol ]\x0a \x09ifNotNil: [ \x0a \x09(Array with: self allProtocol) \x0a \x09addAll: aClass protocols; \x0a yourself ])",
  3909. messageSends: ["items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself"],
  3910. referencedClasses: ["Array"]
  3911. }),
  3912. globals.HLProtocolsListWidget);
  3913. smalltalk.addMethod(
  3914. smalltalk.method({
  3915. selector: "setItemsForSelectedClass",
  3916. protocol: 'private',
  3917. fn: function (){
  3918. var self=this;
  3919. return smalltalk.withContext(function($ctx1) {
  3920. self._setItemsForClass_(_st(self._model())._selectedClass());
  3921. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedClass",{},globals.HLProtocolsListWidget)})},
  3922. args: [],
  3923. source: "setItemsForSelectedClass\x0a\x09self setItemsForClass: self model selectedClass",
  3924. messageSends: ["setItemsForClass:", "selectedClass", "model"],
  3925. referencedClasses: []
  3926. }),
  3927. globals.HLProtocolsListWidget);
  3928. smalltalk.addClass('HLSelectorsCache', globals.Object, ['classesCache'], 'Helios-Browser');
  3929. smalltalk.addMethod(
  3930. smalltalk.method({
  3931. selector: "cacheFor:",
  3932. protocol: 'accessing',
  3933. fn: function (aClass){
  3934. var self=this;
  3935. return smalltalk.withContext(function($ctx1) {
  3936. var $1,$receiver;
  3937. if(($receiver = aClass) == null || $receiver.isNil){
  3938. return nil;
  3939. } else {
  3940. aClass;
  3941. };
  3942. $1=_st(self._classesCache())._at_ifAbsentPut_(_st(aClass)._name(),(function(){
  3943. return smalltalk.withContext(function($ctx2) {
  3944. return self._newCacheFor_(aClass);
  3945. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  3946. return $1;
  3947. }, function($ctx1) {$ctx1.fill(self,"cacheFor:",{aClass:aClass},globals.HLSelectorsCache)})},
  3948. args: ["aClass"],
  3949. source: "cacheFor: aClass\x0a\x09aClass ifNil: [ ^ nil ].\x0a \x0a\x09^ self classesCache\x0a \x09at: aClass name\x0a ifAbsentPut: [ self newCacheFor: aClass ]",
  3950. messageSends: ["ifNil:", "at:ifAbsentPut:", "classesCache", "name", "newCacheFor:"],
  3951. referencedClasses: []
  3952. }),
  3953. globals.HLSelectorsCache);
  3954. smalltalk.addMethod(
  3955. smalltalk.method({
  3956. selector: "classesCache",
  3957. protocol: 'accessing',
  3958. fn: function (){
  3959. var self=this;
  3960. function $HashedCollection(){return globals.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  3961. return smalltalk.withContext(function($ctx1) {
  3962. var $2,$1,$receiver;
  3963. $2=self["@classesCache"];
  3964. if(($receiver = $2) == null || $receiver.isNil){
  3965. self["@classesCache"]=_st($HashedCollection())._new();
  3966. $1=self["@classesCache"];
  3967. } else {
  3968. $1=$2;
  3969. };
  3970. return $1;
  3971. }, function($ctx1) {$ctx1.fill(self,"classesCache",{},globals.HLSelectorsCache)})},
  3972. args: [],
  3973. source: "classesCache\x0a\x09^ classesCache ifNil: [ classesCache := HashedCollection new ]",
  3974. messageSends: ["ifNil:", "new"],
  3975. referencedClasses: ["HashedCollection"]
  3976. }),
  3977. globals.HLSelectorsCache);
  3978. smalltalk.addMethod(
  3979. smalltalk.method({
  3980. selector: "initialize",
  3981. protocol: 'initialization',
  3982. fn: function (){
  3983. var self=this;
  3984. return smalltalk.withContext(function($ctx1) {
  3985. ($ctx1.supercall = true, globals.HLSelectorsCache.superclass.fn.prototype._initialize.apply(_st(self), []));
  3986. $ctx1.supercall = false;
  3987. self._observeSystem();
  3988. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.HLSelectorsCache)})},
  3989. args: [],
  3990. source: "initialize\x0a\x09super initialize.\x0a self observeSystem",
  3991. messageSends: ["initialize", "observeSystem"],
  3992. referencedClasses: []
  3993. }),
  3994. globals.HLSelectorsCache);
  3995. smalltalk.addMethod(
  3996. smalltalk.method({
  3997. selector: "invalidateCacheFor:",
  3998. protocol: 'private',
  3999. fn: function (aMethod){
  4000. var self=this;
  4001. return smalltalk.withContext(function($ctx1) {
  4002. _st(self._cacheFor_(_st(aMethod)._methodClass()))._invalidateSelector_(_st(aMethod)._selector());
  4003. return self}, function($ctx1) {$ctx1.fill(self,"invalidateCacheFor:",{aMethod:aMethod},globals.HLSelectorsCache)})},
  4004. args: ["aMethod"],
  4005. source: "invalidateCacheFor: aMethod\x0a\x09(self cacheFor: aMethod methodClass)\x0a \x09invalidateSelector: aMethod selector",
  4006. messageSends: ["invalidateSelector:", "cacheFor:", "methodClass", "selector"],
  4007. referencedClasses: []
  4008. }),
  4009. globals.HLSelectorsCache);
  4010. smalltalk.addMethod(
  4011. smalltalk.method({
  4012. selector: "isOverridden:",
  4013. protocol: 'testing',
  4014. fn: function (aMethod){
  4015. var self=this;
  4016. return smalltalk.withContext(function($ctx1) {
  4017. var $1;
  4018. $1=_st(self._cacheFor_(_st(aMethod)._methodClass()))._isOverridden_(aMethod);
  4019. return $1;
  4020. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod},globals.HLSelectorsCache)})},
  4021. args: ["aMethod"],
  4022. source: "isOverridden: aMethod\x0a\x09^ (self cacheFor: aMethod methodClass)\x0a \x09isOverridden: aMethod",
  4023. messageSends: ["isOverridden:", "cacheFor:", "methodClass"],
  4024. referencedClasses: []
  4025. }),
  4026. globals.HLSelectorsCache);
  4027. smalltalk.addMethod(
  4028. smalltalk.method({
  4029. selector: "isOverride:",
  4030. protocol: 'testing',
  4031. fn: function (aMethod){
  4032. var self=this;
  4033. return smalltalk.withContext(function($ctx1) {
  4034. var $1;
  4035. $1=_st(self._cacheFor_(_st(aMethod)._methodClass()))._isOverride_(aMethod);
  4036. return $1;
  4037. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod},globals.HLSelectorsCache)})},
  4038. args: ["aMethod"],
  4039. source: "isOverride: aMethod\x0a\x09^ (self cacheFor: aMethod methodClass)\x0a \x09isOverride: aMethod",
  4040. messageSends: ["isOverride:", "cacheFor:", "methodClass"],
  4041. referencedClasses: []
  4042. }),
  4043. globals.HLSelectorsCache);
  4044. smalltalk.addMethod(
  4045. smalltalk.method({
  4046. selector: "newCacheFor:",
  4047. protocol: 'factory',
  4048. fn: function (aClass){
  4049. var self=this;
  4050. function $HLClassCache(){return globals.HLClassCache||(typeof HLClassCache=="undefined"?nil:HLClassCache)}
  4051. return smalltalk.withContext(function($ctx1) {
  4052. var $1;
  4053. $1=_st($HLClassCache())._on_selectorsCache_(aClass,self);
  4054. return $1;
  4055. }, function($ctx1) {$ctx1.fill(self,"newCacheFor:",{aClass:aClass},globals.HLSelectorsCache)})},
  4056. args: ["aClass"],
  4057. source: "newCacheFor: aClass\x0a\x09^ HLClassCache \x0a \x09on: aClass\x0a selectorsCache: self",
  4058. messageSends: ["on:selectorsCache:"],
  4059. referencedClasses: ["HLClassCache"]
  4060. }),
  4061. globals.HLSelectorsCache);
  4062. smalltalk.addMethod(
  4063. smalltalk.method({
  4064. selector: "observeSystem",
  4065. protocol: 'actions',
  4066. fn: function (){
  4067. var self=this;
  4068. function $SystemAnnouncer(){return globals.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  4069. function $MethodAdded(){return globals.MethodAdded||(typeof MethodAdded=="undefined"?nil:MethodAdded)}
  4070. function $MethodRemoved(){return globals.MethodRemoved||(typeof MethodRemoved=="undefined"?nil:MethodRemoved)}
  4071. return smalltalk.withContext(function($ctx1) {
  4072. var $1,$2;
  4073. $1=_st($SystemAnnouncer())._current();
  4074. _st($1)._on_send_to_($MethodAdded(),"onMethodAdded:",self);
  4075. $ctx1.sendIdx["on:send:to:"]=1;
  4076. $2=_st($1)._on_send_to_($MethodRemoved(),"onMethodRemoved:",self);
  4077. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},globals.HLSelectorsCache)})},
  4078. args: [],
  4079. source: "observeSystem\x0a\x09SystemAnnouncer current\x0a\x09\x09on: MethodAdded\x0a\x09\x09send: #onMethodAdded:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: MethodRemoved\x0a send: #onMethodRemoved:\x0a\x09\x09to: self",
  4080. messageSends: ["on:send:to:", "current"],
  4081. referencedClasses: ["SystemAnnouncer", "MethodAdded", "MethodRemoved"]
  4082. }),
  4083. globals.HLSelectorsCache);
  4084. smalltalk.addMethod(
  4085. smalltalk.method({
  4086. selector: "onMethodAdded:",
  4087. protocol: 'reactions',
  4088. fn: function (anAnnouncement){
  4089. var self=this;
  4090. return smalltalk.withContext(function($ctx1) {
  4091. self._invalidateCacheFor_(_st(anAnnouncement)._method());
  4092. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{anAnnouncement:anAnnouncement},globals.HLSelectorsCache)})},
  4093. args: ["anAnnouncement"],
  4094. source: "onMethodAdded: anAnnouncement\x0a\x09self invalidateCacheFor: anAnnouncement method",
  4095. messageSends: ["invalidateCacheFor:", "method"],
  4096. referencedClasses: []
  4097. }),
  4098. globals.HLSelectorsCache);
  4099. smalltalk.addMethod(
  4100. smalltalk.method({
  4101. selector: "onMethodRemoved:",
  4102. protocol: 'reactions',
  4103. fn: function (anAnnouncement){
  4104. var self=this;
  4105. return smalltalk.withContext(function($ctx1) {
  4106. self._invalidateCacheFor_(_st(anAnnouncement)._method());
  4107. return self}, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{anAnnouncement:anAnnouncement},globals.HLSelectorsCache)})},
  4108. args: ["anAnnouncement"],
  4109. source: "onMethodRemoved: anAnnouncement\x0a\x09self invalidateCacheFor: anAnnouncement method",
  4110. messageSends: ["invalidateCacheFor:", "method"],
  4111. referencedClasses: []
  4112. }),
  4113. globals.HLSelectorsCache);
  4114. globals.HLSelectorsCache.klass.iVarNames = ['current'];
  4115. smalltalk.addMethod(
  4116. smalltalk.method({
  4117. selector: "current",
  4118. protocol: 'accessing',
  4119. fn: function (){
  4120. var self=this;
  4121. return smalltalk.withContext(function($ctx1) {
  4122. var $2,$1,$receiver;
  4123. $2=self["@current"];
  4124. if(($receiver = $2) == null || $receiver.isNil){
  4125. self["@current"]=($ctx1.supercall = true, globals.HLSelectorsCache.klass.superclass.fn.prototype._new.apply(_st(self), []));
  4126. $ctx1.supercall = false;
  4127. $1=self["@current"];
  4128. } else {
  4129. $1=$2;
  4130. };
  4131. return $1;
  4132. }, function($ctx1) {$ctx1.fill(self,"current",{},globals.HLSelectorsCache.klass)})},
  4133. args: [],
  4134. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  4135. messageSends: ["ifNil:", "new"],
  4136. referencedClasses: []
  4137. }),
  4138. globals.HLSelectorsCache.klass);
  4139. smalltalk.addMethod(
  4140. smalltalk.method({
  4141. selector: "flush",
  4142. protocol: 'accessing',
  4143. fn: function (){
  4144. var self=this;
  4145. self["@current"]=nil;
  4146. return self},
  4147. args: [],
  4148. source: "flush\x0a\x09current := nil",
  4149. messageSends: [],
  4150. referencedClasses: []
  4151. }),
  4152. globals.HLSelectorsCache.klass);
  4153. smalltalk.addMethod(
  4154. smalltalk.method({
  4155. selector: "new",
  4156. protocol: 'instance creation',
  4157. fn: function (){
  4158. var self=this;
  4159. return smalltalk.withContext(function($ctx1) {
  4160. self._shouldNotImplement();
  4161. return self}, function($ctx1) {$ctx1.fill(self,"new",{},globals.HLSelectorsCache.klass)})},
  4162. args: [],
  4163. source: "new\x0a\x09self shouldNotImplement",
  4164. messageSends: ["shouldNotImplement"],
  4165. referencedClasses: []
  4166. }),
  4167. globals.HLSelectorsCache.klass);
  4168. });