1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315 |
- define(["amber/boot", "require", "amber/core/Kernel-Objects"], function($boot,requirejs){"use strict";
- var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
- var $pkg = $core.addPackage("Helios-Commands-Core");
- $pkg.innerEval = function (expr) { return eval(expr); };
- $pkg.transport = {"type":"amd","amdNamespace":"helios"};
- $core.addClass("HLCommand", $globals.Object, ["input"], "Helios-Commands-Core");
- $core.addMethod(
- $core.method({
- selector: "asActionBinding",
- protocol: "converting",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $1;
- $1=$recv($globals.HLBindingAction)._on_labelled_($self._keyCode(),$self._label());
- $recv($1)._command_(self);
- return $recv($1)._yourself();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asActionBinding",{})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asActionBinding\x0a\x09^ (HLBindingAction on: self keyCode labelled: self label)\x0a \x09command: self;\x0a\x09\x09yourself",
- referencedClasses: ["HLBindingAction"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["command:", "on:labelled:", "keyCode", "label", "yourself"]
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "asBinding",
- protocol: "converting",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $1;
- $1=$self._isBindingGroup();
- if($core.assert($1)){
- return $self._asGroupBinding();
- } else {
- return $self._asActionBinding();
- }
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asBinding",{})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asBinding\x0a\x09^ self isBindingGroup\x0a\x09\x09ifTrue: [ self asGroupBinding ]\x0a\x09\x09ifFalse: [ self asActionBinding ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["ifTrue:ifFalse:", "isBindingGroup", "asGroupBinding", "asActionBinding"]
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "asGroupBinding",
- protocol: "converting",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.HLBindingGroup)._on_labelled_($self._keyCode(),$self._label());
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asGroupBinding",{})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asGroupBinding\x0a\x09^ HLBindingGroup \x0a\x09\x09on: self keyCode\x0a\x09\x09labelled: self label",
- referencedClasses: ["HLBindingGroup"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["on:labelled:", "keyCode", "label"]
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "commandError:",
- protocol: "error handling",
- fn: function (aString){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._error_(aString);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"commandError:",{aString:aString})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString"],
- source: "commandError: aString\x0a\x09self error: aString",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["error:"]
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "defaultInput",
- protocol: "defaults",
- fn: function (){
- var self=this,$self=this;
- return "";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "defaultInput\x0a\x09^ ''",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "documentation",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self._class())._documentation();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"documentation",{})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "documentation\x0a\x09^ self class documentation",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["documentation", "class"]
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "execute",
- protocol: "executing",
- fn: function (){
- var self=this,$self=this;
- return self;
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "execute",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "input",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return $self.input;
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "input\x0a\x09^ input",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "input:",
- protocol: "accessing",
- fn: function (aString){
- var self=this,$self=this;
- var $1;
- $self.input=aString;
- $1=$self.input;
- return $1;
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString"],
- source: "input: aString\x0a\x09^ input := aString",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "inputCompletion",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return [];
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "inputCompletion\x0a\x09^ #()",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "inputLabel",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._label();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"inputLabel",{})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "inputLabel\x0a\x09^ self label",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["label"]
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "isAction",
- protocol: "testing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self._isBindingGroup())._not();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isAction",{})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isAction\x0a\x09^ self isBindingGroup not",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["not", "isBindingGroup"]
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "isActive",
- protocol: "testing",
- fn: function (){
- var self=this,$self=this;
- return true;
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isActive\x0a\x09^ true",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "isBindingGroup",
- protocol: "testing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($recv($recv($self._class())._methodDictionary())._includesKey_("execute"))._not();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isBindingGroup",{})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isBindingGroup\x0a\x09^ (self class methodDictionary includesKey: 'execute') not",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["not", "includesKey:", "methodDictionary", "class"]
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "isInputRequired",
- protocol: "testing",
- fn: function (){
- var self=this,$self=this;
- return false;
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isInputRequired\x0a\x09^ false",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self._class())._key();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"key",{})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^ self class key",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["key", "class"]
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "keyCode",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($recv($self._key())._asUppercase())._charCodeAt_((1));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"keyCode",{})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "keyCode\x0a\x09^ self key asUppercase charCodeAt: 1",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["charCodeAt:", "asUppercase", "key"]
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self._class())._label();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"label",{})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^ self class label",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["label", "class"]
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "menuLabel",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self._class())._menuLabel();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"menuLabel",{})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "menuLabel\x0a\x09^ self class menuLabel",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["menuLabel", "class"]
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "registerOn:",
- protocol: "registration",
- fn: function (aBinding){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv(aBinding)._add_($self._asBinding());
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"registerOn:",{aBinding:aBinding})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBinding"],
- source: "registerOn: aBinding\x0a\x09^ aBinding add: self asBinding",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["add:", "asBinding"]
- }),
- $globals.HLCommand);
- $core.addMethod(
- $core.method({
- selector: "concreteClasses",
- protocol: "registration",
- fn: function (){
- var self=this,$self=this;
- var classes;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $1;
- classes=$recv($globals.OrderedCollection)._new();
- $1=$self._isConcrete();
- if($core.assert($1)){
- $recv(classes)._add_(self);
- }
- $recv($self._subclasses())._do_((function(each){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $recv(classes)._addAll_($recv(each)._concreteClasses());
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
- //>>excludeEnd("ctx");
- }));
- return classes;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"concreteClasses",{classes:classes})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- 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",
- referencedClasses: ["OrderedCollection"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["new", "ifTrue:", "isConcrete", "add:", "do:", "subclasses", "addAll:", "concreteClasses"]
- }),
- $globals.HLCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "documentation",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "documentation\x0a\x09^ ''",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "isConcrete",
- protocol: "testing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self._key())._notNil();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isConcrete",{})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isConcrete\x0a\x09^ self key notNil",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["notNil", "key"]
- }),
- $globals.HLCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "isValidFor:",
- protocol: "testing",
- fn: function (aModel){
- var self=this,$self=this;
- return true;
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aModel"],
- source: "isValidFor: aModel\x0a\x09^ true",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return nil;
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09\x22Answer a single character string or nil if no key\x22\x0a\x09\x0a\x09^ nil",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^ ''",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "menuLabel",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._label();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"menuLabel",{})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "menuLabel\x0a\x09^ self label",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["label"]
- }),
- $globals.HLCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "registerConcreteClassesOn:",
- protocol: "accessing",
- fn: function (aBinding){
- var self=this,$self=this;
- var newBinding;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $1;
- $1=$self._isConcrete();
- if($core.assert($1)){
- newBinding=$self._registerOn_(aBinding);
- newBinding;
- } else {
- newBinding=aBinding;
- newBinding;
- }
- $recv($self._subclasses())._do_((function(each){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $recv(each)._registerConcreteClassesOn_(newBinding);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)});
- //>>excludeEnd("ctx");
- }));
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"registerConcreteClassesOn:",{aBinding:aBinding,newBinding:newBinding})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBinding"],
- 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 ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["ifTrue:ifFalse:", "isConcrete", "registerOn:", "do:", "subclasses", "registerConcreteClassesOn:"]
- }),
- $globals.HLCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "registerOn:",
- protocol: "registration",
- fn: function (aBinding){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self._new())._registerOn_(aBinding);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"registerOn:",{aBinding:aBinding})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBinding"],
- source: "registerOn: aBinding\x0a\x09^ self new registerOn: aBinding",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["registerOn:", "new"]
- }),
- $globals.HLCommand.a$cls);
- $core.addClass("HLCloseTabCommand", $globals.HLCommand, [], "Helios-Commands-Core");
- $core.addMethod(
- $core.method({
- selector: "execute",
- protocol: "executing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv($recv($globals.HLManager)._current())._removeActiveTab();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"execute",{})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "execute\x0a\x09HLManager current removeActiveTab",
- referencedClasses: ["HLManager"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["removeActiveTab", "current"]
- }),
- $globals.HLCloseTabCommand);
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "w";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^ 'w'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLCloseTabCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "Close tab";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^ 'Close tab'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLCloseTabCommand.a$cls);
- $core.addClass("HLModelCommand", $globals.HLCommand, ["model"], "Helios-Commands-Core");
- $core.addMethod(
- $core.method({
- selector: "model",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return $self.model;
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "model\x0a\x09^ model",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLModelCommand);
- $core.addMethod(
- $core.method({
- selector: "model:",
- protocol: "accessing",
- fn: function (aModel){
- var self=this,$self=this;
- $self.model=aModel;
- return self;
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aModel"],
- source: "model: aModel\x0a\x09model := aModel",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLModelCommand);
- $core.addMethod(
- $core.method({
- selector: "for:",
- protocol: "instance creation",
- fn: function (aModel){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._new();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"for:",{aModel:aModel})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aModel"],
- source: "for: aModel\x0a\x09^ self new",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["new"]
- }),
- $globals.HLModelCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "registerConcreteClassesOn:for:",
- protocol: "registration",
- fn: function (aBinding,aModel){
- var self=this,$self=this;
- var newBinding;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $1;
- $1=$recv($self._isConcrete())._and_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $self._isValidFor_(aModel);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
- //>>excludeEnd("ctx");
- }));
- if($core.assert($1)){
- newBinding=$self._registerOn_for_(aBinding,aModel);
- newBinding;
- } else {
- newBinding=aBinding;
- newBinding;
- }
- $recv($self._subclasses())._do_((function(each){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $recv(each)._registerConcreteClassesOn_for_(newBinding,aModel);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)});
- //>>excludeEnd("ctx");
- }));
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"registerConcreteClassesOn:for:",{aBinding:aBinding,aModel:aModel,newBinding:newBinding})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBinding", "aModel"],
- 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 ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["ifTrue:ifFalse:", "and:", "isConcrete", "isValidFor:", "registerOn:for:", "do:", "subclasses", "registerConcreteClassesOn:for:"]
- }),
- $globals.HLModelCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "registerOn:for:",
- protocol: "registration",
- fn: function (aBinding,aModel){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self._for_(aModel))._registerOn_(aBinding);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"registerOn:for:",{aBinding:aBinding,aModel:aModel})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBinding", "aModel"],
- source: "registerOn: aBinding for: aModel\x0a\x09^ (self for: aModel) registerOn: aBinding",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["registerOn:", "for:"]
- }),
- $globals.HLModelCommand.a$cls);
- $core.addClass("HLOpenCommand", $globals.HLCommand, [], "Helios-Commands-Core");
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "o";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^ 'o'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLOpenCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "Open";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^ 'Open'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLOpenCommand.a$cls);
- $core.addClass("HLOpenBrowserCommand", $globals.HLOpenCommand, [], "Helios-Commands-Core");
- $core.addMethod(
- $core.method({
- selector: "execute",
- protocol: "executing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.HLBrowser)._openAsTab();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"execute",{})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "execute\x0a\x09^ HLBrowser openAsTab",
- referencedClasses: ["HLBrowser"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["openAsTab"]
- }),
- $globals.HLOpenBrowserCommand);
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "b";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^ 'b'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLOpenBrowserCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "Browser";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^ 'Browser'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLOpenBrowserCommand.a$cls);
- $core.addClass("HLOpenSUnitCommand", $globals.HLOpenCommand, [], "Helios-Commands-Core");
- $core.addMethod(
- $core.method({
- selector: "execute",
- protocol: "executing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.HLSUnit)._openAsTab();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"execute",{})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "execute\x0a\x09^ HLSUnit openAsTab",
- referencedClasses: ["HLSUnit"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["openAsTab"]
- }),
- $globals.HLOpenSUnitCommand);
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "s";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^ 's'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLOpenSUnitCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "SUnit";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^ 'SUnit'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLOpenSUnitCommand.a$cls);
- $core.addClass("HLOpenWorkspaceCommand", $globals.HLOpenCommand, [], "Helios-Commands-Core");
- $core.addMethod(
- $core.method({
- selector: "execute",
- protocol: "executing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.HLWorkspace)._openAsTab();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"execute",{})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "execute\x0a\x09^ HLWorkspace openAsTab",
- referencedClasses: ["HLWorkspace"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["openAsTab"]
- }),
- $globals.HLOpenWorkspaceCommand);
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "w";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^ 'w'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLOpenWorkspaceCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "Workspace";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^ 'Workspace'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLOpenWorkspaceCommand.a$cls);
- $core.addClass("HLSwitchTabCommand", $globals.HLCommand, [], "Helios-Commands-Core");
- $core.addMethod(
- $core.method({
- selector: "execute",
- protocol: "executing",
- fn: function (){
- var self=this,$self=this;
- var activeTab;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $1;
- activeTab=$self._selectedTab();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx1.sendIdx["selectedTab"]=1;
- //>>excludeEnd("ctx");
- $1=$recv($globals.HLTabSelectionWidget)._new();
- $recv($1)._tabs_($self._tabs());
- $recv($1)._selectedTab_($self._selectedTab());
- $recv($1)._selectCallback_((function(tab){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $recv(tab)._activate();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- $ctx2.sendIdx["activate"]=1;
- //>>excludeEnd("ctx");
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({tab:tab},$ctx1,1)});
- //>>excludeEnd("ctx");
- }));
- $recv($1)._confirmCallback_((function(tab){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $recv(tab)._focus();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({tab:tab},$ctx1,2)});
- //>>excludeEnd("ctx");
- }));
- $recv($1)._cancelCallback_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $recv(activeTab)._activate();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
- //>>excludeEnd("ctx");
- }));
- return $recv($1)._show();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"execute",{activeTab:activeTab})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- 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",
- referencedClasses: ["HLTabSelectionWidget"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["selectedTab", "tabs:", "new", "tabs", "selectedTab:", "selectCallback:", "activate", "confirmCallback:", "focus", "cancelCallback:", "show"]
- }),
- $globals.HLSwitchTabCommand);
- $core.addMethod(
- $core.method({
- selector: "selectedTab",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($recv($globals.HLManager)._current())._activeTab();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"selectedTab",{})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "selectedTab\x0a\x09^ HLManager current activeTab",
- referencedClasses: ["HLManager"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["activeTab", "current"]
- }),
- $globals.HLSwitchTabCommand);
- $core.addMethod(
- $core.method({
- selector: "tabs",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($recv($globals.HLManager)._current())._tabs();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"tabs",{})});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "tabs\x0a\x09^ HLManager current tabs",
- referencedClasses: ["HLManager"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["tabs", "current"]
- }),
- $globals.HLSwitchTabCommand);
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "s";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^ 's'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLSwitchTabCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "Switch tab";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^ 'Switch tab'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLSwitchTabCommand.a$cls);
- $core.addClass("HLViewCommand", $globals.HLCommand, [], "Helios-Commands-Core");
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "View";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^ 'View'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }),
- $globals.HLViewCommand.a$cls);
- });
|