1
0

Helios-Core.deploy.js 126 KB

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