**/\r
public class FpdParserTask extends Task {\r
\r
+ ///\r
+ /// Be used to ensure Global data will be initialized only once.\r
+ ///\r
+ private static boolean parsed = false;\r
+\r
private File fpdFile = null;\r
\r
PlatformIdentification platformId;\r
//\r
// Pcd Collection. Call CollectPCDAction to collect pcd info.\r
//\r
- PlatformPcdPreprocessActionForBuilding ca = new PlatformPcdPreprocessActionForBuilding();\r
- ca.perform(platformId.getFpdFile().getPath());\r
+ if (!parsed) {\r
+ PlatformPcdPreprocessActionForBuilding ca = new PlatformPcdPreprocessActionForBuilding();\r
+ ca.perform(platformId.getFpdFile().getPath());\r
+ }\r
} catch (IOException ex) {\r
BuildException buildException = new BuildException("Parsing of the FPD file [" + fpdFile.getPath() + "] failed!\n" + ex.getMessage());\r
buildException.setStackTrace(ex.getStackTrace());\r
buildException.setStackTrace(ex.getStackTrace());\r
throw buildException;\r
}\r
+ if (!parsed) {\r
+ parsed = true;\r
+ }\r
}\r
\r
/**\r