Helios-Browser.js 145 KB

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