1
0
Переглянути джерело

Remove backward compatibility for #heliosClass.

Herby Vojčík 4 роки тому
батько
коміт
3911212a37

+ 2 - 2
src/Helios-Announcements.js

@@ -54,11 +54,11 @@ $globals.HLAnnouncement.comment="I am the root of the announcement class hierarc
 
 $core.addMethod(
 $core.method({
-selector: "heliosClass",
+selector: "classTag",
 protocol: "helios",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "heliosClass\x0a\x09^ 'announcement'",
+source: "classTag\x0a\x09^ 'announcement'",
 referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],

+ 1 - 1
src/Helios-Announcements.st

@@ -25,7 +25,7 @@ I am the root of the announcement class hierarchy used in the Helios UI.!
 
 !HLAnnouncement class methodsFor: 'helios'!
 
-heliosClass
+classTag
 	^ 'announcement'
 ! !
 

+ 4 - 11
src/Helios-Browser.js

@@ -1827,26 +1827,19 @@ selector: "cssClassForItem:",
 protocol: "accessing",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aClass"],
-source: "cssClassForItem: aClass\x0a\x09| nonMeta |\x0a\x09nonMeta := aClass theNonMetaClass.\x0a\x09(nonMeta respondsTo: #classTag)\x0a\x09\x09ifTrue: [ ^ nonMeta classTag ]\x0a\x09\x09ifFalse: [ ^ nonMeta heliosClass ]",
+source: "cssClassForItem: aClass\x0a\x09^ aClass theNonMetaClass classTag",
 referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["theNonMetaClass", "ifTrue:ifFalse:", "respondsTo:", "classTag", "heliosClass"]
+messageSends: ["classTag", "theNonMetaClass"]
 }, function ($methodClass){ return function (aClass){
 var self=this,$self=this;
-var nonMeta;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-nonMeta=$recv(aClass)._theNonMetaClass();
-if($core.assert($recv(nonMeta)._respondsTo_("classTag"))){
-return $recv(nonMeta)._classTag();
-} else {
-return $recv(nonMeta)._heliosClass();
-}
-return self;
+return $recv($recv(aClass)._theNonMetaClass())._classTag();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{aClass:aClass,nonMeta:nonMeta})});
+}, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{aClass:aClass})});
 //>>excludeEnd("ctx");
 }; }),
 $globals.HLClassesListWidget);

+ 1 - 5
src/Helios-Browser.st

@@ -453,11 +453,7 @@ I render a list of classes in the selected package.!
 !HLClassesListWidget methodsFor: 'accessing'!
 
 cssClassForItem: aClass
-	| nonMeta |
-	nonMeta := aClass theNonMetaClass.
-	(nonMeta respondsTo: #classTag)
-		ifTrue: [ ^ nonMeta classTag ]
-		ifFalse: [ ^ nonMeta heliosClass ]
+	^ aClass theNonMetaClass classTag
 !
 
 label

+ 4 - 11
src/Helios-SUnit.js

@@ -274,26 +274,19 @@ selector: "cssClassForItem:",
 protocol: "accessing",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aClass"],
-source: "cssClassForItem: aClass\x0a\x09| nonMeta |\x0a\x09nonMeta := aClass theNonMetaClass.\x0a\x09(nonMeta respondsTo: #classTag)\x0a\x09\x09ifTrue: [ ^ nonMeta classTag ]\x0a\x09\x09ifFalse: [ ^ nonMeta heliosClass ]",
+source: "cssClassForItem: aClass\x0a\x09^ aClass theNonMetaClass classTag",
 referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["theNonMetaClass", "ifTrue:ifFalse:", "respondsTo:", "classTag", "heliosClass"]
+messageSends: ["classTag", "theNonMetaClass"]
 }, function ($methodClass){ return function (aClass){
 var self=this,$self=this;
-var nonMeta;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-nonMeta=$recv(aClass)._theNonMetaClass();
-if($core.assert($recv(nonMeta)._respondsTo_("classTag"))){
-return $recv(nonMeta)._classTag();
-} else {
-return $recv(nonMeta)._heliosClass();
-}
-return self;
+return $recv($recv(aClass)._theNonMetaClass())._classTag();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{aClass:aClass,nonMeta:nonMeta})});
+}, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{aClass:aClass})});
 //>>excludeEnd("ctx");
 }; }),
 $globals.HLSUnitClassesListWidget);

+ 1 - 5
src/Helios-SUnit.st

@@ -72,11 +72,7 @@ buttonsDivCssClass
 !
 
 cssClassForItem: aClass
-	| nonMeta |
-	nonMeta := aClass theNonMetaClass.
-	(nonMeta respondsTo: #classTag)
-		ifTrue: [ ^ nonMeta classTag ]
-		ifFalse: [ ^ nonMeta heliosClass ]
+	^ aClass theNonMetaClass classTag
 !
 
 items