Helios-Core.deploy.js 104 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072
  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: "unregister",
  1168. fn: function (){
  1169. var self=this;
  1170. return smalltalk.withContext(function($ctx1) {
  1171. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLWidget)})},
  1172. messageSends: []}),
  1173. smalltalk.HLWidget);
  1174. smalltalk.addMethod(
  1175. smalltalk.method({
  1176. selector: "wrapper",
  1177. fn: function (){
  1178. var self=this;
  1179. return smalltalk.withContext(function($ctx1) {
  1180. var $1;
  1181. $1=self["@wrapper"];
  1182. return $1;
  1183. }, function($ctx1) {$ctx1.fill(self,"wrapper",{},smalltalk.HLWidget)})},
  1184. messageSends: []}),
  1185. smalltalk.HLWidget);
  1186. smalltalk.addMethod(
  1187. smalltalk.method({
  1188. selector: "canBeOpenAsTab",
  1189. fn: function (){
  1190. var self=this;
  1191. return smalltalk.withContext(function($ctx1) {
  1192. return false;
  1193. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLWidget.klass)})},
  1194. messageSends: []}),
  1195. smalltalk.HLWidget.klass);
  1196. smalltalk.addMethod(
  1197. smalltalk.method({
  1198. selector: "openAsTab",
  1199. fn: function (){
  1200. var self=this;
  1201. function $HLTab(){return smalltalk.HLTab||(typeof HLTab=="undefined"?nil:HLTab)}
  1202. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  1203. return smalltalk.withContext(function($ctx1) {
  1204. var $1,$2;
  1205. $1=_st(self)._canBeOpenAsTab();
  1206. if(! smalltalk.assert($1)){
  1207. $2=self;
  1208. return $2;
  1209. };
  1210. _st(_st($HLManager())._current())._addTab_(_st($HLTab())._on_labelled_(_st(self)._new(),_st(self)._tabLabel()));
  1211. return self}, function($ctx1) {$ctx1.fill(self,"openAsTab",{},smalltalk.HLWidget.klass)})},
  1212. messageSends: ["ifFalse:", "canBeOpenAsTab", "addTab:", "on:labelled:", "new", "tabLabel", "current"]}),
  1213. smalltalk.HLWidget.klass);
  1214. smalltalk.addMethod(
  1215. smalltalk.method({
  1216. selector: "tabLabel",
  1217. fn: function (){
  1218. var self=this;
  1219. return smalltalk.withContext(function($ctx1) {
  1220. return "Tab";
  1221. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLWidget.klass)})},
  1222. messageSends: []}),
  1223. smalltalk.HLWidget.klass);
  1224. smalltalk.addMethod(
  1225. smalltalk.method({
  1226. selector: "tabPriority",
  1227. fn: function (){
  1228. var self=this;
  1229. return smalltalk.withContext(function($ctx1) {
  1230. var $1;
  1231. $1=(500);
  1232. return $1;
  1233. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLWidget.klass)})},
  1234. messageSends: []}),
  1235. smalltalk.HLWidget.klass);
  1236. smalltalk.addClass('HLConfirmation', smalltalk.HLWidget, ['confirmationString', 'actionBlock', 'cancelBlock'], 'Helios-Core');
  1237. smalltalk.addMethod(
  1238. smalltalk.method({
  1239. selector: "actionBlock",
  1240. fn: function (){
  1241. var self=this;
  1242. return smalltalk.withContext(function($ctx1) {
  1243. var $2,$1;
  1244. $2=self["@actionBlock"];
  1245. if(($receiver = $2) == nil || $receiver == undefined){
  1246. $1=(function(){
  1247. return smalltalk.withContext(function($ctx2) {
  1248. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  1249. } else {
  1250. $1=$2;
  1251. };
  1252. return $1;
  1253. }, function($ctx1) {$ctx1.fill(self,"actionBlock",{},smalltalk.HLConfirmation)})},
  1254. messageSends: ["ifNil:"]}),
  1255. smalltalk.HLConfirmation);
  1256. smalltalk.addMethod(
  1257. smalltalk.method({
  1258. selector: "actionBlock:",
  1259. fn: function (aBlock){
  1260. var self=this;
  1261. return smalltalk.withContext(function($ctx1) {
  1262. self["@actionBlock"]=aBlock;
  1263. return self}, function($ctx1) {$ctx1.fill(self,"actionBlock:",{aBlock:aBlock},smalltalk.HLConfirmation)})},
  1264. messageSends: []}),
  1265. smalltalk.HLConfirmation);
  1266. smalltalk.addMethod(
  1267. smalltalk.method({
  1268. selector: "cancel",
  1269. fn: function (){
  1270. var self=this;
  1271. return smalltalk.withContext(function($ctx1) {
  1272. _st(_st(self)._cancelBlock())._value();
  1273. _st(self)._remove();
  1274. return self}, function($ctx1) {$ctx1.fill(self,"cancel",{},smalltalk.HLConfirmation)})},
  1275. messageSends: ["value", "cancelBlock", "remove"]}),
  1276. smalltalk.HLConfirmation);
  1277. smalltalk.addMethod(
  1278. smalltalk.method({
  1279. selector: "cancelBlock",
  1280. fn: function (){
  1281. var self=this;
  1282. return smalltalk.withContext(function($ctx1) {
  1283. var $2,$1;
  1284. $2=self["@cancelBlock"];
  1285. if(($receiver = $2) == nil || $receiver == undefined){
  1286. $1=(function(){
  1287. return smalltalk.withContext(function($ctx2) {
  1288. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  1289. } else {
  1290. $1=$2;
  1291. };
  1292. return $1;
  1293. }, function($ctx1) {$ctx1.fill(self,"cancelBlock",{},smalltalk.HLConfirmation)})},
  1294. messageSends: ["ifNil:"]}),
  1295. smalltalk.HLConfirmation);
  1296. smalltalk.addMethod(
  1297. smalltalk.method({
  1298. selector: "cancelBlock:",
  1299. fn: function (aBlock){
  1300. var self=this;
  1301. return smalltalk.withContext(function($ctx1) {
  1302. self["@cancelBlock"]=aBlock;
  1303. return self}, function($ctx1) {$ctx1.fill(self,"cancelBlock:",{aBlock:aBlock},smalltalk.HLConfirmation)})},
  1304. messageSends: []}),
  1305. smalltalk.HLConfirmation);
  1306. smalltalk.addMethod(
  1307. smalltalk.method({
  1308. selector: "confirm",
  1309. fn: function (){
  1310. var self=this;
  1311. return smalltalk.withContext(function($ctx1) {
  1312. _st(_st(self)._actionBlock())._value();
  1313. _st(self)._remove();
  1314. return self}, function($ctx1) {$ctx1.fill(self,"confirm",{},smalltalk.HLConfirmation)})},
  1315. messageSends: ["value", "actionBlock", "remove"]}),
  1316. smalltalk.HLConfirmation);
  1317. smalltalk.addMethod(
  1318. smalltalk.method({
  1319. selector: "confirmationString",
  1320. fn: function (){
  1321. var self=this;
  1322. return smalltalk.withContext(function($ctx1) {
  1323. var $2,$1;
  1324. $2=self["@confirmationString"];
  1325. if(($receiver = $2) == nil || $receiver == undefined){
  1326. $1="Confirm";
  1327. } else {
  1328. $1=$2;
  1329. };
  1330. return $1;
  1331. }, function($ctx1) {$ctx1.fill(self,"confirmationString",{},smalltalk.HLConfirmation)})},
  1332. messageSends: ["ifNil:"]}),
  1333. smalltalk.HLConfirmation);
  1334. smalltalk.addMethod(
  1335. smalltalk.method({
  1336. selector: "confirmationString:",
  1337. fn: function (aString){
  1338. var self=this;
  1339. return smalltalk.withContext(function($ctx1) {
  1340. self["@confirmationString"]=aString;
  1341. return self}, function($ctx1) {$ctx1.fill(self,"confirmationString:",{aString:aString},smalltalk.HLConfirmation)})},
  1342. messageSends: []}),
  1343. smalltalk.HLConfirmation);
  1344. smalltalk.addMethod(
  1345. smalltalk.method({
  1346. selector: "remove",
  1347. fn: function (){
  1348. var self=this;
  1349. return smalltalk.withContext(function($ctx1) {
  1350. _st(_st(window)._jQuery_(".confirmation"))._removeClass_("active");
  1351. _st((function(){
  1352. return smalltalk.withContext(function($ctx2) {
  1353. _st(_st(window)._jQuery_("#overlay"))._remove();
  1354. return _st(_st(window)._jQuery_(".confirmation"))._remove();
  1355. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithTimeout_((300));
  1356. return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLConfirmation)})},
  1357. messageSends: ["removeClass:", "jQuery:", "valueWithTimeout:", "remove"]}),
  1358. smalltalk.HLConfirmation);
  1359. smalltalk.addMethod(
  1360. smalltalk.method({
  1361. selector: "renderContentOn:",
  1362. fn: function (html){
  1363. var self=this;
  1364. var confirmButton;
  1365. return smalltalk.withContext(function($ctx1) {
  1366. var $1,$3,$5,$6,$7,$8,$4,$2;
  1367. _st(_st(html)._div())._id_("overlay");
  1368. $1=_st(html)._div();
  1369. _st($1)._class_("confirmation");
  1370. $2=_st($1)._with_((function(){
  1371. return smalltalk.withContext(function($ctx2) {
  1372. _st(_st(html)._span())._with_(_st(self)._confirmationString());
  1373. $3=_st(html)._div();
  1374. _st($3)._class_("buttons");
  1375. $4=_st($3)._with_((function(){
  1376. return smalltalk.withContext(function($ctx3) {
  1377. $5=_st(html)._button();
  1378. _st($5)._class_("button");
  1379. _st($5)._with_("Cancel");
  1380. $6=_st($5)._onClick_((function(){
  1381. return smalltalk.withContext(function($ctx4) {
  1382. return _st(self)._cancel();
  1383. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  1384. $6;
  1385. $7=_st(html)._button();
  1386. _st($7)._class_("button default");
  1387. _st($7)._with_("Confirm");
  1388. $8=_st($7)._onClick_((function(){
  1389. return smalltalk.withContext(function($ctx4) {
  1390. return _st(self)._confirm();
  1391. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  1392. confirmButton=$8;
  1393. return confirmButton;
  1394. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1395. return $4;
  1396. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1397. _st(_st(confirmButton)._asJQuery())._focus();
  1398. _st(_st(window)._jQuery_(".confirmation"))._addClass_("active");
  1399. _st(self)._setupKeyBindings();
  1400. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html,confirmButton:confirmButton},smalltalk.HLConfirmation)})},
  1401. messageSends: ["id:", "div", "class:", "with:", "confirmationString", "span", "button", "onClick:", "cancel", "confirm", "focus", "asJQuery", "addClass:", "jQuery:", "setupKeyBindings"]}),
  1402. smalltalk.HLConfirmation);
  1403. smalltalk.addMethod(
  1404. smalltalk.method({
  1405. selector: "setupKeyBindings",
  1406. fn: function (){
  1407. var self=this;
  1408. return smalltalk.withContext(function($ctx1) {
  1409. var $1;
  1410. _st(_st(window)._jQuery_(".confirmation"))._keyup_((function(e){
  1411. return smalltalk.withContext(function($ctx2) {
  1412. $1=_st(_st(e)._keyCode()).__eq((27));
  1413. if(smalltalk.assert($1)){
  1414. return _st(self)._cancel();
  1415. };
  1416. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  1417. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},smalltalk.HLConfirmation)})},
  1418. messageSends: ["keyup:", "ifTrue:", "cancel", "=", "keyCode", "jQuery:"]}),
  1419. smalltalk.HLConfirmation);
  1420. smalltalk.addClass('HLDebugger', smalltalk.HLWidget, [], 'Helios-Core');
  1421. smalltalk.addClass('HLFocusableWidget', smalltalk.HLWidget, [], 'Helios-Core');
  1422. smalltalk.addMethod(
  1423. smalltalk.method({
  1424. selector: "blur",
  1425. fn: function (){
  1426. var self=this;
  1427. return smalltalk.withContext(function($ctx1) {
  1428. _st(_st(_st(self)._wrapper())._asJQuery())._blur();
  1429. return self}, function($ctx1) {$ctx1.fill(self,"blur",{},smalltalk.HLFocusableWidget)})},
  1430. messageSends: ["blur", "asJQuery", "wrapper"]}),
  1431. smalltalk.HLFocusableWidget);
  1432. smalltalk.addMethod(
  1433. smalltalk.method({
  1434. selector: "canHaveFocus",
  1435. fn: function (){
  1436. var self=this;
  1437. return smalltalk.withContext(function($ctx1) {
  1438. return true;
  1439. }, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLFocusableWidget)})},
  1440. messageSends: []}),
  1441. smalltalk.HLFocusableWidget);
  1442. smalltalk.addMethod(
  1443. smalltalk.method({
  1444. selector: "focus",
  1445. fn: function (){
  1446. var self=this;
  1447. return smalltalk.withContext(function($ctx1) {
  1448. _st(_st(_st(self)._wrapper())._asJQuery())._focus();
  1449. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLFocusableWidget)})},
  1450. messageSends: ["focus", "asJQuery", "wrapper"]}),
  1451. smalltalk.HLFocusableWidget);
  1452. smalltalk.addMethod(
  1453. smalltalk.method({
  1454. selector: "focusClass",
  1455. fn: function (){
  1456. var self=this;
  1457. return smalltalk.withContext(function($ctx1) {
  1458. return "focused";
  1459. }, function($ctx1) {$ctx1.fill(self,"focusClass",{},smalltalk.HLFocusableWidget)})},
  1460. messageSends: []}),
  1461. smalltalk.HLFocusableWidget);
  1462. smalltalk.addMethod(
  1463. smalltalk.method({
  1464. selector: "hasFocus",
  1465. fn: function (){
  1466. var self=this;
  1467. return smalltalk.withContext(function($ctx1) {
  1468. var $1;
  1469. $1=_st(_st(_st(self)._wrapper())._notNil())._and_((function(){
  1470. return smalltalk.withContext(function($ctx2) {
  1471. return _st(_st(_st(self)._wrapper())._asJQuery())._is_(":focus");
  1472. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1473. return $1;
  1474. }, function($ctx1) {$ctx1.fill(self,"hasFocus",{},smalltalk.HLFocusableWidget)})},
  1475. messageSends: ["and:", "is:", "asJQuery", "wrapper", "notNil"]}),
  1476. smalltalk.HLFocusableWidget);
  1477. smalltalk.addMethod(
  1478. smalltalk.method({
  1479. selector: "renderContentOn:",
  1480. fn: function (html){
  1481. var self=this;
  1482. return smalltalk.withContext(function($ctx1) {
  1483. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLFocusableWidget)})},
  1484. messageSends: []}),
  1485. smalltalk.HLFocusableWidget);
  1486. smalltalk.addMethod(
  1487. smalltalk.method({
  1488. selector: "renderOn:",
  1489. fn: function (html){
  1490. var self=this;
  1491. return smalltalk.withContext(function($ctx1) {
  1492. var $1,$2,$3,$4;
  1493. _st(self)._registerBindings();
  1494. $1=_st(html)._div();
  1495. _st($1)._class_("hl_widget");
  1496. $2=_st($1)._yourself();
  1497. self["@wrapper"]=$2;
  1498. _st(self["@wrapper"])._with_((function(){
  1499. return smalltalk.withContext(function($ctx2) {
  1500. return _st(self)._renderContentOn_(html);
  1501. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1502. $3=self["@wrapper"];
  1503. _st($3)._at_put_("tabindex","0");
  1504. _st($3)._onBlur_((function(){
  1505. return smalltalk.withContext(function($ctx2) {
  1506. return _st(_st(_st(self)._wrapper())._asJQuery())._removeClass_(_st(self)._focusClass());
  1507. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1508. $4=_st($3)._onFocus_((function(){
  1509. return smalltalk.withContext(function($ctx2) {
  1510. return _st(_st(_st(self)._wrapper())._asJQuery())._addClass_(_st(self)._focusClass());
  1511. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1512. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLFocusableWidget)})},
  1513. messageSends: ["registerBindings", "class:", "div", "yourself", "with:", "renderContentOn:", "at:put:", "onBlur:", "removeClass:", "focusClass", "asJQuery", "wrapper", "onFocus:", "addClass:"]}),
  1514. smalltalk.HLFocusableWidget);
  1515. smalltalk.addClass('HLListWidget', smalltalk.HLFocusableWidget, ['items', 'selectedItem', 'mapping'], 'Helios-Core');
  1516. smalltalk.addMethod(
  1517. smalltalk.method({
  1518. selector: "activateFirstListItem",
  1519. fn: function (){
  1520. var self=this;
  1521. return smalltalk.withContext(function($ctx1) {
  1522. _st(self)._activateListItem_(_st(window)._jQuery_(_st(_st(_st(self["@wrapper"])._asJQuery())._find_("li.inactive"))._get_((0))));
  1523. return self}, function($ctx1) {$ctx1.fill(self,"activateFirstListItem",{},smalltalk.HLListWidget)})},
  1524. messageSends: ["activateListItem:", "jQuery:", "get:", "find:", "asJQuery"]}),
  1525. smalltalk.HLListWidget);
  1526. smalltalk.addMethod(
  1527. smalltalk.method({
  1528. selector: "activateItem:",
  1529. fn: function (anObject){
  1530. var self=this;
  1531. return smalltalk.withContext(function($ctx1) {
  1532. var $1;
  1533. var $early={};
  1534. try {
  1535. _st(self)._activateListItem_(_st(_st(self["@mapping"])._at_ifAbsent_(anObject,(function(){
  1536. return smalltalk.withContext(function($ctx2) {
  1537. $1=self;
  1538. throw $early=[$1];
  1539. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._asJQuery());
  1540. return self}
  1541. catch(e) {if(e===$early)return e[0]; throw e}
  1542. }, function($ctx1) {$ctx1.fill(self,"activateItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  1543. messageSends: ["activateListItem:", "asJQuery", "at:ifAbsent:"]}),
  1544. smalltalk.HLListWidget);
  1545. smalltalk.addMethod(
  1546. smalltalk.method({
  1547. selector: "activateListItem:",
  1548. fn: function (aListItem){
  1549. var self=this;
  1550. var item;
  1551. return smalltalk.withContext(function($ctx1) {
  1552. var $1,$2,$3;
  1553. $1=_st(aListItem)._get_((0));
  1554. if(($receiver = $1) == nil || $receiver == undefined){
  1555. $2=self;
  1556. return $2;
  1557. } else {
  1558. $1;
  1559. };
  1560. _st(_st(_st(aListItem)._parent())._children())._removeClass_("active");
  1561. _st(aListItem)._addClass_("active");
  1562. _st(self)._ensureVisible_(aListItem);
  1563. item=_st(_st(self)._items())._at_(_st(_st(aListItem)._attr_("list-data"))._asNumber());
  1564. $3=_st(_st(self)._selectedItem()).__eq_eq(item);
  1565. if(! smalltalk.assert($3)){
  1566. _st(self)._selectItem_(item);
  1567. };
  1568. return self}, function($ctx1) {$ctx1.fill(self,"activateListItem:",{aListItem:aListItem,item:item},smalltalk.HLListWidget)})},
  1569. messageSends: ["ifNil:", "get:", "removeClass:", "children", "parent", "addClass:", "ensureVisible:", "at:", "asNumber", "attr:", "items", "ifFalse:", "selectItem:", "==", "selectedItem"]}),
  1570. smalltalk.HLListWidget);
  1571. smalltalk.addMethod(
  1572. smalltalk.method({
  1573. selector: "activateNextListItem",
  1574. fn: function (){
  1575. var self=this;
  1576. return smalltalk.withContext(function($ctx1) {
  1577. _st(self)._activateListItem_(_st(_st(window)._jQuery_(".focused .nav-pills .active"))._next());
  1578. _st(_st(_st(window)._jQuery_(".focused .nav-pills .active"))._get())._ifEmpty_((function(){
  1579. return smalltalk.withContext(function($ctx2) {
  1580. return _st(self)._activateFirstListItem();
  1581. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1582. return self}, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},smalltalk.HLListWidget)})},
  1583. messageSends: ["activateListItem:", "next", "jQuery:", "ifEmpty:", "activateFirstListItem", "get"]}),
  1584. smalltalk.HLListWidget);
  1585. smalltalk.addMethod(
  1586. smalltalk.method({
  1587. selector: "activatePreviousListItem",
  1588. fn: function (){
  1589. var self=this;
  1590. return smalltalk.withContext(function($ctx1) {
  1591. _st(self)._activateListItem_(_st(_st(window)._jQuery_(".focused .nav-pills .active"))._prev());
  1592. return self}, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},smalltalk.HLListWidget)})},
  1593. messageSends: ["activateListItem:", "prev", "jQuery:"]}),
  1594. smalltalk.HLListWidget);
  1595. smalltalk.addMethod(
  1596. smalltalk.method({
  1597. selector: "cssClassForItem:",
  1598. fn: function (anObject){
  1599. var self=this;
  1600. return smalltalk.withContext(function($ctx1) {
  1601. var $2,$1;
  1602. $2=_st(_st(self)._selectedItem()).__eq(anObject);
  1603. if(smalltalk.assert($2)){
  1604. $1="active";
  1605. } else {
  1606. $1="inactive";
  1607. };
  1608. return $1;
  1609. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  1610. messageSends: ["ifTrue:ifFalse:", "=", "selectedItem"]}),
  1611. smalltalk.HLListWidget);
  1612. smalltalk.addMethod(
  1613. smalltalk.method({
  1614. selector: "defaultItems",
  1615. fn: function (){
  1616. var self=this;
  1617. return smalltalk.withContext(function($ctx1) {
  1618. var $1;
  1619. $1=[];
  1620. return $1;
  1621. }, function($ctx1) {$ctx1.fill(self,"defaultItems",{},smalltalk.HLListWidget)})},
  1622. messageSends: []}),
  1623. smalltalk.HLListWidget);
  1624. smalltalk.addMethod(
  1625. smalltalk.method({
  1626. selector: "ensureVisible:",
  1627. fn: function (aListItem){
  1628. var self=this;
  1629. var perent,position;
  1630. return smalltalk.withContext(function($ctx1) {
  1631. var $1,$2;
  1632. position=_st(self)._positionOf_(aListItem);
  1633. parent=_st(aListItem)._parent();
  1634. $1=_st(_st(_st(aListItem)._position())._top()).__lt((0));
  1635. if(smalltalk.assert($1)){
  1636. _st(_st(parent)._get_((0)))._scrollTop_(_st(_st(_st(_st(parent)._get_((0)))._scrollTop()).__plus(_st(_st(aListItem)._position())._top())).__minus((10)));
  1637. };
  1638. $2=_st(_st(_st(_st(aListItem)._position())._top()).__plus(_st(aListItem)._height())).__gt(_st(parent)._height());
  1639. if(smalltalk.assert($2)){
  1640. _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)));
  1641. };
  1642. return self}, function($ctx1) {$ctx1.fill(self,"ensureVisible:",{aListItem:aListItem,perent:perent,position:position},smalltalk.HLListWidget)})},
  1643. messageSends: ["positionOf:", "parent", "ifTrue:", "scrollTop:", "-", "+", "top", "position", "scrollTop", "get:", "<", "height", ">"]}),
  1644. smalltalk.HLListWidget);
  1645. smalltalk.addMethod(
  1646. smalltalk.method({
  1647. selector: "focus",
  1648. fn: function (){
  1649. var self=this;
  1650. return smalltalk.withContext(function($ctx1) {
  1651. var $1,$2;
  1652. smalltalk.HLFocusableWidget.fn.prototype._focus.apply(_st(self), []);
  1653. $1=_st(_st(self)._items())._isEmpty();
  1654. if(! smalltalk.assert($1)){
  1655. $2=_st(self)._selectedItem();
  1656. if(($receiver = $2) == nil || $receiver == undefined){
  1657. _st(self)._activateFirstListItem();
  1658. } else {
  1659. $2;
  1660. };
  1661. };
  1662. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLListWidget)})},
  1663. messageSends: ["focus", "ifFalse:", "ifNil:", "activateFirstListItem", "selectedItem", "isEmpty", "items"]}),
  1664. smalltalk.HLListWidget);
  1665. smalltalk.addMethod(
  1666. smalltalk.method({
  1667. selector: "iconForItem:",
  1668. fn: function (anObject){
  1669. var self=this;
  1670. return smalltalk.withContext(function($ctx1) {
  1671. return "";
  1672. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  1673. messageSends: []}),
  1674. smalltalk.HLListWidget);
  1675. smalltalk.addMethod(
  1676. smalltalk.method({
  1677. selector: "initialize",
  1678. fn: function (){
  1679. var self=this;
  1680. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  1681. return smalltalk.withContext(function($ctx1) {
  1682. smalltalk.HLFocusableWidget.fn.prototype._initialize.apply(_st(self), []);
  1683. self["@mapping"]=_st($Dictionary())._new();
  1684. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLListWidget)})},
  1685. messageSends: ["initialize", "new"]}),
  1686. smalltalk.HLListWidget);
  1687. smalltalk.addMethod(
  1688. smalltalk.method({
  1689. selector: "items",
  1690. fn: function (){
  1691. var self=this;
  1692. return smalltalk.withContext(function($ctx1) {
  1693. var $2,$1;
  1694. $2=self["@items"];
  1695. if(($receiver = $2) == nil || $receiver == undefined){
  1696. self["@items"]=_st(self)._defaultItems();
  1697. $1=self["@items"];
  1698. } else {
  1699. $1=$2;
  1700. };
  1701. return $1;
  1702. }, function($ctx1) {$ctx1.fill(self,"items",{},smalltalk.HLListWidget)})},
  1703. messageSends: ["ifNil:", "defaultItems"]}),
  1704. smalltalk.HLListWidget);
  1705. smalltalk.addMethod(
  1706. smalltalk.method({
  1707. selector: "items:",
  1708. fn: function (aCollection){
  1709. var self=this;
  1710. return smalltalk.withContext(function($ctx1) {
  1711. self["@items"]=aCollection;
  1712. return self}, function($ctx1) {$ctx1.fill(self,"items:",{aCollection:aCollection},smalltalk.HLListWidget)})},
  1713. messageSends: []}),
  1714. smalltalk.HLListWidget);
  1715. smalltalk.addMethod(
  1716. smalltalk.method({
  1717. selector: "positionOf:",
  1718. fn: function (aListItem){
  1719. var self=this;
  1720. return smalltalk.withContext(function($ctx1) {
  1721. return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1
  1722. ;
  1723. return self}, function($ctx1) {$ctx1.fill(self,"positionOf:",{aListItem:aListItem},smalltalk.HLListWidget)})},
  1724. messageSends: []}),
  1725. smalltalk.HLListWidget);
  1726. smalltalk.addMethod(
  1727. smalltalk.method({
  1728. selector: "refresh",
  1729. fn: function (){
  1730. var self=this;
  1731. return smalltalk.withContext(function($ctx1) {
  1732. var $1;
  1733. var $early={};
  1734. try {
  1735. smalltalk.HLFocusableWidget.fn.prototype._refresh.apply(_st(self), []);
  1736. _st(self)._ensureVisible_(_st(_st(self["@mapping"])._at_ifAbsent_(_st(self)._selectedItem(),(function(){
  1737. return smalltalk.withContext(function($ctx2) {
  1738. $1=self;
  1739. throw $early=[$1];
  1740. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._asJQuery());
  1741. return self}
  1742. catch(e) {if(e===$early)return e[0]; throw e}
  1743. }, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLListWidget)})},
  1744. messageSends: ["refresh", "ensureVisible:", "asJQuery", "at:ifAbsent:", "selectedItem"]}),
  1745. smalltalk.HLListWidget);
  1746. smalltalk.addMethod(
  1747. smalltalk.method({
  1748. selector: "registerMappingFrom:to:",
  1749. fn: function (anObject,aTag){
  1750. var self=this;
  1751. return smalltalk.withContext(function($ctx1) {
  1752. _st(self["@mapping"])._at_put_(anObject,aTag);
  1753. return self}, function($ctx1) {$ctx1.fill(self,"registerMappingFrom:to:",{anObject:anObject,aTag:aTag},smalltalk.HLListWidget)})},
  1754. messageSends: ["at:put:"]}),
  1755. smalltalk.HLListWidget);
  1756. smalltalk.addMethod(
  1757. smalltalk.method({
  1758. selector: "renderButtonsOn:",
  1759. fn: function (html){
  1760. var self=this;
  1761. return smalltalk.withContext(function($ctx1) {
  1762. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLListWidget)})},
  1763. messageSends: []}),
  1764. smalltalk.HLListWidget);
  1765. smalltalk.addMethod(
  1766. smalltalk.method({
  1767. selector: "renderContentOn:",
  1768. fn: function (html){
  1769. var self=this;
  1770. return smalltalk.withContext(function($ctx1) {
  1771. var $1,$2,$3,$4;
  1772. $1=_st(html)._ul();
  1773. _st($1)._class_("nav nav-pills nav-stacked");
  1774. $2=_st($1)._with_((function(){
  1775. return smalltalk.withContext(function($ctx2) {
  1776. return _st(self)._renderListOn_(html);
  1777. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1778. $3=_st(html)._div();
  1779. _st($3)._class_("pane_actions form-actions");
  1780. $4=_st($3)._with_((function(){
  1781. return smalltalk.withContext(function($ctx2) {
  1782. return _st(self)._renderButtonsOn_(html);
  1783. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1784. _st(self)._setupKeyBindings();
  1785. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLListWidget)})},
  1786. messageSends: ["class:", "ul", "with:", "renderListOn:", "div", "renderButtonsOn:", "setupKeyBindings"]}),
  1787. smalltalk.HLListWidget);
  1788. smalltalk.addMethod(
  1789. smalltalk.method({
  1790. selector: "renderItem:on:",
  1791. fn: function (anObject,html){
  1792. var self=this;
  1793. var li;
  1794. return smalltalk.withContext(function($ctx1) {
  1795. var $1,$3,$4,$2;
  1796. li=_st(html)._li();
  1797. _st(self)._registerMappingFrom_to_(anObject,li);
  1798. $1=li;
  1799. _st($1)._class_(_st(self)._cssClassForItem_(anObject));
  1800. _st($1)._at_put_("list-data",_st(_st(_st(self)._items())._indexOf_(anObject))._asString());
  1801. $2=_st($1)._with_((function(){
  1802. return smalltalk.withContext(function($ctx2) {
  1803. $3=_st(html)._a();
  1804. _st($3)._with_((function(){
  1805. return smalltalk.withContext(function($ctx3) {
  1806. _st(_st(html)._tag_("i"))._class_(_st(self)._iconForItem_(anObject));
  1807. return _st(self)._renderItemLabel_on_(anObject,html);
  1808. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1809. $4=_st($3)._onClick_((function(){
  1810. return smalltalk.withContext(function($ctx3) {
  1811. return _st(self)._activateListItem_(_st(li)._asJQuery());
  1812. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1813. return $4;
  1814. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1815. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{anObject:anObject,html:html,li:li},smalltalk.HLListWidget)})},
  1816. messageSends: ["li", "registerMappingFrom:to:", "class:", "cssClassForItem:", "at:put:", "asString", "indexOf:", "items", "with:", "iconForItem:", "tag:", "renderItemLabel:on:", "a", "onClick:", "activateListItem:", "asJQuery"]}),
  1817. smalltalk.HLListWidget);
  1818. smalltalk.addMethod(
  1819. smalltalk.method({
  1820. selector: "renderItemLabel:on:",
  1821. fn: function (anObject,html){
  1822. var self=this;
  1823. return smalltalk.withContext(function($ctx1) {
  1824. _st(html)._with_(_st(anObject)._asString());
  1825. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{anObject:anObject,html:html},smalltalk.HLListWidget)})},
  1826. messageSends: ["with:", "asString"]}),
  1827. smalltalk.HLListWidget);
  1828. smalltalk.addMethod(
  1829. smalltalk.method({
  1830. selector: "renderListOn:",
  1831. fn: function (html){
  1832. var self=this;
  1833. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  1834. return smalltalk.withContext(function($ctx1) {
  1835. self["@mapping"]=_st($Dictionary())._new();
  1836. _st(_st(self)._items())._do_((function(each){
  1837. return smalltalk.withContext(function($ctx2) {
  1838. return _st(self)._renderItem_on_(each,html);
  1839. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1840. return self}, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html},smalltalk.HLListWidget)})},
  1841. messageSends: ["new", "do:", "renderItem:on:", "items"]}),
  1842. smalltalk.HLListWidget);
  1843. smalltalk.addMethod(
  1844. smalltalk.method({
  1845. selector: "selectItem:",
  1846. fn: function (anObject){
  1847. var self=this;
  1848. return smalltalk.withContext(function($ctx1) {
  1849. _st(self)._selectedItem_(anObject);
  1850. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  1851. messageSends: ["selectedItem:"]}),
  1852. smalltalk.HLListWidget);
  1853. smalltalk.addMethod(
  1854. smalltalk.method({
  1855. selector: "selectedItem",
  1856. fn: function (){
  1857. var self=this;
  1858. return smalltalk.withContext(function($ctx1) {
  1859. var $1;
  1860. $1=self["@selectedItem"];
  1861. return $1;
  1862. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{},smalltalk.HLListWidget)})},
  1863. messageSends: []}),
  1864. smalltalk.HLListWidget);
  1865. smalltalk.addMethod(
  1866. smalltalk.method({
  1867. selector: "selectedItem:",
  1868. fn: function (anObject){
  1869. var self=this;
  1870. return smalltalk.withContext(function($ctx1) {
  1871. self["@selectedItem"]=anObject;
  1872. return self}, function($ctx1) {$ctx1.fill(self,"selectedItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  1873. messageSends: []}),
  1874. smalltalk.HLListWidget);
  1875. smalltalk.addMethod(
  1876. smalltalk.method({
  1877. selector: "setupKeyBindings",
  1878. fn: function (){
  1879. var self=this;
  1880. var active,interval,delay,repeatInterval;
  1881. return smalltalk.withContext(function($ctx1) {
  1882. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11;
  1883. active=false;
  1884. repeatInterval=(70);
  1885. _st(_st(_st(self)._wrapper())._asJQuery())._unbind_("keydown");
  1886. _st(_st(_st(self)._wrapper())._asJQuery())._keydown_((function(e){
  1887. return smalltalk.withContext(function($ctx2) {
  1888. $1=_st(_st(_st(e)._which()).__eq((38)))._and_((function(){
  1889. return smalltalk.withContext(function($ctx3) {
  1890. return _st(active).__eq(false);
  1891. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1892. if(smalltalk.assert($1)){
  1893. active=true;
  1894. active;
  1895. _st(self)._activatePreviousListItem();
  1896. delay=_st((function(){
  1897. return smalltalk.withContext(function($ctx3) {
  1898. interval=_st((function(){
  1899. return smalltalk.withContext(function($ctx4) {
  1900. $2=_st(_st(_st(self)._wrapper())._asJQuery())._hasClass_(_st(self)._focusClass());
  1901. if(smalltalk.assert($2)){
  1902. return _st(self)._activatePreviousListItem();
  1903. } else {
  1904. active=false;
  1905. active;
  1906. $3=interval;
  1907. if(($receiver = $3) == nil || $receiver == undefined){
  1908. $3;
  1909. } else {
  1910. _st(interval)._clearInterval();
  1911. };
  1912. $4=delay;
  1913. if(($receiver = $4) == nil || $receiver == undefined){
  1914. return $4;
  1915. } else {
  1916. return _st(delay)._clearTimeout();
  1917. };
  1918. };
  1919. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}))._valueWithInterval_(repeatInterval);
  1920. return interval;
  1921. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithTimeout_((300));
  1922. delay;
  1923. };
  1924. $5=_st(_st(_st(e)._which()).__eq((40)))._and_((function(){
  1925. return smalltalk.withContext(function($ctx3) {
  1926. return _st(active).__eq(false);
  1927. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1928. if(smalltalk.assert($5)){
  1929. active=true;
  1930. active;
  1931. _st(self)._activateNextListItem();
  1932. delay=_st((function(){
  1933. return smalltalk.withContext(function($ctx3) {
  1934. interval=_st((function(){
  1935. return smalltalk.withContext(function($ctx4) {
  1936. $6=_st(_st(_st(self)._wrapper())._asJQuery())._hasClass_(_st(self)._focusClass());
  1937. if(smalltalk.assert($6)){
  1938. return _st(self)._activateNextListItem();
  1939. } else {
  1940. active=false;
  1941. active;
  1942. $7=interval;
  1943. if(($receiver = $7) == nil || $receiver == undefined){
  1944. $7;
  1945. } else {
  1946. _st(interval)._clearInterval();
  1947. };
  1948. $8=delay;
  1949. if(($receiver = $8) == nil || $receiver == undefined){
  1950. return $8;
  1951. } else {
  1952. return _st(delay)._clearTimeout();
  1953. };
  1954. };
  1955. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}))._valueWithInterval_(repeatInterval);
  1956. return interval;
  1957. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithTimeout_((300));
  1958. return delay;
  1959. };
  1960. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  1961. _st(_st(_st(self)._wrapper())._asJQuery())._keyup_((function(e){
  1962. return smalltalk.withContext(function($ctx2) {
  1963. $9=active;
  1964. if(smalltalk.assert($9)){
  1965. active=false;
  1966. active;
  1967. $10=interval;
  1968. if(($receiver = $10) == nil || $receiver == undefined){
  1969. $10;
  1970. } else {
  1971. _st(interval)._clearInterval();
  1972. };
  1973. $11=delay;
  1974. if(($receiver = $11) == nil || $receiver == undefined){
  1975. return $11;
  1976. } else {
  1977. return _st(delay)._clearTimeout();
  1978. };
  1979. };
  1980. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  1981. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{active:active,interval:interval,delay:delay,repeatInterval:repeatInterval},smalltalk.HLListWidget)})},
  1982. messageSends: ["unbind:", "asJQuery", "wrapper", "keydown:", "ifTrue:", "activatePreviousListItem", "valueWithTimeout:", "valueWithInterval:", "ifTrue:ifFalse:", "ifNotNil:", "clearInterval", "clearTimeout", "hasClass:", "focusClass", "and:", "=", "which", "activateNextListItem", "keyup:"]}),
  1983. smalltalk.HLListWidget);
  1984. smalltalk.addClass('HLNavigationListWidget', smalltalk.HLListWidget, ['previous', 'next'], 'Helios-Core');
  1985. smalltalk.addMethod(
  1986. smalltalk.method({
  1987. selector: "next",
  1988. fn: function (){
  1989. var self=this;
  1990. return smalltalk.withContext(function($ctx1) {
  1991. var $1;
  1992. $1=self["@next"];
  1993. return $1;
  1994. }, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.HLNavigationListWidget)})},
  1995. messageSends: []}),
  1996. smalltalk.HLNavigationListWidget);
  1997. smalltalk.addMethod(
  1998. smalltalk.method({
  1999. selector: "next:",
  2000. fn: function (aWidget){
  2001. var self=this;
  2002. return smalltalk.withContext(function($ctx1) {
  2003. var $1;
  2004. self["@next"]=aWidget;
  2005. $1=_st(_st(aWidget)._previous()).__eq(self);
  2006. if(! smalltalk.assert($1)){
  2007. _st(aWidget)._previous_(self);
  2008. };
  2009. return self}, function($ctx1) {$ctx1.fill(self,"next:",{aWidget:aWidget},smalltalk.HLNavigationListWidget)})},
  2010. messageSends: ["ifFalse:", "previous:", "=", "previous"]}),
  2011. smalltalk.HLNavigationListWidget);
  2012. smalltalk.addMethod(
  2013. smalltalk.method({
  2014. selector: "nextFocus",
  2015. fn: function (){
  2016. var self=this;
  2017. return smalltalk.withContext(function($ctx1) {
  2018. var $1;
  2019. $1=_st(self)._next();
  2020. if(($receiver = $1) == nil || $receiver == undefined){
  2021. $1;
  2022. } else {
  2023. _st(_st(self)._next())._focus();
  2024. };
  2025. return self}, function($ctx1) {$ctx1.fill(self,"nextFocus",{},smalltalk.HLNavigationListWidget)})},
  2026. messageSends: ["ifNotNil:", "focus", "next"]}),
  2027. smalltalk.HLNavigationListWidget);
  2028. smalltalk.addMethod(
  2029. smalltalk.method({
  2030. selector: "previous",
  2031. fn: function (){
  2032. var self=this;
  2033. return smalltalk.withContext(function($ctx1) {
  2034. var $1;
  2035. $1=self["@previous"];
  2036. return $1;
  2037. }, function($ctx1) {$ctx1.fill(self,"previous",{},smalltalk.HLNavigationListWidget)})},
  2038. messageSends: []}),
  2039. smalltalk.HLNavigationListWidget);
  2040. smalltalk.addMethod(
  2041. smalltalk.method({
  2042. selector: "previous:",
  2043. fn: function (aWidget){
  2044. var self=this;
  2045. return smalltalk.withContext(function($ctx1) {
  2046. var $1;
  2047. self["@previous"]=aWidget;
  2048. $1=_st(_st(aWidget)._next()).__eq(self);
  2049. if(! smalltalk.assert($1)){
  2050. _st(aWidget)._next_(self);
  2051. };
  2052. return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},smalltalk.HLNavigationListWidget)})},
  2053. messageSends: ["ifFalse:", "next:", "=", "next"]}),
  2054. smalltalk.HLNavigationListWidget);
  2055. smalltalk.addMethod(
  2056. smalltalk.method({
  2057. selector: "previousFocus",
  2058. fn: function (){
  2059. var self=this;
  2060. return smalltalk.withContext(function($ctx1) {
  2061. var $1;
  2062. $1=_st(self)._previous();
  2063. if(($receiver = $1) == nil || $receiver == undefined){
  2064. $1;
  2065. } else {
  2066. _st(_st(self)._previous())._focus();
  2067. };
  2068. return self}, function($ctx1) {$ctx1.fill(self,"previousFocus",{},smalltalk.HLNavigationListWidget)})},
  2069. messageSends: ["ifNotNil:", "focus", "previous"]}),
  2070. smalltalk.HLNavigationListWidget);
  2071. smalltalk.addMethod(
  2072. smalltalk.method({
  2073. selector: "setupKeyBindings",
  2074. fn: function (){
  2075. var self=this;
  2076. return smalltalk.withContext(function($ctx1) {
  2077. var $1,$2;
  2078. smalltalk.HLListWidget.fn.prototype._setupKeyBindings.apply(_st(self), []);
  2079. _st(_st(_st(self)._wrapper())._asJQuery())._keydown_((function(e){
  2080. return smalltalk.withContext(function($ctx2) {
  2081. $1=_st(_st(e)._which()).__eq((39));
  2082. if(smalltalk.assert($1)){
  2083. _st(self)._nextFocus();
  2084. };
  2085. $2=_st(_st(e)._which()).__eq((37));
  2086. if(smalltalk.assert($2)){
  2087. return _st(self)._previousFocus();
  2088. };
  2089. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  2090. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},smalltalk.HLNavigationListWidget)})},
  2091. messageSends: ["setupKeyBindings", "keydown:", "ifTrue:", "nextFocus", "=", "which", "previousFocus", "asJQuery", "wrapper"]}),
  2092. smalltalk.HLNavigationListWidget);
  2093. smalltalk.addClass('HLToolListWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Core');
  2094. smalltalk.addMethod(
  2095. smalltalk.method({
  2096. selector: "activateListItem:",
  2097. fn: function (anItem){
  2098. var self=this;
  2099. return smalltalk.withContext(function($ctx1) {
  2100. _st(_st(self)._model())._withChangesDo_((function(){
  2101. return smalltalk.withContext(function($ctx2) {
  2102. return smalltalk.HLNavigationListWidget.fn.prototype._activateListItem_.apply(_st(self), [anItem]);
  2103. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2104. return self}, function($ctx1) {$ctx1.fill(self,"activateListItem:",{anItem:anItem},smalltalk.HLToolListWidget)})},
  2105. messageSends: ["withChangesDo:", "activateListItem:", "model"]}),
  2106. smalltalk.HLToolListWidget);
  2107. smalltalk.addMethod(
  2108. smalltalk.method({
  2109. selector: "activateNextListItem",
  2110. fn: function (){
  2111. var self=this;
  2112. return smalltalk.withContext(function($ctx1) {
  2113. _st(_st(self)._model())._withChangesDo_((function(){
  2114. return smalltalk.withContext(function($ctx2) {
  2115. return smalltalk.HLNavigationListWidget.fn.prototype._activateNextListItem.apply(_st(self), []);
  2116. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2117. return self}, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},smalltalk.HLToolListWidget)})},
  2118. messageSends: ["withChangesDo:", "activateNextListItem", "model"]}),
  2119. smalltalk.HLToolListWidget);
  2120. smalltalk.addMethod(
  2121. smalltalk.method({
  2122. selector: "activatePreviousListItem",
  2123. fn: function (){
  2124. var self=this;
  2125. return smalltalk.withContext(function($ctx1) {
  2126. _st(_st(self)._model())._withChangesDo_((function(){
  2127. return smalltalk.withContext(function($ctx2) {
  2128. return smalltalk.HLNavigationListWidget.fn.prototype._activatePreviousListItem.apply(_st(self), []);
  2129. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2130. return self}, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},smalltalk.HLToolListWidget)})},
  2131. messageSends: ["withChangesDo:", "activatePreviousListItem", "model"]}),
  2132. smalltalk.HLToolListWidget);
  2133. smalltalk.addMethod(
  2134. smalltalk.method({
  2135. selector: "commandCategory",
  2136. fn: function (){
  2137. var self=this;
  2138. return smalltalk.withContext(function($ctx1) {
  2139. var $1;
  2140. $1=_st(self)._label();
  2141. return $1;
  2142. }, function($ctx1) {$ctx1.fill(self,"commandCategory",{},smalltalk.HLToolListWidget)})},
  2143. messageSends: ["label"]}),
  2144. smalltalk.HLToolListWidget);
  2145. smalltalk.addMethod(
  2146. smalltalk.method({
  2147. selector: "label",
  2148. fn: function (){
  2149. var self=this;
  2150. return smalltalk.withContext(function($ctx1) {
  2151. return "List";
  2152. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToolListWidget)})},
  2153. messageSends: []}),
  2154. smalltalk.HLToolListWidget);
  2155. smalltalk.addMethod(
  2156. smalltalk.method({
  2157. selector: "menuCommands",
  2158. fn: function (){
  2159. var self=this;
  2160. function $HLToolCommand(){return smalltalk.HLToolCommand||(typeof HLToolCommand=="undefined"?nil:HLToolCommand)}
  2161. return smalltalk.withContext(function($ctx1) {
  2162. var $1;
  2163. $1=_st(_st(_st(_st($HLToolCommand())._concreteClasses())._select_((function(each){
  2164. return smalltalk.withContext(function($ctx2) {
  2165. return _st(each)._isValidFor_(_st(self)._model());
  2166. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._collect_((function(each){
  2167. return smalltalk.withContext(function($ctx2) {
  2168. return _st(each)._for_(_st(self)._model());
  2169. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._select_((function(each){
  2170. return smalltalk.withContext(function($ctx2) {
  2171. return _st(_st(_st(each)._category()).__eq(_st(self)._commandCategory()))._and_((function(){
  2172. return smalltalk.withContext(function($ctx3) {
  2173. return _st(_st(each)._isAction())._and_((function(){
  2174. return smalltalk.withContext(function($ctx4) {
  2175. return _st(each)._isActive();
  2176. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2177. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2178. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2179. return $1;
  2180. }, function($ctx1) {$ctx1.fill(self,"menuCommands",{},smalltalk.HLToolListWidget)})},
  2181. messageSends: ["select:", "and:", "isActive", "isAction", "=", "commandCategory", "category", "collect:", "for:", "model", "isValidFor:", "concreteClasses"]}),
  2182. smalltalk.HLToolListWidget);
  2183. smalltalk.addMethod(
  2184. smalltalk.method({
  2185. selector: "model",
  2186. fn: function (){
  2187. var self=this;
  2188. return smalltalk.withContext(function($ctx1) {
  2189. var $1;
  2190. $1=self["@model"];
  2191. return $1;
  2192. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLToolListWidget)})},
  2193. messageSends: []}),
  2194. smalltalk.HLToolListWidget);
  2195. smalltalk.addMethod(
  2196. smalltalk.method({
  2197. selector: "model:",
  2198. fn: function (aBrowserModel){
  2199. var self=this;
  2200. return smalltalk.withContext(function($ctx1) {
  2201. var $1,$2;
  2202. self["@model"]=aBrowserModel;
  2203. $1=self;
  2204. _st($1)._observeSystem();
  2205. $2=_st($1)._observeModel();
  2206. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel},smalltalk.HLToolListWidget)})},
  2207. messageSends: ["observeSystem", "observeModel"]}),
  2208. smalltalk.HLToolListWidget);
  2209. smalltalk.addMethod(
  2210. smalltalk.method({
  2211. selector: "observeModel",
  2212. fn: function (){
  2213. var self=this;
  2214. return smalltalk.withContext(function($ctx1) {
  2215. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLToolListWidget)})},
  2216. messageSends: []}),
  2217. smalltalk.HLToolListWidget);
  2218. smalltalk.addMethod(
  2219. smalltalk.method({
  2220. selector: "observeSystem",
  2221. fn: function (){
  2222. var self=this;
  2223. return smalltalk.withContext(function($ctx1) {
  2224. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLToolListWidget)})},
  2225. messageSends: []}),
  2226. smalltalk.HLToolListWidget);
  2227. smalltalk.addMethod(
  2228. smalltalk.method({
  2229. selector: "renderContentOn:",
  2230. fn: function (html){
  2231. var self=this;
  2232. return smalltalk.withContext(function($ctx1) {
  2233. _st(self)._renderHeadOn_(html);
  2234. smalltalk.HLNavigationListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  2235. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLToolListWidget)})},
  2236. messageSends: ["renderHeadOn:", "renderContentOn:"]}),
  2237. smalltalk.HLToolListWidget);
  2238. smalltalk.addMethod(
  2239. smalltalk.method({
  2240. selector: "renderHeadOn:",
  2241. fn: function (html){
  2242. var self=this;
  2243. return smalltalk.withContext(function($ctx1) {
  2244. var $1,$2;
  2245. $1=_st(html)._div();
  2246. _st($1)._class_("list-label");
  2247. $2=_st($1)._with_((function(){
  2248. return smalltalk.withContext(function($ctx2) {
  2249. _st(html)._with_(_st(self)._label());
  2250. return _st(self)._renderMenuOn_(html);
  2251. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2252. return self}, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},smalltalk.HLToolListWidget)})},
  2253. messageSends: ["class:", "div", "with:", "label", "renderMenuOn:"]}),
  2254. smalltalk.HLToolListWidget);
  2255. smalltalk.addMethod(
  2256. smalltalk.method({
  2257. selector: "renderMenuOn:",
  2258. fn: function (html){
  2259. var self=this;
  2260. var commands;
  2261. return smalltalk.withContext(function($ctx1) {
  2262. var $1,$2,$3,$5,$6,$7,$9,$10,$8,$4;
  2263. commands=_st(self)._menuCommands();
  2264. $1=_st(commands)._isEmpty();
  2265. if(smalltalk.assert($1)){
  2266. $2=self;
  2267. return $2;
  2268. };
  2269. $3=_st(html)._div();
  2270. _st($3)._class_("btn-group cog");
  2271. $4=_st($3)._with_((function(){
  2272. return smalltalk.withContext(function($ctx2) {
  2273. $5=_st(html)._a();
  2274. _st($5)._class_("btn dropdown-toggle");
  2275. _st($5)._at_put_("data-toggle","dropdown");
  2276. $6=_st($5)._with_((function(){
  2277. return smalltalk.withContext(function($ctx3) {
  2278. return _st(_st(html)._tag_("i"))._class_("icon-cog");
  2279. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2280. $6;
  2281. $7=_st(html)._ul();
  2282. _st($7)._class_("dropdown-menu pull-right");
  2283. $8=_st($7)._with_((function(){
  2284. return smalltalk.withContext(function($ctx3) {
  2285. return _st(_st(self)._menuCommands())._do_((function(each){
  2286. return smalltalk.withContext(function($ctx4) {
  2287. return _st(_st(html)._li())._with_((function(){
  2288. return smalltalk.withContext(function($ctx5) {
  2289. $9=_st(html)._a();
  2290. _st($9)._with_(_st(each)._menuLabel());
  2291. $10=_st($9)._onClick_((function(){
  2292. return smalltalk.withContext(function($ctx6) {
  2293. return _st(self)._execute_(each);
  2294. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  2295. return $10;
  2296. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  2297. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
  2298. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2299. return $8;
  2300. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2301. return self}, function($ctx1) {$ctx1.fill(self,"renderMenuOn:",{html:html,commands:commands},smalltalk.HLToolListWidget)})},
  2302. messageSends: ["menuCommands", "ifTrue:", "isEmpty", "class:", "div", "with:", "a", "at:put:", "tag:", "ul", "do:", "menuLabel", "onClick:", "execute:", "li"]}),
  2303. smalltalk.HLToolListWidget);
  2304. smalltalk.addMethod(
  2305. smalltalk.method({
  2306. selector: "selectedItem:",
  2307. fn: function (anItem){
  2308. var self=this;
  2309. return smalltalk.withContext(function($ctx1) {
  2310. smalltalk.HLNavigationListWidget.fn.prototype._selectedItem_.apply(_st(self), [anItem]);
  2311. _st(self)._updateMenu();
  2312. return self}, function($ctx1) {$ctx1.fill(self,"selectedItem:",{anItem:anItem},smalltalk.HLToolListWidget)})},
  2313. messageSends: ["selectedItem:", "updateMenu"]}),
  2314. smalltalk.HLToolListWidget);
  2315. smalltalk.addMethod(
  2316. smalltalk.method({
  2317. selector: "unregister",
  2318. fn: function (){
  2319. var self=this;
  2320. return smalltalk.withContext(function($ctx1) {
  2321. smalltalk.HLNavigationListWidget.fn.prototype._unregister.apply(_st(self), []);
  2322. _st(_st(_st(self)._model())._announcer())._unsubscribe_(self);
  2323. _st(_st(_st(self)._model())._systemAnnouncer())._unsubscribe_(self);
  2324. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLToolListWidget)})},
  2325. messageSends: ["unregister", "unsubscribe:", "announcer", "model", "systemAnnouncer"]}),
  2326. smalltalk.HLToolListWidget);
  2327. smalltalk.addMethod(
  2328. smalltalk.method({
  2329. selector: "updateMenu",
  2330. fn: function (){
  2331. var self=this;
  2332. return smalltalk.withContext(function($ctx1) {
  2333. _st(_st(_st(_st(self)._wrapper())._asJQuery())._find_(".cog"))._remove();
  2334. _st((function(html){
  2335. return smalltalk.withContext(function($ctx2) {
  2336. return _st(self)._renderMenuOn_(html);
  2337. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}))._appendToJQuery_(_st(_st(_st(self)._wrapper())._asJQuery())._find_(".list-label"));
  2338. return self}, function($ctx1) {$ctx1.fill(self,"updateMenu",{},smalltalk.HLToolListWidget)})},
  2339. messageSends: ["remove", "find:", "asJQuery", "wrapper", "appendToJQuery:", "renderMenuOn:"]}),
  2340. smalltalk.HLToolListWidget);
  2341. smalltalk.addMethod(
  2342. smalltalk.method({
  2343. selector: "on:",
  2344. fn: function (aModel){
  2345. var self=this;
  2346. return smalltalk.withContext(function($ctx1) {
  2347. var $2,$3,$1;
  2348. $2=_st(self)._new();
  2349. _st($2)._model_(aModel);
  2350. $3=_st($2)._yourself();
  2351. $1=$3;
  2352. return $1;
  2353. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel},smalltalk.HLToolListWidget.klass)})},
  2354. messageSends: ["model:", "new", "yourself"]}),
  2355. smalltalk.HLToolListWidget.klass);
  2356. smalltalk.addClass('HLManager', smalltalk.HLWidget, ['tabs', 'activeTab', 'keyBinder', 'environment', 'history'], 'Helios-Core');
  2357. smalltalk.addMethod(
  2358. smalltalk.method({
  2359. selector: "activate:",
  2360. fn: function (aTab){
  2361. var self=this;
  2362. return smalltalk.withContext(function($ctx1) {
  2363. var $1,$2;
  2364. _st(_st(self)._keyBinder())._flushBindings();
  2365. _st(aTab)._registerBindings();
  2366. self["@activeTab"]=aTab;
  2367. $1=self;
  2368. _st($1)._refresh();
  2369. _st($1)._addToHistory_(aTab);
  2370. $2=_st($1)._show_(aTab);
  2371. return self}, function($ctx1) {$ctx1.fill(self,"activate:",{aTab:aTab},smalltalk.HLManager)})},
  2372. messageSends: ["flushBindings", "keyBinder", "registerBindings", "refresh", "addToHistory:", "show:"]}),
  2373. smalltalk.HLManager);
  2374. smalltalk.addMethod(
  2375. smalltalk.method({
  2376. selector: "activeTab",
  2377. fn: function (){
  2378. var self=this;
  2379. return smalltalk.withContext(function($ctx1) {
  2380. var $1;
  2381. $1=self["@activeTab"];
  2382. return $1;
  2383. }, function($ctx1) {$ctx1.fill(self,"activeTab",{},smalltalk.HLManager)})},
  2384. messageSends: []}),
  2385. smalltalk.HLManager);
  2386. smalltalk.addMethod(
  2387. smalltalk.method({
  2388. selector: "addTab:",
  2389. fn: function (aTab){
  2390. var self=this;
  2391. return smalltalk.withContext(function($ctx1) {
  2392. _st(_st(self)._tabs())._add_(aTab);
  2393. _st(self)._activate_(aTab);
  2394. return self}, function($ctx1) {$ctx1.fill(self,"addTab:",{aTab:aTab},smalltalk.HLManager)})},
  2395. messageSends: ["add:", "tabs", "activate:"]}),
  2396. smalltalk.HLManager);
  2397. smalltalk.addMethod(
  2398. smalltalk.method({
  2399. selector: "addToHistory:",
  2400. fn: function (aTab){
  2401. var self=this;
  2402. return smalltalk.withContext(function($ctx1) {
  2403. _st(self)._removeFromHistory_(aTab);
  2404. _st(_st(self)._history())._add_(aTab);
  2405. return self}, function($ctx1) {$ctx1.fill(self,"addToHistory:",{aTab:aTab},smalltalk.HLManager)})},
  2406. messageSends: ["removeFromHistory:", "add:", "history"]}),
  2407. smalltalk.HLManager);
  2408. smalltalk.addMethod(
  2409. smalltalk.method({
  2410. selector: "confirm:ifFalse:",
  2411. fn: function (aString,aBlock){
  2412. var self=this;
  2413. function $HLConfirmation(){return smalltalk.HLConfirmation||(typeof HLConfirmation=="undefined"?nil:HLConfirmation)}
  2414. return smalltalk.withContext(function($ctx1) {
  2415. var $1,$2;
  2416. $1=_st($HLConfirmation())._new();
  2417. _st($1)._confirmationString_(aString);
  2418. _st($1)._cancelBlock_(aBlock);
  2419. $2=_st($1)._yourself();
  2420. _st($2)._appendToJQuery_(_st("body")._asJQuery());
  2421. return self}, function($ctx1) {$ctx1.fill(self,"confirm:ifFalse:",{aString:aString,aBlock:aBlock},smalltalk.HLManager)})},
  2422. messageSends: ["appendToJQuery:", "asJQuery", "confirmationString:", "new", "cancelBlock:", "yourself"]}),
  2423. smalltalk.HLManager);
  2424. smalltalk.addMethod(
  2425. smalltalk.method({
  2426. selector: "confirm:ifTrue:",
  2427. fn: function (aString,aBlock){
  2428. var self=this;
  2429. function $HLConfirmation(){return smalltalk.HLConfirmation||(typeof HLConfirmation=="undefined"?nil:HLConfirmation)}
  2430. return smalltalk.withContext(function($ctx1) {
  2431. var $1,$2;
  2432. $1=_st($HLConfirmation())._new();
  2433. _st($1)._confirmationString_(aString);
  2434. _st($1)._actionBlock_(aBlock);
  2435. $2=_st($1)._yourself();
  2436. _st($2)._appendToJQuery_(_st("body")._asJQuery());
  2437. return self}, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:",{aString:aString,aBlock:aBlock},smalltalk.HLManager)})},
  2438. messageSends: ["appendToJQuery:", "asJQuery", "confirmationString:", "new", "actionBlock:", "yourself"]}),
  2439. smalltalk.HLManager);
  2440. smalltalk.addMethod(
  2441. smalltalk.method({
  2442. selector: "defaultEnvironment",
  2443. fn: function (){
  2444. var self=this;
  2445. function $Environment(){return smalltalk.Environment||(typeof Environment=="undefined"?nil:Environment)}
  2446. return smalltalk.withContext(function($ctx1) {
  2447. var $1,$2,$3;
  2448. $1=_st(window)._parent();
  2449. if(($receiver = $1) == nil || $receiver == undefined){
  2450. $2=_st($Environment())._new();
  2451. return $2;
  2452. } else {
  2453. $1;
  2454. };
  2455. $3=_st(_st(_st(_st(window)._parent())._at_("smalltalk"))._at_("Environment"))._new();
  2456. return $3;
  2457. }, function($ctx1) {$ctx1.fill(self,"defaultEnvironment",{},smalltalk.HLManager)})},
  2458. messageSends: ["ifNil:", "new", "parent", "at:"]}),
  2459. smalltalk.HLManager);
  2460. smalltalk.addMethod(
  2461. smalltalk.method({
  2462. selector: "environment",
  2463. fn: function (){
  2464. var self=this;
  2465. return smalltalk.withContext(function($ctx1) {
  2466. var $2,$1;
  2467. $2=self["@environment"];
  2468. if(($receiver = $2) == nil || $receiver == undefined){
  2469. self["@environment"]=_st(self)._defaultEnvironment();
  2470. $1=self["@environment"];
  2471. } else {
  2472. $1=$2;
  2473. };
  2474. return $1;
  2475. }, function($ctx1) {$ctx1.fill(self,"environment",{},smalltalk.HLManager)})},
  2476. messageSends: ["ifNil:", "defaultEnvironment"]}),
  2477. smalltalk.HLManager);
  2478. smalltalk.addMethod(
  2479. smalltalk.method({
  2480. selector: "environment:",
  2481. fn: function (anEnvironment){
  2482. var self=this;
  2483. return smalltalk.withContext(function($ctx1) {
  2484. self["@environment"]=anEnvironment;
  2485. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment},smalltalk.HLManager)})},
  2486. messageSends: []}),
  2487. smalltalk.HLManager);
  2488. smalltalk.addMethod(
  2489. smalltalk.method({
  2490. selector: "history",
  2491. fn: function (){
  2492. var self=this;
  2493. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  2494. return smalltalk.withContext(function($ctx1) {
  2495. var $2,$1;
  2496. $2=self["@history"];
  2497. if(($receiver = $2) == nil || $receiver == undefined){
  2498. self["@history"]=_st($OrderedCollection())._new();
  2499. $1=self["@history"];
  2500. } else {
  2501. $1=$2;
  2502. };
  2503. return $1;
  2504. }, function($ctx1) {$ctx1.fill(self,"history",{},smalltalk.HLManager)})},
  2505. messageSends: ["ifNil:", "new"]}),
  2506. smalltalk.HLManager);
  2507. smalltalk.addMethod(
  2508. smalltalk.method({
  2509. selector: "history:",
  2510. fn: function (aCollection){
  2511. var self=this;
  2512. return smalltalk.withContext(function($ctx1) {
  2513. self["@history"]=aCollection;
  2514. return self}, function($ctx1) {$ctx1.fill(self,"history:",{aCollection:aCollection},smalltalk.HLManager)})},
  2515. messageSends: []}),
  2516. smalltalk.HLManager);
  2517. smalltalk.addMethod(
  2518. smalltalk.method({
  2519. selector: "initialize",
  2520. fn: function (){
  2521. var self=this;
  2522. return smalltalk.withContext(function($ctx1) {
  2523. smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  2524. _st(_st(self)._keyBinder())._setupEvents();
  2525. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLManager)})},
  2526. messageSends: ["initialize", "setupEvents", "keyBinder"]}),
  2527. smalltalk.HLManager);
  2528. smalltalk.addMethod(
  2529. smalltalk.method({
  2530. selector: "keyBinder",
  2531. fn: function (){
  2532. var self=this;
  2533. function $HLKeyBinder(){return smalltalk.HLKeyBinder||(typeof HLKeyBinder=="undefined"?nil:HLKeyBinder)}
  2534. return smalltalk.withContext(function($ctx1) {
  2535. var $2,$1;
  2536. $2=self["@keyBinder"];
  2537. if(($receiver = $2) == nil || $receiver == undefined){
  2538. self["@keyBinder"]=_st($HLKeyBinder())._new();
  2539. $1=self["@keyBinder"];
  2540. } else {
  2541. $1=$2;
  2542. };
  2543. return $1;
  2544. }, function($ctx1) {$ctx1.fill(self,"keyBinder",{},smalltalk.HLManager)})},
  2545. messageSends: ["ifNil:", "new"]}),
  2546. smalltalk.HLManager);
  2547. smalltalk.addMethod(
  2548. smalltalk.method({
  2549. selector: "refresh",
  2550. fn: function (){
  2551. var self=this;
  2552. return smalltalk.withContext(function($ctx1) {
  2553. _st(_st(window)._jQuery_(".navbar"))._remove();
  2554. _st(self)._appendToJQuery_(_st("body")._asJQuery());
  2555. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLManager)})},
  2556. messageSends: ["remove", "jQuery:", "appendToJQuery:", "asJQuery"]}),
  2557. smalltalk.HLManager);
  2558. smalltalk.addMethod(
  2559. smalltalk.method({
  2560. selector: "removeActiveTab",
  2561. fn: function (){
  2562. var self=this;
  2563. return smalltalk.withContext(function($ctx1) {
  2564. _st(self)._removeTab_(_st(self)._activeTab());
  2565. return self}, function($ctx1) {$ctx1.fill(self,"removeActiveTab",{},smalltalk.HLManager)})},
  2566. messageSends: ["removeTab:", "activeTab"]}),
  2567. smalltalk.HLManager);
  2568. smalltalk.addMethod(
  2569. smalltalk.method({
  2570. selector: "removeFromHistory:",
  2571. fn: function (aTab){
  2572. var self=this;
  2573. return smalltalk.withContext(function($ctx1) {
  2574. _st(self)._history_(_st(_st(self)._history())._reject_((function(each){
  2575. return smalltalk.withContext(function($ctx2) {
  2576. return _st(each).__eq_eq(aTab);
  2577. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})));
  2578. return self}, function($ctx1) {$ctx1.fill(self,"removeFromHistory:",{aTab:aTab},smalltalk.HLManager)})},
  2579. messageSends: ["history:", "reject:", "==", "history"]}),
  2580. smalltalk.HLManager);
  2581. smalltalk.addMethod(
  2582. smalltalk.method({
  2583. selector: "removeTab:",
  2584. fn: function (aTab){
  2585. var self=this;
  2586. return smalltalk.withContext(function($ctx1) {
  2587. var $1,$2;
  2588. $1=_st(_st(self)._tabs())._includes_(aTab);
  2589. if(! smalltalk.assert($1)){
  2590. $2=self;
  2591. return $2;
  2592. };
  2593. _st(self)._removeFromHistory_(aTab);
  2594. _st(_st(self)._tabs())._remove_(aTab);
  2595. _st(_st(self)._keyBinder())._flushBindings();
  2596. _st(aTab)._remove();
  2597. _st(self)._refresh();
  2598. _st(_st(self)._history())._ifNotEmpty_((function(){
  2599. return smalltalk.withContext(function($ctx2) {
  2600. return _st(_st(_st(self)._history())._last())._activate();
  2601. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2602. return self}, function($ctx1) {$ctx1.fill(self,"removeTab:",{aTab:aTab},smalltalk.HLManager)})},
  2603. messageSends: ["ifFalse:", "includes:", "tabs", "removeFromHistory:", "remove:", "flushBindings", "keyBinder", "remove", "refresh", "ifNotEmpty:", "activate", "last", "history"]}),
  2604. smalltalk.HLManager);
  2605. smalltalk.addMethod(
  2606. smalltalk.method({
  2607. selector: "renderAddOn:",
  2608. fn: function (html){
  2609. var self=this;
  2610. function $HLWidget(){return smalltalk.HLWidget||(typeof HLWidget=="undefined"?nil:HLWidget)}
  2611. return smalltalk.withContext(function($ctx1) {
  2612. var $1,$3,$4,$5,$7,$8,$6,$2;
  2613. $1=_st(html)._li();
  2614. _st($1)._class_("dropdown");
  2615. $2=_st($1)._with_((function(){
  2616. return smalltalk.withContext(function($ctx2) {
  2617. $3=_st(html)._a();
  2618. _st($3)._class_("dropdown-toggle");
  2619. _st($3)._at_put_("data-toggle","dropdown");
  2620. $4=_st($3)._with_((function(){
  2621. return smalltalk.withContext(function($ctx3) {
  2622. _st(html)._with_("Open...");
  2623. return _st(_st(html)._tag_("b"))._class_("caret");
  2624. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2625. $4;
  2626. $5=_st(html)._ul();
  2627. _st($5)._class_("dropdown-menu");
  2628. $6=_st($5)._with_((function(){
  2629. return smalltalk.withContext(function($ctx3) {
  2630. return _st(_st(_st(_st($HLWidget())._withAllSubclasses())._select_((function(each){
  2631. return smalltalk.withContext(function($ctx4) {
  2632. return _st(each)._canBeOpenAsTab();
  2633. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})})))._sorted_((function(a,b){
  2634. return smalltalk.withContext(function($ctx4) {
  2635. return _st(_st(a)._tabPriority()).__lt(_st(b)._tabPriority());
  2636. }, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx1)})})))._do_((function(each){
  2637. return smalltalk.withContext(function($ctx4) {
  2638. return _st(_st(html)._li())._with_((function(){
  2639. return smalltalk.withContext(function($ctx5) {
  2640. $7=_st(html)._a();
  2641. _st($7)._with_(_st(each)._tabLabel());
  2642. $8=_st($7)._onClick_((function(){
  2643. return smalltalk.withContext(function($ctx6) {
  2644. return _st(each)._openAsTab();
  2645. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  2646. return $8;
  2647. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  2648. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
  2649. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2650. return $6;
  2651. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2652. return self}, function($ctx1) {$ctx1.fill(self,"renderAddOn:",{html:html},smalltalk.HLManager)})},
  2653. messageSends: ["class:", "li", "with:", "a", "at:put:", "tag:", "ul", "do:", "tabLabel", "onClick:", "openAsTab", "sorted:", "<", "tabPriority", "select:", "canBeOpenAsTab", "withAllSubclasses"]}),
  2654. smalltalk.HLManager);
  2655. smalltalk.addMethod(
  2656. smalltalk.method({
  2657. selector: "renderContentOn:",
  2658. fn: function (html){
  2659. var self=this;
  2660. return smalltalk.withContext(function($ctx1) {
  2661. var $1,$3,$4,$2;
  2662. $1=_st(html)._div();
  2663. _st($1)._class_("navbar navbar-fixed-top");
  2664. $2=_st($1)._with_((function(){
  2665. return smalltalk.withContext(function($ctx2) {
  2666. $3=_st(html)._div();
  2667. _st($3)._class_("navbar-inner");
  2668. $4=_st($3)._with_((function(){
  2669. return smalltalk.withContext(function($ctx3) {
  2670. return _st(self)._renderTabsOn_(html);
  2671. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2672. return $4;
  2673. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2674. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLManager)})},
  2675. messageSends: ["class:", "div", "with:", "renderTabsOn:"]}),
  2676. smalltalk.HLManager);
  2677. smalltalk.addMethod(
  2678. smalltalk.method({
  2679. selector: "renderTabsOn:",
  2680. fn: function (html){
  2681. var self=this;
  2682. return smalltalk.withContext(function($ctx1) {
  2683. var $1,$3,$4,$6,$5,$8,$9,$7,$2;
  2684. $1=_st(html)._ul();
  2685. _st($1)._class_("nav");
  2686. $2=_st($1)._with_((function(){
  2687. return smalltalk.withContext(function($ctx2) {
  2688. _st(_st(self)._tabs())._do_((function(each){
  2689. return smalltalk.withContext(function($ctx3) {
  2690. $3=_st(html)._li();
  2691. $4=$3;
  2692. $6=_st(each)._isActive();
  2693. if(smalltalk.assert($6)){
  2694. $5="active";
  2695. } else {
  2696. $5="inactive";
  2697. };
  2698. _st($4)._class_($5);
  2699. $7=_st($3)._with_((function(){
  2700. return smalltalk.withContext(function($ctx4) {
  2701. $8=_st(html)._a();
  2702. _st($8)._with_((function(){
  2703. return smalltalk.withContext(function($ctx5) {
  2704. _st(_st(_st(html)._tag_("i"))._class_("icon-remove"))._onClick_((function(){
  2705. return smalltalk.withContext(function($ctx6) {
  2706. return _st(self)._removeTab_(each);
  2707. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  2708. return _st(html)._with_(_st(each)._displayLabel());
  2709. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  2710. $9=_st($8)._onClick_((function(){
  2711. return smalltalk.withContext(function($ctx5) {
  2712. return _st(each)._activate();
  2713. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  2714. return $9;
  2715. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2716. return $7;
  2717. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  2718. return _st(self)._renderAddOn_(html);
  2719. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2720. return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},smalltalk.HLManager)})},
  2721. messageSends: ["class:", "ul", "with:", "do:", "ifTrue:ifFalse:", "isActive", "li", "onClick:", "removeTab:", "tag:", "displayLabel", "a", "activate", "tabs", "renderAddOn:"]}),
  2722. smalltalk.HLManager);
  2723. smalltalk.addMethod(
  2724. smalltalk.method({
  2725. selector: "show:",
  2726. fn: function (aTab){
  2727. var self=this;
  2728. return smalltalk.withContext(function($ctx1) {
  2729. var $1,$2;
  2730. _st(_st(self)._tabs())._do_((function(each){
  2731. return smalltalk.withContext(function($ctx2) {
  2732. return _st(each)._hide();
  2733. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2734. $1=aTab;
  2735. _st($1)._show();
  2736. $2=_st($1)._focus();
  2737. return self}, function($ctx1) {$ctx1.fill(self,"show:",{aTab:aTab},smalltalk.HLManager)})},
  2738. messageSends: ["do:", "hide", "tabs", "show", "focus"]}),
  2739. smalltalk.HLManager);
  2740. smalltalk.addMethod(
  2741. smalltalk.method({
  2742. selector: "tabs",
  2743. fn: function (){
  2744. var self=this;
  2745. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  2746. return smalltalk.withContext(function($ctx1) {
  2747. var $2,$1;
  2748. $2=self["@tabs"];
  2749. if(($receiver = $2) == nil || $receiver == undefined){
  2750. self["@tabs"]=_st($OrderedCollection())._new();
  2751. $1=self["@tabs"];
  2752. } else {
  2753. $1=$2;
  2754. };
  2755. return $1;
  2756. }, function($ctx1) {$ctx1.fill(self,"tabs",{},smalltalk.HLManager)})},
  2757. messageSends: ["ifNil:", "new"]}),
  2758. smalltalk.HLManager);
  2759. smalltalk.HLManager.klass.iVarNames = ['current'];
  2760. smalltalk.addMethod(
  2761. smalltalk.method({
  2762. selector: "current",
  2763. fn: function (){
  2764. var self=this;
  2765. return smalltalk.withContext(function($ctx1) {
  2766. var $2,$1;
  2767. $2=self["@current"];
  2768. if(($receiver = $2) == nil || $receiver == undefined){
  2769. self["@current"]=_st(_st(self)._basicNew())._initialize();
  2770. $1=self["@current"];
  2771. } else {
  2772. $1=$2;
  2773. };
  2774. return $1;
  2775. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.HLManager.klass)})},
  2776. messageSends: ["ifNil:", "initialize", "basicNew"]}),
  2777. smalltalk.HLManager.klass);
  2778. smalltalk.addMethod(
  2779. smalltalk.method({
  2780. selector: "initialize",
  2781. fn: function (){
  2782. var self=this;
  2783. return smalltalk.withContext(function($ctx1) {
  2784. _st(_st(self)._current())._appendToJQuery_(_st("body")._asJQuery());
  2785. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLManager.klass)})},
  2786. messageSends: ["appendToJQuery:", "asJQuery", "current"]}),
  2787. smalltalk.HLManager.klass);
  2788. smalltalk.addMethod(
  2789. smalltalk.method({
  2790. selector: "new",
  2791. fn: function (){
  2792. var self=this;
  2793. return smalltalk.withContext(function($ctx1) {
  2794. _st(self)._shouldNotImplement();
  2795. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.HLManager.klass)})},
  2796. messageSends: ["shouldNotImplement"]}),
  2797. smalltalk.HLManager.klass);
  2798. smalltalk.addClass('HLSUnit', smalltalk.HLWidget, [], 'Helios-Core');
  2799. smalltalk.addMethod(
  2800. smalltalk.method({
  2801. selector: "canBeOpenAsTab",
  2802. fn: function (){
  2803. var self=this;
  2804. return smalltalk.withContext(function($ctx1) {
  2805. return true;
  2806. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLSUnit.klass)})},
  2807. messageSends: []}),
  2808. smalltalk.HLSUnit.klass);
  2809. smalltalk.addMethod(
  2810. smalltalk.method({
  2811. selector: "tabLabel",
  2812. fn: function (){
  2813. var self=this;
  2814. return smalltalk.withContext(function($ctx1) {
  2815. return "SUnit";
  2816. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLSUnit.klass)})},
  2817. messageSends: []}),
  2818. smalltalk.HLSUnit.klass);
  2819. smalltalk.addMethod(
  2820. smalltalk.method({
  2821. selector: "tabPriority",
  2822. fn: function (){
  2823. var self=this;
  2824. return smalltalk.withContext(function($ctx1) {
  2825. var $1;
  2826. $1=(1000);
  2827. return $1;
  2828. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLSUnit.klass)})},
  2829. messageSends: []}),
  2830. smalltalk.HLSUnit.klass);
  2831. smalltalk.addClass('HLTranscript', smalltalk.HLWidget, [], 'Helios-Core');
  2832. smalltalk.addMethod(
  2833. smalltalk.method({
  2834. selector: "canBeOpenAsTab",
  2835. fn: function (){
  2836. var self=this;
  2837. return smalltalk.withContext(function($ctx1) {
  2838. return true;
  2839. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLTranscript.klass)})},
  2840. messageSends: []}),
  2841. smalltalk.HLTranscript.klass);
  2842. smalltalk.addMethod(
  2843. smalltalk.method({
  2844. selector: "tabLabel",
  2845. fn: function (){
  2846. var self=this;
  2847. return smalltalk.withContext(function($ctx1) {
  2848. return "Transcript";
  2849. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLTranscript.klass)})},
  2850. messageSends: []}),
  2851. smalltalk.HLTranscript.klass);
  2852. smalltalk.addMethod(
  2853. smalltalk.method({
  2854. selector: "tabPriority",
  2855. fn: function (){
  2856. var self=this;
  2857. return smalltalk.withContext(function($ctx1) {
  2858. var $1;
  2859. $1=(600);
  2860. return $1;
  2861. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLTranscript.klass)})},
  2862. messageSends: []}),
  2863. smalltalk.HLTranscript.klass);