Browse Source

Make HLToggleClassSideCommand a real toggle

Nicolas Petton 10 years ago
parent
commit
43755610fe
2 changed files with 7 additions and 73 deletions
  1. 6 52
      src/Helios-Commands-Browser.js
  2. 1 21
      src/Helios-Commands-Browser.st

+ 6 - 52
src/Helios-Commands-Browser.js

@@ -753,11 +753,14 @@ protocol: 'executing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self._model())._showInstance_(false);
+var $1;
+$1=self._model();
+$ctx1.sendIdx["model"]=1;
+_st($1)._showInstance_(_st(_st(self._model())._showInstance())._not());
 return self}, function($ctx1) {$ctx1.fill(self,"execute",{},globals.HLToggleClassSideCommand)})},
 args: [],
-source: "execute\x0a\x09self model showInstance: false",
-messageSends: ["showInstance:", "model"],
+source: "execute\x0a\x09self model showInstance: self model showInstance not",
+messageSends: ["showInstance:", "model", "not", "showInstance"],
 referencedClasses: []
 }),
 globals.HLToggleClassSideCommand);
@@ -793,53 +796,4 @@ referencedClasses: []
 }),
 globals.HLToggleClassSideCommand.klass);
 
-
-smalltalk.addClass('HLToggleInstanceSideCommand', globals.HLToggleCommand, [], 'Helios-Commands-Browser');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "execute",
-protocol: 'executing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(self._model())._showInstance_(true);
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},globals.HLToggleInstanceSideCommand)})},
-args: [],
-source: "execute\x0a\x09self model showInstance: true",
-messageSends: ["showInstance:", "model"],
-referencedClasses: []
-}),
-globals.HLToggleInstanceSideCommand);
-
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "key",
-protocol: 'accessing',
-fn: function (){
-var self=this;
-return "i";
-},
-args: [],
-source: "key\x0a\x09^ 'i'",
-messageSends: [],
-referencedClasses: []
-}),
-globals.HLToggleInstanceSideCommand.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "label",
-protocol: 'accessing',
-fn: function (){
-var self=this;
-return "Instance side";
-},
-args: [],
-source: "label\x0a\x09^ 'Instance side'",
-messageSends: [],
-referencedClasses: []
-}),
-globals.HLToggleInstanceSideCommand.klass);
-
 });

+ 1 - 21
src/Helios-Commands-Browser.st

@@ -326,7 +326,7 @@ HLToggleCommand subclass: #HLToggleClassSideCommand
 !HLToggleClassSideCommand methodsFor: 'executing'!
 
 execute
-	self model showInstance: false
+	self model showInstance: self model showInstance not
 ! !
 
 !HLToggleClassSideCommand class methodsFor: 'accessing'!
@@ -339,23 +339,3 @@ label
 	^ 'Class side'
 ! !
 
-HLToggleCommand subclass: #HLToggleInstanceSideCommand
-	instanceVariableNames: ''
-	package: 'Helios-Commands-Browser'!
-
-!HLToggleInstanceSideCommand methodsFor: 'executing'!
-
-execute
-	self model showInstance: true
-! !
-
-!HLToggleInstanceSideCommand class methodsFor: 'accessing'!
-
-key
-	^ 'i'
-!
-
-label
-	^ 'Instance side'
-! !
-