1
0

Helios-Core.deploy.js 111 KB

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