--- a/SmalltalkCodeGeneratorTool.st Thu Sep 13 10:00:04 2018 +0200
+++ b/SmalltalkCodeGeneratorTool.st Thu Sep 13 14:35:21 2018 +0200
@@ -804,6 +804,36 @@
self executeCollectedChangesNamed:('Make ',className,' abstract').
!
+createIsObsoleteMethodIn:aClass
+ "create a #isObsolete query method (I'm tired of typing)"
+
+ |metaClass className code|
+
+ metaClass := aClass theMetaclass.
+ className := aClass theNonMetaclass name.
+
+ self startCollectChanges.
+
+ (metaClass includesSelector:#isObsolete) ifFalse:[
+ code :=
+'isObsolete
+ "Return if this class is considered an obsolete class
+ (it will be marked as such in the browser).
+ True is returned here for myself only; false for subclasses.
+ Obsolete subclasses must redefine this again."
+
+ ^ self == ',className,'.
+'.
+ self
+ compile:code
+ forClass:metaClass
+ inCategory:#'queries'.
+ ].
+ self executeCollectedChangesNamed:('Mark ',className,' as obsolete').
+
+ "Created: / 13-09-2018 / 14:35:05 / Claus Gittinger"
+!
+
createParametrizedInstanceCreationMethodsNamed:selector in:aClass
"create a #selector instance creation method (I'm tired of typing)"