Helios-Browser.js 142 KB

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