1
0
Pārlūkot izejas kodu

TMasterBehavior.

Common things for Class and Trait
(eg. entry points when talking about things in hierarchy).
Herbert Vojčík 7 gadi atpakaļ
vecāks
revīzija
ff77899a92
4 mainītis faili ar 493 papildinājumiem un 546 dzēšanām
  1. 266 401
      src/Kernel-Classes.js
  2. 72 90
      src/Kernel-Classes.st
  3. 143 45
      src/Platform-ImportExport.js
  4. 12 10
      src/Platform-ImportExport.st

+ 266 - 401
src/Kernel-Classes.js

@@ -189,65 +189,6 @@ messageSends: []
 }),
 $globals.BehaviorBody);
 
-$core.addMethod(
-$core.method({
-selector: "comment",
-protocol: "accessing",
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1,$receiver;
-$1=self._basicAt_("comment");
-if(($receiver = $1) == null || $receiver.isNil){
-return "";
-} else {
-return $1;
-}
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"comment",{},$globals.BehaviorBody)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "comment\x0a\x09^ (self basicAt: 'comment') ifNil: [ '' ]",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["ifNil:", "basicAt:"]
-}),
-$globals.BehaviorBody);
-
-$core.addMethod(
-$core.method({
-selector: "comment:",
-protocol: "accessing",
-fn: function (aString){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1,$3,$2;
-self._basicAt_put_("comment",aString);
-$1=$recv($globals.SystemAnnouncer)._current();
-$3=$recv($globals.ClassCommentChanged)._new();
-$recv($3)._theClass_(self);
-$2=$recv($3)._yourself();
-$recv($1)._announce_($2);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"comment:",{aString:aString},$globals.BehaviorBody)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "comment: aString\x0a\x09self basicAt: 'comment' put: aString.\x0a\x09SystemAnnouncer current\x0a\x09\x09announce: (ClassCommentChanged new\x0a\x09\x09\x09theClass: self;\x0a\x09\x09\x09yourself)",
-referencedClasses: ["SystemAnnouncer", "ClassCommentChanged"],
-//>>excludeEnd("ide");
-messageSends: ["basicAt:put:", "announce:", "current", "theClass:", "new", "yourself"]
-}),
-$globals.BehaviorBody);
-
 $core.addMethod(
 $core.method({
 selector: "compile:protocol:",
@@ -491,30 +432,6 @@ messageSends: ["select:", "methods", "=", "protocol"]
 }),
 $globals.BehaviorBody);
 
-$core.addMethod(
-$core.method({
-selector: "name",
-protocol: "accessing",
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return self.className || nil;
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"name",{},$globals.BehaviorBody)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "name\x0a\x09<inlineJS: 'return self.className || nil'>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.BehaviorBody);
-
 $core.addMethod(
 $core.method({
 selector: "organization",
@@ -1759,85 +1676,6 @@ $core.addClass("Class", $globals.Behavior, [], "Kernel-Classes");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Class.comment="I am __the__ class object.\x0a\x0aMy instances are the classes of the system.\x0aClass creation is done throught a `ClassBuilder` instance.";
 //>>excludeEnd("ide");
-$core.addMethod(
-$core.method({
-selector: "asJavaScriptSource",
-protocol: "converting",
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return "$globals.".__comma(self._name());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"asJavaScriptSource",{},$globals.Class)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "asJavaScriptSource\x0a\x09^ '$globals.', self name",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: [",", "name"]
-}),
-$globals.Class);
-
-$core.addMethod(
-$core.method({
-selector: "browse",
-protocol: "browsing",
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-$recv($globals.Finder)._findClass_(self);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"browse",{},$globals.Class)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "browse\x0a\x09Finder findClass: self",
-referencedClasses: ["Finder"],
-//>>excludeEnd("ide");
-messageSends: ["findClass:"]
-}),
-$globals.Class);
-
-$core.addMethod(
-$core.method({
-selector: "category",
-protocol: "accessing",
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1,$receiver;
-$1=self._package();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["package"]=1;
-//>>excludeEnd("ctx");
-if(($receiver = $1) == null || $receiver.isNil){
-return "Unclassified";
-} else {
-return $recv(self._package())._name();
-}
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"category",{},$globals.Class)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "category\x0a\x09^ self package ifNil: [ 'Unclassified' ] ifNotNil: [ self package name ]",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["ifNil:ifNotNil:", "package", "name"]
-}),
-$globals.Class);
-
 $core.addMethod(
 $core.method({
 selector: "classTag",
@@ -1954,76 +1792,6 @@ messageSends: []
 }),
 $globals.Class);
 
-$core.addMethod(
-$core.method({
-selector: "package",
-protocol: "accessing",
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return self._basicAt_("pkg");
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"package",{},$globals.Class)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "package\x0a\x09^ self basicAt: 'pkg'",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["basicAt:"]
-}),
-$globals.Class);
-
-$core.addMethod(
-$core.method({
-selector: "package:",
-protocol: "accessing",
-fn: function (aPackage){
-var self=this;
-var oldPackage;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $2,$1,$3,$4,$6,$5;
-$2=self._package();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["package"]=1;
-//>>excludeEnd("ctx");
-$1=$recv($2).__eq(aPackage);
-if($core.assert($1)){
-return self;
-}
-oldPackage=self._package();
-self._basicAt_put_("pkg",aPackage);
-$3=$recv(oldPackage)._organization();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["organization"]=1;
-//>>excludeEnd("ctx");
-$recv($3)._removeElement_(self);
-$recv($recv(aPackage)._organization())._addElement_(self);
-$4=$recv($globals.SystemAnnouncer)._current();
-$6=$recv($globals.ClassMoved)._new();
-$recv($6)._theClass_(self);
-$recv($6)._oldPackage_(oldPackage);
-$5=$recv($6)._yourself();
-$recv($4)._announce_($5);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"package:",{aPackage:aPackage,oldPackage:oldPackage},$globals.Class)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aPackage"],
-source: "package: aPackage\x0a\x09| oldPackage |\x0a\x09\x0a\x09self package = aPackage ifTrue: [ ^ self ].\x0a\x09\x0a\x09oldPackage := self package.\x0a\x09\x0a\x09self basicAt: 'pkg' put: aPackage.\x0a\x09oldPackage organization removeElement: self.\x0a\x09aPackage organization addElement: self.\x0a\x0a\x09SystemAnnouncer current announce: (ClassMoved new\x0a\x09\x09theClass: self;\x0a\x09\x09oldPackage: oldPackage;\x0a\x09\x09yourself)",
-referencedClasses: ["SystemAnnouncer", "ClassMoved"],
-//>>excludeEnd("ide");
-messageSends: ["ifTrue:", "=", "package", "basicAt:put:", "removeElement:", "organization", "addElement:", "announce:", "current", "theClass:", "new", "oldPackage:", "yourself"]
-}),
-$globals.Class);
-
 $core.addMethod(
 $core.method({
 selector: "rename:",
@@ -2328,24 +2096,6 @@ messageSends: ["class"]
 }),
 $globals.Class);
 
-$core.addMethod(
-$core.method({
-selector: "theNonMetaClass",
-protocol: "accessing",
-fn: function (){
-var self=this;
-return self;
-
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "theNonMetaClass\x0a\x09^ self",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.Class);
-
 
 
 $core.addClass("Metaclass", $globals.Behavior, [], "Kernel-Classes");
@@ -2694,62 +2444,39 @@ $globals.Trait);
 
 $core.addMethod(
 $core.method({
-selector: "asJavaScriptSource",
+selector: "asTraitComposition",
 protocol: "converting",
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return "$globals.".__comma(self._name());
+return $recv(self._asTraitTransformation())._asTraitComposition();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"asJavaScriptSource",{},$globals.Trait)});
+}, function($ctx1) {$ctx1.fill(self,"asTraitComposition",{},$globals.Trait)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "asJavaScriptSource\x0a\x09^ '$globals.', self name",
+source: "asTraitComposition\x0a\x09^ self asTraitTransformation asTraitComposition",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: [",", "name"]
+messageSends: ["asTraitComposition", "asTraitTransformation"]
 }),
 $globals.Trait);
 
 $core.addMethod(
 $core.method({
-selector: "asTraitComposition",
+selector: "asTraitTransformation",
 protocol: "converting",
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv(self._asTraitTransformation())._asTraitComposition();
+return $recv($globals.TraitTransformation)._on_(self);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"asTraitComposition",{},$globals.Trait)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "asTraitComposition\x0a\x09^ self asTraitTransformation asTraitComposition",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["asTraitComposition", "asTraitTransformation"]
-}),
-$globals.Trait);
-
-$core.addMethod(
-$core.method({
-selector: "asTraitTransformation",
-protocol: "converting",
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return $recv($globals.TraitTransformation)._on_(self);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"asTraitTransformation",{},$globals.Trait)});
+}, function($ctx1) {$ctx1.fill(self,"asTraitTransformation",{},$globals.Trait)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -2761,38 +2488,6 @@ messageSends: ["on:"]
 }),
 $globals.Trait);
 
-$core.addMethod(
-$core.method({
-selector: "category",
-protocol: "accessing",
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1,$receiver;
-$1=self._package();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["package"]=1;
-//>>excludeEnd("ctx");
-if(($receiver = $1) == null || $receiver.isNil){
-return "Unclassified";
-} else {
-return $recv(self._package())._name();
-}
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"category",{},$globals.Trait)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "category\x0a\x09^ self package ifNil: [ 'Unclassified' ] ifNotNil: [ self package name ]",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["ifNil:ifNotNil:", "package", "name"]
-}),
-$globals.Trait);
-
 $core.addMethod(
 $core.method({
 selector: "classTag",
@@ -2870,76 +2565,6 @@ messageSends: ["streamContents:", "write:", "printSymbol:", "name", "lf", "ifNot
 }),
 $globals.Trait);
 
-$core.addMethod(
-$core.method({
-selector: "package",
-protocol: "accessing",
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return self._basicAt_("pkg");
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"package",{},$globals.Trait)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "package\x0a\x09^ self basicAt: 'pkg'",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["basicAt:"]
-}),
-$globals.Trait);
-
-$core.addMethod(
-$core.method({
-selector: "package:",
-protocol: "accessing",
-fn: function (aPackage){
-var self=this;
-var oldPackage;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $2,$1,$3,$4,$6,$5;
-$2=self._package();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["package"]=1;
-//>>excludeEnd("ctx");
-$1=$recv($2).__eq(aPackage);
-if($core.assert($1)){
-return self;
-}
-oldPackage=self._package();
-self._basicAt_put_("pkg",aPackage);
-$3=$recv(oldPackage)._organization();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["organization"]=1;
-//>>excludeEnd("ctx");
-$recv($3)._removeElement_(self);
-$recv($recv(aPackage)._organization())._addElement_(self);
-$4=$recv($globals.SystemAnnouncer)._current();
-$6=$recv($globals.ClassMoved)._new();
-$recv($6)._theClass_(self);
-$recv($6)._oldPackage_(oldPackage);
-$5=$recv($6)._yourself();
-$recv($4)._announce_($5);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"package:",{aPackage:aPackage,oldPackage:oldPackage},$globals.Trait)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aPackage"],
-source: "package: aPackage\x0a\x09| oldPackage |\x0a\x09\x0a\x09self package = aPackage ifTrue: [ ^ self ].\x0a\x09\x0a\x09oldPackage := self package.\x0a\x09\x0a\x09self basicAt: 'pkg' put: aPackage.\x0a\x09oldPackage organization removeElement: self.\x0a\x09aPackage organization addElement: self.\x0a\x0a\x09SystemAnnouncer current announce: (ClassMoved new\x0a\x09\x09theClass: self;\x0a\x09\x09oldPackage: oldPackage;\x0a\x09\x09yourself)",
-referencedClasses: ["SystemAnnouncer", "ClassMoved"],
-//>>excludeEnd("ide");
-messageSends: ["ifTrue:", "=", "package", "basicAt:put:", "removeElement:", "organization", "addElement:", "announce:", "current", "theClass:", "new", "oldPackage:", "yourself"]
-}),
-$globals.Trait);
-
 $core.addMethod(
 $core.method({
 selector: "theMetaClass",
@@ -2958,24 +2583,6 @@ messageSends: []
 }),
 $globals.Trait);
 
-$core.addMethod(
-$core.method({
-selector: "theNonMetaClass",
-protocol: "accessing",
-fn: function (){
-var self=this;
-return self;
-
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "theNonMetaClass\x0a\x09^ self",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.Trait);
-
 $core.addMethod(
 $core.method({
 selector: "traitUsers",
@@ -4029,6 +3636,261 @@ messageSends: ["theClass:", "new", "level:", "getNodesFrom:", "yourself"]
 $globals.ClassSorterNode.klass);
 
 
+$core.addTrait("TMasterBehavior", "Kernel-Classes");
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.TMasterBehavior.comment="I am the behavior on the instance-side of the browser.\x0a\x0aI define things like package, category, name, comment etc.\x0aas opposed to derived behaviors (metaclass, class trait, ...)\x0athat relate to me.";
+//>>excludeEnd("ide");
+$core.addMethod(
+$core.method({
+selector: "asJavaScriptSource",
+protocol: "converting",
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return "$globals.".__comma(self._name());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"asJavaScriptSource",{},$globals.TMasterBehavior)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "asJavaScriptSource\x0a\x09^ '$globals.', self name",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: [",", "name"]
+}),
+$globals.TMasterBehavior);
+
+$core.addMethod(
+$core.method({
+selector: "browse",
+protocol: "browsing",
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv($globals.Finder)._findClass_(self);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"browse",{},$globals.TMasterBehavior)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "browse\x0a\x09Finder findClass: self",
+referencedClasses: ["Finder"],
+//>>excludeEnd("ide");
+messageSends: ["findClass:"]
+}),
+$globals.TMasterBehavior);
+
+$core.addMethod(
+$core.method({
+selector: "category",
+protocol: "accessing",
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$receiver;
+$1=self._package();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["package"]=1;
+//>>excludeEnd("ctx");
+if(($receiver = $1) == null || $receiver.isNil){
+return "Unclassified";
+} else {
+return $recv(self._package())._name();
+}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"category",{},$globals.TMasterBehavior)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "category\x0a\x09^ self package ifNil: [ 'Unclassified' ] ifNotNil: [ self package name ]",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["ifNil:ifNotNil:", "package", "name"]
+}),
+$globals.TMasterBehavior);
+
+$core.addMethod(
+$core.method({
+selector: "comment",
+protocol: "accessing",
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$receiver;
+$1=self._basicAt_("comment");
+if(($receiver = $1) == null || $receiver.isNil){
+return "";
+} else {
+return $1;
+}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"comment",{},$globals.TMasterBehavior)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "comment\x0a\x09^ (self basicAt: 'comment') ifNil: [ '' ]",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["ifNil:", "basicAt:"]
+}),
+$globals.TMasterBehavior);
+
+$core.addMethod(
+$core.method({
+selector: "comment:",
+protocol: "accessing",
+fn: function (aString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$3,$2;
+self._basicAt_put_("comment",aString);
+$1=$recv($globals.SystemAnnouncer)._current();
+$3=$recv($globals.ClassCommentChanged)._new();
+$recv($3)._theClass_(self);
+$2=$recv($3)._yourself();
+$recv($1)._announce_($2);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"comment:",{aString:aString},$globals.TMasterBehavior)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "comment: aString\x0a\x09self basicAt: 'comment' put: aString.\x0a\x09SystemAnnouncer current\x0a\x09\x09announce: (ClassCommentChanged new\x0a\x09\x09\x09theClass: self;\x0a\x09\x09\x09yourself)",
+referencedClasses: ["SystemAnnouncer", "ClassCommentChanged"],
+//>>excludeEnd("ide");
+messageSends: ["basicAt:put:", "announce:", "current", "theClass:", "new", "yourself"]
+}),
+$globals.TMasterBehavior);
+
+$core.addMethod(
+$core.method({
+selector: "name",
+protocol: "accessing",
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return self.className || null;
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"name",{},$globals.TMasterBehavior)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "name\x0a\x09<inlineJS: 'return self.className || null'>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.TMasterBehavior);
+
+$core.addMethod(
+$core.method({
+selector: "package",
+protocol: "accessing",
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return self._basicAt_("pkg");
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"package",{},$globals.TMasterBehavior)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "package\x0a\x09^ self basicAt: 'pkg'",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["basicAt:"]
+}),
+$globals.TMasterBehavior);
+
+$core.addMethod(
+$core.method({
+selector: "package:",
+protocol: "accessing",
+fn: function (aPackage){
+var self=this;
+var oldPackage;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $2,$1,$3,$4,$6,$5;
+$2=self._package();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["package"]=1;
+//>>excludeEnd("ctx");
+$1=$recv($2).__eq(aPackage);
+if($core.assert($1)){
+return self;
+}
+oldPackage=self._package();
+self._basicAt_put_("pkg",aPackage);
+$3=$recv(oldPackage)._organization();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["organization"]=1;
+//>>excludeEnd("ctx");
+$recv($3)._removeElement_(self);
+$recv($recv(aPackage)._organization())._addElement_(self);
+$4=$recv($globals.SystemAnnouncer)._current();
+$6=$recv($globals.ClassMoved)._new();
+$recv($6)._theClass_(self);
+$recv($6)._oldPackage_(oldPackage);
+$5=$recv($6)._yourself();
+$recv($4)._announce_($5);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"package:",{aPackage:aPackage,oldPackage:oldPackage},$globals.TMasterBehavior)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aPackage"],
+source: "package: aPackage\x0a\x09| oldPackage |\x0a\x09\x0a\x09self package = aPackage ifTrue: [ ^ self ].\x0a\x09\x0a\x09oldPackage := self package.\x0a\x09\x0a\x09self basicAt: 'pkg' put: aPackage.\x0a\x09oldPackage organization removeElement: self.\x0a\x09aPackage organization addElement: self.\x0a\x0a\x09SystemAnnouncer current announce: (ClassMoved new\x0a\x09\x09theClass: self;\x0a\x09\x09oldPackage: oldPackage;\x0a\x09\x09yourself)",
+referencedClasses: ["SystemAnnouncer", "ClassMoved"],
+//>>excludeEnd("ide");
+messageSends: ["ifTrue:", "=", "package", "basicAt:put:", "removeElement:", "organization", "addElement:", "announce:", "current", "theClass:", "new", "oldPackage:", "yourself"]
+}),
+$globals.TMasterBehavior);
+
+$core.addMethod(
+$core.method({
+selector: "theNonMetaClass",
+protocol: "accessing",
+fn: function (){
+var self=this;
+return self;
+
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "theNonMetaClass\x0a\x09^ self",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.TMasterBehavior);
+
+
 $core.addClass("TraitTransformation", $globals.Object, ["trait", "aliases", "exclusions"], "Kernel-Classes");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.TraitTransformation.comment="I am a single step in trait composition.\x0a\x0aI represent one trait including its aliases and exclusions.";
@@ -4606,6 +4468,9 @@ messageSends: ["trait:", "new", "yourself"]
 }),
 $globals.TraitTransformation.klass);
 
+$core.setTraitComposition([{trait: $globals.TMasterBehavior}], $globals.Class);
+$core.setTraitComposition([{trait: $globals.TMasterBehavior}], $globals.Trait);
+
 $core.addMethod(
 $core.method({
 selector: "asTraitComposition",

+ 72 - 90
src/Kernel-Classes.st

@@ -20,18 +20,6 @@ allInstanceVariableNames
 	^ #()
 !
 
-comment
-	^ (self basicAt: 'comment') ifNil: [ '' ]
-!
-
-comment: aString
-	self basicAt: 'comment' put: aString.
-	SystemAnnouncer current
-		announce: (ClassCommentChanged new
-			theClass: self;
-			yourself)
-!
-
 definition
 	self subclassResponsibility
 !
@@ -68,10 +56,6 @@ methodsInProtocol: aString
 	^ self methods select: [ :each | each protocol = aString ]
 !
 
-name
-	<inlineJS: 'return self.className || nil'>
-!
-
 organization
 	^ self basicAt: 'organization'
 !
@@ -414,10 +398,6 @@ Class creation is done throught a `ClassBuilder` instance.!
 
 !Class methodsFor: 'accessing'!
 
-category
-	^ self package ifNil: [ 'Unclassified' ] ifNotNil: [ self package name ]
-!
-
 classTag
 	"Returns a tag or general category for this class.
 	Typically used to help tools do some reflection.
@@ -434,27 +414,6 @@ definition
 		tab; write: 'package: '; print: self category ]
 !
 
-package
-	^ self basicAt: 'pkg'
-!
-
-package: aPackage
-	| oldPackage |
-	
-	self package = aPackage ifTrue: [ ^ self ].
-	
-	oldPackage := self package.
-	
-	self basicAt: 'pkg' put: aPackage.
-	oldPackage organization removeElement: self.
-	aPackage organization addElement: self.
-
-	SystemAnnouncer current announce: (ClassMoved new
-		theClass: self;
-		oldPackage: oldPackage;
-		yourself)
-!
-
 rename: aString
 	ClassBuilder new renameClass: self to: aString
 !
@@ -465,16 +424,6 @@ subclasses
 
 theMetaClass
 	^ self class
-!
-
-theNonMetaClass
-	^ self
-! !
-
-!Class methodsFor: 'browsing'!
-
-browse
-	Finder findClass: self
 ! !
 
 !Class methodsFor: 'class creation'!
@@ -531,12 +480,6 @@ subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aStr
 	^ cls
 ! !
 
-!Class methodsFor: 'converting'!
-
-asJavaScriptSource
-	^ '$globals.', self name
-! !
-
 !Class methodsFor: 'testing'!
 
 isClass
@@ -618,10 +561,6 @@ BehaviorBody subclass: #Trait
 
 !Trait methodsFor: 'accessing'!
 
-category
-	^ self package ifNil: [ 'Unclassified' ] ifNotNil: [ self package name ]
-!
-
 classTag
 	^ 'trait'
 !
@@ -633,35 +572,10 @@ definition
 		tab; write: 'package: '; print: self category ]
 !
 
-package
-	^ self basicAt: 'pkg'
-!
-
-package: aPackage
-	| oldPackage |
-	
-	self package = aPackage ifTrue: [ ^ self ].
-	
-	oldPackage := self package.
-	
-	self basicAt: 'pkg' put: aPackage.
-	oldPackage organization removeElement: self.
-	aPackage organization addElement: self.
-
-	SystemAnnouncer current announce: (ClassMoved new
-		theClass: self;
-		oldPackage: oldPackage;
-		yourself)
-!
-
 theMetaClass
 	^ nil
 !
 
-theNonMetaClass
-	^ self
-!
-
 traitUsers
 	^ (self basicAt: 'traitUsers') copy
 ! !
@@ -678,10 +592,6 @@ traitUsers
 
 !Trait methodsFor: 'converting'!
 
-asJavaScriptSource
-	^ '$globals.', self name
-!
-
 asTraitComposition
 	^ self asTraitTransformation asTraitComposition
 !
@@ -1006,6 +916,74 @@ on: aClass classes: aCollection level: anInteger
 		yourself
 ! !
 
+Trait named: #TMasterBehavior
+	package: 'Kernel-Classes'!
+!TMasterBehavior commentStamp!
+I am the behavior on the instance-side of the browser.
+
+I define things like package, category, name, comment etc.
+as opposed to derived behaviors (metaclass, class trait, ...)
+that relate to me.!
+
+!TMasterBehavior methodsFor: 'accessing'!
+
+category
+	^ self package ifNil: [ 'Unclassified' ] ifNotNil: [ self package name ]
+!
+
+comment
+	^ (self basicAt: 'comment') ifNil: [ '' ]
+!
+
+comment: aString
+	self basicAt: 'comment' put: aString.
+	SystemAnnouncer current
+		announce: (ClassCommentChanged new
+			theClass: self;
+			yourself)
+!
+
+name
+	<inlineJS: 'return self.className || null'>
+!
+
+package
+	^ self basicAt: 'pkg'
+!
+
+package: aPackage
+	| oldPackage |
+	
+	self package = aPackage ifTrue: [ ^ self ].
+	
+	oldPackage := self package.
+	
+	self basicAt: 'pkg' put: aPackage.
+	oldPackage organization removeElement: self.
+	aPackage organization addElement: self.
+
+	SystemAnnouncer current announce: (ClassMoved new
+		theClass: self;
+		oldPackage: oldPackage;
+		yourself)
+!
+
+theNonMetaClass
+	^ self
+! !
+
+!TMasterBehavior methodsFor: 'browsing'!
+
+browse
+	Finder findClass: self
+! !
+
+!TMasterBehavior methodsFor: 'converting'!
+
+asJavaScriptSource
+	^ '$globals.', self name
+! !
+
 Object subclass: #TraitTransformation
 	instanceVariableNames: 'trait aliases exclusions'
 	package: 'Kernel-Classes'!
@@ -1132,6 +1110,10 @@ on: aTrait
 	^ super new trait: aTrait; yourself
 ! !
 
+Class setTraitComposition: {TMasterBehavior} asTraitComposition!
+Trait setTraitComposition: {TMasterBehavior} asTraitComposition!
+! !
+
 !Array methodsFor: '*Kernel-Classes'!
 
 asTraitComposition

+ 143 - 45
src/Platform-ImportExport.js

@@ -4271,125 +4271,125 @@ $globals.AmdPackageTransport.klass);
 
 $core.addMethod(
 $core.method({
-selector: "commentStamp",
+selector: "exportBehaviorDefinitionTo:using:",
 protocol: "*Platform-ImportExport",
-fn: function (){
+fn: function (aStream,anExporter){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $1;
-$1=$recv($globals.ClassCommentReader)._new();
-$recv($1)._class_(self);
-return $recv($1)._yourself();
+self._subclassResponsibility();
+return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"commentStamp",{},$globals.BehaviorBody)});
+}, function($ctx1) {$ctx1.fill(self,"exportBehaviorDefinitionTo:using:",{aStream:aStream,anExporter:anExporter},$globals.BehaviorBody)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "commentStamp\x0a\x09^ ClassCommentReader new\x0a\x09class: self;\x0a\x09yourself",
-referencedClasses: ["ClassCommentReader"],
+args: ["aStream", "anExporter"],
+source: "exportBehaviorDefinitionTo: aStream using: anExporter\x0a\x09self subclassResponsibility",
+referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["class:", "new", "yourself"]
+messageSends: ["subclassResponsibility"]
 }),
 $globals.BehaviorBody);
 
 $core.addMethod(
 $core.method({
-selector: "commentStamp:prior:",
+selector: "methodsFor:",
 protocol: "*Platform-ImportExport",
-fn: function (aStamp,prior){
+fn: function (aString){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return self._commentStamp();
+var $1;
+$1=$recv($globals.ClassProtocolReader)._new();
+$recv($1)._class_category_(self,aString);
+return $recv($1)._yourself();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"commentStamp:prior:",{aStamp:aStamp,prior:prior},$globals.BehaviorBody)});
+}, function($ctx1) {$ctx1.fill(self,"methodsFor:",{aString:aString},$globals.BehaviorBody)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aStamp", "prior"],
-source: "commentStamp: aStamp prior: prior\x0a\x09\x09^ self commentStamp",
-referencedClasses: [],
+args: ["aString"],
+source: "methodsFor: aString\x0a\x09^ ClassProtocolReader new\x0a\x09\x09class: self category: aString;\x0a\x09\x09yourself",
+referencedClasses: ["ClassProtocolReader"],
 //>>excludeEnd("ide");
-messageSends: ["commentStamp"]
+messageSends: ["class:category:", "new", "yourself"]
 }),
 $globals.BehaviorBody);
 
 $core.addMethod(
 $core.method({
-selector: "exportBehaviorDefinitionTo:using:",
+selector: "methodsFor:stamp:",
 protocol: "*Platform-ImportExport",
-fn: function (aStream,anExporter){
+fn: function (aString,aStamp){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._subclassResponsibility();
-return self;
+return self._methodsFor_(aString);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"exportBehaviorDefinitionTo:using:",{aStream:aStream,anExporter:anExporter},$globals.BehaviorBody)});
+}, function($ctx1) {$ctx1.fill(self,"methodsFor:stamp:",{aString:aString,aStamp:aStamp},$globals.BehaviorBody)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aStream", "anExporter"],
-source: "exportBehaviorDefinitionTo: aStream using: anExporter\x0a\x09self subclassResponsibility",
+args: ["aString", "aStamp"],
+source: "methodsFor: aString stamp: aStamp\x0a\x09\x22Added for file-in compatibility, ignores stamp.\x22\x0a\x09^ self methodsFor: aString",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["subclassResponsibility"]
+messageSends: ["methodsFor:"]
 }),
 $globals.BehaviorBody);
 
 $core.addMethod(
 $core.method({
-selector: "methodsFor:",
+selector: "commentStamp",
 protocol: "*Platform-ImportExport",
-fn: function (aString){
+fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-$1=$recv($globals.ClassProtocolReader)._new();
-$recv($1)._class_category_(self,aString);
+$1=$recv($globals.ClassCommentReader)._new();
+$recv($1)._class_(self);
 return $recv($1)._yourself();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"methodsFor:",{aString:aString},$globals.BehaviorBody)});
+}, function($ctx1) {$ctx1.fill(self,"commentStamp",{},$globals.TMasterBehavior)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "methodsFor: aString\x0a\x09^ ClassProtocolReader new\x0a\x09\x09class: self category: aString;\x0a\x09\x09yourself",
-referencedClasses: ["ClassProtocolReader"],
+args: [],
+source: "commentStamp\x0a\x09^ ClassCommentReader new\x0a\x09class: self;\x0a\x09yourself",
+referencedClasses: ["ClassCommentReader"],
 //>>excludeEnd("ide");
-messageSends: ["class:category:", "new", "yourself"]
+messageSends: ["class:", "new", "yourself"]
 }),
-$globals.BehaviorBody);
+$globals.TMasterBehavior);
 
 $core.addMethod(
 $core.method({
-selector: "methodsFor:stamp:",
+selector: "commentStamp:prior:",
 protocol: "*Platform-ImportExport",
-fn: function (aString,aStamp){
+fn: function (aStamp,prior){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return self._methodsFor_(aString);
+return self._commentStamp();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"methodsFor:stamp:",{aString:aString,aStamp:aStamp},$globals.BehaviorBody)});
+}, function($ctx1) {$ctx1.fill(self,"commentStamp:prior:",{aStamp:aStamp,prior:prior},$globals.TMasterBehavior)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aStamp"],
-source: "methodsFor: aString stamp: aStamp\x0a\x09\x22Added for file-in compatibility, ignores stamp.\x22\x0a\x09^ self methodsFor: aString",
+args: ["aStamp", "prior"],
+source: "commentStamp: aStamp prior: prior\x0a\x09\x09^ self commentStamp",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["methodsFor:"]
+messageSends: ["commentStamp"]
 }),
-$globals.BehaviorBody);
+$globals.TMasterBehavior);
 
 $core.addMethod(
 $core.method({
@@ -4559,6 +4559,104 @@ messageSends: ["loadFromNamespace:", "named:"]
 }),
 $globals.Package.klass);
 
+$core.addMethod(
+$core.method({
+selector: "commentStamp",
+protocol: "*Platform-ImportExport",
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv($globals.ClassCommentReader)._new();
+$recv($1)._class_(self);
+return $recv($1)._yourself();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"commentStamp",{},$globals.TMasterBehavior)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "commentStamp\x0a\x09^ ClassCommentReader new\x0a\x09class: self;\x0a\x09yourself",
+referencedClasses: ["ClassCommentReader"],
+//>>excludeEnd("ide");
+messageSends: ["class:", "new", "yourself"]
+}),
+$globals.TMasterBehavior);
+
+$core.addMethod(
+$core.method({
+selector: "commentStamp:prior:",
+protocol: "*Platform-ImportExport",
+fn: function (aStamp,prior){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return self._commentStamp();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"commentStamp:prior:",{aStamp:aStamp,prior:prior},$globals.TMasterBehavior)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aStamp", "prior"],
+source: "commentStamp: aStamp prior: prior\x0a\x09\x09^ self commentStamp",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["commentStamp"]
+}),
+$globals.TMasterBehavior);
+
+$core.addMethod(
+$core.method({
+selector: "commentStamp",
+protocol: "*Platform-ImportExport",
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv($globals.ClassCommentReader)._new();
+$recv($1)._class_(self);
+return $recv($1)._yourself();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"commentStamp",{},$globals.TMasterBehavior)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "commentStamp\x0a\x09^ ClassCommentReader new\x0a\x09class: self;\x0a\x09yourself",
+referencedClasses: ["ClassCommentReader"],
+//>>excludeEnd("ide");
+messageSends: ["class:", "new", "yourself"]
+}),
+$globals.TMasterBehavior);
+
+$core.addMethod(
+$core.method({
+selector: "commentStamp:prior:",
+protocol: "*Platform-ImportExport",
+fn: function (aStamp,prior){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return self._commentStamp();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"commentStamp:prior:",{aStamp:aStamp,prior:prior},$globals.TMasterBehavior)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aStamp", "prior"],
+source: "commentStamp: aStamp prior: prior\x0a\x09\x09^ self commentStamp",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["commentStamp"]
+}),
+$globals.TMasterBehavior);
+
 $core.addMethod(
 $core.method({
 selector: "exportBehaviorDefinitionTo:using:",

+ 12 - 10
src/Platform-ImportExport.st

@@ -1122,16 +1122,6 @@ namespace: aString
 
 !BehaviorBody methodsFor: '*Platform-ImportExport'!
 
-commentStamp
-	^ ClassCommentReader new
-	class: self;
-	yourself
-!
-
-commentStamp: aStamp prior: prior
-		^ self commentStamp
-!
-
 exportBehaviorDefinitionTo: aStream using: anExporter
 	self subclassResponsibility
 !
@@ -1185,6 +1175,18 @@ load: aPackageName fromNamespace: aString
 	(self named: aPackageName) loadFromNamespace: aString
 ! !
 
+!TMasterBehavior methodsFor: '*Platform-ImportExport'!
+
+commentStamp
+	^ ClassCommentReader new
+	class: self;
+	yourself
+!
+
+commentStamp: aStamp prior: prior
+		^ self commentStamp
+! !
+
 !Trait methodsFor: '*Platform-ImportExport'!
 
 exportBehaviorDefinitionTo: aStream using: anExporter