Helios-Browser.deploy.js 108 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903
  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. "_compilationProtocol",
  1457. smalltalk.method({
  1458. selector: "compilationProtocol",
  1459. fn: function (){
  1460. var self=this;
  1461. var currentProtocol;
  1462. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$3;
  1463. currentProtocol=_st(self)._selectedProtocol();
  1464. $1=currentProtocol;
  1465. if(($receiver = $1) == nil || $receiver == undefined){
  1466. currentProtocol=_st(self)._unclassifiedProtocol();
  1467. currentProtocol;
  1468. } else {
  1469. $1;
  1470. };
  1471. $2=_st(self)._selectedMethod();
  1472. if(($receiver = $2) == nil || $receiver == undefined){
  1473. $2;
  1474. } else {
  1475. currentProtocol=_st(_st(self)._selectedMethod())._protocol();
  1476. currentProtocol;
  1477. };
  1478. $4=_st(currentProtocol).__eq(_st(self)._allProtocol());
  1479. if(smalltalk.assert($4)){
  1480. $3=_st(self)._unclassifiedProtocol();
  1481. } else {
  1482. $3=currentProtocol;
  1483. };
  1484. return $3;
  1485. }, function($ctx1) {$ctx1.fill(self,"compilationProtocol",{currentProtocol:currentProtocol},smalltalk.HLBrowserModel)})},
  1486. messageSends: ["selectedProtocol", "ifNil:", "unclassifiedProtocol", "ifNotNil:", "protocol", "selectedMethod", "ifTrue:ifFalse:", "=", "allProtocol"]}),
  1487. smalltalk.HLBrowserModel);
  1488. smalltalk.addMethod(
  1489. "_compileClassComment_",
  1490. smalltalk.method({
  1491. selector: "compileClassComment:",
  1492. fn: function (aString){
  1493. var self=this;
  1494. return smalltalk.withContext(function($ctx1) { _st(_st(self)._environment())._compileClassComment_for_(aString,_st(self)._selectedClass());
  1495. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1496. messageSends: ["compileClassComment:for:", "selectedClass", "environment"]}),
  1497. smalltalk.HLBrowserModel);
  1498. smalltalk.addMethod(
  1499. "_compileClassDefinition_",
  1500. smalltalk.method({
  1501. selector: "compileClassDefinition:",
  1502. fn: function (aString){
  1503. var self=this;
  1504. return smalltalk.withContext(function($ctx1) { _st(_st(self)._environment())._compileClassDefinition_(aString);
  1505. return self}, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1506. messageSends: ["compileClassDefinition:", "environment"]}),
  1507. smalltalk.HLBrowserModel);
  1508. smalltalk.addMethod(
  1509. "_compileMethod_",
  1510. smalltalk.method({
  1511. selector: "compileMethod:",
  1512. fn: function (aString){
  1513. var self=this;
  1514. return smalltalk.withContext(function($ctx1) { _st(self)._withCompileErrorHandling_((function(){
  1515. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._environment())._compileMethod_for_protocol_(aString,_st(self)._selectedClass(),_st(self)._compilationProtocol());
  1516. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1517. return self}, function($ctx1) {$ctx1.fill(self,"compileMethod:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1518. messageSends: ["withCompileErrorHandling:", "compileMethod:for:protocol:", "selectedClass", "compilationProtocol", "environment"]}),
  1519. smalltalk.HLBrowserModel);
  1520. smalltalk.addMethod(
  1521. "_environment",
  1522. smalltalk.method({
  1523. selector: "environment",
  1524. fn: function (){
  1525. var self=this;
  1526. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1527. $2=self["@environment"];
  1528. if(($receiver = $2) == nil || $receiver == undefined){
  1529. $1=_st(_st((smalltalk.HLManager || HLManager))._current())._environment();
  1530. } else {
  1531. $1=$2;
  1532. };
  1533. return $1;
  1534. }, function($ctx1) {$ctx1.fill(self,"environment",{}, smalltalk.HLBrowserModel)})},
  1535. messageSends: ["ifNil:", "environment", "current"]}),
  1536. smalltalk.HLBrowserModel);
  1537. smalltalk.addMethod(
  1538. "_environment_",
  1539. smalltalk.method({
  1540. selector: "environment:",
  1541. fn: function (anEnvironment){
  1542. var self=this;
  1543. return smalltalk.withContext(function($ctx1) { self["@environment"]=anEnvironment;
  1544. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel)})},
  1545. messageSends: []}),
  1546. smalltalk.HLBrowserModel);
  1547. smalltalk.addMethod(
  1548. "_focusOnClasses",
  1549. smalltalk.method({
  1550. selector: "focusOnClasses",
  1551. fn: function (){
  1552. var self=this;
  1553. return smalltalk.withContext(function($ctx1) { _st(_st(self)._announcer())._announce_(_st((smalltalk.HLClassesFocusRequested || HLClassesFocusRequested))._new());
  1554. return self}, function($ctx1) {$ctx1.fill(self,"focusOnClasses",{}, smalltalk.HLBrowserModel)})},
  1555. messageSends: ["announce:", "new", "announcer"]}),
  1556. smalltalk.HLBrowserModel);
  1557. smalltalk.addMethod(
  1558. "_focusOnMethods",
  1559. smalltalk.method({
  1560. selector: "focusOnMethods",
  1561. fn: function (){
  1562. var self=this;
  1563. return smalltalk.withContext(function($ctx1) { _st(_st(self)._announcer())._announce_(_st((smalltalk.HLMethodsFocusRequested || HLMethodsFocusRequested))._new());
  1564. return self}, function($ctx1) {$ctx1.fill(self,"focusOnMethods",{}, smalltalk.HLBrowserModel)})},
  1565. messageSends: ["announce:", "new", "announcer"]}),
  1566. smalltalk.HLBrowserModel);
  1567. smalltalk.addMethod(
  1568. "_focusOnPackages",
  1569. smalltalk.method({
  1570. selector: "focusOnPackages",
  1571. fn: function (){
  1572. var self=this;
  1573. return smalltalk.withContext(function($ctx1) { _st(_st(self)._announcer())._announce_(_st((smalltalk.HLPackagesFocusRequested || HLPackagesFocusRequested))._new());
  1574. return self}, function($ctx1) {$ctx1.fill(self,"focusOnPackages",{}, smalltalk.HLBrowserModel)})},
  1575. messageSends: ["announce:", "new", "announcer"]}),
  1576. smalltalk.HLBrowserModel);
  1577. smalltalk.addMethod(
  1578. "_focusOnProtocols",
  1579. smalltalk.method({
  1580. selector: "focusOnProtocols",
  1581. fn: function (){
  1582. var self=this;
  1583. return smalltalk.withContext(function($ctx1) { _st(_st(self)._announcer())._announce_(_st((smalltalk.HLProtocolsFocusRequested || HLProtocolsFocusRequested))._new());
  1584. return self}, function($ctx1) {$ctx1.fill(self,"focusOnProtocols",{}, smalltalk.HLBrowserModel)})},
  1585. messageSends: ["announce:", "new", "announcer"]}),
  1586. smalltalk.HLBrowserModel);
  1587. smalltalk.addMethod(
  1588. "_focusOnSourceCode",
  1589. smalltalk.method({
  1590. selector: "focusOnSourceCode",
  1591. fn: function (){
  1592. var self=this;
  1593. return smalltalk.withContext(function($ctx1) { _st(_st(self)._announcer())._announce_(_st((smalltalk.HLSourceCodeFocusRequested || HLSourceCodeFocusRequested))._new());
  1594. return self}, function($ctx1) {$ctx1.fill(self,"focusOnSourceCode",{}, smalltalk.HLBrowserModel)})},
  1595. messageSends: ["announce:", "new", "announcer"]}),
  1596. smalltalk.HLBrowserModel);
  1597. smalltalk.addMethod(
  1598. "_handleCompileError_",
  1599. smalltalk.method({
  1600. selector: "handleCompileError:",
  1601. fn: function (anError){
  1602. var self=this;
  1603. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1604. $1=_st((smalltalk.HLCompileErrorRaised || HLCompileErrorRaised))._new();
  1605. _st($1)._error_(anError);
  1606. $2=_st($1)._yourself();
  1607. _st(_st(self)._announcer())._announce_($2);
  1608. return self}, function($ctx1) {$ctx1.fill(self,"handleCompileError:",{anError:anError}, smalltalk.HLBrowserModel)})},
  1609. messageSends: ["announce:", "error:", "new", "yourself", "announcer"]}),
  1610. smalltalk.HLBrowserModel);
  1611. smalltalk.addMethod(
  1612. "_handleParseError_",
  1613. smalltalk.method({
  1614. selector: "handleParseError:",
  1615. fn: function (anError){
  1616. var self=this;
  1617. var split,line,column,messageToInsert;
  1618. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1619. split=_st(_st(anError)._messageText())._tokenize_(" : ");
  1620. messageToInsert=_st(split)._second();
  1621. split=_st(_st(split)._first())._copyFrom_to_((21),_st(_st(split)._first())._size());
  1622. split=_st(split)._tokenize_(" column ");
  1623. line=_st(split)._first();
  1624. column=_st(split)._second();
  1625. $1=_st((smalltalk.HLParseErrorRaised || HLParseErrorRaised))._new();
  1626. _st($1)._line_(_st(line)._asNumber());
  1627. _st($1)._column_(_st(column)._asNumber());
  1628. _st($1)._message_(messageToInsert);
  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,"handleParseError:",{anError:anError,split:split,line:line,column:column,messageToInsert:messageToInsert}, smalltalk.HLBrowserModel)})},
  1633. messageSends: ["tokenize:", "messageText", "second", "copyFrom:to:", "size", "first", "announce:", "line:", "asNumber", "new", "column:", "message:", "error:", "yourself", "announcer"]}),
  1634. smalltalk.HLBrowserModel);
  1635. smalltalk.addMethod(
  1636. "_handleUnkownVariableError_",
  1637. smalltalk.method({
  1638. selector: "handleUnkownVariableError:",
  1639. fn: function (anError){
  1640. var self=this;
  1641. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1642. $1=_st((smalltalk.HLUnknownVariableErrorRaised || HLUnknownVariableErrorRaised))._new();
  1643. _st($1)._error_(anError);
  1644. $2=_st($1)._yourself();
  1645. _st(_st(self)._announcer())._announce_($2);
  1646. return self}, function($ctx1) {$ctx1.fill(self,"handleUnkownVariableError:",{anError:anError}, smalltalk.HLBrowserModel)})},
  1647. messageSends: ["announce:", "error:", "new", "yourself", "announcer"]}),
  1648. smalltalk.HLBrowserModel);
  1649. smalltalk.addMethod(
  1650. "_moveMethodToClass_",
  1651. smalltalk.method({
  1652. selector: "moveMethodToClass:",
  1653. fn: function (aClassName){
  1654. var self=this;
  1655. return smalltalk.withContext(function($ctx1) { _st(_st(self)._environment())._moveMethod_toClass_(_st(self)._selectedMethod(),aClassName);
  1656. return self}, function($ctx1) {$ctx1.fill(self,"moveMethodToClass:",{aClassName:aClassName},smalltalk.HLBrowserModel)})},
  1657. messageSends: ["moveMethod:toClass:", "selectedMethod", "environment"]}),
  1658. smalltalk.HLBrowserModel);
  1659. smalltalk.addMethod(
  1660. "_moveMethodToClass_ifAbsent_",
  1661. smalltalk.method({
  1662. selector: "moveMethodToClass:ifAbsent:",
  1663. fn: function (aClassName,aBlock){
  1664. var self=this;
  1665. return smalltalk.withContext(function($ctx1) { _st(_st(self)._environment())._moveMethod_toClass_ifAbsent_(_st(self)._selectedMethod(),aClassName,aBlock);
  1666. return self}, function($ctx1) {$ctx1.fill(self,"moveMethodToClass:ifAbsent:",{aClassName:aClassName,aBlock:aBlock},smalltalk.HLBrowserModel)})},
  1667. messageSends: ["moveMethod:toClass:ifAbsent:", "selectedMethod", "environment"]}),
  1668. smalltalk.HLBrowserModel);
  1669. smalltalk.addMethod(
  1670. "_packages",
  1671. smalltalk.method({
  1672. selector: "packages",
  1673. fn: function (){
  1674. var self=this;
  1675. return smalltalk.withContext(function($ctx1) { var $1;
  1676. $1=_st(_st(self)._environment())._packages();
  1677. return $1;
  1678. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLBrowserModel)})},
  1679. messageSends: ["packages", "environment"]}),
  1680. smalltalk.HLBrowserModel);
  1681. smalltalk.addMethod(
  1682. "_save_",
  1683. smalltalk.method({
  1684. selector: "save:",
  1685. fn: function (aString){
  1686. var self=this;
  1687. return smalltalk.withContext(function($ctx1) { var $1;
  1688. $1=_st(self)._shouldCompileClassDefinition_(aString);
  1689. if(smalltalk.assert($1)){
  1690. _st(self)._compileClassDefinition_(aString);
  1691. } else {
  1692. _st(self)._compileMethod_(aString);
  1693. };
  1694. return self}, function($ctx1) {$ctx1.fill(self,"save:",{aString:aString},smalltalk.HLBrowserModel)})},
  1695. messageSends: ["ifTrue:ifFalse:", "compileClassDefinition:", "compileMethod:", "shouldCompileClassDefinition:"]}),
  1696. smalltalk.HLBrowserModel);
  1697. smalltalk.addMethod(
  1698. "_saveSourceCode",
  1699. smalltalk.method({
  1700. selector: "saveSourceCode",
  1701. fn: function (){
  1702. var self=this;
  1703. return smalltalk.withContext(function($ctx1) { _st(_st(self)._announcer())._announce_(_st((smalltalk.HLSaveSourceCode || HLSaveSourceCode))._new());
  1704. return self}, function($ctx1) {$ctx1.fill(self,"saveSourceCode",{}, smalltalk.HLBrowserModel)})},
  1705. messageSends: ["announce:", "new", "announcer"]}),
  1706. smalltalk.HLBrowserModel);
  1707. smalltalk.addMethod(
  1708. "_selectedClass",
  1709. smalltalk.method({
  1710. selector: "selectedClass",
  1711. fn: function (){
  1712. var self=this;
  1713. return smalltalk.withContext(function($ctx1) { var $1;
  1714. $1=self["@selectedClass"];
  1715. return $1;
  1716. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{}, smalltalk.HLBrowserModel)})},
  1717. messageSends: []}),
  1718. smalltalk.HLBrowserModel);
  1719. smalltalk.addMethod(
  1720. "_selectedClass_",
  1721. smalltalk.method({
  1722. selector: "selectedClass:",
  1723. fn: function (aClass){
  1724. var self=this;
  1725. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  1726. $1=_st(self["@selectedClass"]).__eq(aClass);
  1727. if(smalltalk.assert($1)){
  1728. $2=aClass;
  1729. if(($receiver = $2) == nil || $receiver == undefined){
  1730. $3=self;
  1731. return $3;
  1732. } else {
  1733. $2;
  1734. };
  1735. _st(self)._selectedProtocol_(nil);
  1736. };
  1737. $4=aClass;
  1738. if(($receiver = $4) == nil || $receiver == undefined){
  1739. self["@selectedClass"]=nil;
  1740. self["@selectedClass"];
  1741. } else {
  1742. $5=_st(self)._showInstance();
  1743. if(smalltalk.assert($5)){
  1744. self["@selectedClass"]=_st(aClass)._theNonMetaClass();
  1745. self["@selectedClass"];
  1746. } else {
  1747. self["@selectedClass"]=_st(aClass)._theMetaClass();
  1748. self["@selectedClass"];
  1749. };
  1750. };
  1751. _st(self)._selectedProtocol_(nil);
  1752. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLClassSelected || HLClassSelected))._on_(_st(self)._selectedClass()));
  1753. return self}, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass}, smalltalk.HLBrowserModel)})},
  1754. messageSends: ["ifTrue:", "ifNil:", "selectedProtocol:", "=", "ifNil:ifNotNil:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "showInstance", "announce:", "on:", "selectedClass", "announcer"]}),
  1755. smalltalk.HLBrowserModel);
  1756. smalltalk.addMethod(
  1757. "_selectedMethod",
  1758. smalltalk.method({
  1759. selector: "selectedMethod",
  1760. fn: function (){
  1761. var self=this;
  1762. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1763. $2=_st(self)._selectedClass();
  1764. if(($receiver = $2) == nil || $receiver == undefined){
  1765. $1=$2;
  1766. } else {
  1767. $1=_st(_st(_st(self)._selectedClass())._methodDictionary())._at_ifAbsent_(self["@selectedSelector"],(function(){
  1768. return smalltalk.withContext(function($ctx2) { return nil;
  1769. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1770. };
  1771. return $1;
  1772. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{},smalltalk.HLBrowserModel)})},
  1773. messageSends: ["ifNotNil:", "at:ifAbsent:", "methodDictionary", "selectedClass"]}),
  1774. smalltalk.HLBrowserModel);
  1775. smalltalk.addMethod(
  1776. "_selectedMethod_",
  1777. smalltalk.method({
  1778. selector: "selectedMethod:",
  1779. fn: function (aCompiledMethod){
  1780. var self=this;
  1781. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  1782. $1=_st(self["@selectedSelector"]).__eq(aCompiledMethod);
  1783. if(smalltalk.assert($1)){
  1784. $2=self;
  1785. return $2;
  1786. };
  1787. $3=aCompiledMethod;
  1788. if(($receiver = $3) == nil || $receiver == undefined){
  1789. self["@selectedSelector"]=nil;
  1790. self["@selectedSelector"];
  1791. } else {
  1792. $4=_st(self["@selectedSelector"]).__eq(_st(aCompiledMethod)._selector());
  1793. if(smalltalk.assert($4)){
  1794. $5=self;
  1795. return $5;
  1796. };
  1797. self["@selectedSelector"]=_st(aCompiledMethod)._selector();
  1798. self["@selectedSelector"];
  1799. };
  1800. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLMethodSelected || HLMethodSelected))._on_(aCompiledMethod));
  1801. return self}, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserModel)})},
  1802. messageSends: ["ifTrue:", "=", "ifNil:ifNotNil:", "selector", "announce:", "on:", "announcer"]}),
  1803. smalltalk.HLBrowserModel);
  1804. smalltalk.addMethod(
  1805. "_selectedPackage",
  1806. smalltalk.method({
  1807. selector: "selectedPackage",
  1808. fn: function (){
  1809. var self=this;
  1810. return smalltalk.withContext(function($ctx1) { var $1;
  1811. $1=self["@selectedPackage"];
  1812. return $1;
  1813. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{}, smalltalk.HLBrowserModel)})},
  1814. messageSends: []}),
  1815. smalltalk.HLBrowserModel);
  1816. smalltalk.addMethod(
  1817. "_selectedPackage_",
  1818. smalltalk.method({
  1819. selector: "selectedPackage:",
  1820. fn: function (aPackage){
  1821. var self=this;
  1822. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1823. $1=_st(self["@selectedPackage"]).__eq(aPackage);
  1824. if(smalltalk.assert($1)){
  1825. $2=self;
  1826. return $2;
  1827. };
  1828. self["@selectedPackage"]=aPackage;
  1829. _st(self)._selectedClass_(nil);
  1830. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLPackageSelected || HLPackageSelected))._on_(aPackage));
  1831. return self}, function($ctx1) {$ctx1.fill(self,"selectedPackage:",{aPackage:aPackage}, smalltalk.HLBrowserModel)})},
  1832. messageSends: ["ifTrue:", "=", "selectedClass:", "announce:", "on:", "announcer"]}),
  1833. smalltalk.HLBrowserModel);
  1834. smalltalk.addMethod(
  1835. "_selectedProtocol",
  1836. smalltalk.method({
  1837. selector: "selectedProtocol",
  1838. fn: function (){
  1839. var self=this;
  1840. return smalltalk.withContext(function($ctx1) { var $1;
  1841. $1=self["@selectedProtocol"];
  1842. return $1;
  1843. }, function($ctx1) {$ctx1.fill(self,"selectedProtocol",{}, smalltalk.HLBrowserModel)})},
  1844. messageSends: []}),
  1845. smalltalk.HLBrowserModel);
  1846. smalltalk.addMethod(
  1847. "_selectedProtocol_",
  1848. smalltalk.method({
  1849. selector: "selectedProtocol:",
  1850. fn: function (aString){
  1851. var self=this;
  1852. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1853. $1=_st(self["@selectedProtocol"]).__eq(aString);
  1854. if(smalltalk.assert($1)){
  1855. $2=self;
  1856. return $2;
  1857. };
  1858. self["@selectedProtocol"]=aString;
  1859. _st(self)._selectedMethod_(nil);
  1860. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLProtocolSelected || HLProtocolSelected))._on_(aString));
  1861. return self}, function($ctx1) {$ctx1.fill(self,"selectedProtocol:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1862. messageSends: ["ifTrue:", "=", "selectedMethod:", "announce:", "on:", "announcer"]}),
  1863. smalltalk.HLBrowserModel);
  1864. smalltalk.addMethod(
  1865. "_shouldCompileClassDefinition_",
  1866. smalltalk.method({
  1867. selector: "shouldCompileClassDefinition:",
  1868. fn: function (aString){
  1869. var self=this;
  1870. return smalltalk.withContext(function($ctx1) { var $1;
  1871. $1=_st(_st(_st(self)._selectedClass())._isNil())._or_((function(){
  1872. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(aString)._first())._asUppercase()).__eq(_st(aString)._first());
  1873. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1874. return $1;
  1875. }, function($ctx1) {$ctx1.fill(self,"shouldCompileClassDefinition:",{aString:aString},smalltalk.HLBrowserModel)})},
  1876. messageSends: ["or:", "=", "first", "asUppercase", "isNil", "selectedClass"]}),
  1877. smalltalk.HLBrowserModel);
  1878. smalltalk.addMethod(
  1879. "_showComment",
  1880. smalltalk.method({
  1881. selector: "showComment",
  1882. fn: function (){
  1883. var self=this;
  1884. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1885. $2=self["@showComment"];
  1886. if(($receiver = $2) == nil || $receiver == undefined){
  1887. $1=false;
  1888. } else {
  1889. $1=$2;
  1890. };
  1891. return $1;
  1892. }, function($ctx1) {$ctx1.fill(self,"showComment",{}, smalltalk.HLBrowserModel)})},
  1893. messageSends: ["ifNil:"]}),
  1894. smalltalk.HLBrowserModel);
  1895. smalltalk.addMethod(
  1896. "_showComment_",
  1897. smalltalk.method({
  1898. selector: "showComment:",
  1899. fn: function (aBoolean){
  1900. var self=this;
  1901. return smalltalk.withContext(function($ctx1) { self["@showComment"]=aBoolean;
  1902. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowCommentToggled || HLShowCommentToggled))._new());
  1903. return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  1904. messageSends: ["announce:", "new", "announcer"]}),
  1905. smalltalk.HLBrowserModel);
  1906. smalltalk.addMethod(
  1907. "_showInstance",
  1908. smalltalk.method({
  1909. selector: "showInstance",
  1910. fn: function (){
  1911. var self=this;
  1912. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1913. $2=self["@showInstance"];
  1914. if(($receiver = $2) == nil || $receiver == undefined){
  1915. $1=true;
  1916. } else {
  1917. $1=$2;
  1918. };
  1919. return $1;
  1920. }, function($ctx1) {$ctx1.fill(self,"showInstance",{}, smalltalk.HLBrowserModel)})},
  1921. messageSends: ["ifNil:"]}),
  1922. smalltalk.HLBrowserModel);
  1923. smalltalk.addMethod(
  1924. "_showInstance_",
  1925. smalltalk.method({
  1926. selector: "showInstance:",
  1927. fn: function (aBoolean){
  1928. var self=this;
  1929. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$3;
  1930. self["@showInstance"]=aBoolean;
  1931. $1=_st(self)._selectedClass();
  1932. if(($receiver = $1) == nil || $receiver == undefined){
  1933. $1;
  1934. } else {
  1935. $2=self;
  1936. $4=aBoolean;
  1937. if(smalltalk.assert($4)){
  1938. $3=_st(_st(self)._selectedClass())._theNonMetaClass();
  1939. } else {
  1940. $3=_st(_st(self)._selectedClass())._theMetaClass();
  1941. };
  1942. _st($2)._selectedClass_($3);
  1943. };
  1944. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled))._new());
  1945. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  1946. messageSends: ["ifNotNil:", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "selectedClass", "theMetaClass", "announce:", "new", "announcer"]}),
  1947. smalltalk.HLBrowserModel);
  1948. smalltalk.addMethod(
  1949. "_unclassifiedProtocol",
  1950. smalltalk.method({
  1951. selector: "unclassifiedProtocol",
  1952. fn: function (){
  1953. var self=this;
  1954. return smalltalk.withContext(function($ctx1) { return "as yet unclassified";
  1955. }, function($ctx1) {$ctx1.fill(self,"unclassifiedProtocol",{}, smalltalk.HLBrowserModel)})},
  1956. messageSends: []}),
  1957. smalltalk.HLBrowserModel);
  1958. smalltalk.addMethod(
  1959. "_withCompileErrorHandling_",
  1960. smalltalk.method({
  1961. selector: "withCompileErrorHandling:",
  1962. fn: function (aBlock){
  1963. var self=this;
  1964. return smalltalk.withContext(function($ctx1) { _st((function(){
  1965. return smalltalk.withContext(function($ctx2) { return _st((function(){
  1966. return smalltalk.withContext(function($ctx3) { return _st(aBlock)._on_do_((smalltalk.ParseError || ParseError),(function(ex){
  1967. return smalltalk.withContext(function($ctx4) { return _st(self)._handleParseError_(ex);
  1968. }, function($ctx4) {$ctx4.fillBlock({ex:ex},$ctx1)})}));
  1969. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._on_do_((smalltalk.UnknownVariableError || UnknownVariableError),(function(ex){
  1970. return smalltalk.withContext(function($ctx3) { return _st(self)._handleUnkownVariableError_(ex);
  1971. }, function($ctx3) {$ctx3.fillBlock({ex:ex},$ctx1)})}));
  1972. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.CompilerError || CompilerError),(function(ex){
  1973. return smalltalk.withContext(function($ctx2) { return _st(self)._handleCompileError_(ex);
  1974. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  1975. return self}, function($ctx1) {$ctx1.fill(self,"withCompileErrorHandling:",{aBlock:aBlock}, smalltalk.HLBrowserModel)})},
  1976. messageSends: ["on:do:", "handleCompileError:", "handleUnkownVariableError:", "handleParseError:"]}),
  1977. smalltalk.HLBrowserModel);
  1978. smalltalk.addMethod(
  1979. "_on_",
  1980. smalltalk.method({
  1981. selector: "on:",
  1982. fn: function (anEnvironment){
  1983. var self=this;
  1984. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1985. $2=_st(self)._new();
  1986. _st($2)._environment_(anEnvironment);
  1987. $3=_st($2)._yourself();
  1988. $1=$3;
  1989. return $1;
  1990. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel.klass)})},
  1991. messageSends: ["environment:", "new", "yourself"]}),
  1992. smalltalk.HLBrowserModel.klass);
  1993. smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'methodContents', 'codeWidget'], 'Helios-Browser');
  1994. smalltalk.addMethod(
  1995. "_codeWidget",
  1996. smalltalk.method({
  1997. selector: "codeWidget",
  1998. fn: function (){
  1999. var self=this;
  2000. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2001. $2=self["@codeWidget"];
  2002. if(($receiver = $2) == nil || $receiver == undefined){
  2003. self["@codeWidget"]=_st((smalltalk.HLSourceCodeWidget || HLSourceCodeWidget))._on_(_st(self)._model());
  2004. $1=self["@codeWidget"];
  2005. } else {
  2006. $1=$2;
  2007. };
  2008. return $1;
  2009. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{}, smalltalk.HLBrowserSourceWidget)})},
  2010. messageSends: ["ifNil:", "on:", "model"]}),
  2011. smalltalk.HLBrowserSourceWidget);
  2012. smalltalk.addMethod(
  2013. "_contents",
  2014. smalltalk.method({
  2015. selector: "contents",
  2016. fn: function (){
  2017. var self=this;
  2018. return smalltalk.withContext(function($ctx1) { var $1;
  2019. $1=_st(_st(self)._codeWidget())._contents();
  2020. return $1;
  2021. }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.HLBrowserSourceWidget)})},
  2022. messageSends: ["contents", "codeWidget"]}),
  2023. smalltalk.HLBrowserSourceWidget);
  2024. smalltalk.addMethod(
  2025. "_contents_",
  2026. smalltalk.method({
  2027. selector: "contents:",
  2028. fn: function (aString){
  2029. var self=this;
  2030. return smalltalk.withContext(function($ctx1) { _st(self)._methodContents_(aString);
  2031. _st(_st(self)._codeWidget())._contents_(aString);
  2032. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2033. messageSends: ["methodContents:", "contents:", "codeWidget"]}),
  2034. smalltalk.HLBrowserSourceWidget);
  2035. smalltalk.addMethod(
  2036. "_focus",
  2037. smalltalk.method({
  2038. selector: "focus",
  2039. fn: function (){
  2040. var self=this;
  2041. return smalltalk.withContext(function($ctx1) { _st(_st(self)._codeWidget())._focus();
  2042. return self}, function($ctx1) {$ctx1.fill(self,"focus",{}, smalltalk.HLBrowserSourceWidget)})},
  2043. messageSends: ["focus", "codeWidget"]}),
  2044. smalltalk.HLBrowserSourceWidget);
  2045. smalltalk.addMethod(
  2046. "_hasFocus",
  2047. smalltalk.method({
  2048. selector: "hasFocus",
  2049. fn: function (){
  2050. var self=this;
  2051. return smalltalk.withContext(function($ctx1) { var $1;
  2052. $1=_st(_st(self)._codeWidget())._hasFocus();
  2053. return $1;
  2054. }, function($ctx1) {$ctx1.fill(self,"hasFocus",{}, smalltalk.HLBrowserSourceWidget)})},
  2055. messageSends: ["hasFocus", "codeWidget"]}),
  2056. smalltalk.HLBrowserSourceWidget);
  2057. smalltalk.addMethod(
  2058. "_hasModification",
  2059. smalltalk.method({
  2060. selector: "hasModification",
  2061. fn: function (){
  2062. var self=this;
  2063. return smalltalk.withContext(function($ctx1) { var $1;
  2064. $1=_st(_st(_st(self)._methodContents()).__eq(_st(self)._contents()))._not();
  2065. return $1;
  2066. }, function($ctx1) {$ctx1.fill(self,"hasModification",{}, smalltalk.HLBrowserSourceWidget)})},
  2067. messageSends: ["not", "=", "contents", "methodContents"]}),
  2068. smalltalk.HLBrowserSourceWidget);
  2069. smalltalk.addMethod(
  2070. "_initialize",
  2071. smalltalk.method({
  2072. selector: "initialize",
  2073. fn: function (){
  2074. var self=this;
  2075. return smalltalk.withContext(function($ctx1) { smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  2076. _st(self)._observeSystem();
  2077. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLBrowserSourceWidget)})},
  2078. messageSends: ["initialize", "observeSystem"]}),
  2079. smalltalk.HLBrowserSourceWidget);
  2080. smalltalk.addMethod(
  2081. "_methodContents",
  2082. smalltalk.method({
  2083. selector: "methodContents",
  2084. fn: function (){
  2085. var self=this;
  2086. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2087. $2=self["@methodContents"];
  2088. if(($receiver = $2) == nil || $receiver == undefined){
  2089. self["@methodContents"]="";
  2090. $1=self["@methodContents"];
  2091. } else {
  2092. $1=$2;
  2093. };
  2094. return $1;
  2095. }, function($ctx1) {$ctx1.fill(self,"methodContents",{}, smalltalk.HLBrowserSourceWidget)})},
  2096. messageSends: ["ifNil:"]}),
  2097. smalltalk.HLBrowserSourceWidget);
  2098. smalltalk.addMethod(
  2099. "_methodContents_",
  2100. smalltalk.method({
  2101. selector: "methodContents:",
  2102. fn: function (aString){
  2103. var self=this;
  2104. return smalltalk.withContext(function($ctx1) { self["@methodContents"]=aString;
  2105. return self}, function($ctx1) {$ctx1.fill(self,"methodContents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2106. messageSends: []}),
  2107. smalltalk.HLBrowserSourceWidget);
  2108. smalltalk.addMethod(
  2109. "_model",
  2110. smalltalk.method({
  2111. selector: "model",
  2112. fn: function (){
  2113. var self=this;
  2114. return smalltalk.withContext(function($ctx1) { var $1;
  2115. $1=self["@model"];
  2116. return $1;
  2117. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLBrowserSourceWidget)})},
  2118. messageSends: []}),
  2119. smalltalk.HLBrowserSourceWidget);
  2120. smalltalk.addMethod(
  2121. "_model_",
  2122. smalltalk.method({
  2123. selector: "model:",
  2124. fn: function (aBrowserModel){
  2125. var self=this;
  2126. return smalltalk.withContext(function($ctx1) { self["@model"]=aBrowserModel;
  2127. _st(self)._observeModel();
  2128. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget)})},
  2129. messageSends: ["observeModel"]}),
  2130. smalltalk.HLBrowserSourceWidget);
  2131. smalltalk.addMethod(
  2132. "_observeModel",
  2133. smalltalk.method({
  2134. selector: "observeModel",
  2135. fn: function (){
  2136. var self=this;
  2137. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2138. $1=_st(_st(self)._model())._announcer();
  2139. _st($1)._on_do_((smalltalk.HLMethodSelected || HLMethodSelected),(function(ann){
  2140. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodSelected_(_st(ann)._item());
  2141. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2142. _st($1)._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  2143. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  2144. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2145. _st($1)._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  2146. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  2147. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2148. $2=_st($1)._on_do_((smalltalk.HLSourceCodeFocusRequested || HLSourceCodeFocusRequested),(function(ann){
  2149. return smalltalk.withContext(function($ctx2) { return _st(self)._onSourceCodeFocusRequested();
  2150. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2151. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLBrowserSourceWidget)})},
  2152. messageSends: ["on:do:", "onMethodSelected:", "item", "announcer", "model", "onClassSelected:", "onProtocolSelected:", "onSourceCodeFocusRequested"]}),
  2153. smalltalk.HLBrowserSourceWidget);
  2154. smalltalk.addMethod(
  2155. "_observeSystem",
  2156. smalltalk.method({
  2157. selector: "observeSystem",
  2158. fn: function (){
  2159. var self=this;
  2160. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._on_do_((smalltalk.MethodModified || MethodModified),(function(ann){
  2161. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodModified_(_st(ann)._method());
  2162. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2163. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLBrowserSourceWidget)})},
  2164. messageSends: ["on:do:", "onMethodModified:", "method", "current"]}),
  2165. smalltalk.HLBrowserSourceWidget);
  2166. smalltalk.addMethod(
  2167. "_onClassSelected_",
  2168. smalltalk.method({
  2169. selector: "onClassSelected:",
  2170. fn: function (aClass){
  2171. var self=this;
  2172. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2173. $1=aClass;
  2174. if(($receiver = $1) == nil || $receiver == undefined){
  2175. $2=_st(self)._contents_("");
  2176. return $2;
  2177. } else {
  2178. $1;
  2179. };
  2180. _st(self)._contents_(_st(aClass)._definition());
  2181. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLBrowserSourceWidget)})},
  2182. messageSends: ["ifNil:", "contents:", "definition"]}),
  2183. smalltalk.HLBrowserSourceWidget);
  2184. smalltalk.addMethod(
  2185. "_onMethodModified_",
  2186. smalltalk.method({
  2187. selector: "onMethodModified:",
  2188. fn: function (aMethod){
  2189. var self=this;
  2190. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6;
  2191. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(aMethod)._methodClass());
  2192. if(! smalltalk.assert($1)){
  2193. $2=self;
  2194. return $2;
  2195. };
  2196. $3=_st(_st(self)._model())._selectedMethod();
  2197. if(($receiver = $3) == nil || $receiver == undefined){
  2198. $4=self;
  2199. return $4;
  2200. } else {
  2201. $3;
  2202. };
  2203. $5=_st(_st(_st(_st(self)._model())._selectedMethod())._selector()).__eq(_st(aMethod)._selector());
  2204. if(! smalltalk.assert($5)){
  2205. $6=self;
  2206. return $6;
  2207. };
  2208. _st(self)._refresh();
  2209. return self}, function($ctx1) {$ctx1.fill(self,"onMethodModified:",{aMethod:aMethod},smalltalk.HLBrowserSourceWidget)})},
  2210. messageSends: ["ifFalse:", "=", "methodClass", "selectedClass", "model", "ifNil:", "selectedMethod", "selector", "refresh"]}),
  2211. smalltalk.HLBrowserSourceWidget);
  2212. smalltalk.addMethod(
  2213. "_onMethodSelected_",
  2214. smalltalk.method({
  2215. selector: "onMethodSelected:",
  2216. fn: function (aCompiledMethod){
  2217. var self=this;
  2218. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2219. $1=aCompiledMethod;
  2220. if(($receiver = $1) == nil || $receiver == undefined){
  2221. $2=_st(self)._contents_("");
  2222. return $2;
  2223. } else {
  2224. $1;
  2225. };
  2226. _st(self)._contents_(_st(aCompiledMethod)._source());
  2227. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserSourceWidget)})},
  2228. messageSends: ["ifNil:", "contents:", "source"]}),
  2229. smalltalk.HLBrowserSourceWidget);
  2230. smalltalk.addMethod(
  2231. "_onProtocolSelected_",
  2232. smalltalk.method({
  2233. selector: "onProtocolSelected:",
  2234. fn: function (aString){
  2235. var self=this;
  2236. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2237. $1=_st(_st(self)._model())._selectedClass();
  2238. if(($receiver = $1) == nil || $receiver == undefined){
  2239. $2=_st(self)._contents_("");
  2240. return $2;
  2241. } else {
  2242. $1;
  2243. };
  2244. _st(self)._contents_(_st(_st(_st(self)._model())._selectedClass())._definition());
  2245. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2246. messageSends: ["ifNil:", "contents:", "selectedClass", "model", "definition"]}),
  2247. smalltalk.HLBrowserSourceWidget);
  2248. smalltalk.addMethod(
  2249. "_onSourceCodeFocusRequested",
  2250. smalltalk.method({
  2251. selector: "onSourceCodeFocusRequested",
  2252. fn: function (){
  2253. var self=this;
  2254. return smalltalk.withContext(function($ctx1) { _st(self)._focus();
  2255. return self}, function($ctx1) {$ctx1.fill(self,"onSourceCodeFocusRequested",{}, smalltalk.HLBrowserSourceWidget)})},
  2256. messageSends: ["focus"]}),
  2257. smalltalk.HLBrowserSourceWidget);
  2258. smalltalk.addMethod(
  2259. "_refresh",
  2260. smalltalk.method({
  2261. selector: "refresh",
  2262. fn: function (){
  2263. var self=this;
  2264. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2265. $1=_st(self)._hasModification();
  2266. if(smalltalk.assert($1)){
  2267. $2=self;
  2268. return $2;
  2269. };
  2270. $3=_st(self)._hasFocus();
  2271. if(smalltalk.assert($3)){
  2272. $4=self;
  2273. return $4;
  2274. };
  2275. _st(self)._contents_(_st(_st(_st(self)._model())._selectedMethod())._source());
  2276. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{}, smalltalk.HLBrowserSourceWidget)})},
  2277. messageSends: ["ifTrue:", "hasModification", "hasFocus", "contents:", "source", "selectedMethod", "model"]}),
  2278. smalltalk.HLBrowserSourceWidget);
  2279. smalltalk.addMethod(
  2280. "_renderContentOn_",
  2281. smalltalk.method({
  2282. selector: "renderContentOn:",
  2283. fn: function (html){
  2284. var self=this;
  2285. return smalltalk.withContext(function($ctx1) { _st(_st(self)._codeWidget())._renderOn_(html);
  2286. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLBrowserSourceWidget)})},
  2287. messageSends: ["renderOn:", "codeWidget"]}),
  2288. smalltalk.HLBrowserSourceWidget);
  2289. smalltalk.addMethod(
  2290. "_on_",
  2291. smalltalk.method({
  2292. selector: "on:",
  2293. fn: function (aBrowserModel){
  2294. var self=this;
  2295. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2296. $2=_st(self)._new();
  2297. _st($2)._model_(aBrowserModel);
  2298. $3=_st($2)._yourself();
  2299. $1=$3;
  2300. return $1;
  2301. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget.klass)})},
  2302. messageSends: ["model:", "new", "yourself"]}),
  2303. smalltalk.HLBrowserSourceWidget.klass);
  2304. smalltalk.addClass('HLClassCache', smalltalk.Object, ['class', 'selectorsCache', 'overrideCache', 'overriddenCache'], 'Helios-Browser');
  2305. smalltalk.addMethod(
  2306. "_invalidateChildrenSelector_",
  2307. smalltalk.method({
  2308. selector: "invalidateChildrenSelector:",
  2309. fn: function (aSelector){
  2310. var self=this;
  2311. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2312. _st(_st(_st(self)._theClass())._subclasses())._do_((function(each){
  2313. return smalltalk.withContext(function($ctx2) { $1=_st(_st(self)._selectorsCache())._cacheFor_(each);
  2314. _st($1)._removeSelector_(aSelector);
  2315. $2=_st($1)._invalidateChildrenSelector_(aSelector);
  2316. return $2;
  2317. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2318. return self}, function($ctx1) {$ctx1.fill(self,"invalidateChildrenSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2319. messageSends: ["do:", "removeSelector:", "cacheFor:", "selectorsCache", "invalidateChildrenSelector:", "subclasses", "theClass"]}),
  2320. smalltalk.HLClassCache);
  2321. smalltalk.addMethod(
  2322. "_invalidateParentSelector_",
  2323. smalltalk.method({
  2324. selector: "invalidateParentSelector:",
  2325. fn: function (aSelector){
  2326. var self=this;
  2327. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2328. $1=_st(_st(self)._theClass())._superclass();
  2329. if(($receiver = $1) == nil || $receiver == undefined){
  2330. $1;
  2331. } else {
  2332. $2=_st(_st(self)._selectorsCache())._cacheFor_(_st(_st(self)._theClass())._superclass());
  2333. _st($2)._removeSelector_(aSelector);
  2334. $3=_st($2)._invalidateParentSelector_(aSelector);
  2335. $3;
  2336. };
  2337. return self}, function($ctx1) {$ctx1.fill(self,"invalidateParentSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2338. messageSends: ["ifNotNil:", "removeSelector:", "cacheFor:", "superclass", "theClass", "selectorsCache", "invalidateParentSelector:"]}),
  2339. smalltalk.HLClassCache);
  2340. smalltalk.addMethod(
  2341. "_invalidateSelector_",
  2342. smalltalk.method({
  2343. selector: "invalidateSelector:",
  2344. fn: function (aSelector){
  2345. var self=this;
  2346. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2347. $1=self;
  2348. _st($1)._invalidateParentSelector_(aSelector);
  2349. _st($1)._invalidateChildrenSelector_(aSelector);
  2350. $2=_st($1)._removeSelector_(aSelector);
  2351. return self}, function($ctx1) {$ctx1.fill(self,"invalidateSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2352. messageSends: ["invalidateParentSelector:", "invalidateChildrenSelector:", "removeSelector:"]}),
  2353. smalltalk.HLClassCache);
  2354. smalltalk.addMethod(
  2355. "_isOverridden_",
  2356. smalltalk.method({
  2357. selector: "isOverridden:",
  2358. fn: function (aMethod){
  2359. var self=this;
  2360. return smalltalk.withContext(function($ctx1) { var $1;
  2361. $1=_st(_st(self)._overriddenCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  2362. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverridden();
  2363. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2364. return $1;
  2365. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  2366. messageSends: ["at:ifAbsentPut:", "selector", "isOverridden", "overriddenCache"]}),
  2367. smalltalk.HLClassCache);
  2368. smalltalk.addMethod(
  2369. "_isOverride_",
  2370. smalltalk.method({
  2371. selector: "isOverride:",
  2372. fn: function (aMethod){
  2373. var self=this;
  2374. return smalltalk.withContext(function($ctx1) { var $1;
  2375. $1=_st(_st(self)._overrideCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  2376. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverride();
  2377. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2378. return $1;
  2379. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  2380. messageSends: ["at:ifAbsentPut:", "selector", "isOverride", "overrideCache"]}),
  2381. smalltalk.HLClassCache);
  2382. smalltalk.addMethod(
  2383. "_overriddenCache",
  2384. smalltalk.method({
  2385. selector: "overriddenCache",
  2386. fn: function (){
  2387. var self=this;
  2388. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2389. $2=self["@overriddenCache"];
  2390. if(($receiver = $2) == nil || $receiver == undefined){
  2391. self["@overriddenCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2392. $1=self["@overriddenCache"];
  2393. } else {
  2394. $1=$2;
  2395. };
  2396. return $1;
  2397. }, function($ctx1) {$ctx1.fill(self,"overriddenCache",{}, smalltalk.HLClassCache)})},
  2398. messageSends: ["ifNil:", "new"]}),
  2399. smalltalk.HLClassCache);
  2400. smalltalk.addMethod(
  2401. "_overrideCache",
  2402. smalltalk.method({
  2403. selector: "overrideCache",
  2404. fn: function (){
  2405. var self=this;
  2406. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2407. $2=self["@overrideCache"];
  2408. if(($receiver = $2) == nil || $receiver == undefined){
  2409. self["@overrideCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2410. $1=self["@overrideCache"];
  2411. } else {
  2412. $1=$2;
  2413. };
  2414. return $1;
  2415. }, function($ctx1) {$ctx1.fill(self,"overrideCache",{}, smalltalk.HLClassCache)})},
  2416. messageSends: ["ifNil:", "new"]}),
  2417. smalltalk.HLClassCache);
  2418. smalltalk.addMethod(
  2419. "_removeSelector_",
  2420. smalltalk.method({
  2421. selector: "removeSelector:",
  2422. fn: function (aSelector){
  2423. var self=this;
  2424. return smalltalk.withContext(function($ctx1) { _st(_st(self)._overriddenCache())._removeKey_ifAbsent_(aSelector,(function(){
  2425. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2426. _st(_st(self)._overrideCache())._removeKey_ifAbsent_(aSelector,(function(){
  2427. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2428. return self}, function($ctx1) {$ctx1.fill(self,"removeSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2429. messageSends: ["removeKey:ifAbsent:", "overriddenCache", "overrideCache"]}),
  2430. smalltalk.HLClassCache);
  2431. smalltalk.addMethod(
  2432. "_selectorsCache",
  2433. smalltalk.method({
  2434. selector: "selectorsCache",
  2435. fn: function (){
  2436. var self=this;
  2437. return smalltalk.withContext(function($ctx1) { var $1;
  2438. $1=self["@selectorsCache"];
  2439. return $1;
  2440. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLClassCache)})},
  2441. messageSends: []}),
  2442. smalltalk.HLClassCache);
  2443. smalltalk.addMethod(
  2444. "_selectorsCache_",
  2445. smalltalk.method({
  2446. selector: "selectorsCache:",
  2447. fn: function (aCache){
  2448. var self=this;
  2449. return smalltalk.withContext(function($ctx1) { self["@selectorsCache"]=aCache;
  2450. return self}, function($ctx1) {$ctx1.fill(self,"selectorsCache:",{aCache:aCache}, smalltalk.HLClassCache)})},
  2451. messageSends: []}),
  2452. smalltalk.HLClassCache);
  2453. smalltalk.addMethod(
  2454. "_theClass",
  2455. smalltalk.method({
  2456. selector: "theClass",
  2457. fn: function (){
  2458. var self=this;
  2459. return smalltalk.withContext(function($ctx1) { var $1;
  2460. $1=self["@class"];
  2461. return $1;
  2462. }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.HLClassCache)})},
  2463. messageSends: []}),
  2464. smalltalk.HLClassCache);
  2465. smalltalk.addMethod(
  2466. "_theClass_",
  2467. smalltalk.method({
  2468. selector: "theClass:",
  2469. fn: function (aClass){
  2470. var self=this;
  2471. return smalltalk.withContext(function($ctx1) { self["@class"]=aClass;
  2472. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.HLClassCache)})},
  2473. messageSends: []}),
  2474. smalltalk.HLClassCache);
  2475. smalltalk.addMethod(
  2476. "_on_selectorsCache_",
  2477. smalltalk.method({
  2478. selector: "on:selectorsCache:",
  2479. fn: function (aClass,aSelectorsCache){
  2480. var self=this;
  2481. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2482. $2=_st(self)._new();
  2483. _st($2)._theClass_(aClass);
  2484. _st($2)._selectorsCache_(aSelectorsCache);
  2485. $3=_st($2)._yourself();
  2486. $1=$3;
  2487. return $1;
  2488. }, function($ctx1) {$ctx1.fill(self,"on:selectorsCache:",{aClass:aClass,aSelectorsCache:aSelectorsCache}, smalltalk.HLClassCache.klass)})},
  2489. messageSends: ["theClass:", "new", "selectorsCache:", "yourself"]}),
  2490. smalltalk.HLClassCache.klass);
  2491. smalltalk.addClass('HLSelectorsCache', smalltalk.Object, ['classesCache'], 'Helios-Browser');
  2492. smalltalk.addMethod(
  2493. "_cacheFor_",
  2494. smalltalk.method({
  2495. selector: "cacheFor:",
  2496. fn: function (aClass){
  2497. var self=this;
  2498. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2499. $1=aClass;
  2500. if(($receiver = $1) == nil || $receiver == undefined){
  2501. return nil;
  2502. } else {
  2503. $1;
  2504. };
  2505. $2=_st(_st(self)._classesCache())._at_ifAbsentPut_(_st(aClass)._name(),(function(){
  2506. return smalltalk.withContext(function($ctx2) { return _st(self)._newCacheFor_(aClass);
  2507. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2508. return $2;
  2509. }, function($ctx1) {$ctx1.fill(self,"cacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2510. messageSends: ["ifNil:", "at:ifAbsentPut:", "name", "newCacheFor:", "classesCache"]}),
  2511. smalltalk.HLSelectorsCache);
  2512. smalltalk.addMethod(
  2513. "_classesCache",
  2514. smalltalk.method({
  2515. selector: "classesCache",
  2516. fn: function (){
  2517. var self=this;
  2518. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2519. $2=self["@classesCache"];
  2520. if(($receiver = $2) == nil || $receiver == undefined){
  2521. self["@classesCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2522. $1=self["@classesCache"];
  2523. } else {
  2524. $1=$2;
  2525. };
  2526. return $1;
  2527. }, function($ctx1) {$ctx1.fill(self,"classesCache",{}, smalltalk.HLSelectorsCache)})},
  2528. messageSends: ["ifNil:", "new"]}),
  2529. smalltalk.HLSelectorsCache);
  2530. smalltalk.addMethod(
  2531. "_initialize",
  2532. smalltalk.method({
  2533. selector: "initialize",
  2534. fn: function (){
  2535. var self=this;
  2536. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  2537. _st(self)._observeSystem();
  2538. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLSelectorsCache)})},
  2539. messageSends: ["initialize", "observeSystem"]}),
  2540. smalltalk.HLSelectorsCache);
  2541. smalltalk.addMethod(
  2542. "_invalidateCacheFor_",
  2543. smalltalk.method({
  2544. selector: "invalidateCacheFor:",
  2545. fn: function (aMethod){
  2546. var self=this;
  2547. return smalltalk.withContext(function($ctx1) { _st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._invalidateSelector_(_st(aMethod)._selector());
  2548. return self}, function($ctx1) {$ctx1.fill(self,"invalidateCacheFor:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2549. messageSends: ["invalidateSelector:", "selector", "cacheFor:", "methodClass"]}),
  2550. smalltalk.HLSelectorsCache);
  2551. smalltalk.addMethod(
  2552. "_isOverridden_",
  2553. smalltalk.method({
  2554. selector: "isOverridden:",
  2555. fn: function (aMethod){
  2556. var self=this;
  2557. return smalltalk.withContext(function($ctx1) { var $1;
  2558. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverridden_(aMethod);
  2559. return $1;
  2560. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2561. messageSends: ["isOverridden:", "cacheFor:", "methodClass"]}),
  2562. smalltalk.HLSelectorsCache);
  2563. smalltalk.addMethod(
  2564. "_isOverride_",
  2565. smalltalk.method({
  2566. selector: "isOverride:",
  2567. fn: function (aMethod){
  2568. var self=this;
  2569. return smalltalk.withContext(function($ctx1) { var $1;
  2570. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverride_(aMethod);
  2571. return $1;
  2572. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2573. messageSends: ["isOverride:", "cacheFor:", "methodClass"]}),
  2574. smalltalk.HLSelectorsCache);
  2575. smalltalk.addMethod(
  2576. "_newCacheFor_",
  2577. smalltalk.method({
  2578. selector: "newCacheFor:",
  2579. fn: function (aClass){
  2580. var self=this;
  2581. return smalltalk.withContext(function($ctx1) { var $1;
  2582. $1=_st((smalltalk.HLClassCache || HLClassCache))._on_selectorsCache_(aClass,self);
  2583. return $1;
  2584. }, function($ctx1) {$ctx1.fill(self,"newCacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2585. messageSends: ["on:selectorsCache:"]}),
  2586. smalltalk.HLSelectorsCache);
  2587. smalltalk.addMethod(
  2588. "_observeSystem",
  2589. smalltalk.method({
  2590. selector: "observeSystem",
  2591. fn: function (){
  2592. var self=this;
  2593. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2594. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  2595. _st($1)._on_do_((smalltalk.MethodAdded || MethodAdded),(function(ann){
  2596. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodAdded_(_st(ann)._method());
  2597. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2598. $2=_st($1)._on_do_((smalltalk.MethodRemoved || MethodRemoved),(function(ann){
  2599. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodRemoved_(_st(ann)._method());
  2600. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2601. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLSelectorsCache)})},
  2602. messageSends: ["on:do:", "onMethodAdded:", "method", "current", "onMethodRemoved:"]}),
  2603. smalltalk.HLSelectorsCache);
  2604. smalltalk.addMethod(
  2605. "_onMethodAdded_",
  2606. smalltalk.method({
  2607. selector: "onMethodAdded:",
  2608. fn: function (aMethod){
  2609. var self=this;
  2610. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2611. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2612. messageSends: ["invalidateCacheFor:"]}),
  2613. smalltalk.HLSelectorsCache);
  2614. smalltalk.addMethod(
  2615. "_onMethodRemoved_",
  2616. smalltalk.method({
  2617. selector: "onMethodRemoved:",
  2618. fn: function (aMethod){
  2619. var self=this;
  2620. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2621. return self}, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2622. messageSends: ["invalidateCacheFor:"]}),
  2623. smalltalk.HLSelectorsCache);
  2624. smalltalk.HLSelectorsCache.klass.iVarNames = ['current'];
  2625. smalltalk.addMethod(
  2626. "_current",
  2627. smalltalk.method({
  2628. selector: "current",
  2629. fn: function (){
  2630. var self=this;
  2631. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2632. $2=self["@current"];
  2633. if(($receiver = $2) == nil || $receiver == undefined){
  2634. self["@current"]=smalltalk.Object.klass.fn.prototype._new.apply(_st(self), []);
  2635. $1=self["@current"];
  2636. } else {
  2637. $1=$2;
  2638. };
  2639. return $1;
  2640. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.HLSelectorsCache.klass)})},
  2641. messageSends: ["ifNil:", "new"]}),
  2642. smalltalk.HLSelectorsCache.klass);
  2643. smalltalk.addMethod(
  2644. "_flush",
  2645. smalltalk.method({
  2646. selector: "flush",
  2647. fn: function (){
  2648. var self=this;
  2649. return smalltalk.withContext(function($ctx1) { self["@current"]=nil;
  2650. return self}, function($ctx1) {$ctx1.fill(self,"flush",{}, smalltalk.HLSelectorsCache.klass)})},
  2651. messageSends: []}),
  2652. smalltalk.HLSelectorsCache.klass);
  2653. smalltalk.addMethod(
  2654. "_new",
  2655. smalltalk.method({
  2656. selector: "new",
  2657. fn: function (){
  2658. var self=this;
  2659. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  2660. return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.HLSelectorsCache.klass)})},
  2661. messageSends: ["shouldNotImplement"]}),
  2662. smalltalk.HLSelectorsCache.klass);
  2663. smalltalk.addMethod(
  2664. "_isOverridden",
  2665. smalltalk.method({
  2666. selector: "isOverridden",
  2667. fn: function (){
  2668. var self=this;
  2669. var selector;
  2670. return smalltalk.withContext(function($ctx1) { var $1;
  2671. var $early={};
  2672. try {
  2673. selector=_st(self)._selector();
  2674. _st(_st(self)._methodClass())._allSubclassesDo_((function(each){
  2675. return smalltalk.withContext(function($ctx2) { $1=_st(each)._includesSelector_(selector);
  2676. if(smalltalk.assert($1)){
  2677. throw $early=[true];
  2678. };
  2679. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2680. return false;
  2681. }
  2682. catch(e) {if(e===$early)return e[0]; throw e}
  2683. }, function($ctx1) {$ctx1.fill(self,"isOverridden",{selector:selector}, smalltalk.CompiledMethod)})},
  2684. messageSends: ["selector", "allSubclassesDo:", "ifTrue:", "includesSelector:", "methodClass"]}),
  2685. smalltalk.CompiledMethod);
  2686. smalltalk.addMethod(
  2687. "_isOverride",
  2688. smalltalk.method({
  2689. selector: "isOverride",
  2690. fn: function (){
  2691. var self=this;
  2692. var superclass;
  2693. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2694. superclass=_st(_st(self)._methodClass())._superclass();
  2695. $1=superclass;
  2696. if(($receiver = $1) == nil || $receiver == undefined){
  2697. return false;
  2698. } else {
  2699. $1;
  2700. };
  2701. $2=_st(_st(_st(_st(self)._methodClass())._superclass())._lookupSelector_(_st(self)._selector()))._notNil();
  2702. return $2;
  2703. }, function($ctx1) {$ctx1.fill(self,"isOverride",{superclass:superclass}, smalltalk.CompiledMethod)})},
  2704. messageSends: ["superclass", "methodClass", "ifNil:", "notNil", "lookupSelector:", "selector"]}),
  2705. smalltalk.CompiledMethod);