Helios-Browser.js 155 KB

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