1
0

Helios-Commands-Core.js 24 KB

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