Helios-Browser.js 146 KB

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