Helios-Browser.js 144 KB

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