MCStXPackageInfo.st
changeset 735 b7d63bf3b328
parent 686 24cbb3e4461c
child 846 e6a552e98448
--- a/MCStXPackageInfo.st	Wed Mar 20 20:42:32 2013 +0100
+++ b/MCStXPackageInfo.st	Thu Mar 21 17:09:27 2013 +0100
@@ -1,7 +1,7 @@
 "{ Package: 'stx:goodies/monticello' }"
 
 PackageInfo subclass:#MCStXPackageInfo
-	instanceVariableNames:'projectDefinition'
+	instanceVariableNames:'projectDefinition classes'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'SCM-Monticello-St/X support'
@@ -11,12 +11,22 @@
 !MCStXPackageInfo methodsFor:'accessing'!
 
 classes
-
-    | classes |
+    classes isNil ifTrue:[
+        classes := self projectDefinition classes.
+        "/ cg: not true; the projectDefinition is part of the package; at least for st/x packages.
+        "/ classes remove: self projectDefinition ifAbsent:[].
 
-    classes := self projectDefinition classes.
-    "/ cg: not true; the projectDefinition is part of the package; at least for st/x packages.
-    "/ classes remove: self projectDefinition ifAbsent:[].
+        (classes includes:nil) ifTrue:[
+            "/ some classes are not present - usually, these are architecture spcific classes
+            "/ which are not present in this image (such as XWorkstation vs. WinWorkstation).
+            "/ should do a query signal here, to get this info, instead of doing UI here..
+            (Dialog confirm:'Not all classes as defined in the package are present in your image.\Typically, these are architecture or OS specific classes.\If you proceed, those classes will be missing in the enerated package file.\\Proceed?' withCRs)
+            ifFalse:[
+                AbortSignal raise
+            ].
+            classes := classes select:[:cls | cls notNil].
+        ].
+    ].
     ^classes
 
     "Created: / 23-08-2011 / 11:55:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -65,13 +75,14 @@
 !MCStXPackageInfo class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCStXPackageInfo.st,v 1.5 2012-09-11 21:29:15 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCStXPackageInfo.st,v 1.6 2013-03-21 16:09:27 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCStXPackageInfo.st,v 1.5 2012-09-11 21:29:15 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCStXPackageInfo.st,v 1.6 2013-03-21 16:09:27 cg Exp $'
 !
 
 version_MC
     ^ '§stx:goodies/monticello-cg.3 4e70fe70-f030-11e1-ac62-001f3bda2d09 2012-08-27T12:16:46 cg§'
 ! !
+