Helios-Browser.deploy.js 107 KB

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