Helios-Commands-Core.js 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971
  1. (function(smalltalk,nil,_st){
  2. smalltalk.addPackage('Helios-Commands-Core');
  3. smalltalk.addClass('HLCommand', smalltalk.Object, ['input'], 'Helios-Commands-Core');
  4. smalltalk.addMethod(
  5. smalltalk.method({
  6. selector: "asActionBinding",
  7. category: 'converting',
  8. fn: function (){
  9. var self=this;
  10. function $HLBindingAction(){return smalltalk.HLBindingAction||(typeof HLBindingAction=="undefined"?nil:HLBindingAction)}
  11. return smalltalk.withContext(function($ctx1) {
  12. var $2,$3,$1;
  13. $2=_st($HLBindingAction())._on_labelled_(self._keyCode(),self._label());
  14. _st($2)._command_(self);
  15. $3=_st($2)._yourself();
  16. $1=$3;
  17. return $1;
  18. }, function($ctx1) {$ctx1.fill(self,"asActionBinding",{},smalltalk.HLCommand)})},
  19. args: [],
  20. source: "asActionBinding\x0a\x09^ (HLBindingAction on: self keyCode labelled: self label)\x0a \x09command: self;\x0a\x09\x09yourself",
  21. messageSends: ["command:", "on:labelled:", "keyCode", "label", "yourself"],
  22. referencedClasses: ["HLBindingAction"]
  23. }),
  24. smalltalk.HLCommand);
  25. smalltalk.addMethod(
  26. smalltalk.method({
  27. selector: "asBinding",
  28. category: 'converting',
  29. fn: function (){
  30. var self=this;
  31. return smalltalk.withContext(function($ctx1) {
  32. var $2,$1;
  33. $2=self._isBindingGroup();
  34. if(smalltalk.assert($2)){
  35. $1=self._asGroupBinding();
  36. } else {
  37. $1=self._asActionBinding();
  38. };
  39. return $1;
  40. }, function($ctx1) {$ctx1.fill(self,"asBinding",{},smalltalk.HLCommand)})},
  41. args: [],
  42. source: "asBinding\x0a\x09^ self isBindingGroup\x0a\x09\x09ifTrue: [ self asGroupBinding ]\x0a\x09\x09ifFalse: [ self asActionBinding ]",
  43. messageSends: ["ifTrue:ifFalse:", "isBindingGroup", "asGroupBinding", "asActionBinding"],
  44. referencedClasses: []
  45. }),
  46. smalltalk.HLCommand);
  47. smalltalk.addMethod(
  48. smalltalk.method({
  49. selector: "asGroupBinding",
  50. category: 'converting',
  51. fn: function (){
  52. var self=this;
  53. function $HLBindingGroup(){return smalltalk.HLBindingGroup||(typeof HLBindingGroup=="undefined"?nil:HLBindingGroup)}
  54. return smalltalk.withContext(function($ctx1) {
  55. var $1;
  56. $1=_st($HLBindingGroup())._on_labelled_(self._keyCode(),self._label());
  57. return $1;
  58. }, function($ctx1) {$ctx1.fill(self,"asGroupBinding",{},smalltalk.HLCommand)})},
  59. args: [],
  60. source: "asGroupBinding\x0a\x09^ HLBindingGroup \x0a\x09\x09on: self keyCode\x0a\x09\x09labelled: self label",
  61. messageSends: ["on:labelled:", "keyCode", "label"],
  62. referencedClasses: ["HLBindingGroup"]
  63. }),
  64. smalltalk.HLCommand);
  65. smalltalk.addMethod(
  66. smalltalk.method({
  67. selector: "commandError:",
  68. category: 'error handling',
  69. fn: function (aString){
  70. var self=this;
  71. return smalltalk.withContext(function($ctx1) {
  72. self._error_(aString);
  73. return self}, function($ctx1) {$ctx1.fill(self,"commandError:",{aString:aString},smalltalk.HLCommand)})},
  74. args: ["aString"],
  75. source: "commandError: aString\x0a\x09self error: aString",
  76. messageSends: ["error:"],
  77. referencedClasses: []
  78. }),
  79. smalltalk.HLCommand);
  80. smalltalk.addMethod(
  81. smalltalk.method({
  82. selector: "defaultInput",
  83. category: 'defaults',
  84. fn: function (){
  85. var self=this;
  86. return smalltalk.withContext(function($ctx1) {
  87. return "";
  88. }, function($ctx1) {$ctx1.fill(self,"defaultInput",{},smalltalk.HLCommand)})},
  89. args: [],
  90. source: "defaultInput\x0a\x09^ ''",
  91. messageSends: [],
  92. referencedClasses: []
  93. }),
  94. smalltalk.HLCommand);
  95. smalltalk.addMethod(
  96. smalltalk.method({
  97. selector: "documentation",
  98. category: 'accessing',
  99. fn: function (){
  100. var self=this;
  101. return smalltalk.withContext(function($ctx1) {
  102. var $1;
  103. $1=_st(self._class())._documentation();
  104. return $1;
  105. }, function($ctx1) {$ctx1.fill(self,"documentation",{},smalltalk.HLCommand)})},
  106. args: [],
  107. source: "documentation\x0a\x09^ self class documentation",
  108. messageSends: ["documentation", "class"],
  109. referencedClasses: []
  110. }),
  111. smalltalk.HLCommand);
  112. smalltalk.addMethod(
  113. smalltalk.method({
  114. selector: "execute",
  115. category: 'executing',
  116. fn: function (){
  117. var self=this;
  118. return smalltalk.withContext(function($ctx1) {
  119. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLCommand)})},
  120. args: [],
  121. source: "execute",
  122. messageSends: [],
  123. referencedClasses: []
  124. }),
  125. smalltalk.HLCommand);
  126. smalltalk.addMethod(
  127. smalltalk.method({
  128. selector: "input",
  129. category: 'accessing',
  130. fn: function (){
  131. var self=this;
  132. return smalltalk.withContext(function($ctx1) {
  133. var $1;
  134. $1=self["@input"];
  135. return $1;
  136. }, function($ctx1) {$ctx1.fill(self,"input",{},smalltalk.HLCommand)})},
  137. args: [],
  138. source: "input\x0a\x09^ input",
  139. messageSends: [],
  140. referencedClasses: []
  141. }),
  142. smalltalk.HLCommand);
  143. smalltalk.addMethod(
  144. smalltalk.method({
  145. selector: "input:",
  146. category: 'accessing',
  147. fn: function (aString){
  148. var self=this;
  149. return smalltalk.withContext(function($ctx1) {
  150. var $1;
  151. self["@input"]=aString;
  152. $1=self["@input"];
  153. return $1;
  154. }, function($ctx1) {$ctx1.fill(self,"input:",{aString:aString},smalltalk.HLCommand)})},
  155. args: ["aString"],
  156. source: "input: aString\x0a\x09^ input := aString",
  157. messageSends: [],
  158. referencedClasses: []
  159. }),
  160. smalltalk.HLCommand);
  161. smalltalk.addMethod(
  162. smalltalk.method({
  163. selector: "inputCompletion",
  164. category: 'accessing',
  165. fn: function (){
  166. var self=this;
  167. return smalltalk.withContext(function($ctx1) {
  168. var $1;
  169. $1=[];
  170. return $1;
  171. }, function($ctx1) {$ctx1.fill(self,"inputCompletion",{},smalltalk.HLCommand)})},
  172. args: [],
  173. source: "inputCompletion\x0a\x09^ #()",
  174. messageSends: [],
  175. referencedClasses: []
  176. }),
  177. smalltalk.HLCommand);
  178. smalltalk.addMethod(
  179. smalltalk.method({
  180. selector: "inputLabel",
  181. category: 'accessing',
  182. fn: function (){
  183. var self=this;
  184. return smalltalk.withContext(function($ctx1) {
  185. var $1;
  186. $1=self._label();
  187. return $1;
  188. }, function($ctx1) {$ctx1.fill(self,"inputLabel",{},smalltalk.HLCommand)})},
  189. args: [],
  190. source: "inputLabel\x0a\x09^ self label",
  191. messageSends: ["label"],
  192. referencedClasses: []
  193. }),
  194. smalltalk.HLCommand);
  195. smalltalk.addMethod(
  196. smalltalk.method({
  197. selector: "isAction",
  198. category: 'testing',
  199. fn: function (){
  200. var self=this;
  201. return smalltalk.withContext(function($ctx1) {
  202. var $1;
  203. $1=_st(self._isBindingGroup())._not();
  204. return $1;
  205. }, function($ctx1) {$ctx1.fill(self,"isAction",{},smalltalk.HLCommand)})},
  206. args: [],
  207. source: "isAction\x0a\x09^ self isBindingGroup not",
  208. messageSends: ["not", "isBindingGroup"],
  209. referencedClasses: []
  210. }),
  211. smalltalk.HLCommand);
  212. smalltalk.addMethod(
  213. smalltalk.method({
  214. selector: "isActive",
  215. category: 'testing',
  216. fn: function (){
  217. var self=this;
  218. return smalltalk.withContext(function($ctx1) {
  219. return true;
  220. }, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLCommand)})},
  221. args: [],
  222. source: "isActive\x0a\x09^ true",
  223. messageSends: [],
  224. referencedClasses: []
  225. }),
  226. smalltalk.HLCommand);
  227. smalltalk.addMethod(
  228. smalltalk.method({
  229. selector: "isBindingGroup",
  230. category: 'testing',
  231. fn: function (){
  232. var self=this;
  233. return smalltalk.withContext(function($ctx1) {
  234. var $1;
  235. $1=_st(_st(_st(self._class())._methodDictionary())._includesKey_("execute"))._not();
  236. return $1;
  237. }, function($ctx1) {$ctx1.fill(self,"isBindingGroup",{},smalltalk.HLCommand)})},
  238. args: [],
  239. source: "isBindingGroup\x0a\x09^ (self class methodDictionary includesKey: 'execute') not",
  240. messageSends: ["not", "includesKey:", "methodDictionary", "class"],
  241. referencedClasses: []
  242. }),
  243. smalltalk.HLCommand);
  244. smalltalk.addMethod(
  245. smalltalk.method({
  246. selector: "isInputRequired",
  247. category: 'testing',
  248. fn: function (){
  249. var self=this;
  250. return smalltalk.withContext(function($ctx1) {
  251. return false;
  252. }, function($ctx1) {$ctx1.fill(self,"isInputRequired",{},smalltalk.HLCommand)})},
  253. args: [],
  254. source: "isInputRequired\x0a\x09^ false",
  255. messageSends: [],
  256. referencedClasses: []
  257. }),
  258. smalltalk.HLCommand);
  259. smalltalk.addMethod(
  260. smalltalk.method({
  261. selector: "key",
  262. category: 'accessing',
  263. fn: function (){
  264. var self=this;
  265. return smalltalk.withContext(function($ctx1) {
  266. var $1;
  267. $1=_st(self._class())._key();
  268. return $1;
  269. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCommand)})},
  270. args: [],
  271. source: "key\x0a\x09^ self class key",
  272. messageSends: ["key", "class"],
  273. referencedClasses: []
  274. }),
  275. smalltalk.HLCommand);
  276. smalltalk.addMethod(
  277. smalltalk.method({
  278. selector: "keyCode",
  279. category: 'accessing',
  280. fn: function (){
  281. var self=this;
  282. return smalltalk.withContext(function($ctx1) {
  283. var $1;
  284. $1=_st(_st(self._key())._asUppercase())._charCodeAt_((1));
  285. return $1;
  286. }, function($ctx1) {$ctx1.fill(self,"keyCode",{},smalltalk.HLCommand)})},
  287. args: [],
  288. source: "keyCode\x0a\x09^ self key asUppercase charCodeAt: 1",
  289. messageSends: ["charCodeAt:", "asUppercase", "key"],
  290. referencedClasses: []
  291. }),
  292. smalltalk.HLCommand);
  293. smalltalk.addMethod(
  294. smalltalk.method({
  295. selector: "label",
  296. category: 'accessing',
  297. fn: function (){
  298. var self=this;
  299. return smalltalk.withContext(function($ctx1) {
  300. var $1;
  301. $1=_st(self._class())._label();
  302. return $1;
  303. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLCommand)})},
  304. args: [],
  305. source: "label\x0a\x09^ self class label",
  306. messageSends: ["label", "class"],
  307. referencedClasses: []
  308. }),
  309. smalltalk.HLCommand);
  310. smalltalk.addMethod(
  311. smalltalk.method({
  312. selector: "menuLabel",
  313. category: 'accessing',
  314. fn: function (){
  315. var self=this;
  316. return smalltalk.withContext(function($ctx1) {
  317. var $1;
  318. $1=_st(self._class())._menuLabel();
  319. return $1;
  320. }, function($ctx1) {$ctx1.fill(self,"menuLabel",{},smalltalk.HLCommand)})},
  321. args: [],
  322. source: "menuLabel\x0a\x09^ self class menuLabel",
  323. messageSends: ["menuLabel", "class"],
  324. referencedClasses: []
  325. }),
  326. smalltalk.HLCommand);
  327. smalltalk.addMethod(
  328. smalltalk.method({
  329. selector: "registerOn:",
  330. category: 'registration',
  331. fn: function (aBinding){
  332. var self=this;
  333. return smalltalk.withContext(function($ctx1) {
  334. var $1;
  335. $1=_st(aBinding)._add_(self._asBinding());
  336. return $1;
  337. }, function($ctx1) {$ctx1.fill(self,"registerOn:",{aBinding:aBinding},smalltalk.HLCommand)})},
  338. args: ["aBinding"],
  339. source: "registerOn: aBinding\x0a\x09^ aBinding add: self asBinding",
  340. messageSends: ["add:", "asBinding"],
  341. referencedClasses: []
  342. }),
  343. smalltalk.HLCommand);
  344. smalltalk.addMethod(
  345. smalltalk.method({
  346. selector: "concreteClasses",
  347. category: 'registration',
  348. fn: function (){
  349. var self=this;
  350. var classes;
  351. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  352. return smalltalk.withContext(function($ctx1) {
  353. var $1,$2;
  354. classes=_st($OrderedCollection())._new();
  355. $1=self._isConcrete();
  356. if(smalltalk.assert($1)){
  357. _st(classes)._add_(self);
  358. };
  359. _st(self._subclasses())._do_((function(each){
  360. return smalltalk.withContext(function($ctx2) {
  361. return _st(classes)._addAll_(_st(each)._concreteClasses());
  362. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
  363. $2=classes;
  364. return $2;
  365. }, function($ctx1) {$ctx1.fill(self,"concreteClasses",{classes:classes},smalltalk.HLCommand.klass)})},
  366. args: [],
  367. 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",
  368. messageSends: ["new", "ifTrue:", "isConcrete", "add:", "do:", "subclasses", "addAll:", "concreteClasses"],
  369. referencedClasses: ["OrderedCollection"]
  370. }),
  371. smalltalk.HLCommand.klass);
  372. smalltalk.addMethod(
  373. smalltalk.method({
  374. selector: "documentation",
  375. category: 'accessing',
  376. fn: function (){
  377. var self=this;
  378. return smalltalk.withContext(function($ctx1) {
  379. return "";
  380. }, function($ctx1) {$ctx1.fill(self,"documentation",{},smalltalk.HLCommand.klass)})},
  381. args: [],
  382. source: "documentation\x0a\x09^ ''",
  383. messageSends: [],
  384. referencedClasses: []
  385. }),
  386. smalltalk.HLCommand.klass);
  387. smalltalk.addMethod(
  388. smalltalk.method({
  389. selector: "isConcrete",
  390. category: 'testing',
  391. fn: function (){
  392. var self=this;
  393. return smalltalk.withContext(function($ctx1) {
  394. var $1;
  395. $1=_st(self._key())._notNil();
  396. return $1;
  397. }, function($ctx1) {$ctx1.fill(self,"isConcrete",{},smalltalk.HLCommand.klass)})},
  398. args: [],
  399. source: "isConcrete\x0a\x09^ self key notNil",
  400. messageSends: ["notNil", "key"],
  401. referencedClasses: []
  402. }),
  403. smalltalk.HLCommand.klass);
  404. smalltalk.addMethod(
  405. smalltalk.method({
  406. selector: "isValidFor:",
  407. category: 'testing',
  408. fn: function (aModel){
  409. var self=this;
  410. return smalltalk.withContext(function($ctx1) {
  411. return true;
  412. }, function($ctx1) {$ctx1.fill(self,"isValidFor:",{aModel:aModel},smalltalk.HLCommand.klass)})},
  413. args: ["aModel"],
  414. source: "isValidFor: aModel\x0a\x09^ true",
  415. messageSends: [],
  416. referencedClasses: []
  417. }),
  418. smalltalk.HLCommand.klass);
  419. smalltalk.addMethod(
  420. smalltalk.method({
  421. selector: "key",
  422. category: 'accessing',
  423. fn: function (){
  424. var self=this;
  425. return smalltalk.withContext(function($ctx1) {
  426. return nil;
  427. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCommand.klass)})},
  428. args: [],
  429. source: "key\x0a\x09\x22Answer a single character string or nil if no key\x22\x0a\x09\x0a\x09^ nil",
  430. messageSends: [],
  431. referencedClasses: []
  432. }),
  433. smalltalk.HLCommand.klass);
  434. smalltalk.addMethod(
  435. smalltalk.method({
  436. selector: "label",
  437. category: 'accessing',
  438. fn: function (){
  439. var self=this;
  440. return smalltalk.withContext(function($ctx1) {
  441. return "";
  442. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLCommand.klass)})},
  443. args: [],
  444. source: "label\x0a\x09^ ''",
  445. messageSends: [],
  446. referencedClasses: []
  447. }),
  448. smalltalk.HLCommand.klass);
  449. smalltalk.addMethod(
  450. smalltalk.method({
  451. selector: "menuLabel",
  452. category: 'accessing',
  453. fn: function (){
  454. var self=this;
  455. return smalltalk.withContext(function($ctx1) {
  456. var $1;
  457. $1=self._label();
  458. return $1;
  459. }, function($ctx1) {$ctx1.fill(self,"menuLabel",{},smalltalk.HLCommand.klass)})},
  460. args: [],
  461. source: "menuLabel\x0a\x09^ self label",
  462. messageSends: ["label"],
  463. referencedClasses: []
  464. }),
  465. smalltalk.HLCommand.klass);
  466. smalltalk.addMethod(
  467. smalltalk.method({
  468. selector: "registerConcreteClassesOn:",
  469. category: 'accessing',
  470. fn: function (aBinding){
  471. var self=this;
  472. var newBinding;
  473. return smalltalk.withContext(function($ctx1) {
  474. var $1;
  475. $1=self._isConcrete();
  476. if(smalltalk.assert($1)){
  477. newBinding=self._registerOn_(aBinding);
  478. newBinding;
  479. } else {
  480. newBinding=aBinding;
  481. newBinding;
  482. };
  483. _st(self._subclasses())._do_((function(each){
  484. return smalltalk.withContext(function($ctx2) {
  485. return _st(each)._registerConcreteClassesOn_(newBinding);
  486. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
  487. return self}, function($ctx1) {$ctx1.fill(self,"registerConcreteClassesOn:",{aBinding:aBinding,newBinding:newBinding},smalltalk.HLCommand.klass)})},
  488. args: ["aBinding"],
  489. 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 ]",
  490. messageSends: ["ifTrue:ifFalse:", "isConcrete", "registerOn:", "do:", "subclasses", "registerConcreteClassesOn:"],
  491. referencedClasses: []
  492. }),
  493. smalltalk.HLCommand.klass);
  494. smalltalk.addMethod(
  495. smalltalk.method({
  496. selector: "registerOn:",
  497. category: 'registration',
  498. fn: function (aBinding){
  499. var self=this;
  500. return smalltalk.withContext(function($ctx1) {
  501. var $1;
  502. $1=_st(self._new())._registerOn_(aBinding);
  503. return $1;
  504. }, function($ctx1) {$ctx1.fill(self,"registerOn:",{aBinding:aBinding},smalltalk.HLCommand.klass)})},
  505. args: ["aBinding"],
  506. source: "registerOn: aBinding\x0a\x09^ self new registerOn: aBinding",
  507. messageSends: ["registerOn:", "new"],
  508. referencedClasses: []
  509. }),
  510. smalltalk.HLCommand.klass);
  511. smalltalk.addClass('HLCloseTabCommand', smalltalk.HLCommand, [], 'Helios-Commands-Core');
  512. smalltalk.addMethod(
  513. smalltalk.method({
  514. selector: "execute",
  515. category: 'executing',
  516. fn: function (){
  517. var self=this;
  518. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  519. return smalltalk.withContext(function($ctx1) {
  520. _st(_st($HLManager())._current())._removeActiveTab();
  521. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLCloseTabCommand)})},
  522. args: [],
  523. source: "execute\x0a\x09HLManager current removeActiveTab",
  524. messageSends: ["removeActiveTab", "current"],
  525. referencedClasses: ["HLManager"]
  526. }),
  527. smalltalk.HLCloseTabCommand);
  528. smalltalk.addMethod(
  529. smalltalk.method({
  530. selector: "key",
  531. category: 'accessing',
  532. fn: function (){
  533. var self=this;
  534. return smalltalk.withContext(function($ctx1) {
  535. return "w";
  536. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCloseTabCommand.klass)})},
  537. args: [],
  538. source: "key\x0a\x09^ 'w'",
  539. messageSends: [],
  540. referencedClasses: []
  541. }),
  542. smalltalk.HLCloseTabCommand.klass);
  543. smalltalk.addMethod(
  544. smalltalk.method({
  545. selector: "label",
  546. category: 'accessing',
  547. fn: function (){
  548. var self=this;
  549. return smalltalk.withContext(function($ctx1) {
  550. return "Close tab";
  551. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLCloseTabCommand.klass)})},
  552. args: [],
  553. source: "label\x0a\x09^ 'Close tab'",
  554. messageSends: [],
  555. referencedClasses: []
  556. }),
  557. smalltalk.HLCloseTabCommand.klass);
  558. smalltalk.addClass('HLModelCommand', smalltalk.HLCommand, ['model'], 'Helios-Commands-Core');
  559. smalltalk.addMethod(
  560. smalltalk.method({
  561. selector: "model",
  562. category: 'accessing',
  563. fn: function (){
  564. var self=this;
  565. return smalltalk.withContext(function($ctx1) {
  566. var $1;
  567. $1=self["@model"];
  568. return $1;
  569. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLModelCommand)})},
  570. args: [],
  571. source: "model\x0a\x09^ model",
  572. messageSends: [],
  573. referencedClasses: []
  574. }),
  575. smalltalk.HLModelCommand);
  576. smalltalk.addMethod(
  577. smalltalk.method({
  578. selector: "model:",
  579. category: 'accessing',
  580. fn: function (aModel){
  581. var self=this;
  582. return smalltalk.withContext(function($ctx1) {
  583. self["@model"]=aModel;
  584. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLModelCommand)})},
  585. args: ["aModel"],
  586. source: "model: aModel\x0a\x09model := aModel",
  587. messageSends: [],
  588. referencedClasses: []
  589. }),
  590. smalltalk.HLModelCommand);
  591. smalltalk.addMethod(
  592. smalltalk.method({
  593. selector: "for:",
  594. category: 'instance creation',
  595. fn: function (aModel){
  596. var self=this;
  597. return smalltalk.withContext(function($ctx1) {
  598. var $1;
  599. $1=self._new();
  600. return $1;
  601. }, function($ctx1) {$ctx1.fill(self,"for:",{aModel:aModel},smalltalk.HLModelCommand.klass)})},
  602. args: ["aModel"],
  603. source: "for: aModel\x0a\x09^ self new",
  604. messageSends: ["new"],
  605. referencedClasses: []
  606. }),
  607. smalltalk.HLModelCommand.klass);
  608. smalltalk.addMethod(
  609. smalltalk.method({
  610. selector: "registerConcreteClassesOn:for:",
  611. category: 'registration',
  612. fn: function (aBinding,aModel){
  613. var self=this;
  614. var newBinding;
  615. return smalltalk.withContext(function($ctx1) {
  616. var $1;
  617. $1=_st(self._isConcrete())._and_((function(){
  618. return smalltalk.withContext(function($ctx2) {
  619. return self._isValidFor_(aModel);
  620. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  621. if(smalltalk.assert($1)){
  622. newBinding=self._registerOn_for_(aBinding,aModel);
  623. newBinding;
  624. } else {
  625. newBinding=aBinding;
  626. newBinding;
  627. };
  628. _st(self._subclasses())._do_((function(each){
  629. return smalltalk.withContext(function($ctx2) {
  630. return _st(each)._registerConcreteClassesOn_for_(newBinding,aModel);
  631. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
  632. return self}, function($ctx1) {$ctx1.fill(self,"registerConcreteClassesOn:for:",{aBinding:aBinding,aModel:aModel,newBinding:newBinding},smalltalk.HLModelCommand.klass)})},
  633. args: ["aBinding", "aModel"],
  634. 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 ]",
  635. messageSends: ["ifTrue:ifFalse:", "and:", "isConcrete", "isValidFor:", "registerOn:for:", "do:", "subclasses", "registerConcreteClassesOn:for:"],
  636. referencedClasses: []
  637. }),
  638. smalltalk.HLModelCommand.klass);
  639. smalltalk.addMethod(
  640. smalltalk.method({
  641. selector: "registerOn:for:",
  642. category: 'registration',
  643. fn: function (aBinding,aModel){
  644. var self=this;
  645. return smalltalk.withContext(function($ctx1) {
  646. var $1;
  647. $1=_st(self._for_(aModel))._registerOn_(aBinding);
  648. return $1;
  649. }, function($ctx1) {$ctx1.fill(self,"registerOn:for:",{aBinding:aBinding,aModel:aModel},smalltalk.HLModelCommand.klass)})},
  650. args: ["aBinding", "aModel"],
  651. source: "registerOn: aBinding for: aModel\x0a\x09^ (self for: aModel) registerOn: aBinding",
  652. messageSends: ["registerOn:", "for:"],
  653. referencedClasses: []
  654. }),
  655. smalltalk.HLModelCommand.klass);
  656. smalltalk.addClass('HLOpenCommand', smalltalk.HLCommand, [], 'Helios-Commands-Core');
  657. smalltalk.addMethod(
  658. smalltalk.method({
  659. selector: "key",
  660. category: 'accessing',
  661. fn: function (){
  662. var self=this;
  663. return smalltalk.withContext(function($ctx1) {
  664. return "o";
  665. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLOpenCommand.klass)})},
  666. args: [],
  667. source: "key\x0a\x09^ 'o'",
  668. messageSends: [],
  669. referencedClasses: []
  670. }),
  671. smalltalk.HLOpenCommand.klass);
  672. smalltalk.addMethod(
  673. smalltalk.method({
  674. selector: "label",
  675. category: 'accessing',
  676. fn: function (){
  677. var self=this;
  678. return smalltalk.withContext(function($ctx1) {
  679. return "Open";
  680. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLOpenCommand.klass)})},
  681. args: [],
  682. source: "label\x0a\x09^ 'Open'",
  683. messageSends: [],
  684. referencedClasses: []
  685. }),
  686. smalltalk.HLOpenCommand.klass);
  687. smalltalk.addClass('HLOpenBrowserCommand', smalltalk.HLOpenCommand, [], 'Helios-Commands-Core');
  688. smalltalk.addMethod(
  689. smalltalk.method({
  690. selector: "execute",
  691. category: 'executing',
  692. fn: function (){
  693. var self=this;
  694. function $HLBrowser(){return smalltalk.HLBrowser||(typeof HLBrowser=="undefined"?nil:HLBrowser)}
  695. return smalltalk.withContext(function($ctx1) {
  696. var $1;
  697. $1=_st($HLBrowser())._openAsTab();
  698. return $1;
  699. }, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLOpenBrowserCommand)})},
  700. args: [],
  701. source: "execute\x0a\x09^ HLBrowser openAsTab",
  702. messageSends: ["openAsTab"],
  703. referencedClasses: ["HLBrowser"]
  704. }),
  705. smalltalk.HLOpenBrowserCommand);
  706. smalltalk.addMethod(
  707. smalltalk.method({
  708. selector: "key",
  709. category: 'accessing',
  710. fn: function (){
  711. var self=this;
  712. return smalltalk.withContext(function($ctx1) {
  713. return "b";
  714. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLOpenBrowserCommand.klass)})},
  715. args: [],
  716. source: "key\x0a\x09^ 'b'",
  717. messageSends: [],
  718. referencedClasses: []
  719. }),
  720. smalltalk.HLOpenBrowserCommand.klass);
  721. smalltalk.addMethod(
  722. smalltalk.method({
  723. selector: "label",
  724. category: 'accessing',
  725. fn: function (){
  726. var self=this;
  727. return smalltalk.withContext(function($ctx1) {
  728. return "Browser";
  729. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLOpenBrowserCommand.klass)})},
  730. args: [],
  731. source: "label\x0a\x09^ 'Browser'",
  732. messageSends: [],
  733. referencedClasses: []
  734. }),
  735. smalltalk.HLOpenBrowserCommand.klass);
  736. smalltalk.addClass('HLOpenWorkspaceCommand', smalltalk.HLOpenCommand, [], 'Helios-Commands-Core');
  737. smalltalk.addMethod(
  738. smalltalk.method({
  739. selector: "execute",
  740. category: 'executing',
  741. fn: function (){
  742. var self=this;
  743. function $HLWorkspace(){return smalltalk.HLWorkspace||(typeof HLWorkspace=="undefined"?nil:HLWorkspace)}
  744. return smalltalk.withContext(function($ctx1) {
  745. var $1;
  746. $1=_st($HLWorkspace())._openAsTab();
  747. return $1;
  748. }, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLOpenWorkspaceCommand)})},
  749. args: [],
  750. source: "execute\x0a\x09^ HLWorkspace openAsTab",
  751. messageSends: ["openAsTab"],
  752. referencedClasses: ["HLWorkspace"]
  753. }),
  754. smalltalk.HLOpenWorkspaceCommand);
  755. smalltalk.addMethod(
  756. smalltalk.method({
  757. selector: "key",
  758. category: 'accessing',
  759. fn: function (){
  760. var self=this;
  761. return smalltalk.withContext(function($ctx1) {
  762. return "w";
  763. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLOpenWorkspaceCommand.klass)})},
  764. args: [],
  765. source: "key\x0a\x09^ 'w'",
  766. messageSends: [],
  767. referencedClasses: []
  768. }),
  769. smalltalk.HLOpenWorkspaceCommand.klass);
  770. smalltalk.addMethod(
  771. smalltalk.method({
  772. selector: "label",
  773. category: 'accessing',
  774. fn: function (){
  775. var self=this;
  776. return smalltalk.withContext(function($ctx1) {
  777. return "Workspace";
  778. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLOpenWorkspaceCommand.klass)})},
  779. args: [],
  780. source: "label\x0a\x09^ 'Workspace'",
  781. messageSends: [],
  782. referencedClasses: []
  783. }),
  784. smalltalk.HLOpenWorkspaceCommand.klass);
  785. smalltalk.addClass('HLSwitchTabCommand', smalltalk.HLCommand, [], 'Helios-Commands-Core');
  786. smalltalk.addMethod(
  787. smalltalk.method({
  788. selector: "execute",
  789. category: 'executing',
  790. fn: function (){
  791. var self=this;
  792. var activeTab;
  793. function $HLTabSelectionWidget(){return smalltalk.HLTabSelectionWidget||(typeof HLTabSelectionWidget=="undefined"?nil:HLTabSelectionWidget)}
  794. return smalltalk.withContext(function($ctx1) {
  795. var $2,$3,$1;
  796. activeTab=self._selectedTab();
  797. $2=_st($HLTabSelectionWidget())._new();
  798. _st($2)._tabs_(self._tabs());
  799. _st($2)._selectedTab_(self._selectedTab());
  800. _st($2)._selectCallback_((function(tab){
  801. return smalltalk.withContext(function($ctx2) {
  802. return _st(tab)._activate();
  803. }, function($ctx2) {$ctx2.fillBlock({tab:tab},$ctx1,1)})}));
  804. _st($2)._confirmCallback_((function(tab){
  805. return smalltalk.withContext(function($ctx2) {
  806. return _st(tab)._focus();
  807. }, function($ctx2) {$ctx2.fillBlock({tab:tab},$ctx1,2)})}));
  808. _st($2)._cancelCallback_((function(){
  809. return smalltalk.withContext(function($ctx2) {
  810. return _st(activeTab)._activate();
  811. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  812. $3=_st($2)._show();
  813. $1=$3;
  814. return $1;
  815. }, function($ctx1) {$ctx1.fill(self,"execute",{activeTab:activeTab},smalltalk.HLSwitchTabCommand)})},
  816. args: [],
  817. 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",
  818. messageSends: ["selectedTab", "tabs:", "new", "tabs", "selectedTab:", "selectCallback:", "activate", "confirmCallback:", "focus", "cancelCallback:", "show"],
  819. referencedClasses: ["HLTabSelectionWidget"]
  820. }),
  821. smalltalk.HLSwitchTabCommand);
  822. smalltalk.addMethod(
  823. smalltalk.method({
  824. selector: "selectedTab",
  825. category: 'accessing',
  826. fn: function (){
  827. var self=this;
  828. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  829. return smalltalk.withContext(function($ctx1) {
  830. var $1;
  831. $1=_st(_st($HLManager())._current())._activeTab();
  832. return $1;
  833. }, function($ctx1) {$ctx1.fill(self,"selectedTab",{},smalltalk.HLSwitchTabCommand)})},
  834. args: [],
  835. source: "selectedTab\x0a\x09^ HLManager current activeTab",
  836. messageSends: ["activeTab", "current"],
  837. referencedClasses: ["HLManager"]
  838. }),
  839. smalltalk.HLSwitchTabCommand);
  840. smalltalk.addMethod(
  841. smalltalk.method({
  842. selector: "tabs",
  843. category: 'accessing',
  844. fn: function (){
  845. var self=this;
  846. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  847. return smalltalk.withContext(function($ctx1) {
  848. var $1;
  849. $1=_st(_st($HLManager())._current())._tabs();
  850. return $1;
  851. }, function($ctx1) {$ctx1.fill(self,"tabs",{},smalltalk.HLSwitchTabCommand)})},
  852. args: [],
  853. source: "tabs\x0a\x09^ HLManager current tabs",
  854. messageSends: ["tabs", "current"],
  855. referencedClasses: ["HLManager"]
  856. }),
  857. smalltalk.HLSwitchTabCommand);
  858. smalltalk.addMethod(
  859. smalltalk.method({
  860. selector: "key",
  861. category: 'accessing',
  862. fn: function (){
  863. var self=this;
  864. return smalltalk.withContext(function($ctx1) {
  865. return "s";
  866. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLSwitchTabCommand.klass)})},
  867. args: [],
  868. source: "key\x0a\x09^ 's'",
  869. messageSends: [],
  870. referencedClasses: []
  871. }),
  872. smalltalk.HLSwitchTabCommand.klass);
  873. smalltalk.addMethod(
  874. smalltalk.method({
  875. selector: "label",
  876. category: 'accessing',
  877. fn: function (){
  878. var self=this;
  879. return smalltalk.withContext(function($ctx1) {
  880. return "Switch";
  881. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLSwitchTabCommand.klass)})},
  882. args: [],
  883. source: "label\x0a\x09^ 'Switch'",
  884. messageSends: [],
  885. referencedClasses: []
  886. }),
  887. smalltalk.HLSwitchTabCommand.klass);
  888. smalltalk.addClass('HLViewCommand', smalltalk.HLCommand, [], 'Helios-Commands-Core');
  889. smalltalk.addMethod(
  890. smalltalk.method({
  891. selector: "label",
  892. category: 'accessing',
  893. fn: function (){
  894. var self=this;
  895. return smalltalk.withContext(function($ctx1) {
  896. return "View";
  897. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLViewCommand.klass)})},
  898. args: [],
  899. source: "label\x0a\x09^ 'View'",
  900. messageSends: [],
  901. referencedClasses: []
  902. }),
  903. smalltalk.HLViewCommand.klass);
  904. })(global_smalltalk,global_nil,global__st);