--- a/ProjectDefinition.st Thu Jun 21 15:13:25 2018 +0200
+++ b/ProjectDefinition.st Thu Jun 21 18:14:32 2018 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 2006 by eXept Software AG
All Rights Reserved
@@ -1430,6 +1428,22 @@
"Created: / 18-08-2006 / 16:21:01 / cg"
!
+checkForBadReferences:prerequsiteList
+ "check, that there are no 'illegal' references to prerequisites.
+ If there is a bad prrequisite, ask the user whether to abort."
+
+ prerequsiteList keysDo:[:eachPackageSymbol|
+ |defClass|
+
+ defClass := self definitionClassForPackage:eachPackageSymbol.
+ (defClass isProjectDefinition and:[defClass isPluginDefinition]) ifTrue:[
+ (self confirm:('Bad cross-plugin requirement to: %1%<cr>%<cr>Proceed?' bindWith:eachPackageSymbol)) ifFalse:[
+ AbortOperationRequest raiseRequest.
+ ].
+ ].
+ ]
+!
+
classNamesAndAttributes_codeFor:aSpecArray
"generate method code returning all classes of the project from the given spec."
@@ -1922,26 +1936,29 @@
|preRequisites|
preRequisites := self searchForPreRequisites first.
- preRequisites removeAllKeys:self excludedFromMandatoryPreRequisites ifAbsent:[].
- preRequisites removeAllKeys:self excludedFromPreRequisites ifAbsent:[].
+ preRequisites
+ removeAllKeys:self excludedFromMandatoryPreRequisites ifAbsent:[];
+ removeAllKeys:self excludedFromPreRequisites ifAbsent:[].
+
+ self checkForBadReferences:preRequisites.
^ String streamContents:[:s |
- s nextPutLine:'mandatoryPreRequisites'.
- s nextPutAll: ' "'; nextPutAll: (self class superclass lookupMethodFor: #mandatoryPreRequisites) comment; nextPutLine:'"'.
- s nextPutLine:''.
- s nextPutLine:' ^ #('.
- preRequisites keys asSortedCollection do:[:eachPackageID |
- |reason|
-
- s spaces:8.
- eachPackageID asSymbol storeOn:s.
- reason := preRequisites at:eachPackageID ifAbsent:[nil].
- reason notEmptyOrNil ifTrue:[
- s nextPutAll:' "'; nextPutAll:reason anElement; nextPut:$".
- ].
- s cr.
- ].
- s nextPutLine:' )'
+ s nextPutLine:'mandatoryPreRequisites'.
+ s nextPutAll: ' "'; nextPutAll: (self class superclass lookupMethodFor: #mandatoryPreRequisites) comment; nextPutLine:'"'.
+ s nextPutLine:''.
+ s nextPutLine:' ^ #('.
+ preRequisites keys asSortedCollection do:[:eachPackageID |
+ |reason|
+
+ s spaces:8.
+ eachPackageID asSymbol storeOn:s.
+ reason := preRequisites at:eachPackageID ifAbsent:[nil].
+ reason notEmptyOrNil ifTrue:[
+ s nextPutAll:' "'; nextPutAll:reason anElement; nextPut:$".
+ ].
+ s cr.
+ ].
+ s nextPutLine:' )'
].
"
@@ -2013,27 +2030,29 @@
preRequisitesColl := self searchForPreRequisites.
preRequisites := preRequisitesColl second.
preRequisites
- removeAllKeys:self excludedFromPreRequisites ifAbsent:[];
- removeAllKeys:self excludedFromRequiredPreRequisites ifAbsent:[];
- removeAllKeys:preRequisitesColl first keys ifAbsent:[]. "remove the mandatory prerequisites"
+ removeAllKeys:self excludedFromPreRequisites ifAbsent:[];
+ removeAllKeys:self excludedFromRequiredPreRequisites ifAbsent:[];
+ removeAllKeys:preRequisitesColl first keys ifAbsent:[]. "remove the mandatory prerequisites"
+
+ self checkForBadReferences:preRequisites.
^ String streamContents:[:s |
- s nextPutLine:'referencedPreRequisites'.
- s nextPutAll: ' "'; nextPutAll: (self class superclass lookupMethodFor: #referencedPreRequisites) comment; nextPutLine:'"'.
- s nextPutLine:''.
- s nextPutLine:' ^ #('.
- preRequisites keys asSortedCollection do:[:eachPackageID |
- |reason|
-
- s spaces:8.
- eachPackageID asSymbol storeOn:s.
- reason := preRequisites at:eachPackageID ifAbsent:[nil].
- reason notEmptyOrNil ifTrue:[
- s nextPutAll:' "'; nextPutAll:reason anElement; nextPut:$".
- ].
- s cr.
- ].
- s nextPutLine:' )'
+ s nextPutLine:'referencedPreRequisites'.
+ s nextPutAll: ' "'; nextPutAll: (self class superclass lookupMethodFor: #referencedPreRequisites) comment; nextPutLine:'"'.
+ s nextPutLine:''.
+ s nextPutLine:' ^ #('.
+ preRequisites keys asSortedCollection do:[:eachPackageID |
+ |reason|
+
+ s spaces:8.
+ eachPackageID asSymbol storeOn:s.
+ reason := preRequisites at:eachPackageID ifAbsent:[nil].
+ reason notEmptyOrNil ifTrue:[
+ s nextPutAll:' "'; nextPutAll:reason anElement; nextPut:$".
+ ].
+ s cr.
+ ].
+ s nextPutLine:' )'
].
"
@@ -2897,6 +2916,7 @@
"Created: / 23-01-2007 / 19:08:27 / cg"
! !
+
!ProjectDefinition class methodsFor:'description - project information'!
applicationAdditionalIconFileNames
@@ -4995,6 +5015,7 @@
^ self subProjectMakeCallsUsing:'call vcmake %1 %2'.
! !
+
!ProjectDefinition class methodsFor:'file templates'!
autopackage_default_dot_apspec