--- a/ProjectDefinition.st Mon Oct 26 17:06:43 2009 +0100
+++ b/ProjectDefinition.st Mon Oct 26 17:19:51 2009 +0100
@@ -1077,7 +1077,13 @@
attributes := eachClass isLoaded ifTrue:[ #() ] ifFalse:[ #(autoload) ].
].
].
-
+ "JV @ 2009-10-26
+ Give a project definition to specify additional attributes for given class."
+ (self additionalClassAttributesFor: eachClass) do:[:attr|
+ (attributes includes: attr) ifFalse:[
+ attributes := attributes copyWith: attr
+ ]
+ ].
newEntry := Array with:className.
attributes notEmptyOrNil ifTrue:[
newEntry := newEntry , attributes.
@@ -1098,6 +1104,7 @@
"Modified: / 08-08-2006 / 19:24:34 / fm"
"Created: / 10-10-2006 / 22:00:50 / cg"
"Modified: / 22-02-2007 / 15:06:37 / cg"
+ "Modified: / 26-10-2009 / 13:02:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
companyName_code
@@ -1581,6 +1588,37 @@
!ProjectDefinition class methodsFor:'description - classes'!
+additionalClassAttributesFor: aClass
+ "Answers additional set of class attributes for given class
+ Individual project definitions may override this method, but
+ overriding method should always merge its attributes with result
+ of 'super additionalClassAttributesFor: aClass'.
+
+ Here, we add #autoload attributes to all test cases and
+ test resources, as they are not neccessary for the package
+ and should not be compiled (because of unwanted dependency
+ on stx:goodies/sunit package)
+ "
+
+ (aClass inheritsFrom: TestCase) ifTrue:[^#(autoload)].
+ (aClass inheritsFrom: TestResource) ifTrue:[^#(autoload)].
+
+ "No additional attributes"
+ ^#()
+
+ "
+ stx_libbasic additionalClassAttributesFor: Object
+ stx_libtool additionalClassAttributesFor: Tools::NavigationHistoryTests
+ stx_goodies_sunit additionalClassAttributesFor: TestCase
+
+
+ stx_libtool classNamesAndAttributes_code_ignoreOldEntries:true ignoreOldDefinition: true
+
+ "
+
+ "Created: / 26-10-2009 / 12:54:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
additionalClassNamesAndAttributes
^ #()
@@ -4869,11 +4907,11 @@
!ProjectDefinition class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.269 2009-10-26 16:06:43 fm Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.270 2009-10-26 16:19:51 fm Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.269 2009-10-26 16:06:43 fm Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.270 2009-10-26 16:19:51 fm Exp $'
! !
ProjectDefinition initialize!