2
0

Helios-Core.deploy.js 110 KB

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