Helios-Core.deploy.js 126 KB

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