Helios-Core.deploy.js 126 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697
  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)._show();
  2232. return self}, function($ctx1) {$ctx1.fill(self,"confirm:ifFalse:",{aString:aString,aBlock:aBlock},smalltalk.HLManager)})},
  2233. messageSends: ["confirmationString:", "new", "cancelBlock:", "show"]}),
  2234. smalltalk.HLManager);
  2235. smalltalk.addMethod(
  2236. smalltalk.method({
  2237. selector: "confirm:ifTrue:",
  2238. fn: function (aString,aBlock){
  2239. var self=this;
  2240. function $HLConfirmationWidget(){return smalltalk.HLConfirmationWidget||(typeof HLConfirmationWidget=="undefined"?nil:HLConfirmationWidget)}
  2241. return smalltalk.withContext(function($ctx1) {
  2242. var $1,$2;
  2243. $1=_st($HLConfirmationWidget())._new();
  2244. _st($1)._confirmationString_(aString);
  2245. _st($1)._actionBlock_(aBlock);
  2246. $2=_st($1)._show();
  2247. return self}, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:",{aString:aString,aBlock:aBlock},smalltalk.HLManager)})},
  2248. messageSends: ["confirmationString:", "new", "actionBlock:", "show"]}),
  2249. smalltalk.HLManager);
  2250. smalltalk.addMethod(
  2251. smalltalk.method({
  2252. selector: "defaultEnvironment",
  2253. fn: function (){
  2254. var self=this;
  2255. var parent;
  2256. function $Environment(){return smalltalk.Environment||(typeof Environment=="undefined"?nil:Environment)}
  2257. return smalltalk.withContext(function($ctx1) {
  2258. var $1,$2,$3,$4;
  2259. $1=_st(window)._opener();
  2260. if(($receiver = $1) == nil || $receiver == undefined){
  2261. parent=_st(window)._parent();
  2262. } else {
  2263. parent=$1;
  2264. };
  2265. $2=parent;
  2266. if(($receiver = $2) == nil || $receiver == undefined){
  2267. $3=_st($Environment())._new();
  2268. return $3;
  2269. } else {
  2270. $2;
  2271. };
  2272. $4=_st(_st(_st(parent)._at_("global_smalltalk"))._at_("Environment"))._new();
  2273. return $4;
  2274. }, function($ctx1) {$ctx1.fill(self,"defaultEnvironment",{parent:parent},smalltalk.HLManager)})},
  2275. messageSends: ["ifNil:", "parent", "opener", "new", "at:"]}),
  2276. smalltalk.HLManager);
  2277. smalltalk.addMethod(
  2278. smalltalk.method({
  2279. selector: "environment",
  2280. fn: function (){
  2281. var self=this;
  2282. return smalltalk.withContext(function($ctx1) {
  2283. var $2,$1;
  2284. $2=self["@environment"];
  2285. if(($receiver = $2) == nil || $receiver == undefined){
  2286. self["@environment"]=self._defaultEnvironment();
  2287. $1=self["@environment"];
  2288. } else {
  2289. $1=$2;
  2290. };
  2291. return $1;
  2292. }, function($ctx1) {$ctx1.fill(self,"environment",{},smalltalk.HLManager)})},
  2293. messageSends: ["ifNil:", "defaultEnvironment"]}),
  2294. smalltalk.HLManager);
  2295. smalltalk.addMethod(
  2296. smalltalk.method({
  2297. selector: "environment:",
  2298. fn: function (anEnvironment){
  2299. var self=this;
  2300. return smalltalk.withContext(function($ctx1) {
  2301. self["@environment"]=anEnvironment;
  2302. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment},smalltalk.HLManager)})},
  2303. messageSends: []}),
  2304. smalltalk.HLManager);
  2305. smalltalk.addMethod(
  2306. smalltalk.method({
  2307. selector: "history",
  2308. fn: function (){
  2309. var self=this;
  2310. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  2311. return smalltalk.withContext(function($ctx1) {
  2312. var $2,$1;
  2313. $2=self["@history"];
  2314. if(($receiver = $2) == nil || $receiver == undefined){
  2315. self["@history"]=_st($OrderedCollection())._new();
  2316. $1=self["@history"];
  2317. } else {
  2318. $1=$2;
  2319. };
  2320. return $1;
  2321. }, function($ctx1) {$ctx1.fill(self,"history",{},smalltalk.HLManager)})},
  2322. messageSends: ["ifNil:", "new"]}),
  2323. smalltalk.HLManager);
  2324. smalltalk.addMethod(
  2325. smalltalk.method({
  2326. selector: "history:",
  2327. fn: function (aCollection){
  2328. var self=this;
  2329. return smalltalk.withContext(function($ctx1) {
  2330. self["@history"]=aCollection;
  2331. return self}, function($ctx1) {$ctx1.fill(self,"history:",{aCollection:aCollection},smalltalk.HLManager)})},
  2332. messageSends: []}),
  2333. smalltalk.HLManager);
  2334. smalltalk.addMethod(
  2335. smalltalk.method({
  2336. selector: "initialize",
  2337. fn: function (){
  2338. var self=this;
  2339. function $HLErrorHandler(){return smalltalk.HLErrorHandler||(typeof HLErrorHandler=="undefined"?nil:HLErrorHandler)}
  2340. function $HLProgressHandler(){return smalltalk.HLProgressHandler||(typeof HLProgressHandler=="undefined"?nil:HLProgressHandler)}
  2341. function $HLInspector(){return smalltalk.HLInspector||(typeof HLInspector=="undefined"?nil:HLInspector)}
  2342. function $ErrorHandler(){return smalltalk.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  2343. function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
  2344. return smalltalk.withContext(function($ctx1) {
  2345. smalltalk.HLManager.superclass.fn.prototype._initialize.apply(_st(self), []);
  2346. _st($HLErrorHandler())._register();
  2347. _st($HLProgressHandler())._register();
  2348. self._registerInspector_($HLInspector());
  2349. self._registerErrorHandler_(_st($ErrorHandler())._current());
  2350. self._registerProgressHandler_(_st($ProgressHandler())._current());
  2351. _st(self._keyBinder())._setupEvents();
  2352. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLManager)})},
  2353. messageSends: ["initialize", "register", "registerInspector:", "registerErrorHandler:", "current", "registerProgressHandler:", "setupEvents", "keyBinder"]}),
  2354. smalltalk.HLManager);
  2355. smalltalk.addMethod(
  2356. smalltalk.method({
  2357. selector: "keyBinder",
  2358. fn: function (){
  2359. var self=this;
  2360. function $HLKeyBinder(){return smalltalk.HLKeyBinder||(typeof HLKeyBinder=="undefined"?nil:HLKeyBinder)}
  2361. return smalltalk.withContext(function($ctx1) {
  2362. var $1;
  2363. $1=_st($HLKeyBinder())._current();
  2364. return $1;
  2365. }, function($ctx1) {$ctx1.fill(self,"keyBinder",{},smalltalk.HLManager)})},
  2366. messageSends: ["current"]}),
  2367. smalltalk.HLManager);
  2368. smalltalk.addMethod(
  2369. smalltalk.method({
  2370. selector: "refresh",
  2371. fn: function (){
  2372. var self=this;
  2373. return smalltalk.withContext(function($ctx1) {
  2374. _st(".navbar"._asJQuery())._remove();
  2375. self._appendToJQuery_("body"._asJQuery());
  2376. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLManager)})},
  2377. messageSends: ["remove", "asJQuery", "appendToJQuery:"]}),
  2378. smalltalk.HLManager);
  2379. smalltalk.addMethod(
  2380. smalltalk.method({
  2381. selector: "registerErrorHandler:",
  2382. fn: function (anErrorHandler){
  2383. var self=this;
  2384. return smalltalk.withContext(function($ctx1) {
  2385. _st(self._environment())._registerErrorHandler_(anErrorHandler);
  2386. return self}, function($ctx1) {$ctx1.fill(self,"registerErrorHandler:",{anErrorHandler:anErrorHandler},smalltalk.HLManager)})},
  2387. messageSends: ["registerErrorHandler:", "environment"]}),
  2388. smalltalk.HLManager);
  2389. smalltalk.addMethod(
  2390. smalltalk.method({
  2391. selector: "registerInspector:",
  2392. fn: function (anInspector){
  2393. var self=this;
  2394. return smalltalk.withContext(function($ctx1) {
  2395. _st(self._environment())._registerInspector_(anInspector);
  2396. return self}, function($ctx1) {$ctx1.fill(self,"registerInspector:",{anInspector:anInspector},smalltalk.HLManager)})},
  2397. messageSends: ["registerInspector:", "environment"]}),
  2398. smalltalk.HLManager);
  2399. smalltalk.addMethod(
  2400. smalltalk.method({
  2401. selector: "registerProgressHandler:",
  2402. fn: function (aProgressHandler){
  2403. var self=this;
  2404. return smalltalk.withContext(function($ctx1) {
  2405. _st(self._environment())._registerProgressHandler_(aProgressHandler);
  2406. return self}, function($ctx1) {$ctx1.fill(self,"registerProgressHandler:",{aProgressHandler:aProgressHandler},smalltalk.HLManager)})},
  2407. messageSends: ["registerProgressHandler:", "environment"]}),
  2408. smalltalk.HLManager);
  2409. smalltalk.addMethod(
  2410. smalltalk.method({
  2411. selector: "removeActiveTab",
  2412. fn: function (){
  2413. var self=this;
  2414. return smalltalk.withContext(function($ctx1) {
  2415. self._removeTab_(self._activeTab());
  2416. return self}, function($ctx1) {$ctx1.fill(self,"removeActiveTab",{},smalltalk.HLManager)})},
  2417. messageSends: ["removeTab:", "activeTab"]}),
  2418. smalltalk.HLManager);
  2419. smalltalk.addMethod(
  2420. smalltalk.method({
  2421. selector: "removeFromHistory:",
  2422. fn: function (aTab){
  2423. var self=this;
  2424. return smalltalk.withContext(function($ctx1) {
  2425. self._history_(_st(self._history())._reject_((function(each){
  2426. return smalltalk.withContext(function($ctx2) {
  2427. return _st(each).__eq_eq(aTab);
  2428. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})));
  2429. return self}, function($ctx1) {$ctx1.fill(self,"removeFromHistory:",{aTab:aTab},smalltalk.HLManager)})},
  2430. messageSends: ["history:", "reject:", "==", "history"]}),
  2431. smalltalk.HLManager);
  2432. smalltalk.addMethod(
  2433. smalltalk.method({
  2434. selector: "removeTab:",
  2435. fn: function (aTab){
  2436. var self=this;
  2437. return smalltalk.withContext(function($ctx1) {
  2438. var $1,$2;
  2439. $1=_st(self._tabs())._includes_(aTab);
  2440. if(! smalltalk.assert($1)){
  2441. $2=self;
  2442. return $2;
  2443. };
  2444. self._removeFromHistory_(aTab);
  2445. _st(self._tabs())._remove_(aTab);
  2446. _st(self._keyBinder())._flushBindings();
  2447. _st(aTab)._remove();
  2448. self._refresh();
  2449. _st(self._history())._ifNotEmpty_((function(){
  2450. return smalltalk.withContext(function($ctx2) {
  2451. return _st(_st(self._history())._last())._activate();
  2452. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2453. return self}, function($ctx1) {$ctx1.fill(self,"removeTab:",{aTab:aTab},smalltalk.HLManager)})},
  2454. messageSends: ["ifFalse:", "includes:", "tabs", "removeFromHistory:", "remove:", "flushBindings", "keyBinder", "remove", "refresh", "ifNotEmpty:", "activate", "last", "history"]}),
  2455. smalltalk.HLManager);
  2456. smalltalk.addMethod(
  2457. smalltalk.method({
  2458. selector: "renderAddOn:",
  2459. fn: function (html){
  2460. var self=this;
  2461. function $HLWidget(){return smalltalk.HLWidget||(typeof HLWidget=="undefined"?nil:HLWidget)}
  2462. return smalltalk.withContext(function($ctx1) {
  2463. var $1,$3,$4,$5,$7,$8,$6,$2;
  2464. $1=_st(html)._li();
  2465. _st($1)._class_("dropdown");
  2466. $2=_st($1)._with_((function(){
  2467. return smalltalk.withContext(function($ctx2) {
  2468. $3=_st(html)._a();
  2469. _st($3)._class_("dropdown-toggle");
  2470. _st($3)._at_put_("data-toggle","dropdown");
  2471. $4=_st($3)._with_((function(){
  2472. return smalltalk.withContext(function($ctx3) {
  2473. _st(html)._with_("Open...");
  2474. return _st(_st(html)._tag_("b"))._class_("caret");
  2475. }, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}));
  2476. $4;
  2477. $5=_st(html)._ul();
  2478. _st($5)._class_("dropdown-menu");
  2479. $6=_st($5)._with_((function(){
  2480. return smalltalk.withContext(function($ctx3) {
  2481. return _st(_st(_st(_st($HLWidget())._withAllSubclasses())._select_((function(each){
  2482. return smalltalk.withContext(function($ctx4) {
  2483. return _st(each)._canBeOpenAsTab();
  2484. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3)})})))._sorted_((function(a,b){
  2485. return smalltalk.withContext(function($ctx4) {
  2486. return _st(_st(a)._tabPriority()).__lt(_st(b)._tabPriority());
  2487. }, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx3)})})))._do_((function(each){
  2488. return smalltalk.withContext(function($ctx4) {
  2489. return _st(_st(html)._li())._with_((function(){
  2490. return smalltalk.withContext(function($ctx5) {
  2491. $7=_st(html)._a();
  2492. _st($7)._with_(_st(each)._tabLabel());
  2493. $8=_st($7)._onClick_((function(){
  2494. return smalltalk.withContext(function($ctx6) {
  2495. return _st(each)._openAsTab();
  2496. }, function($ctx6) {$ctx6.fillBlock({},$ctx5)})}));
  2497. return $8;
  2498. }, function($ctx5) {$ctx5.fillBlock({},$ctx4)})}));
  2499. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3)})}));
  2500. }, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}));
  2501. return $6;
  2502. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2503. return self}, function($ctx1) {$ctx1.fill(self,"renderAddOn:",{html:html},smalltalk.HLManager)})},
  2504. messageSends: ["class:", "li", "with:", "a", "at:put:", "tag:", "ul", "do:", "tabLabel", "onClick:", "openAsTab", "sorted:", "<", "tabPriority", "select:", "canBeOpenAsTab", "withAllSubclasses"]}),
  2505. smalltalk.HLManager);
  2506. smalltalk.addMethod(
  2507. smalltalk.method({
  2508. selector: "renderContentOn:",
  2509. fn: function (html){
  2510. var self=this;
  2511. return smalltalk.withContext(function($ctx1) {
  2512. var $1,$3,$4,$2;
  2513. $1=_st(html)._div();
  2514. _st($1)._class_("navbar navbar-fixed-top");
  2515. $2=_st($1)._with_((function(){
  2516. return smalltalk.withContext(function($ctx2) {
  2517. $3=_st(html)._div();
  2518. _st($3)._class_("navbar-inner");
  2519. $4=_st($3)._with_((function(){
  2520. return smalltalk.withContext(function($ctx3) {
  2521. return self._renderTabsOn_(html);
  2522. }, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}));
  2523. return $4;
  2524. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2525. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLManager)})},
  2526. messageSends: ["class:", "div", "with:", "renderTabsOn:"]}),
  2527. smalltalk.HLManager);
  2528. smalltalk.addMethod(
  2529. smalltalk.method({
  2530. selector: "renderTabsOn:",
  2531. fn: function (html){
  2532. var self=this;
  2533. return smalltalk.withContext(function($ctx1) {
  2534. var $1,$3,$4,$6,$5,$8,$9,$10,$11,$7,$2;
  2535. $1=_st(html)._ul();
  2536. _st($1)._class_("nav");
  2537. $2=_st($1)._with_((function(){
  2538. return smalltalk.withContext(function($ctx2) {
  2539. _st(self._tabs())._do_((function(each){
  2540. return smalltalk.withContext(function($ctx3) {
  2541. $3=_st(html)._li();
  2542. $4=$3;
  2543. $6=_st(each)._isActive();
  2544. if(smalltalk.assert($6)){
  2545. $5="active";
  2546. } else {
  2547. $5="inactive";
  2548. };
  2549. _st($4)._class_($5);
  2550. $7=_st($3)._with_((function(){
  2551. return smalltalk.withContext(function($ctx4) {
  2552. $8=_st(html)._a();
  2553. _st($8)._with_((function(){
  2554. return smalltalk.withContext(function($ctx5) {
  2555. _st(_st(_st(html)._tag_("i"))._class_("close"))._onClick_((function(){
  2556. return smalltalk.withContext(function($ctx6) {
  2557. return self._removeTab_(each);
  2558. }, function($ctx6) {$ctx6.fillBlock({},$ctx5)})}));
  2559. $9=_st(html)._span();
  2560. _st($9)._class_(_st(each)._cssClass());
  2561. $10=_st($9)._with_(_st(each)._displayLabel());
  2562. return $10;
  2563. }, function($ctx5) {$ctx5.fillBlock({},$ctx4)})}));
  2564. $11=_st($8)._onClick_((function(){
  2565. return smalltalk.withContext(function($ctx5) {
  2566. return _st(each)._activate();
  2567. }, function($ctx5) {$ctx5.fillBlock({},$ctx4)})}));
  2568. return $11;
  2569. }, function($ctx4) {$ctx4.fillBlock({},$ctx3)})}));
  2570. return $7;
  2571. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2)})}));
  2572. return self._renderAddOn_(html);
  2573. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2574. return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},smalltalk.HLManager)})},
  2575. messageSends: ["class:", "ul", "with:", "do:", "ifTrue:ifFalse:", "isActive", "li", "onClick:", "removeTab:", "tag:", "cssClass", "span", "displayLabel", "a", "activate", "tabs", "renderAddOn:"]}),
  2576. smalltalk.HLManager);
  2577. smalltalk.addMethod(
  2578. smalltalk.method({
  2579. selector: "request:do:",
  2580. fn: function (aString,aBlock){
  2581. var self=this;
  2582. return smalltalk.withContext(function($ctx1) {
  2583. self._request_value_do_(aString,"",aBlock);
  2584. return self}, function($ctx1) {$ctx1.fill(self,"request:do:",{aString:aString,aBlock:aBlock},smalltalk.HLManager)})},
  2585. messageSends: ["request:value:do:"]}),
  2586. smalltalk.HLManager);
  2587. smalltalk.addMethod(
  2588. smalltalk.method({
  2589. selector: "request:value:do:",
  2590. fn: function (aString,valueString,aBlock){
  2591. var self=this;
  2592. function $HLRequestWidget(){return smalltalk.HLRequestWidget||(typeof HLRequestWidget=="undefined"?nil:HLRequestWidget)}
  2593. return smalltalk.withContext(function($ctx1) {
  2594. var $1,$2;
  2595. $1=_st($HLRequestWidget())._new();
  2596. _st($1)._confirmationString_(aString);
  2597. _st($1)._actionBlock_(aBlock);
  2598. _st($1)._value_(valueString);
  2599. $2=_st($1)._show();
  2600. return self}, function($ctx1) {$ctx1.fill(self,"request:value:do:",{aString:aString,valueString:valueString,aBlock:aBlock},smalltalk.HLManager)})},
  2601. messageSends: ["confirmationString:", "new", "actionBlock:", "value:", "show"]}),
  2602. smalltalk.HLManager);
  2603. smalltalk.addMethod(
  2604. smalltalk.method({
  2605. selector: "show:",
  2606. fn: function (aTab){
  2607. var self=this;
  2608. return smalltalk.withContext(function($ctx1) {
  2609. var $1,$2;
  2610. _st(self._tabs())._do_((function(each){
  2611. return smalltalk.withContext(function($ctx2) {
  2612. return _st(each)._hide();
  2613. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2614. $1=aTab;
  2615. _st($1)._show();
  2616. $2=_st($1)._focus();
  2617. return self}, function($ctx1) {$ctx1.fill(self,"show:",{aTab:aTab},smalltalk.HLManager)})},
  2618. messageSends: ["do:", "hide", "tabs", "show", "focus"]}),
  2619. smalltalk.HLManager);
  2620. smalltalk.addMethod(
  2621. smalltalk.method({
  2622. selector: "tabs",
  2623. fn: function (){
  2624. var self=this;
  2625. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  2626. return smalltalk.withContext(function($ctx1) {
  2627. var $2,$1;
  2628. $2=self["@tabs"];
  2629. if(($receiver = $2) == nil || $receiver == undefined){
  2630. self["@tabs"]=_st($OrderedCollection())._new();
  2631. $1=self["@tabs"];
  2632. } else {
  2633. $1=$2;
  2634. };
  2635. return $1;
  2636. }, function($ctx1) {$ctx1.fill(self,"tabs",{},smalltalk.HLManager)})},
  2637. messageSends: ["ifNil:", "new"]}),
  2638. smalltalk.HLManager);
  2639. smalltalk.HLManager.klass.iVarNames = ['current'];
  2640. smalltalk.addMethod(
  2641. smalltalk.method({
  2642. selector: "clearKeydownEvent",
  2643. fn: function (){
  2644. var self=this;
  2645. return smalltalk.withContext(function($ctx1) {
  2646. var $1;
  2647. _st("body"._asJQuery())._keydown_((function(e){
  2648. return smalltalk.withContext(function($ctx2) {
  2649. $1=_st(_st(_st(e)._keyCode()).__gt_eq((37)))._and_((function(){
  2650. return smalltalk.withContext(function($ctx3) {
  2651. return _st(_st(e)._keyCode()).__lt_eq((40));
  2652. }, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}));
  2653. if(smalltalk.assert($1)){
  2654. return false;
  2655. };
  2656. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  2657. return self}, function($ctx1) {$ctx1.fill(self,"clearKeydownEvent",{},smalltalk.HLManager.klass)})},
  2658. messageSends: ["keydown:", "ifTrue:", "and:", "<=", "keyCode", ">=", "asJQuery"]}),
  2659. smalltalk.HLManager.klass);
  2660. smalltalk.addMethod(
  2661. smalltalk.method({
  2662. selector: "current",
  2663. fn: function (){
  2664. var self=this;
  2665. return smalltalk.withContext(function($ctx1) {
  2666. var $2,$1;
  2667. $2=self["@current"];
  2668. if(($receiver = $2) == nil || $receiver == undefined){
  2669. self["@current"]=_st(self._basicNew())._initialize();
  2670. $1=self["@current"];
  2671. } else {
  2672. $1=$2;
  2673. };
  2674. return $1;
  2675. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.HLManager.klass)})},
  2676. messageSends: ["ifNil:", "initialize", "basicNew"]}),
  2677. smalltalk.HLManager.klass);
  2678. smalltalk.addMethod(
  2679. smalltalk.method({
  2680. selector: "initialize",
  2681. fn: function (){
  2682. var self=this;
  2683. return smalltalk.withContext(function($ctx1) {
  2684. _st(self._current())._appendToJQuery_("body"._asJQuery());
  2685. self._clearKeydownEvent();
  2686. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLManager.klass)})},
  2687. messageSends: ["appendToJQuery:", "asJQuery", "current", "clearKeydownEvent"]}),
  2688. smalltalk.HLManager.klass);
  2689. smalltalk.addMethod(
  2690. smalltalk.method({
  2691. selector: "new",
  2692. fn: function (){
  2693. var self=this;
  2694. return smalltalk.withContext(function($ctx1) {
  2695. self._shouldNotImplement();
  2696. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.HLManager.klass)})},
  2697. messageSends: ["shouldNotImplement"]}),
  2698. smalltalk.HLManager.klass);
  2699. smalltalk.addClass('HLModalWidget', smalltalk.HLWidget, [], 'Helios-Core');
  2700. smalltalk.addMethod(
  2701. smalltalk.method({
  2702. selector: "cancel",
  2703. fn: function (){
  2704. var self=this;
  2705. return smalltalk.withContext(function($ctx1) {
  2706. self._remove();
  2707. return self}, function($ctx1) {$ctx1.fill(self,"cancel",{},smalltalk.HLModalWidget)})},
  2708. messageSends: ["remove"]}),
  2709. smalltalk.HLModalWidget);
  2710. smalltalk.addMethod(
  2711. smalltalk.method({
  2712. selector: "cssClass",
  2713. fn: function (){
  2714. var self=this;
  2715. return smalltalk.withContext(function($ctx1) {
  2716. return "";
  2717. }, function($ctx1) {$ctx1.fill(self,"cssClass",{},smalltalk.HLModalWidget)})},
  2718. messageSends: []}),
  2719. smalltalk.HLModalWidget);
  2720. smalltalk.addMethod(
  2721. smalltalk.method({
  2722. selector: "remove",
  2723. fn: function (){
  2724. var self=this;
  2725. return smalltalk.withContext(function($ctx1) {
  2726. _st(".dialog"._asJQuery())._removeClass_("active");
  2727. _st((function(){
  2728. return smalltalk.withContext(function($ctx2) {
  2729. _st("#overlay"._asJQuery())._remove();
  2730. return _st(".dialog"._asJQuery())._remove();
  2731. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithTimeout_((300));
  2732. return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLModalWidget)})},
  2733. messageSends: ["removeClass:", "asJQuery", "valueWithTimeout:", "remove"]}),
  2734. smalltalk.HLModalWidget);
  2735. smalltalk.addMethod(
  2736. smalltalk.method({
  2737. selector: "renderButtonsOn:",
  2738. fn: function (html){
  2739. var self=this;
  2740. return smalltalk.withContext(function($ctx1) {
  2741. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLModalWidget)})},
  2742. messageSends: []}),
  2743. smalltalk.HLModalWidget);
  2744. smalltalk.addMethod(
  2745. smalltalk.method({
  2746. selector: "renderContentOn:",
  2747. fn: function (html){
  2748. var self=this;
  2749. var confirmButton;
  2750. return smalltalk.withContext(function($ctx1) {
  2751. var $1,$3,$4,$2;
  2752. _st(_st(html)._div())._id_("overlay");
  2753. $1=_st(html)._div();
  2754. _st($1)._class_("dialog ".__comma(self._cssClass()));
  2755. $2=_st($1)._with_((function(){
  2756. return smalltalk.withContext(function($ctx2) {
  2757. $3=self;
  2758. _st($3)._renderMainOn_(html);
  2759. $4=_st($3)._renderButtonsOn_(html);
  2760. return $4;
  2761. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2762. _st(".dialog"._asJQuery())._addClass_("active");
  2763. self._setupKeyBindings();
  2764. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html,confirmButton:confirmButton},smalltalk.HLModalWidget)})},
  2765. messageSends: ["id:", "div", "class:", ",", "cssClass", "with:", "renderMainOn:", "renderButtonsOn:", "addClass:", "asJQuery", "setupKeyBindings"]}),
  2766. smalltalk.HLModalWidget);
  2767. smalltalk.addMethod(
  2768. smalltalk.method({
  2769. selector: "renderMainOn:",
  2770. fn: function (html){
  2771. var self=this;
  2772. return smalltalk.withContext(function($ctx1) {
  2773. return self}, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},smalltalk.HLModalWidget)})},
  2774. messageSends: []}),
  2775. smalltalk.HLModalWidget);
  2776. smalltalk.addMethod(
  2777. smalltalk.method({
  2778. selector: "setupKeyBindings",
  2779. fn: function (){
  2780. var self=this;
  2781. return smalltalk.withContext(function($ctx1) {
  2782. var $1;
  2783. _st(".dialog"._asJQuery())._keyup_((function(e){
  2784. return smalltalk.withContext(function($ctx2) {
  2785. $1=_st(_st(e)._keyCode()).__eq((27));
  2786. if(smalltalk.assert($1)){
  2787. return self._cancel();
  2788. };
  2789. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  2790. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},smalltalk.HLModalWidget)})},
  2791. messageSends: ["keyup:", "ifTrue:", "cancel", "=", "keyCode", "asJQuery"]}),
  2792. smalltalk.HLModalWidget);
  2793. smalltalk.addMethod(
  2794. smalltalk.method({
  2795. selector: "show",
  2796. fn: function (){
  2797. var self=this;
  2798. return smalltalk.withContext(function($ctx1) {
  2799. self._appendToJQuery_("body"._asJQuery());
  2800. return self}, function($ctx1) {$ctx1.fill(self,"show",{},smalltalk.HLModalWidget)})},
  2801. messageSends: ["appendToJQuery:", "asJQuery"]}),
  2802. smalltalk.HLModalWidget);
  2803. smalltalk.addClass('HLConfirmationWidget', smalltalk.HLModalWidget, ['confirmationString', 'actionBlock', 'cancelBlock'], 'Helios-Core');
  2804. smalltalk.addMethod(
  2805. smalltalk.method({
  2806. selector: "actionBlock",
  2807. fn: function (){
  2808. var self=this;
  2809. return smalltalk.withContext(function($ctx1) {
  2810. var $2,$1;
  2811. $2=self["@actionBlock"];
  2812. if(($receiver = $2) == nil || $receiver == undefined){
  2813. $1=(function(){
  2814. return smalltalk.withContext(function($ctx2) {
  2815. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  2816. } else {
  2817. $1=$2;
  2818. };
  2819. return $1;
  2820. }, function($ctx1) {$ctx1.fill(self,"actionBlock",{},smalltalk.HLConfirmationWidget)})},
  2821. messageSends: ["ifNil:"]}),
  2822. smalltalk.HLConfirmationWidget);
  2823. smalltalk.addMethod(
  2824. smalltalk.method({
  2825. selector: "actionBlock:",
  2826. fn: function (aBlock){
  2827. var self=this;
  2828. return smalltalk.withContext(function($ctx1) {
  2829. self["@actionBlock"]=aBlock;
  2830. return self}, function($ctx1) {$ctx1.fill(self,"actionBlock:",{aBlock:aBlock},smalltalk.HLConfirmationWidget)})},
  2831. messageSends: []}),
  2832. smalltalk.HLConfirmationWidget);
  2833. smalltalk.addMethod(
  2834. smalltalk.method({
  2835. selector: "cancel",
  2836. fn: function (){
  2837. var self=this;
  2838. return smalltalk.withContext(function($ctx1) {
  2839. _st(self._cancelBlock())._value();
  2840. self._remove();
  2841. return self}, function($ctx1) {$ctx1.fill(self,"cancel",{},smalltalk.HLConfirmationWidget)})},
  2842. messageSends: ["value", "cancelBlock", "remove"]}),
  2843. smalltalk.HLConfirmationWidget);
  2844. smalltalk.addMethod(
  2845. smalltalk.method({
  2846. selector: "cancelBlock",
  2847. fn: function (){
  2848. var self=this;
  2849. return smalltalk.withContext(function($ctx1) {
  2850. var $2,$1;
  2851. $2=self["@cancelBlock"];
  2852. if(($receiver = $2) == nil || $receiver == undefined){
  2853. $1=(function(){
  2854. return smalltalk.withContext(function($ctx2) {
  2855. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  2856. } else {
  2857. $1=$2;
  2858. };
  2859. return $1;
  2860. }, function($ctx1) {$ctx1.fill(self,"cancelBlock",{},smalltalk.HLConfirmationWidget)})},
  2861. messageSends: ["ifNil:"]}),
  2862. smalltalk.HLConfirmationWidget);
  2863. smalltalk.addMethod(
  2864. smalltalk.method({
  2865. selector: "cancelBlock:",
  2866. fn: function (aBlock){
  2867. var self=this;
  2868. return smalltalk.withContext(function($ctx1) {
  2869. self["@cancelBlock"]=aBlock;
  2870. return self}, function($ctx1) {$ctx1.fill(self,"cancelBlock:",{aBlock:aBlock},smalltalk.HLConfirmationWidget)})},
  2871. messageSends: []}),
  2872. smalltalk.HLConfirmationWidget);
  2873. smalltalk.addMethod(
  2874. smalltalk.method({
  2875. selector: "confirm",
  2876. fn: function (){
  2877. var self=this;
  2878. return smalltalk.withContext(function($ctx1) {
  2879. _st(self._actionBlock())._value();
  2880. self._remove();
  2881. return self}, function($ctx1) {$ctx1.fill(self,"confirm",{},smalltalk.HLConfirmationWidget)})},
  2882. messageSends: ["value", "actionBlock", "remove"]}),
  2883. smalltalk.HLConfirmationWidget);
  2884. smalltalk.addMethod(
  2885. smalltalk.method({
  2886. selector: "confirmationString",
  2887. fn: function (){
  2888. var self=this;
  2889. return smalltalk.withContext(function($ctx1) {
  2890. var $2,$1;
  2891. $2=self["@confirmationString"];
  2892. if(($receiver = $2) == nil || $receiver == undefined){
  2893. $1="Confirm";
  2894. } else {
  2895. $1=$2;
  2896. };
  2897. return $1;
  2898. }, function($ctx1) {$ctx1.fill(self,"confirmationString",{},smalltalk.HLConfirmationWidget)})},
  2899. messageSends: ["ifNil:"]}),
  2900. smalltalk.HLConfirmationWidget);
  2901. smalltalk.addMethod(
  2902. smalltalk.method({
  2903. selector: "confirmationString:",
  2904. fn: function (aString){
  2905. var self=this;
  2906. return smalltalk.withContext(function($ctx1) {
  2907. self["@confirmationString"]=aString;
  2908. return self}, function($ctx1) {$ctx1.fill(self,"confirmationString:",{aString:aString},smalltalk.HLConfirmationWidget)})},
  2909. messageSends: []}),
  2910. smalltalk.HLConfirmationWidget);
  2911. smalltalk.addMethod(
  2912. smalltalk.method({
  2913. selector: "remove",
  2914. fn: function (){
  2915. var self=this;
  2916. return smalltalk.withContext(function($ctx1) {
  2917. _st(".dialog"._asJQuery())._removeClass_("active");
  2918. _st((function(){
  2919. return smalltalk.withContext(function($ctx2) {
  2920. _st("#overlay"._asJQuery())._remove();
  2921. return _st(".dialog"._asJQuery())._remove();
  2922. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithTimeout_((300));
  2923. return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLConfirmationWidget)})},
  2924. messageSends: ["removeClass:", "asJQuery", "valueWithTimeout:", "remove"]}),
  2925. smalltalk.HLConfirmationWidget);
  2926. smalltalk.addMethod(
  2927. smalltalk.method({
  2928. selector: "renderButtonsOn:",
  2929. fn: function (html){
  2930. var self=this;
  2931. var confirmButton;
  2932. return smalltalk.withContext(function($ctx1) {
  2933. var $1,$3,$4,$5,$6,$2;
  2934. $1=_st(html)._div();
  2935. _st($1)._class_("buttons");
  2936. $2=_st($1)._with_((function(){
  2937. return smalltalk.withContext(function($ctx2) {
  2938. $3=_st(html)._button();
  2939. _st($3)._class_("button");
  2940. _st($3)._with_("Cancel");
  2941. $4=_st($3)._onClick_((function(){
  2942. return smalltalk.withContext(function($ctx3) {
  2943. return self._cancel();
  2944. }, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}));
  2945. $4;
  2946. $5=_st(html)._button();
  2947. _st($5)._class_("button default");
  2948. _st($5)._with_("Confirm");
  2949. $6=_st($5)._onClick_((function(){
  2950. return smalltalk.withContext(function($ctx3) {
  2951. return self._confirm();
  2952. }, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}));
  2953. confirmButton=$6;
  2954. return confirmButton;
  2955. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2956. _st(_st(confirmButton)._asJQuery())._focus();
  2957. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,confirmButton:confirmButton},smalltalk.HLConfirmationWidget)})},
  2958. messageSends: ["class:", "div", "with:", "button", "onClick:", "cancel", "confirm", "focus", "asJQuery"]}),
  2959. smalltalk.HLConfirmationWidget);
  2960. smalltalk.addMethod(
  2961. smalltalk.method({
  2962. selector: "renderMainOn:",
  2963. fn: function (html){
  2964. var self=this;
  2965. return smalltalk.withContext(function($ctx1) {
  2966. _st(_st(html)._span())._with_(self._confirmationString());
  2967. return self}, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},smalltalk.HLConfirmationWidget)})},
  2968. messageSends: ["with:", "confirmationString", "span"]}),
  2969. smalltalk.HLConfirmationWidget);
  2970. smalltalk.addClass('HLRequestWidget', smalltalk.HLConfirmationWidget, ['input', 'value'], 'Helios-Core');
  2971. smalltalk.addMethod(
  2972. smalltalk.method({
  2973. selector: "confirm",
  2974. fn: function (){
  2975. var self=this;
  2976. return smalltalk.withContext(function($ctx1) {
  2977. _st(self._actionBlock())._value_(_st(_st(self["@input"])._asJQuery())._val());
  2978. self._remove();
  2979. return self}, function($ctx1) {$ctx1.fill(self,"confirm",{},smalltalk.HLRequestWidget)})},
  2980. messageSends: ["value:", "val", "asJQuery", "actionBlock", "remove"]}),
  2981. smalltalk.HLRequestWidget);
  2982. smalltalk.addMethod(
  2983. smalltalk.method({
  2984. selector: "cssClass",
  2985. fn: function (){
  2986. var self=this;
  2987. return smalltalk.withContext(function($ctx1) {
  2988. return "large";
  2989. }, function($ctx1) {$ctx1.fill(self,"cssClass",{},smalltalk.HLRequestWidget)})},
  2990. messageSends: []}),
  2991. smalltalk.HLRequestWidget);
  2992. smalltalk.addMethod(
  2993. smalltalk.method({
  2994. selector: "renderMainOn:",
  2995. fn: function (html){
  2996. var self=this;
  2997. return smalltalk.withContext(function($ctx1) {
  2998. smalltalk.HLRequestWidget.superclass.fn.prototype._renderMainOn_.apply(_st(self), [html]);
  2999. self["@input"]=_st(html)._textarea();
  3000. _st(_st(self["@input"])._asJQuery())._val_(self._value());
  3001. return self}, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},smalltalk.HLRequestWidget)})},
  3002. messageSends: ["renderMainOn:", "textarea", "val:", "value", "asJQuery"]}),
  3003. smalltalk.HLRequestWidget);
  3004. smalltalk.addMethod(
  3005. smalltalk.method({
  3006. selector: "value",
  3007. fn: function (){
  3008. var self=this;
  3009. return smalltalk.withContext(function($ctx1) {
  3010. var $2,$1;
  3011. $2=self["@value"];
  3012. if(($receiver = $2) == nil || $receiver == undefined){
  3013. $1="";
  3014. } else {
  3015. $1=$2;
  3016. };
  3017. return $1;
  3018. }, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.HLRequestWidget)})},
  3019. messageSends: ["ifNil:"]}),
  3020. smalltalk.HLRequestWidget);
  3021. smalltalk.addMethod(
  3022. smalltalk.method({
  3023. selector: "value:",
  3024. fn: function (aString){
  3025. var self=this;
  3026. return smalltalk.withContext(function($ctx1) {
  3027. self["@value"]=aString;
  3028. return self}, function($ctx1) {$ctx1.fill(self,"value:",{aString:aString},smalltalk.HLRequestWidget)})},
  3029. messageSends: []}),
  3030. smalltalk.HLRequestWidget);
  3031. smalltalk.addClass('HLProgressWidget', smalltalk.HLModalWidget, ['progressBars', 'visible'], 'Helios-Core');
  3032. smalltalk.addMethod(
  3033. smalltalk.method({
  3034. selector: "addProgressBar:",
  3035. fn: function (aProgressBar){
  3036. var self=this;
  3037. return smalltalk.withContext(function($ctx1) {
  3038. self._show();
  3039. _st(self._progressBars())._add_(aProgressBar);
  3040. _st(aProgressBar)._appendToJQuery_(_st(_st(self._wrapper())._asJQuery())._find_(".dialog"));
  3041. return self}, function($ctx1) {$ctx1.fill(self,"addProgressBar:",{aProgressBar:aProgressBar},smalltalk.HLProgressWidget)})},
  3042. messageSends: ["show", "add:", "progressBars", "appendToJQuery:", "find:", "asJQuery", "wrapper"]}),
  3043. smalltalk.HLProgressWidget);
  3044. smalltalk.addMethod(
  3045. smalltalk.method({
  3046. selector: "do:on:displaying:",
  3047. fn: function (aBlock,aCollection,aString){
  3048. var self=this;
  3049. var progressBar;
  3050. function $HLProgressBarWidget(){return smalltalk.HLProgressBarWidget||(typeof HLProgressBarWidget=="undefined"?nil:HLProgressBarWidget)}
  3051. return smalltalk.withContext(function($ctx1) {
  3052. var $1,$2;
  3053. $1=_st($HLProgressBarWidget())._new();
  3054. _st($1)._parent_(self);
  3055. _st($1)._label_(aString);
  3056. _st($1)._workBlock_(aBlock);
  3057. _st($1)._collection_(aCollection);
  3058. $2=_st($1)._yourself();
  3059. progressBar=$2;
  3060. self._addProgressBar_(progressBar);
  3061. _st(progressBar)._start();
  3062. return self}, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString,progressBar:progressBar},smalltalk.HLProgressWidget)})},
  3063. messageSends: ["parent:", "new", "label:", "workBlock:", "collection:", "yourself", "addProgressBar:", "start"]}),
  3064. smalltalk.HLProgressWidget);
  3065. smalltalk.addMethod(
  3066. smalltalk.method({
  3067. selector: "flush",
  3068. fn: function (){
  3069. var self=this;
  3070. return smalltalk.withContext(function($ctx1) {
  3071. _st(self._progressBars())._do_((function(each){
  3072. return smalltalk.withContext(function($ctx2) {
  3073. return self._removeProgressBar_(each);
  3074. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3075. return self}, function($ctx1) {$ctx1.fill(self,"flush",{},smalltalk.HLProgressWidget)})},
  3076. messageSends: ["do:", "removeProgressBar:", "progressBars"]}),
  3077. smalltalk.HLProgressWidget);
  3078. smalltalk.addMethod(
  3079. smalltalk.method({
  3080. selector: "isVisible",
  3081. fn: function (){
  3082. var self=this;
  3083. return smalltalk.withContext(function($ctx1) {
  3084. var $2,$1;
  3085. $2=self["@visible"];
  3086. if(($receiver = $2) == nil || $receiver == undefined){
  3087. $1=false;
  3088. } else {
  3089. $1=$2;
  3090. };
  3091. return $1;
  3092. }, function($ctx1) {$ctx1.fill(self,"isVisible",{},smalltalk.HLProgressWidget)})},
  3093. messageSends: ["ifNil:"]}),
  3094. smalltalk.HLProgressWidget);
  3095. smalltalk.addMethod(
  3096. smalltalk.method({
  3097. selector: "progressBars",
  3098. fn: function (){
  3099. var self=this;
  3100. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  3101. return smalltalk.withContext(function($ctx1) {
  3102. var $2,$1;
  3103. $2=self["@progressBars"];
  3104. if(($receiver = $2) == nil || $receiver == undefined){
  3105. self["@progressBars"]=_st($OrderedCollection())._new();
  3106. $1=self["@progressBars"];
  3107. } else {
  3108. $1=$2;
  3109. };
  3110. return $1;
  3111. }, function($ctx1) {$ctx1.fill(self,"progressBars",{},smalltalk.HLProgressWidget)})},
  3112. messageSends: ["ifNil:", "new"]}),
  3113. smalltalk.HLProgressWidget);
  3114. smalltalk.addMethod(
  3115. smalltalk.method({
  3116. selector: "remove",
  3117. fn: function (){
  3118. var self=this;
  3119. return smalltalk.withContext(function($ctx1) {
  3120. var $1;
  3121. $1=self._isVisible();
  3122. if(smalltalk.assert($1)){
  3123. self["@visible"]=false;
  3124. self["@visible"];
  3125. smalltalk.HLProgressWidget.superclass.fn.prototype._remove.apply(_st(self), []);
  3126. };
  3127. return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLProgressWidget)})},
  3128. messageSends: ["ifTrue:", "remove", "isVisible"]}),
  3129. smalltalk.HLProgressWidget);
  3130. smalltalk.addMethod(
  3131. smalltalk.method({
  3132. selector: "removeProgressBar:",
  3133. fn: function (aProgressBar){
  3134. var self=this;
  3135. return smalltalk.withContext(function($ctx1) {
  3136. _st(self._progressBars())._remove_ifAbsent_(aProgressBar,(function(){
  3137. return smalltalk.withContext(function($ctx2) {
  3138. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3139. _st(_st(_st(aProgressBar)._wrapper())._asJQuery())._remove();
  3140. _st(self._progressBars())._ifEmpty_((function(){
  3141. return smalltalk.withContext(function($ctx2) {
  3142. return self._remove();
  3143. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3144. return self}, function($ctx1) {$ctx1.fill(self,"removeProgressBar:",{aProgressBar:aProgressBar},smalltalk.HLProgressWidget)})},
  3145. messageSends: ["remove:ifAbsent:", "progressBars", "remove", "asJQuery", "wrapper", "ifEmpty:"]}),
  3146. smalltalk.HLProgressWidget);
  3147. smalltalk.addMethod(
  3148. smalltalk.method({
  3149. selector: "renderMainOn:",
  3150. fn: function (html){
  3151. var self=this;
  3152. return smalltalk.withContext(function($ctx1) {
  3153. _st(self._progressBars())._do_((function(each){
  3154. return smalltalk.withContext(function($ctx2) {
  3155. return _st(html)._with_(each);
  3156. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3157. return self}, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},smalltalk.HLProgressWidget)})},
  3158. messageSends: ["do:", "with:", "progressBars"]}),
  3159. smalltalk.HLProgressWidget);
  3160. smalltalk.addMethod(
  3161. smalltalk.method({
  3162. selector: "show",
  3163. fn: function (){
  3164. var self=this;
  3165. return smalltalk.withContext(function($ctx1) {
  3166. var $1;
  3167. $1=self._isVisible();
  3168. if(! smalltalk.assert($1)){
  3169. self["@visible"]=true;
  3170. self["@visible"];
  3171. self._appendToJQuery_("body"._asJQuery());
  3172. };
  3173. return self}, function($ctx1) {$ctx1.fill(self,"show",{},smalltalk.HLProgressWidget)})},
  3174. messageSends: ["ifFalse:", "appendToJQuery:", "asJQuery", "isVisible"]}),
  3175. smalltalk.HLProgressWidget);
  3176. smalltalk.HLProgressWidget.klass.iVarNames = ['default'];
  3177. smalltalk.addMethod(
  3178. smalltalk.method({
  3179. selector: "default",
  3180. fn: function (){
  3181. var self=this;
  3182. return smalltalk.withContext(function($ctx1) {
  3183. var $2,$1;
  3184. $2=self["@default"];
  3185. if(($receiver = $2) == nil || $receiver == undefined){
  3186. self["@default"]=self._new();
  3187. $1=self["@default"];
  3188. } else {
  3189. $1=$2;
  3190. };
  3191. return $1;
  3192. }, function($ctx1) {$ctx1.fill(self,"default",{},smalltalk.HLProgressWidget.klass)})},
  3193. messageSends: ["ifNil:", "new"]}),
  3194. smalltalk.HLProgressWidget.klass);
  3195. smalltalk.addClass('HLTabSelectionWidget', smalltalk.HLModalWidget, [], 'Helios-Core');
  3196. smalltalk.addMethod(
  3197. smalltalk.method({
  3198. selector: "renderMainOn:",
  3199. fn: function (html){
  3200. var self=this;
  3201. return smalltalk.withContext(function($ctx1) {
  3202. _st(html)._with_("hello");
  3203. return self}, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},smalltalk.HLTabSelectionWidget)})},
  3204. messageSends: ["with:"]}),
  3205. smalltalk.HLTabSelectionWidget);
  3206. smalltalk.addClass('HLProgressBarWidget', smalltalk.HLWidget, ['label', 'parent', 'workBlock', 'collection', 'bar'], 'Helios-Core');
  3207. smalltalk.addMethod(
  3208. smalltalk.method({
  3209. selector: "collection",
  3210. fn: function (){
  3211. var self=this;
  3212. return smalltalk.withContext(function($ctx1) {
  3213. var $1;
  3214. $1=self["@collection"];
  3215. return $1;
  3216. }, function($ctx1) {$ctx1.fill(self,"collection",{},smalltalk.HLProgressBarWidget)})},
  3217. messageSends: []}),
  3218. smalltalk.HLProgressBarWidget);
  3219. smalltalk.addMethod(
  3220. smalltalk.method({
  3221. selector: "collection:",
  3222. fn: function (aCollection){
  3223. var self=this;
  3224. return smalltalk.withContext(function($ctx1) {
  3225. self["@collection"]=aCollection;
  3226. return self}, function($ctx1) {$ctx1.fill(self,"collection:",{aCollection:aCollection},smalltalk.HLProgressBarWidget)})},
  3227. messageSends: []}),
  3228. smalltalk.HLProgressBarWidget);
  3229. smalltalk.addMethod(
  3230. smalltalk.method({
  3231. selector: "evaluateAt:",
  3232. fn: function (anInteger){
  3233. var self=this;
  3234. return smalltalk.withContext(function($ctx1) {
  3235. var $1;
  3236. self._updateProgress_(_st(_st(anInteger).__slash(_st(self._collection())._size())).__star((100)));
  3237. $1=_st(anInteger).__lt_eq(_st(self._collection())._size());
  3238. if(smalltalk.assert($1)){
  3239. _st((function(){
  3240. return smalltalk.withContext(function($ctx2) {
  3241. _st(self._workBlock())._value_(_st(self._collection())._at_(anInteger));
  3242. return self._evaluateAt_(_st(anInteger).__plus((1)));
  3243. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithTimeout_((10));
  3244. } else {
  3245. _st((function(){
  3246. return smalltalk.withContext(function($ctx2) {
  3247. return self._remove();
  3248. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithTimeout_((500));
  3249. };
  3250. return self}, function($ctx1) {$ctx1.fill(self,"evaluateAt:",{anInteger:anInteger},smalltalk.HLProgressBarWidget)})},
  3251. messageSends: ["updateProgress:", "*", "/", "size", "collection", "ifTrue:ifFalse:", "valueWithTimeout:", "value:", "at:", "workBlock", "evaluateAt:", "+", "remove", "<="]}),
  3252. smalltalk.HLProgressBarWidget);
  3253. smalltalk.addMethod(
  3254. smalltalk.method({
  3255. selector: "label",
  3256. fn: function (){
  3257. var self=this;
  3258. return smalltalk.withContext(function($ctx1) {
  3259. var $1;
  3260. $1=self["@label"];
  3261. return $1;
  3262. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLProgressBarWidget)})},
  3263. messageSends: []}),
  3264. smalltalk.HLProgressBarWidget);
  3265. smalltalk.addMethod(
  3266. smalltalk.method({
  3267. selector: "label:",
  3268. fn: function (aString){
  3269. var self=this;
  3270. return smalltalk.withContext(function($ctx1) {
  3271. self["@label"]=aString;
  3272. return self}, function($ctx1) {$ctx1.fill(self,"label:",{aString:aString},smalltalk.HLProgressBarWidget)})},
  3273. messageSends: []}),
  3274. smalltalk.HLProgressBarWidget);
  3275. smalltalk.addMethod(
  3276. smalltalk.method({
  3277. selector: "parent",
  3278. fn: function (){
  3279. var self=this;
  3280. return smalltalk.withContext(function($ctx1) {
  3281. var $1;
  3282. $1=self["@parent"];
  3283. return $1;
  3284. }, function($ctx1) {$ctx1.fill(self,"parent",{},smalltalk.HLProgressBarWidget)})},
  3285. messageSends: []}),
  3286. smalltalk.HLProgressBarWidget);
  3287. smalltalk.addMethod(
  3288. smalltalk.method({
  3289. selector: "parent:",
  3290. fn: function (aProgress){
  3291. var self=this;
  3292. return smalltalk.withContext(function($ctx1) {
  3293. self["@parent"]=aProgress;
  3294. return self}, function($ctx1) {$ctx1.fill(self,"parent:",{aProgress:aProgress},smalltalk.HLProgressBarWidget)})},
  3295. messageSends: []}),
  3296. smalltalk.HLProgressBarWidget);
  3297. smalltalk.addMethod(
  3298. smalltalk.method({
  3299. selector: "remove",
  3300. fn: function (){
  3301. var self=this;
  3302. return smalltalk.withContext(function($ctx1) {
  3303. _st(self._parent())._removeProgressBar_(self);
  3304. return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLProgressBarWidget)})},
  3305. messageSends: ["removeProgressBar:", "parent"]}),
  3306. smalltalk.HLProgressBarWidget);
  3307. smalltalk.addMethod(
  3308. smalltalk.method({
  3309. selector: "renderContentOn:",
  3310. fn: function (html){
  3311. var self=this;
  3312. return smalltalk.withContext(function($ctx1) {
  3313. var $1,$3,$4,$2;
  3314. _st(_st(html)._span())._with_(self._label());
  3315. $1=_st(html)._div();
  3316. _st($1)._class_("progress");
  3317. $2=_st($1)._with_((function(){
  3318. return smalltalk.withContext(function($ctx2) {
  3319. $3=_st(html)._div();
  3320. _st($3)._class_("bar");
  3321. $4=_st($3)._style_("width: 0%");
  3322. self["@bar"]=$4;
  3323. return self["@bar"];
  3324. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3325. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLProgressBarWidget)})},
  3326. messageSends: ["with:", "label", "span", "class:", "div", "style:"]}),
  3327. smalltalk.HLProgressBarWidget);
  3328. smalltalk.addMethod(
  3329. smalltalk.method({
  3330. selector: "start",
  3331. fn: function (){
  3332. var self=this;
  3333. return smalltalk.withContext(function($ctx1) {
  3334. self._evaluateAt_((1));
  3335. return self}, function($ctx1) {$ctx1.fill(self,"start",{},smalltalk.HLProgressBarWidget)})},
  3336. messageSends: ["evaluateAt:"]}),
  3337. smalltalk.HLProgressBarWidget);
  3338. smalltalk.addMethod(
  3339. smalltalk.method({
  3340. selector: "updateProgress:",
  3341. fn: function (anInteger){
  3342. var self=this;
  3343. return smalltalk.withContext(function($ctx1) {
  3344. _st(_st(self["@bar"])._asJQuery())._css_put_("width",_st(_st(anInteger)._asString()).__comma("%"));
  3345. return self}, function($ctx1) {$ctx1.fill(self,"updateProgress:",{anInteger:anInteger},smalltalk.HLProgressBarWidget)})},
  3346. messageSends: ["css:put:", ",", "asString", "asJQuery"]}),
  3347. smalltalk.HLProgressBarWidget);
  3348. smalltalk.addMethod(
  3349. smalltalk.method({
  3350. selector: "workBlock",
  3351. fn: function (){
  3352. var self=this;
  3353. return smalltalk.withContext(function($ctx1) {
  3354. var $1;
  3355. $1=self["@workBlock"];
  3356. return $1;
  3357. }, function($ctx1) {$ctx1.fill(self,"workBlock",{},smalltalk.HLProgressBarWidget)})},
  3358. messageSends: []}),
  3359. smalltalk.HLProgressBarWidget);
  3360. smalltalk.addMethod(
  3361. smalltalk.method({
  3362. selector: "workBlock:",
  3363. fn: function (aBlock){
  3364. var self=this;
  3365. return smalltalk.withContext(function($ctx1) {
  3366. self["@workBlock"]=aBlock;
  3367. return self}, function($ctx1) {$ctx1.fill(self,"workBlock:",{aBlock:aBlock},smalltalk.HLProgressBarWidget)})},
  3368. messageSends: []}),
  3369. smalltalk.HLProgressBarWidget);
  3370. smalltalk.HLProgressBarWidget.klass.iVarNames = ['default'];
  3371. smalltalk.addMethod(
  3372. smalltalk.method({
  3373. selector: "default",
  3374. fn: function (){
  3375. var self=this;
  3376. return smalltalk.withContext(function($ctx1) {
  3377. var $2,$1;
  3378. $2=self["@default"];
  3379. if(($receiver = $2) == nil || $receiver == undefined){
  3380. self["@default"]=self._new();
  3381. $1=self["@default"];
  3382. } else {
  3383. $1=$2;
  3384. };
  3385. return $1;
  3386. }, function($ctx1) {$ctx1.fill(self,"default",{},smalltalk.HLProgressBarWidget.klass)})},
  3387. messageSends: ["ifNil:", "new"]}),
  3388. smalltalk.HLProgressBarWidget.klass);
  3389. smalltalk.addClass('HLSUnit', smalltalk.HLWidget, [], 'Helios-Core');
  3390. smalltalk.addMethod(
  3391. smalltalk.method({
  3392. selector: "canBeOpenAsTab",
  3393. fn: function (){
  3394. var self=this;
  3395. return smalltalk.withContext(function($ctx1) {
  3396. return true;
  3397. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLSUnit.klass)})},
  3398. messageSends: []}),
  3399. smalltalk.HLSUnit.klass);
  3400. smalltalk.addMethod(
  3401. smalltalk.method({
  3402. selector: "tabClass",
  3403. fn: function (){
  3404. var self=this;
  3405. return smalltalk.withContext(function($ctx1) {
  3406. return "sunit";
  3407. }, function($ctx1) {$ctx1.fill(self,"tabClass",{},smalltalk.HLSUnit.klass)})},
  3408. messageSends: []}),
  3409. smalltalk.HLSUnit.klass);
  3410. smalltalk.addMethod(
  3411. smalltalk.method({
  3412. selector: "tabLabel",
  3413. fn: function (){
  3414. var self=this;
  3415. return smalltalk.withContext(function($ctx1) {
  3416. return "SUnit";
  3417. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLSUnit.klass)})},
  3418. messageSends: []}),
  3419. smalltalk.HLSUnit.klass);
  3420. smalltalk.addMethod(
  3421. smalltalk.method({
  3422. selector: "tabPriority",
  3423. fn: function (){
  3424. var self=this;
  3425. return smalltalk.withContext(function($ctx1) {
  3426. return (1000);
  3427. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLSUnit.klass)})},
  3428. messageSends: []}),
  3429. smalltalk.HLSUnit.klass);
  3430. })(global_smalltalk,global_nil,global__st);