Browse Source

Helios:
- More commands
- source code widgets refactorings

Nicolas Petton 11 years ago
parent
commit
0517656ced

+ 26 - 0
js/Helios-Browser.deploy.js

@@ -2460,6 +2460,21 @@ return self}, function($ctx1) {$ctx1.fill(self,"removeMethod",{},smalltalk.HLBro
 messageSends: ["ifTrue:", "removeMethod:", "selectedMethod", "environment", "confirm:", ",", "selector", "name", "methodClass", "manager"]}),
 smalltalk.HLBrowserModel);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "removeProtocol",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(self)._manager())._confirm_(_st("Do you REALLY want to remove protocol ").__comma(_st(self)._selectedProtocol()));
+if(smalltalk.assert($1)){
+_st(_st(self)._environment())._removeProtocol_from_(_st(self)._selectedProtocol(),_st(self)._selectedClass());
+};
+return self}, function($ctx1) {$ctx1.fill(self,"removeProtocol",{},smalltalk.HLBrowserModel)})},
+messageSends: ["ifTrue:", "removeProtocol:from:", "selectedProtocol", "selectedClass", "environment", "confirm:", ",", "manager"]}),
+smalltalk.HLBrowserModel);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "renameClassTo:",
@@ -2471,6 +2486,17 @@ return self}, function($ctx1) {$ctx1.fill(self,"renameClassTo:",{aClassName:aCla
 messageSends: ["renameClass:to:", "theNonMetaClass", "selectedClass", "environment"]}),
 smalltalk.HLBrowserModel);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renameProtocolTo:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._environment())._renameProtocol_to_in_(_st(self)._selectedProtocol(),aString,_st(self)._selectedClass());
+return self}, function($ctx1) {$ctx1.fill(self,"renameProtocolTo:",{aString:aString},smalltalk.HLBrowserModel)})},
+messageSends: ["renameProtocol:to:in:", "selectedProtocol", "selectedClass", "environment"]}),
+smalltalk.HLBrowserModel);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "save:",

+ 36 - 0
js/Helios-Browser.js

@@ -3170,6 +3170,26 @@ referencedClasses: []
 }),
 smalltalk.HLBrowserModel);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "removeProtocol",
+category: 'commands actions',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(self)._manager())._confirm_(_st("Do you REALLY want to remove protocol ").__comma(_st(self)._selectedProtocol()));
+if(smalltalk.assert($1)){
+_st(_st(self)._environment())._removeProtocol_from_(_st(self)._selectedProtocol(),_st(self)._selectedClass());
+};
+return self}, function($ctx1) {$ctx1.fill(self,"removeProtocol",{},smalltalk.HLBrowserModel)})},
+args: [],
+source: "removeProtocol\x0a\x09(self manager confirm: 'Do you REALLY want to remove protocol ', self selectedProtocol)\x0a\x09\x09ifTrue: [ self environment \x0a\x09\x09\x09removeProtocol: self selectedProtocol \x0a\x09\x09\x09from: self selectedClass ]",
+messageSends: ["ifTrue:", "removeProtocol:from:", "selectedProtocol", "selectedClass", "environment", "confirm:", ",", "manager"],
+referencedClasses: []
+}),
+smalltalk.HLBrowserModel);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "renameClassTo:",
@@ -3186,6 +3206,22 @@ referencedClasses: []
 }),
 smalltalk.HLBrowserModel);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renameProtocolTo:",
+category: 'commands actions',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._environment())._renameProtocol_to_in_(_st(self)._selectedProtocol(),aString,_st(self)._selectedClass());
+return self}, function($ctx1) {$ctx1.fill(self,"renameProtocolTo:",{aString:aString},smalltalk.HLBrowserModel)})},
+args: ["aString"],
+source: "renameProtocolTo: aString\x0a\x09self environment \x0a\x09\x09renameProtocol: self selectedProtocol\x0a\x09\x09to: aString\x0a\x09\x09in: self selectedClass",
+messageSends: ["renameProtocol:to:in:", "selectedProtocol", "selectedClass", "environment"],
+referencedClasses: []
+}),
+smalltalk.HLBrowserModel);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "save:",

+ 230 - 0
js/Helios-Commands-Browser.deploy.js

@@ -329,6 +329,19 @@ return "Classes";
 messageSends: []}),
 smalltalk.HLCopyClassCommand);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "defaultInput",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(_st(self)._model())._selectedClass())._name();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"defaultInput",{},smalltalk.HLCopyClassCommand)})},
+messageSends: ["name", "selectedClass", "model"]}),
+smalltalk.HLCopyClassCommand);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "displayLabel",
@@ -518,6 +531,33 @@ smalltalk.HLFindClassCommand.klass);
 
 
 smalltalk.addClass('HLFindReferencesCommand', smalltalk.HLFindCommand, [], 'Helios-Commands-Browser');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "defaultInput",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$3,$1;
+$2=_st(_st(self)._model())._selectedMethod();
+if(($receiver = $2) == nil || $receiver == undefined){
+$3=_st(_st(self)._model())._selectedClass();
+if(($receiver = $3) == nil || $receiver == undefined){
+$1="";
+} else {
+var class_;
+class_=$receiver;
+$1=_st(class_)._name();
+};
+} else {
+var method;
+method=$receiver;
+$1=_st(method)._selector();
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"defaultInput",{},smalltalk.HLFindReferencesCommand)})},
+messageSends: ["ifNil:ifNotNil:", "name", "selectedClass", "model", "selector", "selectedMethod"]}),
+smalltalk.HLFindReferencesCommand);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "displayLabel",
@@ -1172,6 +1212,77 @@ messageSends: []}),
 smalltalk.HLRemoveMethodCommand.klass);
 
 
+smalltalk.addClass('HLRemoveProtocolCommand', smalltalk.HLRemoveCommand, [], 'Helios-Commands-Browser');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "category",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Protocols";
+}, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.HLRemoveProtocolCommand)})},
+messageSends: []}),
+smalltalk.HLRemoveProtocolCommand);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "execute",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._model())._removeProtocol();
+return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLRemoveProtocolCommand)})},
+messageSends: ["removeProtocol", "model"]}),
+smalltalk.HLRemoveProtocolCommand);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "isActive",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(_st(self)._model())._selectedProtocol())._notNil();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLRemoveProtocolCommand)})},
+messageSends: ["notNil", "selectedProtocol", "model"]}),
+smalltalk.HLRemoveProtocolCommand);
+
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "key",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "t";
+}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLRemoveProtocolCommand.klass)})},
+messageSends: []}),
+smalltalk.HLRemoveProtocolCommand.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "label",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Protocol";
+}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRemoveProtocolCommand.klass)})},
+messageSends: []}),
+smalltalk.HLRemoveProtocolCommand.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "menuLabel",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Remove protocol";
+}, function($ctx1) {$ctx1.fill(self,"menuLabel",{},smalltalk.HLRemoveProtocolCommand.klass)})},
+messageSends: []}),
+smalltalk.HLRemoveProtocolCommand.klass);
+
+
 smalltalk.addClass('HLRenameCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands-Browser');
 
 smalltalk.addMethod(
@@ -1209,6 +1320,19 @@ return "Classes";
 messageSends: []}),
 smalltalk.HLRenameClassCommand);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "defaultInput",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(_st(self)._model())._selectedClass())._name();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"defaultInput",{},smalltalk.HLRenameClassCommand)})},
+messageSends: ["name", "selectedClass", "model"]}),
+smalltalk.HLRenameClassCommand);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "displayLabel",
@@ -1290,6 +1414,112 @@ messageSends: []}),
 smalltalk.HLRenameClassCommand.klass);
 
 
+smalltalk.addClass('HLRenameProtocolCommand', smalltalk.HLRenameCommand, [], 'Helios-Commands-Browser');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "category",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Protocols";
+}, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.HLRenameProtocolCommand)})},
+messageSends: []}),
+smalltalk.HLRenameProtocolCommand);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "defaultInput",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(self)._model())._selectedProtocol();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"defaultInput",{},smalltalk.HLRenameProtocolCommand)})},
+messageSends: ["selectedProtocol", "model"]}),
+smalltalk.HLRenameProtocolCommand);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "displayLabel",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Rename protocol to:";
+}, function($ctx1) {$ctx1.fill(self,"displayLabel",{},smalltalk.HLRenameProtocolCommand)})},
+messageSends: []}),
+smalltalk.HLRenameProtocolCommand);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "execute",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._model())._renameProtocolTo_(_st(self)._input());
+return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLRenameProtocolCommand)})},
+messageSends: ["renameProtocolTo:", "input", "model"]}),
+smalltalk.HLRenameProtocolCommand);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "isActive",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(_st(self)._model())._selectedProtocol())._notNil();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLRenameProtocolCommand)})},
+messageSends: ["notNil", "selectedProtocol", "model"]}),
+smalltalk.HLRenameProtocolCommand);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "isInputRequired",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return true;
+}, function($ctx1) {$ctx1.fill(self,"isInputRequired",{},smalltalk.HLRenameProtocolCommand)})},
+messageSends: []}),
+smalltalk.HLRenameProtocolCommand);
+
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "key",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "t";
+}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLRenameProtocolCommand.klass)})},
+messageSends: []}),
+smalltalk.HLRenameProtocolCommand.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "label",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Protocol";
+}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRenameProtocolCommand.klass)})},
+messageSends: []}),
+smalltalk.HLRenameProtocolCommand.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "menuLabel",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Rename protocol...";
+}, function($ctx1) {$ctx1.fill(self,"menuLabel",{},smalltalk.HLRenameProtocolCommand.klass)})},
+messageSends: []}),
+smalltalk.HLRenameProtocolCommand.klass);
+
+
 smalltalk.addClass('HLToggleCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands-Browser');
 
 smalltalk.addMethod(

+ 320 - 0
js/Helios-Commands-Browser.js

@@ -464,6 +464,24 @@ referencedClasses: []
 }),
 smalltalk.HLCopyClassCommand);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "defaultInput",
+category: 'defaults',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(_st(self)._model())._selectedClass())._name();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"defaultInput",{},smalltalk.HLCopyClassCommand)})},
+args: [],
+source: "defaultInput\x0a\x09^ self model selectedClass name",
+messageSends: ["name", "selectedClass", "model"],
+referencedClasses: []
+}),
+smalltalk.HLCopyClassCommand);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "displayLabel",
@@ -733,6 +751,38 @@ smalltalk.HLFindClassCommand.klass);
 
 
 smalltalk.addClass('HLFindReferencesCommand', smalltalk.HLFindCommand, [], 'Helios-Commands-Browser');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "defaultInput",
+category: 'defaults',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$3,$1;
+$2=_st(_st(self)._model())._selectedMethod();
+if(($receiver = $2) == nil || $receiver == undefined){
+$3=_st(_st(self)._model())._selectedClass();
+if(($receiver = $3) == nil || $receiver == undefined){
+$1="";
+} else {
+var class_;
+class_=$receiver;
+$1=_st(class_)._name();
+};
+} else {
+var method;
+method=$receiver;
+$1=_st(method)._selector();
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"defaultInput",{},smalltalk.HLFindReferencesCommand)})},
+args: [],
+source: "defaultInput\x0a\x09^ self model selectedMethod \x0a\x09\x09ifNil: [\x0a\x09\x09\x09self model selectedClass\x0a\x09\x09\x09\x09ifNil: [ '' ]\x0a\x09\x09\x09\x09ifNotNil: [ :class | class name ] ]\x0a\x09\x09ifNotNil: [ :method | method selector ] ",
+messageSends: ["ifNil:ifNotNil:", "name", "selectedClass", "model", "selector", "selectedMethod"],
+referencedClasses: []
+}),
+smalltalk.HLFindReferencesCommand);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "displayLabel",
@@ -1662,6 +1712,107 @@ referencedClasses: []
 smalltalk.HLRemoveMethodCommand.klass);
 
 
+smalltalk.addClass('HLRemoveProtocolCommand', smalltalk.HLRemoveCommand, [], 'Helios-Commands-Browser');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "category",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Protocols";
+}, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.HLRemoveProtocolCommand)})},
+args: [],
+source: "category\x0a\x09^ 'Protocols'",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLRemoveProtocolCommand);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "execute",
+category: 'executing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._model())._removeProtocol();
+return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLRemoveProtocolCommand)})},
+args: [],
+source: "execute\x0a\x09self model removeProtocol",
+messageSends: ["removeProtocol", "model"],
+referencedClasses: []
+}),
+smalltalk.HLRemoveProtocolCommand);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "isActive",
+category: 'testing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(_st(self)._model())._selectedProtocol())._notNil();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLRemoveProtocolCommand)})},
+args: [],
+source: "isActive\x0a\x09^ self model selectedProtocol notNil",
+messageSends: ["notNil", "selectedProtocol", "model"],
+referencedClasses: []
+}),
+smalltalk.HLRemoveProtocolCommand);
+
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "key",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "t";
+}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLRemoveProtocolCommand.klass)})},
+args: [],
+source: "key\x0a\x09^ 't'",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLRemoveProtocolCommand.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "label",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Protocol";
+}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRemoveProtocolCommand.klass)})},
+args: [],
+source: "label\x0a\x09^ 'Protocol'",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLRemoveProtocolCommand.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "menuLabel",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Remove protocol";
+}, function($ctx1) {$ctx1.fill(self,"menuLabel",{},smalltalk.HLRemoveProtocolCommand.klass)})},
+args: [],
+source: "menuLabel\x0a\x09^ 'Remove protocol'",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLRemoveProtocolCommand.klass);
+
+
 smalltalk.addClass('HLRenameCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands-Browser');
 
 smalltalk.addMethod(
@@ -1714,6 +1865,24 @@ referencedClasses: []
 }),
 smalltalk.HLRenameClassCommand);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "defaultInput",
+category: 'defaults',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(_st(self)._model())._selectedClass())._name();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"defaultInput",{},smalltalk.HLRenameClassCommand)})},
+args: [],
+source: "defaultInput\x0a\x09^ self model selectedClass name",
+messageSends: ["name", "selectedClass", "model"],
+referencedClasses: []
+}),
+smalltalk.HLRenameClassCommand);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "displayLabel",
@@ -1830,6 +1999,157 @@ referencedClasses: []
 smalltalk.HLRenameClassCommand.klass);
 
 
+smalltalk.addClass('HLRenameProtocolCommand', smalltalk.HLRenameCommand, [], 'Helios-Commands-Browser');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "category",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Protocols";
+}, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.HLRenameProtocolCommand)})},
+args: [],
+source: "category\x0a\x09^ 'Protocols'",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLRenameProtocolCommand);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "defaultInput",
+category: 'defaults',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(self)._model())._selectedProtocol();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"defaultInput",{},smalltalk.HLRenameProtocolCommand)})},
+args: [],
+source: "defaultInput\x0a\x09^ self model selectedProtocol",
+messageSends: ["selectedProtocol", "model"],
+referencedClasses: []
+}),
+smalltalk.HLRenameProtocolCommand);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "displayLabel",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Rename protocol to:";
+}, function($ctx1) {$ctx1.fill(self,"displayLabel",{},smalltalk.HLRenameProtocolCommand)})},
+args: [],
+source: "displayLabel\x0a\x09^ 'Rename protocol to:'",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLRenameProtocolCommand);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "execute",
+category: 'executing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._model())._renameProtocolTo_(_st(self)._input());
+return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLRenameProtocolCommand)})},
+args: [],
+source: "execute\x0a\x09self model renameProtocolTo: self input",
+messageSends: ["renameProtocolTo:", "input", "model"],
+referencedClasses: []
+}),
+smalltalk.HLRenameProtocolCommand);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "isActive",
+category: 'testing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(_st(self)._model())._selectedProtocol())._notNil();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLRenameProtocolCommand)})},
+args: [],
+source: "isActive\x0a\x09^ self model selectedProtocol notNil",
+messageSends: ["notNil", "selectedProtocol", "model"],
+referencedClasses: []
+}),
+smalltalk.HLRenameProtocolCommand);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "isInputRequired",
+category: 'testing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return true;
+}, function($ctx1) {$ctx1.fill(self,"isInputRequired",{},smalltalk.HLRenameProtocolCommand)})},
+args: [],
+source: "isInputRequired\x0a\x09^ true",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLRenameProtocolCommand);
+
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "key",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "t";
+}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLRenameProtocolCommand.klass)})},
+args: [],
+source: "key\x0a\x09^ 't'",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLRenameProtocolCommand.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "label",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Protocol";
+}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRenameProtocolCommand.klass)})},
+args: [],
+source: "label\x0a\x09^ 'Protocol'",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLRenameProtocolCommand.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "menuLabel",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Rename protocol...";
+}, function($ctx1) {$ctx1.fill(self,"menuLabel",{},smalltalk.HLRenameProtocolCommand.klass)})},
+args: [],
+source: "menuLabel\x0a\x09^ 'Rename protocol...'",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLRenameProtocolCommand.klass);
+
+
 smalltalk.addClass('HLToggleCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands-Browser');
 
 smalltalk.addMethod(

+ 11 - 0
js/Helios-Commands-Core.deploy.js

@@ -60,6 +60,17 @@ return self}, function($ctx1) {$ctx1.fill(self,"commandError:",{aString:aString}
 messageSends: ["error:"]}),
 smalltalk.HLCommand);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "defaultInput",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "";
+}, function($ctx1) {$ctx1.fill(self,"defaultInput",{},smalltalk.HLCommand)})},
+messageSends: []}),
+smalltalk.HLCommand);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "documentation",

+ 16 - 0
js/Helios-Commands-Core.js

@@ -80,6 +80,22 @@ referencedClasses: []
 }),
 smalltalk.HLCommand);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "defaultInput",
+category: 'defaults',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "";
+}, function($ctx1) {$ctx1.fill(self,"defaultInput",{},smalltalk.HLCommand)})},
+args: [],
+source: "defaultInput\x0a\x09^ ''",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLCommand);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "documentation",

+ 34 - 3
js/Helios-KeyBindings.deploy.js

@@ -240,6 +240,7 @@ var $2,$3,$4,$5,$1;
 $2=_st($HLBindingInput())._new();
 _st($2)._label_(_st(_st(self)._command())._inputLabel());
 _st($2)._ghostText_(_st(_st(self)._command())._displayLabel());
+_st($2)._defaultValue_(_st(_st(self)._command())._defaultInput());
 _st($2)._inputCompletion_(_st(_st(self)._command())._inputCompletion());
 _st($2)._callback_((function(val){
 return smalltalk.withContext(function($ctx2) {
@@ -252,7 +253,7 @@ $5=_st($2)._yourself();
 $1=$5;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"inputBinding",{},smalltalk.HLBindingAction)})},
-messageSends: ["label:", "inputLabel", "command", "new", "ghostText:", "displayLabel", "inputCompletion:", "inputCompletion", "callback:", "input:", "execute", "yourself"]}),
+messageSends: ["label:", "inputLabel", "command", "new", "ghostText:", "displayLabel", "defaultValue:", "defaultInput", "inputCompletion:", "inputCompletion", "callback:", "input:", "execute", "yourself"]}),
 smalltalk.HLBindingAction);
 
 smalltalk.addMethod(
@@ -477,7 +478,7 @@ smalltalk.HLBindingGroup);
 
 
 
-smalltalk.addClass('HLBindingInput', smalltalk.HLBinding, ['input', 'callback', 'status', 'wrapper', 'binder', 'ghostText', 'isFinal', 'message', 'messageTag', 'inputCompletion'], 'Helios-KeyBindings');
+smalltalk.addClass('HLBindingInput', smalltalk.HLBinding, ['input', 'callback', 'status', 'wrapper', 'binder', 'ghostText', 'isFinal', 'message', 'messageTag', 'inputCompletion', 'defaultValue'], 'Helios-KeyBindings');
 smalltalk.addMethod(
 smalltalk.method({
 selector: "applyOn:",
@@ -550,6 +551,35 @@ return self}, function($ctx1) {$ctx1.fill(self,"clearStatus",{},smalltalk.HLBind
 messageSends: ["status:", "message:", "refresh"]}),
 smalltalk.HLBindingInput);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "defaultValue",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@defaultValue"];
+if(($receiver = $2) == nil || $receiver == undefined){
+$1="";
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"defaultValue",{},smalltalk.HLBindingInput)})},
+messageSends: ["ifNil:"]}),
+smalltalk.HLBindingInput);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "defaultValue:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@defaultValue"]=aString;
+return self}, function($ctx1) {$ctx1.fill(self,"defaultValue:",{aString:aString},smalltalk.HLBindingInput)})},
+messageSends: []}),
+smalltalk.HLBindingInput);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "errorStatus",
@@ -777,6 +807,7 @@ $3=_st($2)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
 $4=_st(html)._input();
 _st($4)._placeholder_(_st(self)._ghostText());
+_st($4)._value_(_st(self)._defaultValue());
 $5=_st($4)._yourself();
 self["@input"]=$5;
 self["@input"];
@@ -793,7 +824,7 @@ return smalltalk.withContext(function($ctx2) {
 return _st(_st(self["@input"])._asJQuery())._focus();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithTimeout_((10));
 return self}, function($ctx1) {$ctx1.fill(self,"renderOn:html:",{aBinder:aBinder,html:html},smalltalk.HLBindingInput)})},
-messageSends: ["ifNil:", "span", "class:", "status", "with:", "placeholder:", "ghostText", "input", "yourself", "typeahead:", "->", "inputCompletion", "asJQuery", "message", "valueWithTimeout:", "focus"]}),
+messageSends: ["ifNil:", "span", "class:", "status", "with:", "placeholder:", "ghostText", "input", "value:", "defaultValue", "yourself", "typeahead:", "->", "inputCompletion", "asJQuery", "message", "valueWithTimeout:", "focus"]}),
 smalltalk.HLBindingInput);
 
 smalltalk.addMethod(

+ 46 - 5
js/Helios-KeyBindings.js

@@ -326,6 +326,7 @@ var $2,$3,$4,$5,$1;
 $2=_st($HLBindingInput())._new();
 _st($2)._label_(_st(_st(self)._command())._inputLabel());
 _st($2)._ghostText_(_st(_st(self)._command())._displayLabel());
+_st($2)._defaultValue_(_st(_st(self)._command())._defaultInput());
 _st($2)._inputCompletion_(_st(_st(self)._command())._inputCompletion());
 _st($2)._callback_((function(val){
 return smalltalk.withContext(function($ctx2) {
@@ -339,8 +340,8 @@ $1=$5;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"inputBinding",{},smalltalk.HLBindingAction)})},
 args: [],
-source: "inputBinding\x0a\x09^ HLBindingInput new\x0a\x09\x09label: self command inputLabel;\x0a\x09\x09ghostText: self command displayLabel;\x0a\x09\x09inputCompletion: self command inputCompletion;\x0a\x09\x09callback: [ :val | \x0a\x09\x09\x09self command \x0a\x09\x09\x09\x09input: val;\x0a\x09\x09\x09\x09execute ];\x0a\x09\x09yourself",
-messageSends: ["label:", "inputLabel", "command", "new", "ghostText:", "displayLabel", "inputCompletion:", "inputCompletion", "callback:", "input:", "execute", "yourself"],
+source: "inputBinding\x0a\x09^ HLBindingInput new\x0a\x09\x09label: self command inputLabel;\x0a\x09\x09ghostText: self command displayLabel;\x0a\x09\x09defaultValue: self command defaultInput;\x0a\x09\x09inputCompletion: self command inputCompletion;\x0a\x09\x09callback: [ :val | \x0a\x09\x09\x09self command \x0a\x09\x09\x09\x09input: val;\x0a\x09\x09\x09\x09execute ];\x0a\x09\x09yourself",
+messageSends: ["label:", "inputLabel", "command", "new", "ghostText:", "displayLabel", "defaultValue:", "defaultInput", "inputCompletion:", "inputCompletion", "callback:", "input:", "execute", "yourself"],
 referencedClasses: ["HLBindingInput"]
 }),
 smalltalk.HLBindingAction);
@@ -637,7 +638,7 @@ smalltalk.HLBindingGroup);
 
 
 
-smalltalk.addClass('HLBindingInput', smalltalk.HLBinding, ['input', 'callback', 'status', 'wrapper', 'binder', 'ghostText', 'isFinal', 'message', 'messageTag', 'inputCompletion'], 'Helios-KeyBindings');
+smalltalk.addClass('HLBindingInput', smalltalk.HLBinding, ['input', 'callback', 'status', 'wrapper', 'binder', 'ghostText', 'isFinal', 'message', 'messageTag', 'inputCompletion', 'defaultValue'], 'Helios-KeyBindings');
 smalltalk.addMethod(
 smalltalk.method({
 selector: "applyOn:",
@@ -735,6 +736,45 @@ referencedClasses: []
 }),
 smalltalk.HLBindingInput);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "defaultValue",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@defaultValue"];
+if(($receiver = $2) == nil || $receiver == undefined){
+$1="";
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"defaultValue",{},smalltalk.HLBindingInput)})},
+args: [],
+source: "defaultValue\x0a\x09^ defaultValue ifNil: [ '' ]",
+messageSends: ["ifNil:"],
+referencedClasses: []
+}),
+smalltalk.HLBindingInput);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "defaultValue:",
+category: 'accessing',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@defaultValue"]=aString;
+return self}, function($ctx1) {$ctx1.fill(self,"defaultValue:",{aString:aString},smalltalk.HLBindingInput)})},
+args: ["aString"],
+source: "defaultValue: aString\x0a\x09defaultValue := aString",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLBindingInput);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "errorStatus",
@@ -1033,6 +1073,7 @@ $3=_st($2)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
 $4=_st(html)._input();
 _st($4)._placeholder_(_st(self)._ghostText());
+_st($4)._value_(_st(self)._defaultValue());
 $5=_st($4)._yourself();
 self["@input"]=$5;
 self["@input"];
@@ -1050,8 +1091,8 @@ return _st(_st(self["@input"])._asJQuery())._focus();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithTimeout_((10));
 return self}, function($ctx1) {$ctx1.fill(self,"renderOn:html:",{aBinder:aBinder,html:html},smalltalk.HLBindingInput)})},
 args: ["aBinder", "html"],
-source: "renderOn: aBinder html: html\x0a\x09binder := aBinder.\x0a\x09wrapper ifNil: [ wrapper := html span ].\x0a\x09\x0a\x09wrapper \x0a\x09\x09class: self status;\x0a\x09\x09with: [\x0a\x09\x09\x09input := html input\x0a\x09\x09\x09\x09placeholder: self ghostText;\x0a\x09\x09\x09\x09yourself.\x0a\x09\x09\x09input asJQuery \x0a\x09\x09\x09\x09typeahead: #{ 'source' -> self inputCompletion }.\x0a\x09\x09\x09messageTag := (html span\x0a\x09\x09\x09\x09class: 'help-inline';\x0a\x09\x09\x09\x09with: self message;\x0a\x09\x09\x09\x09yourself) ].\x0a\x09\x0a\x09\x22Evaluate with a timeout to ensure focus.\x0a\x09Commands can be executed from a menu, clicking on the menu to\x0a\x09evaluate the command would give it the focus otherwise\x22\x0a\x09\x0a\x09[ input asJQuery focus ] valueWithTimeout: 10",
-messageSends: ["ifNil:", "span", "class:", "status", "with:", "placeholder:", "ghostText", "input", "yourself", "typeahead:", "->", "inputCompletion", "asJQuery", "message", "valueWithTimeout:", "focus"],
+source: "renderOn: aBinder html: html\x0a\x09binder := aBinder.\x0a\x09wrapper ifNil: [ wrapper := html span ].\x0a\x0a\x09wrapper \x0a\x09\x09class: self status;\x0a\x09\x09with: [\x0a\x09\x09\x09input := html input\x0a\x09\x09\x09\x09placeholder: self ghostText;\x0a\x09\x09\x09\x09value: self defaultValue;\x0a\x09\x09\x09\x09yourself.\x0a\x09\x09\x09input asJQuery \x0a\x09\x09\x09\x09typeahead: #{ 'source' -> self inputCompletion }.\x0a\x09\x09\x09messageTag := (html span\x0a\x09\x09\x09\x09class: 'help-inline';\x0a\x09\x09\x09\x09with: self message;\x0a\x09\x09\x09\x09yourself) ].\x0a\x09\x0a\x09\x22Evaluate with a timeout to ensure focus.\x0a\x09Commands can be executed from a menu, clicking on the menu to\x0a\x09evaluate the command would give it the focus otherwise\x22\x0a\x09\x0a\x09[ input asJQuery focus ] valueWithTimeout: 10",
+messageSends: ["ifNil:", "span", "class:", "status", "with:", "placeholder:", "ghostText", "input", "value:", "defaultValue", "yourself", "typeahead:", "->", "inputCompletion", "asJQuery", "message", "valueWithTimeout:", "focus"],
 referencedClasses: []
 }),
 smalltalk.HLBindingInput);

+ 208 - 22
js/Helios-References.deploy.js

@@ -354,54 +354,109 @@ fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 _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();
 return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLClassReferencesListWidget)})},
-messageSends: ["selectItem:", "items:", "classReferencesFor:", "model", "refresh"]}),
+messageSends: ["selectItem:", "items:", "classReferencesOf:", "model", "refresh"]}),
 smalltalk.HLClassReferencesListWidget);
 
 
 
 smalltalk.addClass('HLImplementorsListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "label",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Implementors";
+}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLImplementorsListWidget)})},
+messageSends: []}),
+smalltalk.HLImplementorsListWidget);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "onSearchReferences:",
 fn: function (aString){
 var self=this;
 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)})},
-messageSends: []}),
+messageSends: ["selectItem:", "items:", "implementorsOf:", "model", "refresh"]}),
 smalltalk.HLImplementorsListWidget);
 
 
 
 smalltalk.addClass('HLRegexpListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "label",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Source search";
+}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRegexpListWidget)})},
+messageSends: []}),
+smalltalk.HLRegexpListWidget);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "onSearchReferences:",
 fn: function (aString){
 var self=this;
 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)})},
-messageSends: []}),
+messageSends: ["selectItem:", "items:", "regexpReferencesOf:", "model", "refresh"]}),
 smalltalk.HLRegexpListWidget);
 
 
 
 smalltalk.addClass('HLSendersListWidget', smalltalk.HLReferencesListWidget, [], 'Helios-References');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "label",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Senders";
+}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLSendersListWidget)})},
+messageSends: []}),
+smalltalk.HLSendersListWidget);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "onSearchReferences:",
 fn: function (aString){
 var self=this;
 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)})},
-messageSends: []}),
+messageSends: ["selectItem:", "items:", "sendersOf:", "model", "refresh"]}),
 smalltalk.HLSendersListWidget);
 
 
 
-smalltalk.addClass('HLReferencesModel', smalltalk.HLModel, [], 'Helios-References');
+smalltalk.addClass('HLReferencesModel', smalltalk.HLModel, ['methodsCache', 'classesAndMetaclassesCache'], 'Helios-References');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "allMethods",
+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)})},
+messageSends: ["methodsCache"]}),
+smalltalk.HLReferencesModel);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "allSelectors",
@@ -409,15 +464,18 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 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;
 }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.HLReferencesModel)})},
-messageSends: ["allSelectors", "environment"]}),
+messageSends: ["asSet", "collect:", "selector", "allMethods"]}),
 smalltalk.HLReferencesModel);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "classReferencesFor:",
+selector: "classReferencesOf:",
 fn: function (aString){
 var self=this;
 var references;
@@ -437,7 +495,7 @@ return _st(references)._add_(method);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
 $2=references;
 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)})},
 messageSends: ["new", "do:", "ifTrue:", "add:", "includes:", "referencedClasses", "values", "methodDictionary", "classesAndMetaclasses"]}),
 smalltalk.HLReferencesModel);
 
@@ -446,20 +504,82 @@ smalltalk.method({
 selector: "classesAndMetaclasses",
 fn: function (){
 var self=this;
-function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 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;
 }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},smalltalk.HLReferencesModel)})},
-messageSends: ["inject:into:", "new", "add:", "class", "yourself", "classes", "environment"]}),
+messageSends: ["classesAndMetaclassesCache"]}),
+smalltalk.HLReferencesModel);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "classesAndMetaclassesCache",
+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)})},
+messageSends: ["ifNil:", "updateClassesAndMetaclassesCache"]}),
+smalltalk.HLReferencesModel);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "implementorsOf:",
+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)})},
+messageSends: ["select:", "=", "selector", "allMethods"]}),
+smalltalk.HLReferencesModel);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "methodsCache",
+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)})},
+messageSends: ["ifNil:", "updateMethodsCache"]}),
+smalltalk.HLReferencesModel);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "regexpReferencesOf:",
+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)})},
+messageSends: ["select:", "match:", "source", "allMethods"]}),
 smalltalk.HLReferencesModel);
 
 smalltalk.addMethod(
@@ -470,12 +590,78 @@ var self=this;
 function $HLSearchReferences(){return smalltalk.HLSearchReferences||(typeof HLSearchReferences=="undefined"?nil:HLSearchReferences)}
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2;
+_st(self)._updateCaches();
 $1=_st($HLSearchReferences())._new();
 _st($1)._searchString_(aString);
 $2=_st($1)._yourself();
 _st(_st(self)._announcer())._announce_($2);
 return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.HLReferencesModel)})},
-messageSends: ["announce:", "searchString:", "new", "yourself", "announcer"]}),
+messageSends: ["updateCaches", "announce:", "searchString:", "new", "yourself", "announcer"]}),
+smalltalk.HLReferencesModel);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "sendersOf:",
+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)})},
+messageSends: ["select:", "includes:", "messageSends", "allMethods"]}),
+smalltalk.HLReferencesModel);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "updateCaches",
+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)})},
+messageSends: ["updateClassesAndMetaclassesCache", "updateMethodsCache"]}),
+smalltalk.HLReferencesModel);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "updateClassesAndMetaclassesCache",
+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)})},
+messageSends: ["inject:into:", "new", "add:", "class", "yourself", "classes", "environment"]}),
+smalltalk.HLReferencesModel);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "updateMethodsCache",
+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)})},
+messageSends: ["inject:into:", "new", ",", "methods", "classesAndMetaclasses"]}),
 smalltalk.HLReferencesModel);
 
 

+ 277 - 31
js/Helios-References.js

@@ -470,12 +470,12 @@ fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 _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();
 return self}, function($ctx1) {$ctx1.fill(self,"onSearchReferences:",{aString:aString},smalltalk.HLClassReferencesListWidget)})},
 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: []
 }),
 smalltalk.HLClassReferencesListWidget);
@@ -483,6 +483,22 @@ smalltalk.HLClassReferencesListWidget);
 
 
 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.method({
 selector: "onSearchReferences:",
@@ -490,10 +506,13 @@ category: 'reactions',
 fn: function (aString){
 var self=this;
 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)})},
 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: []
 }),
 smalltalk.HLImplementorsListWidget);
@@ -501,6 +520,22 @@ smalltalk.HLImplementorsListWidget);
 
 
 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.method({
 selector: "onSearchReferences:",
@@ -508,10 +543,13 @@ category: 'reactions',
 fn: function (aString){
 var self=this;
 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)})},
 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: []
 }),
 smalltalk.HLRegexpListWidget);
@@ -519,6 +557,22 @@ smalltalk.HLRegexpListWidget);
 
 
 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.method({
 selector: "onSearchReferences:",
@@ -526,17 +580,38 @@ category: 'reactions',
 fn: function (aString){
 var self=this;
 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)})},
 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: []
 }),
 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.method({
 selector: "allSelectors",
@@ -545,19 +620,22 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 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;
 }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.HLReferencesModel)})},
 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: []
 }),
 smalltalk.HLReferencesModel);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "classReferencesFor:",
+selector: "classReferencesOf:",
 category: 'accessing',
 fn: function (aString){
 var self=this;
@@ -578,9 +656,9 @@ return _st(references)._add_(method);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
 $2=references;
 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"],
-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"],
 referencedClasses: ["OrderedCollection"]
 }),
@@ -592,23 +670,105 @@ selector: "classesAndMetaclasses",
 category: 'accessing',
 fn: function (){
 var self=this;
-function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 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;
 }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},smalltalk.HLReferencesModel)})},
 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);
 
@@ -621,17 +781,103 @@ var self=this;
 function $HLSearchReferences(){return smalltalk.HLSearchReferences||(typeof HLSearchReferences=="undefined"?nil:HLSearchReferences)}
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2;
+_st(self)._updateCaches();
 $1=_st($HLSearchReferences())._new();
 _st($1)._searchString_(aString);
 $2=_st($1)._yourself();
 _st(_st(self)._announcer())._announce_($2);
 return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.HLReferencesModel)})},
 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"]
 }),
 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);
+
 
 

+ 82 - 49
js/Helios-Workspace.deploy.js

@@ -792,70 +792,123 @@ messageSends: ["variableHintFor:token:", "at:"]}),
 smalltalk.HLCodeWidget.klass);
 
 
-smalltalk.addClass('HLSourceCodeWidget', smalltalk.HLCodeWidget, ['browserModel', 'methodContents'], 'Helios-Workspace');
+smalltalk.addClass('HLNavigationCodeWidget', smalltalk.HLCodeWidget, ['methodContents'], 'Helios-Workspace');
 smalltalk.addMethod(
 smalltalk.method({
-selector: "browserModel",
+selector: "hasModification",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-$1=self["@browserModel"];
+$1=_st(_st(_st(self)._methodContents()).__eq(_st(self)._contents()))._not();
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"browserModel",{},smalltalk.HLSourceCodeWidget)})},
+}, function($ctx1) {$ctx1.fill(self,"hasModification",{},smalltalk.HLNavigationCodeWidget)})},
+messageSends: ["not", "=", "contents", "methodContents"]}),
+smalltalk.HLNavigationCodeWidget);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "methodContents",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=self["@methodContents"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"methodContents",{},smalltalk.HLNavigationCodeWidget)})},
 messageSends: []}),
-smalltalk.HLSourceCodeWidget);
+smalltalk.HLNavigationCodeWidget);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "browserModel:",
-fn: function (aBrowserModel){
+selector: "methodContents:",
+fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-self["@browserModel"]=aBrowserModel;
-$1=self;
-_st($1)._observeSystem();
-$2=_st($1)._observeBrowserModel();
-return self}, function($ctx1) {$ctx1.fill(self,"browserModel:",{aBrowserModel:aBrowserModel},smalltalk.HLSourceCodeWidget)})},
-messageSends: ["observeSystem", "observeBrowserModel"]}),
-smalltalk.HLSourceCodeWidget);
+var $1;
+self["@methodContents"]=aString;
+$1=self["@methodContents"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"methodContents:",{aString:aString},smalltalk.HLNavigationCodeWidget)})},
+messageSends: []}),
+smalltalk.HLNavigationCodeWidget);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "hasModification",
+selector: "previous",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(_st(self)._methodContents()).__eq(_st(self)._contents()))._not();
+return self}, function($ctx1) {$ctx1.fill(self,"previous",{},smalltalk.HLNavigationCodeWidget)})},
+messageSends: []}),
+smalltalk.HLNavigationCodeWidget);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "previous:",
+fn: function (aWidget){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},smalltalk.HLNavigationCodeWidget)})},
+messageSends: []}),
+smalltalk.HLNavigationCodeWidget);
+
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "canBeOpenAsTab",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return false;
+}, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLNavigationCodeWidget.klass)})},
+messageSends: []}),
+smalltalk.HLNavigationCodeWidget.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "on:",
+fn: function (aBrowserModel){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$3,$1;
+$2=_st(self)._new();
+_st($2)._browserModel_(aBrowserModel);
+$3=_st($2)._yourself();
+$1=$3;
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"hasModification",{},smalltalk.HLSourceCodeWidget)})},
-messageSends: ["not", "=", "contents", "methodContents"]}),
-smalltalk.HLSourceCodeWidget);
+}, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel},smalltalk.HLNavigationCodeWidget.klass)})},
+messageSends: ["browserModel:", "new", "yourself"]}),
+smalltalk.HLNavigationCodeWidget.klass);
+
 
+smalltalk.addClass('HLSourceCodeWidget', smalltalk.HLNavigationCodeWidget, ['browserModel'], 'Helios-Workspace');
 smalltalk.addMethod(
 smalltalk.method({
-selector: "methodContents",
+selector: "browserModel",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-$1=self["@methodContents"];
+$1=self["@browserModel"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"methodContents",{},smalltalk.HLSourceCodeWidget)})},
+}, function($ctx1) {$ctx1.fill(self,"browserModel",{},smalltalk.HLSourceCodeWidget)})},
 messageSends: []}),
 smalltalk.HLSourceCodeWidget);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "methodContents:",
-fn: function (aString){
+selector: "browserModel:",
+fn: function (aBrowserModel){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self["@methodContents"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"methodContents:",{aString:aString},smalltalk.HLSourceCodeWidget)})},
-messageSends: []}),
+var $1,$2;
+self["@browserModel"]=aBrowserModel;
+$1=self;
+_st($1)._observeSystem();
+$2=_st($1)._observeBrowserModel();
+return self}, function($ctx1) {$ctx1.fill(self,"browserModel:",{aBrowserModel:aBrowserModel},smalltalk.HLSourceCodeWidget)})},
+messageSends: ["observeSystem", "observeBrowserModel"]}),
 smalltalk.HLSourceCodeWidget);
 
 smalltalk.addMethod(
@@ -1144,26 +1197,6 @@ return self}, function($ctx1) {$ctx1.fill(self,"onUnknownVariableError:",{anErro
 messageSends: ["confirm:", "streamContents:", "nextPutAll:", "messageText", "cr", "ifFalse:", "addInstVarNamed:", "variableName", "browserModel"]}),
 smalltalk.HLSourceCodeWidget);
 
-smalltalk.addMethod(
-smalltalk.method({
-selector: "previous",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"previous",{},smalltalk.HLSourceCodeWidget)})},
-messageSends: []}),
-smalltalk.HLSourceCodeWidget);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "previous:",
-fn: function (aWidget){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},smalltalk.HLSourceCodeWidget)})},
-messageSends: []}),
-smalltalk.HLSourceCodeWidget);
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "refresh",

+ 110 - 67
js/Helios-Workspace.js

@@ -1057,76 +1057,145 @@ referencedClasses: []
 smalltalk.HLCodeWidget.klass);
 
 
-smalltalk.addClass('HLSourceCodeWidget', smalltalk.HLCodeWidget, ['browserModel', 'methodContents'], 'Helios-Workspace');
+smalltalk.addClass('HLNavigationCodeWidget', smalltalk.HLCodeWidget, ['methodContents'], 'Helios-Workspace');
 smalltalk.addMethod(
 smalltalk.method({
-selector: "browserModel",
+selector: "hasModification",
+category: 'testing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(_st(self)._methodContents()).__eq(_st(self)._contents()))._not();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"hasModification",{},smalltalk.HLNavigationCodeWidget)})},
+args: [],
+source: "hasModification\x0a\x09^ (self methodContents = self contents) not",
+messageSends: ["not", "=", "contents", "methodContents"],
+referencedClasses: []
+}),
+smalltalk.HLNavigationCodeWidget);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "methodContents",
 category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-$1=self["@browserModel"];
+$1=self["@methodContents"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"browserModel",{},smalltalk.HLSourceCodeWidget)})},
+}, function($ctx1) {$ctx1.fill(self,"methodContents",{},smalltalk.HLNavigationCodeWidget)})},
 args: [],
-source: "browserModel\x0a\x09^ browserModel",
+source: "methodContents\x0a\x09^ methodContents",
 messageSends: [],
 referencedClasses: []
 }),
-smalltalk.HLSourceCodeWidget);
+smalltalk.HLNavigationCodeWidget);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "browserModel:",
+selector: "methodContents:",
 category: 'accessing',
-fn: function (aBrowserModel){
+fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-self["@browserModel"]=aBrowserModel;
-$1=self;
-_st($1)._observeSystem();
-$2=_st($1)._observeBrowserModel();
-return self}, function($ctx1) {$ctx1.fill(self,"browserModel:",{aBrowserModel:aBrowserModel},smalltalk.HLSourceCodeWidget)})},
-args: ["aBrowserModel"],
-source: "browserModel: aBrowserModel\x0a\x09browserModel := aBrowserModel.\x0a\x09self \x0a\x09\x09observeSystem;\x0a\x09\x09observeBrowserModel",
-messageSends: ["observeSystem", "observeBrowserModel"],
+var $1;
+self["@methodContents"]=aString;
+$1=self["@methodContents"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"methodContents:",{aString:aString},smalltalk.HLNavigationCodeWidget)})},
+args: ["aString"],
+source: "methodContents: aString\x0a\x09^ methodContents := aString",
+messageSends: [],
 referencedClasses: []
 }),
-smalltalk.HLSourceCodeWidget);
+smalltalk.HLNavigationCodeWidget);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "hasModification",
+selector: "previous",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self}, function($ctx1) {$ctx1.fill(self,"previous",{},smalltalk.HLNavigationCodeWidget)})},
+args: [],
+source: "previous\x0a\x09\x22for browser lists widget\x22",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLNavigationCodeWidget);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "previous:",
+category: 'accessing',
+fn: function (aWidget){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},smalltalk.HLNavigationCodeWidget)})},
+args: ["aWidget"],
+source: "previous: aWidget\x0a\x09\x22for browser lists widget\x22",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLNavigationCodeWidget);
+
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "canBeOpenAsTab",
 category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(_st(self)._methodContents()).__eq(_st(self)._contents()))._not();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"hasModification",{},smalltalk.HLSourceCodeWidget)})},
+return false;
+}, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLNavigationCodeWidget.klass)})},
 args: [],
-source: "hasModification\x0a\x09^ (self methodContents = self contents) not",
-messageSends: ["not", "=", "contents", "methodContents"],
+source: "canBeOpenAsTab\x0a\x09^ false",
+messageSends: [],
 referencedClasses: []
 }),
-smalltalk.HLSourceCodeWidget);
+smalltalk.HLNavigationCodeWidget.klass);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "methodContents",
+selector: "on:",
+category: 'instance creation',
+fn: function (aBrowserModel){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$3,$1;
+$2=_st(self)._new();
+_st($2)._browserModel_(aBrowserModel);
+$3=_st($2)._yourself();
+$1=$3;
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel},smalltalk.HLNavigationCodeWidget.klass)})},
+args: ["aBrowserModel"],
+source: "on: aBrowserModel\x0a\x09^ self new\x0a\x09\x09browserModel: aBrowserModel;\x0a\x09\x09yourself",
+messageSends: ["browserModel:", "new", "yourself"],
+referencedClasses: []
+}),
+smalltalk.HLNavigationCodeWidget.klass);
+
+
+smalltalk.addClass('HLSourceCodeWidget', smalltalk.HLNavigationCodeWidget, ['browserModel'], 'Helios-Workspace');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "browserModel",
 category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-$1=self["@methodContents"];
+$1=self["@browserModel"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"methodContents",{},smalltalk.HLSourceCodeWidget)})},
+}, function($ctx1) {$ctx1.fill(self,"browserModel",{},smalltalk.HLSourceCodeWidget)})},
 args: [],
-source: "methodContents\x0a\x09^ methodContents",
+source: "browserModel\x0a\x09^ browserModel",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1134,16 +1203,20 @@ smalltalk.HLSourceCodeWidget);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "methodContents:",
+selector: "browserModel:",
 category: 'accessing',
-fn: function (aString){
+fn: function (aBrowserModel){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self["@methodContents"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"methodContents:",{aString:aString},smalltalk.HLSourceCodeWidget)})},
-args: ["aString"],
-source: "methodContents: aString\x0a\x09methodContents := aString",
-messageSends: [],
+var $1,$2;
+self["@browserModel"]=aBrowserModel;
+$1=self;
+_st($1)._observeSystem();
+$2=_st($1)._observeBrowserModel();
+return self}, function($ctx1) {$ctx1.fill(self,"browserModel:",{aBrowserModel:aBrowserModel},smalltalk.HLSourceCodeWidget)})},
+args: ["aBrowserModel"],
+source: "browserModel: aBrowserModel\x0a\x09browserModel := aBrowserModel.\x0a\x09self \x0a\x09\x09observeSystem;\x0a\x09\x09observeBrowserModel",
+messageSends: ["observeSystem", "observeBrowserModel"],
 referencedClasses: []
 }),
 smalltalk.HLSourceCodeWidget);
@@ -1494,36 +1567,6 @@ referencedClasses: ["String"]
 }),
 smalltalk.HLSourceCodeWidget);
 
-smalltalk.addMethod(
-smalltalk.method({
-selector: "previous",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"previous",{},smalltalk.HLSourceCodeWidget)})},
-args: [],
-source: "previous\x0a\x09\x22for browser lists widget\x22",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLSourceCodeWidget);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "previous:",
-category: 'accessing',
-fn: function (aWidget){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},smalltalk.HLSourceCodeWidget)})},
-args: ["aWidget"],
-source: "previous: aWidget\x0a\x09\x22for browser lists widget\x22",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLSourceCodeWidget);
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "refresh",

+ 14 - 0
st/Helios-Browser.st

@@ -1083,10 +1083,24 @@ removeMethod
 		ifTrue: [ self environment removeMethod: self selectedMethod ]
 !
 
+removeProtocol
+	(self manager confirm: 'Do you REALLY want to remove protocol ', self selectedProtocol)
+		ifTrue: [ self environment 
+			removeProtocol: self selectedProtocol 
+			from: self selectedClass ]
+!
+
 renameClassTo: aClassName
 	self environment 
 		renameClass: self selectedClass theNonMetaClass
 		to: aClassName
+!
+
+renameProtocolTo: aString
+	self environment 
+		renameProtocol: self selectedProtocol
+		to: aString
+		in: self selectedClass
 ! !
 
 !HLBrowserModel methodsFor: 'compiling'!

+ 109 - 0
st/Helios-Commands-Browser.st

@@ -192,6 +192,12 @@ displayLabel
 	^ 'New class name:'
 ! !
 
+!HLCopyClassCommand methodsFor: 'defaults'!
+
+defaultInput
+	^ self model selectedClass name
+! !
+
 !HLCopyClassCommand methodsFor: 'executing'!
 
 execute
@@ -294,6 +300,17 @@ inputLabel
 	^ 'Find references of'
 ! !
 
+!HLFindReferencesCommand methodsFor: 'defaults'!
+
+defaultInput
+	^ self model selectedMethod 
+		ifNil: [
+			self model selectedClass
+				ifNil: [ '' ]
+				ifNotNil: [ :class | class name ] ]
+		ifNotNil: [ :method | method selector ]
+! !
+
 !HLFindReferencesCommand methodsFor: 'executing'!
 
 execute
@@ -600,6 +617,42 @@ menuLabel
 	^ 'Remove method'
 ! !
 
+HLRemoveCommand subclass: #HLRemoveProtocolCommand
+	instanceVariableNames: ''
+	package: 'Helios-Commands-Browser'!
+
+!HLRemoveProtocolCommand methodsFor: 'accessing'!
+
+category
+	^ 'Protocols'
+! !
+
+!HLRemoveProtocolCommand methodsFor: 'executing'!
+
+execute
+	self model removeProtocol
+! !
+
+!HLRemoveProtocolCommand methodsFor: 'testing'!
+
+isActive
+	^ self model selectedProtocol notNil
+! !
+
+!HLRemoveProtocolCommand class methodsFor: 'accessing'!
+
+key
+	^ 't'
+!
+
+label
+	^ 'Protocol'
+!
+
+menuLabel
+	^ 'Remove protocol'
+! !
+
 HLBrowserCommand subclass: #HLRenameCommand
 	instanceVariableNames: ''
 	package: 'Helios-Commands-Browser'!
@@ -628,6 +681,12 @@ displayLabel
 	^ 'Rename class to:'
 ! !
 
+!HLRenameClassCommand methodsFor: 'defaults'!
+
+defaultInput
+	^ self model selectedClass name
+! !
+
 !HLRenameClassCommand methodsFor: 'executing'!
 
 execute
@@ -658,6 +717,56 @@ menuLabel
 	^ 'Rename class...'
 ! !
 
+HLRenameCommand subclass: #HLRenameProtocolCommand
+	instanceVariableNames: ''
+	package: 'Helios-Commands-Browser'!
+
+!HLRenameProtocolCommand methodsFor: 'accessing'!
+
+category
+	^ 'Protocols'
+!
+
+displayLabel
+	^ 'Rename protocol to:'
+! !
+
+!HLRenameProtocolCommand methodsFor: 'defaults'!
+
+defaultInput
+	^ self model selectedProtocol
+! !
+
+!HLRenameProtocolCommand methodsFor: 'executing'!
+
+execute
+	self model renameProtocolTo: self input
+! !
+
+!HLRenameProtocolCommand methodsFor: 'testing'!
+
+isActive
+	^ self model selectedProtocol notNil
+!
+
+isInputRequired
+	^ true
+! !
+
+!HLRenameProtocolCommand class methodsFor: 'accessing'!
+
+key
+	^ 't'
+!
+
+label
+	^ 'Protocol'
+!
+
+menuLabel
+	^ 'Rename protocol...'
+! !
+
 HLBrowserCommand subclass: #HLToggleCommand
 	instanceVariableNames: ''
 	package: 'Helios-Commands-Browser'!

+ 6 - 0
st/Helios-Commands-Core.st

@@ -61,6 +61,12 @@ asGroupBinding
 		labelled: self label
 ! !
 
+!HLCommand methodsFor: 'defaults'!
+
+defaultInput
+	^ ''
+! !
+
 !HLCommand methodsFor: 'error handling'!
 
 commandError: aString

+ 12 - 2
st/Helios-KeyBindings.st

@@ -96,6 +96,7 @@ inputBinding
 	^ HLBindingInput new
 		label: self command inputLabel;
 		ghostText: self command displayLabel;
+		defaultValue: self command defaultInput;
 		inputCompletion: self command inputCompletion;
 		callback: [ :val | 
 			self command 
@@ -195,7 +196,7 @@ isActive
 ! !
 
 HLBinding subclass: #HLBindingInput
-	instanceVariableNames: 'input callback status wrapper binder ghostText isFinal message messageTag inputCompletion'
+	instanceVariableNames: 'input callback status wrapper binder ghostText isFinal message messageTag inputCompletion defaultValue'
 	package: 'Helios-KeyBindings'!
 
 !HLBindingInput methodsFor: 'accessing'!
@@ -212,6 +213,14 @@ callback: aBlock
 	callback := aBlock
 !
 
+defaultValue
+	^ defaultValue ifNil: [ '' ]
+!
+
+defaultValue: aString
+	defaultValue := aString
+!
+
 ghostText
 	^ ghostText
 !
@@ -297,12 +306,13 @@ refresh
 renderOn: aBinder html: html
 	binder := aBinder.
 	wrapper ifNil: [ wrapper := html span ].
-	
+
 	wrapper 
 		class: self status;
 		with: [
 			input := html input
 				placeholder: self ghostText;
+				value: self defaultValue;
 				yourself.
 			input asJQuery 
 				typeahead: #{ 'source' -> self inputCompletion }.

+ 41 - 21
st/Helios-Workspace.st

@@ -402,29 +402,18 @@ setupKeyMaps
 	<CodeMirror.keyMap['Amber'] = self._keyMap()>
 ! !
 
-HLCodeWidget subclass: #HLSourceCodeWidget
-	instanceVariableNames: 'browserModel methodContents'
+HLCodeWidget subclass: #HLNavigationCodeWidget
+	instanceVariableNames: 'methodContents'
 	package: 'Helios-Workspace'!
 
-!HLSourceCodeWidget methodsFor: 'accessing'!
-
-browserModel
-	^ browserModel
-!
-
-browserModel: aBrowserModel
-	browserModel := aBrowserModel.
-	self 
-		observeSystem;
-		observeBrowserModel
-!
+!HLNavigationCodeWidget methodsFor: 'accessing'!
 
 methodContents
 	^ methodContents
 !
 
 methodContents: aString
-	methodContents := aString
+	^ methodContents := aString
 !
 
 previous
@@ -435,6 +424,43 @@ previous: aWidget
 	"for browser lists widget"
 ! !
 
+!HLNavigationCodeWidget methodsFor: 'testing'!
+
+hasModification
+	^ (self methodContents = self contents) not
+! !
+
+!HLNavigationCodeWidget class methodsFor: 'instance creation'!
+
+on: aBrowserModel
+	^ self new
+		browserModel: aBrowserModel;
+		yourself
+! !
+
+!HLNavigationCodeWidget class methodsFor: 'testing'!
+
+canBeOpenAsTab
+	^ false
+! !
+
+HLNavigationCodeWidget subclass: #HLSourceCodeWidget
+	instanceVariableNames: 'browserModel'
+	package: 'Helios-Workspace'!
+
+!HLSourceCodeWidget methodsFor: 'accessing'!
+
+browserModel
+	^ browserModel
+!
+
+browserModel: aBrowserModel
+	browserModel := aBrowserModel.
+	self 
+		observeSystem;
+		observeBrowserModel
+! !
+
 !HLSourceCodeWidget methodsFor: 'actions'!
 
 observeBrowserModel
@@ -562,12 +588,6 @@ onUnknownVariableError: anError
 	self browserModel addInstVarNamed: anError variableName
 ! !
 
-!HLSourceCodeWidget methodsFor: 'testing'!
-
-hasModification
-	^ (self methodContents = self contents) not
-! !
-
 !HLSourceCodeWidget class methodsFor: 'instance creation'!
 
 on: aBrowserModel