Helios-Commands-Core.js 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323
  1. define("helios/Helios-Commands-Core", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){"use strict";
  2. var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
  3. $core.addPackage('Helios-Commands-Core');
  4. $core.packages["Helios-Commands-Core"].innerEval = function (expr) { return eval(expr); };
  5. $core.packages["Helios-Commands-Core"].transport = {"type":"amd","amdNamespace":"helios"};
  6. $core.addClass('HLCommand', $globals.Object, ['input'], 'Helios-Commands-Core');
  7. $core.addMethod(
  8. $core.method({
  9. selector: "asActionBinding",
  10. protocol: 'converting',
  11. fn: function (){
  12. var self=this;
  13. function $HLBindingAction(){return $globals.HLBindingAction||(typeof HLBindingAction=="undefined"?nil:HLBindingAction)}
  14. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  15. return $core.withContext(function($ctx1) {
  16. //>>excludeEnd("ctx");
  17. var $2,$3,$1;
  18. $2=$recv($HLBindingAction())._on_labelled_(self._keyCode(),self._label());
  19. $recv($2)._command_(self);
  20. $3=$recv($2)._yourself();
  21. $1=$3;
  22. return $1;
  23. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  24. }, function($ctx1) {$ctx1.fill(self,"asActionBinding",{},$globals.HLCommand)});
  25. //>>excludeEnd("ctx");
  26. },
  27. //>>excludeStart("ide", pragmas.excludeIdeData);
  28. args: [],
  29. source: "asActionBinding\x0a\x09^ (HLBindingAction on: self keyCode labelled: self label)\x0a \x09command: self;\x0a\x09\x09yourself",
  30. referencedClasses: ["HLBindingAction"],
  31. //>>excludeEnd("ide");
  32. messageSends: ["command:", "on:labelled:", "keyCode", "label", "yourself"]
  33. }),
  34. $globals.HLCommand);
  35. $core.addMethod(
  36. $core.method({
  37. selector: "asBinding",
  38. protocol: 'converting',
  39. fn: function (){
  40. var self=this;
  41. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  42. return $core.withContext(function($ctx1) {
  43. //>>excludeEnd("ctx");
  44. var $2,$1;
  45. $2=self._isBindingGroup();
  46. if($core.assert($2)){
  47. $1=self._asGroupBinding();
  48. } else {
  49. $1=self._asActionBinding();
  50. };
  51. return $1;
  52. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  53. }, function($ctx1) {$ctx1.fill(self,"asBinding",{},$globals.HLCommand)});
  54. //>>excludeEnd("ctx");
  55. },
  56. //>>excludeStart("ide", pragmas.excludeIdeData);
  57. args: [],
  58. source: "asBinding\x0a\x09^ self isBindingGroup\x0a\x09\x09ifTrue: [ self asGroupBinding ]\x0a\x09\x09ifFalse: [ self asActionBinding ]",
  59. referencedClasses: [],
  60. //>>excludeEnd("ide");
  61. messageSends: ["ifTrue:ifFalse:", "isBindingGroup", "asGroupBinding", "asActionBinding"]
  62. }),
  63. $globals.HLCommand);
  64. $core.addMethod(
  65. $core.method({
  66. selector: "asGroupBinding",
  67. protocol: 'converting',
  68. fn: function (){
  69. var self=this;
  70. function $HLBindingGroup(){return $globals.HLBindingGroup||(typeof HLBindingGroup=="undefined"?nil:HLBindingGroup)}
  71. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  72. return $core.withContext(function($ctx1) {
  73. //>>excludeEnd("ctx");
  74. var $1;
  75. $1=$recv($HLBindingGroup())._on_labelled_(self._keyCode(),self._label());
  76. return $1;
  77. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  78. }, function($ctx1) {$ctx1.fill(self,"asGroupBinding",{},$globals.HLCommand)});
  79. //>>excludeEnd("ctx");
  80. },
  81. //>>excludeStart("ide", pragmas.excludeIdeData);
  82. args: [],
  83. source: "asGroupBinding\x0a\x09^ HLBindingGroup \x0a\x09\x09on: self keyCode\x0a\x09\x09labelled: self label",
  84. referencedClasses: ["HLBindingGroup"],
  85. //>>excludeEnd("ide");
  86. messageSends: ["on:labelled:", "keyCode", "label"]
  87. }),
  88. $globals.HLCommand);
  89. $core.addMethod(
  90. $core.method({
  91. selector: "commandError:",
  92. protocol: 'error handling',
  93. fn: function (aString){
  94. var self=this;
  95. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  96. return $core.withContext(function($ctx1) {
  97. //>>excludeEnd("ctx");
  98. self._error_(aString);
  99. return self;
  100. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  101. }, function($ctx1) {$ctx1.fill(self,"commandError:",{aString:aString},$globals.HLCommand)});
  102. //>>excludeEnd("ctx");
  103. },
  104. //>>excludeStart("ide", pragmas.excludeIdeData);
  105. args: ["aString"],
  106. source: "commandError: aString\x0a\x09self error: aString",
  107. referencedClasses: [],
  108. //>>excludeEnd("ide");
  109. messageSends: ["error:"]
  110. }),
  111. $globals.HLCommand);
  112. $core.addMethod(
  113. $core.method({
  114. selector: "defaultInput",
  115. protocol: 'defaults',
  116. fn: function (){
  117. var self=this;
  118. return "";
  119. },
  120. //>>excludeStart("ide", pragmas.excludeIdeData);
  121. args: [],
  122. source: "defaultInput\x0a\x09^ ''",
  123. referencedClasses: [],
  124. //>>excludeEnd("ide");
  125. messageSends: []
  126. }),
  127. $globals.HLCommand);
  128. $core.addMethod(
  129. $core.method({
  130. selector: "documentation",
  131. protocol: 'accessing',
  132. fn: function (){
  133. var self=this;
  134. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  135. return $core.withContext(function($ctx1) {
  136. //>>excludeEnd("ctx");
  137. var $1;
  138. $1=$recv(self._class())._documentation();
  139. return $1;
  140. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  141. }, function($ctx1) {$ctx1.fill(self,"documentation",{},$globals.HLCommand)});
  142. //>>excludeEnd("ctx");
  143. },
  144. //>>excludeStart("ide", pragmas.excludeIdeData);
  145. args: [],
  146. source: "documentation\x0a\x09^ self class documentation",
  147. referencedClasses: [],
  148. //>>excludeEnd("ide");
  149. messageSends: ["documentation", "class"]
  150. }),
  151. $globals.HLCommand);
  152. $core.addMethod(
  153. $core.method({
  154. selector: "execute",
  155. protocol: 'executing',
  156. fn: function (){
  157. var self=this;
  158. return self;
  159. },
  160. //>>excludeStart("ide", pragmas.excludeIdeData);
  161. args: [],
  162. source: "execute",
  163. referencedClasses: [],
  164. //>>excludeEnd("ide");
  165. messageSends: []
  166. }),
  167. $globals.HLCommand);
  168. $core.addMethod(
  169. $core.method({
  170. selector: "input",
  171. protocol: 'accessing',
  172. fn: function (){
  173. var self=this;
  174. var $1;
  175. $1=self["@input"];
  176. return $1;
  177. },
  178. //>>excludeStart("ide", pragmas.excludeIdeData);
  179. args: [],
  180. source: "input\x0a\x09^ input",
  181. referencedClasses: [],
  182. //>>excludeEnd("ide");
  183. messageSends: []
  184. }),
  185. $globals.HLCommand);
  186. $core.addMethod(
  187. $core.method({
  188. selector: "input:",
  189. protocol: 'accessing',
  190. fn: function (aString){
  191. var self=this;
  192. var $1;
  193. self["@input"]=aString;
  194. $1=self["@input"];
  195. return $1;
  196. },
  197. //>>excludeStart("ide", pragmas.excludeIdeData);
  198. args: ["aString"],
  199. source: "input: aString\x0a\x09^ input := aString",
  200. referencedClasses: [],
  201. //>>excludeEnd("ide");
  202. messageSends: []
  203. }),
  204. $globals.HLCommand);
  205. $core.addMethod(
  206. $core.method({
  207. selector: "inputCompletion",
  208. protocol: 'accessing',
  209. fn: function (){
  210. var self=this;
  211. var $1;
  212. $1=[];
  213. return $1;
  214. },
  215. //>>excludeStart("ide", pragmas.excludeIdeData);
  216. args: [],
  217. source: "inputCompletion\x0a\x09^ #()",
  218. referencedClasses: [],
  219. //>>excludeEnd("ide");
  220. messageSends: []
  221. }),
  222. $globals.HLCommand);
  223. $core.addMethod(
  224. $core.method({
  225. selector: "inputLabel",
  226. protocol: 'accessing',
  227. fn: function (){
  228. var self=this;
  229. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  230. return $core.withContext(function($ctx1) {
  231. //>>excludeEnd("ctx");
  232. var $1;
  233. $1=self._label();
  234. return $1;
  235. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  236. }, function($ctx1) {$ctx1.fill(self,"inputLabel",{},$globals.HLCommand)});
  237. //>>excludeEnd("ctx");
  238. },
  239. //>>excludeStart("ide", pragmas.excludeIdeData);
  240. args: [],
  241. source: "inputLabel\x0a\x09^ self label",
  242. referencedClasses: [],
  243. //>>excludeEnd("ide");
  244. messageSends: ["label"]
  245. }),
  246. $globals.HLCommand);
  247. $core.addMethod(
  248. $core.method({
  249. selector: "isAction",
  250. protocol: 'testing',
  251. fn: function (){
  252. var self=this;
  253. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  254. return $core.withContext(function($ctx1) {
  255. //>>excludeEnd("ctx");
  256. var $1;
  257. $1=$recv(self._isBindingGroup())._not();
  258. return $1;
  259. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  260. }, function($ctx1) {$ctx1.fill(self,"isAction",{},$globals.HLCommand)});
  261. //>>excludeEnd("ctx");
  262. },
  263. //>>excludeStart("ide", pragmas.excludeIdeData);
  264. args: [],
  265. source: "isAction\x0a\x09^ self isBindingGroup not",
  266. referencedClasses: [],
  267. //>>excludeEnd("ide");
  268. messageSends: ["not", "isBindingGroup"]
  269. }),
  270. $globals.HLCommand);
  271. $core.addMethod(
  272. $core.method({
  273. selector: "isActive",
  274. protocol: 'testing',
  275. fn: function (){
  276. var self=this;
  277. return true;
  278. },
  279. //>>excludeStart("ide", pragmas.excludeIdeData);
  280. args: [],
  281. source: "isActive\x0a\x09^ true",
  282. referencedClasses: [],
  283. //>>excludeEnd("ide");
  284. messageSends: []
  285. }),
  286. $globals.HLCommand);
  287. $core.addMethod(
  288. $core.method({
  289. selector: "isBindingGroup",
  290. protocol: 'testing',
  291. fn: function (){
  292. var self=this;
  293. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  294. return $core.withContext(function($ctx1) {
  295. //>>excludeEnd("ctx");
  296. var $1;
  297. $1=$recv($recv($recv(self._class())._methodDictionary())._includesKey_("execute"))._not();
  298. return $1;
  299. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  300. }, function($ctx1) {$ctx1.fill(self,"isBindingGroup",{},$globals.HLCommand)});
  301. //>>excludeEnd("ctx");
  302. },
  303. //>>excludeStart("ide", pragmas.excludeIdeData);
  304. args: [],
  305. source: "isBindingGroup\x0a\x09^ (self class methodDictionary includesKey: 'execute') not",
  306. referencedClasses: [],
  307. //>>excludeEnd("ide");
  308. messageSends: ["not", "includesKey:", "methodDictionary", "class"]
  309. }),
  310. $globals.HLCommand);
  311. $core.addMethod(
  312. $core.method({
  313. selector: "isInputRequired",
  314. protocol: 'testing',
  315. fn: function (){
  316. var self=this;
  317. return false;
  318. },
  319. //>>excludeStart("ide", pragmas.excludeIdeData);
  320. args: [],
  321. source: "isInputRequired\x0a\x09^ false",
  322. referencedClasses: [],
  323. //>>excludeEnd("ide");
  324. messageSends: []
  325. }),
  326. $globals.HLCommand);
  327. $core.addMethod(
  328. $core.method({
  329. selector: "key",
  330. protocol: 'accessing',
  331. fn: function (){
  332. var self=this;
  333. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  334. return $core.withContext(function($ctx1) {
  335. //>>excludeEnd("ctx");
  336. var $1;
  337. $1=$recv(self._class())._key();
  338. return $1;
  339. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  340. }, function($ctx1) {$ctx1.fill(self,"key",{},$globals.HLCommand)});
  341. //>>excludeEnd("ctx");
  342. },
  343. //>>excludeStart("ide", pragmas.excludeIdeData);
  344. args: [],
  345. source: "key\x0a\x09^ self class key",
  346. referencedClasses: [],
  347. //>>excludeEnd("ide");
  348. messageSends: ["key", "class"]
  349. }),
  350. $globals.HLCommand);
  351. $core.addMethod(
  352. $core.method({
  353. selector: "keyCode",
  354. protocol: 'accessing',
  355. fn: function (){
  356. var self=this;
  357. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  358. return $core.withContext(function($ctx1) {
  359. //>>excludeEnd("ctx");
  360. var $1;
  361. $1=$recv($recv(self._key())._asUppercase())._charCodeAt_((1));
  362. return $1;
  363. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  364. }, function($ctx1) {$ctx1.fill(self,"keyCode",{},$globals.HLCommand)});
  365. //>>excludeEnd("ctx");
  366. },
  367. //>>excludeStart("ide", pragmas.excludeIdeData);
  368. args: [],
  369. source: "keyCode\x0a\x09^ self key asUppercase charCodeAt: 1",
  370. referencedClasses: [],
  371. //>>excludeEnd("ide");
  372. messageSends: ["charCodeAt:", "asUppercase", "key"]
  373. }),
  374. $globals.HLCommand);
  375. $core.addMethod(
  376. $core.method({
  377. selector: "label",
  378. protocol: 'accessing',
  379. fn: function (){
  380. var self=this;
  381. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  382. return $core.withContext(function($ctx1) {
  383. //>>excludeEnd("ctx");
  384. var $1;
  385. $1=$recv(self._class())._label();
  386. return $1;
  387. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  388. }, function($ctx1) {$ctx1.fill(self,"label",{},$globals.HLCommand)});
  389. //>>excludeEnd("ctx");
  390. },
  391. //>>excludeStart("ide", pragmas.excludeIdeData);
  392. args: [],
  393. source: "label\x0a\x09^ self class label",
  394. referencedClasses: [],
  395. //>>excludeEnd("ide");
  396. messageSends: ["label", "class"]
  397. }),
  398. $globals.HLCommand);
  399. $core.addMethod(
  400. $core.method({
  401. selector: "menuLabel",
  402. protocol: 'accessing',
  403. fn: function (){
  404. var self=this;
  405. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  406. return $core.withContext(function($ctx1) {
  407. //>>excludeEnd("ctx");
  408. var $1;
  409. $1=$recv(self._class())._menuLabel();
  410. return $1;
  411. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  412. }, function($ctx1) {$ctx1.fill(self,"menuLabel",{},$globals.HLCommand)});
  413. //>>excludeEnd("ctx");
  414. },
  415. //>>excludeStart("ide", pragmas.excludeIdeData);
  416. args: [],
  417. source: "menuLabel\x0a\x09^ self class menuLabel",
  418. referencedClasses: [],
  419. //>>excludeEnd("ide");
  420. messageSends: ["menuLabel", "class"]
  421. }),
  422. $globals.HLCommand);
  423. $core.addMethod(
  424. $core.method({
  425. selector: "registerOn:",
  426. protocol: 'registration',
  427. fn: function (aBinding){
  428. var self=this;
  429. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  430. return $core.withContext(function($ctx1) {
  431. //>>excludeEnd("ctx");
  432. var $1;
  433. $1=$recv(aBinding)._add_(self._asBinding());
  434. return $1;
  435. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  436. }, function($ctx1) {$ctx1.fill(self,"registerOn:",{aBinding:aBinding},$globals.HLCommand)});
  437. //>>excludeEnd("ctx");
  438. },
  439. //>>excludeStart("ide", pragmas.excludeIdeData);
  440. args: ["aBinding"],
  441. source: "registerOn: aBinding\x0a\x09^ aBinding add: self asBinding",
  442. referencedClasses: [],
  443. //>>excludeEnd("ide");
  444. messageSends: ["add:", "asBinding"]
  445. }),
  446. $globals.HLCommand);
  447. $core.addMethod(
  448. $core.method({
  449. selector: "concreteClasses",
  450. protocol: 'registration',
  451. fn: function (){
  452. var self=this;
  453. var classes;
  454. function $OrderedCollection(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  455. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  456. return $core.withContext(function($ctx1) {
  457. //>>excludeEnd("ctx");
  458. var $1,$2;
  459. classes=$recv($OrderedCollection())._new();
  460. $1=self._isConcrete();
  461. if($core.assert($1)){
  462. $recv(classes)._add_(self);
  463. };
  464. $recv(self._subclasses())._do_((function(each){
  465. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  466. return $core.withContext(function($ctx2) {
  467. //>>excludeEnd("ctx");
  468. return $recv(classes)._addAll_($recv(each)._concreteClasses());
  469. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  470. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  471. //>>excludeEnd("ctx");
  472. }));
  473. $2=classes;
  474. return $2;
  475. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  476. }, function($ctx1) {$ctx1.fill(self,"concreteClasses",{classes:classes},$globals.HLCommand.klass)});
  477. //>>excludeEnd("ctx");
  478. },
  479. //>>excludeStart("ide", pragmas.excludeIdeData);
  480. args: [],
  481. source: "concreteClasses\x0a\x09| classes |\x0a\x09\x0a\x09classes := OrderedCollection new.\x0a\x09\x0a\x09self isConcrete\x0a\x09\x09ifTrue: [ classes add: self ].\x0a\x09\x09\x0a\x09self subclasses do: [ :each | \x0a\x09\x09classes addAll: each concreteClasses ].\x0a\x09\x09\x0a\x09^ classes",
  482. referencedClasses: ["OrderedCollection"],
  483. //>>excludeEnd("ide");
  484. messageSends: ["new", "ifTrue:", "isConcrete", "add:", "do:", "subclasses", "addAll:", "concreteClasses"]
  485. }),
  486. $globals.HLCommand.klass);
  487. $core.addMethod(
  488. $core.method({
  489. selector: "documentation",
  490. protocol: 'accessing',
  491. fn: function (){
  492. var self=this;
  493. return "";
  494. },
  495. //>>excludeStart("ide", pragmas.excludeIdeData);
  496. args: [],
  497. source: "documentation\x0a\x09^ ''",
  498. referencedClasses: [],
  499. //>>excludeEnd("ide");
  500. messageSends: []
  501. }),
  502. $globals.HLCommand.klass);
  503. $core.addMethod(
  504. $core.method({
  505. selector: "isConcrete",
  506. protocol: 'testing',
  507. fn: function (){
  508. var self=this;
  509. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  510. return $core.withContext(function($ctx1) {
  511. //>>excludeEnd("ctx");
  512. var $1;
  513. $1=$recv(self._key())._notNil();
  514. return $1;
  515. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  516. }, function($ctx1) {$ctx1.fill(self,"isConcrete",{},$globals.HLCommand.klass)});
  517. //>>excludeEnd("ctx");
  518. },
  519. //>>excludeStart("ide", pragmas.excludeIdeData);
  520. args: [],
  521. source: "isConcrete\x0a\x09^ self key notNil",
  522. referencedClasses: [],
  523. //>>excludeEnd("ide");
  524. messageSends: ["notNil", "key"]
  525. }),
  526. $globals.HLCommand.klass);
  527. $core.addMethod(
  528. $core.method({
  529. selector: "isValidFor:",
  530. protocol: 'testing',
  531. fn: function (aModel){
  532. var self=this;
  533. return true;
  534. },
  535. //>>excludeStart("ide", pragmas.excludeIdeData);
  536. args: ["aModel"],
  537. source: "isValidFor: aModel\x0a\x09^ true",
  538. referencedClasses: [],
  539. //>>excludeEnd("ide");
  540. messageSends: []
  541. }),
  542. $globals.HLCommand.klass);
  543. $core.addMethod(
  544. $core.method({
  545. selector: "key",
  546. protocol: 'accessing',
  547. fn: function (){
  548. var self=this;
  549. return nil;
  550. },
  551. //>>excludeStart("ide", pragmas.excludeIdeData);
  552. args: [],
  553. source: "key\x0a\x09\x22Answer a single character string or nil if no key\x22\x0a\x09\x0a\x09^ nil",
  554. referencedClasses: [],
  555. //>>excludeEnd("ide");
  556. messageSends: []
  557. }),
  558. $globals.HLCommand.klass);
  559. $core.addMethod(
  560. $core.method({
  561. selector: "label",
  562. protocol: 'accessing',
  563. fn: function (){
  564. var self=this;
  565. return "";
  566. },
  567. //>>excludeStart("ide", pragmas.excludeIdeData);
  568. args: [],
  569. source: "label\x0a\x09^ ''",
  570. referencedClasses: [],
  571. //>>excludeEnd("ide");
  572. messageSends: []
  573. }),
  574. $globals.HLCommand.klass);
  575. $core.addMethod(
  576. $core.method({
  577. selector: "menuLabel",
  578. protocol: 'accessing',
  579. fn: function (){
  580. var self=this;
  581. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  582. return $core.withContext(function($ctx1) {
  583. //>>excludeEnd("ctx");
  584. var $1;
  585. $1=self._label();
  586. return $1;
  587. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  588. }, function($ctx1) {$ctx1.fill(self,"menuLabel",{},$globals.HLCommand.klass)});
  589. //>>excludeEnd("ctx");
  590. },
  591. //>>excludeStart("ide", pragmas.excludeIdeData);
  592. args: [],
  593. source: "menuLabel\x0a\x09^ self label",
  594. referencedClasses: [],
  595. //>>excludeEnd("ide");
  596. messageSends: ["label"]
  597. }),
  598. $globals.HLCommand.klass);
  599. $core.addMethod(
  600. $core.method({
  601. selector: "registerConcreteClassesOn:",
  602. protocol: 'accessing',
  603. fn: function (aBinding){
  604. var self=this;
  605. var newBinding;
  606. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  607. return $core.withContext(function($ctx1) {
  608. //>>excludeEnd("ctx");
  609. var $1;
  610. $1=self._isConcrete();
  611. if($core.assert($1)){
  612. newBinding=self._registerOn_(aBinding);
  613. newBinding;
  614. } else {
  615. newBinding=aBinding;
  616. newBinding;
  617. };
  618. $recv(self._subclasses())._do_((function(each){
  619. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  620. return $core.withContext(function($ctx2) {
  621. //>>excludeEnd("ctx");
  622. return $recv(each)._registerConcreteClassesOn_(newBinding);
  623. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  624. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)});
  625. //>>excludeEnd("ctx");
  626. }));
  627. return self;
  628. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  629. }, function($ctx1) {$ctx1.fill(self,"registerConcreteClassesOn:",{aBinding:aBinding,newBinding:newBinding},$globals.HLCommand.klass)});
  630. //>>excludeEnd("ctx");
  631. },
  632. //>>excludeStart("ide", pragmas.excludeIdeData);
  633. args: ["aBinding"],
  634. source: "registerConcreteClassesOn: aBinding\x0a\x09| newBinding |\x0a\x09\x0a\x09self isConcrete\x0a\x09\x09ifTrue: [ newBinding := self registerOn: aBinding ]\x0a\x09\x09ifFalse: [ newBinding := aBinding ].\x0a\x09\x09\x0a\x09self subclasses do: [ :each | each registerConcreteClassesOn: newBinding ]",
  635. referencedClasses: [],
  636. //>>excludeEnd("ide");
  637. messageSends: ["ifTrue:ifFalse:", "isConcrete", "registerOn:", "do:", "subclasses", "registerConcreteClassesOn:"]
  638. }),
  639. $globals.HLCommand.klass);
  640. $core.addMethod(
  641. $core.method({
  642. selector: "registerOn:",
  643. protocol: 'registration',
  644. fn: function (aBinding){
  645. var self=this;
  646. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  647. return $core.withContext(function($ctx1) {
  648. //>>excludeEnd("ctx");
  649. var $1;
  650. $1=$recv(self._new())._registerOn_(aBinding);
  651. return $1;
  652. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  653. }, function($ctx1) {$ctx1.fill(self,"registerOn:",{aBinding:aBinding},$globals.HLCommand.klass)});
  654. //>>excludeEnd("ctx");
  655. },
  656. //>>excludeStart("ide", pragmas.excludeIdeData);
  657. args: ["aBinding"],
  658. source: "registerOn: aBinding\x0a\x09^ self new registerOn: aBinding",
  659. referencedClasses: [],
  660. //>>excludeEnd("ide");
  661. messageSends: ["registerOn:", "new"]
  662. }),
  663. $globals.HLCommand.klass);
  664. $core.addClass('HLCloseTabCommand', $globals.HLCommand, [], 'Helios-Commands-Core');
  665. $core.addMethod(
  666. $core.method({
  667. selector: "execute",
  668. protocol: 'executing',
  669. fn: function (){
  670. var self=this;
  671. function $HLManager(){return $globals.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  672. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  673. return $core.withContext(function($ctx1) {
  674. //>>excludeEnd("ctx");
  675. $recv($recv($HLManager())._current())._removeActiveTab();
  676. return self;
  677. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  678. }, function($ctx1) {$ctx1.fill(self,"execute",{},$globals.HLCloseTabCommand)});
  679. //>>excludeEnd("ctx");
  680. },
  681. //>>excludeStart("ide", pragmas.excludeIdeData);
  682. args: [],
  683. source: "execute\x0a\x09HLManager current removeActiveTab",
  684. referencedClasses: ["HLManager"],
  685. //>>excludeEnd("ide");
  686. messageSends: ["removeActiveTab", "current"]
  687. }),
  688. $globals.HLCloseTabCommand);
  689. $core.addMethod(
  690. $core.method({
  691. selector: "key",
  692. protocol: 'accessing',
  693. fn: function (){
  694. var self=this;
  695. return "w";
  696. },
  697. //>>excludeStart("ide", pragmas.excludeIdeData);
  698. args: [],
  699. source: "key\x0a\x09^ 'w'",
  700. referencedClasses: [],
  701. //>>excludeEnd("ide");
  702. messageSends: []
  703. }),
  704. $globals.HLCloseTabCommand.klass);
  705. $core.addMethod(
  706. $core.method({
  707. selector: "label",
  708. protocol: 'accessing',
  709. fn: function (){
  710. var self=this;
  711. return "Close tab";
  712. },
  713. //>>excludeStart("ide", pragmas.excludeIdeData);
  714. args: [],
  715. source: "label\x0a\x09^ 'Close tab'",
  716. referencedClasses: [],
  717. //>>excludeEnd("ide");
  718. messageSends: []
  719. }),
  720. $globals.HLCloseTabCommand.klass);
  721. $core.addClass('HLModelCommand', $globals.HLCommand, ['model'], 'Helios-Commands-Core');
  722. $core.addMethod(
  723. $core.method({
  724. selector: "model",
  725. protocol: 'accessing',
  726. fn: function (){
  727. var self=this;
  728. var $1;
  729. $1=self["@model"];
  730. return $1;
  731. },
  732. //>>excludeStart("ide", pragmas.excludeIdeData);
  733. args: [],
  734. source: "model\x0a\x09^ model",
  735. referencedClasses: [],
  736. //>>excludeEnd("ide");
  737. messageSends: []
  738. }),
  739. $globals.HLModelCommand);
  740. $core.addMethod(
  741. $core.method({
  742. selector: "model:",
  743. protocol: 'accessing',
  744. fn: function (aModel){
  745. var self=this;
  746. self["@model"]=aModel;
  747. return self;
  748. },
  749. //>>excludeStart("ide", pragmas.excludeIdeData);
  750. args: ["aModel"],
  751. source: "model: aModel\x0a\x09model := aModel",
  752. referencedClasses: [],
  753. //>>excludeEnd("ide");
  754. messageSends: []
  755. }),
  756. $globals.HLModelCommand);
  757. $core.addMethod(
  758. $core.method({
  759. selector: "for:",
  760. protocol: 'instance creation',
  761. fn: function (aModel){
  762. var self=this;
  763. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  764. return $core.withContext(function($ctx1) {
  765. //>>excludeEnd("ctx");
  766. var $1;
  767. $1=self._new();
  768. return $1;
  769. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  770. }, function($ctx1) {$ctx1.fill(self,"for:",{aModel:aModel},$globals.HLModelCommand.klass)});
  771. //>>excludeEnd("ctx");
  772. },
  773. //>>excludeStart("ide", pragmas.excludeIdeData);
  774. args: ["aModel"],
  775. source: "for: aModel\x0a\x09^ self new",
  776. referencedClasses: [],
  777. //>>excludeEnd("ide");
  778. messageSends: ["new"]
  779. }),
  780. $globals.HLModelCommand.klass);
  781. $core.addMethod(
  782. $core.method({
  783. selector: "registerConcreteClassesOn:for:",
  784. protocol: 'registration',
  785. fn: function (aBinding,aModel){
  786. var self=this;
  787. var newBinding;
  788. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  789. return $core.withContext(function($ctx1) {
  790. //>>excludeEnd("ctx");
  791. var $1;
  792. $1=$recv(self._isConcrete())._and_((function(){
  793. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  794. return $core.withContext(function($ctx2) {
  795. //>>excludeEnd("ctx");
  796. return self._isValidFor_(aModel);
  797. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  798. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  799. //>>excludeEnd("ctx");
  800. }));
  801. if($core.assert($1)){
  802. newBinding=self._registerOn_for_(aBinding,aModel);
  803. newBinding;
  804. } else {
  805. newBinding=aBinding;
  806. newBinding;
  807. };
  808. $recv(self._subclasses())._do_((function(each){
  809. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  810. return $core.withContext(function($ctx2) {
  811. //>>excludeEnd("ctx");
  812. return $recv(each)._registerConcreteClassesOn_for_(newBinding,aModel);
  813. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  814. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)});
  815. //>>excludeEnd("ctx");
  816. }));
  817. return self;
  818. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  819. }, function($ctx1) {$ctx1.fill(self,"registerConcreteClassesOn:for:",{aBinding:aBinding,aModel:aModel,newBinding:newBinding},$globals.HLModelCommand.klass)});
  820. //>>excludeEnd("ctx");
  821. },
  822. //>>excludeStart("ide", pragmas.excludeIdeData);
  823. args: ["aBinding", "aModel"],
  824. source: "registerConcreteClassesOn: aBinding for: aModel\x0a\x09| newBinding |\x0a\x09\x0a\x09(self isConcrete and: [ self isValidFor: aModel ])\x0a\x09\x09ifTrue: [ newBinding := self registerOn: aBinding for: aModel ]\x0a\x09\x09ifFalse: [ newBinding := aBinding ].\x0a\x09\x09\x0a\x09self subclasses do: [ :each |\x0a\x09\x09each registerConcreteClassesOn: newBinding for: aModel ]",
  825. referencedClasses: [],
  826. //>>excludeEnd("ide");
  827. messageSends: ["ifTrue:ifFalse:", "and:", "isConcrete", "isValidFor:", "registerOn:for:", "do:", "subclasses", "registerConcreteClassesOn:for:"]
  828. }),
  829. $globals.HLModelCommand.klass);
  830. $core.addMethod(
  831. $core.method({
  832. selector: "registerOn:for:",
  833. protocol: 'registration',
  834. fn: function (aBinding,aModel){
  835. var self=this;
  836. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  837. return $core.withContext(function($ctx1) {
  838. //>>excludeEnd("ctx");
  839. var $1;
  840. $1=$recv(self._for_(aModel))._registerOn_(aBinding);
  841. return $1;
  842. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  843. }, function($ctx1) {$ctx1.fill(self,"registerOn:for:",{aBinding:aBinding,aModel:aModel},$globals.HLModelCommand.klass)});
  844. //>>excludeEnd("ctx");
  845. },
  846. //>>excludeStart("ide", pragmas.excludeIdeData);
  847. args: ["aBinding", "aModel"],
  848. source: "registerOn: aBinding for: aModel\x0a\x09^ (self for: aModel) registerOn: aBinding",
  849. referencedClasses: [],
  850. //>>excludeEnd("ide");
  851. messageSends: ["registerOn:", "for:"]
  852. }),
  853. $globals.HLModelCommand.klass);
  854. $core.addClass('HLOpenCommand', $globals.HLCommand, [], 'Helios-Commands-Core');
  855. $core.addMethod(
  856. $core.method({
  857. selector: "key",
  858. protocol: 'accessing',
  859. fn: function (){
  860. var self=this;
  861. return "o";
  862. },
  863. //>>excludeStart("ide", pragmas.excludeIdeData);
  864. args: [],
  865. source: "key\x0a\x09^ 'o'",
  866. referencedClasses: [],
  867. //>>excludeEnd("ide");
  868. messageSends: []
  869. }),
  870. $globals.HLOpenCommand.klass);
  871. $core.addMethod(
  872. $core.method({
  873. selector: "label",
  874. protocol: 'accessing',
  875. fn: function (){
  876. var self=this;
  877. return "Open";
  878. },
  879. //>>excludeStart("ide", pragmas.excludeIdeData);
  880. args: [],
  881. source: "label\x0a\x09^ 'Open'",
  882. referencedClasses: [],
  883. //>>excludeEnd("ide");
  884. messageSends: []
  885. }),
  886. $globals.HLOpenCommand.klass);
  887. $core.addClass('HLOpenBrowserCommand', $globals.HLOpenCommand, [], 'Helios-Commands-Core');
  888. $core.addMethod(
  889. $core.method({
  890. selector: "execute",
  891. protocol: 'executing',
  892. fn: function (){
  893. var self=this;
  894. function $HLBrowser(){return $globals.HLBrowser||(typeof HLBrowser=="undefined"?nil:HLBrowser)}
  895. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  896. return $core.withContext(function($ctx1) {
  897. //>>excludeEnd("ctx");
  898. var $1;
  899. $1=$recv($HLBrowser())._openAsTab();
  900. return $1;
  901. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  902. }, function($ctx1) {$ctx1.fill(self,"execute",{},$globals.HLOpenBrowserCommand)});
  903. //>>excludeEnd("ctx");
  904. },
  905. //>>excludeStart("ide", pragmas.excludeIdeData);
  906. args: [],
  907. source: "execute\x0a\x09^ HLBrowser openAsTab",
  908. referencedClasses: ["HLBrowser"],
  909. //>>excludeEnd("ide");
  910. messageSends: ["openAsTab"]
  911. }),
  912. $globals.HLOpenBrowserCommand);
  913. $core.addMethod(
  914. $core.method({
  915. selector: "key",
  916. protocol: 'accessing',
  917. fn: function (){
  918. var self=this;
  919. return "b";
  920. },
  921. //>>excludeStart("ide", pragmas.excludeIdeData);
  922. args: [],
  923. source: "key\x0a\x09^ 'b'",
  924. referencedClasses: [],
  925. //>>excludeEnd("ide");
  926. messageSends: []
  927. }),
  928. $globals.HLOpenBrowserCommand.klass);
  929. $core.addMethod(
  930. $core.method({
  931. selector: "label",
  932. protocol: 'accessing',
  933. fn: function (){
  934. var self=this;
  935. return "Browser";
  936. },
  937. //>>excludeStart("ide", pragmas.excludeIdeData);
  938. args: [],
  939. source: "label\x0a\x09^ 'Browser'",
  940. referencedClasses: [],
  941. //>>excludeEnd("ide");
  942. messageSends: []
  943. }),
  944. $globals.HLOpenBrowserCommand.klass);
  945. $core.addClass('HLOpenSUnitCommand', $globals.HLOpenCommand, [], 'Helios-Commands-Core');
  946. $core.addMethod(
  947. $core.method({
  948. selector: "execute",
  949. protocol: 'executing',
  950. fn: function (){
  951. var self=this;
  952. function $HLSUnit(){return $globals.HLSUnit||(typeof HLSUnit=="undefined"?nil:HLSUnit)}
  953. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  954. return $core.withContext(function($ctx1) {
  955. //>>excludeEnd("ctx");
  956. var $1;
  957. $1=$recv($HLSUnit())._openAsTab();
  958. return $1;
  959. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  960. }, function($ctx1) {$ctx1.fill(self,"execute",{},$globals.HLOpenSUnitCommand)});
  961. //>>excludeEnd("ctx");
  962. },
  963. //>>excludeStart("ide", pragmas.excludeIdeData);
  964. args: [],
  965. source: "execute\x0a\x09^ HLSUnit openAsTab",
  966. referencedClasses: ["HLSUnit"],
  967. //>>excludeEnd("ide");
  968. messageSends: ["openAsTab"]
  969. }),
  970. $globals.HLOpenSUnitCommand);
  971. $core.addMethod(
  972. $core.method({
  973. selector: "key",
  974. protocol: 'accessing',
  975. fn: function (){
  976. var self=this;
  977. return "s";
  978. },
  979. //>>excludeStart("ide", pragmas.excludeIdeData);
  980. args: [],
  981. source: "key\x0a\x09^ 's'",
  982. referencedClasses: [],
  983. //>>excludeEnd("ide");
  984. messageSends: []
  985. }),
  986. $globals.HLOpenSUnitCommand.klass);
  987. $core.addMethod(
  988. $core.method({
  989. selector: "label",
  990. protocol: 'accessing',
  991. fn: function (){
  992. var self=this;
  993. return "SUnit";
  994. },
  995. //>>excludeStart("ide", pragmas.excludeIdeData);
  996. args: [],
  997. source: "label\x0a\x09^ 'SUnit'",
  998. referencedClasses: [],
  999. //>>excludeEnd("ide");
  1000. messageSends: []
  1001. }),
  1002. $globals.HLOpenSUnitCommand.klass);
  1003. $core.addClass('HLOpenWorkspaceCommand', $globals.HLOpenCommand, [], 'Helios-Commands-Core');
  1004. $core.addMethod(
  1005. $core.method({
  1006. selector: "execute",
  1007. protocol: 'executing',
  1008. fn: function (){
  1009. var self=this;
  1010. function $HLWorkspace(){return $globals.HLWorkspace||(typeof HLWorkspace=="undefined"?nil:HLWorkspace)}
  1011. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1012. return $core.withContext(function($ctx1) {
  1013. //>>excludeEnd("ctx");
  1014. var $1;
  1015. $1=$recv($HLWorkspace())._openAsTab();
  1016. return $1;
  1017. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1018. }, function($ctx1) {$ctx1.fill(self,"execute",{},$globals.HLOpenWorkspaceCommand)});
  1019. //>>excludeEnd("ctx");
  1020. },
  1021. //>>excludeStart("ide", pragmas.excludeIdeData);
  1022. args: [],
  1023. source: "execute\x0a\x09^ HLWorkspace openAsTab",
  1024. referencedClasses: ["HLWorkspace"],
  1025. //>>excludeEnd("ide");
  1026. messageSends: ["openAsTab"]
  1027. }),
  1028. $globals.HLOpenWorkspaceCommand);
  1029. $core.addMethod(
  1030. $core.method({
  1031. selector: "key",
  1032. protocol: 'accessing',
  1033. fn: function (){
  1034. var self=this;
  1035. return "w";
  1036. },
  1037. //>>excludeStart("ide", pragmas.excludeIdeData);
  1038. args: [],
  1039. source: "key\x0a\x09^ 'w'",
  1040. referencedClasses: [],
  1041. //>>excludeEnd("ide");
  1042. messageSends: []
  1043. }),
  1044. $globals.HLOpenWorkspaceCommand.klass);
  1045. $core.addMethod(
  1046. $core.method({
  1047. selector: "label",
  1048. protocol: 'accessing',
  1049. fn: function (){
  1050. var self=this;
  1051. return "Workspace";
  1052. },
  1053. //>>excludeStart("ide", pragmas.excludeIdeData);
  1054. args: [],
  1055. source: "label\x0a\x09^ 'Workspace'",
  1056. referencedClasses: [],
  1057. //>>excludeEnd("ide");
  1058. messageSends: []
  1059. }),
  1060. $globals.HLOpenWorkspaceCommand.klass);
  1061. $core.addClass('HLSwitchTabCommand', $globals.HLCommand, [], 'Helios-Commands-Core');
  1062. $core.addMethod(
  1063. $core.method({
  1064. selector: "execute",
  1065. protocol: 'executing',
  1066. fn: function (){
  1067. var self=this;
  1068. var activeTab;
  1069. function $HLTabSelectionWidget(){return $globals.HLTabSelectionWidget||(typeof HLTabSelectionWidget=="undefined"?nil:HLTabSelectionWidget)}
  1070. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1071. return $core.withContext(function($ctx1) {
  1072. //>>excludeEnd("ctx");
  1073. var $2,$3,$1;
  1074. activeTab=self._selectedTab();
  1075. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1076. $ctx1.sendIdx["selectedTab"]=1;
  1077. //>>excludeEnd("ctx");
  1078. $2=$recv($HLTabSelectionWidget())._new();
  1079. $recv($2)._tabs_(self._tabs());
  1080. $recv($2)._selectedTab_(self._selectedTab());
  1081. $recv($2)._selectCallback_((function(tab){
  1082. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1083. return $core.withContext(function($ctx2) {
  1084. //>>excludeEnd("ctx");
  1085. return $recv(tab)._activate();
  1086. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1087. $ctx2.sendIdx["activate"]=1;
  1088. //>>excludeEnd("ctx");
  1089. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1090. }, function($ctx2) {$ctx2.fillBlock({tab:tab},$ctx1,1)});
  1091. //>>excludeEnd("ctx");
  1092. }));
  1093. $recv($2)._confirmCallback_((function(tab){
  1094. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1095. return $core.withContext(function($ctx2) {
  1096. //>>excludeEnd("ctx");
  1097. return $recv(tab)._focus();
  1098. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1099. }, function($ctx2) {$ctx2.fillBlock({tab:tab},$ctx1,2)});
  1100. //>>excludeEnd("ctx");
  1101. }));
  1102. $recv($2)._cancelCallback_((function(){
  1103. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1104. return $core.withContext(function($ctx2) {
  1105. //>>excludeEnd("ctx");
  1106. return $recv(activeTab)._activate();
  1107. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1108. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  1109. //>>excludeEnd("ctx");
  1110. }));
  1111. $3=$recv($2)._show();
  1112. $1=$3;
  1113. return $1;
  1114. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1115. }, function($ctx1) {$ctx1.fill(self,"execute",{activeTab:activeTab},$globals.HLSwitchTabCommand)});
  1116. //>>excludeEnd("ctx");
  1117. },
  1118. //>>excludeStart("ide", pragmas.excludeIdeData);
  1119. args: [],
  1120. source: "execute\x0a\x09| activeTab |\x0a\x09\x0a\x09activeTab := self selectedTab.\x0a\x09\x0a\x09^ HLTabSelectionWidget new\x0a\x09\x09tabs: self tabs;\x0a\x09\x09selectedTab: self selectedTab;\x0a\x09\x09selectCallback: [ :tab | tab activate ];\x0a\x09\x09confirmCallback: [ :tab | tab focus ];\x0a\x09\x09cancelCallback: [ activeTab activate ];\x0a\x09\x09show",
  1121. referencedClasses: ["HLTabSelectionWidget"],
  1122. //>>excludeEnd("ide");
  1123. messageSends: ["selectedTab", "tabs:", "new", "tabs", "selectedTab:", "selectCallback:", "activate", "confirmCallback:", "focus", "cancelCallback:", "show"]
  1124. }),
  1125. $globals.HLSwitchTabCommand);
  1126. $core.addMethod(
  1127. $core.method({
  1128. selector: "selectedTab",
  1129. protocol: 'accessing',
  1130. fn: function (){
  1131. var self=this;
  1132. function $HLManager(){return $globals.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  1133. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1134. return $core.withContext(function($ctx1) {
  1135. //>>excludeEnd("ctx");
  1136. var $1;
  1137. $1=$recv($recv($HLManager())._current())._activeTab();
  1138. return $1;
  1139. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1140. }, function($ctx1) {$ctx1.fill(self,"selectedTab",{},$globals.HLSwitchTabCommand)});
  1141. //>>excludeEnd("ctx");
  1142. },
  1143. //>>excludeStart("ide", pragmas.excludeIdeData);
  1144. args: [],
  1145. source: "selectedTab\x0a\x09^ HLManager current activeTab",
  1146. referencedClasses: ["HLManager"],
  1147. //>>excludeEnd("ide");
  1148. messageSends: ["activeTab", "current"]
  1149. }),
  1150. $globals.HLSwitchTabCommand);
  1151. $core.addMethod(
  1152. $core.method({
  1153. selector: "tabs",
  1154. protocol: 'accessing',
  1155. fn: function (){
  1156. var self=this;
  1157. function $HLManager(){return $globals.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  1158. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1159. return $core.withContext(function($ctx1) {
  1160. //>>excludeEnd("ctx");
  1161. var $1;
  1162. $1=$recv($recv($HLManager())._current())._tabs();
  1163. return $1;
  1164. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1165. }, function($ctx1) {$ctx1.fill(self,"tabs",{},$globals.HLSwitchTabCommand)});
  1166. //>>excludeEnd("ctx");
  1167. },
  1168. //>>excludeStart("ide", pragmas.excludeIdeData);
  1169. args: [],
  1170. source: "tabs\x0a\x09^ HLManager current tabs",
  1171. referencedClasses: ["HLManager"],
  1172. //>>excludeEnd("ide");
  1173. messageSends: ["tabs", "current"]
  1174. }),
  1175. $globals.HLSwitchTabCommand);
  1176. $core.addMethod(
  1177. $core.method({
  1178. selector: "key",
  1179. protocol: 'accessing',
  1180. fn: function (){
  1181. var self=this;
  1182. return "s";
  1183. },
  1184. //>>excludeStart("ide", pragmas.excludeIdeData);
  1185. args: [],
  1186. source: "key\x0a\x09^ 's'",
  1187. referencedClasses: [],
  1188. //>>excludeEnd("ide");
  1189. messageSends: []
  1190. }),
  1191. $globals.HLSwitchTabCommand.klass);
  1192. $core.addMethod(
  1193. $core.method({
  1194. selector: "label",
  1195. protocol: 'accessing',
  1196. fn: function (){
  1197. var self=this;
  1198. return "Switch tab";
  1199. },
  1200. //>>excludeStart("ide", pragmas.excludeIdeData);
  1201. args: [],
  1202. source: "label\x0a\x09^ 'Switch tab'",
  1203. referencedClasses: [],
  1204. //>>excludeEnd("ide");
  1205. messageSends: []
  1206. }),
  1207. $globals.HLSwitchTabCommand.klass);
  1208. $core.addClass('HLViewCommand', $globals.HLCommand, [], 'Helios-Commands-Core');
  1209. $core.addMethod(
  1210. $core.method({
  1211. selector: "label",
  1212. protocol: 'accessing',
  1213. fn: function (){
  1214. var self=this;
  1215. return "View";
  1216. },
  1217. //>>excludeStart("ide", pragmas.excludeIdeData);
  1218. args: [],
  1219. source: "label\x0a\x09^ 'View'",
  1220. referencedClasses: [],
  1221. //>>excludeEnd("ide");
  1222. messageSends: []
  1223. }),
  1224. $globals.HLViewCommand.klass);
  1225. });