Helios-Core.deploy.js 111 KB

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