--- a/ClassDefinitionChange.st Mon Oct 09 14:10:42 2006 +0200
+++ b/ClassDefinitionChange.st Wed Oct 11 14:20:03 2006 +0200
@@ -14,7 +14,8 @@
ClassChange subclass:#ClassDefinitionChange
instanceVariableNames:'objectType nameSpaceName superClassName classType indexedType
otherParameters instanceVariableNames classVariableNames
- classInstanceVariableNames poolDictionaries category'
+ classInstanceVariableNames poolDictionaries category private
+ definitionSelector'
classVariableNames:''
poolDictionaries:''
category:'System-Changes'
@@ -53,7 +54,12 @@
!
category
+ category isNil ifTrue:[
+ self setupFromSource.
+ ].
^ category
+
+ "Modified: / 11-10-2006 / 14:12:01 / cg"
!
category:something
@@ -92,7 +98,10 @@
!
nameSpaceName: aNameSpaceName classType: aClassType otherParameters:otherParametersArg
- |indexedType private imports|
+ "this instance setup message is used when reading from a VW-xml change file.
+ Support for this is not yet complete."
+
+ |indexedType imports|
nameSpaceName := aNameSpaceName.
classType := aClassType.
@@ -108,6 +117,8 @@
classInstanceVariableNames := otherParameters at:#classInstanceVariableNames: ifAbsent:nil.
imports := otherParameters at:#imports: ifAbsent:nil.
category := otherParameters at:#category: ifAbsent:nil.
+
+ "Modified: / 11-10-2006 / 14:06:47 / cg"
!
objectType
@@ -275,17 +286,25 @@
!
definitionSelector
- |parseTree|
+ definitionSelector isNil ifTrue:[
+ self setupFromSource.
+ ].
+ ^ definitionSelector
- parseTree := Parser parseExpression:self source.
- parseTree isMessage ifTrue:[
- ^ parseTree selector
- ].
- self error:'should not happen'.
+ "Modified: / 11-10-2006 / 14:11:44 / cg"
!
isClassDefinitionChange
^ true
+!
+
+isPrivateClassDefinitionChange
+ private isNil ifTrue:[
+ self setupFromSource.
+ ].
+ ^ private
+
+ "Created: / 11-10-2006 / 14:19:03 / cg"
! !
!ClassDefinitionChange methodsFor:'special'!
@@ -330,10 +349,34 @@
]
"Modified: / 06-10-2006 / 13:10:05 / cg"
+!
+
+setupFromSource
+ "extract privacy, category and selector from the source"
+
+ |parseTree catIdx|
+
+ source notNil ifTrue:[
+ parseTree := Parser parseExpression:source.
+ parseTree isMessage ifFalse:[
+ self error:'bad change source'.
+ ].
+
+ definitionSelector := parseTree selector.
+
+ private := (definitionSelector endsWith:':privateIn:').
+
+ catIdx := definitionSelector keywords indexOf:'category:'.
+ catIdx ~~ 0 ifTrue:[
+ category := (parseTree args at:catIdx) evaluate.
+ ].
+ ].
+
+ "Created: / 11-10-2006 / 14:10:02 / cg"
! !
!ClassDefinitionChange class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.38 2006-10-06 13:50:07 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.39 2006-10-11 12:20:03 cg Exp $'
! !