Helios-Browser.js 156 KB

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