Helios-Browser.deploy.js 112 KB

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