1
0

Helios-Browser.deploy.js 108 KB

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