|
@@ -470,12 +470,12 @@ fn: function (aString){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
_st(self)._selectItem_(nil);
|
|
_st(self)._selectItem_(nil);
|
|
-_st(self)._items_(_st(_st(self)._model())._classReferencesFor_(aString));
|
|
|
|
|
|
+_st(self)._items_(_st(_st(self)._model())._classReferencesOf_(aString));
|
|
_st(self)._refresh();
|
|
_st(self)._refresh();
|
|
return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLClassReferencesListWidget)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLClassReferencesListWidget)})},
|
|
args: ["aString"],
|
|
args: ["aString"],
|
|
-source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model classReferencesFor: aString).\x0a\x09self refresh",
|
|
|
|
-messageSends: ["selectItem:", "items:", "classReferencesFor:", "model", "refresh"],
|
|
|
|
|
|
+source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model classReferencesOf: aString).\x0a\x09self refresh",
|
|
|
|
+messageSends: ["selectItem:", "items:", "classReferencesOf:", "model", "refresh"],
|
|
referencedClasses: []
|
|
referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.HLClassReferencesListWidget);
|
|
smalltalk.HLClassReferencesListWidget);
|
|
@@ -483,6 +483,22 @@ smalltalk.HLClassReferencesListWidget);
|
|
|
|
|
|
|
|
|
|
smalltalk.addClass('HLImplementorsListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
|
|
smalltalk.addClass('HLImplementorsListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "label",
|
|
|
|
+category: 'accessing',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+return "Implementors";
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLImplementorsListWidget)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "label\x0a\x09^ 'Implementors'",
|
|
|
|
+messageSends: [],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.HLImplementorsListWidget);
|
|
|
|
+
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "onSearchReferences:",
|
|
selector: "onSearchReferences:",
|
|
@@ -490,10 +506,13 @@ category: 'reactions',
|
|
fn: function (aString){
|
|
fn: function (aString){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
|
+_st(self)._selectItem_(nil);
|
|
|
|
+_st(self)._items_(_st(_st(self)._model())._implementorsOf_(aString));
|
|
|
|
+_st(self)._refresh();
|
|
return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLImplementorsListWidget)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLImplementorsListWidget)})},
|
|
args: ["aString"],
|
|
args: ["aString"],
|
|
-source: "onSearchReferences: aString",
|
|
|
|
-messageSends: [],
|
|
|
|
|
|
+source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model implementorsOf: aString).\x0a\x09self refresh",
|
|
|
|
+messageSends: ["selectItem:", "items:", "implementorsOf:", "model", "refresh"],
|
|
referencedClasses: []
|
|
referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.HLImplementorsListWidget);
|
|
smalltalk.HLImplementorsListWidget);
|
|
@@ -501,6 +520,22 @@ smalltalk.HLImplementorsListWidget);
|
|
|
|
|
|
|
|
|
|
smalltalk.addClass('HLRegexpListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
|
|
smalltalk.addClass('HLRegexpListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "label",
|
|
|
|
+category: 'accessing',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+return "Source search";
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRegexpListWidget)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "label\x0a\x09^ 'Source search'",
|
|
|
|
+messageSends: [],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.HLRegexpListWidget);
|
|
|
|
+
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "onSearchReferences:",
|
|
selector: "onSearchReferences:",
|
|
@@ -508,10 +543,13 @@ category: 'reactions',
|
|
fn: function (aString){
|
|
fn: function (aString){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
|
+_st(self)._selectItem_(nil);
|
|
|
|
+_st(self)._items_(_st(_st(self)._model())._regexpReferencesOf_(aString));
|
|
|
|
+_st(self)._refresh();
|
|
return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLRegexpListWidget)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLRegexpListWidget)})},
|
|
args: ["aString"],
|
|
args: ["aString"],
|
|
-source: "onSearchReferences: aString",
|
|
|
|
-messageSends: [],
|
|
|
|
|
|
+source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model regexpReferencesOf: aString).\x0a\x09self refresh",
|
|
|
|
+messageSends: ["selectItem:", "items:", "regexpReferencesOf:", "model", "refresh"],
|
|
referencedClasses: []
|
|
referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.HLRegexpListWidget);
|
|
smalltalk.HLRegexpListWidget);
|
|
@@ -519,6 +557,22 @@ smalltalk.HLRegexpListWidget);
|
|
|
|
|
|
|
|
|
|
smalltalk.addClass('HLSendersListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
|
|
smalltalk.addClass('HLSendersListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "label",
|
|
|
|
+category: 'accessing',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+return "Senders";
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLSendersListWidget)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "label\x0a\x09^ 'Senders'",
|
|
|
|
+messageSends: [],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.HLSendersListWidget);
|
|
|
|
+
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "onSearchReferences:",
|
|
selector: "onSearchReferences:",
|
|
@@ -526,17 +580,38 @@ category: 'reactions',
|
|
fn: function (aString){
|
|
fn: function (aString){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
|
+_st(self)._selectItem_(nil);
|
|
|
|
+_st(self)._items_(_st(_st(self)._model())._sendersOf_(aString));
|
|
|
|
+_st(self)._refresh();
|
|
return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLSendersListWidget)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLSendersListWidget)})},
|
|
args: ["aString"],
|
|
args: ["aString"],
|
|
-source: "onSearchReferences: aString",
|
|
|
|
-messageSends: [],
|
|
|
|
|
|
+source: "onSearchReferences: aString\x0a\x09self selectItem: nil.\x0a\x09self items: (self model sendersOf: aString).\x0a\x09self refresh",
|
|
|
|
+messageSends: ["selectItem:", "items:", "sendersOf:", "model", "refresh"],
|
|
referencedClasses: []
|
|
referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.HLSendersListWidget);
|
|
smalltalk.HLSendersListWidget);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-smalltalk.addClass('HLReferencesModel', smalltalk.HLModel, [], 'Helios-References');
|
|
|
|
|
|
+smalltalk.addClass('HLReferencesModel', smalltalk.HLModel, ['methodsCache', 'classesAndMetaclassesCache'], 'Helios-References');
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "allMethods",
|
|
|
|
+category: 'accessing',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+var $1;
|
|
|
|
+$1=_st(self)._methodsCache();
|
|
|
|
+return $1;
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"allMethods",{},smalltalk.HLReferencesModel)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "allMethods\x0a\x09^ self methodsCache",
|
|
|
|
+messageSends: ["methodsCache"],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.HLReferencesModel);
|
|
|
|
+
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "allSelectors",
|
|
selector: "allSelectors",
|
|
@@ -545,19 +620,22 @@ fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
var $1;
|
|
var $1;
|
|
-$1=_st(_st(self)._environment())._allSelectors();
|
|
|
|
|
|
+$1=_st(_st(_st(self)._allMethods())._collect_((function(each){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
|
+return _st(each)._selector();
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet();
|
|
return $1;
|
|
return $1;
|
|
}, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.HLReferencesModel)})},
|
|
}, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.HLReferencesModel)})},
|
|
args: [],
|
|
args: [],
|
|
-source: "allSelectors\x0a\x09^ self environment allSelectors",
|
|
|
|
-messageSends: ["allSelectors", "environment"],
|
|
|
|
|
|
+source: "allSelectors\x0a\x09^ (self allMethods \x0a\x09\x09collect: [ :each | each selector ])\x0a\x09\x09asSet",
|
|
|
|
+messageSends: ["asSet", "collect:", "selector", "allMethods"],
|
|
referencedClasses: []
|
|
referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.HLReferencesModel);
|
|
smalltalk.HLReferencesModel);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
-selector: "classReferencesFor:",
|
|
|
|
|
|
+selector: "classReferencesOf:",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (aString){
|
|
fn: function (aString){
|
|
var self=this;
|
|
var self=this;
|
|
@@ -578,9 +656,9 @@ return _st(references)._add_(method);
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
|
$2=references;
|
|
$2=references;
|
|
return $2;
|
|
return $2;
|
|
-}, function($ctx1) {$ctx1.fill(self,"classReferencesFor:",{aString:aString,references:references},smalltalk.HLReferencesModel)})},
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"classReferencesOf:",{aString:aString,references:references},smalltalk.HLReferencesModel)})},
|
|
args: ["aString"],
|
|
args: ["aString"],
|
|
-source: "classReferencesFor: aString\x0a\x09\x22Answer all methods referencing the class named aString\x22\x0a\x09\x0a\x09| references |\x0a\x09\x0a\x09references := OrderedCollection new.\x0a\x09\x0a\x09self classesAndMetaclasses do: [ :each |\x0a\x09\x09each methodDictionary values do: [ :method |\x0a\x09\x09\x09(method referencedClasses includes: aString) ifTrue: [\x0a\x09\x09\x09\x09references add: method ] ] ].\x0a\x09\x09\x09\x09\x0a\x09^ references",
|
|
|
|
|
|
+source: "classReferencesOf: aString\x0a\x09\x22Answer all methods referencing the class named aString\x22\x0a\x09\x0a\x09| references |\x0a\x09\x0a\x09references := OrderedCollection new.\x0a\x09\x0a\x09self classesAndMetaclasses do: [ :each |\x0a\x09\x09each methodDictionary values do: [ :method |\x0a\x09\x09\x09(method referencedClasses includes: aString) ifTrue: [\x0a\x09\x09\x09\x09references add: method ] ] ].\x0a\x09\x09\x09\x09\x0a\x09^ references",
|
|
messageSends: ["new", "do:", "ifTrue:", "add:", "includes:", "referencedClasses", "values", "methodDictionary", "classesAndMetaclasses"],
|
|
messageSends: ["new", "do:", "ifTrue:", "add:", "includes:", "referencedClasses", "values", "methodDictionary", "classesAndMetaclasses"],
|
|
referencedClasses: ["OrderedCollection"]
|
|
referencedClasses: ["OrderedCollection"]
|
|
}),
|
|
}),
|
|
@@ -592,23 +670,105 @@ selector: "classesAndMetaclasses",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
|
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $2,$3,$1;
|
|
|
|
-$1=_st(_st(_st(self)._environment())._classes())._inject_into_(_st($OrderedCollection())._new(),(function(acc,each){
|
|
|
|
-return smalltalk.withContext(function($ctx2) {
|
|
|
|
-$2=acc;
|
|
|
|
-_st($2)._add_(each);
|
|
|
|
-_st($2)._add_(_st(each)._class());
|
|
|
|
-$3=_st($2)._yourself();
|
|
|
|
-return $3;
|
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({acc:acc,each:each},$ctx1)})}));
|
|
|
|
|
|
+var $1;
|
|
|
|
+$1=_st(self)._classesAndMetaclassesCache();
|
|
return $1;
|
|
return $1;
|
|
}, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},smalltalk.HLReferencesModel)})},
|
|
}, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},smalltalk.HLReferencesModel)})},
|
|
args: [],
|
|
args: [],
|
|
-source: "classesAndMetaclasses\x0a\x09^ self environment classes \x0a\x09\x09inject: OrderedCollection new \x0a\x09\x09into: [ :acc :each |\x0a\x09\x09\x09acc \x0a\x09\x09\x09\x09add: each; \x0a\x09\x09\x09\x09add: each class;\x0a\x09\x09\x09\x09yourself ]",
|
|
|
|
-messageSends: ["inject:into:", "new", "add:", "class", "yourself", "classes", "environment"],
|
|
|
|
-referencedClasses: ["OrderedCollection"]
|
|
|
|
|
|
+source: "classesAndMetaclasses\x0a\x09^ self classesAndMetaclassesCache",
|
|
|
|
+messageSends: ["classesAndMetaclassesCache"],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.HLReferencesModel);
|
|
|
|
+
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "classesAndMetaclassesCache",
|
|
|
|
+category: 'cache',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+var $1,$2;
|
|
|
|
+$1=self["@classesAndMetaclassesCache"];
|
|
|
|
+if(($receiver = $1) == nil || $receiver == undefined){
|
|
|
|
+_st(self)._updateClassesAndMetaclassesCache();
|
|
|
|
+} else {
|
|
|
|
+$1;
|
|
|
|
+};
|
|
|
|
+$2=self["@classesAndMetaclassesCache"];
|
|
|
|
+return $2;
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"classesAndMetaclassesCache",{},smalltalk.HLReferencesModel)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "classesAndMetaclassesCache\x0a\x09classesAndMetaclassesCache ifNil: [ self updateClassesAndMetaclassesCache ].\x0a\x09\x0a\x09^ classesAndMetaclassesCache",
|
|
|
|
+messageSends: ["ifNil:", "updateClassesAndMetaclassesCache"],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.HLReferencesModel);
|
|
|
|
+
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "implementorsOf:",
|
|
|
|
+category: 'accessing',
|
|
|
|
+fn: function (aString){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+var $1;
|
|
|
|
+$1=_st(_st(self)._allMethods())._select_((function(each){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
|
+return _st(_st(each)._selector()).__eq(aString);
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
|
|
|
+return $1;
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"implementorsOf:",{aString:aString},smalltalk.HLReferencesModel)})},
|
|
|
|
+args: ["aString"],
|
|
|
|
+source: "implementorsOf: aString\x0a\x09^ self allMethods select: [ :each |\x0a\x09\x09each selector = aString ]",
|
|
|
|
+messageSends: ["select:", "=", "selector", "allMethods"],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.HLReferencesModel);
|
|
|
|
+
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "methodsCache",
|
|
|
|
+category: 'cache',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+var $1,$2;
|
|
|
|
+$1=self["@methodsCache"];
|
|
|
|
+if(($receiver = $1) == nil || $receiver == undefined){
|
|
|
|
+_st(self)._updateMethodsCache();
|
|
|
|
+} else {
|
|
|
|
+$1;
|
|
|
|
+};
|
|
|
|
+$2=self["@methodsCache"];
|
|
|
|
+return $2;
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"methodsCache",{},smalltalk.HLReferencesModel)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "methodsCache\x0a\x09methodsCache ifNil: [ self updateMethodsCache ].\x0a\x09\x0a\x09^ methodsCache",
|
|
|
|
+messageSends: ["ifNil:", "updateMethodsCache"],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.HLReferencesModel);
|
|
|
|
+
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "regexpReferencesOf:",
|
|
|
|
+category: 'accessing',
|
|
|
|
+fn: function (aString){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+var $1;
|
|
|
|
+$1=_st(_st(self)._allMethods())._select_((function(each){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
|
+return _st(_st(each)._source())._match_(aString);
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
|
|
|
+return $1;
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"regexpReferencesOf:",{aString:aString},smalltalk.HLReferencesModel)})},
|
|
|
|
+args: ["aString"],
|
|
|
|
+source: "regexpReferencesOf: aString\x0a\x09^ self allMethods select: [ :each |\x0a\x09\x09each source match: aString ]",
|
|
|
|
+messageSends: ["select:", "match:", "source", "allMethods"],
|
|
|
|
+referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.HLReferencesModel);
|
|
smalltalk.HLReferencesModel);
|
|
|
|
|
|
@@ -621,17 +781,103 @@ var self=this;
|
|
function $HLSearchReferences(){return smalltalk.HLSearchReferences||(typeof HLSearchReferences=="undefined"?nil:HLSearchReferences)}
|
|
function $HLSearchReferences(){return smalltalk.HLSearchReferences||(typeof HLSearchReferences=="undefined"?nil:HLSearchReferences)}
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
var $1,$2;
|
|
var $1,$2;
|
|
|
|
+_st(self)._updateCaches();
|
|
$1=_st($HLSearchReferences())._new();
|
|
$1=_st($HLSearchReferences())._new();
|
|
_st($1)._searchString_(aString);
|
|
_st($1)._searchString_(aString);
|
|
$2=_st($1)._yourself();
|
|
$2=_st($1)._yourself();
|
|
_st(_st(self)._announcer())._announce_($2);
|
|
_st(_st(self)._announcer())._announce_($2);
|
|
return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.HLReferencesModel)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.HLReferencesModel)})},
|
|
args: ["aString"],
|
|
args: ["aString"],
|
|
-source: "search: aString\x0a\x09self announcer announce: (HLSearchReferences new\x0a\x09\x09searchString: aString;\x0a\x09\x09yourself)",
|
|
|
|
-messageSends: ["announce:", "searchString:", "new", "yourself", "announcer"],
|
|
|
|
|
|
+source: "search: aString\x0a\x09self updateCaches.\x0a\x09\x0a\x09self announcer announce: (HLSearchReferences new\x0a\x09\x09searchString: aString;\x0a\x09\x09yourself)",
|
|
|
|
+messageSends: ["updateCaches", "announce:", "searchString:", "new", "yourself", "announcer"],
|
|
referencedClasses: ["HLSearchReferences"]
|
|
referencedClasses: ["HLSearchReferences"]
|
|
}),
|
|
}),
|
|
smalltalk.HLReferencesModel);
|
|
smalltalk.HLReferencesModel);
|
|
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "sendersOf:",
|
|
|
|
+category: 'accessing',
|
|
|
|
+fn: function (aString){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+var $1;
|
|
|
|
+$1=_st(_st(self)._allMethods())._select_((function(each){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
|
+return _st(_st(each)._messageSends())._includes_(aString);
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
|
|
|
+return $1;
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"sendersOf:",{aString:aString},smalltalk.HLReferencesModel)})},
|
|
|
|
+args: ["aString"],
|
|
|
|
+source: "sendersOf: aString\x0a\x09^ self allMethods select: [ :each |\x0a\x09\x09each messageSends includes: aString ]",
|
|
|
|
+messageSends: ["select:", "includes:", "messageSends", "allMethods"],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.HLReferencesModel);
|
|
|
|
+
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "updateCaches",
|
|
|
|
+category: 'cache',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+var $1,$2;
|
|
|
|
+$1=self;
|
|
|
|
+_st($1)._updateClassesAndMetaclassesCache();
|
|
|
|
+$2=_st($1)._updateMethodsCache();
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"updateCaches",{},smalltalk.HLReferencesModel)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "updateCaches\x0a\x09self \x0a\x09\x09updateClassesAndMetaclassesCache;\x0a\x09\x09updateMethodsCache",
|
|
|
|
+messageSends: ["updateClassesAndMetaclassesCache", "updateMethodsCache"],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.HLReferencesModel);
|
|
|
|
+
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "updateClassesAndMetaclassesCache",
|
|
|
|
+category: 'cache',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+var $1,$2;
|
|
|
|
+self["@classesAndMetaclassesCache"]=_st(_st(_st(self)._environment())._classes())._inject_into_(_st($OrderedCollection())._new(),(function(acc,each){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
|
+$1=acc;
|
|
|
|
+_st($1)._add_(each);
|
|
|
|
+_st($1)._add_(_st(each)._class());
|
|
|
|
+$2=_st($1)._yourself();
|
|
|
|
+return $2;
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({acc:acc,each:each},$ctx1)})}));
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"updateClassesAndMetaclassesCache",{},smalltalk.HLReferencesModel)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "updateClassesAndMetaclassesCache\x0a\x09classesAndMetaclassesCache := self environment classes \x0a\x09\x09inject: OrderedCollection new \x0a\x09\x09into: [ :acc :each |\x0a\x09\x09\x09acc \x0a\x09\x09\x09\x09add: each; \x0a\x09\x09\x09\x09add: each class;\x0a\x09\x09\x09\x09yourself ]",
|
|
|
|
+messageSends: ["inject:into:", "new", "add:", "class", "yourself", "classes", "environment"],
|
|
|
|
+referencedClasses: ["OrderedCollection"]
|
|
|
|
+}),
|
|
|
|
+smalltalk.HLReferencesModel);
|
|
|
|
+
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "updateMethodsCache",
|
|
|
|
+category: 'cache',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+self["@methodsCache"]=_st(_st(self)._classesAndMetaclasses())._inject_into_(_st($OrderedCollection())._new(),(function(acc,each){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
|
+return _st(acc).__comma(_st(each)._methods());
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({acc:acc,each:each},$ctx1)})}));
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsCache",{},smalltalk.HLReferencesModel)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "updateMethodsCache\x0a\x09methodsCache := self classesAndMetaclasses\x0a\x09\x09inject: OrderedCollection new\x0a\x09\x09into: [ :acc :each |\x0a\x09\x09\x09acc, each methods ]",
|
|
|
|
+messageSends: ["inject:into:", "new", ",", "methods", "classesAndMetaclasses"],
|
|
|
|
+referencedClasses: ["OrderedCollection"]
|
|
|
|
+}),
|
|
|
|
+smalltalk.HLReferencesModel);
|
|
|
|
+
|
|
|
|
|
|
|
|
|