123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621 |
- define(["amber/boot", "require", "helios/Helios-Commands-Tools"], 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-SUnit");
- $pkg.innerEval = function (expr) { return eval(expr); };
- $pkg.transport = {"type":"amd","amdNamespace":"helios"};
- $core.addClass("HLSUnitCommand", $globals.HLToolCommand, [], "Helios-Commands-SUnit");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.HLSUnitCommand.comment="I group the commands pertaining to Helios-SUnit (`HLSUnitModel`)";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "isValidFor:",
- protocol: "testing",
- fn: function (aModel){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv(aModel)._isKindOf_($globals.HLSUnitModel);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isValidFor:",{aModel:aModel},$globals.HLSUnitCommand.a$cls)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aModel"],
- source: "isValidFor: aModel\x0a\x09^ aModel isKindOf: HLSUnitModel",
- referencedClasses: ["HLSUnitModel"],
- //>>excludeEnd("ide");
- messageSends: ["isKindOf:"]
- }),
- $globals.HLSUnitCommand.a$cls);
- $core.addClass("HLSUnitInvertSelectedCommand", $globals.HLSUnitCommand, [], "Helios-Commands-SUnit");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.HLSUnitInvertSelectedCommand.comment="I group the commands that invert selections";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "i";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^ 'i'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.HLSUnitInvertSelectedCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "Invert selection";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^'Invert selection'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.HLSUnitInvertSelectedCommand.a$cls);
- $core.addClass("HLSUnitInvertSelectedClassesCommand", $globals.HLSUnitInvertSelectedCommand, [], "Helios-Commands-SUnit");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.HLSUnitInvertSelectedClassesCommand.comment="Invert the currently selected classes on a `HLSUnitModel`";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "category",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "Classes";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "category\x0a\x09^'Classes'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.HLSUnitInvertSelectedClassesCommand);
- $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($self._model())._invertSelectedClasses();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"execute",{},$globals.HLSUnitInvertSelectedClassesCommand)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "execute\x0a\x09self model invertSelectedClasses",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["invertSelectedClasses", "model"]
- }),
- $globals.HLSUnitInvertSelectedClassesCommand);
- $core.addMethod(
- $core.method({
- selector: "isActive",
- protocol: "testing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($recv($self.model)._selectedPackages())._notEmpty();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isActive",{},$globals.HLSUnitInvertSelectedClassesCommand)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isActive\x0a\x09^model selectedPackages notEmpty",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["notEmpty", "selectedPackages"]
- }),
- $globals.HLSUnitInvertSelectedClassesCommand);
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "c";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^ 'c'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.HLSUnitInvertSelectedClassesCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "Invert selected classes";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^ 'Invert selected classes'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.HLSUnitInvertSelectedClassesCommand.a$cls);
- $core.addClass("HLSUnitInvertSelectedPackagesCommand", $globals.HLSUnitInvertSelectedCommand, [], "Helios-Commands-SUnit");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.HLSUnitInvertSelectedPackagesCommand.comment="Invert the currently selected packages on a `HLSUnitModel`";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "category",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "Packages";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "category\x0a\x09^'Packages'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.HLSUnitInvertSelectedPackagesCommand);
- $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($self._model())._invertSelectedPackages();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"execute",{},$globals.HLSUnitInvertSelectedPackagesCommand)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "execute\x0a\x09self model invertSelectedPackages",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["invertSelectedPackages", "model"]
- }),
- $globals.HLSUnitInvertSelectedPackagesCommand);
- $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");
- messageSends: []
- }),
- $globals.HLSUnitInvertSelectedPackagesCommand);
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "p";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^ 'p'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.HLSUnitInvertSelectedPackagesCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "Invert selected packages";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^ 'Invert selected packages'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.HLSUnitInvertSelectedPackagesCommand.a$cls);
- $core.addClass("HLSUnitRunTests", $globals.HLSUnitCommand, [], "Helios-Commands-SUnit");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.HLSUnitRunTests.comment="Run the test cases in the currently selected classes on a `HLSUnitModel`";
- //>>excludeEnd("ide");
- $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($self._model())._runTests();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"execute",{},$globals.HLSUnitRunTests)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "execute\x0a\x09self model runTests",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["runTests", "model"]
- }),
- $globals.HLSUnitRunTests);
- $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");
- messageSends: []
- }),
- $globals.HLSUnitRunTests);
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "r";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^'r'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.HLSUnitRunTests.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "Run Tests";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^'Run Tests'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.HLSUnitRunTests.a$cls);
- $core.addClass("HLSUnitSelectAllCommand", $globals.HLSUnitCommand, [], "Helios-Commands-SUnit");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.HLSUnitSelectAllCommand.comment="I group the select all commands";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "a";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^ 'a'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.HLSUnitSelectAllCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "Select all";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^ 'Select all'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.HLSUnitSelectAllCommand.a$cls);
- $core.addClass("HLSUnitSelectAllClassesCommand", $globals.HLSUnitSelectAllCommand, [], "Helios-Commands-SUnit");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.HLSUnitSelectAllClassesCommand.comment="Select all available test classes based on what packages are selected on a `HLSUnitModel`";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "category",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "Classes";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "category\x0a\x09^'Classes'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.HLSUnitSelectAllClassesCommand);
- $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($self._model())._selectAllClasses();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"execute",{},$globals.HLSUnitSelectAllClassesCommand)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "execute\x0a\x09self model selectAllClasses",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["selectAllClasses", "model"]
- }),
- $globals.HLSUnitSelectAllClassesCommand);
- $core.addMethod(
- $core.method({
- selector: "isActive",
- protocol: "testing",
- fn: function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($recv($self.model)._selectedPackages())._notEmpty();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isActive",{},$globals.HLSUnitSelectAllClassesCommand)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isActive\x0a\x09^model selectedPackages notEmpty",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["notEmpty", "selectedPackages"]
- }),
- $globals.HLSUnitSelectAllClassesCommand);
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "c";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^ 'c'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.HLSUnitSelectAllClassesCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "Select all classes";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^ 'Select all classes'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.HLSUnitSelectAllClassesCommand.a$cls);
- $core.addClass("HLSUnitSelectAllPackagesCommand", $globals.HLSUnitSelectAllCommand, [], "Helios-Commands-SUnit");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.HLSUnitSelectAllPackagesCommand.comment="Select all packages with test cases on a `HLSUnitModel`";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "category",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "Packages";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "category\x0a\x09^'Packages'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.HLSUnitSelectAllPackagesCommand);
- $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($self._model())._selectAllPackages();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"execute",{},$globals.HLSUnitSelectAllPackagesCommand)});
- //>>excludeEnd("ctx");
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "execute\x0a\x09self model selectAllPackages",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: ["selectAllPackages", "model"]
- }),
- $globals.HLSUnitSelectAllPackagesCommand);
- $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");
- messageSends: []
- }),
- $globals.HLSUnitSelectAllPackagesCommand);
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "p";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^ 'p'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.HLSUnitSelectAllPackagesCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- fn: function (){
- var self=this,$self=this;
- return "Select all packages";
- },
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^ 'Select all packages'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- messageSends: []
- }),
- $globals.HLSUnitSelectAllPackagesCommand.a$cls);
- });
|