Helios-Browser.js 154 KB

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