1
0

Helios-Browser.deploy.js 122 KB

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