]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Update to just keep several line JAVA related msg; 2. Remove file PropertyManager...
authorwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 10 Oct 2006 02:40:59 +0000 (02:40 +0000)
committerwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 10 Oct 2006 02:40:59 +0000 (02:40 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1698 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java
Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java
Tools/Java/Source/GenBuild/org/tianocore/build/global/PropertyManager.java [deleted file]
Tools/Java/Source/GenBuild/org/tianocore/build/pcd/action/PlatformPcdPreprocessActionForBuilding.java

index fce5108024840d7f3671f491ed8e0cbe565c6947..53d5cea8bb1e11c89dea571673207025290cea1f 100644 (file)
@@ -115,6 +115,11 @@ public class FrameworkBuildTask extends Task{
         \r
         try {\r
             processFrameworkBuild();\r
+        }catch (BuildException e) {\r
+            //\r
+            // Add more logic process here\r
+            //\r
+            throw new BuildException(e.getMessage());\r
         } catch (PcdAutogenException e) {\r
             //\r
             // Add more logic process here\r
index d614e67865ea76b3c068847305a3f4e244696669..b047fab425d674af9c6c48fa61027b293b0dfc65 100644 (file)
@@ -134,30 +134,25 @@ public class GenBuildTask extends Ant {
         try {\r
             processGenBuild();\r
         } catch (PcdAutogenException e) {\r
-            //\r
-            // Add more logic process here\r
-            //\r
-            throw new BuildException(e.getMessage());\r
+            BuildException buildException = new BuildException(e.getMessage());\r
+            buildException.setStackTrace(e.getStackTrace());\r
+            throw buildException;\r
         } catch (AutoGenException e) {\r
-            //\r
-            // Add more logic process here\r
-            //\r
-            throw new BuildException(e.getMessage());\r
+            BuildException buildException = new BuildException(e.getMessage());\r
+            buildException.setStackTrace(e.getStackTrace());\r
+            throw buildException;\r
         } catch (PlatformPcdPreprocessBuildException e) {\r
-            //\r
-            // Add more logic process here\r
-            //\r
-            throw new BuildException(e.getMessage());\r
+            BuildException buildException = new BuildException(e.getMessage());\r
+            buildException.setStackTrace(e.getStackTrace());\r
+            throw buildException;\r
         } catch (GenBuildException e) {\r
-            //\r
-            // Add more logic process here\r
-            //\r
-            throw new BuildException(e.getMessage());\r
+            BuildException buildException = new BuildException(e.getMessage());\r
+            buildException.setStackTrace(e.getStackTrace());\r
+            throw buildException;\r
         } catch (EdkException e) {\r
-            //\r
-            // Add more logic process here\r
-            //\r
-            throw new BuildException(e.getMessage());\r
+            BuildException buildException = new BuildException(e.getMessage());\r
+            buildException.setStackTrace(e.getStackTrace());\r
+            throw buildException;\r
         }\r
     }\r
 \r
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/global/PropertyManager.java b/Tools/Java/Source/GenBuild/org/tianocore/build/global/PropertyManager.java
deleted file mode 100644 (file)
index 1bd7cf9..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-/** @file\r
-  PropertyManager class.\r
-  \r
-  PropertyManager class wraps Project.setProperty and tracks overrided properties.\r
\r
-Copyright (c) 2006, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-**/\r
-package org.tianocore.build.global;\r
-\r
-import java.util.HashMap;\r
-import java.util.Hashtable;\r
-import java.util.Iterator;\r
-import java.util.Set;\r
-import java.util.Stack;\r
-\r
-import org.apache.tools.ant.Project;\r
-import org.apache.tools.ant.PropertyHelper;\r
-\r
-/**\r
-   PropertyManager uses a incremental way to to track overrided properties when \r
-   setProperty. This is useful for property recovery in nestly calling build files.\r
-   Another functionality of this class is to prevent warning message printed when\r
-   building with "verbose" mode.\r
- **/\r
-public class PropertyManager {\r
-    //\r
-    // Property table stack, keeps track the history of properties changes\r
-    // \r
-    private static Stack<HashMap<String, String>> propertyTableStack = new Stack<HashMap<String, String>>();\r
-    //\r
-    // The very original properties\r
-    // \r
-    private static HashMap<String, String> orgPropertyTable = null;\r
-    //\r
-    // The last changes of properties\r
-    // \r
-    private static HashMap<String, String> oldPropertyTable = null;\r
-    //\r
-    // The current changes of properties\r
-    // \r
-    private static HashMap<String, String> bakPropertyTable = null;\r
-    //\r
-    // The Project of tracking properties\r
-    // \r
-    private static Project prj = null;\r
-    //\r
-    // PropertyHelper of this project for setting property quietly\r
-    // \r
-    private static PropertyHelper ph = null;\r
-\r
-    /**\r
-       Backup properties that have been overrided onto the stack for later recovery.\r
-     **/\r
-    public static void save() {\r
-        //\r
-        // If this is the first time to save properties changes, keep all properties\r
-        // of this project as the original property table.\r
-        // \r
-        if (orgPropertyTable == null) {\r
-            Hashtable prjProperties = prj.getProperties();\r
-            orgPropertyTable = new HashMap<String, String>();\r
-\r
-            Set keys = prjProperties.keySet();\r
-            Iterator iter = keys.iterator();\r
-            while (iter.hasNext()) {\r
-                String item = (String)iter.next();\r
-                orgPropertyTable.put(item, (String)prjProperties.get(item));\r
-            }\r
-        }\r
-\r
-        //\r
-        // If there're already overrided properties, push it onto stack; otherwise\r
-        // prepare taking new overrided property by allocating space for it.\r
-        // \r
-        if (bakPropertyTable != null) {\r
-            propertyTableStack.push(bakPropertyTable);\r
-            oldPropertyTable = bakPropertyTable;\r
-        } else {\r
-            oldPropertyTable = orgPropertyTable;\r
-        }\r
-        bakPropertyTable = new HashMap<String, String>();\r
-    }\r
-\r
-    /**\r
-       Restore the properties backup\r
-     **/\r
-    public static void restore() {\r
-        if (bakPropertyTable == null) {\r
-            //\r
-            // No properties backup, do nothing \r
-            // \r
-            return;\r
-        }\r
-        Set keys = bakPropertyTable.keySet();\r
-\r
-        //\r
-        // Re-set properties in backup\r
-        // \r
-        Iterator iter = keys.iterator();\r
-        while (iter.hasNext()) {\r
-            String name = (String)iter.next();\r
-            String value = (String)bakPropertyTable.get(name);\r
-            ph.setProperty(null, name, value, false);\r
-        }\r
-\r
-        //\r
-        // If there's backup history, get top one for next recovery\r
-        // \r
-        if (propertyTableStack.size() > 0) {\r
-            bakPropertyTable = (HashMap<String, String>)propertyTableStack.pop();\r
-        } else {\r
-            bakPropertyTable = null;    // no recovery any more\r
-        }\r
-\r
-        //\r
-        // Determine last overrided properties for incremental judgement\r
-        // \r
-        if (propertyTableStack.size() == 0) {\r
-            oldPropertyTable = orgPropertyTable;\r
-        } else {\r
-            oldPropertyTable = (HashMap<String, String>)propertyTableStack.peek();\r
-        }\r
-    }\r
-\r
-    /**\r
-       Set current Project for save() and restore() use.\r
-\r
-       @param prj\r
-     **/\r
-    public static void setProject(Project prj) {\r
-        PropertyManager.prj = prj;\r
-        PropertyManager.ph  = PropertyHelper.getPropertyHelper(prj);\r
-    }\r
-\r
-    /**\r
-       Set a property for current project. It will also be put into property\r
-       history record if the record table has been setup.\r
-\r
-       @param name      Property name\r
-       @param value     Property value\r
-     **/\r
-    public static void setProperty(String name, String value) {\r
-        if (prj == null) {\r
-            return;\r
-        }\r
-\r
-        setProperty(prj, name, value);\r
-    }\r
-\r
-    /**\r
-       Set a property for current project. It will also be put into property\r
-       history record if the record table has been setup.\r
-\r
-       @param project   The Project for which the property will be set\r
-       @param name      Property name\r
-       @param value     Property value\r
-     **/\r
-    public static void setProperty(Project project, String name, String value) {\r
-        if (project == null) {\r
-            if (prj == null) {\r
-                return; // a Project must be given; otherwise nothing can be set\r
-            }\r
-            project = prj;\r
-        }\r
-\r
-        //\r
-        // Using PropertyHelper to set a property can be quiet (no override\r
-        // warning preset).\r
-        // \r
-        PropertyHelper.getPropertyHelper(project).setProperty(null, name, value, false);\r
-\r
-        //\r
-        // If no property override history record is found, do nothing further\r
-        // \r
-        if (oldPropertyTable == null || bakPropertyTable == null) {\r
-            return;\r
-        }\r
-\r
-        //\r
-        // Put a copy of given property in history record.\r
-        // \r
-        String oldValue = oldPropertyTable.get(name);\r
-        if (oldValue == null) {\r
-            oldValue = value;\r
-        }\r
-        bakPropertyTable.put(name, oldValue);\r
-    }\r
-}\r
-\r
index 6d71dd3b3708f7883f71e50d797317872952d8e4..5ce11c546a32fc9f3f9cd3e41f7e5054e213de85 100644 (file)
@@ -51,11 +51,6 @@ public class PlatformPcdPreprocessActionForBuilding extends PlatformPcdPreproces
     ///\r
     private String                      fpdFilePath;\r
 \r
-    ///\r
-    /// Message level for CollectPCDAction.\r
-    ///\r
-    private int                         originalMessageLevel;\r
-\r
     ///\r
     /// Cache the fpd docment instance for private usage.\r
     ///\r