1
0

Helios-Core.deploy.js 125 KB

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