Browse Source

Added back HLMoveMethodToCommand activation testing

Nicolas Petton 12 years ago
parent
commit
ca0a97441d

+ 4 - 6
js/Helios-Commands-Browser.deploy.js

@@ -250,17 +250,15 @@ smalltalk.HLMoveToCommand.klass);
 
 smalltalk.addClass('HLMoveMethodToCommand', smalltalk.HLMoveToCommand, [], 'Helios-Commands-Browser');
 smalltalk.addMethod(
-"_activeBlock",
+"_isActive",
 smalltalk.method({
-selector: "activeBlock",
+selector: "isActive",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
var $1;
-$1=(function(){
-return smalltalk.withContext(function($ctx2) {
return _st(_st(_st(self)._model())._selectedMethod())._notNil();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
+$1=_st(_st(_st(self)._model())._selectedMethod())._notNil();
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"activeBlock",{},smalltalk.HLMoveMethodToCommand)})},
+}, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLMoveMethodToCommand)})},
 messageSends: ["notNil", "selectedMethod", "model"]}),
 smalltalk.HLMoveMethodToCommand);
 

+ 6 - 8
js/Helios-Commands-Browser.js

@@ -350,20 +350,18 @@ smalltalk.HLMoveToCommand.klass);
 
 smalltalk.addClass('HLMoveMethodToCommand', smalltalk.HLMoveToCommand, [], 'Helios-Commands-Browser');
 smalltalk.addMethod(
-"_activeBlock",
+"_isActive",
 smalltalk.method({
-selector: "activeBlock",
-category: 'accessing',
+selector: "isActive",
+category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
var $1;
-$1=(function(){
-return smalltalk.withContext(function($ctx2) {
return _st(_st(_st(self)._model())._selectedMethod())._notNil();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
+$1=_st(_st(_st(self)._model())._selectedMethod())._notNil();
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"activeBlock",{},smalltalk.HLMoveMethodToCommand)})},
+}, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLMoveMethodToCommand)})},
 args: [],
-source: "activeBlock\x0a\x09^ [ self model selectedMethod notNil ]",
+source: "isActive\x0a\x09^ self model selectedMethod notNil",
 messageSends: ["notNil", "selectedMethod", "model"],
 referencedClasses: []
 }),

+ 3 - 3
st/Helios-Commands-Browser.st

@@ -153,10 +153,10 @@ HLMoveToCommand subclass: #HLMoveMethodToCommand
  instanceVariableNames: ''
  package: 'Helios-Commands-Browser'!
 
-!HLMoveMethodToCommand methodsFor: 'accessing'!
+!HLMoveMethodToCommand methodsFor: 'testing'!
 
-activeBlock
-	^ [ self model selectedMethod notNil ]
+isActive
+	^ self model selectedMethod notNil
 ! !
 
 !HLMoveMethodToCommand class methodsFor: 'accessing'!