Helios-Browser.deploy.js 118 KB

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