# HG changeset patch # User Claus Gittinger # Date 1316343914 -7200 # Node ID d3fe511856fc2b73cd90c82fa3566700bac6c8a5 # Parent 277f3a5697e8b20fad9525a39a1250ce2b36b204 changed: #validateDescription diff -r 277f3a5697e8 -r d3fe511856fc ProjectDefinition.st --- a/ProjectDefinition.st Thu Sep 15 16:39:02 2011 +0200 +++ b/ProjectDefinition.st Sun Sep 18 13:05:14 2011 +0200 @@ -6390,46 +6390,54 @@ !ProjectDefinition class methodsFor:'sanity checks'! validateDescription - |emptyProjects nonProjects emptyOrNonProjects classesInImage classesInDescription| + |emptyProjects nonProjects emptyOrNonProjects classesInImage classesInDescription onlyInImage onlyInDescription| emptyProjects := Set withAll:self subProjects. Smalltalk allClassesDo:[:cls | - emptyProjects remove:(cls package) ifAbsent:[]. + emptyProjects remove:(cls package) ifAbsent:[]. ]. nonProjects := self subProjects select:[:p | - (ProjectDefinition definitionClassForPackage: p) isNil - ]. + (ProjectDefinition definitionClassForPackage: p) isNil + ]. emptyOrNonProjects := Set withAll:emptyProjects. emptyOrNonProjects addAll:nonProjects. emptyOrNonProjects notEmpty ifTrue:[ - (Dialog - confirm:('The following projects are non-existent, empty or without description:\\ ' - , ((emptyOrNonProjects - asSortedCollection - collect:[:p | p allBold]) - asStringWith:'\ ') - , '\\Continue ?') withCRs - yesLabel:'OK' noLabel:'Cancel') - ifFalse:[ - AbortSignal raise - ]. + (Dialog + confirm:('The following projects are non-existent, empty or without description:\\ ' + , ((emptyOrNonProjects + asSortedCollection + collect:[:p | p allBold]) + asStringWith:'\ ') + , '\\Continue ?') withCRs + yesLabel:'OK' noLabel:'Cancel') + ifFalse:[ + AbortSignal raise + ]. ]. classesInImage := Smalltalk allClasses select:[:cls | cls package = self package]. classesInDescription := self classes asIdentitySet. classesInImage ~= classesInDescription ifTrue:[ - (Dialog confirm:'The set of classes in the image is different from the listed classes in the project definition.\\Proceed?' withCRs) ifFalse:[ - AbortSignal raiseRequest - ] + onlyInImage := (classesInImage reject:[:cls | classesInDescription includes:cls]). + onlyInImage notEmpty ifTrue:[ + Transcript show:'only in image: '; showCR:onlyInImage + ]. + onlyInDescription := (classesInDescription reject:[:cls | classesInImage includes:cls]). + onlyInDescription notEmpty ifTrue:[ + Transcript show:'only in description: '; showCR:onlyInDescription + ]. + (Dialog confirm:'The set of classes in the image is different from the listed classes in the project definition.\\Proceed?' withCRs) ifFalse:[ + AbortSignal raiseRequest + ] ]. " squeak_vmMaker validateDescription " - "Modified: / 14-09-2011 / 15:41:15 / cg" + "Modified: / 17-09-2011 / 15:48:42 / cg" ! ! !ProjectDefinition class methodsFor:'testing'! @@ -6501,11 +6509,11 @@ !ProjectDefinition class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.359 2011-09-15 12:15:54 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.360 2011-09-18 11:05:14 cg Exp $' ! version_CVS - ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.359 2011-09-15 12:15:54 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.360 2011-09-18 11:05:14 cg Exp $' ! version_SVN