1
0

Helios-Browser.deploy.js 88 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420
  1. smalltalk.addPackage('Helios-Browser');
  2. smalltalk.addClass('HLBrowser', smalltalk.HLWidget, ['model', 'packagesListWidget', 'classesListWidget', 'protocolsListWidget', 'methodsListWidget', 'sourceWidget'], 'Helios-Browser');
  3. smalltalk.addMethod(
  4. "_announcer",
  5. smalltalk.method({
  6. selector: "announcer",
  7. fn: function (){
  8. var self=this;
  9. return smalltalk.withContext(function($ctx1) { var $1;
  10. $1=_st(_st(self)._model())._announcer();
  11. return $1;
  12. }, function($ctx1) {$ctx1.fill(self,"announcer",{}, smalltalk.HLBrowser)})},
  13. messageSends: ["announcer", "model"]}),
  14. smalltalk.HLBrowser);
  15. smalltalk.addMethod(
  16. "_classesListWidget",
  17. smalltalk.method({
  18. selector: "classesListWidget",
  19. fn: function (){
  20. var self=this;
  21. return smalltalk.withContext(function($ctx1) { var $2,$1;
  22. $2=self["@classesListWidget"];
  23. if(($receiver = $2) == nil || $receiver == undefined){
  24. self["@classesListWidget"]=_st((smalltalk.HLClassesListWidget || HLClassesListWidget))._on_(_st(self)._model());
  25. self["@classesListWidget"];
  26. $1=_st(self["@classesListWidget"])._next_(_st(self)._protocolsListWidget());
  27. } else {
  28. $1=$2;
  29. };
  30. return $1;
  31. }, function($ctx1) {$ctx1.fill(self,"classesListWidget",{}, smalltalk.HLBrowser)})},
  32. messageSends: ["ifNil:", "on:", "model", "next:", "protocolsListWidget"]}),
  33. smalltalk.HLBrowser);
  34. smalltalk.addMethod(
  35. "_environment",
  36. smalltalk.method({
  37. selector: "environment",
  38. fn: function (){
  39. var self=this;
  40. return smalltalk.withContext(function($ctx1) { var $1;
  41. $1=_st(_st(self)._model())._environment();
  42. return $1;
  43. }, function($ctx1) {$ctx1.fill(self,"environment",{}, smalltalk.HLBrowser)})},
  44. messageSends: ["environment", "model"]}),
  45. smalltalk.HLBrowser);
  46. smalltalk.addMethod(
  47. "_methodsListWidget",
  48. smalltalk.method({
  49. selector: "methodsListWidget",
  50. fn: function (){
  51. var self=this;
  52. return smalltalk.withContext(function($ctx1) { var $2,$1;
  53. $2=self["@methodsListWidget"];
  54. if(($receiver = $2) == nil || $receiver == undefined){
  55. self["@methodsListWidget"]=_st((smalltalk.HLMethodsListWidget || HLMethodsListWidget))._on_(_st(self)._model());
  56. $1=self["@methodsListWidget"];
  57. } else {
  58. $1=$2;
  59. };
  60. return $1;
  61. }, function($ctx1) {$ctx1.fill(self,"methodsListWidget",{}, smalltalk.HLBrowser)})},
  62. messageSends: ["ifNil:", "on:", "model"]}),
  63. smalltalk.HLBrowser);
  64. smalltalk.addMethod(
  65. "_model",
  66. smalltalk.method({
  67. selector: "model",
  68. fn: function (){
  69. var self=this;
  70. return smalltalk.withContext(function($ctx1) { var $2,$1;
  71. $2=self["@model"];
  72. if(($receiver = $2) == nil || $receiver == undefined){
  73. self["@model"]=_st((smalltalk.HLBrowserModel || HLBrowserModel))._new();
  74. $1=self["@model"];
  75. } else {
  76. $1=$2;
  77. };
  78. return $1;
  79. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLBrowser)})},
  80. messageSends: ["ifNil:", "new"]}),
  81. smalltalk.HLBrowser);
  82. smalltalk.addMethod(
  83. "_model_",
  84. smalltalk.method({
  85. selector: "model:",
  86. fn: function (aModel){
  87. var self=this;
  88. return smalltalk.withContext(function($ctx1) { self["@model"]=aModel;
  89. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel}, smalltalk.HLBrowser)})},
  90. messageSends: []}),
  91. smalltalk.HLBrowser);
  92. smalltalk.addMethod(
  93. "_packagesListWidget",
  94. smalltalk.method({
  95. selector: "packagesListWidget",
  96. fn: function (){
  97. var self=this;
  98. return smalltalk.withContext(function($ctx1) { var $2,$1;
  99. $2=self["@packagesListWidget"];
  100. if(($receiver = $2) == nil || $receiver == undefined){
  101. self["@packagesListWidget"]=_st((smalltalk.HLPackagesListWidget || HLPackagesListWidget))._on_(_st(self)._model());
  102. self["@packagesListWidget"];
  103. $1=_st(self["@packagesListWidget"])._next_(_st(self)._classesListWidget());
  104. } else {
  105. $1=$2;
  106. };
  107. return $1;
  108. }, function($ctx1) {$ctx1.fill(self,"packagesListWidget",{}, smalltalk.HLBrowser)})},
  109. messageSends: ["ifNil:", "on:", "model", "next:", "classesListWidget"]}),
  110. smalltalk.HLBrowser);
  111. smalltalk.addMethod(
  112. "_protocolsListWidget",
  113. smalltalk.method({
  114. selector: "protocolsListWidget",
  115. fn: function (){
  116. var self=this;
  117. return smalltalk.withContext(function($ctx1) { var $2,$1;
  118. $2=self["@protocolsListWidget"];
  119. if(($receiver = $2) == nil || $receiver == undefined){
  120. self["@protocolsListWidget"]=_st((smalltalk.HLProtocolsListWidget || HLProtocolsListWidget))._on_(_st(self)._model());
  121. self["@protocolsListWidget"];
  122. $1=_st(self["@protocolsListWidget"])._next_(_st(self)._methodsListWidget());
  123. } else {
  124. $1=$2;
  125. };
  126. return $1;
  127. }, function($ctx1) {$ctx1.fill(self,"protocolsListWidget",{}, smalltalk.HLBrowser)})},
  128. messageSends: ["ifNil:", "on:", "model", "next:", "methodsListWidget"]}),
  129. smalltalk.HLBrowser);
  130. smalltalk.addMethod(
  131. "_registerBindingsOn_",
  132. smalltalk.method({
  133. selector: "registerBindingsOn:",
  134. fn: function (aBindingGroup){
  135. var self=this;
  136. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  137. $1=aBindingGroup;
  138. _st($1)._addGroupKey_labelled_((66),"Browse");
  139. _st($1)._addGroupKey_labelled_((71),"Go to");
  140. $2=_st($1)._addGroupKey_labelled_((84),"Toggle");
  141. _st(_st((smalltalk.HLBrowserCommand || HLBrowserCommand))._withAllSubclasses())._do_((function(each){
  142. return smalltalk.withContext(function($ctx2) { $3=_st(each)._key();
  143. if(($receiver = $3) == nil || $receiver == undefined){
  144. return $3;
  145. } else {
  146. return _st(_st(aBindingGroup)._at_(_st(each)._bindingGroup()))._add_(_st(_st(each)._on_(_st(self)._model()))._asBinding());
  147. };
  148. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  149. return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup}, smalltalk.HLBrowser)})},
  150. messageSends: ["addGroupKey:labelled:", "do:", "ifNotNil:", "add:", "asBinding", "on:", "model", "at:", "bindingGroup", "key", "withAllSubclasses"]}),
  151. smalltalk.HLBrowser);
  152. smalltalk.addMethod(
  153. "_renderContentOn_",
  154. smalltalk.method({
  155. selector: "renderContentOn:",
  156. fn: function (html){
  157. var self=this;
  158. return smalltalk.withContext(function($ctx1) { _st(html)._with_(_st((smalltalk.HLContainer || HLContainer))._with_(_st((smalltalk.HLHorizontalSplitter || HLHorizontalSplitter))._with_with_(_st((smalltalk.HLVerticalSplitter || HLVerticalSplitter))._with_with_(_st((smalltalk.HLVerticalSplitter || HLVerticalSplitter))._with_with_(_st(self)._packagesListWidget(),_st(self)._classesListWidget()),_st((smalltalk.HLVerticalSplitter || HLVerticalSplitter))._with_with_(_st(self)._protocolsListWidget(),_st(self)._methodsListWidget())),_st(self)._sourceWidget())));
  159. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLBrowser)})},
  160. messageSends: ["with:", "with:with:", "packagesListWidget", "classesListWidget", "protocolsListWidget", "methodsListWidget", "sourceWidget"]}),
  161. smalltalk.HLBrowser);
  162. smalltalk.addMethod(
  163. "_sourceWidget",
  164. smalltalk.method({
  165. selector: "sourceWidget",
  166. fn: function (){
  167. var self=this;
  168. return smalltalk.withContext(function($ctx1) { var $2,$1;
  169. $2=self["@sourceWidget"];
  170. if(($receiver = $2) == nil || $receiver == undefined){
  171. self["@sourceWidget"]=_st((smalltalk.HLBrowserSourceWidget || HLBrowserSourceWidget))._on_(_st(self)._model());
  172. $1=self["@sourceWidget"];
  173. } else {
  174. $1=$2;
  175. };
  176. return $1;
  177. }, function($ctx1) {$ctx1.fill(self,"sourceWidget",{}, smalltalk.HLBrowser)})},
  178. messageSends: ["ifNil:", "on:", "model"]}),
  179. smalltalk.HLBrowser);
  180. smalltalk.HLBrowser.klass.iVarNames = ['nextId'];
  181. smalltalk.addMethod(
  182. "_canBeOpenAsTab",
  183. smalltalk.method({
  184. selector: "canBeOpenAsTab",
  185. fn: function (){
  186. var self=this;
  187. return smalltalk.withContext(function($ctx1) { return true;
  188. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{}, smalltalk.HLBrowser.klass)})},
  189. messageSends: []}),
  190. smalltalk.HLBrowser.klass);
  191. smalltalk.addMethod(
  192. "_nextId",
  193. smalltalk.method({
  194. selector: "nextId",
  195. fn: function (){
  196. var self=this;
  197. return smalltalk.withContext(function($ctx1) { var $1,$2;
  198. $1=self["@nextId"];
  199. if(($receiver = $1) == nil || $receiver == undefined){
  200. self["@nextId"]=(0);
  201. self["@nextId"];
  202. } else {
  203. $1;
  204. };
  205. $2=_st("browser_").__comma(_st(_st(self["@nextId"]).__plus((1)))._asString());
  206. return $2;
  207. }, function($ctx1) {$ctx1.fill(self,"nextId",{}, smalltalk.HLBrowser.klass)})},
  208. messageSends: ["ifNil:", ",", "asString", "+"]}),
  209. smalltalk.HLBrowser.klass);
  210. smalltalk.addMethod(
  211. "_tabLabel",
  212. smalltalk.method({
  213. selector: "tabLabel",
  214. fn: function (){
  215. var self=this;
  216. return smalltalk.withContext(function($ctx1) { return "Browser";
  217. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{}, smalltalk.HLBrowser.klass)})},
  218. messageSends: []}),
  219. smalltalk.HLBrowser.klass);
  220. smalltalk.addMethod(
  221. "_tabPriority",
  222. smalltalk.method({
  223. selector: "tabPriority",
  224. fn: function (){
  225. var self=this;
  226. return smalltalk.withContext(function($ctx1) { return (0);
  227. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{}, smalltalk.HLBrowser.klass)})},
  228. messageSends: []}),
  229. smalltalk.HLBrowser.klass);
  230. smalltalk.addClass('HLBrowserListWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Browser');
  231. smalltalk.addMethod(
  232. "_initialize",
  233. smalltalk.method({
  234. selector: "initialize",
  235. fn: function (){
  236. var self=this;
  237. return smalltalk.withContext(function($ctx1) { smalltalk.HLNavigationListWidget.fn.prototype._initialize.apply(_st(self), []);
  238. _st(self)._observeSystem();
  239. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLBrowserListWidget)})},
  240. messageSends: ["initialize", "observeSystem"]}),
  241. smalltalk.HLBrowserListWidget);
  242. smalltalk.addMethod(
  243. "_model",
  244. smalltalk.method({
  245. selector: "model",
  246. fn: function (){
  247. var self=this;
  248. return smalltalk.withContext(function($ctx1) { var $1;
  249. $1=self["@model"];
  250. return $1;
  251. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLBrowserListWidget)})},
  252. messageSends: []}),
  253. smalltalk.HLBrowserListWidget);
  254. smalltalk.addMethod(
  255. "_model_",
  256. smalltalk.method({
  257. selector: "model:",
  258. fn: function (aBrowserModel){
  259. var self=this;
  260. return smalltalk.withContext(function($ctx1) { self["@model"]=aBrowserModel;
  261. _st(self)._observeModel();
  262. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserListWidget)})},
  263. messageSends: ["observeModel"]}),
  264. smalltalk.HLBrowserListWidget);
  265. smalltalk.addMethod(
  266. "_observeModel",
  267. smalltalk.method({
  268. selector: "observeModel",
  269. fn: function (){
  270. var self=this;
  271. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLBrowserListWidget)})},
  272. messageSends: []}),
  273. smalltalk.HLBrowserListWidget);
  274. smalltalk.addMethod(
  275. "_observeSystem",
  276. smalltalk.method({
  277. selector: "observeSystem",
  278. fn: function (){
  279. var self=this;
  280. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLBrowserListWidget)})},
  281. messageSends: []}),
  282. smalltalk.HLBrowserListWidget);
  283. smalltalk.addMethod(
  284. "_on_",
  285. smalltalk.method({
  286. selector: "on:",
  287. fn: function (aModel){
  288. var self=this;
  289. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  290. $2=_st(self)._new();
  291. _st($2)._model_(aModel);
  292. $3=_st($2)._yourself();
  293. $1=$3;
  294. return $1;
  295. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel}, smalltalk.HLBrowserListWidget.klass)})},
  296. messageSends: ["model:", "new", "yourself"]}),
  297. smalltalk.HLBrowserListWidget.klass);
  298. smalltalk.addClass('HLClassesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  299. smalltalk.addMethod(
  300. "_focusMethodsListWidget",
  301. smalltalk.method({
  302. selector: "focusMethodsListWidget",
  303. fn: function (){
  304. var self=this;
  305. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._announce_(_st((smalltalk.HLMethodsListFocus || HLMethodsListFocus))._new());
  306. return self}, function($ctx1) {$ctx1.fill(self,"focusMethodsListWidget",{}, smalltalk.HLClassesListWidget)})},
  307. messageSends: ["announce:", "new", "announcer", "model"]}),
  308. smalltalk.HLClassesListWidget);
  309. smalltalk.addMethod(
  310. "_focusProtocolsListWidget",
  311. smalltalk.method({
  312. selector: "focusProtocolsListWidget",
  313. fn: function (){
  314. var self=this;
  315. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._announce_(_st((smalltalk.HLProtocolsListFocus || HLProtocolsListFocus))._new());
  316. return self}, function($ctx1) {$ctx1.fill(self,"focusProtocolsListWidget",{}, smalltalk.HLClassesListWidget)})},
  317. messageSends: ["announce:", "new", "announcer", "model"]}),
  318. smalltalk.HLClassesListWidget);
  319. smalltalk.addMethod(
  320. "_getChildrenOf_",
  321. smalltalk.method({
  322. selector: "getChildrenOf:",
  323. fn: function (aClass){
  324. var self=this;
  325. return smalltalk.withContext(function($ctx1) { var $1;
  326. $1=_st(_st(self)._items())._select_((function(each){
  327. return smalltalk.withContext(function($ctx2) { return _st(_st(each)._superclass()).__eq(aClass);
  328. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  329. return $1;
  330. }, function($ctx1) {$ctx1.fill(self,"getChildrenOf:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  331. messageSends: ["select:", "=", "superclass", "items"]}),
  332. smalltalk.HLClassesListWidget);
  333. smalltalk.addMethod(
  334. "_getRootClassesOf_",
  335. smalltalk.method({
  336. selector: "getRootClassesOf:",
  337. fn: function (aCollection){
  338. var self=this;
  339. return smalltalk.withContext(function($ctx1) { var $1;
  340. $1=_st(aCollection)._select_((function(each){
  341. return smalltalk.withContext(function($ctx2) { return _st(_st(aCollection)._includes_(_st(each)._superclass()))._not();
  342. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  343. return $1;
  344. }, function($ctx1) {$ctx1.fill(self,"getRootClassesOf:",{aCollection:aCollection}, smalltalk.HLClassesListWidget)})},
  345. messageSends: ["select:", "not", "includes:", "superclass"]}),
  346. smalltalk.HLClassesListWidget);
  347. smalltalk.addMethod(
  348. "_iconForItem_",
  349. smalltalk.method({
  350. selector: "iconForItem:",
  351. fn: function (aClass){
  352. var self=this;
  353. return smalltalk.withContext(function($ctx1) { var $2,$1;
  354. $2=_st(_st(_st(aClass)._theNonMetaClass())._comment())._isEmpty();
  355. if(smalltalk.assert($2)){
  356. $1="icon-question-sign";
  357. } else {
  358. $1="icon-none";
  359. };
  360. return $1;
  361. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  362. messageSends: ["ifFalse:ifTrue:", "isEmpty", "comment", "theNonMetaClass"]}),
  363. smalltalk.HLClassesListWidget);
  364. smalltalk.addMethod(
  365. "_observeModel",
  366. smalltalk.method({
  367. selector: "observeModel",
  368. fn: function (){
  369. var self=this;
  370. return smalltalk.withContext(function($ctx1) { var $1,$2;
  371. $1=_st(_st(self)._model())._announcer();
  372. _st($1)._on_do_((smalltalk.HLPackageSelected || HLPackageSelected),(function(ann){
  373. return smalltalk.withContext(function($ctx2) { return _st(self)._onPackageSelected_(_st(ann)._item());
  374. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  375. _st($1)._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  376. return smalltalk.withContext(function($ctx2) { return _st(self)._onShowInstanceToggled();
  377. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  378. $2=_st($1)._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  379. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  380. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  381. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLClassesListWidget)})},
  382. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model", "onShowInstanceToggled", "onClassSelected:"]}),
  383. smalltalk.HLClassesListWidget);
  384. smalltalk.addMethod(
  385. "_observeSystem",
  386. smalltalk.method({
  387. selector: "observeSystem",
  388. fn: function (){
  389. var self=this;
  390. return smalltalk.withContext(function($ctx1) { var $1,$2;
  391. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  392. _st($1)._on_do_((smalltalk.ClassAdded || ClassAdded),(function(ann){
  393. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassAdded_(_st(ann)._theClass());
  394. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  395. $2=_st($1)._on_do_((smalltalk.ClassRemoved || ClassRemoved),(function(ann){
  396. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassRemoved_(_st(ann)._theClass());
  397. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  398. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLClassesListWidget)})},
  399. messageSends: ["on:do:", "onClassAdded:", "theClass", "current", "onClassRemoved:"]}),
  400. smalltalk.HLClassesListWidget);
  401. smalltalk.addMethod(
  402. "_onClassAdded_",
  403. smalltalk.method({
  404. selector: "onClassAdded:",
  405. fn: function (aClass){
  406. var self=this;
  407. return smalltalk.withContext(function($ctx1) { var $1,$2;
  408. $1=_st(_st(aClass)._package()).__eq(_st(_st(self)._model())._selectedPackage());
  409. if(! smalltalk.assert($1)){
  410. $2=self;
  411. return $2;
  412. };
  413. _st(self)._setItemsForSelectedPackage();
  414. _st(self)._refresh();
  415. return self}, function($ctx1) {$ctx1.fill(self,"onClassAdded:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  416. messageSends: ["ifFalse:", "=", "selectedPackage", "model", "package", "setItemsForSelectedPackage", "refresh"]}),
  417. smalltalk.HLClassesListWidget);
  418. smalltalk.addMethod(
  419. "_onClassRemoved_",
  420. smalltalk.method({
  421. selector: "onClassRemoved:",
  422. fn: function (aClass){
  423. var self=this;
  424. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  425. $1=_st(_st(aClass)._package()).__eq(_st(_st(self)._model())._selectedPackage());
  426. if(! smalltalk.assert($1)){
  427. $2=self;
  428. return $2;
  429. };
  430. $3=_st(aClass).__eq(_st(_st(self)._model())._selectedClass());
  431. if(smalltalk.assert($3)){
  432. _st(self)._selectItem_(nil);
  433. };
  434. _st(self)._setItemsForSelectedPackage();
  435. _st(self)._refresh();
  436. return self}, function($ctx1) {$ctx1.fill(self,"onClassRemoved:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  437. messageSends: ["ifFalse:", "=", "selectedPackage", "model", "package", "ifTrue:", "selectItem:", "selectedClass", "setItemsForSelectedPackage", "refresh"]}),
  438. smalltalk.HLClassesListWidget);
  439. smalltalk.addMethod(
  440. "_onClassSelected_",
  441. smalltalk.method({
  442. selector: "onClassSelected:",
  443. fn: function (aClass){
  444. var self=this;
  445. return smalltalk.withContext(function($ctx1) { var $1,$2;
  446. _st(self)._selectedItem_(aClass);
  447. $1=aClass;
  448. if(($receiver = $1) == nil || $receiver == undefined){
  449. $2=self;
  450. return $2;
  451. } else {
  452. $1;
  453. };
  454. _st(self)._focus();
  455. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  456. messageSends: ["selectedItem:", "ifNil:", "focus"]}),
  457. smalltalk.HLClassesListWidget);
  458. smalltalk.addMethod(
  459. "_onPackageSelected_",
  460. smalltalk.method({
  461. selector: "onPackageSelected:",
  462. fn: function (aPackage){
  463. var self=this;
  464. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(nil);
  465. _st(self)._setItemsForSelectedPackage();
  466. _st(self)._refresh();
  467. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{aPackage:aPackage}, smalltalk.HLClassesListWidget)})},
  468. messageSends: ["selectedItem:", "setItemsForSelectedPackage", "refresh"]}),
  469. smalltalk.HLClassesListWidget);
  470. smalltalk.addMethod(
  471. "_onShowInstanceToggled",
  472. smalltalk.method({
  473. selector: "onShowInstanceToggled",
  474. fn: function (){
  475. var self=this;
  476. return smalltalk.withContext(function($ctx1) { _st(self)._refresh();
  477. return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{}, smalltalk.HLClassesListWidget)})},
  478. messageSends: ["refresh"]}),
  479. smalltalk.HLClassesListWidget);
  480. smalltalk.addMethod(
  481. "_renderButtonsOn_",
  482. smalltalk.method({
  483. selector: "renderButtonsOn:",
  484. fn: function (html){
  485. var self=this;
  486. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$6,$7,$8,$2,$9,$10;
  487. $1=_st(html)._div();
  488. _st($1)._class_("btn-group");
  489. _st($1)._at_put_("data-toggle","buttons-radio");
  490. $2=_st($1)._with_((function(){
  491. return smalltalk.withContext(function($ctx2) { $3=_st(html)._button();
  492. _st($3)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  493. return smalltalk.withContext(function($ctx3) { _st(str)._nextPutAll_("btn");
  494. $4=_st(self)._showInstance();
  495. if(smalltalk.assert($4)){
  496. return _st(str)._nextPutAll_(" active");
  497. };
  498. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  499. _st($3)._with_("Instance");
  500. $5=_st($3)._onClick_((function(){
  501. return smalltalk.withContext(function($ctx3) { return _st(self)._showInstance_(true);
  502. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  503. $5;
  504. $6=_st(html)._button();
  505. _st($6)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  506. return smalltalk.withContext(function($ctx3) { _st(str)._nextPutAll_("btn");
  507. $7=_st(_st(self)._model())._showInstance();
  508. if(! smalltalk.assert($7)){
  509. return _st(str)._nextPutAll_(" active");
  510. };
  511. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  512. _st($6)._with_("Class");
  513. $8=_st($6)._onClick_((function(){
  514. return smalltalk.withContext(function($ctx3) { return _st(_st(self)._model())._showInstance_(false);
  515. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  516. return $8;
  517. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  518. $9=_st(html)._button();
  519. _st($9)._class_("btn");
  520. _st($9)._at_put_("data-toggle","button");
  521. $10=_st($9)._with_("Comment");
  522. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.HLClassesListWidget)})},
  523. messageSends: ["class:", "div", "at:put:", "with:", "streamContents:", "nextPutAll:", "ifTrue:", "showInstance", "button", "onClick:", "showInstance:", "ifFalse:", "model"]}),
  524. smalltalk.HLClassesListWidget);
  525. smalltalk.addMethod(
  526. "_renderItem_level_on_",
  527. smalltalk.method({
  528. selector: "renderItem:level:on:",
  529. fn: function (aClass,anInteger,html){
  530. var self=this;
  531. var li;
  532. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  533. li=_st(html)._li();
  534. $1=li;
  535. _st($1)._at_put_("list-data",_st(_st(self)._items())._indexOf_(aClass));
  536. _st($1)._class_(_st(self)._cssClassForItem_(aClass));
  537. $2=_st($1)._with_((function(){
  538. return smalltalk.withContext(function($ctx2) { $3=_st(html)._a();
  539. _st($3)._with_((function(){
  540. return smalltalk.withContext(function($ctx3) { _st(_st(html)._tag_("i"))._class_(_st(self)._iconForItem_(aClass));
  541. return _st(self)._renderItemLabel_level_on_(aClass,anInteger,html);
  542. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  543. $4=_st($3)._onClick_((function(){
  544. return smalltalk.withContext(function($ctx3) { return _st(self)._activateListItem_(_st(li)._asJQuery());
  545. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  546. return $4;
  547. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  548. _st(_st(self)._getChildrenOf_(aClass))._do_((function(each){
  549. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_level_on_(each,_st(anInteger).__plus((1)),html);
  550. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  551. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:level:on:",{aClass:aClass,anInteger:anInteger,html:html,li:li}, smalltalk.HLClassesListWidget)})},
  552. messageSends: ["li", "at:put:", "indexOf:", "items", "class:", "cssClassForItem:", "with:", "iconForItem:", "tag:", "renderItemLabel:level:on:", "a", "onClick:", "activateListItem:", "asJQuery", "do:", "renderItem:level:on:", "+", "getChildrenOf:"]}),
  553. smalltalk.HLClassesListWidget);
  554. smalltalk.addMethod(
  555. "_renderItem_on_",
  556. smalltalk.method({
  557. selector: "renderItem:on:",
  558. fn: function (aClass,html){
  559. var self=this;
  560. return smalltalk.withContext(function($ctx1) { smalltalk.HLBrowserListWidget.fn.prototype._renderItem_on_.apply(_st(self), [aClass,html]);
  561. _st(_st(self)._getChildrenOf_(aClass))._do_((function(each){
  562. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_level_on_(each,(1),html);
  563. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  564. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{aClass:aClass,html:html}, smalltalk.HLClassesListWidget)})},
  565. messageSends: ["renderItem:on:", "do:", "renderItem:level:on:", "getChildrenOf:"]}),
  566. smalltalk.HLClassesListWidget);
  567. smalltalk.addMethod(
  568. "_renderItemLabel_level_on_",
  569. smalltalk.method({
  570. selector: "renderItemLabel:level:on:",
  571. fn: function (aClass,anInteger,html){
  572. var self=this;
  573. return smalltalk.withContext(function($ctx1) { _st(_st(_st(html)._span())._asJQuery())._html_(_st((smalltalk.String || String))._streamContents_((function(str){
  574. return smalltalk.withContext(function($ctx2) { _st(anInteger)._timesRepeat_((function(){
  575. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("    ");
  576. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  577. return _st(str)._nextPutAll_(_st(aClass)._name());
  578. }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1)})})));
  579. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:level:on:",{aClass:aClass,anInteger:anInteger,html:html}, smalltalk.HLClassesListWidget)})},
  580. messageSends: ["html:", "streamContents:", "timesRepeat:", "nextPutAll:", "name", "asJQuery", "span"]}),
  581. smalltalk.HLClassesListWidget);
  582. smalltalk.addMethod(
  583. "_renderItemLabel_on_",
  584. smalltalk.method({
  585. selector: "renderItemLabel:on:",
  586. fn: function (aClass,html){
  587. var self=this;
  588. return smalltalk.withContext(function($ctx1) { _st(self)._renderItemLabel_level_on_(aClass,(0),html);
  589. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aClass:aClass,html:html}, smalltalk.HLClassesListWidget)})},
  590. messageSends: ["renderItemLabel:level:on:"]}),
  591. smalltalk.HLClassesListWidget);
  592. smalltalk.addMethod(
  593. "_renderListOn_",
  594. smalltalk.method({
  595. selector: "renderListOn:",
  596. fn: function (html){
  597. var self=this;
  598. return smalltalk.withContext(function($ctx1) { _st(_st(self)._getRootClassesOf_(_st(self)._items()))._do_((function(each){
  599. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_on_(each,html);
  600. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  601. return self}, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html}, smalltalk.HLClassesListWidget)})},
  602. messageSends: ["do:", "renderItem:on:", "getRootClassesOf:", "items"]}),
  603. smalltalk.HLClassesListWidget);
  604. smalltalk.addMethod(
  605. "_selectItem_",
  606. smalltalk.method({
  607. selector: "selectItem:",
  608. fn: function (aClass){
  609. var self=this;
  610. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedClass_(aClass);
  611. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  612. messageSends: ["selectedClass:", "model"]}),
  613. smalltalk.HLClassesListWidget);
  614. smalltalk.addMethod(
  615. "_setItemsForPackage_",
  616. smalltalk.method({
  617. selector: "setItemsForPackage:",
  618. fn: function (aPackage){
  619. var self=this;
  620. return smalltalk.withContext(function($ctx1) { var $1,$3,$2;
  621. $1=self;
  622. $3=aPackage;
  623. if(($receiver = $3) == nil || $receiver == undefined){
  624. $2=[];
  625. } else {
  626. $2=_st(_st(_st(_st(_st(aPackage)._classes())._collect_((function(each){
  627. return smalltalk.withContext(function($ctx2) { return _st(each)._theNonMetaClass();
  628. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet())._asArray())._sort_((function(a,b){
  629. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._name()).__lt(_st(b)._name());
  630. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  631. };
  632. _st($1)._items_($2);
  633. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForPackage:",{aPackage:aPackage}, smalltalk.HLClassesListWidget)})},
  634. messageSends: ["items:", "ifNil:ifNotNil:", "sort:", "<", "name", "asArray", "asSet", "collect:", "theNonMetaClass", "classes"]}),
  635. smalltalk.HLClassesListWidget);
  636. smalltalk.addMethod(
  637. "_setItemsForSelectedPackage",
  638. smalltalk.method({
  639. selector: "setItemsForSelectedPackage",
  640. fn: function (){
  641. var self=this;
  642. return smalltalk.withContext(function($ctx1) { _st(self)._setItemsForPackage_(_st(_st(self)._model())._selectedPackage());
  643. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedPackage",{}, smalltalk.HLClassesListWidget)})},
  644. messageSends: ["setItemsForPackage:", "selectedPackage", "model"]}),
  645. smalltalk.HLClassesListWidget);
  646. smalltalk.addMethod(
  647. "_showInstance",
  648. smalltalk.method({
  649. selector: "showInstance",
  650. fn: function (){
  651. var self=this;
  652. return smalltalk.withContext(function($ctx1) { var $1;
  653. $1=_st(_st(self)._model())._showInstance();
  654. return $1;
  655. }, function($ctx1) {$ctx1.fill(self,"showInstance",{}, smalltalk.HLClassesListWidget)})},
  656. messageSends: ["showInstance", "model"]}),
  657. smalltalk.HLClassesListWidget);
  658. smalltalk.addMethod(
  659. "_showInstance_",
  660. smalltalk.method({
  661. selector: "showInstance:",
  662. fn: function (aBoolean){
  663. var self=this;
  664. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._showInstance_(aBoolean);
  665. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean}, smalltalk.HLClassesListWidget)})},
  666. messageSends: ["showInstance:", "model"]}),
  667. smalltalk.HLClassesListWidget);
  668. smalltalk.addClass('HLMethodsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  669. smalltalk.addMethod(
  670. "_allProtocol",
  671. smalltalk.method({
  672. selector: "allProtocol",
  673. fn: function (){
  674. var self=this;
  675. return smalltalk.withContext(function($ctx1) { var $1;
  676. $1=_st(_st(self)._model())._allProtocol();
  677. return $1;
  678. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLMethodsListWidget)})},
  679. messageSends: ["allProtocol", "model"]}),
  680. smalltalk.HLMethodsListWidget);
  681. smalltalk.addMethod(
  682. "_flushSelectorsCache",
  683. smalltalk.method({
  684. selector: "flushSelectorsCache",
  685. fn: function (){
  686. var self=this;
  687. return smalltalk.withContext(function($ctx1) { self["@selectorsCache"]=_st((smalltalk.Dictionary || Dictionary))._new();
  688. return self}, function($ctx1) {$ctx1.fill(self,"flushSelectorsCache",{}, smalltalk.HLMethodsListWidget)})},
  689. messageSends: ["new"]}),
  690. smalltalk.HLMethodsListWidget);
  691. smalltalk.addMethod(
  692. "_iconForItem_",
  693. smalltalk.method({
  694. selector: "iconForItem:",
  695. fn: function (aSelector){
  696. var self=this;
  697. var override,overriden,method;
  698. return smalltalk.withContext(function($ctx1) { var $2,$3,$4,$1;
  699. method=_st(self)._methodForSelector_(aSelector);
  700. override=_st(self)._isOverride_(method);
  701. overriden=_st(self)._isOverridden_(method);
  702. $2=override;
  703. if(smalltalk.assert($2)){
  704. $3=overriden;
  705. if(smalltalk.assert($3)){
  706. $1="icon-resize-vertical";
  707. } else {
  708. $1="icon-arrow-up";
  709. };
  710. } else {
  711. $4=overriden;
  712. if(smalltalk.assert($4)){
  713. $1="icon-arrow-down";
  714. } else {
  715. $1="icon-none";
  716. };
  717. };
  718. return $1;
  719. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{aSelector:aSelector,override:override,overriden:overriden,method:method}, smalltalk.HLMethodsListWidget)})},
  720. messageSends: ["methodForSelector:", "isOverride:", "isOverridden:", "ifTrue:ifFalse:"]}),
  721. smalltalk.HLMethodsListWidget);
  722. smalltalk.addMethod(
  723. "_initialize",
  724. smalltalk.method({
  725. selector: "initialize",
  726. fn: function (){
  727. var self=this;
  728. return smalltalk.withContext(function($ctx1) { smalltalk.HLBrowserListWidget.fn.prototype._initialize.apply(_st(self), []);
  729. _st(self)._flushSelectorsCache();
  730. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLMethodsListWidget)})},
  731. messageSends: ["initialize", "flushSelectorsCache"]}),
  732. smalltalk.HLMethodsListWidget);
  733. smalltalk.addMethod(
  734. "_isOverridden_",
  735. smalltalk.method({
  736. selector: "isOverridden:",
  737. fn: function (aMethod){
  738. var self=this;
  739. return smalltalk.withContext(function($ctx1) { var $1;
  740. $1=_st(_st(self)._selectorsCache())._isOverridden_(aMethod);
  741. return $1;
  742. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  743. messageSends: ["isOverridden:", "selectorsCache"]}),
  744. smalltalk.HLMethodsListWidget);
  745. smalltalk.addMethod(
  746. "_isOverride_",
  747. smalltalk.method({
  748. selector: "isOverride:",
  749. fn: function (aMethod){
  750. var self=this;
  751. return smalltalk.withContext(function($ctx1) { var $1;
  752. $1=_st(_st(self)._selectorsCache())._isOverride_(aMethod);
  753. return $1;
  754. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  755. messageSends: ["isOverride:", "selectorsCache"]}),
  756. smalltalk.HLMethodsListWidget);
  757. smalltalk.addMethod(
  758. "_methodForSelector_",
  759. smalltalk.method({
  760. selector: "methodForSelector:",
  761. fn: function (aSelector){
  762. var self=this;
  763. return smalltalk.withContext(function($ctx1) { var $1;
  764. $1=_st(_st(_st(_st(self)._model())._selectedClass())._methodDictionary())._at_(aSelector);
  765. return $1;
  766. }, function($ctx1) {$ctx1.fill(self,"methodForSelector:",{aSelector:aSelector}, smalltalk.HLMethodsListWidget)})},
  767. messageSends: ["at:", "methodDictionary", "selectedClass", "model"]}),
  768. smalltalk.HLMethodsListWidget);
  769. smalltalk.addMethod(
  770. "_methodsInProtocol_",
  771. smalltalk.method({
  772. selector: "methodsInProtocol:",
  773. fn: function (aString){
  774. var self=this;
  775. return smalltalk.withContext(function($ctx1) { var $1,$3,$2;
  776. $1=_st(_st(self)._model())._selectedClass();
  777. if(($receiver = $1) == nil || $receiver == undefined){
  778. return [];
  779. } else {
  780. $1;
  781. };
  782. $3=_st(aString).__eq(_st(self)._allProtocol());
  783. if(smalltalk.assert($3)){
  784. $2=_st(_st(_st(self)._model())._selectedClass())._methods();
  785. } else {
  786. $2=_st(_st(_st(self)._model())._selectedClass())._methodsInProtocol_(aString);
  787. };
  788. return $2;
  789. }, function($ctx1) {$ctx1.fill(self,"methodsInProtocol:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  790. messageSends: ["ifNil:", "selectedClass", "model", "ifTrue:ifFalse:", "methods", "methodsInProtocol:", "=", "allProtocol"]}),
  791. smalltalk.HLMethodsListWidget);
  792. smalltalk.addMethod(
  793. "_observeModel",
  794. smalltalk.method({
  795. selector: "observeModel",
  796. fn: function (){
  797. var self=this;
  798. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  799. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  800. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  801. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  802. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(nil);
  803. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  804. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLMethodSelected || HLMethodSelected),(function(ann){
  805. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodSelected_(_st(ann)._item());
  806. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  807. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLMethodsListWidget)})},
  808. messageSends: ["on:do:", "onProtocolSelected:", "item", "announcer", "model", "onMethodSelected:"]}),
  809. smalltalk.HLMethodsListWidget);
  810. smalltalk.addMethod(
  811. "_observeSystem",
  812. smalltalk.method({
  813. selector: "observeSystem",
  814. fn: function (){
  815. var self=this;
  816. return smalltalk.withContext(function($ctx1) { var $1,$2;
  817. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  818. _st($1)._on_do_((smalltalk.MethodAdded || MethodAdded),(function(ann){
  819. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodAdded_(_st(ann)._method());
  820. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  821. $2=_st($1)._on_do_((smalltalk.MethodRemoved || MethodRemoved),(function(ann){
  822. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodRemoved_(_st(ann)._method());
  823. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  824. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLMethodsListWidget)})},
  825. messageSends: ["on:do:", "onMethodAdded:", "method", "current", "onMethodRemoved:"]}),
  826. smalltalk.HLMethodsListWidget);
  827. smalltalk.addMethod(
  828. "_onMethodAdded_",
  829. smalltalk.method({
  830. selector: "onMethodAdded:",
  831. fn: function (aMethod){
  832. var self=this;
  833. return smalltalk.withContext(function($ctx1) { var $1,$2;
  834. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(aMethod)._methodClass());
  835. if(! smalltalk.assert($1)){
  836. $2=self;
  837. return $2;
  838. };
  839. _st(self)._setItemsForSelectedProtocol();
  840. _st(self)._refresh();
  841. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  842. messageSends: ["ifFalse:", "=", "methodClass", "selectedClass", "model", "setItemsForSelectedProtocol", "refresh"]}),
  843. smalltalk.HLMethodsListWidget);
  844. smalltalk.addMethod(
  845. "_onMethodRemoved_",
  846. smalltalk.method({
  847. selector: "onMethodRemoved:",
  848. fn: function (aMethod){
  849. var self=this;
  850. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  851. var $early={};
  852. try {
  853. _st(_st(self)._items())._detect_ifNone_((function(each){
  854. return smalltalk.withContext(function($ctx2) { return _st(each).__eq(_st(aMethod)._selector());
  855. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  856. return smalltalk.withContext(function($ctx2) { $1=self;
  857. throw $early=[$1];
  858. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  859. $2=_st(self)._selectedItem();
  860. if(($receiver = $2) == nil || $receiver == undefined){
  861. $2;
  862. } else {
  863. $3=_st(_st(_st(aMethod)._methodClass()).__eq(_st(_st(self)._model())._selectedClass()))._and_((function(){
  864. return smalltalk.withContext(function($ctx2) { return _st(_st(aMethod)._selector()).__eq(_st(_st(self)._selectedItem())._selector());
  865. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  866. if(smalltalk.assert($3)){
  867. _st(self)._selectItem_(nil);
  868. };
  869. };
  870. _st(self)._setItemsForSelectedProtocol();
  871. _st(self)._refresh();
  872. return self}
  873. catch(e) {if(e===$early)return e[0]; throw e}
  874. }, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  875. messageSends: ["detect:ifNone:", "=", "selector", "items", "ifNotNil:", "ifTrue:", "selectItem:", "and:", "selectedItem", "selectedClass", "model", "methodClass", "setItemsForSelectedProtocol", "refresh"]}),
  876. smalltalk.HLMethodsListWidget);
  877. smalltalk.addMethod(
  878. "_onMethodSelected_",
  879. smalltalk.method({
  880. selector: "onMethodSelected:",
  881. fn: function (aMethod){
  882. var self=this;
  883. return smalltalk.withContext(function($ctx1) { var $1,$2;
  884. _st(self)._selectedItem_(aMethod);
  885. $1=aMethod;
  886. if(($receiver = $1) == nil || $receiver == undefined){
  887. $2=self;
  888. return $2;
  889. } else {
  890. $1;
  891. };
  892. _st(self)._focus();
  893. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  894. messageSends: ["selectedItem:", "ifNil:", "focus"]}),
  895. smalltalk.HLMethodsListWidget);
  896. smalltalk.addMethod(
  897. "_onProtocolSelected_",
  898. smalltalk.method({
  899. selector: "onProtocolSelected:",
  900. fn: function (aString){
  901. var self=this;
  902. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(nil);
  903. _st(self)._setItemsForSelectedProtocol();
  904. _st(self)._refresh();
  905. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  906. messageSends: ["selectedItem:", "setItemsForSelectedProtocol", "refresh"]}),
  907. smalltalk.HLMethodsListWidget);
  908. smalltalk.addMethod(
  909. "_overrideSelectors",
  910. smalltalk.method({
  911. selector: "overrideSelectors",
  912. fn: function (){
  913. var self=this;
  914. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  915. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("override",(function(){
  916. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(_st(self)._model())._selectedClass())._allSuperclasses())._inject_into_(_st((smalltalk.Set || Set))._new(),(function(acc,each){
  917. return smalltalk.withContext(function($ctx3) { $2=acc;
  918. _st($2)._addAll_(_st(each)._selectors());
  919. $3=_st($2)._yourself();
  920. return $3;
  921. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  922. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  923. return $1;
  924. }, function($ctx1) {$ctx1.fill(self,"overrideSelectors",{}, smalltalk.HLMethodsListWidget)})},
  925. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSuperclasses", "selectedClass", "model", "selectorsCache"]}),
  926. smalltalk.HLMethodsListWidget);
  927. smalltalk.addMethod(
  928. "_overridenSelectors",
  929. smalltalk.method({
  930. selector: "overridenSelectors",
  931. fn: function (){
  932. var self=this;
  933. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  934. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("overriden",(function(){
  935. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(_st(self)._model())._selectedClass())._allSubclasses())._inject_into_(_st((smalltalk.Set || Set))._new(),(function(acc,each){
  936. return smalltalk.withContext(function($ctx3) { $2=acc;
  937. _st($2)._addAll_(_st(each)._selectors());
  938. $3=_st($2)._yourself();
  939. return $3;
  940. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  941. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  942. return $1;
  943. }, function($ctx1) {$ctx1.fill(self,"overridenSelectors",{}, smalltalk.HLMethodsListWidget)})},
  944. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSubclasses", "selectedClass", "model", "selectorsCache"]}),
  945. smalltalk.HLMethodsListWidget);
  946. smalltalk.addMethod(
  947. "_renderContentOn_",
  948. smalltalk.method({
  949. selector: "renderContentOn:",
  950. fn: function (html){
  951. var self=this;
  952. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  953. $1=_st(_st(self)._model())._showInstance();
  954. if(smalltalk.assert($1)){
  955. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  956. } else {
  957. $2=_st(html)._div();
  958. _st($2)._class_("class_side");
  959. $3=_st($2)._with_((function(){
  960. return smalltalk.withContext(function($ctx2) { return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  961. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  962. $3;
  963. };
  964. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLMethodsListWidget)})},
  965. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"]}),
  966. smalltalk.HLMethodsListWidget);
  967. smalltalk.addMethod(
  968. "_renderItemLabel_on_",
  969. smalltalk.method({
  970. selector: "renderItemLabel:on:",
  971. fn: function (aSelector,html){
  972. var self=this;
  973. return smalltalk.withContext(function($ctx1) { _st(html)._with_(aSelector);
  974. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aSelector:aSelector,html:html}, smalltalk.HLMethodsListWidget)})},
  975. messageSends: ["with:"]}),
  976. smalltalk.HLMethodsListWidget);
  977. smalltalk.addMethod(
  978. "_selectItem_",
  979. smalltalk.method({
  980. selector: "selectItem:",
  981. fn: function (aSelector){
  982. var self=this;
  983. return smalltalk.withContext(function($ctx1) { var $1,$2;
  984. $1=aSelector;
  985. if(($receiver = $1) == nil || $receiver == undefined){
  986. $2=_st(_st(self)._model())._selectedMethod_(nil);
  987. return $2;
  988. } else {
  989. $1;
  990. };
  991. _st(_st(self)._model())._selectedMethod_(_st(self)._methodForSelector_(aSelector));
  992. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aSelector:aSelector}, smalltalk.HLMethodsListWidget)})},
  993. messageSends: ["ifNil:", "selectedMethod:", "model", "methodForSelector:"]}),
  994. smalltalk.HLMethodsListWidget);
  995. smalltalk.addMethod(
  996. "_selectorsCache",
  997. smalltalk.method({
  998. selector: "selectorsCache",
  999. fn: function (){
  1000. var self=this;
  1001. return smalltalk.withContext(function($ctx1) { var $1;
  1002. $1=_st(_st(self)._class())._selectorsCache();
  1003. return $1;
  1004. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLMethodsListWidget)})},
  1005. messageSends: ["selectorsCache", "class"]}),
  1006. smalltalk.HLMethodsListWidget);
  1007. smalltalk.addMethod(
  1008. "_selectorsInProtocol_",
  1009. smalltalk.method({
  1010. selector: "selectorsInProtocol:",
  1011. fn: function (aString){
  1012. var self=this;
  1013. return smalltalk.withContext(function($ctx1) { var $1;
  1014. $1=_st(_st(self)._methodsInProtocol_(aString))._collect_((function(each){
  1015. return smalltalk.withContext(function($ctx2) { return _st(each)._selector();
  1016. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1017. return $1;
  1018. }, function($ctx1) {$ctx1.fill(self,"selectorsInProtocol:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  1019. messageSends: ["collect:", "selector", "methodsInProtocol:"]}),
  1020. smalltalk.HLMethodsListWidget);
  1021. smalltalk.addMethod(
  1022. "_setItemsForProtocol_",
  1023. smalltalk.method({
  1024. selector: "setItemsForProtocol:",
  1025. fn: function (aString){
  1026. var self=this;
  1027. return smalltalk.withContext(function($ctx1) { var $2,$4,$3,$1;
  1028. $2=self;
  1029. $4=aString;
  1030. if(($receiver = $4) == nil || $receiver == undefined){
  1031. $3=[];
  1032. } else {
  1033. $3=_st(self)._selectorsInProtocol_(aString);
  1034. };
  1035. $1=_st($2)._items_($3);
  1036. return $1;
  1037. }, function($ctx1) {$ctx1.fill(self,"setItemsForProtocol:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  1038. messageSends: ["items:", "ifNil:ifNotNil:", "selectorsInProtocol:"]}),
  1039. smalltalk.HLMethodsListWidget);
  1040. smalltalk.addMethod(
  1041. "_setItemsForSelectedProtocol",
  1042. smalltalk.method({
  1043. selector: "setItemsForSelectedProtocol",
  1044. fn: function (){
  1045. var self=this;
  1046. return smalltalk.withContext(function($ctx1) { _st(self)._setItemsForProtocol_(_st(_st(self)._model())._selectedProtocol());
  1047. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedProtocol",{}, smalltalk.HLMethodsListWidget)})},
  1048. messageSends: ["setItemsForProtocol:", "selectedProtocol", "model"]}),
  1049. smalltalk.HLMethodsListWidget);
  1050. smalltalk.HLMethodsListWidget.klass.iVarNames = ['selectorsCache'];
  1051. smalltalk.addMethod(
  1052. "_selectorsCache",
  1053. smalltalk.method({
  1054. selector: "selectorsCache",
  1055. fn: function (){
  1056. var self=this;
  1057. return smalltalk.withContext(function($ctx1) { var $1;
  1058. $1=_st((smalltalk.HLSelectorsCache || HLSelectorsCache))._current();
  1059. return $1;
  1060. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLMethodsListWidget.klass)})},
  1061. messageSends: ["current"]}),
  1062. smalltalk.HLMethodsListWidget.klass);
  1063. smalltalk.addClass('HLPackagesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1064. smalltalk.addMethod(
  1065. "_focusClassesListWidget",
  1066. smalltalk.method({
  1067. selector: "focusClassesListWidget",
  1068. fn: function (){
  1069. var self=this;
  1070. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._announce_(_st((smalltalk.HLClassesListFocus || HLClassesListFocus))._new());
  1071. return self}, function($ctx1) {$ctx1.fill(self,"focusClassesListWidget",{}, smalltalk.HLPackagesListWidget)})},
  1072. messageSends: ["announce:", "new", "announcer", "model"]}),
  1073. smalltalk.HLPackagesListWidget);
  1074. smalltalk.addMethod(
  1075. "_initializeItems",
  1076. smalltalk.method({
  1077. selector: "initializeItems",
  1078. fn: function (){
  1079. var self=this;
  1080. return smalltalk.withContext(function($ctx1) { var $1;
  1081. self["@items"]=_st(_st(_st(self)._model())._packages())._sort_((function(a,b){
  1082. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._name()).__lt(_st(b)._name());
  1083. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  1084. $1=self["@items"];
  1085. return $1;
  1086. }, function($ctx1) {$ctx1.fill(self,"initializeItems",{}, smalltalk.HLPackagesListWidget)})},
  1087. messageSends: ["sort:", "<", "name", "packages", "model"]}),
  1088. smalltalk.HLPackagesListWidget);
  1089. smalltalk.addMethod(
  1090. "_items",
  1091. smalltalk.method({
  1092. selector: "items",
  1093. fn: function (){
  1094. var self=this;
  1095. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1096. $2=self["@items"];
  1097. if(($receiver = $2) == nil || $receiver == undefined){
  1098. $1=_st(self)._initializeItems();
  1099. } else {
  1100. $1=$2;
  1101. };
  1102. return $1;
  1103. }, function($ctx1) {$ctx1.fill(self,"items",{}, smalltalk.HLPackagesListWidget)})},
  1104. messageSends: ["ifNil:", "initializeItems"]}),
  1105. smalltalk.HLPackagesListWidget);
  1106. smalltalk.addMethod(
  1107. "_observeModel",
  1108. smalltalk.method({
  1109. selector: "observeModel",
  1110. fn: function (){
  1111. var self=this;
  1112. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLPackageSelected || HLPackageSelected),(function(ann){
  1113. return smalltalk.withContext(function($ctx2) { return _st(self)._onPackageSelected_(_st(ann)._item());
  1114. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1115. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLPackagesListWidget)})},
  1116. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model"]}),
  1117. smalltalk.HLPackagesListWidget);
  1118. smalltalk.addMethod(
  1119. "_onPackageSelected_",
  1120. smalltalk.method({
  1121. selector: "onPackageSelected:",
  1122. fn: function (aPackage){
  1123. var self=this;
  1124. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(aPackage);
  1125. _st(self)._focus();
  1126. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{aPackage:aPackage}, smalltalk.HLPackagesListWidget)})},
  1127. messageSends: ["selectedItem:", "focus"]}),
  1128. smalltalk.HLPackagesListWidget);
  1129. smalltalk.addMethod(
  1130. "_renderButtonsOn_",
  1131. smalltalk.method({
  1132. selector: "renderButtonsOn:",
  1133. fn: function (html){
  1134. var self=this;
  1135. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$5,$6,$7,$8,$4,$9,$10;
  1136. $1=_st(html)._span();
  1137. _st($1)._class_("info");
  1138. $2=_st($1)._with_("Auto commit");
  1139. $3=_st(html)._div();
  1140. _st($3)._class_("btn-group switch");
  1141. _st($3)._at_put_("data-toggle","buttons-radio");
  1142. $4=_st($3)._with_((function(){
  1143. return smalltalk.withContext(function($ctx2) { $5=_st(html)._button();
  1144. _st($5)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  1145. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("btn");
  1146. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1147. $6=_st($5)._with_("On");
  1148. $6;
  1149. $7=_st(html)._button();
  1150. _st($7)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  1151. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("btn active");
  1152. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1153. $8=_st($7)._with_("Off");
  1154. return $8;
  1155. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1156. $9=_st(html)._a();
  1157. _st($9)._class_("btn");
  1158. $10=_st($9)._with_("Commit");
  1159. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.HLPackagesListWidget)})},
  1160. messageSends: ["class:", "span", "with:", "div", "at:put:", "streamContents:", "nextPutAll:", "button", "a"]}),
  1161. smalltalk.HLPackagesListWidget);
  1162. smalltalk.addMethod(
  1163. "_selectItem_",
  1164. smalltalk.method({
  1165. selector: "selectItem:",
  1166. fn: function (aPackage){
  1167. var self=this;
  1168. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedPackage_(aPackage);
  1169. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aPackage:aPackage}, smalltalk.HLPackagesListWidget)})},
  1170. messageSends: ["selectedPackage:", "model"]}),
  1171. smalltalk.HLPackagesListWidget);
  1172. smalltalk.addClass('HLProtocolsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1173. smalltalk.addMethod(
  1174. "_allProtocol",
  1175. smalltalk.method({
  1176. selector: "allProtocol",
  1177. fn: function (){
  1178. var self=this;
  1179. return smalltalk.withContext(function($ctx1) { var $1;
  1180. $1=_st(_st(self)._model())._allProtocol();
  1181. return $1;
  1182. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLProtocolsListWidget)})},
  1183. messageSends: ["allProtocol", "model"]}),
  1184. smalltalk.HLProtocolsListWidget);
  1185. smalltalk.addMethod(
  1186. "_observeModel",
  1187. smalltalk.method({
  1188. selector: "observeModel",
  1189. fn: function (){
  1190. var self=this;
  1191. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  1192. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  1193. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1194. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  1195. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(_st(self)._model())._selectedClass());
  1196. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1197. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  1198. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  1199. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1200. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLProtocolsListWidget)})},
  1201. messageSends: ["on:do:", "onClassSelected:", "item", "announcer", "model", "selectedClass", "onProtocolSelected:"]}),
  1202. smalltalk.HLProtocolsListWidget);
  1203. smalltalk.addMethod(
  1204. "_onClassSelected_",
  1205. smalltalk.method({
  1206. selector: "onClassSelected:",
  1207. fn: function (aClass){
  1208. var self=this;
  1209. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$2;
  1210. _st(self)._selectedItem_(nil);
  1211. $1=self;
  1212. $3=aClass;
  1213. if(($receiver = $3) == nil || $receiver == undefined){
  1214. $2=_st((smalltalk.Array || Array))._with_(_st(self)._allProtocol());
  1215. } else {
  1216. $4=_st((smalltalk.Array || Array))._with_(_st(self)._allProtocol());
  1217. _st($4)._addAll_(_st(aClass)._protocols());
  1218. $5=_st($4)._yourself();
  1219. $2=$5;
  1220. };
  1221. _st($1)._items_($2);
  1222. _st(self)._refresh();
  1223. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLProtocolsListWidget)})},
  1224. messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself", "refresh"]}),
  1225. smalltalk.HLProtocolsListWidget);
  1226. smalltalk.addMethod(
  1227. "_onProtocolSelected_",
  1228. smalltalk.method({
  1229. selector: "onProtocolSelected:",
  1230. fn: function (aString){
  1231. var self=this;
  1232. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1233. _st(self)._selectedItem_(aString);
  1234. $1=aString;
  1235. if(($receiver = $1) == nil || $receiver == undefined){
  1236. $2=self;
  1237. return $2;
  1238. } else {
  1239. $1;
  1240. };
  1241. _st(self)._focus();
  1242. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLProtocolsListWidget)})},
  1243. messageSends: ["selectedItem:", "ifNil:", "focus"]}),
  1244. smalltalk.HLProtocolsListWidget);
  1245. smalltalk.addMethod(
  1246. "_renderContentOn_",
  1247. smalltalk.method({
  1248. selector: "renderContentOn:",
  1249. fn: function (html){
  1250. var self=this;
  1251. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1252. $1=_st(_st(self)._model())._showInstance();
  1253. if(smalltalk.assert($1)){
  1254. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1255. } else {
  1256. $2=_st(html)._div();
  1257. _st($2)._class_("class_side");
  1258. $3=_st($2)._with_((function(){
  1259. return smalltalk.withContext(function($ctx2) { return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1260. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1261. $3;
  1262. };
  1263. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLProtocolsListWidget)})},
  1264. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"]}),
  1265. smalltalk.HLProtocolsListWidget);
  1266. smalltalk.addMethod(
  1267. "_selectItem_",
  1268. smalltalk.method({
  1269. selector: "selectItem:",
  1270. fn: function (aString){
  1271. var self=this;
  1272. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedProtocol_(aString);
  1273. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aString:aString}, smalltalk.HLProtocolsListWidget)})},
  1274. messageSends: ["selectedProtocol:", "model"]}),
  1275. smalltalk.HLProtocolsListWidget);
  1276. smalltalk.addMethod(
  1277. "_selectedItem",
  1278. smalltalk.method({
  1279. selector: "selectedItem",
  1280. fn: function (){
  1281. var self=this;
  1282. return smalltalk.withContext(function($ctx1) { var $1;
  1283. $1=smalltalk.HLBrowserListWidget.fn.prototype._selectedItem.apply(_st(self), []);
  1284. return $1;
  1285. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{}, smalltalk.HLProtocolsListWidget)})},
  1286. messageSends: ["selectedItem"]}),
  1287. smalltalk.HLProtocolsListWidget);
  1288. smalltalk.addClass('HLBrowserModel', smalltalk.Object, ['announcer', 'environment', 'selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedSelector', 'showInstance', 'showComment'], 'Helios-Browser');
  1289. smalltalk.addMethod(
  1290. "_allProtocol",
  1291. smalltalk.method({
  1292. selector: "allProtocol",
  1293. fn: function (){
  1294. var self=this;
  1295. return smalltalk.withContext(function($ctx1) { return "-- All --";
  1296. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLBrowserModel)})},
  1297. messageSends: []}),
  1298. smalltalk.HLBrowserModel);
  1299. smalltalk.addMethod(
  1300. "_announcer",
  1301. smalltalk.method({
  1302. selector: "announcer",
  1303. fn: function (){
  1304. var self=this;
  1305. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1306. $2=self["@announcer"];
  1307. if(($receiver = $2) == nil || $receiver == undefined){
  1308. self["@announcer"]=_st((smalltalk.Announcer || Announcer))._new();
  1309. $1=self["@announcer"];
  1310. } else {
  1311. $1=$2;
  1312. };
  1313. return $1;
  1314. }, function($ctx1) {$ctx1.fill(self,"announcer",{}, smalltalk.HLBrowserModel)})},
  1315. messageSends: ["ifNil:", "new"]}),
  1316. smalltalk.HLBrowserModel);
  1317. smalltalk.addMethod(
  1318. "_environment",
  1319. smalltalk.method({
  1320. selector: "environment",
  1321. fn: function (){
  1322. var self=this;
  1323. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1324. $2=self["@environment"];
  1325. if(($receiver = $2) == nil || $receiver == undefined){
  1326. $1=_st(_st((smalltalk.HLManager || HLManager))._current())._environment();
  1327. } else {
  1328. $1=$2;
  1329. };
  1330. return $1;
  1331. }, function($ctx1) {$ctx1.fill(self,"environment",{}, smalltalk.HLBrowserModel)})},
  1332. messageSends: ["ifNil:", "environment", "current"]}),
  1333. smalltalk.HLBrowserModel);
  1334. smalltalk.addMethod(
  1335. "_environment_",
  1336. smalltalk.method({
  1337. selector: "environment:",
  1338. fn: function (anEnvironment){
  1339. var self=this;
  1340. return smalltalk.withContext(function($ctx1) { self["@environment"]=anEnvironment;
  1341. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel)})},
  1342. messageSends: []}),
  1343. smalltalk.HLBrowserModel);
  1344. smalltalk.addMethod(
  1345. "_packages",
  1346. smalltalk.method({
  1347. selector: "packages",
  1348. fn: function (){
  1349. var self=this;
  1350. return smalltalk.withContext(function($ctx1) { var $1;
  1351. $1=_st(_st(self)._environment())._packages();
  1352. return $1;
  1353. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLBrowserModel)})},
  1354. messageSends: ["packages", "environment"]}),
  1355. smalltalk.HLBrowserModel);
  1356. smalltalk.addMethod(
  1357. "_selectedClass",
  1358. smalltalk.method({
  1359. selector: "selectedClass",
  1360. fn: function (){
  1361. var self=this;
  1362. return smalltalk.withContext(function($ctx1) { var $1;
  1363. $1=self["@selectedClass"];
  1364. return $1;
  1365. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{}, smalltalk.HLBrowserModel)})},
  1366. messageSends: []}),
  1367. smalltalk.HLBrowserModel);
  1368. smalltalk.addMethod(
  1369. "_selectedClass_",
  1370. smalltalk.method({
  1371. selector: "selectedClass:",
  1372. fn: function (aClass){
  1373. var self=this;
  1374. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  1375. $1=_st(self["@selectedClass"]).__eq(aClass);
  1376. if(smalltalk.assert($1)){
  1377. $2=self;
  1378. return $2;
  1379. };
  1380. $3=aClass;
  1381. if(($receiver = $3) == nil || $receiver == undefined){
  1382. self["@selectedClass"]=nil;
  1383. self["@selectedClass"];
  1384. } else {
  1385. $4=_st(self)._showInstance();
  1386. if(smalltalk.assert($4)){
  1387. self["@selectedClass"]=_st(aClass)._theNonMetaClass();
  1388. self["@selectedClass"];
  1389. } else {
  1390. self["@selectedClass"]=_st(aClass)._theMetaClass();
  1391. self["@selectedClass"];
  1392. };
  1393. };
  1394. _st(self)._selectedProtocol_(nil);
  1395. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLClassSelected || HLClassSelected))._on_(_st(self)._selectedClass()));
  1396. return self}, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass}, smalltalk.HLBrowserModel)})},
  1397. messageSends: ["ifTrue:", "=", "ifNil:ifNotNil:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "showInstance", "selectedProtocol:", "announce:", "on:", "selectedClass", "announcer"]}),
  1398. smalltalk.HLBrowserModel);
  1399. smalltalk.addMethod(
  1400. "_selectedMethod",
  1401. smalltalk.method({
  1402. selector: "selectedMethod",
  1403. fn: function (){
  1404. var self=this;
  1405. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1406. $2=_st(self)._selectedClass();
  1407. if(($receiver = $2) == nil || $receiver == undefined){
  1408. $1=$2;
  1409. } else {
  1410. $1=_st(_st(_st(self)._selectedClass())._methodDictionary())._at_(self["@selectedSelector"]);
  1411. };
  1412. return $1;
  1413. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{}, smalltalk.HLBrowserModel)})},
  1414. messageSends: ["ifNotNil:", "at:", "methodDictionary", "selectedClass"]}),
  1415. smalltalk.HLBrowserModel);
  1416. smalltalk.addMethod(
  1417. "_selectedMethod_",
  1418. smalltalk.method({
  1419. selector: "selectedMethod:",
  1420. fn: function (aCompiledMethod){
  1421. var self=this;
  1422. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  1423. $1=_st(self["@selectedSelector"]).__eq(aCompiledMethod);
  1424. if(smalltalk.assert($1)){
  1425. $2=self;
  1426. return $2;
  1427. };
  1428. $3=aCompiledMethod;
  1429. if(($receiver = $3) == nil || $receiver == undefined){
  1430. self["@selectedSelector"]=nil;
  1431. self["@selectedSelector"];
  1432. } else {
  1433. $4=_st(self["@selectedSelector"]).__eq(_st(aCompiledMethod)._selector());
  1434. if(smalltalk.assert($4)){
  1435. $5=self;
  1436. return $5;
  1437. };
  1438. self["@selectedSelector"]=_st(aCompiledMethod)._selector();
  1439. self["@selectedSelector"];
  1440. };
  1441. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLMethodSelected || HLMethodSelected))._on_(aCompiledMethod));
  1442. return self}, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserModel)})},
  1443. messageSends: ["ifTrue:", "=", "ifNil:ifNotNil:", "selector", "announce:", "on:", "announcer"]}),
  1444. smalltalk.HLBrowserModel);
  1445. smalltalk.addMethod(
  1446. "_selectedPackage",
  1447. smalltalk.method({
  1448. selector: "selectedPackage",
  1449. fn: function (){
  1450. var self=this;
  1451. return smalltalk.withContext(function($ctx1) { var $1;
  1452. $1=self["@selectedPackage"];
  1453. return $1;
  1454. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{}, smalltalk.HLBrowserModel)})},
  1455. messageSends: []}),
  1456. smalltalk.HLBrowserModel);
  1457. smalltalk.addMethod(
  1458. "_selectedPackage_",
  1459. smalltalk.method({
  1460. selector: "selectedPackage:",
  1461. fn: function (aPackage){
  1462. var self=this;
  1463. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1464. $1=_st(self["@selectedPackage"]).__eq(aPackage);
  1465. if(smalltalk.assert($1)){
  1466. $2=self;
  1467. return $2;
  1468. };
  1469. self["@selectedPackage"]=aPackage;
  1470. _st(self)._selectedClass_(nil);
  1471. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLPackageSelected || HLPackageSelected))._on_(aPackage));
  1472. return self}, function($ctx1) {$ctx1.fill(self,"selectedPackage:",{aPackage:aPackage}, smalltalk.HLBrowserModel)})},
  1473. messageSends: ["ifTrue:", "=", "selectedClass:", "announce:", "on:", "announcer"]}),
  1474. smalltalk.HLBrowserModel);
  1475. smalltalk.addMethod(
  1476. "_selectedProtocol",
  1477. smalltalk.method({
  1478. selector: "selectedProtocol",
  1479. fn: function (){
  1480. var self=this;
  1481. return smalltalk.withContext(function($ctx1) { var $1;
  1482. $1=self["@selectedProtocol"];
  1483. return $1;
  1484. }, function($ctx1) {$ctx1.fill(self,"selectedProtocol",{}, smalltalk.HLBrowserModel)})},
  1485. messageSends: []}),
  1486. smalltalk.HLBrowserModel);
  1487. smalltalk.addMethod(
  1488. "_selectedProtocol_",
  1489. smalltalk.method({
  1490. selector: "selectedProtocol:",
  1491. fn: function (aString){
  1492. var self=this;
  1493. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1494. $1=_st(self["@selectedProtocol"]).__eq(aString);
  1495. if(smalltalk.assert($1)){
  1496. $2=self;
  1497. return $2;
  1498. };
  1499. self["@selectedProtocol"]=aString;
  1500. _st(self)._selectedMethod_(nil);
  1501. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLProtocolSelected || HLProtocolSelected))._on_(aString));
  1502. return self}, function($ctx1) {$ctx1.fill(self,"selectedProtocol:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1503. messageSends: ["ifTrue:", "=", "selectedMethod:", "announce:", "on:", "announcer"]}),
  1504. smalltalk.HLBrowserModel);
  1505. smalltalk.addMethod(
  1506. "_showComment",
  1507. smalltalk.method({
  1508. selector: "showComment",
  1509. fn: function (){
  1510. var self=this;
  1511. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1512. $2=self["@showComment"];
  1513. if(($receiver = $2) == nil || $receiver == undefined){
  1514. $1=false;
  1515. } else {
  1516. $1=$2;
  1517. };
  1518. return $1;
  1519. }, function($ctx1) {$ctx1.fill(self,"showComment",{}, smalltalk.HLBrowserModel)})},
  1520. messageSends: ["ifNil:"]}),
  1521. smalltalk.HLBrowserModel);
  1522. smalltalk.addMethod(
  1523. "_showComment_",
  1524. smalltalk.method({
  1525. selector: "showComment:",
  1526. fn: function (aBoolean){
  1527. var self=this;
  1528. return smalltalk.withContext(function($ctx1) { self["@showComment"]=aBoolean;
  1529. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowCommentToggled || HLShowCommentToggled))._new());
  1530. return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  1531. messageSends: ["announce:", "new", "announcer"]}),
  1532. smalltalk.HLBrowserModel);
  1533. smalltalk.addMethod(
  1534. "_showInstance",
  1535. smalltalk.method({
  1536. selector: "showInstance",
  1537. fn: function (){
  1538. var self=this;
  1539. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1540. $2=self["@showInstance"];
  1541. if(($receiver = $2) == nil || $receiver == undefined){
  1542. $1=true;
  1543. } else {
  1544. $1=$2;
  1545. };
  1546. return $1;
  1547. }, function($ctx1) {$ctx1.fill(self,"showInstance",{}, smalltalk.HLBrowserModel)})},
  1548. messageSends: ["ifNil:"]}),
  1549. smalltalk.HLBrowserModel);
  1550. smalltalk.addMethod(
  1551. "_showInstance_",
  1552. smalltalk.method({
  1553. selector: "showInstance:",
  1554. fn: function (aBoolean){
  1555. var self=this;
  1556. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$3;
  1557. self["@showInstance"]=aBoolean;
  1558. $1=_st(self)._selectedClass();
  1559. if(($receiver = $1) == nil || $receiver == undefined){
  1560. $1;
  1561. } else {
  1562. $2=self;
  1563. $4=aBoolean;
  1564. if(smalltalk.assert($4)){
  1565. $3=_st(_st(self)._selectedClass())._theNonMetaClass();
  1566. } else {
  1567. $3=_st(_st(self)._selectedClass())._theMetaClass();
  1568. };
  1569. _st($2)._selectedClass_($3);
  1570. };
  1571. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled))._new());
  1572. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  1573. messageSends: ["ifNotNil:", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "selectedClass", "theMetaClass", "announce:", "new", "announcer"]}),
  1574. smalltalk.HLBrowserModel);
  1575. smalltalk.addMethod(
  1576. "_on_",
  1577. smalltalk.method({
  1578. selector: "on:",
  1579. fn: function (anEnvironment){
  1580. var self=this;
  1581. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1582. $2=_st(self)._new();
  1583. _st($2)._environment_(anEnvironment);
  1584. $3=_st($2)._yourself();
  1585. $1=$3;
  1586. return $1;
  1587. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel.klass)})},
  1588. messageSends: ["environment:", "new", "yourself"]}),
  1589. smalltalk.HLBrowserModel.klass);
  1590. smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'methodContents', 'codeWidget'], 'Helios-Browser');
  1591. smalltalk.addMethod(
  1592. "_codeWidget",
  1593. smalltalk.method({
  1594. selector: "codeWidget",
  1595. fn: function (){
  1596. var self=this;
  1597. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1598. $2=self["@codeWidget"];
  1599. if(($receiver = $2) == nil || $receiver == undefined){
  1600. self["@codeWidget"]=_st((smalltalk.HLCodeWidget || HLCodeWidget))._new();
  1601. $1=self["@codeWidget"];
  1602. } else {
  1603. $1=$2;
  1604. };
  1605. return $1;
  1606. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{}, smalltalk.HLBrowserSourceWidget)})},
  1607. messageSends: ["ifNil:", "new"]}),
  1608. smalltalk.HLBrowserSourceWidget);
  1609. smalltalk.addMethod(
  1610. "_contents",
  1611. smalltalk.method({
  1612. selector: "contents",
  1613. fn: function (){
  1614. var self=this;
  1615. return smalltalk.withContext(function($ctx1) { var $1;
  1616. $1=_st(_st(self)._codeWidget())._contents();
  1617. return $1;
  1618. }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.HLBrowserSourceWidget)})},
  1619. messageSends: ["contents", "codeWidget"]}),
  1620. smalltalk.HLBrowserSourceWidget);
  1621. smalltalk.addMethod(
  1622. "_contents_",
  1623. smalltalk.method({
  1624. selector: "contents:",
  1625. fn: function (aString){
  1626. var self=this;
  1627. return smalltalk.withContext(function($ctx1) { _st(self)._methodContents_(aString);
  1628. _st(_st(self)._codeWidget())._contents_(aString);
  1629. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  1630. messageSends: ["methodContents:", "contents:", "codeWidget"]}),
  1631. smalltalk.HLBrowserSourceWidget);
  1632. smalltalk.addMethod(
  1633. "_hasModification",
  1634. smalltalk.method({
  1635. selector: "hasModification",
  1636. fn: function (){
  1637. var self=this;
  1638. return smalltalk.withContext(function($ctx1) { var $1;
  1639. $1=_st(_st(_st(self)._methodContents()).__eq(_st(self)._contents()))._not();
  1640. return $1;
  1641. }, function($ctx1) {$ctx1.fill(self,"hasModification",{}, smalltalk.HLBrowserSourceWidget)})},
  1642. messageSends: ["not", "=", "contents", "methodContents"]}),
  1643. smalltalk.HLBrowserSourceWidget);
  1644. smalltalk.addMethod(
  1645. "_initialize",
  1646. smalltalk.method({
  1647. selector: "initialize",
  1648. fn: function (){
  1649. var self=this;
  1650. return smalltalk.withContext(function($ctx1) { smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  1651. _st(self)._observeSystem();
  1652. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLBrowserSourceWidget)})},
  1653. messageSends: ["initialize", "observeSystem"]}),
  1654. smalltalk.HLBrowserSourceWidget);
  1655. smalltalk.addMethod(
  1656. "_methodContents",
  1657. smalltalk.method({
  1658. selector: "methodContents",
  1659. fn: function (){
  1660. var self=this;
  1661. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1662. $2=self["@methodContents"];
  1663. if(($receiver = $2) == nil || $receiver == undefined){
  1664. self["@methodContents"]="";
  1665. $1=self["@methodContents"];
  1666. } else {
  1667. $1=$2;
  1668. };
  1669. return $1;
  1670. }, function($ctx1) {$ctx1.fill(self,"methodContents",{}, smalltalk.HLBrowserSourceWidget)})},
  1671. messageSends: ["ifNil:"]}),
  1672. smalltalk.HLBrowserSourceWidget);
  1673. smalltalk.addMethod(
  1674. "_methodContents_",
  1675. smalltalk.method({
  1676. selector: "methodContents:",
  1677. fn: function (aString){
  1678. var self=this;
  1679. return smalltalk.withContext(function($ctx1) { self["@methodContents"]=aString;
  1680. return self}, function($ctx1) {$ctx1.fill(self,"methodContents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  1681. messageSends: []}),
  1682. smalltalk.HLBrowserSourceWidget);
  1683. smalltalk.addMethod(
  1684. "_model",
  1685. smalltalk.method({
  1686. selector: "model",
  1687. fn: function (){
  1688. var self=this;
  1689. return smalltalk.withContext(function($ctx1) { var $1;
  1690. $1=self["@model"];
  1691. return $1;
  1692. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLBrowserSourceWidget)})},
  1693. messageSends: []}),
  1694. smalltalk.HLBrowserSourceWidget);
  1695. smalltalk.addMethod(
  1696. "_model_",
  1697. smalltalk.method({
  1698. selector: "model:",
  1699. fn: function (aBrowserModel){
  1700. var self=this;
  1701. return smalltalk.withContext(function($ctx1) { self["@model"]=aBrowserModel;
  1702. _st(self)._observeModel();
  1703. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget)})},
  1704. messageSends: ["observeModel"]}),
  1705. smalltalk.HLBrowserSourceWidget);
  1706. smalltalk.addMethod(
  1707. "_observeModel",
  1708. smalltalk.method({
  1709. selector: "observeModel",
  1710. fn: function (){
  1711. var self=this;
  1712. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLMethodSelected || HLMethodSelected),(function(ann){
  1713. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodSelected_(_st(ann)._item());
  1714. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1715. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  1716. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  1717. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1718. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  1719. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  1720. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1721. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLBrowserSourceWidget)})},
  1722. messageSends: ["on:do:", "onMethodSelected:", "item", "announcer", "model", "onClassSelected:", "onProtocolSelected:"]}),
  1723. smalltalk.HLBrowserSourceWidget);
  1724. smalltalk.addMethod(
  1725. "_observeSystem",
  1726. smalltalk.method({
  1727. selector: "observeSystem",
  1728. fn: function (){
  1729. var self=this;
  1730. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._on_do_((smalltalk.MethodModified || MethodModified),(function(ann){
  1731. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodModified_(_st(ann)._method());
  1732. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1733. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLBrowserSourceWidget)})},
  1734. messageSends: ["on:do:", "onMethodModified:", "method", "current"]}),
  1735. smalltalk.HLBrowserSourceWidget);
  1736. smalltalk.addMethod(
  1737. "_onClassSelected_",
  1738. smalltalk.method({
  1739. selector: "onClassSelected:",
  1740. fn: function (aClass){
  1741. var self=this;
  1742. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1743. $1=aClass;
  1744. if(($receiver = $1) == nil || $receiver == undefined){
  1745. $2=_st(self)._contents_("");
  1746. return $2;
  1747. } else {
  1748. $1;
  1749. };
  1750. _st(self)._contents_(_st(aClass)._definition());
  1751. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLBrowserSourceWidget)})},
  1752. messageSends: ["ifNil:", "contents:", "definition"]}),
  1753. smalltalk.HLBrowserSourceWidget);
  1754. smalltalk.addMethod(
  1755. "_onMethodModified_",
  1756. smalltalk.method({
  1757. selector: "onMethodModified:",
  1758. fn: function (aMethod){
  1759. var self=this;
  1760. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  1761. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(aMethod)._methodClass());
  1762. if(! smalltalk.assert($1)){
  1763. $2=self;
  1764. return $2;
  1765. };
  1766. $3=_st(_st(_st(_st(self)._model())._selectedMethod())._selector()).__eq(_st(aMethod)._selector());
  1767. if(! smalltalk.assert($3)){
  1768. $4=self;
  1769. return $4;
  1770. };
  1771. _st(self)._refresh();
  1772. return self}, function($ctx1) {$ctx1.fill(self,"onMethodModified:",{aMethod:aMethod}, smalltalk.HLBrowserSourceWidget)})},
  1773. messageSends: ["ifFalse:", "=", "methodClass", "selectedClass", "model", "selector", "selectedMethod", "refresh"]}),
  1774. smalltalk.HLBrowserSourceWidget);
  1775. smalltalk.addMethod(
  1776. "_onMethodSelected_",
  1777. smalltalk.method({
  1778. selector: "onMethodSelected:",
  1779. fn: function (aCompiledMethod){
  1780. var self=this;
  1781. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1782. $1=aCompiledMethod;
  1783. if(($receiver = $1) == nil || $receiver == undefined){
  1784. $2=_st(self)._contents_("");
  1785. return $2;
  1786. } else {
  1787. $1;
  1788. };
  1789. _st(self)._contents_(_st(aCompiledMethod)._source());
  1790. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserSourceWidget)})},
  1791. messageSends: ["ifNil:", "contents:", "source"]}),
  1792. smalltalk.HLBrowserSourceWidget);
  1793. smalltalk.addMethod(
  1794. "_onProtocolSelected_",
  1795. smalltalk.method({
  1796. selector: "onProtocolSelected:",
  1797. fn: function (aString){
  1798. var self=this;
  1799. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1800. $1=_st(_st(self)._model())._selectedClass();
  1801. if(($receiver = $1) == nil || $receiver == undefined){
  1802. $2=_st(self)._contents_("");
  1803. return $2;
  1804. } else {
  1805. $1;
  1806. };
  1807. _st(self)._contents_(_st(_st(_st(self)._model())._selectedClass())._definition());
  1808. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  1809. messageSends: ["ifNil:", "contents:", "selectedClass", "model", "definition"]}),
  1810. smalltalk.HLBrowserSourceWidget);
  1811. smalltalk.addMethod(
  1812. "_refresh",
  1813. smalltalk.method({
  1814. selector: "refresh",
  1815. fn: function (){
  1816. var self=this;
  1817. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1818. $1=_st(self)._hasModification();
  1819. if(smalltalk.assert($1)){
  1820. $2=self;
  1821. return $2;
  1822. };
  1823. _st(self)._contents_(_st(_st(_st(self)._model())._selectedMethod())._source());
  1824. smalltalk.HLWidget.fn.prototype._refresh.apply(_st(self), []);
  1825. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{}, smalltalk.HLBrowserSourceWidget)})},
  1826. messageSends: ["ifTrue:", "hasModification", "contents:", "source", "selectedMethod", "model", "refresh"]}),
  1827. smalltalk.HLBrowserSourceWidget);
  1828. smalltalk.addMethod(
  1829. "_renderContentOn_",
  1830. smalltalk.method({
  1831. selector: "renderContentOn:",
  1832. fn: function (html){
  1833. var self=this;
  1834. return smalltalk.withContext(function($ctx1) { _st(_st(self)._codeWidget())._renderOn_(html);
  1835. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLBrowserSourceWidget)})},
  1836. messageSends: ["renderOn:", "codeWidget"]}),
  1837. smalltalk.HLBrowserSourceWidget);
  1838. smalltalk.addMethod(
  1839. "_on_",
  1840. smalltalk.method({
  1841. selector: "on:",
  1842. fn: function (aBrowserModel){
  1843. var self=this;
  1844. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1845. $2=_st(self)._new();
  1846. _st($2)._model_(aBrowserModel);
  1847. $3=_st($2)._yourself();
  1848. $1=$3;
  1849. return $1;
  1850. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget.klass)})},
  1851. messageSends: ["model:", "new", "yourself"]}),
  1852. smalltalk.HLBrowserSourceWidget.klass);
  1853. smalltalk.addClass('HLClassCache', smalltalk.Object, ['class', 'selectorsCache', 'overrideCache', 'overriddenCache'], 'Helios-Browser');
  1854. smalltalk.addMethod(
  1855. "_invalidateChildrenSelector_",
  1856. smalltalk.method({
  1857. selector: "invalidateChildrenSelector:",
  1858. fn: function (aSelector){
  1859. var self=this;
  1860. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1861. _st(_st(_st(self)._theClass())._subclasses())._do_((function(each){
  1862. return smalltalk.withContext(function($ctx2) { $1=_st(_st(self)._selectorsCache())._cacheFor_(each);
  1863. _st($1)._removeSelector_(aSelector);
  1864. $2=_st($1)._invalidateChildrenSelector_(aSelector);
  1865. return $2;
  1866. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1867. return self}, function($ctx1) {$ctx1.fill(self,"invalidateChildrenSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  1868. messageSends: ["do:", "removeSelector:", "cacheFor:", "selectorsCache", "invalidateChildrenSelector:", "subclasses", "theClass"]}),
  1869. smalltalk.HLClassCache);
  1870. smalltalk.addMethod(
  1871. "_invalidateParentSelector_",
  1872. smalltalk.method({
  1873. selector: "invalidateParentSelector:",
  1874. fn: function (aSelector){
  1875. var self=this;
  1876. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1877. $1=_st(_st(self)._theClass())._superclass();
  1878. if(($receiver = $1) == nil || $receiver == undefined){
  1879. $1;
  1880. } else {
  1881. $2=_st(_st(self)._selectorsCache())._cacheFor_(_st(_st(self)._theClass())._superclass());
  1882. _st($2)._removeSelector_(aSelector);
  1883. $3=_st($2)._invalidateParentSelector_(aSelector);
  1884. $3;
  1885. };
  1886. return self}, function($ctx1) {$ctx1.fill(self,"invalidateParentSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  1887. messageSends: ["ifNotNil:", "removeSelector:", "cacheFor:", "superclass", "theClass", "selectorsCache", "invalidateParentSelector:"]}),
  1888. smalltalk.HLClassCache);
  1889. smalltalk.addMethod(
  1890. "_invalidateSelector_",
  1891. smalltalk.method({
  1892. selector: "invalidateSelector:",
  1893. fn: function (aSelector){
  1894. var self=this;
  1895. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1896. $1=self;
  1897. _st($1)._invalidateParentSelector_(aSelector);
  1898. _st($1)._invalidateChildrenSelector_(aSelector);
  1899. $2=_st($1)._removeSelector_(aSelector);
  1900. return self}, function($ctx1) {$ctx1.fill(self,"invalidateSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  1901. messageSends: ["invalidateParentSelector:", "invalidateChildrenSelector:", "removeSelector:"]}),
  1902. smalltalk.HLClassCache);
  1903. smalltalk.addMethod(
  1904. "_isOverridden_",
  1905. smalltalk.method({
  1906. selector: "isOverridden:",
  1907. fn: function (aMethod){
  1908. var self=this;
  1909. return smalltalk.withContext(function($ctx1) { var $1;
  1910. $1=_st(_st(self)._overriddenCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  1911. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverridden();
  1912. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1913. return $1;
  1914. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  1915. messageSends: ["at:ifAbsentPut:", "selector", "isOverridden", "overriddenCache"]}),
  1916. smalltalk.HLClassCache);
  1917. smalltalk.addMethod(
  1918. "_isOverride_",
  1919. smalltalk.method({
  1920. selector: "isOverride:",
  1921. fn: function (aMethod){
  1922. var self=this;
  1923. return smalltalk.withContext(function($ctx1) { var $1;
  1924. $1=_st(_st(self)._overrideCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  1925. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverride();
  1926. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1927. return $1;
  1928. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  1929. messageSends: ["at:ifAbsentPut:", "selector", "isOverride", "overrideCache"]}),
  1930. smalltalk.HLClassCache);
  1931. smalltalk.addMethod(
  1932. "_overriddenCache",
  1933. smalltalk.method({
  1934. selector: "overriddenCache",
  1935. fn: function (){
  1936. var self=this;
  1937. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1938. $2=self["@overriddenCache"];
  1939. if(($receiver = $2) == nil || $receiver == undefined){
  1940. self["@overriddenCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  1941. $1=self["@overriddenCache"];
  1942. } else {
  1943. $1=$2;
  1944. };
  1945. return $1;
  1946. }, function($ctx1) {$ctx1.fill(self,"overriddenCache",{}, smalltalk.HLClassCache)})},
  1947. messageSends: ["ifNil:", "new"]}),
  1948. smalltalk.HLClassCache);
  1949. smalltalk.addMethod(
  1950. "_overrideCache",
  1951. smalltalk.method({
  1952. selector: "overrideCache",
  1953. fn: function (){
  1954. var self=this;
  1955. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1956. $2=self["@overrideCache"];
  1957. if(($receiver = $2) == nil || $receiver == undefined){
  1958. self["@overrideCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  1959. $1=self["@overrideCache"];
  1960. } else {
  1961. $1=$2;
  1962. };
  1963. return $1;
  1964. }, function($ctx1) {$ctx1.fill(self,"overrideCache",{}, smalltalk.HLClassCache)})},
  1965. messageSends: ["ifNil:", "new"]}),
  1966. smalltalk.HLClassCache);
  1967. smalltalk.addMethod(
  1968. "_removeSelector_",
  1969. smalltalk.method({
  1970. selector: "removeSelector:",
  1971. fn: function (aSelector){
  1972. var self=this;
  1973. return smalltalk.withContext(function($ctx1) { _st(_st(self)._overriddenCache())._removeKey_ifAbsent_(aSelector,(function(){
  1974. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1975. _st(_st(self)._overrideCache())._removeKey_ifAbsent_(aSelector,(function(){
  1976. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1977. return self}, function($ctx1) {$ctx1.fill(self,"removeSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  1978. messageSends: ["removeKey:ifAbsent:", "overriddenCache", "overrideCache"]}),
  1979. smalltalk.HLClassCache);
  1980. smalltalk.addMethod(
  1981. "_selectorsCache",
  1982. smalltalk.method({
  1983. selector: "selectorsCache",
  1984. fn: function (){
  1985. var self=this;
  1986. return smalltalk.withContext(function($ctx1) { var $1;
  1987. $1=self["@selectorsCache"];
  1988. return $1;
  1989. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLClassCache)})},
  1990. messageSends: []}),
  1991. smalltalk.HLClassCache);
  1992. smalltalk.addMethod(
  1993. "_selectorsCache_",
  1994. smalltalk.method({
  1995. selector: "selectorsCache:",
  1996. fn: function (aCache){
  1997. var self=this;
  1998. return smalltalk.withContext(function($ctx1) { self["@selectorsCache"]=aCache;
  1999. return self}, function($ctx1) {$ctx1.fill(self,"selectorsCache:",{aCache:aCache}, smalltalk.HLClassCache)})},
  2000. messageSends: []}),
  2001. smalltalk.HLClassCache);
  2002. smalltalk.addMethod(
  2003. "_theClass",
  2004. smalltalk.method({
  2005. selector: "theClass",
  2006. fn: function (){
  2007. var self=this;
  2008. return smalltalk.withContext(function($ctx1) { var $1;
  2009. $1=self["@class"];
  2010. return $1;
  2011. }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.HLClassCache)})},
  2012. messageSends: []}),
  2013. smalltalk.HLClassCache);
  2014. smalltalk.addMethod(
  2015. "_theClass_",
  2016. smalltalk.method({
  2017. selector: "theClass:",
  2018. fn: function (aClass){
  2019. var self=this;
  2020. return smalltalk.withContext(function($ctx1) { self["@class"]=aClass;
  2021. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.HLClassCache)})},
  2022. messageSends: []}),
  2023. smalltalk.HLClassCache);
  2024. smalltalk.addMethod(
  2025. "_on_selectorsCache_",
  2026. smalltalk.method({
  2027. selector: "on:selectorsCache:",
  2028. fn: function (aClass,aSelectorsCache){
  2029. var self=this;
  2030. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2031. $2=_st(self)._new();
  2032. _st($2)._theClass_(aClass);
  2033. _st($2)._selectorsCache_(aSelectorsCache);
  2034. $3=_st($2)._yourself();
  2035. $1=$3;
  2036. return $1;
  2037. }, function($ctx1) {$ctx1.fill(self,"on:selectorsCache:",{aClass:aClass,aSelectorsCache:aSelectorsCache}, smalltalk.HLClassCache.klass)})},
  2038. messageSends: ["theClass:", "new", "selectorsCache:", "yourself"]}),
  2039. smalltalk.HLClassCache.klass);
  2040. smalltalk.addClass('HLSelectorsCache', smalltalk.Object, ['classesCache'], 'Helios-Browser');
  2041. smalltalk.addMethod(
  2042. "_cacheFor_",
  2043. smalltalk.method({
  2044. selector: "cacheFor:",
  2045. fn: function (aClass){
  2046. var self=this;
  2047. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2048. $1=aClass;
  2049. if(($receiver = $1) == nil || $receiver == undefined){
  2050. return nil;
  2051. } else {
  2052. $1;
  2053. };
  2054. $2=_st(_st(self)._classesCache())._at_ifAbsentPut_(_st(aClass)._name(),(function(){
  2055. return smalltalk.withContext(function($ctx2) { return _st(self)._newCacheFor_(aClass);
  2056. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2057. return $2;
  2058. }, function($ctx1) {$ctx1.fill(self,"cacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2059. messageSends: ["ifNil:", "at:ifAbsentPut:", "name", "newCacheFor:", "classesCache"]}),
  2060. smalltalk.HLSelectorsCache);
  2061. smalltalk.addMethod(
  2062. "_classesCache",
  2063. smalltalk.method({
  2064. selector: "classesCache",
  2065. fn: function (){
  2066. var self=this;
  2067. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2068. $2=self["@classesCache"];
  2069. if(($receiver = $2) == nil || $receiver == undefined){
  2070. self["@classesCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2071. $1=self["@classesCache"];
  2072. } else {
  2073. $1=$2;
  2074. };
  2075. return $1;
  2076. }, function($ctx1) {$ctx1.fill(self,"classesCache",{}, smalltalk.HLSelectorsCache)})},
  2077. messageSends: ["ifNil:", "new"]}),
  2078. smalltalk.HLSelectorsCache);
  2079. smalltalk.addMethod(
  2080. "_initialize",
  2081. smalltalk.method({
  2082. selector: "initialize",
  2083. fn: function (){
  2084. var self=this;
  2085. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  2086. _st(self)._observeSystem();
  2087. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLSelectorsCache)})},
  2088. messageSends: ["initialize", "observeSystem"]}),
  2089. smalltalk.HLSelectorsCache);
  2090. smalltalk.addMethod(
  2091. "_invalidateCacheFor_",
  2092. smalltalk.method({
  2093. selector: "invalidateCacheFor:",
  2094. fn: function (aMethod){
  2095. var self=this;
  2096. return smalltalk.withContext(function($ctx1) { _st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._invalidateSelector_(_st(aMethod)._selector());
  2097. return self}, function($ctx1) {$ctx1.fill(self,"invalidateCacheFor:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2098. messageSends: ["invalidateSelector:", "selector", "cacheFor:", "methodClass"]}),
  2099. smalltalk.HLSelectorsCache);
  2100. smalltalk.addMethod(
  2101. "_isOverridden_",
  2102. smalltalk.method({
  2103. selector: "isOverridden:",
  2104. fn: function (aMethod){
  2105. var self=this;
  2106. return smalltalk.withContext(function($ctx1) { var $1;
  2107. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverridden_(aMethod);
  2108. return $1;
  2109. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2110. messageSends: ["isOverridden:", "cacheFor:", "methodClass"]}),
  2111. smalltalk.HLSelectorsCache);
  2112. smalltalk.addMethod(
  2113. "_isOverride_",
  2114. smalltalk.method({
  2115. selector: "isOverride:",
  2116. fn: function (aMethod){
  2117. var self=this;
  2118. return smalltalk.withContext(function($ctx1) { var $1;
  2119. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverride_(aMethod);
  2120. return $1;
  2121. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2122. messageSends: ["isOverride:", "cacheFor:", "methodClass"]}),
  2123. smalltalk.HLSelectorsCache);
  2124. smalltalk.addMethod(
  2125. "_newCacheFor_",
  2126. smalltalk.method({
  2127. selector: "newCacheFor:",
  2128. fn: function (aClass){
  2129. var self=this;
  2130. return smalltalk.withContext(function($ctx1) { var $1;
  2131. $1=_st((smalltalk.HLClassCache || HLClassCache))._on_selectorsCache_(aClass,self);
  2132. return $1;
  2133. }, function($ctx1) {$ctx1.fill(self,"newCacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2134. messageSends: ["on:selectorsCache:"]}),
  2135. smalltalk.HLSelectorsCache);
  2136. smalltalk.addMethod(
  2137. "_observeSystem",
  2138. smalltalk.method({
  2139. selector: "observeSystem",
  2140. fn: function (){
  2141. var self=this;
  2142. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2143. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  2144. _st($1)._on_do_((smalltalk.MethodAdded || MethodAdded),(function(ann){
  2145. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodAdded_(_st(ann)._method());
  2146. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2147. $2=_st($1)._on_do_((smalltalk.MethodRemoved || MethodRemoved),(function(ann){
  2148. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodRemoved_(_st(ann)._method());
  2149. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2150. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLSelectorsCache)})},
  2151. messageSends: ["on:do:", "onMethodAdded:", "method", "current", "onMethodRemoved:"]}),
  2152. smalltalk.HLSelectorsCache);
  2153. smalltalk.addMethod(
  2154. "_onMethodAdded_",
  2155. smalltalk.method({
  2156. selector: "onMethodAdded:",
  2157. fn: function (aMethod){
  2158. var self=this;
  2159. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2160. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2161. messageSends: ["invalidateCacheFor:"]}),
  2162. smalltalk.HLSelectorsCache);
  2163. smalltalk.addMethod(
  2164. "_onMethodRemoved_",
  2165. smalltalk.method({
  2166. selector: "onMethodRemoved:",
  2167. fn: function (aMethod){
  2168. var self=this;
  2169. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2170. return self}, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2171. messageSends: ["invalidateCacheFor:"]}),
  2172. smalltalk.HLSelectorsCache);
  2173. smalltalk.HLSelectorsCache.klass.iVarNames = ['current'];
  2174. smalltalk.addMethod(
  2175. "_current",
  2176. smalltalk.method({
  2177. selector: "current",
  2178. fn: function (){
  2179. var self=this;
  2180. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2181. $2=self["@current"];
  2182. if(($receiver = $2) == nil || $receiver == undefined){
  2183. self["@current"]=smalltalk.Object.klass.fn.prototype._new.apply(_st(self), []);
  2184. $1=self["@current"];
  2185. } else {
  2186. $1=$2;
  2187. };
  2188. return $1;
  2189. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.HLSelectorsCache.klass)})},
  2190. messageSends: ["ifNil:", "new"]}),
  2191. smalltalk.HLSelectorsCache.klass);
  2192. smalltalk.addMethod(
  2193. "_flush",
  2194. smalltalk.method({
  2195. selector: "flush",
  2196. fn: function (){
  2197. var self=this;
  2198. return smalltalk.withContext(function($ctx1) { self["@current"]=nil;
  2199. return self}, function($ctx1) {$ctx1.fill(self,"flush",{}, smalltalk.HLSelectorsCache.klass)})},
  2200. messageSends: []}),
  2201. smalltalk.HLSelectorsCache.klass);
  2202. smalltalk.addMethod(
  2203. "_new",
  2204. smalltalk.method({
  2205. selector: "new",
  2206. fn: function (){
  2207. var self=this;
  2208. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  2209. return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.HLSelectorsCache.klass)})},
  2210. messageSends: ["shouldNotImplement"]}),
  2211. smalltalk.HLSelectorsCache.klass);
  2212. smalltalk.addMethod(
  2213. "_isOverridden",
  2214. smalltalk.method({
  2215. selector: "isOverridden",
  2216. fn: function (){
  2217. var self=this;
  2218. var selector;
  2219. return smalltalk.withContext(function($ctx1) { var $1;
  2220. var $early={};
  2221. try {
  2222. selector=_st(self)._selector();
  2223. _st(_st(self)._methodClass())._allSubclassesDo_((function(each){
  2224. return smalltalk.withContext(function($ctx2) { $1=_st(each)._includesSelector_(selector);
  2225. if(smalltalk.assert($1)){
  2226. throw $early=[true];
  2227. };
  2228. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2229. return false;
  2230. }
  2231. catch(e) {if(e===$early)return e[0]; throw e}
  2232. }, function($ctx1) {$ctx1.fill(self,"isOverridden",{selector:selector}, smalltalk.CompiledMethod)})},
  2233. messageSends: ["selector", "allSubclassesDo:", "ifTrue:", "includesSelector:", "methodClass"]}),
  2234. smalltalk.CompiledMethod);
  2235. smalltalk.addMethod(
  2236. "_isOverride",
  2237. smalltalk.method({
  2238. selector: "isOverride",
  2239. fn: function (){
  2240. var self=this;
  2241. var superclass;
  2242. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2243. superclass=_st(_st(self)._methodClass())._superclass();
  2244. $1=superclass;
  2245. if(($receiver = $1) == nil || $receiver == undefined){
  2246. return false;
  2247. } else {
  2248. $1;
  2249. };
  2250. $2=_st(_st(_st(_st(self)._methodClass())._superclass())._lookupSelector_(_st(self)._selector()))._notNil();
  2251. return $2;
  2252. }, function($ctx1) {$ctx1.fill(self,"isOverride",{superclass:superclass}, smalltalk.CompiledMethod)})},
  2253. messageSends: ["superclass", "methodClass", "ifNil:", "notNil", "lookupSelector:", "selector"]}),
  2254. smalltalk.CompiledMethod);