Project.st
changeset 4909 bc474f9c0180
parent 4900 7371c0da8359
child 4912 43182d65eaf2
--- a/Project.st	Wed Oct 13 14:27:39 1999 +0200
+++ b/Project.st	Wed Oct 13 17:04:18 1999 +0200
@@ -548,6 +548,12 @@
     "Modified: / 7.3.1998 / 13:38:39 / cg"
 ! !
 
+!Project class methodsFor:'misc'!
+
+projectFileFormatVersion
+    ^ 1
+! !
+
 !Project methodsFor:'accessing'!
 
 addSubProject:aProject
@@ -980,13 +986,16 @@
 loadFromProjectFile:aFilename
     "fill all of my attributes from a projects file (.prj-file)"
 
-    |f l pack targetConditions s sourcesSubDir files module methodsFile|
+    |f l pack targetConditions s sourcesSubDir files module methodsFile
+     formatVersion|
 
     f := aFilename asFilename.
     directoryName := f directory pathName.
     self directory:(f directory pathName).
     pack := ResourcePack fromFile:f baseName directory:directoryName.
 
+    formatVersion := pack at:'fileFormatVersion' ifAbsent:nil.
+
     "/ convert the resourcePack ...
 
     packageName := pack at:'package' ifAbsent:packageName.
@@ -1059,11 +1068,21 @@
             className := info.
         ] ifFalse:[
             className := info at:1.
-            info size > 1 ifTrue:[
-                condKey := info at:2.
-                info size > 2 ifTrue:[
-                    optionalFileName := info at:3.
-                ]
+            formatVersion == 0 ifTrue:[
+                info size > 1 ifTrue:[
+                    optionalFileName := info at:2.
+                    info size > 2 ifTrue:[
+                        condKey := info at:3.
+                    ]
+                ].
+            ] ifFalse:[
+                className := info at:1.
+                info size > 1 ifTrue:[
+                    condKey := info at:2.
+                    info size > 2 ifTrue:[
+                        optionalFileName := info at:3.
+                    ]
+                ].
             ].
         ].
         self 
@@ -1156,6 +1175,8 @@
 ; the value is a smalltalk literal expression.
 '.
 
+    s nextPutAll:'fileFormatVersion'; tab; nextPutLine:(self class projectFileFormatVersion printString).
+
     s nextPutAll:'
 ;
 ; general:
@@ -3319,6 +3340,6 @@
 !Project class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.126 1999-10-11 15:56:23 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.127 1999-10-13 15:04:18 cg Exp $'
 ! !
 Project initialize!