Helios-Browser.deploy.js 110 KB

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