Helios-Core.deploy.js 125 KB

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