Helios-Browser.js 155 KB

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