Helios-Core.deploy.js 127 KB

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