|
@@ -1243,6 +1243,67 @@ referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.Package);
|
|
smalltalk.Package);
|
|
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "loadDependencies",
|
|
|
|
+category: 'dependencies',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+var classes,packages;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+var $2,$3,$1;
|
|
|
|
+classes=self._loadDependencyClasses();
|
|
|
|
+$2=_st(_st(classes)._collect_((function(each){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
|
+return _st(each)._package();
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet();
|
|
|
|
+_st($2)._remove_ifAbsent_(self,(function(){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
|
|
|
+$3=_st($2)._yourself();
|
|
|
|
+$1=$3;
|
|
|
|
+return $1;
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"loadDependencies",{classes:classes,packages:packages},smalltalk.Package)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "loadDependencies\x0a\x09\x22Returns list of packages that need to be loaded\x0a\x09before loading this package.\x22\x0a\x09\x0a\x09| classes packages |\x0a\x09classes := self loadDependencyClasses.\x0a\x09^(classes collect: [ :each | each package ]) asSet\x0a\x09\x09remove: self ifAbsent: [];\x0a\x09\x09yourself",
|
|
|
|
+messageSends: ["loadDependencyClasses", "remove:ifAbsent:", "asSet", "collect:", "package", "yourself"],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.Package);
|
|
|
|
+
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "loadDependencyClasses",
|
|
|
|
+category: 'dependencies',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+var starCategoryName;
|
|
|
|
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+var $2,$3,$1;
|
|
|
|
+starCategoryName="*".__comma(self._name());
|
|
|
|
+$2=_st(_st(self._classes())._collect_((function(each){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
|
+return _st(each)._superclass();
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet();
|
|
|
|
+_st($2)._remove_ifAbsent_(nil,(function(){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
|
|
|
+_st($2)._addAll_(_st(_st(_st($Smalltalk())._current())._classes())._select_((function(each){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
|
+return _st(_st(each)._protocols())._includes_(starCategoryName);
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})));
|
|
|
|
+$3=_st($2)._yourself();
|
|
|
|
+$1=$3;
|
|
|
|
+return $1;
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"loadDependencyClasses",{starCategoryName:starCategoryName},smalltalk.Package)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "loadDependencyClasses\x0a\x09\x22Returns classes needed at the time of loading a package.\x0a\x09These are all that are used to subclass\x0a\x09and to define an extension method\x22\x0a\x09\x0a\x09| starCategoryName |\x0a\x09starCategoryName := '*', self name.\x0a\x09^(self classes collect: [ :each | each superclass ]) asSet\x0a\x09\x09remove: nil ifAbsent: [];\x0a\x09\x09addAll: (Smalltalk current classes select: [ :each | each protocols includes: starCategoryName ]);\x0a\x09\x09yourself",
|
|
|
|
+messageSends: [",", "name", "remove:ifAbsent:", "asSet", "collect:", "superclass", "classes", "addAll:", "select:", "includes:", "protocols", "current", "yourself"],
|
|
|
|
+referencedClasses: ["Smalltalk"]
|
|
|
|
+}),
|
|
|
|
+smalltalk.Package);
|
|
|
|
+
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "name",
|
|
selector: "name",
|