Helios-Core.deploy.js 111 KB

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