1
0

Helios-Browser.deploy.js 108 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990
  1. smalltalk.addPackage('Helios-Browser');
  2. smalltalk.addClass('HLBrowser', smalltalk.HLWidget, ['model', 'packagesListWidget', 'classesListWidget', 'protocolsListWidget', 'methodsListWidget', 'sourceWidget', 'bottomDiv'], 'Helios-Browser');
  3. smalltalk.addMethod(
  4. smalltalk.method({
  5. selector: "canHaveFocus",
  6. fn: function (){
  7. var self=this;
  8. return smalltalk.withContext(function($ctx1) {
  9. return true;
  10. }, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLBrowser)})},
  11. messageSends: []}),
  12. smalltalk.HLBrowser);
  13. smalltalk.addMethod(
  14. smalltalk.method({
  15. selector: "classesListWidget",
  16. fn: function (){
  17. var self=this;
  18. function $HLClassesListWidget(){return smalltalk.HLClassesListWidget||(typeof HLClassesListWidget=="undefined"?nil:HLClassesListWidget)}
  19. return smalltalk.withContext(function($ctx1) {
  20. var $2,$1;
  21. $2=self["@classesListWidget"];
  22. if(($receiver = $2) == nil || $receiver == undefined){
  23. self["@classesListWidget"]=_st($HLClassesListWidget())._on_(_st(self)._model());
  24. self["@classesListWidget"];
  25. $1=_st(self["@classesListWidget"])._next_(_st(self)._protocolsListWidget());
  26. } else {
  27. $1=$2;
  28. };
  29. return $1;
  30. }, function($ctx1) {$ctx1.fill(self,"classesListWidget",{},smalltalk.HLBrowser)})},
  31. messageSends: ["ifNil:", "on:", "model", "next:", "protocolsListWidget"]}),
  32. smalltalk.HLBrowser);
  33. smalltalk.addMethod(
  34. smalltalk.method({
  35. selector: "environment",
  36. fn: function (){
  37. var self=this;
  38. return smalltalk.withContext(function($ctx1) {
  39. var $1;
  40. $1=_st(_st(self)._model())._environment();
  41. return $1;
  42. }, function($ctx1) {$ctx1.fill(self,"environment",{},smalltalk.HLBrowser)})},
  43. messageSends: ["environment", "model"]}),
  44. smalltalk.HLBrowser);
  45. smalltalk.addMethod(
  46. smalltalk.method({
  47. selector: "focus",
  48. fn: function (){
  49. var self=this;
  50. return smalltalk.withContext(function($ctx1) {
  51. var $1;
  52. $1=_st(_st(self)._packagesListWidget())._focus();
  53. return $1;
  54. }, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLBrowser)})},
  55. messageSends: ["focus", "packagesListWidget"]}),
  56. smalltalk.HLBrowser);
  57. smalltalk.addMethod(
  58. smalltalk.method({
  59. selector: "methodsListWidget",
  60. fn: function (){
  61. var self=this;
  62. function $HLMethodsListWidget(){return smalltalk.HLMethodsListWidget||(typeof HLMethodsListWidget=="undefined"?nil:HLMethodsListWidget)}
  63. return smalltalk.withContext(function($ctx1) {
  64. var $2,$1;
  65. $2=self["@methodsListWidget"];
  66. if(($receiver = $2) == nil || $receiver == undefined){
  67. self["@methodsListWidget"]=_st($HLMethodsListWidget())._on_(_st(self)._model());
  68. self["@methodsListWidget"];
  69. $1=_st(self["@methodsListWidget"])._next_(_st(self)._sourceWidget());
  70. } else {
  71. $1=$2;
  72. };
  73. return $1;
  74. }, function($ctx1) {$ctx1.fill(self,"methodsListWidget",{},smalltalk.HLBrowser)})},
  75. messageSends: ["ifNil:", "on:", "model", "next:", "sourceWidget"]}),
  76. smalltalk.HLBrowser);
  77. smalltalk.addMethod(
  78. smalltalk.method({
  79. selector: "model",
  80. fn: function (){
  81. var self=this;
  82. function $HLBrowserModel(){return smalltalk.HLBrowserModel||(typeof HLBrowserModel=="undefined"?nil:HLBrowserModel)}
  83. return smalltalk.withContext(function($ctx1) {
  84. var $2,$1;
  85. $2=self["@model"];
  86. if(($receiver = $2) == nil || $receiver == undefined){
  87. self["@model"]=_st($HLBrowserModel())._new();
  88. $1=self["@model"];
  89. } else {
  90. $1=$2;
  91. };
  92. return $1;
  93. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLBrowser)})},
  94. messageSends: ["ifNil:", "new"]}),
  95. smalltalk.HLBrowser);
  96. smalltalk.addMethod(
  97. smalltalk.method({
  98. selector: "model:",
  99. fn: function (aModel){
  100. var self=this;
  101. return smalltalk.withContext(function($ctx1) {
  102. self["@model"]=aModel;
  103. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLBrowser)})},
  104. messageSends: []}),
  105. smalltalk.HLBrowser);
  106. smalltalk.addMethod(
  107. smalltalk.method({
  108. selector: "packagesListWidget",
  109. fn: function (){
  110. var self=this;
  111. function $HLPackagesListWidget(){return smalltalk.HLPackagesListWidget||(typeof HLPackagesListWidget=="undefined"?nil:HLPackagesListWidget)}
  112. return smalltalk.withContext(function($ctx1) {
  113. var $2,$1;
  114. $2=self["@packagesListWidget"];
  115. if(($receiver = $2) == nil || $receiver == undefined){
  116. self["@packagesListWidget"]=_st($HLPackagesListWidget())._on_(_st(self)._model());
  117. self["@packagesListWidget"];
  118. $1=_st(self["@packagesListWidget"])._next_(_st(self)._classesListWidget());
  119. } else {
  120. $1=$2;
  121. };
  122. return $1;
  123. }, function($ctx1) {$ctx1.fill(self,"packagesListWidget",{},smalltalk.HLBrowser)})},
  124. messageSends: ["ifNil:", "on:", "model", "next:", "classesListWidget"]}),
  125. smalltalk.HLBrowser);
  126. smalltalk.addMethod(
  127. smalltalk.method({
  128. selector: "protocolsListWidget",
  129. fn: function (){
  130. var self=this;
  131. function $HLProtocolsListWidget(){return smalltalk.HLProtocolsListWidget||(typeof HLProtocolsListWidget=="undefined"?nil:HLProtocolsListWidget)}
  132. return smalltalk.withContext(function($ctx1) {
  133. var $2,$1;
  134. $2=self["@protocolsListWidget"];
  135. if(($receiver = $2) == nil || $receiver == undefined){
  136. self["@protocolsListWidget"]=_st($HLProtocolsListWidget())._on_(_st(self)._model());
  137. self["@protocolsListWidget"];
  138. $1=_st(self["@protocolsListWidget"])._next_(_st(self)._methodsListWidget());
  139. } else {
  140. $1=$2;
  141. };
  142. return $1;
  143. }, function($ctx1) {$ctx1.fill(self,"protocolsListWidget",{},smalltalk.HLBrowser)})},
  144. messageSends: ["ifNil:", "on:", "model", "next:", "methodsListWidget"]}),
  145. smalltalk.HLBrowser);
  146. smalltalk.addMethod(
  147. smalltalk.method({
  148. selector: "registerBindingsOn:",
  149. fn: function (aBindingGroup){
  150. var self=this;
  151. function $HLToolCommand(){return smalltalk.HLToolCommand||(typeof HLToolCommand=="undefined"?nil:HLToolCommand)}
  152. return smalltalk.withContext(function($ctx1) {
  153. _st($HLToolCommand())._registerConcreteClassesOn_for_(aBindingGroup,_st(self)._model());
  154. return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup},smalltalk.HLBrowser)})},
  155. messageSends: ["registerConcreteClassesOn:for:", "model"]}),
  156. smalltalk.HLBrowser);
  157. smalltalk.addMethod(
  158. smalltalk.method({
  159. selector: "renderContentOn:",
  160. fn: function (html){
  161. var self=this;
  162. function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  163. function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  164. function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  165. return smalltalk.withContext(function($ctx1) {
  166. _st(html)._with_(_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(_st(self)._packagesListWidget(),_st(self)._classesListWidget()),_st($HLVerticalSplitter())._with_with_(_st(self)._protocolsListWidget(),_st(self)._methodsListWidget())),_st(self)._sourceWidget())));
  167. _st(_st(self)._packagesListWidget())._focus();
  168. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLBrowser)})},
  169. messageSends: ["with:", "with:with:", "packagesListWidget", "classesListWidget", "protocolsListWidget", "methodsListWidget", "sourceWidget", "focus"]}),
  170. smalltalk.HLBrowser);
  171. smalltalk.addMethod(
  172. smalltalk.method({
  173. selector: "sourceWidget",
  174. fn: function (){
  175. var self=this;
  176. function $HLBrowserBottomWidget(){return smalltalk.HLBrowserBottomWidget||(typeof HLBrowserBottomWidget=="undefined"?nil:HLBrowserBottomWidget)}
  177. return smalltalk.withContext(function($ctx1) {
  178. var $2,$3,$4,$1;
  179. $2=self["@sourceWidget"];
  180. if(($receiver = $2) == nil || $receiver == undefined){
  181. $3=_st($HLBrowserBottomWidget())._new();
  182. _st($3)._model_(_st(self)._model());
  183. $4=_st($3)._yourself();
  184. self["@sourceWidget"]=$4;
  185. $1=self["@sourceWidget"];
  186. } else {
  187. $1=$2;
  188. };
  189. return $1;
  190. }, function($ctx1) {$ctx1.fill(self,"sourceWidget",{},smalltalk.HLBrowser)})},
  191. messageSends: ["ifNil:", "model:", "model", "new", "yourself"]}),
  192. smalltalk.HLBrowser);
  193. smalltalk.addMethod(
  194. smalltalk.method({
  195. selector: "unregister",
  196. fn: function (){
  197. var self=this;
  198. return smalltalk.withContext(function($ctx1) {
  199. smalltalk.HLWidget.fn.prototype._unregister.apply(_st(self), []);
  200. _st([_st(self)._packagesListWidget(),_st(self)._classesListWidget(),_st(self)._protocolsListWidget(),_st(self)._methodsListWidget(),_st(self)._sourceWidget()])._do_((function(each){
  201. return smalltalk.withContext(function($ctx2) {
  202. return _st(each)._unregister();
  203. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  204. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLBrowser)})},
  205. messageSends: ["unregister", "do:", "packagesListWidget", "classesListWidget", "protocolsListWidget", "methodsListWidget", "sourceWidget"]}),
  206. smalltalk.HLBrowser);
  207. smalltalk.HLBrowser.klass.iVarNames = ['nextId'];
  208. smalltalk.addMethod(
  209. smalltalk.method({
  210. selector: "canBeOpenAsTab",
  211. fn: function (){
  212. var self=this;
  213. return smalltalk.withContext(function($ctx1) {
  214. return true;
  215. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLBrowser.klass)})},
  216. messageSends: []}),
  217. smalltalk.HLBrowser.klass);
  218. smalltalk.addMethod(
  219. smalltalk.method({
  220. selector: "nextId",
  221. fn: function (){
  222. var self=this;
  223. return smalltalk.withContext(function($ctx1) {
  224. var $1,$2;
  225. $1=self["@nextId"];
  226. if(($receiver = $1) == nil || $receiver == undefined){
  227. self["@nextId"]=(0);
  228. self["@nextId"];
  229. } else {
  230. $1;
  231. };
  232. $2=_st("browser_").__comma(_st(_st(self["@nextId"]).__plus((1)))._asString());
  233. return $2;
  234. }, function($ctx1) {$ctx1.fill(self,"nextId",{},smalltalk.HLBrowser.klass)})},
  235. messageSends: ["ifNil:", ",", "asString", "+"]}),
  236. smalltalk.HLBrowser.klass);
  237. smalltalk.addMethod(
  238. smalltalk.method({
  239. selector: "tabClass",
  240. fn: function (){
  241. var self=this;
  242. return smalltalk.withContext(function($ctx1) {
  243. return "browser";
  244. }, function($ctx1) {$ctx1.fill(self,"tabClass",{},smalltalk.HLBrowser.klass)})},
  245. messageSends: []}),
  246. smalltalk.HLBrowser.klass);
  247. smalltalk.addMethod(
  248. smalltalk.method({
  249. selector: "tabLabel",
  250. fn: function (){
  251. var self=this;
  252. return smalltalk.withContext(function($ctx1) {
  253. return "Browser";
  254. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLBrowser.klass)})},
  255. messageSends: []}),
  256. smalltalk.HLBrowser.klass);
  257. smalltalk.addMethod(
  258. smalltalk.method({
  259. selector: "tabPriority",
  260. fn: function (){
  261. var self=this;
  262. return smalltalk.withContext(function($ctx1) {
  263. var $1;
  264. $1=(0);
  265. return $1;
  266. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLBrowser.klass)})},
  267. messageSends: []}),
  268. smalltalk.HLBrowser.klass);
  269. smalltalk.addClass('HLBrowserBottomWidget', smalltalk.HLWidget, ['model', 'codeWidget', 'documentationWidget'], 'Helios-Browser');
  270. smalltalk.addMethod(
  271. smalltalk.method({
  272. selector: "canHaveFocus",
  273. fn: function (){
  274. var self=this;
  275. return smalltalk.withContext(function($ctx1) {
  276. return true;
  277. }, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLBrowserBottomWidget)})},
  278. messageSends: []}),
  279. smalltalk.HLBrowserBottomWidget);
  280. smalltalk.addMethod(
  281. smalltalk.method({
  282. selector: "codeWidget",
  283. fn: function (){
  284. var self=this;
  285. function $HLBrowserCodeWidget(){return smalltalk.HLBrowserCodeWidget||(typeof HLBrowserCodeWidget=="undefined"?nil:HLBrowserCodeWidget)}
  286. return smalltalk.withContext(function($ctx1) {
  287. var $2,$3,$4,$1;
  288. $2=self["@codeWidget"];
  289. if(($receiver = $2) == nil || $receiver == undefined){
  290. $3=_st($HLBrowserCodeWidget())._new();
  291. _st($3)._browserModel_(_st(self)._model());
  292. $4=_st($3)._yourself();
  293. self["@codeWidget"]=$4;
  294. $1=self["@codeWidget"];
  295. } else {
  296. $1=$2;
  297. };
  298. return $1;
  299. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{},smalltalk.HLBrowserBottomWidget)})},
  300. messageSends: ["ifNil:", "browserModel:", "model", "new", "yourself"]}),
  301. smalltalk.HLBrowserBottomWidget);
  302. smalltalk.addMethod(
  303. smalltalk.method({
  304. selector: "documentationWidget",
  305. fn: function (){
  306. var self=this;
  307. function $HLDocumentationWidget(){return smalltalk.HLDocumentationWidget||(typeof HLDocumentationWidget=="undefined"?nil:HLDocumentationWidget)}
  308. return smalltalk.withContext(function($ctx1) {
  309. var $2,$3,$4,$1;
  310. $2=self["@documentationWidget"];
  311. if(($receiver = $2) == nil || $receiver == undefined){
  312. $3=_st($HLDocumentationWidget())._new();
  313. _st($3)._model_(_st(self)._model());
  314. $4=_st($3)._yourself();
  315. self["@documentationWidget"]=$4;
  316. $1=self["@documentationWidget"];
  317. } else {
  318. $1=$2;
  319. };
  320. return $1;
  321. }, function($ctx1) {$ctx1.fill(self,"documentationWidget",{},smalltalk.HLBrowserBottomWidget)})},
  322. messageSends: ["ifNil:", "model:", "model", "new", "yourself"]}),
  323. smalltalk.HLBrowserBottomWidget);
  324. smalltalk.addMethod(
  325. smalltalk.method({
  326. selector: "focus",
  327. fn: function (){
  328. var self=this;
  329. return smalltalk.withContext(function($ctx1) {
  330. _st(_st(self)._codeWidget())._focus();
  331. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLBrowserBottomWidget)})},
  332. messageSends: ["focus", "codeWidget"]}),
  333. smalltalk.HLBrowserBottomWidget);
  334. smalltalk.addMethod(
  335. smalltalk.method({
  336. selector: "model",
  337. fn: function (){
  338. var self=this;
  339. return smalltalk.withContext(function($ctx1) {
  340. var $1;
  341. $1=self["@model"];
  342. return $1;
  343. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLBrowserBottomWidget)})},
  344. messageSends: []}),
  345. smalltalk.HLBrowserBottomWidget);
  346. smalltalk.addMethod(
  347. smalltalk.method({
  348. selector: "model:",
  349. fn: function (aModel){
  350. var self=this;
  351. return smalltalk.withContext(function($ctx1) {
  352. self["@model"]=aModel;
  353. _st(self)._observeModel();
  354. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLBrowserBottomWidget)})},
  355. messageSends: ["observeModel"]}),
  356. smalltalk.HLBrowserBottomWidget);
  357. smalltalk.addMethod(
  358. smalltalk.method({
  359. selector: "observeModel",
  360. fn: function (){
  361. var self=this;
  362. function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  363. function $HLShowCommentToggled(){return smalltalk.HLShowCommentToggled||(typeof HLShowCommentToggled=="undefined"?nil:HLShowCommentToggled)}
  364. return smalltalk.withContext(function($ctx1) {
  365. var $1,$2;
  366. $1=_st(_st(self)._model())._announcer();
  367. _st($1)._on_send_to_($HLShowInstanceToggled(),"onShowInstanceToggled",self);
  368. $2=_st($1)._on_send_to_($HLShowCommentToggled(),"onShowCommentToggled",self);
  369. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLBrowserBottomWidget)})},
  370. messageSends: ["on:send:to:", "announcer", "model"]}),
  371. smalltalk.HLBrowserBottomWidget);
  372. smalltalk.addMethod(
  373. smalltalk.method({
  374. selector: "onShowCommentToggled",
  375. fn: function (){
  376. var self=this;
  377. return smalltalk.withContext(function($ctx1) {
  378. _st(self)._refresh();
  379. return self}, function($ctx1) {$ctx1.fill(self,"onShowCommentToggled",{},smalltalk.HLBrowserBottomWidget)})},
  380. messageSends: ["refresh"]}),
  381. smalltalk.HLBrowserBottomWidget);
  382. smalltalk.addMethod(
  383. smalltalk.method({
  384. selector: "onShowInstanceToggled",
  385. fn: function (){
  386. var self=this;
  387. return smalltalk.withContext(function($ctx1) {
  388. _st(self)._refresh();
  389. return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{},smalltalk.HLBrowserBottomWidget)})},
  390. messageSends: ["refresh"]}),
  391. smalltalk.HLBrowserBottomWidget);
  392. smalltalk.addMethod(
  393. smalltalk.method({
  394. selector: "previous",
  395. fn: function (){
  396. var self=this;
  397. return smalltalk.withContext(function($ctx1) {
  398. return self}, function($ctx1) {$ctx1.fill(self,"previous",{},smalltalk.HLBrowserBottomWidget)})},
  399. messageSends: []}),
  400. smalltalk.HLBrowserBottomWidget);
  401. smalltalk.addMethod(
  402. smalltalk.method({
  403. selector: "previous:",
  404. fn: function (aWidget){
  405. var self=this;
  406. return smalltalk.withContext(function($ctx1) {
  407. return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},smalltalk.HLBrowserBottomWidget)})},
  408. messageSends: []}),
  409. smalltalk.HLBrowserBottomWidget);
  410. smalltalk.addMethod(
  411. smalltalk.method({
  412. selector: "renderContentOn:",
  413. fn: function (html){
  414. var self=this;
  415. return smalltalk.withContext(function($ctx1) {
  416. var $1;
  417. $1=_st(_st(self)._model())._showComment();
  418. if(smalltalk.assert($1)){
  419. _st(self)._renderPanesOn_(html);
  420. } else {
  421. _st(html)._with_(_st(self)._codeWidget());
  422. };
  423. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLBrowserBottomWidget)})},
  424. messageSends: ["ifTrue:ifFalse:", "renderPanesOn:", "with:", "codeWidget", "showComment", "model"]}),
  425. smalltalk.HLBrowserBottomWidget);
  426. smalltalk.addMethod(
  427. smalltalk.method({
  428. selector: "renderPanesOn:",
  429. fn: function (html){
  430. var self=this;
  431. function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  432. return smalltalk.withContext(function($ctx1) {
  433. _st(html)._with_(_st($HLVerticalSplitter())._with_with_(_st(self)._codeWidget(),_st(self)._documentationWidget()));
  434. return self}, function($ctx1) {$ctx1.fill(self,"renderPanesOn:",{html:html},smalltalk.HLBrowserBottomWidget)})},
  435. messageSends: ["with:", "with:with:", "codeWidget", "documentationWidget"]}),
  436. smalltalk.HLBrowserBottomWidget);
  437. smalltalk.addClass('HLBrowserModel', smalltalk.HLToolModel, ['showInstance', 'showComment'], 'Helios-Browser');
  438. smalltalk.addMethod(
  439. smalltalk.method({
  440. selector: "editComment",
  441. fn: function (){
  442. var self=this;
  443. function $HLEditComment(){return smalltalk.HLEditComment||(typeof HLEditComment=="undefined"?nil:HLEditComment)}
  444. return smalltalk.withContext(function($ctx1) {
  445. _st(_st(self)._announcer())._announce_(_st($HLEditComment())._new());
  446. return self}, function($ctx1) {$ctx1.fill(self,"editComment",{},smalltalk.HLBrowserModel)})},
  447. messageSends: ["announce:", "new", "announcer"]}),
  448. smalltalk.HLBrowserModel);
  449. smalltalk.addMethod(
  450. smalltalk.method({
  451. selector: "focusOnClasses",
  452. fn: function (){
  453. var self=this;
  454. function $HLClassesFocusRequested(){return smalltalk.HLClassesFocusRequested||(typeof HLClassesFocusRequested=="undefined"?nil:HLClassesFocusRequested)}
  455. return smalltalk.withContext(function($ctx1) {
  456. _st(_st(self)._announcer())._announce_(_st($HLClassesFocusRequested())._new());
  457. return self}, function($ctx1) {$ctx1.fill(self,"focusOnClasses",{},smalltalk.HLBrowserModel)})},
  458. messageSends: ["announce:", "new", "announcer"]}),
  459. smalltalk.HLBrowserModel);
  460. smalltalk.addMethod(
  461. smalltalk.method({
  462. selector: "focusOnMethods",
  463. fn: function (){
  464. var self=this;
  465. function $HLMethodsFocusRequested(){return smalltalk.HLMethodsFocusRequested||(typeof HLMethodsFocusRequested=="undefined"?nil:HLMethodsFocusRequested)}
  466. return smalltalk.withContext(function($ctx1) {
  467. _st(_st(self)._announcer())._announce_(_st($HLMethodsFocusRequested())._new());
  468. return self}, function($ctx1) {$ctx1.fill(self,"focusOnMethods",{},smalltalk.HLBrowserModel)})},
  469. messageSends: ["announce:", "new", "announcer"]}),
  470. smalltalk.HLBrowserModel);
  471. smalltalk.addMethod(
  472. smalltalk.method({
  473. selector: "focusOnPackages",
  474. fn: function (){
  475. var self=this;
  476. function $HLPackagesFocusRequested(){return smalltalk.HLPackagesFocusRequested||(typeof HLPackagesFocusRequested=="undefined"?nil:HLPackagesFocusRequested)}
  477. return smalltalk.withContext(function($ctx1) {
  478. _st(_st(self)._announcer())._announce_(_st($HLPackagesFocusRequested())._new());
  479. return self}, function($ctx1) {$ctx1.fill(self,"focusOnPackages",{},smalltalk.HLBrowserModel)})},
  480. messageSends: ["announce:", "new", "announcer"]}),
  481. smalltalk.HLBrowserModel);
  482. smalltalk.addMethod(
  483. smalltalk.method({
  484. selector: "focusOnProtocols",
  485. fn: function (){
  486. var self=this;
  487. function $HLProtocolsFocusRequested(){return smalltalk.HLProtocolsFocusRequested||(typeof HLProtocolsFocusRequested=="undefined"?nil:HLProtocolsFocusRequested)}
  488. return smalltalk.withContext(function($ctx1) {
  489. _st(_st(self)._announcer())._announce_(_st($HLProtocolsFocusRequested())._new());
  490. return self}, function($ctx1) {$ctx1.fill(self,"focusOnProtocols",{},smalltalk.HLBrowserModel)})},
  491. messageSends: ["announce:", "new", "announcer"]}),
  492. smalltalk.HLBrowserModel);
  493. smalltalk.addMethod(
  494. smalltalk.method({
  495. selector: "focusOnSourceCode",
  496. fn: function (){
  497. var self=this;
  498. function $HLSourceCodeFocusRequested(){return smalltalk.HLSourceCodeFocusRequested||(typeof HLSourceCodeFocusRequested=="undefined"?nil:HLSourceCodeFocusRequested)}
  499. return smalltalk.withContext(function($ctx1) {
  500. _st(_st(self)._announcer())._announce_(_st($HLSourceCodeFocusRequested())._new());
  501. return self}, function($ctx1) {$ctx1.fill(self,"focusOnSourceCode",{},smalltalk.HLBrowserModel)})},
  502. messageSends: ["announce:", "new", "announcer"]}),
  503. smalltalk.HLBrowserModel);
  504. smalltalk.addMethod(
  505. smalltalk.method({
  506. selector: "isBrowserModel",
  507. fn: function (){
  508. var self=this;
  509. return smalltalk.withContext(function($ctx1) {
  510. return true;
  511. }, function($ctx1) {$ctx1.fill(self,"isBrowserModel",{},smalltalk.HLBrowserModel)})},
  512. messageSends: []}),
  513. smalltalk.HLBrowserModel);
  514. smalltalk.addMethod(
  515. smalltalk.method({
  516. selector: "setClassComment:",
  517. fn: function (aString){
  518. var self=this;
  519. return smalltalk.withContext(function($ctx1) {
  520. _st(_st(self)._environment())._setClassCommentOf_to_(_st(_st(self)._selectedClass())._theNonMetaClass(),aString);
  521. return self}, function($ctx1) {$ctx1.fill(self,"setClassComment:",{aString:aString},smalltalk.HLBrowserModel)})},
  522. messageSends: ["setClassCommentOf:to:", "theNonMetaClass", "selectedClass", "environment"]}),
  523. smalltalk.HLBrowserModel);
  524. smalltalk.addMethod(
  525. smalltalk.method({
  526. selector: "showComment",
  527. fn: function (){
  528. var self=this;
  529. return smalltalk.withContext(function($ctx1) {
  530. var $2,$1;
  531. $2=self["@showComment"];
  532. if(($receiver = $2) == nil || $receiver == undefined){
  533. $1=false;
  534. } else {
  535. $1=$2;
  536. };
  537. return $1;
  538. }, function($ctx1) {$ctx1.fill(self,"showComment",{},smalltalk.HLBrowserModel)})},
  539. messageSends: ["ifNil:"]}),
  540. smalltalk.HLBrowserModel);
  541. smalltalk.addMethod(
  542. smalltalk.method({
  543. selector: "showComment:",
  544. fn: function (aBoolean){
  545. var self=this;
  546. function $HLShowCommentToggled(){return smalltalk.HLShowCommentToggled||(typeof HLShowCommentToggled=="undefined"?nil:HLShowCommentToggled)}
  547. return smalltalk.withContext(function($ctx1) {
  548. _st(self)._withChangesDo_((function(){
  549. return smalltalk.withContext(function($ctx2) {
  550. self["@showComment"]=aBoolean;
  551. self["@showComment"];
  552. return _st(_st(self)._announcer())._announce_(_st($HLShowCommentToggled())._new());
  553. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  554. return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean},smalltalk.HLBrowserModel)})},
  555. messageSends: ["withChangesDo:", "announce:", "new", "announcer"]}),
  556. smalltalk.HLBrowserModel);
  557. smalltalk.addMethod(
  558. smalltalk.method({
  559. selector: "showInstance",
  560. fn: function (){
  561. var self=this;
  562. return smalltalk.withContext(function($ctx1) {
  563. var $2,$1;
  564. $2=self["@showInstance"];
  565. if(($receiver = $2) == nil || $receiver == undefined){
  566. $1=true;
  567. } else {
  568. $1=$2;
  569. };
  570. return $1;
  571. }, function($ctx1) {$ctx1.fill(self,"showInstance",{},smalltalk.HLBrowserModel)})},
  572. messageSends: ["ifNil:"]}),
  573. smalltalk.HLBrowserModel);
  574. smalltalk.addMethod(
  575. smalltalk.method({
  576. selector: "showInstance:",
  577. fn: function (aBoolean){
  578. var self=this;
  579. function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  580. return smalltalk.withContext(function($ctx1) {
  581. var $1,$2,$4,$3;
  582. _st(self)._withChangesDo_((function(){
  583. return smalltalk.withContext(function($ctx2) {
  584. self["@showInstance"]=aBoolean;
  585. self["@showInstance"];
  586. $1=_st(self)._selectedClass();
  587. if(($receiver = $1) == nil || $receiver == undefined){
  588. $1;
  589. } else {
  590. $2=self;
  591. $4=aBoolean;
  592. if(smalltalk.assert($4)){
  593. $3=_st(_st(self)._selectedClass())._theNonMetaClass();
  594. } else {
  595. $3=_st(_st(self)._selectedClass())._theMetaClass();
  596. };
  597. _st($2)._selectedClass_($3);
  598. };
  599. return _st(_st(self)._announcer())._announce_(_st($HLShowInstanceToggled())._new());
  600. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  601. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean},smalltalk.HLBrowserModel)})},
  602. messageSends: ["withChangesDo:", "ifNotNil:", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "selectedClass", "theMetaClass", "announce:", "new", "announcer"]}),
  603. smalltalk.HLBrowserModel);
  604. smalltalk.addMethod(
  605. smalltalk.method({
  606. selector: "on:",
  607. fn: function (anEnvironment){
  608. var self=this;
  609. return smalltalk.withContext(function($ctx1) {
  610. var $2,$3,$1;
  611. $2=_st(self)._new();
  612. _st($2)._environment_(anEnvironment);
  613. $3=_st($2)._yourself();
  614. $1=$3;
  615. return $1;
  616. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment},smalltalk.HLBrowserModel.klass)})},
  617. messageSends: ["environment:", "new", "yourself"]}),
  618. smalltalk.HLBrowserModel.klass);
  619. smalltalk.addClass('HLClassCache', smalltalk.Object, ['class', 'selectorsCache', 'overrideCache', 'overriddenCache'], 'Helios-Browser');
  620. smalltalk.addMethod(
  621. smalltalk.method({
  622. selector: "invalidateChildrenSelector:",
  623. fn: function (aSelector){
  624. var self=this;
  625. return smalltalk.withContext(function($ctx1) {
  626. var $1,$2;
  627. _st(_st(_st(self)._theClass())._subclasses())._do_((function(each){
  628. return smalltalk.withContext(function($ctx2) {
  629. $1=_st(_st(self)._selectorsCache())._cacheFor_(each);
  630. _st($1)._removeSelector_(aSelector);
  631. $2=_st($1)._invalidateChildrenSelector_(aSelector);
  632. return $2;
  633. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  634. return self}, function($ctx1) {$ctx1.fill(self,"invalidateChildrenSelector:",{aSelector:aSelector},smalltalk.HLClassCache)})},
  635. messageSends: ["do:", "removeSelector:", "cacheFor:", "selectorsCache", "invalidateChildrenSelector:", "subclasses", "theClass"]}),
  636. smalltalk.HLClassCache);
  637. smalltalk.addMethod(
  638. smalltalk.method({
  639. selector: "invalidateParentSelector:",
  640. fn: function (aSelector){
  641. var self=this;
  642. return smalltalk.withContext(function($ctx1) {
  643. var $1,$2,$3;
  644. $1=_st(_st(self)._theClass())._superclass();
  645. if(($receiver = $1) == nil || $receiver == undefined){
  646. $1;
  647. } else {
  648. $2=_st(_st(self)._selectorsCache())._cacheFor_(_st(_st(self)._theClass())._superclass());
  649. _st($2)._removeSelector_(aSelector);
  650. $3=_st($2)._invalidateParentSelector_(aSelector);
  651. $3;
  652. };
  653. return self}, function($ctx1) {$ctx1.fill(self,"invalidateParentSelector:",{aSelector:aSelector},smalltalk.HLClassCache)})},
  654. messageSends: ["ifNotNil:", "removeSelector:", "cacheFor:", "superclass", "theClass", "selectorsCache", "invalidateParentSelector:"]}),
  655. smalltalk.HLClassCache);
  656. smalltalk.addMethod(
  657. smalltalk.method({
  658. selector: "invalidateSelector:",
  659. fn: function (aSelector){
  660. var self=this;
  661. return smalltalk.withContext(function($ctx1) {
  662. var $1,$2;
  663. $1=self;
  664. _st($1)._invalidateParentSelector_(aSelector);
  665. _st($1)._invalidateChildrenSelector_(aSelector);
  666. $2=_st($1)._removeSelector_(aSelector);
  667. return self}, function($ctx1) {$ctx1.fill(self,"invalidateSelector:",{aSelector:aSelector},smalltalk.HLClassCache)})},
  668. messageSends: ["invalidateParentSelector:", "invalidateChildrenSelector:", "removeSelector:"]}),
  669. smalltalk.HLClassCache);
  670. smalltalk.addMethod(
  671. smalltalk.method({
  672. selector: "isOverridden:",
  673. fn: function (aMethod){
  674. var self=this;
  675. return smalltalk.withContext(function($ctx1) {
  676. var $1;
  677. $1=_st(_st(self)._overriddenCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  678. return smalltalk.withContext(function($ctx2) {
  679. return _st(aMethod)._isOverridden();
  680. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  681. return $1;
  682. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod},smalltalk.HLClassCache)})},
  683. messageSends: ["at:ifAbsentPut:", "selector", "isOverridden", "overriddenCache"]}),
  684. smalltalk.HLClassCache);
  685. smalltalk.addMethod(
  686. smalltalk.method({
  687. selector: "isOverride:",
  688. fn: function (aMethod){
  689. var self=this;
  690. return smalltalk.withContext(function($ctx1) {
  691. var $1;
  692. $1=_st(_st(self)._overrideCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  693. return smalltalk.withContext(function($ctx2) {
  694. return _st(aMethod)._isOverride();
  695. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  696. return $1;
  697. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod},smalltalk.HLClassCache)})},
  698. messageSends: ["at:ifAbsentPut:", "selector", "isOverride", "overrideCache"]}),
  699. smalltalk.HLClassCache);
  700. smalltalk.addMethod(
  701. smalltalk.method({
  702. selector: "overriddenCache",
  703. fn: function (){
  704. var self=this;
  705. function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  706. return smalltalk.withContext(function($ctx1) {
  707. var $2,$1;
  708. $2=self["@overriddenCache"];
  709. if(($receiver = $2) == nil || $receiver == undefined){
  710. self["@overriddenCache"]=_st($HashedCollection())._new();
  711. $1=self["@overriddenCache"];
  712. } else {
  713. $1=$2;
  714. };
  715. return $1;
  716. }, function($ctx1) {$ctx1.fill(self,"overriddenCache",{},smalltalk.HLClassCache)})},
  717. messageSends: ["ifNil:", "new"]}),
  718. smalltalk.HLClassCache);
  719. smalltalk.addMethod(
  720. smalltalk.method({
  721. selector: "overrideCache",
  722. fn: function (){
  723. var self=this;
  724. function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  725. return smalltalk.withContext(function($ctx1) {
  726. var $2,$1;
  727. $2=self["@overrideCache"];
  728. if(($receiver = $2) == nil || $receiver == undefined){
  729. self["@overrideCache"]=_st($HashedCollection())._new();
  730. $1=self["@overrideCache"];
  731. } else {
  732. $1=$2;
  733. };
  734. return $1;
  735. }, function($ctx1) {$ctx1.fill(self,"overrideCache",{},smalltalk.HLClassCache)})},
  736. messageSends: ["ifNil:", "new"]}),
  737. smalltalk.HLClassCache);
  738. smalltalk.addMethod(
  739. smalltalk.method({
  740. selector: "removeSelector:",
  741. fn: function (aSelector){
  742. var self=this;
  743. return smalltalk.withContext(function($ctx1) {
  744. _st(_st(self)._overriddenCache())._removeKey_ifAbsent_(aSelector,(function(){
  745. return smalltalk.withContext(function($ctx2) {
  746. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  747. _st(_st(self)._overrideCache())._removeKey_ifAbsent_(aSelector,(function(){
  748. return smalltalk.withContext(function($ctx2) {
  749. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  750. return self}, function($ctx1) {$ctx1.fill(self,"removeSelector:",{aSelector:aSelector},smalltalk.HLClassCache)})},
  751. messageSends: ["removeKey:ifAbsent:", "overriddenCache", "overrideCache"]}),
  752. smalltalk.HLClassCache);
  753. smalltalk.addMethod(
  754. smalltalk.method({
  755. selector: "selectorsCache",
  756. fn: function (){
  757. var self=this;
  758. return smalltalk.withContext(function($ctx1) {
  759. var $1;
  760. $1=self["@selectorsCache"];
  761. return $1;
  762. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{},smalltalk.HLClassCache)})},
  763. messageSends: []}),
  764. smalltalk.HLClassCache);
  765. smalltalk.addMethod(
  766. smalltalk.method({
  767. selector: "selectorsCache:",
  768. fn: function (aCache){
  769. var self=this;
  770. return smalltalk.withContext(function($ctx1) {
  771. self["@selectorsCache"]=aCache;
  772. return self}, function($ctx1) {$ctx1.fill(self,"selectorsCache:",{aCache:aCache},smalltalk.HLClassCache)})},
  773. messageSends: []}),
  774. smalltalk.HLClassCache);
  775. smalltalk.addMethod(
  776. smalltalk.method({
  777. selector: "theClass",
  778. fn: function (){
  779. var self=this;
  780. return smalltalk.withContext(function($ctx1) {
  781. var $1;
  782. $1=self["@class"];
  783. return $1;
  784. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.HLClassCache)})},
  785. messageSends: []}),
  786. smalltalk.HLClassCache);
  787. smalltalk.addMethod(
  788. smalltalk.method({
  789. selector: "theClass:",
  790. fn: function (aClass){
  791. var self=this;
  792. return smalltalk.withContext(function($ctx1) {
  793. self["@class"]=aClass;
  794. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.HLClassCache)})},
  795. messageSends: []}),
  796. smalltalk.HLClassCache);
  797. smalltalk.addMethod(
  798. smalltalk.method({
  799. selector: "on:selectorsCache:",
  800. fn: function (aClass,aSelectorsCache){
  801. var self=this;
  802. return smalltalk.withContext(function($ctx1) {
  803. var $2,$3,$1;
  804. $2=_st(self)._new();
  805. _st($2)._theClass_(aClass);
  806. _st($2)._selectorsCache_(aSelectorsCache);
  807. $3=_st($2)._yourself();
  808. $1=$3;
  809. return $1;
  810. }, function($ctx1) {$ctx1.fill(self,"on:selectorsCache:",{aClass:aClass,aSelectorsCache:aSelectorsCache},smalltalk.HLClassCache.klass)})},
  811. messageSends: ["theClass:", "new", "selectorsCache:", "yourself"]}),
  812. smalltalk.HLClassCache.klass);
  813. smalltalk.addClass('HLClassesListWidget', smalltalk.HLToolListWidget, [], 'Helios-Browser');
  814. smalltalk.addMethod(
  815. smalltalk.method({
  816. selector: "cssClassForItem:",
  817. fn: function (aClass){
  818. var self=this;
  819. return smalltalk.withContext(function($ctx1) {
  820. var $1,$2;
  821. $1=_st(_st(_st(aClass)._theNonMetaClass())._comment())._isEmpty();
  822. if(smalltalk.assert($1)){
  823. return "uncommented";
  824. };
  825. $2=_st(_st(aClass)._theNonMetaClass())._heliosClass();
  826. return $2;
  827. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{aClass:aClass},smalltalk.HLClassesListWidget)})},
  828. messageSends: ["ifTrue:", "isEmpty", "comment", "theNonMetaClass", "heliosClass"]}),
  829. smalltalk.HLClassesListWidget);
  830. smalltalk.addMethod(
  831. smalltalk.method({
  832. selector: "focusMethodsListWidget",
  833. fn: function (){
  834. var self=this;
  835. function $HLMethodsListFocus(){return smalltalk.HLMethodsListFocus||(typeof HLMethodsListFocus=="undefined"?nil:HLMethodsListFocus)}
  836. return smalltalk.withContext(function($ctx1) {
  837. _st(_st(_st(self)._model())._announcer())._announce_(_st($HLMethodsListFocus())._new());
  838. return self}, function($ctx1) {$ctx1.fill(self,"focusMethodsListWidget",{},smalltalk.HLClassesListWidget)})},
  839. messageSends: ["announce:", "new", "announcer", "model"]}),
  840. smalltalk.HLClassesListWidget);
  841. smalltalk.addMethod(
  842. smalltalk.method({
  843. selector: "focusProtocolsListWidget",
  844. fn: function (){
  845. var self=this;
  846. function $HLProtocolsListFocus(){return smalltalk.HLProtocolsListFocus||(typeof HLProtocolsListFocus=="undefined"?nil:HLProtocolsListFocus)}
  847. return smalltalk.withContext(function($ctx1) {
  848. _st(_st(_st(self)._model())._announcer())._announce_(_st($HLProtocolsListFocus())._new());
  849. return self}, function($ctx1) {$ctx1.fill(self,"focusProtocolsListWidget",{},smalltalk.HLClassesListWidget)})},
  850. messageSends: ["announce:", "new", "announcer", "model"]}),
  851. smalltalk.HLClassesListWidget);
  852. smalltalk.addMethod(
  853. smalltalk.method({
  854. selector: "getChildrenOf:",
  855. fn: function (aClass){
  856. var self=this;
  857. return smalltalk.withContext(function($ctx1) {
  858. var $1;
  859. $1=_st(_st(self)._items())._select_((function(each){
  860. return smalltalk.withContext(function($ctx2) {
  861. return _st(_st(each)._superclass()).__eq(aClass);
  862. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  863. return $1;
  864. }, function($ctx1) {$ctx1.fill(self,"getChildrenOf:",{aClass:aClass},smalltalk.HLClassesListWidget)})},
  865. messageSends: ["select:", "=", "superclass", "items"]}),
  866. smalltalk.HLClassesListWidget);
  867. smalltalk.addMethod(
  868. smalltalk.method({
  869. selector: "getRootClassesOf:",
  870. fn: function (aCollection){
  871. var self=this;
  872. return smalltalk.withContext(function($ctx1) {
  873. var $1;
  874. $1=_st(aCollection)._select_((function(each){
  875. return smalltalk.withContext(function($ctx2) {
  876. return _st(_st(aCollection)._includes_(_st(each)._superclass()))._not();
  877. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  878. return $1;
  879. }, function($ctx1) {$ctx1.fill(self,"getRootClassesOf:",{aCollection:aCollection},smalltalk.HLClassesListWidget)})},
  880. messageSends: ["select:", "not", "includes:", "superclass"]}),
  881. smalltalk.HLClassesListWidget);
  882. smalltalk.addMethod(
  883. smalltalk.method({
  884. selector: "label",
  885. fn: function (){
  886. var self=this;
  887. return smalltalk.withContext(function($ctx1) {
  888. return "Classes";
  889. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLClassesListWidget)})},
  890. messageSends: []}),
  891. smalltalk.HLClassesListWidget);
  892. smalltalk.addMethod(
  893. smalltalk.method({
  894. selector: "observeModel",
  895. fn: function (){
  896. var self=this;
  897. function $HLPackageSelected(){return smalltalk.HLPackageSelected||(typeof HLPackageSelected=="undefined"?nil:HLPackageSelected)}
  898. function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  899. function $HLShowCommentToggled(){return smalltalk.HLShowCommentToggled||(typeof HLShowCommentToggled=="undefined"?nil:HLShowCommentToggled)}
  900. function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  901. function $HLClassesFocusRequested(){return smalltalk.HLClassesFocusRequested||(typeof HLClassesFocusRequested=="undefined"?nil:HLClassesFocusRequested)}
  902. return smalltalk.withContext(function($ctx1) {
  903. var $1,$2;
  904. $1=_st(_st(self)._model())._announcer();
  905. _st($1)._on_send_to_($HLPackageSelected(),"onPackageSelected:",self);
  906. _st($1)._on_send_to_($HLShowInstanceToggled(),"onShowInstanceToggled",self);
  907. _st($1)._on_send_to_($HLShowCommentToggled(),"onShowCommentToggled",self);
  908. _st($1)._on_send_to_($HLClassSelected(),"onClassSelected:",self);
  909. $2=_st($1)._on_send_to_($HLClassesFocusRequested(),"onClassesFocusRequested",self);
  910. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLClassesListWidget)})},
  911. messageSends: ["on:send:to:", "announcer", "model"]}),
  912. smalltalk.HLClassesListWidget);
  913. smalltalk.addMethod(
  914. smalltalk.method({
  915. selector: "observeSystem",
  916. fn: function (){
  917. var self=this;
  918. function $ClassAdded(){return smalltalk.ClassAdded||(typeof ClassAdded=="undefined"?nil:ClassAdded)}
  919. function $ClassRemoved(){return smalltalk.ClassRemoved||(typeof ClassRemoved=="undefined"?nil:ClassRemoved)}
  920. function $ClassMoved(){return smalltalk.ClassMoved||(typeof ClassMoved=="undefined"?nil:ClassMoved)}
  921. function $ClassRenamed(){return smalltalk.ClassRenamed||(typeof ClassRenamed=="undefined"?nil:ClassRenamed)}
  922. function $ClassMigrated(){return smalltalk.ClassMigrated||(typeof ClassMigrated=="undefined"?nil:ClassMigrated)}
  923. function $ClassCommentChanged(){return smalltalk.ClassCommentChanged||(typeof ClassCommentChanged=="undefined"?nil:ClassCommentChanged)}
  924. return smalltalk.withContext(function($ctx1) {
  925. var $1,$2;
  926. $1=_st(_st(self)._model())._systemAnnouncer();
  927. _st($1)._on_send_to_($ClassAdded(),"onClassAdded:",self);
  928. _st($1)._on_send_to_($ClassRemoved(),"onClassRemoved:",self);
  929. _st($1)._on_send_to_($ClassMoved(),"onClassMoved:",self);
  930. _st($1)._on_send_to_($ClassRenamed(),"onClassRenamed:",self);
  931. _st($1)._on_send_to_($ClassMigrated(),"onClassMigrated:",self);
  932. $2=_st($1)._on_send_to_($ClassCommentChanged(),"onClassCommentChanged:",self);
  933. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLClassesListWidget)})},
  934. messageSends: ["on:send:to:", "systemAnnouncer", "model"]}),
  935. smalltalk.HLClassesListWidget);
  936. smalltalk.addMethod(
  937. smalltalk.method({
  938. selector: "onClassAdded:",
  939. fn: function (anAnnouncement){
  940. var self=this;
  941. var class_;
  942. return smalltalk.withContext(function($ctx1) {
  943. var $1,$2;
  944. class_=_st(anAnnouncement)._theClass();
  945. $1=_st(_st(_st(class_)._package()).__eq(_st(_st(self)._model())._selectedPackage()))._or_((function(){
  946. return smalltalk.withContext(function($ctx2) {
  947. return _st(_st(self)._items())._includes_(class_);
  948. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  949. if(! smalltalk.assert($1)){
  950. $2=self;
  951. return $2;
  952. };
  953. _st(self)._setItemsForSelectedPackage();
  954. _st(self)._refresh();
  955. return self}, function($ctx1) {$ctx1.fill(self,"onClassAdded:",{anAnnouncement:anAnnouncement,class_:class_},smalltalk.HLClassesListWidget)})},
  956. messageSends: ["theClass", "ifFalse:", "or:", "includes:", "items", "=", "selectedPackage", "model", "package", "setItemsForSelectedPackage", "refresh"]}),
  957. smalltalk.HLClassesListWidget);
  958. smalltalk.addMethod(
  959. smalltalk.method({
  960. selector: "onClassCommentChanged:",
  961. fn: function (anAnnouncement){
  962. var self=this;
  963. var class_;
  964. return smalltalk.withContext(function($ctx1) {
  965. var $1,$2;
  966. class_=_st(anAnnouncement)._theClass();
  967. $1=_st(_st(class_)._package()).__eq(_st(_st(self)._model())._selectedPackage());
  968. if(! smalltalk.assert($1)){
  969. $2=self;
  970. return $2;
  971. };
  972. _st(self)._refresh();
  973. return self}, function($ctx1) {$ctx1.fill(self,"onClassCommentChanged:",{anAnnouncement:anAnnouncement,class_:class_},smalltalk.HLClassesListWidget)})},
  974. messageSends: ["theClass", "ifFalse:", "=", "selectedPackage", "model", "package", "refresh"]}),
  975. smalltalk.HLClassesListWidget);
  976. smalltalk.addMethod(
  977. smalltalk.method({
  978. selector: "onClassMigrated:",
  979. fn: function (anAnnouncement){
  980. var self=this;
  981. var class_,oldClass;
  982. return smalltalk.withContext(function($ctx1) {
  983. var $1,$2,$3;
  984. class_=_st(anAnnouncement)._theClass();
  985. oldClass=_st(anAnnouncement)._oldClass();
  986. $1=_st(_st(self)._items())._includes_(oldClass);
  987. if(! smalltalk.assert($1)){
  988. $2=self;
  989. return $2;
  990. };
  991. $3=_st(_st(_st(self)._model())._selectedClass()).__eq(oldClass);
  992. if(smalltalk.assert($3)){
  993. _st(_st(self)._model())._selectedClass_(class_);
  994. };
  995. _st(self)._setItemsForSelectedPackage();
  996. _st(self)._refresh();
  997. return self}, function($ctx1) {$ctx1.fill(self,"onClassMigrated:",{anAnnouncement:anAnnouncement,class_:class_,oldClass:oldClass},smalltalk.HLClassesListWidget)})},
  998. messageSends: ["theClass", "oldClass", "ifFalse:", "includes:", "items", "ifTrue:", "selectedClass:", "model", "=", "selectedClass", "setItemsForSelectedPackage", "refresh"]}),
  999. smalltalk.HLClassesListWidget);
  1000. smalltalk.addMethod(
  1001. smalltalk.method({
  1002. selector: "onClassMoved:",
  1003. fn: function (anAnnouncement){
  1004. var self=this;
  1005. var class_,oldPackage;
  1006. return smalltalk.withContext(function($ctx1) {
  1007. var $1,$2,$3,$4,$5;
  1008. class_=_st(anAnnouncement)._theClass();
  1009. oldPackage=_st(anAnnouncement)._oldPackage();
  1010. $1=_st(_st(oldPackage).__eq(_st(_st(self)._model())._selectedPackage()))._or_((function(){
  1011. return smalltalk.withContext(function($ctx2) {
  1012. return _st(_st(class_)._package()).__eq(_st(_st(self)._model())._selectedPackage());
  1013. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1014. if(! smalltalk.assert($1)){
  1015. $2=self;
  1016. return $2;
  1017. };
  1018. $3=_st(oldPackage).__eq(_st(_st(self)._model())._selectedPackage());
  1019. if(smalltalk.assert($3)){
  1020. $4=self;
  1021. _st($4)._selectedItem_(nil);
  1022. $5=_st($4)._selectItem_(nil);
  1023. $5;
  1024. };
  1025. _st(self)._setItemsForSelectedPackage();
  1026. _st(self)._refresh();
  1027. return self}, function($ctx1) {$ctx1.fill(self,"onClassMoved:",{anAnnouncement:anAnnouncement,class_:class_,oldPackage:oldPackage},smalltalk.HLClassesListWidget)})},
  1028. messageSends: ["theClass", "oldPackage", "ifFalse:", "or:", "=", "selectedPackage", "model", "package", "ifTrue:", "selectedItem:", "selectItem:", "setItemsForSelectedPackage", "refresh"]}),
  1029. smalltalk.HLClassesListWidget);
  1030. smalltalk.addMethod(
  1031. smalltalk.method({
  1032. selector: "onClassRemoved:",
  1033. fn: function (anAnnouncement){
  1034. var self=this;
  1035. var class_;
  1036. return smalltalk.withContext(function($ctx1) {
  1037. var $1,$2;
  1038. class_=_st(anAnnouncement)._theClass();
  1039. $1=_st(_st(class_)._package()).__eq(_st(_st(self)._model())._selectedPackage());
  1040. if(! smalltalk.assert($1)){
  1041. $2=self;
  1042. return $2;
  1043. };
  1044. _st(self)._setItemsForSelectedPackage();
  1045. _st(self)._refresh();
  1046. return self}, function($ctx1) {$ctx1.fill(self,"onClassRemoved:",{anAnnouncement:anAnnouncement,class_:class_},smalltalk.HLClassesListWidget)})},
  1047. messageSends: ["theClass", "ifFalse:", "=", "selectedPackage", "model", "package", "setItemsForSelectedPackage", "refresh"]}),
  1048. smalltalk.HLClassesListWidget);
  1049. smalltalk.addMethod(
  1050. smalltalk.method({
  1051. selector: "onClassRenamed:",
  1052. fn: function (anAnnouncement){
  1053. var self=this;
  1054. return smalltalk.withContext(function($ctx1) {
  1055. var $1,$2;
  1056. $1=_st(_st(_st(anAnnouncement)._theClass())._package()).__eq(_st(_st(self)._model())._selectedPackage());
  1057. if(! smalltalk.assert($1)){
  1058. $2=self;
  1059. return $2;
  1060. };
  1061. _st(self)._setItemsForSelectedPackage();
  1062. _st(self)._refresh();
  1063. return self}, function($ctx1) {$ctx1.fill(self,"onClassRenamed:",{anAnnouncement:anAnnouncement},smalltalk.HLClassesListWidget)})},
  1064. messageSends: ["ifFalse:", "=", "selectedPackage", "model", "package", "theClass", "setItemsForSelectedPackage", "refresh"]}),
  1065. smalltalk.HLClassesListWidget);
  1066. smalltalk.addMethod(
  1067. smalltalk.method({
  1068. selector: "onClassSelected:",
  1069. fn: function (anAnnouncement){
  1070. var self=this;
  1071. var selectedClass;
  1072. return smalltalk.withContext(function($ctx1) {
  1073. var $1,$2,$3,$4,$5;
  1074. $1=_st(anAnnouncement)._item();
  1075. if(($receiver = $1) == nil || $receiver == undefined){
  1076. $2=self;
  1077. return $2;
  1078. } else {
  1079. $1;
  1080. };
  1081. selectedClass=_st(_st(anAnnouncement)._item())._theNonMetaClass();
  1082. _st(self)._selectedItem_(selectedClass);
  1083. $3=_st(self)._hasFocus();
  1084. if(! smalltalk.assert($3)){
  1085. $4=self;
  1086. _st($4)._activateItem_(selectedClass);
  1087. $5=_st($4)._focus();
  1088. $5;
  1089. };
  1090. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncement:anAnnouncement,selectedClass:selectedClass},smalltalk.HLClassesListWidget)})},
  1091. messageSends: ["ifNil:", "item", "theNonMetaClass", "selectedItem:", "ifFalse:", "activateItem:", "focus", "hasFocus"]}),
  1092. smalltalk.HLClassesListWidget);
  1093. smalltalk.addMethod(
  1094. smalltalk.method({
  1095. selector: "onClassesFocusRequested",
  1096. fn: function (){
  1097. var self=this;
  1098. return smalltalk.withContext(function($ctx1) {
  1099. _st(self)._focus();
  1100. return self}, function($ctx1) {$ctx1.fill(self,"onClassesFocusRequested",{},smalltalk.HLClassesListWidget)})},
  1101. messageSends: ["focus"]}),
  1102. smalltalk.HLClassesListWidget);
  1103. smalltalk.addMethod(
  1104. smalltalk.method({
  1105. selector: "onPackageSelected:",
  1106. fn: function (anAnnouncement){
  1107. var self=this;
  1108. return smalltalk.withContext(function($ctx1) {
  1109. _st(self)._selectedItem_(nil);
  1110. _st(self)._setItemsForSelectedPackage();
  1111. _st(self)._refresh();
  1112. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{anAnnouncement:anAnnouncement},smalltalk.HLClassesListWidget)})},
  1113. messageSends: ["selectedItem:", "setItemsForSelectedPackage", "refresh"]}),
  1114. smalltalk.HLClassesListWidget);
  1115. smalltalk.addMethod(
  1116. smalltalk.method({
  1117. selector: "onShowCommentToggled",
  1118. fn: function (){
  1119. var self=this;
  1120. return smalltalk.withContext(function($ctx1) {
  1121. _st(self)._refresh();
  1122. return self}, function($ctx1) {$ctx1.fill(self,"onShowCommentToggled",{},smalltalk.HLClassesListWidget)})},
  1123. messageSends: ["refresh"]}),
  1124. smalltalk.HLClassesListWidget);
  1125. smalltalk.addMethod(
  1126. smalltalk.method({
  1127. selector: "onShowInstanceToggled",
  1128. fn: function (){
  1129. var self=this;
  1130. return smalltalk.withContext(function($ctx1) {
  1131. _st(self)._refresh();
  1132. return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{},smalltalk.HLClassesListWidget)})},
  1133. messageSends: ["refresh"]}),
  1134. smalltalk.HLClassesListWidget);
  1135. smalltalk.addMethod(
  1136. smalltalk.method({
  1137. selector: "renderButtonsOn:",
  1138. fn: function (html){
  1139. var self=this;
  1140. var checkbox;
  1141. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  1142. return smalltalk.withContext(function($ctx1) {
  1143. var $1,$3,$4,$5,$6,$7,$8,$2,$9,$11,$12,$10,$13;
  1144. $1=_st(html)._div();
  1145. _st($1)._class_("btn-group");
  1146. $2=_st($1)._with_((function(){
  1147. return smalltalk.withContext(function($ctx2) {
  1148. $3=_st(html)._button();
  1149. _st($3)._class_(_st($String())._streamContents_((function(str){
  1150. return smalltalk.withContext(function($ctx3) {
  1151. _st(str)._nextPutAll_("btn");
  1152. $4=_st(self)._showInstance();
  1153. if(smalltalk.assert($4)){
  1154. return _st(str)._nextPutAll_(" active");
  1155. };
  1156. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1157. _st($3)._with_("Instance");
  1158. $5=_st($3)._onClick_((function(){
  1159. return smalltalk.withContext(function($ctx3) {
  1160. return _st(self)._showInstance_(true);
  1161. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1162. $5;
  1163. $6=_st(html)._button();
  1164. _st($6)._class_(_st($String())._streamContents_((function(str){
  1165. return smalltalk.withContext(function($ctx3) {
  1166. _st(str)._nextPutAll_("btn");
  1167. $7=_st(self)._showClass();
  1168. if(smalltalk.assert($7)){
  1169. return _st(str)._nextPutAll_(" active");
  1170. };
  1171. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1172. _st($6)._with_("Class");
  1173. $8=_st($6)._onClick_((function(){
  1174. return smalltalk.withContext(function($ctx3) {
  1175. return _st(self)._showInstance_(false);
  1176. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1177. return $8;
  1178. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1179. $9=_st(html)._label();
  1180. _st($9)._class_("checkbox");
  1181. $10=_st($9)._with_((function(){
  1182. return smalltalk.withContext(function($ctx2) {
  1183. $11=_st(html)._input();
  1184. _st($11)._type_("checkbox");
  1185. $12=_st($11)._onClick_((function(){
  1186. return smalltalk.withContext(function($ctx3) {
  1187. return _st(self)._toggleShowComment();
  1188. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1189. checkbox=$12;
  1190. checkbox;
  1191. return _st(html)._with_("Doc");
  1192. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1193. $13=_st(self)._showComment();
  1194. if(smalltalk.assert($13)){
  1195. _st(checkbox)._at_put_("checked","checked");
  1196. };
  1197. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,checkbox:checkbox},smalltalk.HLClassesListWidget)})},
  1198. messageSends: ["class:", "div", "with:", "streamContents:", "nextPutAll:", "ifTrue:", "showInstance", "button", "onClick:", "showInstance:", "showClass", "label", "type:", "input", "toggleShowComment", "at:put:", "showComment"]}),
  1199. smalltalk.HLClassesListWidget);
  1200. smalltalk.addMethod(
  1201. smalltalk.method({
  1202. selector: "renderItem:level:on:",
  1203. fn: function (aClass,anInteger,html){
  1204. var self=this;
  1205. var li;
  1206. return smalltalk.withContext(function($ctx1) {
  1207. var $1,$3,$4,$2;
  1208. li=_st(html)._li();
  1209. _st(self)._registerMappingFrom_to_(aClass,li);
  1210. $1=li;
  1211. _st($1)._at_put_("list-data",_st(_st(self)._items())._indexOf_(aClass));
  1212. _st($1)._class_(_st(self)._listCssClassForItem_(aClass));
  1213. $2=_st($1)._with_((function(){
  1214. return smalltalk.withContext(function($ctx2) {
  1215. $3=_st(html)._a();
  1216. _st($3)._with_((function(){
  1217. return smalltalk.withContext(function($ctx3) {
  1218. _st(_st(html)._tag_("i"))._class_(_st(self)._cssClassForItem_(aClass));
  1219. return _st(self)._renderItemLabel_level_on_(aClass,anInteger,html);
  1220. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1221. $4=_st($3)._onClick_((function(){
  1222. return smalltalk.withContext(function($ctx3) {
  1223. return _st(self)._activateListItem_(_st(li)._asJQuery());
  1224. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1225. return $4;
  1226. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1227. _st(_st(self)._getChildrenOf_(aClass))._do_((function(each){
  1228. return smalltalk.withContext(function($ctx2) {
  1229. return _st(self)._renderItem_level_on_(each,_st(anInteger).__plus((1)),html);
  1230. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1231. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:level:on:",{aClass:aClass,anInteger:anInteger,html:html,li:li},smalltalk.HLClassesListWidget)})},
  1232. messageSends: ["li", "registerMappingFrom:to:", "at:put:", "indexOf:", "items", "class:", "listCssClassForItem:", "with:", "cssClassForItem:", "tag:", "renderItemLabel:level:on:", "a", "onClick:", "activateListItem:", "asJQuery", "do:", "renderItem:level:on:", "+", "getChildrenOf:"]}),
  1233. smalltalk.HLClassesListWidget);
  1234. smalltalk.addMethod(
  1235. smalltalk.method({
  1236. selector: "renderItem:on:",
  1237. fn: function (aClass,html){
  1238. var self=this;
  1239. return smalltalk.withContext(function($ctx1) {
  1240. smalltalk.HLToolListWidget.fn.prototype._renderItem_on_.apply(_st(self), [aClass,html]);
  1241. _st(_st(self)._getChildrenOf_(aClass))._do_((function(each){
  1242. return smalltalk.withContext(function($ctx2) {
  1243. return _st(self)._renderItem_level_on_(each,(1),html);
  1244. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1245. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{aClass:aClass,html:html},smalltalk.HLClassesListWidget)})},
  1246. messageSends: ["renderItem:on:", "do:", "renderItem:level:on:", "getChildrenOf:"]}),
  1247. smalltalk.HLClassesListWidget);
  1248. smalltalk.addMethod(
  1249. smalltalk.method({
  1250. selector: "renderItemLabel:level:on:",
  1251. fn: function (aClass,anInteger,html){
  1252. var self=this;
  1253. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  1254. return smalltalk.withContext(function($ctx1) {
  1255. _st(_st(_st(html)._span())._asJQuery())._html_(_st($String())._streamContents_((function(str){
  1256. return smalltalk.withContext(function($ctx2) {
  1257. _st(anInteger)._timesRepeat_((function(){
  1258. return smalltalk.withContext(function($ctx3) {
  1259. return _st(str)._nextPutAll_("    ");
  1260. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1261. return _st(str)._nextPutAll_(_st(aClass)._name());
  1262. }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1)})})));
  1263. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:level:on:",{aClass:aClass,anInteger:anInteger,html:html},smalltalk.HLClassesListWidget)})},
  1264. messageSends: ["html:", "streamContents:", "timesRepeat:", "nextPutAll:", "name", "asJQuery", "span"]}),
  1265. smalltalk.HLClassesListWidget);
  1266. smalltalk.addMethod(
  1267. smalltalk.method({
  1268. selector: "renderItemLabel:on:",
  1269. fn: function (aClass,html){
  1270. var self=this;
  1271. return smalltalk.withContext(function($ctx1) {
  1272. _st(self)._renderItemLabel_level_on_(aClass,(0),html);
  1273. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aClass:aClass,html:html},smalltalk.HLClassesListWidget)})},
  1274. messageSends: ["renderItemLabel:level:on:"]}),
  1275. smalltalk.HLClassesListWidget);
  1276. smalltalk.addMethod(
  1277. smalltalk.method({
  1278. selector: "renderListOn:",
  1279. fn: function (html){
  1280. var self=this;
  1281. return smalltalk.withContext(function($ctx1) {
  1282. _st(_st(self)._getRootClassesOf_(_st(self)._items()))._do_((function(each){
  1283. return smalltalk.withContext(function($ctx2) {
  1284. return _st(self)._renderItem_on_(each,html);
  1285. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1286. return self}, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html},smalltalk.HLClassesListWidget)})},
  1287. messageSends: ["do:", "renderItem:on:", "getRootClassesOf:", "items"]}),
  1288. smalltalk.HLClassesListWidget);
  1289. smalltalk.addMethod(
  1290. smalltalk.method({
  1291. selector: "selectItem:",
  1292. fn: function (aClass){
  1293. var self=this;
  1294. return smalltalk.withContext(function($ctx1) {
  1295. _st(_st(self)._model())._selectedClass_(aClass);
  1296. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aClass:aClass},smalltalk.HLClassesListWidget)})},
  1297. messageSends: ["selectedClass:", "model"]}),
  1298. smalltalk.HLClassesListWidget);
  1299. smalltalk.addMethod(
  1300. smalltalk.method({
  1301. selector: "setItemsForPackage:",
  1302. fn: function (aPackage){
  1303. var self=this;
  1304. return smalltalk.withContext(function($ctx1) {
  1305. var $1,$3,$2;
  1306. $1=self;
  1307. $3=aPackage;
  1308. if(($receiver = $3) == nil || $receiver == undefined){
  1309. $2=[];
  1310. } else {
  1311. $2=_st(_st(_st(_st(_st(aPackage)._classes())._collect_((function(each){
  1312. return smalltalk.withContext(function($ctx2) {
  1313. return _st(each)._theNonMetaClass();
  1314. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet())._asArray())._sort_((function(a,b){
  1315. return smalltalk.withContext(function($ctx2) {
  1316. return _st(_st(a)._name()).__lt(_st(b)._name());
  1317. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  1318. };
  1319. _st($1)._items_($2);
  1320. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForPackage:",{aPackage:aPackage},smalltalk.HLClassesListWidget)})},
  1321. messageSends: ["items:", "ifNil:ifNotNil:", "sort:", "<", "name", "asArray", "asSet", "collect:", "theNonMetaClass", "classes"]}),
  1322. smalltalk.HLClassesListWidget);
  1323. smalltalk.addMethod(
  1324. smalltalk.method({
  1325. selector: "setItemsForSelectedPackage",
  1326. fn: function (){
  1327. var self=this;
  1328. return smalltalk.withContext(function($ctx1) {
  1329. _st(self)._setItemsForPackage_(_st(_st(self)._model())._selectedPackage());
  1330. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedPackage",{},smalltalk.HLClassesListWidget)})},
  1331. messageSends: ["setItemsForPackage:", "selectedPackage", "model"]}),
  1332. smalltalk.HLClassesListWidget);
  1333. smalltalk.addMethod(
  1334. smalltalk.method({
  1335. selector: "showClass",
  1336. fn: function (){
  1337. var self=this;
  1338. return smalltalk.withContext(function($ctx1) {
  1339. var $1;
  1340. $1=_st(_st(_st(self)._model())._showInstance())._not();
  1341. return $1;
  1342. }, function($ctx1) {$ctx1.fill(self,"showClass",{},smalltalk.HLClassesListWidget)})},
  1343. messageSends: ["not", "showInstance", "model"]}),
  1344. smalltalk.HLClassesListWidget);
  1345. smalltalk.addMethod(
  1346. smalltalk.method({
  1347. selector: "showComment",
  1348. fn: function (){
  1349. var self=this;
  1350. return smalltalk.withContext(function($ctx1) {
  1351. var $1;
  1352. $1=_st(_st(self)._model())._showComment();
  1353. return $1;
  1354. }, function($ctx1) {$ctx1.fill(self,"showComment",{},smalltalk.HLClassesListWidget)})},
  1355. messageSends: ["showComment", "model"]}),
  1356. smalltalk.HLClassesListWidget);
  1357. smalltalk.addMethod(
  1358. smalltalk.method({
  1359. selector: "showComment:",
  1360. fn: function (aBoolean){
  1361. var self=this;
  1362. return smalltalk.withContext(function($ctx1) {
  1363. _st(_st(self)._model())._showComment_(aBoolean);
  1364. return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean},smalltalk.HLClassesListWidget)})},
  1365. messageSends: ["showComment:", "model"]}),
  1366. smalltalk.HLClassesListWidget);
  1367. smalltalk.addMethod(
  1368. smalltalk.method({
  1369. selector: "showInstance",
  1370. fn: function (){
  1371. var self=this;
  1372. return smalltalk.withContext(function($ctx1) {
  1373. var $1;
  1374. $1=_st(_st(self)._model())._showInstance();
  1375. return $1;
  1376. }, function($ctx1) {$ctx1.fill(self,"showInstance",{},smalltalk.HLClassesListWidget)})},
  1377. messageSends: ["showInstance", "model"]}),
  1378. smalltalk.HLClassesListWidget);
  1379. smalltalk.addMethod(
  1380. smalltalk.method({
  1381. selector: "showInstance:",
  1382. fn: function (aBoolean){
  1383. var self=this;
  1384. return smalltalk.withContext(function($ctx1) {
  1385. _st(_st(self)._model())._showInstance_(aBoolean);
  1386. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean},smalltalk.HLClassesListWidget)})},
  1387. messageSends: ["showInstance:", "model"]}),
  1388. smalltalk.HLClassesListWidget);
  1389. smalltalk.addMethod(
  1390. smalltalk.method({
  1391. selector: "toggleShowComment",
  1392. fn: function (){
  1393. var self=this;
  1394. return smalltalk.withContext(function($ctx1) {
  1395. _st(_st(self)._model())._showComment_(_st(_st(self)._showComment())._not());
  1396. return self}, function($ctx1) {$ctx1.fill(self,"toggleShowComment",{},smalltalk.HLClassesListWidget)})},
  1397. messageSends: ["showComment:", "not", "showComment", "model"]}),
  1398. smalltalk.HLClassesListWidget);
  1399. smalltalk.addClass('HLDocumentationWidget', smalltalk.HLFocusableWidget, ['model'], 'Helios-Browser');
  1400. smalltalk.addMethod(
  1401. smalltalk.method({
  1402. selector: "defaultDocumentation",
  1403. fn: function (){
  1404. var self=this;
  1405. return smalltalk.withContext(function($ctx1) {
  1406. return "No documentation available. \x0a**That's bad. Seriously.**";
  1407. }, function($ctx1) {$ctx1.fill(self,"defaultDocumentation",{},smalltalk.HLDocumentationWidget)})},
  1408. messageSends: []}),
  1409. smalltalk.HLDocumentationWidget);
  1410. smalltalk.addMethod(
  1411. smalltalk.method({
  1412. selector: "defaultHead",
  1413. fn: function (){
  1414. var self=this;
  1415. return smalltalk.withContext(function($ctx1) {
  1416. return "No class selected";
  1417. }, function($ctx1) {$ctx1.fill(self,"defaultHead",{},smalltalk.HLDocumentationWidget)})},
  1418. messageSends: []}),
  1419. smalltalk.HLDocumentationWidget);
  1420. smalltalk.addMethod(
  1421. smalltalk.method({
  1422. selector: "documentation",
  1423. fn: function (){
  1424. var self=this;
  1425. return smalltalk.withContext(function($ctx1) {
  1426. var $2,$1;
  1427. $2=_st(self)._selectedItem();
  1428. if(($receiver = $2) == nil || $receiver == undefined){
  1429. $1="";
  1430. } else {
  1431. var item;
  1432. item=$receiver;
  1433. $1=_st(_st(item)._comment())._ifEmpty_((function(){
  1434. return smalltalk.withContext(function($ctx2) {
  1435. return _st(self)._defaultDocumentation();
  1436. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1437. };
  1438. return $1;
  1439. }, function($ctx1) {$ctx1.fill(self,"documentation",{},smalltalk.HLDocumentationWidget)})},
  1440. messageSends: ["ifNil:ifNotNil:", "ifEmpty:", "defaultDocumentation", "comment", "selectedItem"]}),
  1441. smalltalk.HLDocumentationWidget);
  1442. smalltalk.addMethod(
  1443. smalltalk.method({
  1444. selector: "editDocumentation",
  1445. fn: function (){
  1446. var self=this;
  1447. return smalltalk.withContext(function($ctx1) {
  1448. _st(_st(self)._model())._editComment();
  1449. return self}, function($ctx1) {$ctx1.fill(self,"editDocumentation",{},smalltalk.HLDocumentationWidget)})},
  1450. messageSends: ["editComment", "model"]}),
  1451. smalltalk.HLDocumentationWidget);
  1452. smalltalk.addMethod(
  1453. smalltalk.method({
  1454. selector: "head",
  1455. fn: function (){
  1456. var self=this;
  1457. return smalltalk.withContext(function($ctx1) {
  1458. var $2,$1;
  1459. $2=_st(self)._selectedItem();
  1460. if(($receiver = $2) == nil || $receiver == undefined){
  1461. $1=_st(self)._defaultHead();
  1462. } else {
  1463. var item;
  1464. item=$receiver;
  1465. $1=_st(item)._name();
  1466. };
  1467. return $1;
  1468. }, function($ctx1) {$ctx1.fill(self,"head",{},smalltalk.HLDocumentationWidget)})},
  1469. messageSends: ["ifNil:ifNotNil:", "defaultHead", "name", "selectedItem"]}),
  1470. smalltalk.HLDocumentationWidget);
  1471. smalltalk.addMethod(
  1472. smalltalk.method({
  1473. selector: "model",
  1474. fn: function (){
  1475. var self=this;
  1476. return smalltalk.withContext(function($ctx1) {
  1477. var $1;
  1478. $1=self["@model"];
  1479. return $1;
  1480. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLDocumentationWidget)})},
  1481. messageSends: []}),
  1482. smalltalk.HLDocumentationWidget);
  1483. smalltalk.addMethod(
  1484. smalltalk.method({
  1485. selector: "model:",
  1486. fn: function (aModel){
  1487. var self=this;
  1488. return smalltalk.withContext(function($ctx1) {
  1489. var $1,$2;
  1490. self["@model"]=aModel;
  1491. $1=self;
  1492. _st($1)._observeSystem();
  1493. $2=_st($1)._observeModel();
  1494. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLDocumentationWidget)})},
  1495. messageSends: ["observeSystem", "observeModel"]}),
  1496. smalltalk.HLDocumentationWidget);
  1497. smalltalk.addMethod(
  1498. smalltalk.method({
  1499. selector: "observeModel",
  1500. fn: function (){
  1501. var self=this;
  1502. function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  1503. function $HLEditComment(){return smalltalk.HLEditComment||(typeof HLEditComment=="undefined"?nil:HLEditComment)}
  1504. return smalltalk.withContext(function($ctx1) {
  1505. var $1,$2;
  1506. $1=_st(_st(self)._model())._announcer();
  1507. _st($1)._on_send_to_($HLClassSelected(),"onClassSelected:",self);
  1508. $2=_st($1)._on_send_to_($HLEditComment(),"onEditDocumentation",self);
  1509. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLDocumentationWidget)})},
  1510. messageSends: ["on:send:to:", "announcer", "model"]}),
  1511. smalltalk.HLDocumentationWidget);
  1512. smalltalk.addMethod(
  1513. smalltalk.method({
  1514. selector: "observeSystem",
  1515. fn: function (){
  1516. var self=this;
  1517. function $ClassCommentChanged(){return smalltalk.ClassCommentChanged||(typeof ClassCommentChanged=="undefined"?nil:ClassCommentChanged)}
  1518. return smalltalk.withContext(function($ctx1) {
  1519. _st(_st(_st(self)._model())._systemAnnouncer())._on_send_to_($ClassCommentChanged(),"onClassCommentChanged:",self);
  1520. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLDocumentationWidget)})},
  1521. messageSends: ["on:send:to:", "systemAnnouncer", "model"]}),
  1522. smalltalk.HLDocumentationWidget);
  1523. smalltalk.addMethod(
  1524. smalltalk.method({
  1525. selector: "onClassCommentChanged:",
  1526. fn: function (anAnnouncement){
  1527. var self=this;
  1528. return smalltalk.withContext(function($ctx1) {
  1529. var $1;
  1530. $1=_st(_st(anAnnouncement)._theClass()).__eq(_st(_st(_st(self)._model())._selectedClass())._theNonMetaClass());
  1531. if(smalltalk.assert($1)){
  1532. _st(self)._refresh();
  1533. };
  1534. return self}, function($ctx1) {$ctx1.fill(self,"onClassCommentChanged:",{anAnnouncement:anAnnouncement},smalltalk.HLDocumentationWidget)})},
  1535. messageSends: ["ifTrue:", "refresh", "=", "theNonMetaClass", "selectedClass", "model", "theClass"]}),
  1536. smalltalk.HLDocumentationWidget);
  1537. smalltalk.addMethod(
  1538. smalltalk.method({
  1539. selector: "onClassSelected:",
  1540. fn: function (anAnnouncement){
  1541. var self=this;
  1542. return smalltalk.withContext(function($ctx1) {
  1543. _st(self)._refresh();
  1544. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncement:anAnnouncement},smalltalk.HLDocumentationWidget)})},
  1545. messageSends: ["refresh"]}),
  1546. smalltalk.HLDocumentationWidget);
  1547. smalltalk.addMethod(
  1548. smalltalk.method({
  1549. selector: "onEditDocumentation",
  1550. fn: function (){
  1551. var self=this;
  1552. return smalltalk.withContext(function($ctx1) {
  1553. _st(self)._request_value_do_(_st(_st(_st(_st(_st(self)._model())._selectedClass())._theNonMetaClass())._name()).__comma(" comment"),_st(_st(_st(_st(self)._model())._selectedClass())._theNonMetaClass())._comment(),(function(comment){
  1554. return smalltalk.withContext(function($ctx2) {
  1555. return _st(self)._setClassComment_(comment);
  1556. }, function($ctx2) {$ctx2.fillBlock({comment:comment},$ctx1)})}));
  1557. return self}, function($ctx1) {$ctx1.fill(self,"onEditDocumentation",{},smalltalk.HLDocumentationWidget)})},
  1558. messageSends: ["request:value:do:", ",", "name", "theNonMetaClass", "selectedClass", "model", "comment", "setClassComment:"]}),
  1559. smalltalk.HLDocumentationWidget);
  1560. smalltalk.addMethod(
  1561. smalltalk.method({
  1562. selector: "renderContentOn:",
  1563. fn: function (html){
  1564. var self=this;
  1565. return smalltalk.withContext(function($ctx1) {
  1566. var $1,$3,$4,$2;
  1567. $1=_st(html)._div();
  1568. _st($1)._class_("doc");
  1569. $2=_st($1)._with_((function(){
  1570. return smalltalk.withContext(function($ctx2) {
  1571. $3=self;
  1572. _st($3)._renderHeadOn_(html);
  1573. $4=_st($3)._renderDocOn_(html);
  1574. return $4;
  1575. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1576. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLDocumentationWidget)})},
  1577. messageSends: ["class:", "div", "with:", "renderHeadOn:", "renderDocOn:"]}),
  1578. smalltalk.HLDocumentationWidget);
  1579. smalltalk.addMethod(
  1580. smalltalk.method({
  1581. selector: "renderDocOn:",
  1582. fn: function (html){
  1583. var self=this;
  1584. function $Showdown(){return smalltalk.Showdown||(typeof Showdown=="undefined"?nil:Showdown)}
  1585. return smalltalk.withContext(function($ctx1) {
  1586. var $1,$2,$4,$5,$3,$6,$7;
  1587. $1=_st(self)._selectedItem();
  1588. if(($receiver = $1) == nil || $receiver == undefined){
  1589. $1;
  1590. } else {
  1591. _st(self)._renderInheritanceOn_(html);
  1592. $2=_st(html)._h1();
  1593. _st($2)._with_("Overview");
  1594. $3=_st($2)._with_((function(){
  1595. return smalltalk.withContext(function($ctx2) {
  1596. $4=_st(html)._button();
  1597. _st($4)._class_("button default");
  1598. _st($4)._with_("Edit");
  1599. $5=_st($4)._onClick_((function(){
  1600. return smalltalk.withContext(function($ctx3) {
  1601. return _st(self)._editDocumentation();
  1602. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1603. return $5;
  1604. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1605. $3;
  1606. $6=_st(html)._div();
  1607. _st($6)._class_("markdown");
  1608. $7=_st($6)._asJQuery();
  1609. _st($7)._html_(_st(_st(_st($Showdown())._at_("converter"))._new())._makeHtml_(_st(self)._documentation()));
  1610. };
  1611. return self}, function($ctx1) {$ctx1.fill(self,"renderDocOn:",{html:html},smalltalk.HLDocumentationWidget)})},
  1612. messageSends: ["ifNotNil:", "renderInheritanceOn:", "with:", "h1", "class:", "button", "onClick:", "editDocumentation", "html:", "makeHtml:", "documentation", "new", "at:", "div", "asJQuery", "selectedItem"]}),
  1613. smalltalk.HLDocumentationWidget);
  1614. smalltalk.addMethod(
  1615. smalltalk.method({
  1616. selector: "renderHeadOn:",
  1617. fn: function (html){
  1618. var self=this;
  1619. return smalltalk.withContext(function($ctx1) {
  1620. var $1,$2;
  1621. $1=_st(html)._div();
  1622. _st($1)._class_("head");
  1623. $2=_st($1)._with_(_st(self)._head());
  1624. return self}, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},smalltalk.HLDocumentationWidget)})},
  1625. messageSends: ["class:", "div", "with:", "head"]}),
  1626. smalltalk.HLDocumentationWidget);
  1627. smalltalk.addMethod(
  1628. smalltalk.method({
  1629. selector: "renderInheritanceOn:",
  1630. fn: function (html){
  1631. var self=this;
  1632. return smalltalk.withContext(function($ctx1) {
  1633. var $1,$3,$4,$5,$2;
  1634. $1=_st(html)._div();
  1635. _st($1)._class_("inheritance");
  1636. $2=_st($1)._with_((function(){
  1637. return smalltalk.withContext(function($ctx2) {
  1638. _st(html)._with_("Subclass of ");
  1639. $3=_st(_st(self)._selectedItem())._superclass();
  1640. if(($receiver = $3) == nil || $receiver == undefined){
  1641. return _st(_st(html)._em())._with_("nil");
  1642. } else {
  1643. $4=_st(html)._a();
  1644. _st($4)._with_(_st(_st(_st(self)._selectedItem())._superclass())._name());
  1645. $5=_st($4)._onClick_((function(){
  1646. return smalltalk.withContext(function($ctx3) {
  1647. return _st(self)._selectClass_(_st(_st(self)._selectedItem())._superclass());
  1648. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1649. return $5;
  1650. };
  1651. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1652. return self}, function($ctx1) {$ctx1.fill(self,"renderInheritanceOn:",{html:html},smalltalk.HLDocumentationWidget)})},
  1653. messageSends: ["class:", "div", "with:", "ifNil:ifNotNil:", "em", "name", "superclass", "selectedItem", "a", "onClick:", "selectClass:"]}),
  1654. smalltalk.HLDocumentationWidget);
  1655. smalltalk.addMethod(
  1656. smalltalk.method({
  1657. selector: "selectClass:",
  1658. fn: function (aClass){
  1659. var self=this;
  1660. return smalltalk.withContext(function($ctx1) {
  1661. _st(_st(self)._model())._selectedClass_(aClass);
  1662. return self}, function($ctx1) {$ctx1.fill(self,"selectClass:",{aClass:aClass},smalltalk.HLDocumentationWidget)})},
  1663. messageSends: ["selectedClass:", "model"]}),
  1664. smalltalk.HLDocumentationWidget);
  1665. smalltalk.addMethod(
  1666. smalltalk.method({
  1667. selector: "selectedItem",
  1668. fn: function (){
  1669. var self=this;
  1670. return smalltalk.withContext(function($ctx1) {
  1671. var $2,$1;
  1672. $2=_st(_st(self)._model())._selectedClass();
  1673. if(($receiver = $2) == nil || $receiver == undefined){
  1674. $1=$2;
  1675. } else {
  1676. var class_;
  1677. class_=$receiver;
  1678. $1=_st(class_)._theNonMetaClass();
  1679. };
  1680. return $1;
  1681. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{},smalltalk.HLDocumentationWidget)})},
  1682. messageSends: ["ifNotNil:", "theNonMetaClass", "selectedClass", "model"]}),
  1683. smalltalk.HLDocumentationWidget);
  1684. smalltalk.addMethod(
  1685. smalltalk.method({
  1686. selector: "setClassComment:",
  1687. fn: function (aString){
  1688. var self=this;
  1689. return smalltalk.withContext(function($ctx1) {
  1690. _st(_st(self)._model())._setClassComment_(aString);
  1691. return self}, function($ctx1) {$ctx1.fill(self,"setClassComment:",{aString:aString},smalltalk.HLDocumentationWidget)})},
  1692. messageSends: ["setClassComment:", "model"]}),
  1693. smalltalk.HLDocumentationWidget);
  1694. smalltalk.addMethod(
  1695. smalltalk.method({
  1696. selector: "unregister",
  1697. fn: function (){
  1698. var self=this;
  1699. return smalltalk.withContext(function($ctx1) {
  1700. smalltalk.HLFocusableWidget.fn.prototype._unregister.apply(_st(self), []);
  1701. _st(_st(_st(self)._model())._announcer())._unregister_(self);
  1702. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLDocumentationWidget)})},
  1703. messageSends: ["unregister", "unregister:", "announcer", "model"]}),
  1704. smalltalk.HLDocumentationWidget);
  1705. smalltalk.addClass('HLMethodsListWidget', smalltalk.HLToolListWidget, ['selectorsCache'], 'Helios-Browser');
  1706. smalltalk.addMethod(
  1707. smalltalk.method({
  1708. selector: "allProtocol",
  1709. fn: function (){
  1710. var self=this;
  1711. return smalltalk.withContext(function($ctx1) {
  1712. var $1;
  1713. $1=_st(_st(self)._model())._allProtocol();
  1714. return $1;
  1715. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{},smalltalk.HLMethodsListWidget)})},
  1716. messageSends: ["allProtocol", "model"]}),
  1717. smalltalk.HLMethodsListWidget);
  1718. smalltalk.addMethod(
  1719. smalltalk.method({
  1720. selector: "cssClassForItem:",
  1721. fn: function (aSelector){
  1722. var self=this;
  1723. var override,overriden,method;
  1724. return smalltalk.withContext(function($ctx1) {
  1725. var $2,$3,$4,$1;
  1726. method=_st(self)._methodForSelector_(aSelector);
  1727. override=_st(self)._isOverride_(method);
  1728. overriden=_st(self)._isOverridden_(method);
  1729. $2=override;
  1730. if(smalltalk.assert($2)){
  1731. $3=overriden;
  1732. if(smalltalk.assert($3)){
  1733. $1="override-overridden";
  1734. } else {
  1735. $1="override";
  1736. };
  1737. } else {
  1738. $4=overriden;
  1739. if(smalltalk.assert($4)){
  1740. $1="overridden";
  1741. } else {
  1742. $1="";
  1743. };
  1744. };
  1745. return $1;
  1746. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{aSelector:aSelector,override:override,overriden:overriden,method:method},smalltalk.HLMethodsListWidget)})},
  1747. messageSends: ["methodForSelector:", "isOverride:", "isOverridden:", "ifTrue:ifFalse:"]}),
  1748. smalltalk.HLMethodsListWidget);
  1749. smalltalk.addMethod(
  1750. smalltalk.method({
  1751. selector: "isOverridden:",
  1752. fn: function (aMethod){
  1753. var self=this;
  1754. return smalltalk.withContext(function($ctx1) {
  1755. var $1;
  1756. $1=_st(_st(self)._selectorsCache())._isOverridden_(aMethod);
  1757. return $1;
  1758. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod},smalltalk.HLMethodsListWidget)})},
  1759. messageSends: ["isOverridden:", "selectorsCache"]}),
  1760. smalltalk.HLMethodsListWidget);
  1761. smalltalk.addMethod(
  1762. smalltalk.method({
  1763. selector: "isOverride:",
  1764. fn: function (aMethod){
  1765. var self=this;
  1766. return smalltalk.withContext(function($ctx1) {
  1767. var $1;
  1768. $1=_st(_st(self)._selectorsCache())._isOverride_(aMethod);
  1769. return $1;
  1770. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod},smalltalk.HLMethodsListWidget)})},
  1771. messageSends: ["isOverride:", "selectorsCache"]}),
  1772. smalltalk.HLMethodsListWidget);
  1773. smalltalk.addMethod(
  1774. smalltalk.method({
  1775. selector: "label",
  1776. fn: function (){
  1777. var self=this;
  1778. return smalltalk.withContext(function($ctx1) {
  1779. return "Methods";
  1780. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMethodsListWidget)})},
  1781. messageSends: []}),
  1782. smalltalk.HLMethodsListWidget);
  1783. smalltalk.addMethod(
  1784. smalltalk.method({
  1785. selector: "methodForSelector:",
  1786. fn: function (aSelector){
  1787. var self=this;
  1788. return smalltalk.withContext(function($ctx1) {
  1789. var $1;
  1790. $1=_st(_st(_st(_st(self)._model())._selectedClass())._methodDictionary())._at_(aSelector);
  1791. return $1;
  1792. }, function($ctx1) {$ctx1.fill(self,"methodForSelector:",{aSelector:aSelector},smalltalk.HLMethodsListWidget)})},
  1793. messageSends: ["at:", "methodDictionary", "selectedClass", "model"]}),
  1794. smalltalk.HLMethodsListWidget);
  1795. smalltalk.addMethod(
  1796. smalltalk.method({
  1797. selector: "methodsInProtocol:",
  1798. fn: function (aString){
  1799. var self=this;
  1800. return smalltalk.withContext(function($ctx1) {
  1801. var $1,$2,$4,$3;
  1802. $1=_st(_st(self)._model())._selectedClass();
  1803. if(($receiver = $1) == nil || $receiver == undefined){
  1804. $2=[];
  1805. return $2;
  1806. } else {
  1807. $1;
  1808. };
  1809. $4=_st(aString).__eq(_st(self)._allProtocol());
  1810. if(smalltalk.assert($4)){
  1811. $3=_st(_st(_st(self)._model())._selectedClass())._methods();
  1812. } else {
  1813. $3=_st(_st(_st(self)._model())._selectedClass())._methodsInProtocol_(aString);
  1814. };
  1815. return $3;
  1816. }, function($ctx1) {$ctx1.fill(self,"methodsInProtocol:",{aString:aString},smalltalk.HLMethodsListWidget)})},
  1817. messageSends: ["ifNil:", "selectedClass", "model", "ifTrue:ifFalse:", "methods", "methodsInProtocol:", "=", "allProtocol"]}),
  1818. smalltalk.HLMethodsListWidget);
  1819. smalltalk.addMethod(
  1820. smalltalk.method({
  1821. selector: "observeModel",
  1822. fn: function (){
  1823. var self=this;
  1824. function $HLProtocolSelected(){return smalltalk.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  1825. function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  1826. function $HLMethodSelected(){return smalltalk.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  1827. function $HLMethodsFocusRequested(){return smalltalk.HLMethodsFocusRequested||(typeof HLMethodsFocusRequested=="undefined"?nil:HLMethodsFocusRequested)}
  1828. return smalltalk.withContext(function($ctx1) {
  1829. var $1,$2;
  1830. $1=_st(_st(self)._model())._announcer();
  1831. _st($1)._on_send_to_($HLProtocolSelected(),"onProtocolSelected:",self);
  1832. _st($1)._on_send_to_($HLShowInstanceToggled(),"onShowInstanceToggled",self);
  1833. _st($1)._on_send_to_($HLMethodSelected(),"onMethodSelected:",self);
  1834. $2=_st($1)._on_send_to_($HLMethodsFocusRequested(),"onMethodsFocusRequested",self);
  1835. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLMethodsListWidget)})},
  1836. messageSends: ["on:send:to:", "announcer", "model"]}),
  1837. smalltalk.HLMethodsListWidget);
  1838. smalltalk.addMethod(
  1839. smalltalk.method({
  1840. selector: "observeSystem",
  1841. fn: function (){
  1842. var self=this;
  1843. function $ProtocolAdded(){return smalltalk.ProtocolAdded||(typeof ProtocolAdded=="undefined"?nil:ProtocolAdded)}
  1844. function $ProtocolRemoved(){return smalltalk.ProtocolRemoved||(typeof ProtocolRemoved=="undefined"?nil:ProtocolRemoved)}
  1845. function $MethodAdded(){return smalltalk.MethodAdded||(typeof MethodAdded=="undefined"?nil:MethodAdded)}
  1846. function $MethodRemoved(){return smalltalk.MethodRemoved||(typeof MethodRemoved=="undefined"?nil:MethodRemoved)}
  1847. function $MethodMoved(){return smalltalk.MethodMoved||(typeof MethodMoved=="undefined"?nil:MethodMoved)}
  1848. return smalltalk.withContext(function($ctx1) {
  1849. var $1,$2;
  1850. $1=_st(_st(self)._model())._systemAnnouncer();
  1851. _st($1)._on_send_to_($ProtocolAdded(),"onProtocolAdded:",self);
  1852. _st($1)._on_send_to_($ProtocolRemoved(),"onProtocolRemoved:",self);
  1853. _st($1)._on_send_to_($MethodAdded(),"onMethodAdded:",self);
  1854. _st($1)._on_send_to_($MethodRemoved(),"onMethodRemoved:",self);
  1855. $2=_st($1)._on_send_to_($MethodMoved(),"onMethodMoved:",self);
  1856. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLMethodsListWidget)})},
  1857. messageSends: ["on:send:to:", "systemAnnouncer", "model"]}),
  1858. smalltalk.HLMethodsListWidget);
  1859. smalltalk.addMethod(
  1860. smalltalk.method({
  1861. selector: "onMethodAdded:",
  1862. fn: function (anAnnouncement){
  1863. var self=this;
  1864. return smalltalk.withContext(function($ctx1) {
  1865. var $1,$2;
  1866. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(_st(anAnnouncement)._method())._methodClass());
  1867. if(! smalltalk.assert($1)){
  1868. $2=self;
  1869. return $2;
  1870. };
  1871. _st(self)._setItemsForSelectedProtocol();
  1872. _st(self)._refresh();
  1873. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{anAnnouncement:anAnnouncement},smalltalk.HLMethodsListWidget)})},
  1874. messageSends: ["ifFalse:", "=", "methodClass", "method", "selectedClass", "model", "setItemsForSelectedProtocol", "refresh"]}),
  1875. smalltalk.HLMethodsListWidget);
  1876. smalltalk.addMethod(
  1877. smalltalk.method({
  1878. selector: "onMethodMoved:",
  1879. fn: function (anAnnouncement){
  1880. var self=this;
  1881. return smalltalk.withContext(function($ctx1) {
  1882. var $1,$2,$3,$4,$5;
  1883. $1=_st(_st(_st(self)._model())._selectedMethod()).__eq(_st(anAnnouncement)._method());
  1884. if(! smalltalk.assert($1)){
  1885. $2=self;
  1886. return $2;
  1887. };
  1888. $3=_st(_st(_st(self)._model())._selectedProtocol()).__eq(_st(_st(self)._model())._allProtocol());
  1889. if(! smalltalk.assert($3)){
  1890. $4=self;
  1891. _st($4)._selectedItem_(nil);
  1892. _st($4)._selectItem_(nil);
  1893. _st($4)._setItemsForSelectedProtocol();
  1894. $5=_st($4)._refresh();
  1895. $5;
  1896. };
  1897. return self}, function($ctx1) {$ctx1.fill(self,"onMethodMoved:",{anAnnouncement:anAnnouncement},smalltalk.HLMethodsListWidget)})},
  1898. messageSends: ["ifFalse:", "=", "method", "selectedMethod", "model", "selectedItem:", "selectItem:", "setItemsForSelectedProtocol", "refresh", "allProtocol", "selectedProtocol"]}),
  1899. smalltalk.HLMethodsListWidget);
  1900. smalltalk.addMethod(
  1901. smalltalk.method({
  1902. selector: "onMethodRemoved:",
  1903. fn: function (anAnnouncement){
  1904. var self=this;
  1905. var method;
  1906. return smalltalk.withContext(function($ctx1) {
  1907. var $1,$2,$3,$4,$5;
  1908. var $early={};
  1909. try {
  1910. method=_st(anAnnouncement)._method();
  1911. _st(_st(self)._items())._detect_ifNone_((function(each){
  1912. return smalltalk.withContext(function($ctx2) {
  1913. return _st(each).__eq(_st(method)._selector());
  1914. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  1915. return smalltalk.withContext(function($ctx2) {
  1916. $1=self;
  1917. throw $early=[$1];
  1918. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1919. $2=_st(self)._selectedItem();
  1920. if(($receiver = $2) == nil || $receiver == undefined){
  1921. $2;
  1922. } else {
  1923. $3=_st(_st(_st(method)._methodClass()).__eq(_st(_st(self)._model())._selectedClass()))._and_((function(){
  1924. return smalltalk.withContext(function($ctx2) {
  1925. return _st(_st(method)._selector()).__eq(_st(self)._selectedItem());
  1926. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1927. if(smalltalk.assert($3)){
  1928. $4=self;
  1929. _st($4)._selectedItem_(nil);
  1930. $5=_st($4)._selectItem_(nil);
  1931. $5;
  1932. };
  1933. };
  1934. _st(self)._setItemsForSelectedProtocol();
  1935. _st(self)._refresh();
  1936. return self}
  1937. catch(e) {if(e===$early)return e[0]; throw e}
  1938. }, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{anAnnouncement:anAnnouncement,method:method},smalltalk.HLMethodsListWidget)})},
  1939. messageSends: ["method", "detect:ifNone:", "=", "selector", "items", "ifNotNil:", "ifTrue:", "selectedItem:", "selectItem:", "and:", "selectedItem", "selectedClass", "model", "methodClass", "setItemsForSelectedProtocol", "refresh"]}),
  1940. smalltalk.HLMethodsListWidget);
  1941. smalltalk.addMethod(
  1942. smalltalk.method({
  1943. selector: "onMethodSelected:",
  1944. fn: function (anAnnouncement){
  1945. var self=this;
  1946. var selector,method;
  1947. return smalltalk.withContext(function($ctx1) {
  1948. var $1,$2,$3;
  1949. method=_st(anAnnouncement)._item();
  1950. $1=_st(method)._isCompiledMethod();
  1951. if(smalltalk.assert($1)){
  1952. selector=_st(method)._selector();
  1953. } else {
  1954. selector=nil;
  1955. };
  1956. $2=self;
  1957. _st($2)._selectedItem_(selector);
  1958. $3=_st($2)._activateItem_(selector);
  1959. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{anAnnouncement:anAnnouncement,selector:selector,method:method},smalltalk.HLMethodsListWidget)})},
  1960. messageSends: ["item", "ifTrue:ifFalse:", "selector", "isCompiledMethod", "selectedItem:", "activateItem:"]}),
  1961. smalltalk.HLMethodsListWidget);
  1962. smalltalk.addMethod(
  1963. smalltalk.method({
  1964. selector: "onMethodsFocusRequested",
  1965. fn: function (){
  1966. var self=this;
  1967. return smalltalk.withContext(function($ctx1) {
  1968. _st(self)._focus();
  1969. return self}, function($ctx1) {$ctx1.fill(self,"onMethodsFocusRequested",{},smalltalk.HLMethodsListWidget)})},
  1970. messageSends: ["focus"]}),
  1971. smalltalk.HLMethodsListWidget);
  1972. smalltalk.addMethod(
  1973. smalltalk.method({
  1974. selector: "onProtocolAdded:",
  1975. fn: function (anAnnouncement){
  1976. var self=this;
  1977. return smalltalk.withContext(function($ctx1) {
  1978. var $1,$2;
  1979. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(anAnnouncement)._theClass());
  1980. if(! smalltalk.assert($1)){
  1981. $2=self;
  1982. return $2;
  1983. };
  1984. _st(self)._setItemsForSelectedProtocol();
  1985. _st(self)._refresh();
  1986. _st(self)._focus();
  1987. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolAdded:",{anAnnouncement:anAnnouncement},smalltalk.HLMethodsListWidget)})},
  1988. messageSends: ["ifFalse:", "=", "theClass", "selectedClass", "model", "setItemsForSelectedProtocol", "refresh", "focus"]}),
  1989. smalltalk.HLMethodsListWidget);
  1990. smalltalk.addMethod(
  1991. smalltalk.method({
  1992. selector: "onProtocolRemoved:",
  1993. fn: function (anAnnouncement){
  1994. var self=this;
  1995. return smalltalk.withContext(function($ctx1) {
  1996. var $1,$2;
  1997. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(anAnnouncement)._theClass());
  1998. if(! smalltalk.assert($1)){
  1999. $2=self;
  2000. return $2;
  2001. };
  2002. _st(self)._setItemsForSelectedProtocol();
  2003. _st(self)._refresh();
  2004. _st(self)._focus();
  2005. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolRemoved:",{anAnnouncement:anAnnouncement},smalltalk.HLMethodsListWidget)})},
  2006. messageSends: ["ifFalse:", "=", "theClass", "selectedClass", "model", "setItemsForSelectedProtocol", "refresh", "focus"]}),
  2007. smalltalk.HLMethodsListWidget);
  2008. smalltalk.addMethod(
  2009. smalltalk.method({
  2010. selector: "onProtocolSelected:",
  2011. fn: function (anAnnouncement){
  2012. var self=this;
  2013. return smalltalk.withContext(function($ctx1) {
  2014. _st(self)._selectedItem_(nil);
  2015. _st(self)._setItemsForSelectedProtocol();
  2016. _st(self)._refresh();
  2017. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{anAnnouncement:anAnnouncement},smalltalk.HLMethodsListWidget)})},
  2018. messageSends: ["selectedItem:", "setItemsForSelectedProtocol", "refresh"]}),
  2019. smalltalk.HLMethodsListWidget);
  2020. smalltalk.addMethod(
  2021. smalltalk.method({
  2022. selector: "onShowInstanceToggled",
  2023. fn: function (){
  2024. var self=this;
  2025. return smalltalk.withContext(function($ctx1) {
  2026. _st(self)._onProtocolSelected_(nil);
  2027. return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{},smalltalk.HLMethodsListWidget)})},
  2028. messageSends: ["onProtocolSelected:"]}),
  2029. smalltalk.HLMethodsListWidget);
  2030. smalltalk.addMethod(
  2031. smalltalk.method({
  2032. selector: "overrideSelectors",
  2033. fn: function (){
  2034. var self=this;
  2035. function $Set(){return smalltalk.Set||(typeof Set=="undefined"?nil:Set)}
  2036. return smalltalk.withContext(function($ctx1) {
  2037. var $2,$3,$1;
  2038. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("override",(function(){
  2039. return smalltalk.withContext(function($ctx2) {
  2040. return _st(_st(_st(_st(self)._model())._selectedClass())._allSuperclasses())._inject_into_(_st($Set())._new(),(function(acc,each){
  2041. return smalltalk.withContext(function($ctx3) {
  2042. $2=acc;
  2043. _st($2)._addAll_(_st(each)._selectors());
  2044. $3=_st($2)._yourself();
  2045. return $3;
  2046. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  2047. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2048. return $1;
  2049. }, function($ctx1) {$ctx1.fill(self,"overrideSelectors",{},smalltalk.HLMethodsListWidget)})},
  2050. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSuperclasses", "selectedClass", "model", "selectorsCache"]}),
  2051. smalltalk.HLMethodsListWidget);
  2052. smalltalk.addMethod(
  2053. smalltalk.method({
  2054. selector: "overridenSelectors",
  2055. fn: function (){
  2056. var self=this;
  2057. function $Set(){return smalltalk.Set||(typeof Set=="undefined"?nil:Set)}
  2058. return smalltalk.withContext(function($ctx1) {
  2059. var $2,$3,$1;
  2060. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("overriden",(function(){
  2061. return smalltalk.withContext(function($ctx2) {
  2062. return _st(_st(_st(_st(self)._model())._selectedClass())._allSubclasses())._inject_into_(_st($Set())._new(),(function(acc,each){
  2063. return smalltalk.withContext(function($ctx3) {
  2064. $2=acc;
  2065. _st($2)._addAll_(_st(each)._selectors());
  2066. $3=_st($2)._yourself();
  2067. return $3;
  2068. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  2069. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2070. return $1;
  2071. }, function($ctx1) {$ctx1.fill(self,"overridenSelectors",{},smalltalk.HLMethodsListWidget)})},
  2072. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSubclasses", "selectedClass", "model", "selectorsCache"]}),
  2073. smalltalk.HLMethodsListWidget);
  2074. smalltalk.addMethod(
  2075. smalltalk.method({
  2076. selector: "renderContentOn:",
  2077. fn: function (html){
  2078. var self=this;
  2079. return smalltalk.withContext(function($ctx1) {
  2080. var $1,$2,$3;
  2081. $1=_st(_st(self)._model())._showInstance();
  2082. if(smalltalk.assert($1)){
  2083. smalltalk.HLToolListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  2084. } else {
  2085. $2=_st(html)._div();
  2086. _st($2)._class_("class_side");
  2087. $3=_st($2)._with_((function(){
  2088. return smalltalk.withContext(function($ctx2) {
  2089. return smalltalk.HLToolListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  2090. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2091. $3;
  2092. };
  2093. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLMethodsListWidget)})},
  2094. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"]}),
  2095. smalltalk.HLMethodsListWidget);
  2096. smalltalk.addMethod(
  2097. smalltalk.method({
  2098. selector: "renderItemLabel:on:",
  2099. fn: function (aSelector,html){
  2100. var self=this;
  2101. return smalltalk.withContext(function($ctx1) {
  2102. _st(html)._with_(aSelector);
  2103. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aSelector:aSelector,html:html},smalltalk.HLMethodsListWidget)})},
  2104. messageSends: ["with:"]}),
  2105. smalltalk.HLMethodsListWidget);
  2106. smalltalk.addMethod(
  2107. smalltalk.method({
  2108. selector: "selectItem:",
  2109. fn: function (aSelector){
  2110. var self=this;
  2111. return smalltalk.withContext(function($ctx1) {
  2112. var $1,$2;
  2113. $1=aSelector;
  2114. if(($receiver = $1) == nil || $receiver == undefined){
  2115. $2=_st(_st(self)._model())._selectedMethod_(nil);
  2116. return $2;
  2117. } else {
  2118. $1;
  2119. };
  2120. _st(_st(self)._model())._selectedMethod_(_st(self)._methodForSelector_(aSelector));
  2121. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aSelector:aSelector},smalltalk.HLMethodsListWidget)})},
  2122. messageSends: ["ifNil:", "selectedMethod:", "model", "methodForSelector:"]}),
  2123. smalltalk.HLMethodsListWidget);
  2124. smalltalk.addMethod(
  2125. smalltalk.method({
  2126. selector: "selectorsCache",
  2127. fn: function (){
  2128. var self=this;
  2129. return smalltalk.withContext(function($ctx1) {
  2130. var $1;
  2131. $1=_st(_st(self)._class())._selectorsCache();
  2132. return $1;
  2133. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{},smalltalk.HLMethodsListWidget)})},
  2134. messageSends: ["selectorsCache", "class"]}),
  2135. smalltalk.HLMethodsListWidget);
  2136. smalltalk.addMethod(
  2137. smalltalk.method({
  2138. selector: "selectorsInProtocol:",
  2139. fn: function (aString){
  2140. var self=this;
  2141. return smalltalk.withContext(function($ctx1) {
  2142. var $1;
  2143. $1=_st(_st(_st(self)._methodsInProtocol_(aString))._collect_((function(each){
  2144. return smalltalk.withContext(function($ctx2) {
  2145. return _st(each)._selector();
  2146. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._sorted();
  2147. return $1;
  2148. }, function($ctx1) {$ctx1.fill(self,"selectorsInProtocol:",{aString:aString},smalltalk.HLMethodsListWidget)})},
  2149. messageSends: ["sorted", "collect:", "selector", "methodsInProtocol:"]}),
  2150. smalltalk.HLMethodsListWidget);
  2151. smalltalk.addMethod(
  2152. smalltalk.method({
  2153. selector: "setItemsForProtocol:",
  2154. fn: function (aString){
  2155. var self=this;
  2156. return smalltalk.withContext(function($ctx1) {
  2157. var $2,$4,$3,$1;
  2158. $2=self;
  2159. $4=aString;
  2160. if(($receiver = $4) == nil || $receiver == undefined){
  2161. $3=[];
  2162. } else {
  2163. $3=_st(self)._selectorsInProtocol_(aString);
  2164. };
  2165. $1=_st($2)._items_($3);
  2166. return $1;
  2167. }, function($ctx1) {$ctx1.fill(self,"setItemsForProtocol:",{aString:aString},smalltalk.HLMethodsListWidget)})},
  2168. messageSends: ["items:", "ifNil:ifNotNil:", "selectorsInProtocol:"]}),
  2169. smalltalk.HLMethodsListWidget);
  2170. smalltalk.addMethod(
  2171. smalltalk.method({
  2172. selector: "setItemsForSelectedProtocol",
  2173. fn: function (){
  2174. var self=this;
  2175. return smalltalk.withContext(function($ctx1) {
  2176. _st(self)._setItemsForProtocol_(_st(_st(self)._model())._selectedProtocol());
  2177. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedProtocol",{},smalltalk.HLMethodsListWidget)})},
  2178. messageSends: ["setItemsForProtocol:", "selectedProtocol", "model"]}),
  2179. smalltalk.HLMethodsListWidget);
  2180. smalltalk.HLMethodsListWidget.klass.iVarNames = ['selectorsCache'];
  2181. smalltalk.addMethod(
  2182. smalltalk.method({
  2183. selector: "selectorsCache",
  2184. fn: function (){
  2185. var self=this;
  2186. function $HLSelectorsCache(){return smalltalk.HLSelectorsCache||(typeof HLSelectorsCache=="undefined"?nil:HLSelectorsCache)}
  2187. return smalltalk.withContext(function($ctx1) {
  2188. var $1;
  2189. $1=_st($HLSelectorsCache())._current();
  2190. return $1;
  2191. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{},smalltalk.HLMethodsListWidget.klass)})},
  2192. messageSends: ["current"]}),
  2193. smalltalk.HLMethodsListWidget.klass);
  2194. smalltalk.addClass('HLPackagesListWidget', smalltalk.HLToolListWidget, [], 'Helios-Browser');
  2195. smalltalk.addMethod(
  2196. smalltalk.method({
  2197. selector: "commitPackage",
  2198. fn: function (){
  2199. var self=this;
  2200. return smalltalk.withContext(function($ctx1) {
  2201. _st(_st(self)._model())._commitPackage();
  2202. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage",{},smalltalk.HLPackagesListWidget)})},
  2203. messageSends: ["commitPackage", "model"]}),
  2204. smalltalk.HLPackagesListWidget);
  2205. smalltalk.addMethod(
  2206. smalltalk.method({
  2207. selector: "cssClassForItem:",
  2208. fn: function (anItem){
  2209. var self=this;
  2210. return smalltalk.withContext(function($ctx1) {
  2211. return "package";
  2212. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{anItem:anItem},smalltalk.HLPackagesListWidget)})},
  2213. messageSends: []}),
  2214. smalltalk.HLPackagesListWidget);
  2215. smalltalk.addMethod(
  2216. smalltalk.method({
  2217. selector: "focusClassesListWidget",
  2218. fn: function (){
  2219. var self=this;
  2220. function $HLClassesListFocus(){return smalltalk.HLClassesListFocus||(typeof HLClassesListFocus=="undefined"?nil:HLClassesListFocus)}
  2221. return smalltalk.withContext(function($ctx1) {
  2222. _st(_st(_st(self)._model())._announcer())._announce_(_st($HLClassesListFocus())._new());
  2223. return self}, function($ctx1) {$ctx1.fill(self,"focusClassesListWidget",{},smalltalk.HLPackagesListWidget)})},
  2224. messageSends: ["announce:", "new", "announcer", "model"]}),
  2225. smalltalk.HLPackagesListWidget);
  2226. smalltalk.addMethod(
  2227. smalltalk.method({
  2228. selector: "initializeItems",
  2229. fn: function (){
  2230. var self=this;
  2231. return smalltalk.withContext(function($ctx1) {
  2232. var $1;
  2233. self["@items"]=_st(_st(_st(self)._model())._packages())._sort_((function(a,b){
  2234. return smalltalk.withContext(function($ctx2) {
  2235. return _st(_st(a)._name()).__lt(_st(b)._name());
  2236. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  2237. $1=self["@items"];
  2238. return $1;
  2239. }, function($ctx1) {$ctx1.fill(self,"initializeItems",{},smalltalk.HLPackagesListWidget)})},
  2240. messageSends: ["sort:", "<", "name", "packages", "model"]}),
  2241. smalltalk.HLPackagesListWidget);
  2242. smalltalk.addMethod(
  2243. smalltalk.method({
  2244. selector: "items",
  2245. fn: function (){
  2246. var self=this;
  2247. return smalltalk.withContext(function($ctx1) {
  2248. var $2,$1;
  2249. $2=self["@items"];
  2250. if(($receiver = $2) == nil || $receiver == undefined){
  2251. $1=_st(self)._initializeItems();
  2252. } else {
  2253. $1=$2;
  2254. };
  2255. return $1;
  2256. }, function($ctx1) {$ctx1.fill(self,"items",{},smalltalk.HLPackagesListWidget)})},
  2257. messageSends: ["ifNil:", "initializeItems"]}),
  2258. smalltalk.HLPackagesListWidget);
  2259. smalltalk.addMethod(
  2260. smalltalk.method({
  2261. selector: "label",
  2262. fn: function (){
  2263. var self=this;
  2264. return smalltalk.withContext(function($ctx1) {
  2265. return "Packages";
  2266. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLPackagesListWidget)})},
  2267. messageSends: []}),
  2268. smalltalk.HLPackagesListWidget);
  2269. smalltalk.addMethod(
  2270. smalltalk.method({
  2271. selector: "observeModel",
  2272. fn: function (){
  2273. var self=this;
  2274. function $HLPackageSelected(){return smalltalk.HLPackageSelected||(typeof HLPackageSelected=="undefined"?nil:HLPackageSelected)}
  2275. function $HLPackagesFocusRequested(){return smalltalk.HLPackagesFocusRequested||(typeof HLPackagesFocusRequested=="undefined"?nil:HLPackagesFocusRequested)}
  2276. return smalltalk.withContext(function($ctx1) {
  2277. var $1,$2;
  2278. $1=_st(_st(self)._model())._announcer();
  2279. _st($1)._on_send_to_($HLPackageSelected(),"onPackageSelected:",self);
  2280. $2=_st($1)._on_send_to_($HLPackagesFocusRequested(),"onPackagesFocusRequested",self);
  2281. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLPackagesListWidget)})},
  2282. messageSends: ["on:send:to:", "announcer", "model"]}),
  2283. smalltalk.HLPackagesListWidget);
  2284. smalltalk.addMethod(
  2285. smalltalk.method({
  2286. selector: "observeSystem",
  2287. fn: function (){
  2288. var self=this;
  2289. function $ClassAdded(){return smalltalk.ClassAdded||(typeof ClassAdded=="undefined"?nil:ClassAdded)}
  2290. return smalltalk.withContext(function($ctx1) {
  2291. _st(_st(_st(self)._model())._systemAnnouncer())._on_send_to_($ClassAdded(),"onClassAdded:",self);
  2292. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLPackagesListWidget)})},
  2293. messageSends: ["on:send:to:", "systemAnnouncer", "model"]}),
  2294. smalltalk.HLPackagesListWidget);
  2295. smalltalk.addMethod(
  2296. smalltalk.method({
  2297. selector: "onClassAdded:",
  2298. fn: function (anAnnouncement){
  2299. var self=this;
  2300. return smalltalk.withContext(function($ctx1) {
  2301. var $1,$2,$3;
  2302. $1=_st(_st(self)._items())._includes_(_st(_st(anAnnouncement)._theClass())._package());
  2303. if(! smalltalk.assert($1)){
  2304. $2=self;
  2305. _st($2)._initializeItems();
  2306. $3=_st($2)._refresh();
  2307. $3;
  2308. };
  2309. return self}, function($ctx1) {$ctx1.fill(self,"onClassAdded:",{anAnnouncement:anAnnouncement},smalltalk.HLPackagesListWidget)})},
  2310. messageSends: ["ifFalse:", "initializeItems", "refresh", "includes:", "package", "theClass", "items"]}),
  2311. smalltalk.HLPackagesListWidget);
  2312. smalltalk.addMethod(
  2313. smalltalk.method({
  2314. selector: "onPackageSelected:",
  2315. fn: function (anAnnouncement){
  2316. var self=this;
  2317. var package_;
  2318. return smalltalk.withContext(function($ctx1) {
  2319. var $1,$2,$3;
  2320. package_=_st(anAnnouncement)._item();
  2321. _st(self)._selectedItem_(package_);
  2322. $1=_st(self)._hasFocus();
  2323. if(! smalltalk.assert($1)){
  2324. $2=self;
  2325. _st($2)._activateItem_(package_);
  2326. $3=_st($2)._focus();
  2327. $3;
  2328. };
  2329. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{anAnnouncement:anAnnouncement,package_:package_},smalltalk.HLPackagesListWidget)})},
  2330. messageSends: ["item", "selectedItem:", "ifFalse:", "activateItem:", "focus", "hasFocus"]}),
  2331. smalltalk.HLPackagesListWidget);
  2332. smalltalk.addMethod(
  2333. smalltalk.method({
  2334. selector: "onPackagesFocusRequested",
  2335. fn: function (){
  2336. var self=this;
  2337. return smalltalk.withContext(function($ctx1) {
  2338. _st(self)._focus();
  2339. return self}, function($ctx1) {$ctx1.fill(self,"onPackagesFocusRequested",{},smalltalk.HLPackagesListWidget)})},
  2340. messageSends: ["focus"]}),
  2341. smalltalk.HLPackagesListWidget);
  2342. smalltalk.addMethod(
  2343. smalltalk.method({
  2344. selector: "renderItemLabel:on:",
  2345. fn: function (aPackage,html){
  2346. var self=this;
  2347. return smalltalk.withContext(function($ctx1) {
  2348. _st(html)._with_(_st(aPackage)._name());
  2349. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aPackage:aPackage,html:html},smalltalk.HLPackagesListWidget)})},
  2350. messageSends: ["with:", "name"]}),
  2351. smalltalk.HLPackagesListWidget);
  2352. smalltalk.addMethod(
  2353. smalltalk.method({
  2354. selector: "selectItem:",
  2355. fn: function (aPackage){
  2356. var self=this;
  2357. return smalltalk.withContext(function($ctx1) {
  2358. _st(_st(self)._model())._selectedPackage_(aPackage);
  2359. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aPackage:aPackage},smalltalk.HLPackagesListWidget)})},
  2360. messageSends: ["selectedPackage:", "model"]}),
  2361. smalltalk.HLPackagesListWidget);
  2362. smalltalk.addClass('HLProtocolsListWidget', smalltalk.HLToolListWidget, [], 'Helios-Browser');
  2363. smalltalk.addMethod(
  2364. smalltalk.method({
  2365. selector: "allProtocol",
  2366. fn: function (){
  2367. var self=this;
  2368. return smalltalk.withContext(function($ctx1) {
  2369. var $1;
  2370. $1=_st(_st(self)._model())._allProtocol();
  2371. return $1;
  2372. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{},smalltalk.HLProtocolsListWidget)})},
  2373. messageSends: ["allProtocol", "model"]}),
  2374. smalltalk.HLProtocolsListWidget);
  2375. smalltalk.addMethod(
  2376. smalltalk.method({
  2377. selector: "cssClassForItem:",
  2378. fn: function (anItem){
  2379. var self=this;
  2380. return smalltalk.withContext(function($ctx1) {
  2381. var $1,$2,$3,$4;
  2382. $1=_st(anItem).__eq(_st(self)._allProtocol());
  2383. if(smalltalk.assert($1)){
  2384. return "";
  2385. };
  2386. $2=_st(anItem).__eq("private");
  2387. if(smalltalk.assert($2)){
  2388. return "private";
  2389. };
  2390. $3=_st(anItem).__eq("initialization");
  2391. if(smalltalk.assert($3)){
  2392. return "default";
  2393. };
  2394. $4=_st(anItem)._match_("^\x5c*");
  2395. if(smalltalk.assert($4)){
  2396. return "extension";
  2397. };
  2398. return "";
  2399. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{anItem:anItem},smalltalk.HLProtocolsListWidget)})},
  2400. messageSends: ["ifTrue:", "=", "allProtocol", "match:"]}),
  2401. smalltalk.HLProtocolsListWidget);
  2402. smalltalk.addMethod(
  2403. smalltalk.method({
  2404. selector: "label",
  2405. fn: function (){
  2406. var self=this;
  2407. return smalltalk.withContext(function($ctx1) {
  2408. return "Protocols";
  2409. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLProtocolsListWidget)})},
  2410. messageSends: []}),
  2411. smalltalk.HLProtocolsListWidget);
  2412. smalltalk.addMethod(
  2413. smalltalk.method({
  2414. selector: "observeModel",
  2415. fn: function (){
  2416. var self=this;
  2417. function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  2418. function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  2419. function $HLProtocolSelected(){return smalltalk.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  2420. function $HLProtocolsFocusRequested(){return smalltalk.HLProtocolsFocusRequested||(typeof HLProtocolsFocusRequested=="undefined"?nil:HLProtocolsFocusRequested)}
  2421. return smalltalk.withContext(function($ctx1) {
  2422. var $1,$2;
  2423. $1=_st(_st(self)._model())._announcer();
  2424. _st($1)._on_send_to_($HLClassSelected(),"onClassSelected:",self);
  2425. _st($1)._on_send_to_($HLShowInstanceToggled(),"onClassSelected:",self);
  2426. _st($1)._on_send_to_($HLProtocolSelected(),"onProtocolSelected:",self);
  2427. $2=_st($1)._on_send_to_($HLProtocolsFocusRequested(),"onProtocolsFocusRequested",self);
  2428. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLProtocolsListWidget)})},
  2429. messageSends: ["on:send:to:", "announcer", "model"]}),
  2430. smalltalk.HLProtocolsListWidget);
  2431. smalltalk.addMethod(
  2432. smalltalk.method({
  2433. selector: "observeSystem",
  2434. fn: function (){
  2435. var self=this;
  2436. function $ProtocolAdded(){return smalltalk.ProtocolAdded||(typeof ProtocolAdded=="undefined"?nil:ProtocolAdded)}
  2437. function $ProtocolRemoved(){return smalltalk.ProtocolRemoved||(typeof ProtocolRemoved=="undefined"?nil:ProtocolRemoved)}
  2438. return smalltalk.withContext(function($ctx1) {
  2439. var $1,$2;
  2440. $1=_st(_st(self)._model())._systemAnnouncer();
  2441. _st($1)._on_send_to_($ProtocolAdded(),"onProtocolAdded:",self);
  2442. $2=_st($1)._on_send_to_($ProtocolRemoved(),"onProtocolRemoved:",self);
  2443. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLProtocolsListWidget)})},
  2444. messageSends: ["on:send:to:", "systemAnnouncer", "model"]}),
  2445. smalltalk.HLProtocolsListWidget);
  2446. smalltalk.addMethod(
  2447. smalltalk.method({
  2448. selector: "onClassSelected:",
  2449. fn: function (anAnnouncement){
  2450. var self=this;
  2451. return smalltalk.withContext(function($ctx1) {
  2452. _st(self)._selectedItem_(nil);
  2453. _st(self)._setItemsForSelectedClass();
  2454. _st(self)._refresh();
  2455. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncement:anAnnouncement},smalltalk.HLProtocolsListWidget)})},
  2456. messageSends: ["selectedItem:", "setItemsForSelectedClass", "refresh"]}),
  2457. smalltalk.HLProtocolsListWidget);
  2458. smalltalk.addMethod(
  2459. smalltalk.method({
  2460. selector: "onProtocolAdded:",
  2461. fn: function (anAnnouncement){
  2462. var self=this;
  2463. var class_;
  2464. return smalltalk.withContext(function($ctx1) {
  2465. var $1,$2;
  2466. class_=_st(anAnnouncement)._theClass();
  2467. $1=_st(class_).__eq(_st(_st(self)._model())._selectedClass());
  2468. if(! smalltalk.assert($1)){
  2469. $2=self;
  2470. return $2;
  2471. };
  2472. _st(self)._setItemsForSelectedClass();
  2473. _st(self)._refresh();
  2474. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolAdded:",{anAnnouncement:anAnnouncement,class_:class_},smalltalk.HLProtocolsListWidget)})},
  2475. messageSends: ["theClass", "ifFalse:", "=", "selectedClass", "model", "setItemsForSelectedClass", "refresh"]}),
  2476. smalltalk.HLProtocolsListWidget);
  2477. smalltalk.addMethod(
  2478. smalltalk.method({
  2479. selector: "onProtocolRemoved:",
  2480. fn: function (anAnnouncement){
  2481. var self=this;
  2482. var class_,protocol;
  2483. return smalltalk.withContext(function($ctx1) {
  2484. var $1,$2,$3,$4,$5;
  2485. class_=_st(anAnnouncement)._theClass();
  2486. protocol=_st(anAnnouncement)._protocol();
  2487. $1=_st(class_).__eq(_st(_st(self)._model())._selectedClass());
  2488. if(! smalltalk.assert($1)){
  2489. $2=self;
  2490. return $2;
  2491. };
  2492. $3=_st(_st(_st(self)._model())._selectedProtocol()).__eq(protocol);
  2493. if(smalltalk.assert($3)){
  2494. $4=self;
  2495. _st($4)._selectedItem_(nil);
  2496. $5=_st($4)._selectItem_(nil);
  2497. $5;
  2498. };
  2499. _st(self)._setItemsForSelectedClass();
  2500. _st(self)._refresh();
  2501. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolRemoved:",{anAnnouncement:anAnnouncement,class_:class_,protocol:protocol},smalltalk.HLProtocolsListWidget)})},
  2502. messageSends: ["theClass", "protocol", "ifFalse:", "=", "selectedClass", "model", "ifTrue:", "selectedItem:", "selectItem:", "selectedProtocol", "setItemsForSelectedClass", "refresh"]}),
  2503. smalltalk.HLProtocolsListWidget);
  2504. smalltalk.addMethod(
  2505. smalltalk.method({
  2506. selector: "onProtocolSelected:",
  2507. fn: function (anAnnouncement){
  2508. var self=this;
  2509. var protocol;
  2510. return smalltalk.withContext(function($ctx1) {
  2511. var $1,$2,$3,$4,$5;
  2512. protocol=_st(anAnnouncement)._item();
  2513. _st(self)._selectedItem_(protocol);
  2514. $1=protocol;
  2515. if(($receiver = $1) == nil || $receiver == undefined){
  2516. $2=self;
  2517. return $2;
  2518. } else {
  2519. $1;
  2520. };
  2521. $3=_st(self)._hasFocus();
  2522. if(! smalltalk.assert($3)){
  2523. $4=self;
  2524. _st($4)._activateItem_(protocol);
  2525. $5=_st($4)._focus();
  2526. $5;
  2527. };
  2528. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{anAnnouncement:anAnnouncement,protocol:protocol},smalltalk.HLProtocolsListWidget)})},
  2529. messageSends: ["item", "selectedItem:", "ifNil:", "ifFalse:", "activateItem:", "focus", "hasFocus"]}),
  2530. smalltalk.HLProtocolsListWidget);
  2531. smalltalk.addMethod(
  2532. smalltalk.method({
  2533. selector: "onProtocolsFocusRequested",
  2534. fn: function (){
  2535. var self=this;
  2536. return smalltalk.withContext(function($ctx1) {
  2537. _st(self)._focus();
  2538. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolsFocusRequested",{},smalltalk.HLProtocolsListWidget)})},
  2539. messageSends: ["focus"]}),
  2540. smalltalk.HLProtocolsListWidget);
  2541. smalltalk.addMethod(
  2542. smalltalk.method({
  2543. selector: "renderContentOn:",
  2544. fn: function (html){
  2545. var self=this;
  2546. return smalltalk.withContext(function($ctx1) {
  2547. var $1,$2,$3;
  2548. $1=_st(_st(self)._model())._showInstance();
  2549. if(smalltalk.assert($1)){
  2550. smalltalk.HLToolListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  2551. } else {
  2552. $2=_st(html)._div();
  2553. _st($2)._class_("class_side");
  2554. $3=_st($2)._with_((function(){
  2555. return smalltalk.withContext(function($ctx2) {
  2556. return smalltalk.HLToolListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  2557. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2558. $3;
  2559. };
  2560. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLProtocolsListWidget)})},
  2561. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"]}),
  2562. smalltalk.HLProtocolsListWidget);
  2563. smalltalk.addMethod(
  2564. smalltalk.method({
  2565. selector: "selectItem:",
  2566. fn: function (aString){
  2567. var self=this;
  2568. return smalltalk.withContext(function($ctx1) {
  2569. _st(_st(self)._model())._selectedProtocol_(aString);
  2570. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aString:aString},smalltalk.HLProtocolsListWidget)})},
  2571. messageSends: ["selectedProtocol:", "model"]}),
  2572. smalltalk.HLProtocolsListWidget);
  2573. smalltalk.addMethod(
  2574. smalltalk.method({
  2575. selector: "selectedItem",
  2576. fn: function (){
  2577. var self=this;
  2578. return smalltalk.withContext(function($ctx1) {
  2579. var $1;
  2580. $1=smalltalk.HLToolListWidget.fn.prototype._selectedItem.apply(_st(self), []);
  2581. return $1;
  2582. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{},smalltalk.HLProtocolsListWidget)})},
  2583. messageSends: ["selectedItem"]}),
  2584. smalltalk.HLProtocolsListWidget);
  2585. smalltalk.addMethod(
  2586. smalltalk.method({
  2587. selector: "setItemsForClass:",
  2588. fn: function (aClass){
  2589. var self=this;
  2590. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  2591. return smalltalk.withContext(function($ctx1) {
  2592. var $1,$3,$4,$5,$2;
  2593. $1=self;
  2594. $3=aClass;
  2595. if(($receiver = $3) == nil || $receiver == undefined){
  2596. $2=_st($Array())._with_(_st(self)._allProtocol());
  2597. } else {
  2598. $4=_st($Array())._with_(_st(self)._allProtocol());
  2599. _st($4)._addAll_(_st(aClass)._protocols());
  2600. $5=_st($4)._yourself();
  2601. $2=$5;
  2602. };
  2603. _st($1)._items_($2);
  2604. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForClass:",{aClass:aClass},smalltalk.HLProtocolsListWidget)})},
  2605. messageSends: ["items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself"]}),
  2606. smalltalk.HLProtocolsListWidget);
  2607. smalltalk.addMethod(
  2608. smalltalk.method({
  2609. selector: "setItemsForSelectedClass",
  2610. fn: function (){
  2611. var self=this;
  2612. return smalltalk.withContext(function($ctx1) {
  2613. _st(self)._setItemsForClass_(_st(_st(self)._model())._selectedClass());
  2614. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedClass",{},smalltalk.HLProtocolsListWidget)})},
  2615. messageSends: ["setItemsForClass:", "selectedClass", "model"]}),
  2616. smalltalk.HLProtocolsListWidget);
  2617. smalltalk.addClass('HLSelectorsCache', smalltalk.Object, ['classesCache'], 'Helios-Browser');
  2618. smalltalk.addMethod(
  2619. smalltalk.method({
  2620. selector: "cacheFor:",
  2621. fn: function (aClass){
  2622. var self=this;
  2623. return smalltalk.withContext(function($ctx1) {
  2624. var $1,$2;
  2625. $1=aClass;
  2626. if(($receiver = $1) == nil || $receiver == undefined){
  2627. return nil;
  2628. } else {
  2629. $1;
  2630. };
  2631. $2=_st(_st(self)._classesCache())._at_ifAbsentPut_(_st(aClass)._name(),(function(){
  2632. return smalltalk.withContext(function($ctx2) {
  2633. return _st(self)._newCacheFor_(aClass);
  2634. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2635. return $2;
  2636. }, function($ctx1) {$ctx1.fill(self,"cacheFor:",{aClass:aClass},smalltalk.HLSelectorsCache)})},
  2637. messageSends: ["ifNil:", "at:ifAbsentPut:", "name", "newCacheFor:", "classesCache"]}),
  2638. smalltalk.HLSelectorsCache);
  2639. smalltalk.addMethod(
  2640. smalltalk.method({
  2641. selector: "classesCache",
  2642. fn: function (){
  2643. var self=this;
  2644. function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  2645. return smalltalk.withContext(function($ctx1) {
  2646. var $2,$1;
  2647. $2=self["@classesCache"];
  2648. if(($receiver = $2) == nil || $receiver == undefined){
  2649. self["@classesCache"]=_st($HashedCollection())._new();
  2650. $1=self["@classesCache"];
  2651. } else {
  2652. $1=$2;
  2653. };
  2654. return $1;
  2655. }, function($ctx1) {$ctx1.fill(self,"classesCache",{},smalltalk.HLSelectorsCache)})},
  2656. messageSends: ["ifNil:", "new"]}),
  2657. smalltalk.HLSelectorsCache);
  2658. smalltalk.addMethod(
  2659. smalltalk.method({
  2660. selector: "initialize",
  2661. fn: function (){
  2662. var self=this;
  2663. return smalltalk.withContext(function($ctx1) {
  2664. smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  2665. _st(self)._observeSystem();
  2666. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLSelectorsCache)})},
  2667. messageSends: ["initialize", "observeSystem"]}),
  2668. smalltalk.HLSelectorsCache);
  2669. smalltalk.addMethod(
  2670. smalltalk.method({
  2671. selector: "invalidateCacheFor:",
  2672. fn: function (aMethod){
  2673. var self=this;
  2674. return smalltalk.withContext(function($ctx1) {
  2675. _st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._invalidateSelector_(_st(aMethod)._selector());
  2676. return self}, function($ctx1) {$ctx1.fill(self,"invalidateCacheFor:",{aMethod:aMethod},smalltalk.HLSelectorsCache)})},
  2677. messageSends: ["invalidateSelector:", "selector", "cacheFor:", "methodClass"]}),
  2678. smalltalk.HLSelectorsCache);
  2679. smalltalk.addMethod(
  2680. smalltalk.method({
  2681. selector: "isOverridden:",
  2682. fn: function (aMethod){
  2683. var self=this;
  2684. return smalltalk.withContext(function($ctx1) {
  2685. var $1;
  2686. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverridden_(aMethod);
  2687. return $1;
  2688. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod},smalltalk.HLSelectorsCache)})},
  2689. messageSends: ["isOverridden:", "cacheFor:", "methodClass"]}),
  2690. smalltalk.HLSelectorsCache);
  2691. smalltalk.addMethod(
  2692. smalltalk.method({
  2693. selector: "isOverride:",
  2694. fn: function (aMethod){
  2695. var self=this;
  2696. return smalltalk.withContext(function($ctx1) {
  2697. var $1;
  2698. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverride_(aMethod);
  2699. return $1;
  2700. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod},smalltalk.HLSelectorsCache)})},
  2701. messageSends: ["isOverride:", "cacheFor:", "methodClass"]}),
  2702. smalltalk.HLSelectorsCache);
  2703. smalltalk.addMethod(
  2704. smalltalk.method({
  2705. selector: "newCacheFor:",
  2706. fn: function (aClass){
  2707. var self=this;
  2708. function $HLClassCache(){return smalltalk.HLClassCache||(typeof HLClassCache=="undefined"?nil:HLClassCache)}
  2709. return smalltalk.withContext(function($ctx1) {
  2710. var $1;
  2711. $1=_st($HLClassCache())._on_selectorsCache_(aClass,self);
  2712. return $1;
  2713. }, function($ctx1) {$ctx1.fill(self,"newCacheFor:",{aClass:aClass},smalltalk.HLSelectorsCache)})},
  2714. messageSends: ["on:selectorsCache:"]}),
  2715. smalltalk.HLSelectorsCache);
  2716. smalltalk.addMethod(
  2717. smalltalk.method({
  2718. selector: "observeSystem",
  2719. fn: function (){
  2720. var self=this;
  2721. function $MethodAdded(){return smalltalk.MethodAdded||(typeof MethodAdded=="undefined"?nil:MethodAdded)}
  2722. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  2723. function $MethodRemoved(){return smalltalk.MethodRemoved||(typeof MethodRemoved=="undefined"?nil:MethodRemoved)}
  2724. return smalltalk.withContext(function($ctx1) {
  2725. var $1,$2;
  2726. $1=_st($SystemAnnouncer())._current();
  2727. _st($1)._on_send_to_($MethodAdded(),"onMethodAdded:",self);
  2728. $2=_st($1)._on_send_to_($MethodRemoved(),"onMethodRemoved:",self);
  2729. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLSelectorsCache)})},
  2730. messageSends: ["on:send:to:", "current"]}),
  2731. smalltalk.HLSelectorsCache);
  2732. smalltalk.addMethod(
  2733. smalltalk.method({
  2734. selector: "onMethodAdded:",
  2735. fn: function (anAnnouncement){
  2736. var self=this;
  2737. return smalltalk.withContext(function($ctx1) {
  2738. _st(self)._invalidateCacheFor_(_st(anAnnouncement)._method());
  2739. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{anAnnouncement:anAnnouncement},smalltalk.HLSelectorsCache)})},
  2740. messageSends: ["invalidateCacheFor:", "method"]}),
  2741. smalltalk.HLSelectorsCache);
  2742. smalltalk.addMethod(
  2743. smalltalk.method({
  2744. selector: "onMethodRemoved:",
  2745. fn: function (anAnnouncement){
  2746. var self=this;
  2747. return smalltalk.withContext(function($ctx1) {
  2748. _st(self)._invalidateCacheFor_(_st(anAnnouncement)._method());
  2749. return self}, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{anAnnouncement:anAnnouncement},smalltalk.HLSelectorsCache)})},
  2750. messageSends: ["invalidateCacheFor:", "method"]}),
  2751. smalltalk.HLSelectorsCache);
  2752. smalltalk.HLSelectorsCache.klass.iVarNames = ['current'];
  2753. smalltalk.addMethod(
  2754. smalltalk.method({
  2755. selector: "current",
  2756. fn: function (){
  2757. var self=this;
  2758. return smalltalk.withContext(function($ctx1) {
  2759. var $2,$1;
  2760. $2=self["@current"];
  2761. if(($receiver = $2) == nil || $receiver == undefined){
  2762. self["@current"]=smalltalk.Object.klass.fn.prototype._new.apply(_st(self), []);
  2763. $1=self["@current"];
  2764. } else {
  2765. $1=$2;
  2766. };
  2767. return $1;
  2768. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.HLSelectorsCache.klass)})},
  2769. messageSends: ["ifNil:", "new"]}),
  2770. smalltalk.HLSelectorsCache.klass);
  2771. smalltalk.addMethod(
  2772. smalltalk.method({
  2773. selector: "flush",
  2774. fn: function (){
  2775. var self=this;
  2776. return smalltalk.withContext(function($ctx1) {
  2777. self["@current"]=nil;
  2778. return self}, function($ctx1) {$ctx1.fill(self,"flush",{},smalltalk.HLSelectorsCache.klass)})},
  2779. messageSends: []}),
  2780. smalltalk.HLSelectorsCache.klass);
  2781. smalltalk.addMethod(
  2782. smalltalk.method({
  2783. selector: "new",
  2784. fn: function (){
  2785. var self=this;
  2786. return smalltalk.withContext(function($ctx1) {
  2787. _st(self)._shouldNotImplement();
  2788. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.HLSelectorsCache.klass)})},
  2789. messageSends: ["shouldNotImplement"]}),
  2790. smalltalk.HLSelectorsCache.klass);