]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java
Fixed grammar in messages.
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / global / GlobalData.java
index a769816720f39c4b948cd82f05cbe4c0a2c0044e..1e7568757af2ef77e978d26a8e0c2a0193134334 100644 (file)
@@ -35,7 +35,7 @@ import org.tianocore.build.id.FpdModuleIdentification;
 import org.tianocore.build.id.ModuleIdentification;\r
 import org.tianocore.build.id.PackageIdentification;\r
 import org.tianocore.build.id.PlatformIdentification;\r
-import org.tianocore.build.pcd.entity.MemoryDatabaseManager;\r
+import org.tianocore.pcd.entity.MemoryDatabaseManager;\r
 import org.tianocore.build.toolchain.ToolChainAttribute;\r
 import org.tianocore.build.toolchain.ToolChainConfig;\r
 import org.tianocore.build.toolchain.ToolChainElement;\r
@@ -107,7 +107,7 @@ public class GlobalData {
     ///\r
     /// PCD memory database stored all PCD information which collected from FPD,MSA and SPD.\r
     ///\r
-//    private static final MemoryDatabaseManager pcdDbManager = new MemoryDatabaseManager();\r
+    private static final MemoryDatabaseManager pcdDbManager = new MemoryDatabaseManager();\r
 \r
     ///\r
     /// build target + tool chain family/tag name + arch + command types + command options\r
@@ -130,8 +130,6 @@ public class GlobalData {
     private static Map<FpdModuleIdentification, ToolChainMap> moduleToolChainOption = new HashMap<FpdModuleIdentification, ToolChainMap>();\r
     private static Map<FpdModuleIdentification, ToolChainMap> moduleToolChainFamilyOption = new HashMap<FpdModuleIdentification, ToolChainMap>();\r
 \r
-    private static final MemoryDatabaseManager pcdDbManager = new MemoryDatabaseManager();\r
-\r
     /**\r
       Parse framework database (DB) and all SPD files listed in DB to initialize\r
       the environment for next build. This method will only be executed only once\r
@@ -164,7 +162,7 @@ public class GlobalData {
         // CONF dir + tools definition file name\r
         //\r
         File toolsDefFile = new File(workspaceDir + File.separatorChar + toolsDefFilename);\r
-        System.out.println("Using file [" + toolsDefFile.getPath() + "] as tools definition file. ");\r
+        System.out.println("Using tool definiton file [" + toolsDefFile.getPath() + "].");\r
         toolsDef = new ToolChainConfig(toolsDefFile);\r
         \r
         //\r
@@ -177,7 +175,7 @@ public class GlobalData {
             // validate FrameworkDatabaseFile\r
             //\r
             if (! db.validate()) {\r
-                throw new BuildException("Framework Database file [" + dbFile.getPath() + "] is invalid.");\r
+                throw new BuildException("Framework Database file [" + dbFile.getPath() + "] format is invalid!");\r
             }\r
             //\r
             // Get package list\r
@@ -210,7 +208,7 @@ public class GlobalData {
                     // Verify FPD file, if is invalid, throw Exception\r
                     //\r
                     if (! fpdDoc.validate()) {\r
-                        throw new BuildException("Framework Platform Surface Area file [" + fpdFile.getPath() + "] is invalid. ");\r
+                        throw new BuildException("Framework Platform Surface Area file [" + fpdFile.getPath() + "] format is invalid!");\r
                     }\r
                     //\r
                     // We can change Map to XmlObject\r
@@ -227,7 +225,7 @@ public class GlobalData {
                 }\r
             }\r
         } catch (Exception e) {\r
-            throw new BuildException("Parse workspace Database [" + dbFile.getPath() + "] Error.\n" + e.getMessage());\r
+            throw new BuildException("Parse WORKSPACE Database file [" + dbFile.getPath() + "] Error.\n" + e.getMessage());\r
         }\r
     }\r
     \r
@@ -259,7 +257,7 @@ public class GlobalData {
             }\r
         }\r
         if (msaFile == null){\r
-            throw new BuildException("Can't find Module [" + moduleId.getName() + "] in all packages. ");\r
+            throw new BuildException("Can't find Module [" + moduleId.getName() + "] in any SPD package!");\r
         }\r
         else {\r
             return msaFile;\r
@@ -285,7 +283,7 @@ public class GlobalData {
             }\r
         }\r
         if (packageId == null){\r
-            throw new BuildException("Can't find Module [" + moduleId.getName() + "] in all packages. ");\r
+            throw new BuildException("Can't find Module [" + moduleId.getName() + "] in any SPD package!");\r
         }\r
         else {\r
             return packageId;\r
@@ -389,7 +387,7 @@ public class GlobalData {
     \r
     public synchronized static Map<String, XmlObject> getNativeMsa(File msaFile) throws BuildException {\r
         if (! msaFile.exists()) {\r
-            throw new BuildException("Surface Area file [" + msaFile.getPath() + "] can't found.");\r
+            throw new BuildException("Module Surface Area file [" + msaFile.getPath() + "] can't be found!");\r
         }\r
         try {\r
             ModuleSurfaceAreaDocument doc = (ModuleSurfaceAreaDocument)XmlObject.Factory.parse(msaFile);\r
@@ -397,7 +395,7 @@ public class GlobalData {
             // Validate File if they accord with XML Schema\r
             //\r
             if ( ! doc.validate()){\r
-                throw new BuildException("Module Surface Area file [" + msaFile.getPath() + "] is invalid.");\r
+                throw new BuildException("Module Surface Area file [" + msaFile.getPath() + "] format is invalid!");\r
             }\r
             //\r
             // parse MSA file\r
@@ -477,7 +475,7 @@ public class GlobalData {
         // If can't find library class declaration in every package\r
         //\r
         throw new BuildException("Can not find library class [" + name\r
-                + "] declaration in every packages. ");\r
+                + "] declaration in any SPD package!");\r
     }\r
 \r
     /**\r
@@ -583,7 +581,7 @@ public class GlobalData {
                 return platformId;\r
             }\r
         }\r
-        throw new BuildException("Can't find platform [" + name + "] in current workspace database. ");\r
+        throw new BuildException("Can't find platform [" + name + "] in the current WORKSPACE database!");\r
     }\r
     \r
     public synchronized static PlatformIdentification getPlatform(String filename) throws BuildException {\r
@@ -595,7 +593,7 @@ public class GlobalData {
                 return platformId;\r
             }\r
         }\r
-        throw new BuildException("Can't find platform file [" + filename + "] in current workspace database. ");\r
+        throw new BuildException("Can't find platform file [" + filename + "] in the current WORKSPACE database!");\r
     }\r
     \r
     public synchronized static PackageIdentification refreshPackageIdentification(PackageIdentification packageId) throws BuildException {\r
@@ -608,7 +606,7 @@ public class GlobalData {
                 return packageId;\r
             }\r
         }\r
-        throw new BuildException("Can't find package GUID value " + packageId.getGuid() + " under current workspace. ");\r
+        throw new BuildException("Can't find package GUID value " + packageId.getGuid() + " in the current workspace!");\r
     }\r
     \r
     public synchronized static ModuleIdentification refreshModuleIdentification(ModuleIdentification moduleId) throws BuildException {\r
@@ -619,7 +617,7 @@ public class GlobalData {
         moduleId.setPackage(packageId);\r
         Spd spd = spdTable.get(packageId);\r
         if (spd == null) {\r
-            throw new BuildException("Can't find package GUID value " + packageId.getGuid() + " under current workspace. ");\r
+            throw new BuildException("Can't find package GUID value " + packageId.getGuid() + " in the current workspace!");\r
         }\r
         Set<ModuleIdentification> modules = spd.getModules();\r
         Iterator<ModuleIdentification> iter = modules.iterator();\r
@@ -632,7 +630,7 @@ public class GlobalData {
                 return moduleId;\r
             }\r
         }\r
-        throw new BuildException("Can't find module GUID value " + moduleId.getGuid() + " in " + packageId + " under current workspace. ");\r
+        throw new BuildException("Can't find module GUID value " + moduleId.getGuid() + " in package, " + packageId + ", in the current workspace!");\r
     }\r
     \r
     public synchronized static Set<PackageIdentification> getPackageList(){\r
@@ -781,8 +779,8 @@ public class GlobalData {
     //\r
     // For PCD get tokenSpaceGUid\r
     //\r
-    public synchronized static String[] getGuidInfoFromCname(String cName){\r
-        String cNameGuid[] = null;\r
+    public synchronized static String getGuidInfoFromCname(String cName){\r
+        String cNameGuid = null;\r
         String guid = null;\r
         Set set = spdTable.keySet();\r
         Iterator iter = set.iterator();\r
@@ -795,9 +793,7 @@ public class GlobalData {
             Spd spd = (Spd) spdTable.get(iter.next());\r
             guid = spd.getGuidFromCname(cName);\r
             if (guid != null){\r
-                cNameGuid = new String[2];\r
-                cNameGuid[0] = cName;\r
-                cNameGuid[1] = guid;\r
+                cNameGuid = guid;\r
                 break;\r
             }\r
         }\r