|
@@ -2715,6 +2715,7 @@ var self=this;
|
|
|
|
|
|
return $core.withContext(function($ctx1) {
|
|
|
|
|
|
+var $1;
|
|
|
return $recv($globals.String)._streamContents_((function(stream){
|
|
|
|
|
|
return $core.withContext(function($ctx2) {
|
|
@@ -2725,6 +2726,25 @@ $ctx2.sendIdx["write:"]=1;
|
|
|
|
|
|
$recv(stream)._printSymbol_(self._name());
|
|
|
$recv(stream)._lf();
|
|
|
+
|
|
|
+$ctx2.sendIdx["lf"]=1;
|
|
|
+
|
|
|
+$recv(stream)._write_($recv(self._usesDefinition())._ifNotEmpty_((function(uses){
|
|
|
+
|
|
|
+return $core.withContext(function($ctx3) {
|
|
|
+
|
|
|
+$1=$recv($globals.String)._tab();
|
|
|
+
|
|
|
+$ctx3.sendIdx["tab"]=1;
|
|
|
+
|
|
|
+return [$1,uses,$recv($globals.String)._lf()];
|
|
|
+
|
|
|
+}, function($ctx3) {$ctx3.fillBlock({uses:uses},$ctx2,2)});
|
|
|
+
|
|
|
+})));
|
|
|
+
|
|
|
+$ctx2.sendIdx["write:"]=2;
|
|
|
+
|
|
|
$recv(stream)._tab();
|
|
|
$recv(stream)._write_("package: ");
|
|
|
return $recv(stream)._print_(self._category());
|
|
@@ -2738,10 +2758,10 @@ return $recv(stream)._print_(self._category());
|
|
|
},
|
|
|
|
|
|
args: [],
|
|
|
-source: "definition\x0a\x09^ String streamContents: [ :stream | stream\x0a\x09\x09write: 'Trait named: '; printSymbol: self name; lf;\x0a\x09\x09tab; write: 'package: '; print: self category ]",
|
|
|
+source: "definition\x0a\x09^ String streamContents: [ :stream | stream\x0a\x09\x09write: 'Trait named: '; printSymbol: self name; lf;\x0a\x09\x09write: (self usesDefinition ifNotEmpty: [ :uses | { String tab. uses. String lf }]);\x0a\x09\x09tab; write: 'package: '; print: self category ]",
|
|
|
referencedClasses: ["String"],
|
|
|
|
|
|
-messageSends: ["streamContents:", "write:", "printSymbol:", "name", "lf", "tab", "print:", "category"]
|
|
|
+messageSends: ["streamContents:", "write:", "printSymbol:", "name", "lf", "ifNotEmpty:", "usesDefinition", "tab", "print:", "category"]
|
|
|
}),
|
|
|
$globals.Trait);
|
|
|
|
|
@@ -2870,6 +2890,32 @@ messageSends: []
|
|
|
}),
|
|
|
$globals.Trait.klass);
|
|
|
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "named:uses:package:",
|
|
|
+protocol: "instance creation",
|
|
|
+fn: function (aString,aTraitCompositionDescription,anotherString){
|
|
|
+var self=this;
|
|
|
+var trait;
|
|
|
+
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+
|
|
|
+trait=self._named_package_(aString,anotherString);
|
|
|
+$recv(trait)._setTraitComposition_($recv(aTraitCompositionDescription)._asTraitComposition());
|
|
|
+return trait;
|
|
|
+
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"named:uses:package:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,anotherString:anotherString,trait:trait},$globals.Trait.klass)});
|
|
|
+
|
|
|
+},
|
|
|
+
|
|
|
+args: ["aString", "aTraitCompositionDescription", "anotherString"],
|
|
|
+source: "named: aString uses: aTraitCompositionDescription package: anotherString\x0a\x09| trait |\x0a\x09trait := self named: aString package: anotherString.\x0a\x09trait setTraitComposition: aTraitCompositionDescription asTraitComposition.\x0a\x09^ trait",
|
|
|
+referencedClasses: [],
|
|
|
+
|
|
|
+messageSends: ["named:package:", "setTraitComposition:", "asTraitComposition"]
|
|
|
+}),
|
|
|
+$globals.Trait.klass);
|
|
|
+
|
|
|
|
|
|
$core.addClass("ClassBuilder", $globals.Object, [], "Kernel-Classes");
|
|
|
|