--- a/LibraryDefinition.st Wed Aug 09 20:06:32 2006 +0200
+++ b/LibraryDefinition.st Wed Aug 09 21:33:26 2006 +0200
@@ -153,6 +153,39 @@
!ProjectDefinition class methodsFor:'file generation'!
+allClassNames
+ ^ (self compiled_classNames , self autoloaded_classNames , self excluded_classNames)
+!
+
+generateAbbrev_dot_stc
+ ^ String
+ streamContents:[:s |
+ self allClassNames do:[:eachClassName |
+ |cls|
+
+ cls := Smalltalk classNamed:eachClassName.
+ cls autoload.
+ s nextPutAll:eachClassName.
+ s nextPutAll:' '.
+ s nextPutAll:cls classFilename asFilename withoutSuffix name.
+ s nextPutAll:' '.
+ s nextPutAll:cls package.
+ s nextPutAll:' '.
+ s nextPutAll:cls category storeString.
+ s nextPutAll:' '.
+ s nextPutAll:(cls theMetaclass instVarNames size).
+ s cr.
+ ]
+ ]
+
+ "
+ DapasXProject generateAbbrev_dot_stc
+ DapasX_Datenbasis generateAbbrev_dot_stc
+ bosch_dapasx_interactiver_editor_Definition generateAbbrev_dot_stc
+ "
+ "Created: / 09-08-2006 / 11:24:39 / fm"
+!
+
generate_bc_dot_def
^self replaceMappings: self bc_dot_def_mappings
@@ -661,7 +694,7 @@
objectLine_make_dot_spec_mappings: aClassName
^Dictionary new
- at: #'CLASS' put: [aClassName asString copy replaceAny:':' by:$_];
+ at: #'CLASS' put: [(Smalltalk classNamed:aClassName) classFilename asFilename withoutSuffix name];
yourself
"Created: / 08-08-2006 / 20:17:28 / fm"
@@ -685,7 +718,7 @@
generateClassLines_libInit_dot_cc
-^self classNames
+^self compiled_classNames
inject: ''
into:[:classLines :className |
|newClassLine mappings|
@@ -740,7 +773,7 @@
generateObjects_make_dot_spec
-^self classNames
+^self compiled_classNames
inject: ''
into:[:objectLines :className |
|newObjectLine mappings|
@@ -813,7 +846,9 @@
!ProjectDefinition class methodsFor:'project description'!
-classNames
+autoloaded_classNames
+ "classes listed here will NOT be compiled, but remain autoloaded.
+ to be excluded from the build process can be user-defined in my subclasses"
^#()
@@ -821,8 +856,28 @@
"Modified: / 07-08-2006 / 21:25:25 / fm"
!
-classesDo:aBlock
- self classNames do:[:eachName|
+classNames
+ "this is a stupid default, a correponding method with real names
+ is generated in my subclasses"
+
+ ^#()
+
+ "Created: / 07-08-2006 / 19:02:57 / fm"
+ "Modified: / 07-08-2006 / 21:25:25 / fm"
+!
+
+compiled_classNames
+ "this is a stupid default, a correponding method with real names
+ is generated in my subclasses"
+
+ ^#()
+
+ "Created: / 07-08-2006 / 19:02:57 / fm"
+ "Modified: / 07-08-2006 / 21:25:25 / fm"
+!
+
+compiled_classesDo:aBlock
+ self compiled_classNames do:[:eachName|
aBlock value:(Smalltalk at:eachName asSymbol)
].
@@ -838,6 +893,16 @@
"Created: / 08-08-2006 / 11:15:01 / fm"
!
+excluded_classNames
+ "this is a stupid default, a correponding method with real names
+ to be excluded from the build process can be user-defined in my subclasses"
+
+ ^#()
+
+ "Created: / 07-08-2006 / 19:02:57 / fm"
+ "Modified: / 07-08-2006 / 21:25:25 / fm"
+!
+
extensionMethodNames
^#()
@@ -901,7 +966,7 @@
"
DapasXProject compileDescriptionMethods
DapasX_Datenbasis compileDescriptionMethods
-
+ bosch_dapasx_interactiver_editor_Definition compileDescriptionMethods
"
"Created: / 09-08-2006 / 18:00:31 / fm"
@@ -921,7 +986,7 @@
!
searchForNeverCompiledSuperclasses
- self classesDo:[:includedClass |
+ self compiled_classesDo:[:includedClass |
includedClass allSuperclassesDo:[:eachSuperClass |
eachSuperClass package == Project noProjectID ifTrue:[
self inconsistency:'uncompiled superclass: ' , eachSuperClass name
@@ -939,16 +1004,57 @@
!ProjectDefinition class methodsFor:'update description'!
+autoloadedClassNamesGeneratedCodeToCompile
+ |classNamesCode|
+
+ classNamesCode := 'autoloaded_classNames', String lf, '"This method has been automatically generated"'.
+ classNamesCode := classNamesCode, String lf, self autoloadedClassNamesGeneratedString.
+ ^classNamesCode
+
+"
+ DapasXProject autoloadedClassNamesGeneratedCodeToCompile
+ DapasX_Datenbasis autoloadedClassNamesGeneratedCodeToCompile
+
+"
+
+ "Created: / 08-08-2006 / 15:07:06 / fm"
+!
+
+autoloadedClassNamesGeneratedString
+ | |
+
+ ^ String streamContents:[:s |
+ s nextPutAll:'^#('.
+ self searchForClassesWithProject do:[:eachClass |
+ (eachClass wasAutoloaded or:[ eachClass isLoaded not ]) ifTrue:[
+ (self compiled_classNames includes:eachClass name) ifFalse:[
+ (self excluded_classNames includes:eachClass name) ifFalse:[
+ s cr; nextPutAll:eachClass name asString storeString
+ ]
+ ]
+ ]
+ ].
+ s cr; nextPutAll:')'
+ ].
+
+"
+ bosch_dapasx_interactiver_editor_Definition autoloadedClassNamesGeneratedString
+"
+
+ "Created: / 08-08-2006 / 15:00:17 / fm"
+ "Modified: / 08-08-2006 / 19:24:34 / fm"
+!
+
classNamesGeneratedCodeToCompile
|classNamesCode|
- classNamesCode := 'classNames', String lf, '"This method has been automatically generated"'.
+ classNamesCode := 'compiled_classNames', String lf, '"This method has been automatically generated"'.
classNamesCode := classNamesCode, String lf, self classNamesGeneratedString.
^classNamesCode
"
- DapasXProject classNamesGeneratedCodeToCompile
- DapasX_Datenbasis classNamesGeneratedCodeToCompile
+ DapasXProject Datenbasis
+ DapasX_Datenbasis Datenbasis
"
@@ -956,16 +1062,22 @@
!
classNamesGeneratedString
- |generatedString |
+ | |
- generatedString := self searchForClassesWithProject
- inject: '^#('
- into:[:string :each |
- string, String lf, each name asString storeString].
- ^generatedString, String lf, ')'
+ ^ String streamContents:[:s |
+ s nextPutAll:'^#('.
+ self searchForClassesWithProject do:[:eachClass |
+ (self autoloaded_classNames includes:eachClass name) ifFalse:[
+ (self excluded_classNames includes:eachClass name) ifFalse:[
+ s cr; nextPutAll:eachClass name asString storeString
+ ]
+ ]
+ ].
+ s cr; nextPutAll:')'
+ ].
"
- self classNamesGeneratedString
+ bosch_dapasx_interactiver_editor_Definition classNamesGeneratedString
"
"Created: / 08-08-2006 / 15:00:17 / fm"
@@ -973,11 +1085,23 @@
!
compileClassNames
+ self theMetaclass
+ compile: self autoloadedClassNamesGeneratedCodeToCompile
+ classified: 'project description'.
- self theMetaclass compile: self classNamesGeneratedCodeToCompile
- classified: 'project description'
+ self theMetaclass
+ compile: self classNamesGeneratedCodeToCompile
+ classified: 'project description'.
+
+ (self theMetaclass includesSelector:#excluded_classNames) ifFalse:[
+ self theMetaclass
+ compile: 'excluded_classNames\^ #()' withCRs
+ classified: 'project description'.
+ ].
"
+ bosch_dapasx_interactiver_editor_Definition compileClassNames
+
DapasXProject compileClassNames
DapasX_Datenbasis compileClassNames
@@ -1133,7 +1257,7 @@
requiredPackages := Set new.
myPackageID := self package.
- self classesDo:[:includedClass |
+ self compiled_classesDo:[:includedClass |
includedClass allSuperclassesDo:[:eachSuperClass |
((eachSuperClass package ~= myPackageID)
and:[ (self moduleOfClass: eachSuperClass) ~= 'stx' ])
@@ -1152,32 +1276,6 @@
"
"Created: / 09-08-2006 / 16:26:37 / fm"
-!
-
-searchForSubProjectsForProject:aProjectID
-
- self classNames do:[:includedClass |
- includedClass allSuperclassesDo:[:superClass |
- ((self moduleOfClass: superClass) = 'stx') not]]
-
-"
- self searchForSubProjectsForProject:#'bosch:dapasx'
-"
-
- "Created: / 09-08-2006 / 12:58:30 / fm"
- "Modified: / 09-08-2006 / 16:15:38 / fm"
-!
-
-searchForSubProjectsWithProject
-
- ^self searchForSubProjectsForProject: self package
-
-"
- DapasXProject searchForSubProjectsWithProject
- DapasX_Datenbasis searchForSubProjectsWithProject
-"
-
- "Created: / 09-08-2006 / 13:00:11 / fm"
! !
!ProjectDefinition class methodsFor:'xxx'!
@@ -1215,5 +1313,5 @@
!ProjectDefinition class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/LibraryDefinition.st,v 1.1 2006-08-09 18:03:25 fm Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/LibraryDefinition.st,v 1.2 2006-08-09 19:33:26 fm Exp $'
! !