summaryrefslogtreecommitdiff
path: root/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common')
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/DataType.java304
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/DataValidation.java746
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/EnumerationData.java1123
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/FileOperation.java193
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/GlobalData.java300
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/IDefaultTableModel.java37
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/IFileFilter.java91
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/Identification.java113
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningFileType.java71
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleList.java231
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleType.java75
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPackageList.java231
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPackageType.java74
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPlatformList.java217
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPlatformType.java74
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/ToolChainConfigId.java55
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/ToolChainConfigVector.java155
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Log.java301
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/OpenFile.java95
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/SaveFile.java334
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Sort.java378
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Tools.java715
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/XmlConfig.java40
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/Find.java1050
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/FindResult.java651
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/FindResultDetailInfo.java657
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/FindResultId.java124
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/GuidId.java76
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/LibraryClassId.java76
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/PcdFindResultId.java76
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/PcdId.java76
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/PpiId.java76
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/ProtocolId.java76
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ArchCheckBox.java318
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ExitConfirm.java263
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IComboBox.java227
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDefaultMutableTreeNode.java280
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDesktopManager.java76
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDialog.java163
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IFrame.java264
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IInternalFrame.java216
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ITree.java231
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/StarLabel.java64
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxList.java203
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxListCellRenderer.java76
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxListItem.java84
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxListModel.java67
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxListener.java104
48 files changed, 0 insertions, 11527 deletions
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/DataType.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/DataType.java
deleted file mode 100644
index 03a64a69a6..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/DataType.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/** @file
-
- The file is used to define all used final variables
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common;
-
-/**
- The class is used to define all used final variables
-
- **/
-public class DataType {
-
- /**
-
- @param args
-
- **/
- public static void main(String[] args) {
-
- }
-
- //
- // Define all return types
- //
- public static final int RETURN_TYPE_OK = 1;
-
- public static final int RETURN_TYPE_CANCEL = 2;
-
- public static final int RETURN_TYPE_NEXT = 3;
-
- public static final int RETURN_TYPE_BACK = 4;
-
- public static final int RETURN_TYPE_MODULE_SURFACE_AREA = 11;
-
- public static final int RETURN_TYPE_PACKAGE_SURFACE_AREA = 12;
-
- public static final int RETURN_TYPE_PLATFORM_SURFACE_AREA = 13;
-
- public static final int RETURN_TYPE_BUILD_XML = 14;
-
- public static final int RETURN_TYPE_WORKSPACE = 15;
-
- public static final int RETURN_TYPE_TEXT = 16;
-
- public static final int RETURN_TYPE_FAR_SURFACE_AREA = 17;
-
-
- //
- // Define all used final variables
- //
- public static final String DOS_LINE_SEPARATOR = "\r\n";
-
- public static final String UNIX_LINE_SEPARATOR = "\n";
-
- public static final String LINE_SEPARATOR = UNIX_LINE_SEPARATOR;
-
- public static final String HTML_LINE_SEPARATOR = "<br>";
-
- public static final String EMPTY_SELECT_ITEM = "----";
-
- public static final String DOS_FILE_SEPARATOR = "\\";
-
- public static final String UNIX_FILE_SEPARATOR = "/";
-
- //
- // Define xml files ext
- //
- public static final String COPY_OF = "Copy of ";
-
- public static final String FILE_EXT_SEPARATOR = ".";
-
- public static final String WORKSPACE = "Workspace";
-
- public static final String MODULE_SURFACE_AREA = "Module Surface Area Description";
-
- public static final String MODULE_SURFACE_AREA_EXT = "msa";
-
- public static final String MODULE_SURFACE_AREA_EXT_DESCRIPTION = MODULE_SURFACE_AREA + " (*."
- + MODULE_SURFACE_AREA_EXT + ")";
-
- public static final String PACKAGE_SURFACE_AREA = "Package Surface Area Description";
-
- public static final String PACKAGE_SURFACE_AREA_EXT = "spd";
-
- public static final String PACKAGE_SURFACE_AREA_EXT_DESCRIPTION = PACKAGE_SURFACE_AREA + " (*."
- + PACKAGE_SURFACE_AREA_EXT + ")";
-
- public static final String PLATFORM_SURFACE_AREA = "Platform Surface Area Description";
-
- public static final String PLATFORM_SURFACE_AREA_EXT = "fpd";
-
- public static final String PLATFORM_SURFACE_AREA_EXT_DESCRIPTION = PLATFORM_SURFACE_AREA + " (*."
- + PLATFORM_SURFACE_AREA_EXT + ")";
-
- public static final String ANT_BUILD_FILE = "ANT Build File";
-
- public static final String ANT_BUILD_FILE_EXT = "xml";
-
- public static final String ANT_BUILD_FILE_EXT_DESCRIPTION = ANT_BUILD_FILE + " (*." + ANT_BUILD_FILE_EXT + ")";
-
- public static final String TEXT_FILE = "Text File";
-
- public static final String TEXT_FILE_EXT = "txt";
-
- public static final String TEXT_FILE_EXT_DESCRIPTION = TEXT_FILE + " (*." + TEXT_FILE_EXT + ")";
-
- public static final String FAR_SURFACE_AREA = "Framework Archive";
-
- public static final String FAR_SURFACE_AREA_EXT = "far";
-
- public static final String FAR_SURFACE_AREA_EXT_DESCRIPTION = FAR_SURFACE_AREA + " (*." + FAR_SURFACE_AREA_EXT + ")";
- //
- // Define file separator for current OS
- //
- public static String FILE_SEPARATOR = System.getProperty("file.separator");
-
- //
- // Defien all used frame, container component's sizes
- //
- public static final int MAIN_FRAME_PREFERRED_SIZE_WIDTH = 800;
-
- public static final int MAIN_FRAME_PREFERRED_SIZE_HEIGHT = 600;
-
- public static final int MAIN_FRAME_MAX_SIZE_WIDTH = 1920;
-
- public static final int MAIN_FRAME_MAX_SIZE_HEIGHT = 1200;
-
- public static final int MAIN_FRAME_SPLIT_PANEL_PREFERRED_SIZE_WIDTH = 790;
-
- public static final int MAIN_FRAME_SPLIT_PANEL_PREFERRED_SIZE_HEIGHT = 545;
-
- public static final int MAIN_FRAME_WIDTH_SPACING = MAIN_FRAME_PREFERRED_SIZE_WIDTH
- - MAIN_FRAME_SPLIT_PANEL_PREFERRED_SIZE_WIDTH;
-
- public static final int MAIN_FRAME_HEIGHT_SPACING = MAIN_FRAME_PREFERRED_SIZE_HEIGHT
- - MAIN_FRAME_SPLIT_PANEL_PREFERRED_SIZE_HEIGHT;
-
- public static final int MAIN_FRAME_TREE_PANEL_PREFERRED_SIZE_WIDTH = 273;
-
- public static final int MAIN_FRAME_TREE_PANEL_PREFERRED_SIZE_HEIGHT = 545;
-
- public static final int MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_WIDTH = 515;
-
- public static final int MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_HEIGHT = 545;
-
- public static final int MAIN_FRAME_EDITOR_PANEL_LOCATION_X = 260;
-
- public static final int MAIN_FRAME_EDITOR_PANEL_LOCATION_Y = 1;
-
- public static final int SPACE_TO_RIGHT_FOR_GENERATE_BUTTON = 10;
-
- public static final int SPACE_TO_RIGHT_FOR_OK_BUTTON = 10;
-
- public static final int SPACE_TO_RIGHT_FOR_ADD_BUTTON = 200;
-
- public static final int SPACE_TO_RIGHT_FOR_REMOVE_BUTTON = 105;
-
- public static final int SPACE_TO_RIGHT_FOR_UPDATE_BUTTON = 10;
-
- public static final int SPACE_TO_BOTTOM_FOR_ADD_BUTTON = 30;
-
- public static final int SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON = 30;
-
- public static final int SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON = 30;
-
- public static final int SPACE_TO_RIGHT_FOR_CLOSE_BUTTON = 240;
-
- public static final int SPACE_TO_BOTTOM_FOR_CLOSE_BUTTON = 25;
-
- public static final int SPACE_TO_RIGHT_FOR_PROTOCOL_NOTIFY = 25;
-
- public static final int LEFT_WIDTH = 160;
-
- public static final int LEFT_HEIGHT = 20;
-
- public static final int RIGHT_WIDTH = 320;
-
- public static final int RIGHT_HEIGHT = 20;
-
- public static final int RIGHT_MULTIPLE_HEIGHT = 4 * RIGHT_HEIGHT;
-
- public static final int BUTTON_GEN_WIDTH = 65;
-
- public static final int BUTTON_GEN_HEIGHT = 20;
-
- public static final int BUTTON_BROWSE_WIDTH = 65;
-
- public static final int BUTTON_BROWSE_HEIGHT = 20;
-
- public static final int BUTTON_ADD_WIDTH = 80;
-
- public static final int BUTTON_ADD_HEIGHT = 20;
-
- public static final int BUTTON_UPDATE_WIDTH = 80;
-
- public static final int BUTTON_UPDATE_HEIGHT = 20;
-
- public static final int BUTTON_REMOVE_WIDTH = 80;
-
- public static final int BUTTON_REMOVE_HEIGHT = 20;
-
- public static final int SCROLLBAR_WIDTH = 18;
-
- public static final int SCROLLBAR_HEIGHT = 18;
-
- //
- // Common Help Text
- // First defined here
- // Will be replaced by resource file later
- //
- public static final String SUP_ARCH_LIST_HELP_TEXT = "<html>Selecting a checkbox is a restriction of only the selected architectures;<br>If none of boxes are selected, all architectures are supported.<html>";
-
- //
- // Project name and version
- //
- public static final String PROJECT_NAME = "Framework Wizard";
-
- public static final String PROJECT_VERSION = "1.0";
-
- //
- // Sort Type
- //
- public static final int SORT_TYPE_ASCENDING = 1;
-
- public static final int SORT_TYPE_DESCENDING = 2;
-
- //
- // Module Type
- //
- public static final String MODULE_TYPE_LIBRARY = "Library";
-
- public static final String MODULE_TYPE_MODULE = "Module";
-
- //
- // Hex String Header
- //
- public static final String HEX_STRING_HEADER = "0x";
-
- //
- // The String of Boolean
- //
- public static final String TRUE = "True";
-
- public static final String FALSE = "False";
-
- //
- // The String for USAGE type
- //
- public final static String USAGE_TYPE_ALWAYS_CONSUMED = "ALWAYS_CONSUMED";
-
- public final static String USAGE_TYPE_SOMETIMES_CONSUMED = "SOMETIMES_CONSUMED";
-
- public final static String USAGE_TYPE_ALWAYS_PRODUCED = "ALWAYS_PRODUCED";
-
- public final static String USAGE_TYPE_SOMETIMES_PRODUCED = "SOMETIMES_PRODUCED";
-
- public final static String USAGE_TYPE_PRIVATE = "PRIVATE";
-
- public final static String USAGE_TYPE_TO_START = "TO_START";
-
- public final static String USAGE_TYPE_BY_START = "BY_START";
-
- //
- // The String for PCD type
- //
- public final static String PCD_ITEM_TYPE_FEATURE_FLAG = "FEATURE_FLAG";
-
- public final static String PCD_ITEM_TYPE_FIXED_AT_BUILD = "FIXED_AT_BUILD";
-
- public final static String PCD_ITEM_TYPE_PATCHABLE_IN_MODULE = "PATCHABLE_IN_MODULE";
-
- public final static String PCD_ITEM_TYPE_DYNAMIC = "DYNAMIC";
-
- public final static String PCD_ITEM_TYPE_DYNAMIC_EX = "DYNAMIC_EX";
-
- //
- // The String for PPI type
- //
- public final static String PPI_TYPE_PPI = "Ppi";
-
- public final static String PPI_TYPE_PPI_NOTIFY = "Ppi Notify";
-
- //
- // The String for Protocol type
- //
- public final static String PROTOCOL_TYPE_PROTOCOL = "Protocol";
-
- public final static String PROTOCOL_TYPE_PROTOCOL_NOTIFY = "Protocol Notify";
-
- //
- // The default file name for guids.xref file
- //
- public final static String GUIDS_XREF_FILE_NAME = "guids.xref";
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/DataValidation.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/DataValidation.java
deleted file mode 100644
index 82724d4338..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/DataValidation.java
+++ /dev/null
@@ -1,746 +0,0 @@
-/** @file
-
- The file is used to provides all kinds of Data Validation interface
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.frameworkwizard.common;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- The class is used to provides all kinds of data validation interface
-
- <p>All provided interfaces are in static mode</p>
-
- **/
-public class DataValidation {
-
- /**
- Reserved for test
-
- @param args
-
- **/
- public static void main(String[] args) {
-
- }
-
- //
- // The below is used to check common data types
- //
-
- /**
- Check if the imput data is int
-
- @param strInt The input string which needs validation
-
- @retval true - The input is Int
- @retval false - The input is not Int
-
- **/
- public static boolean isInt(String strInt) {
- return isMatch("^-?[0-9]\\d*$", strInt);
- }
-
- /**
- Check if the input data is int and it is in the valid scope
- The scope is provided by String
-
- @param strNumber The input string which needs validation
- @param BeginNumber The left boundary of the scope
- @param EndNumber The right boundary of the scope
-
- @retval true - The input is Int and in the scope;
- @retval false - The input is not Int or not in the scope
-
- **/
- public static boolean isInt(String strNumber, int BeginNumber, int EndNumber) {
- //
- //Check if the input data is int first
- //
- if (!isInt(strNumber)) {
- return false;
- }
- //
- //And then check if the data is between the scope
- //
- Integer intTemp = new Integer(strNumber);
- if ((intTemp.intValue() < BeginNumber) || (intTemp.intValue() > EndNumber)) {
- return false;
- }
- return true;
- }
-
- /**
- Check if the input data is long int and it is in the valid scope
- The scope is provided by String
-
- @param strNumber The input string which needs validation
- @param BeginNumber The left boundary of the scope
- @param EndNumber The right boundary of the scope
-
- @retval true - The input is Int and in the scope;
- @retval false - The input is not Int or not in the scope
-
- **/
- public static boolean isLongInt(String strNumber, long BeginNumber, long EndNumber) throws Exception{
- //
- //Check if the input data is int first
- //
- if (!isInt(strNumber)) {
- return false;
- }
- //
- //And then check if the data is between the scope
- //
- try {
- Long intTemp = new Long(strNumber);
- if ((intTemp.longValue() < BeginNumber) || (intTemp.longValue() > EndNumber)) {
- return false;
- }
- }
- catch (Exception e) {
- throw e;
- }
-
- return true;
- }
- /**
- Check if the input data is int and it is in the valid scope
- The scope is provided by String
-
- @param strNumber The input string which needs validation
- @param strBeginNumber The left boundary of the scope
- @param strEndNumber The right boundary of the scope
-
- @retval true - The input is Int and in the scope;
- @retval false - The input is not Int or not in the scope
-
- **/
- public static boolean isInt(String strNumber, String strBeginNumber, String strEndNumber) {
- //
- //Check if all input data are int
- //
- if (!isInt(strNumber)) {
- return false;
- }
- if (!isInt(strBeginNumber)) {
- return false;
- }
- if (!isInt(strEndNumber)) {
- return false;
- }
- //
- //And then check if the data is between the scope
- //
- Integer intI = new Integer(strNumber);
- Integer intJ = new Integer(strBeginNumber);
- Integer intK = new Integer(strEndNumber);
- if ((intI.intValue() < intJ.intValue()) || (intI.intValue() > intK.intValue())) {
- return false;
- }
- return true;
- }
-
- /**
- Use regex to check if the input data is in valid format
-
- @param strPattern The input regex
- @param strMatcher The input data need be checked
-
- @retval true - The data matches the regex
- @retval false - The data doesn't match the regex
-
- **/
- public static boolean isMatch(String strPattern, String strMatcher) {
- Pattern pattern = Pattern.compile(strPattern);
- Matcher matcher = pattern.matcher(strMatcher);
-
- return matcher.find();
- }
-
- //
- // The below is used to check common customized data types
- //
-
- /**
- Check if the input data is UiNameType
-
- @param arg0 The input string need be checked
-
- @retval true - The input is UiNameType
- @retval false - The input is not UiNameType
-
- **/
- public static boolean isUiNameType(String arg0) {
- if (arg0.length() < 1) {
- return false;
- }
- return isMatch("[^ ].*", arg0);
- }
-
- /**
- Check if the input data is GuidType2
-
- @param arg0 The input string need be checked
-
- @retval true - The input is GuidType2
- @retval false - The input is not GuidType2
-
- **/
- public static boolean isGuidType2(String arg0) {
- return isMatch("[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", arg0);
- }
-
- /**
- Check if the input data is Guid
-
- @param strGuid The input string need be checked
-
- @retval true - The input is Guid
- @retval false - The input is not Guid
-
- **/
- public static boolean isGuid(String arg0) {
- return isGuidType2(arg0);
- }
-
- /**
- Check if the input data is Version
-
- @param arg0 The input string need be checked
-
- @retval true - The input is Version
- @retval false - The input is not Version
-
- **/
- public static boolean isVersionDataType(String arg0) {
- return isMatch("\\d+(\\.\\d+)*", arg0);
- }
-
- /**
- Check if the input data is Sentence
-
- @param strSentence The input string need be checked
-
- @retval true - The input is Sentence
- @retval false - The input is not Sentence
-
- **/
- public static boolean isSentence(String arg0) {
- return isMatch("(\\w+\\W*)+( )+(\\W*\\w*\\W*\\s*)*", arg0);
- }
-
- /**
- Check if the input data is FileNameConventio
-
- @param strSentence The input string need be checked
-
- @retval true - The input is FileNameConventio
- @retval false - The input is not FileNameConventio
-
- **/
- public static boolean isFileNameConvention(String arg0) {
- return isMatch("[a-zA-Z](\\.?[-_a-zA-Z0-9]+)*", arg0);
- }
-
- /**
- Check if the input data is KeywordType
-
- @param strSentence The input string need be checked
-
- @retval true - The input is KeywordType
- @retval false - The input is not KeywordType
-
- **/
- public static boolean isKeywordType(String arg0) {
- return isMatch("[a-zA-Z]+(_*[a-zA-Z0-9]*)*", arg0);
- }
-
- /**
- Check if the input data is FeatureFlagExpressionType
-
- @param strSentence The input string need be checked
-
- @retval true - The input is FeatureFlagExpressionType
- @retval false - The input is not FeatureFlagExpressionType
-
- **/
- public static boolean isFeatureFlagExpressionType(String arg0) {
- return (arg0.length() >= 1);
- }
-
- /**
- Check if the input data is FeatureFlag
-
- @param strSentence The input string need be checked
-
- @retval true - The input is FeatureFlag
- @retval false - The input is not FeatureFlag
-
- **/
- public static boolean isFeatureFlag(String arg0) {
- return isFeatureFlagExpressionType(arg0);
- }
-
- /**
- Check if the input data is PathAndFilename
-
- @param strSentence The input string need be checked
-
- @retval true - The input is PathAndFilename
- @retval false - The input is not PathAndFilename
-
- **/
- public static boolean isPathAndFilename(String arg0) {
- return !arg0.equals("");
- }
-
- /**
- Check if the input data is ToolsNameConvention
-
- @param strSentence The input string need be checked
-
- @retval true - The input is ToolsNameConvention
- @retval false - The input is not ToolsNameConvention
-
- **/
- public static boolean isToolsNameConvention(String arg0) {
- return isMatch("[a-zA-Z][a-zA-Z0-9]*", arg0);
- }
-
- /**
- Check if the input data is C_NameType
-
- @param strSentence The input string need be checked
-
- @retval true - The input is C_NameType
- @retval false - The input is not C_NameType
-
- **/
- public static boolean isC_NameType(String arg0) {
- return isMatch("(_)*[a-zA-Z]+((_)*[a-zA-Z0-9]*)*", arg0);
- }
-
- /**
- Check if the input data is HexWordArrayType
-
- @param strSentence The input string need be checked
-
- @retval true - The input is HexWordArrayType
- @retval false - The input is not HexWordArrayType
-
- **/
- public static boolean isHexWordArrayType(String arg0) {
- return arg0.length() >=6 && isMatch("((\\s)*0x([a-fA-F0-9]){4}(,)?(\\s)*)+", arg0);
- }
-
- /**
- Check if the input data is Hex64BitDataType
-
- @param strSentence The input string need be checked
-
- @retval true - The input is Hex64BitDataType
- @retval false - The input is not Hex64BitDataType
-
- **/
- public static boolean isHex64BitDataType(String arg0) {
- return isMatch("(0x)?[a-fA-F0-9]{1,16}", arg0);
- }
-
- /**
- Check if the input data is UnicodeString
-
- @param strSentence The input string need be checked
-
- @retval true - The input is UnicodeString
- @retval false - The input is not UnicodeString
-
- **/
- public static boolean isUnicodeString(String arg0) {
- return arg0.length() >= 3 && isMatch("(\\s)*L(\\:)?\"[^\"]*\"(\\s)*", arg0);
- }
-
- /**
- Check if the input data is HexByteArrayType
-
- @param strSentence The input string need be checked
-
- @retval true - The input is HexByteArrayType
- @retval false - The input is not HexByteArrayType
-
- **/
- public static boolean isHexByteArrayType(String arg0) {
- return arg0.length() >= 4 && isMatch("((\\s)*0x([a-fA-F0-9]){2}(,)?(\\s)*)+", arg0);
- }
-
-
- /**
- Check if the input data is DateType
-
- @param strDateType The input string need be checked
-
- @retval true - The input is DateType
- @retval false - The input is not DateType
-
- **/
- public static boolean isDateType(String strDateType) {
- return isMatch("[1-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9] [0-2][0-9]:[0-5][0-9]", strDateType);
- }
-
- /**
- Check if the input data is DosPath
-
- @param strDosPath The input string need be checked
-
- @retval true - The input is DosPath
- @retval false - The input is not DosPath
-
- **/
- public static boolean isDosPath(String strDosPath) {
- return isMatch("([a-zA-Z]:\\\\)?(((\\\\?_*-*.*[a-zA-Z0-9]*)*(_*-*.*[a-zA-Z0-9])*)+(\\\\)?)*", strDosPath);
- }
-
- /**
- Check if the input data is UnixPath
-
- @param strUnixPath The input string need be checked
-
- @retval true - The input is UnixPath
- @retval false - The input is not UnixPath
-
- **/
- public static boolean isUnixPath(String strUnixPath) {
- return isMatch("(\\/)?(((_*-*.*[a-zA-Z0-9]*)*(_*-*.*[a-zA-Z0-9])*)+(\\/)?)*", strUnixPath);
- }
-
- /**
- Check if the input data is DirectoryNamingConvention
-
- @param strDirectoryNamingConvention The input string need be checked
-
- @retval true - The input is DirectoryNamingConvention
- @retval false - The input is not DirectoryNamingConvention
-
- **/
- public static boolean isDirectoryNamingConvention(String strDirectoryNamingConvention) {
- return (isDosPath(strDirectoryNamingConvention) || isUnixPath(strDirectoryNamingConvention));
- }
-
- /**
- Check if the input data is HexDoubleWordDataType
-
- @param strHexDoubleWordDataType The input string need be checked
-
- @retval true - The input is HexDoubleWordDataType
- @retval false - The input is not HexDoubleWordDataType
-
- **/
- public static boolean isHexDoubleWordDataType(String strHexDoubleWordDataType) {
- return isMatch("0x[a-fA-F0-9]{1,8}", strHexDoubleWordDataType);
- }
-
- /**
- Check if the input data is V1
-
- @param strV1 The input string need be checked
-
- @retval true - The input is V1
- @retval false - The input is not V1
-
- **/
- public static boolean isV1(String strV1) {
- return isMatch("((%[A-Z](_*[A-Z0-9]*)*%)+((((\\\\)?_*-*.*[a-zA-Z0-9]*)*(_*-*.*[a-zA-Z0-9])*)+(\\\\)?)*)", strV1);
- }
-
- /**
- Check if the input data is V2
-
- @param strV2 The input string need be checked
-
- @retval true - The input is V2
- @retval false - The input is not V2
-
- **/
- public static boolean isV2(String strV2) {
- return isMatch(
- "(($[A-Z](_*[A-Z0-9]*)*)+||($\\([A-Z](_*[A-Z0-9]*)*\\))+||($\\{[A-Z](_*[A-Z0-9]*)*\\})+)+(\\/)?(((((_*-*.*[a-zA-Z0-9]*)*(_*-*.*[a-zA-Z0-9])*)+(\\/)?)*)*)",
- strV2);
- }
-
- /**
- Check if the input data is VariableConvention
-
- @param strVariableConvention The input string need be checked
-
- @retval true - The input is VariableConvention
- @retval false - The input is not VariableConvention
-
- **/
- public static boolean isVariableConvention(String strVariableConvention) {
- return (isV1(strVariableConvention) || isV2(strVariableConvention));
- }
-
- /**
- Check if the input data is UCName
-
- @param strUCName The input string need be checked
-
- @retval true - The input is UCName
- @retval false - The input is not UCName
-
- **/
- public static boolean isUCName(String strUCName) {
- return isMatch("[A-Z]+(_*[A-Z0-9]*( )*)*", strUCName);
- }
-
- /**
- Check if the input data is HexByteDataType
-
- @param strHex64BitDataType The input string need be checked
-
- @retval true - The input is HexByteDataType
- @retval false - The input is not HexByteDataType
-
- **/
- public static boolean isHexByteDataType(String strHex64BitDataType) {
- return isMatch("(0x)?[a-fA-F0-9]{1,2}", strHex64BitDataType);
- }
-
- /**
- Check if the input data is HexWordDataType
-
- @param strHexWordDataType The input string need be checked
-
- @retval true - The input is HexWordDataType
- @retval false - The input is not HexWordDataType
-
- **/
- public static boolean isHexWordDataType(String strHexWordDataType) {
- return isMatch("0x[a-fA-F0-9]{1,4}", strHexWordDataType);
- }
-
- /**
- Check if the input data is OverrideID
-
- @param strOverrideID The input string need be checked
-
- @retval true - The input is OverrideID
- @retval false - The input is not OverrideID
-
- **/
- public static boolean isOverrideID(String strOverrideID) {
- return isInt(strOverrideID);
- }
-
- /**
- Check if the input data is Supported Architectures
-
- @param strSupportedArchitectures
- @retval true - The input is Supported Architectures
- @retval false - The input isn't Supported Architectures
-
- */
- public static boolean isSupportedArchitectures(String strSupportedArchitectures) {
- return isMatch("(ALL){1}|(((IA32)|((X64)|(IPF)|(EBC)){1}((,((IA32)|(X64)|(IPF)|(EBC)){1} ){0,2}))){1}",
- strSupportedArchitectures);
- }
-
- //
- //The below is used to check msaheader data type
- //
-
- /**
- Check if the input data is BaseName
-
- @param strBaseName The input string need be checked
-
- @retval true - The input is BaseName
- @retval false - The input is not BaseName
-
- **/
- public static boolean isBaseName(String arg0) {
- return isUiNameType(arg0);
- }
-
- /**
- Check if the input data is Version
-
- @param arg0 The input string need be checked
-
- @retval true - The input is Version
- @retval false - The input is not Version
-
- **/
- public static boolean isVersion(String arg0) {
- return isVersionDataType(arg0);
- }
-
- /**
- Check if the input data is Abstract
-
- @param strAbstract The input string need be checked
-
- @retval true - The input is Abstract
- @retval false - The input is not Abstract
-
- **/
- public static boolean isAbstract(String arg0) {
- return isSentence(arg0);
- }
-
- /**
- Check if the input data is Copyright
-
- @param strCopyright The input string need be checked
-
- @retval true - The input is Copyright
- @retval false - The input is not Copyright
-
- **/
- public static boolean isCopyright(String arg0) {
- return !arg0.equals("");
- }
-
- /**
- Check if the input data is Specification
-
- @param strCopyright The input string need be checked
-
- @retval true - The input is Specification
- @retval false - The input is not Specification
-
- **/
- public static boolean isSpecification(String arg0) {
- return isSentence(arg0);
- }
-
- //
- // The below is used to check ModuleDefinitions data types
- //
- /**
- Check if the input data is OutputFileBasename
-
- @param strCopyright The input string need be checked
-
- @retval true - The input is OutputFileBasename
- @retval false - The input is not OutputFileBasename
-
- **/
- public static boolean isOutputFileBasename(String arg0) {
- return isFileNameConvention(arg0);
- }
-
- //
- // The below is used to check LibraryClass data types
- //
- /**
- Check if the input data is LibraryClass
-
- @param strCopyright The input string need be checked
-
- @retval true - The input is LibraryClass
- @retval false - The input is not LibraryClass
-
- **/
- public static boolean isLibraryClass(String arg0) {
- return isKeywordType(arg0);
- }
-
- /**
- Check if the input data is RecommendedInstanceVersion
-
- @param strCopyright The input string need be checked
-
- @retval true - The input is RecommendedInstanceVersion
- @retval false - The input is not RecommendedInstanceVersion
-
- **/
- public static boolean isRecommendedInstanceVersion(String arg0) {
- return isVersionDataType(arg0);
- }
-
- //
- // The below is used to check sourcefiles data types
- //
-
- /**
- Check if the input data is Filename
-
- @param strPath The input string need be checked
-
- @retval true - The input is Filename
- @retval false - The input is not Filename
-
- **/
- public static boolean isFilename(String arg0) {
- return isPathAndFilename(arg0);
- }
-
- /**
- Check if the input data is TagName
-
- @param strPath The input string need be checked
-
- @retval true - The input is TagName
- @retval false - The input is not TagName
-
- **/
- public static boolean isTagName(String arg0) {
- return isToolsNameConvention(arg0);
- }
-
- /**
- Check if the input data is ToolCode
-
- @param strPath The input string need be checked
-
- @retval true - The input is ToolCode
- @retval false - The input is not ToolCode
-
- **/
- public static boolean isToolCode(String arg0) {
- return isToolsNameConvention(arg0);
- }
-
- /**
- Check if the input data is ToolChainFamily
-
- @param strPath The input string need be checked
-
- @retval true - The input is ToolChainFamily
- @retval false - The input is not ToolChainFamily
-
- **/
- public static boolean isToolChainFamily(String arg0) {
- return isToolsNameConvention(arg0);
- }
-
- //
- // The below is used to check pcdcoded data types
- //
- /**
- Check if the input data is DefaultValueType
-
- @param strPath The input string need be checked
-
- @retval true - The input is DefaultValueType
- @retval false - The input is not DefaultValueType
-
- **/
- public static boolean isDefaultValueType(String arg0) {
- return isHex64BitDataType(arg0) || isUnicodeString(arg0) || isHexByteArrayType(arg0);
- }
-
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/EnumerationData.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/EnumerationData.java
deleted file mode 100644
index 7eae384c7d..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/EnumerationData.java
+++ /dev/null
@@ -1,1123 +0,0 @@
-/** @file
-
- The file is used to init all JComboBox items
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common;
-
-import java.util.Vector;
-
-public class EnumerationData {
- //
- // Static data for externs definitions
- //
- public final static String EXTERNS_PCD_IS_DRIVER = "Pcd Is Driver";
-
- public final static String EXTERNS_SPECIFICATION = "Specification";
-
- public final static String EXTERNS_IMAGE = "Image";
-
- public final static String EXTERNS_MODULE_ENTRY_POINT = "ModuleEntryPoint";
-
- public final static String EXTERNS_MODULE_UNLOAD_IMAGE = "ModuleUnloadImage";
-
- public final static String EXTERNS_LIBRARY = "Library";
-
- public final static String EXTERNS_CONSTRUCTOR = "Constructor";
-
- public final static String EXTERNS_DESTRUCTOR = "Destructor";
-
- public final static String EXTERNS_DRIVER = "Driver";
-
- public final static String EXTERNS_DRIVER_BINDING = "DriverBinding";
-
- public final static String EXTERNS_COMPONENT_NAME = "ComponentName";
-
- public final static String EXTERNS_DRIVER_CONFIG = "DriverConfig";
-
- public final static String EXTERNS_DRIVER_DIAG = "DriverDiag";
-
- public final static String EXTERNS_CALL_BACK = "Call Back";
-
- public final static String EXTERNS_VIRTUAL_ADDRESS_MAP_CALL_BACK = "VirtualAddressMap";
-
- public final static String EXTERNS_EXIT_BOOT_SERVICES_CALL_BACK = "ExitBootServices";
-
- //
- // Static data for guid type
- //
- public final static String GUID_TYPE_DATA_HUB_RECORD = "DATA_HUB_RECORD";
-
- public final static String GUID_TYPE_EFI_EVENT = "EFI_EVENT";
-
- public final static String GUID_TYPE_EFI_SYSTEM_CONFIGURATION_TABLE = "EFI_SYSTEM_CONFIGURATION_TABLE";
-
- public final static String GUID_TYPE_EFI_VARIABLE = "EFI_VARIABLE";
-
- public final static String GUID_TYPE_GUID = "GUID";
-
- public final static String GUID_TYPE_HII_PACKAGE_LIST = "HII_PACKAGE_LIST";
-
- public final static String GUID_TYPE_HOB = "HOB";
-
- public final static String GUID_TYPE_TOKEN_SPACE_GUID = "TOKEN_SPACE_GUID";
-
- //
- // Static data for build targets
- //
- public final static String BUILD_TARGET_DEBUG = "DEBUG";
-
- public final static String BUILD_TARGET_RELEASE = "RELEASE";
-
- //
- // Common data
- //
- public Vector<String> vSupportedArchitectures = new Vector<String>();
-
- public Vector<String> vEnabled = new Vector<String>();
-
- public Vector<String> vBoolean = new Vector<String>();
-
- //
- // Used by Msa Header
- //
- public Vector<String> vModuleType = new Vector<String>();
-
- public Vector<String> vCompontentType = new Vector<String>();
-
- //
- // Used by Library Class Definitions
- //
- public Vector<String> vLibraryUsage = new Vector<String>();
-
- public Vector<String> vFrameworkModuleTypes = new Vector<String>();
-
- public Vector<String> vLibClassDef = new Vector<String>();
-
- public Vector<String> vLibClassDefBase = new Vector<String>();
-
- public Vector<String> vLibClassDefPei = new Vector<String>();
-
- public Vector<String> vLibClassDefPeim = new Vector<String>();
-
- public Vector<String> vLibClassDefDxeCore = new Vector<String>();
-
- public Vector<String> vLibClassDefDxeDriver = new Vector<String>();
-
- public Vector<String> vLibClassDefDxeSmmDriver = new Vector<String>();
-
- public Vector<String> vLibClassDefUefiDriver = new Vector<String>();
-
- //
- // Used by Source Files
- //
- public Vector<String> vSourceFilesToolChainFamily = new Vector<String>();
-
- public Vector<String> vSourceFilesFileType = new Vector<String>();
-
- public Vector<String> vToolCode = new Vector<String>();
-
- //
- // Used by Package Dependencies
- //
- public Vector<String> vPackageUsage = new Vector<String>();
-
- //
- // Used by Protocols
- //
- public Vector<String> vProtocolUsage = new Vector<String>();
-
- public Vector<String> vProtocolNotifyUsage = new Vector<String>();
-
- public Vector<String> vProtocolType = new Vector<String>();
-
- //
- // Used by Events
- //
- public Vector<String> vEventType = new Vector<String>();
-
- public Vector<String> vEventUsage = new Vector<String>();
-
- public Vector<String> vEventGroup = new Vector<String>();
-
- //
- // Used by Hobs
- //
- public Vector<String> vHobType = new Vector<String>();
-
- public Vector<String> vHobUsage = new Vector<String>();
-
- //
- // Used by Ppis
- //
- public Vector<String> vPpiType = new Vector<String>();
-
- public Vector<String> vPpiUsage = new Vector<String>();
-
- public Vector<String> vPpiNotifyUsage = new Vector<String>();
-
- //
- // Used by Variable
- //
- public Vector<String> vVariableUsage = new Vector<String>();
-
- //
- // Used by Boot Mode
- //
- public Vector<String> vBootModeNames = new Vector<String>();
-
- public Vector<String> vBootModeUsage = new Vector<String>();
-
- //
- // Used by System Tables
- //
- public Vector<String> vSystemTableUsage = new Vector<String>();
-
- //
- // Used by Data Hubs
- //
- public Vector<String> vDataHubUsage = new Vector<String>();
-
- //
- // Used by Hii Packages
- //
- public Vector<String> vHiiPackageUsage = new Vector<String>();
-
- //
- // Used by Guid
- //
- public Vector<String> vGuidUsage = new Vector<String>();
-
- //
- // Used by Externs
- //
- public Vector<String> vExternTypes = new Vector<String>();
-
- public Vector<String> vPcdDriverTypes = new Vector<String>();
-
- //
- // Used by Pcd
- //
- public Vector<String> vPcdItemTypes = new Vector<String>();
-
- public Vector<String> vPcdUsage = new Vector<String>();
-
- //
- // Used by Build Options
- //
- public Vector<String> vBuildTargets = new Vector<String>();
-
- public EnumerationData() {
- init();
- }
-
- private void init() {
- //
- // Init common data first
- //
- initSupportedArchitectures();
- initEnabled();
- initBoolean();
-
- //
- // Used by Msa header
- //
- initModuleType();
-
- //
- // Used by Library Class Definitions
- //
- initLibraryUsage();
- initFrameworkModuleTypes();
- initLibClassDefBase();
- initLibClassDefPei();
- initLibClassDefPeim();
- initLibClassDefDxeCore();
- initLibClassDefDxeDriver();
- initLibClassDefDxeSmmDriver();
- initLibClassDefUefiDriver();
- initLibClassDef();
-
- //
- // Used by Library Class Definitions
- //
- initSourceFilesToolChainFamily();
- initSourceFilesFileType();
- initToolCode();
-
- //
- // Used by Package Dependencies
- //
- initPackageUsage();
-
- //
- // Used by Protocols
- //
- initProtocolType();
- initProtocolUsage();
- initProtocolNotifyUsage();
-
- //
- // Used by Events
- //
- initEventType();
- initEventUsage();
- initEventGroup();
-
- //
- // Used by Hobs
- //
- initHobType();
- initHobUsage();
-
- //
- // Used by Ppis
- //
- initPpiType();
- initPpiUsage();
- initPpiNotifyUsage();
-
- //
- // Used by Variable
- //
- initVariableUsage();
-
- //
- // Used by Boot Mode
- //
- initBootModeNames();
- initBootModeUsage();
-
- //
- // Used by System Tables
- //
- initSystemTableUsage();
-
- //
- // Used by Data Hubs
- //
- initDataHubUsage();
-
- //
- // Used by Hii Packages
- //
- initHiiPackages();
-
- //
- // Used by Guid
- //
- initGuidUsage();
-
- //
- // Used by Externs
- //
- initExternTypes();
- initPcdDriverTypes();
-
- //
- // Used by Pcd
- //
- initPcdItemTypes();
- initPcdUsage();
-
- //
- // Used by Build Option
- //
- initBuildTargets();
- }
-
- private void initEnabled() {
- vEnabled.removeAllElements();
- vEnabled.addElement("Disabled");
- vEnabled.addElement("Enabled");
- }
-
- private void initBoolean() {
- vBoolean.removeAllElements();
- vBoolean.addElement(DataType.FALSE);
- vBoolean.addElement(DataType.TRUE);
- }
-
- private void initModuleType() {
- vModuleType.removeAllElements();
- vModuleType.addElement("BASE");
- vModuleType.addElement("SEC");
- vModuleType.addElement("PEI_CORE");
- vModuleType.addElement("PEIM");
- vModuleType.addElement("DXE_CORE");
- vModuleType.addElement("DXE_DRIVER");
- vModuleType.addElement("DXE_RUNTIME_DRIVER");
- vModuleType.addElement("DXE_SAL_DRIVER");
- vModuleType.addElement("DXE_SMM_DRIVER");
- vModuleType.addElement("TOOL");
- vModuleType.addElement("UEFI_DRIVER");
- vModuleType.addElement("UEFI_APPLICATION");
- vModuleType.addElement("USER_DEFINED");
- Sort.sortVectorString(vModuleType, DataType.SORT_TYPE_ASCENDING);
- }
-
- // private void initComponentType() {
- // vCompontentType.removeAllElements();
- // vCompontentType.addElement("APRIORI");
- // vCompontentType.addElement("LIBRARY");
- // vCompontentType.addElement("FV_IMAGE_FILE");
- // vCompontentType.addElement("BS_DRIVER");
- // vCompontentType.addElement("RT_DRIVER");
- // vCompontentType.addElement("SAL_RT_DRIVER");
- // vCompontentType.addElement("PE32_PEIM");
- // vCompontentType.addElement("PIC_PEIM");
- // vCompontentType.addElement("COMBINED_PEIM_DRIVER");
- // vCompontentType.addElement("PEI_CORE");
- // vCompontentType.addElement("DXE_CORE");
- // vCompontentType.addElement("APPLICATION");
- // vCompontentType.addElement("BS_DRIVER_EFI");
- // vCompontentType.addElement("SHELLAPP");
- // }
-
- private void initSupportedArchitectures() {
- vSupportedArchitectures.removeAllElements();
- vSupportedArchitectures.addElement("EBC");
- vSupportedArchitectures.addElement("IA32");
- vSupportedArchitectures.addElement("X64");
- vSupportedArchitectures.addElement("IPF");
- vSupportedArchitectures.addElement("ARM");
- vSupportedArchitectures.addElement("PPC");
- }
-
- private void initLibraryUsage() {
- vLibraryUsage.removeAllElements();
- vLibraryUsage.addElement(DataType.USAGE_TYPE_ALWAYS_CONSUMED);
- vLibraryUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_CONSUMED);
- vLibraryUsage.addElement(DataType.USAGE_TYPE_ALWAYS_PRODUCED);
- vLibraryUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_PRODUCED);
- vLibraryUsage.addElement(DataType.USAGE_TYPE_PRIVATE);
- }
-
- private void initFrameworkModuleTypes() {
- vFrameworkModuleTypes.removeAllElements();
- vFrameworkModuleTypes.addElement("BASE");
- vFrameworkModuleTypes.addElement("SEC");
- vFrameworkModuleTypes.addElement("PEI_CORE");
- vFrameworkModuleTypes.addElement("PEIM");
- vFrameworkModuleTypes.addElement("DXE_CORE");
- vFrameworkModuleTypes.addElement("DXE_DRIVER");
- vFrameworkModuleTypes.addElement("DXE_RUNTIME_DRIVER");
- vFrameworkModuleTypes.addElement("DXE_SAL_DRIVER");
- vFrameworkModuleTypes.addElement("DXE_SMM_DRIVER");
- vFrameworkModuleTypes.addElement("UEFI_DRIVER");
- vFrameworkModuleTypes.addElement("UEFI_APPLICATION");
- vFrameworkModuleTypes.addElement("USER_DEFINED");
- Sort.sortVectorString(vFrameworkModuleTypes, DataType.SORT_TYPE_ASCENDING);
- }
-
- private void initLibClassDef() {
- vLibClassDef.removeAllElements();
- for (int index = 0; index < vLibClassDefBase.size(); index++) {
- vLibClassDef.addElement(vLibClassDefBase.elementAt(index));
- }
- for (int index = 0; index < vLibClassDefPei.size(); index++) {
- vLibClassDef.addElement(vLibClassDefPei.elementAt(index));
- }
- for (int index = 0; index < vLibClassDefPeim.size(); index++) {
- vLibClassDef.addElement(vLibClassDefPeim.elementAt(index));
- }
- for (int index = 0; index < vLibClassDefDxeCore.size(); index++) {
- vLibClassDef.addElement(vLibClassDefDxeCore.elementAt(index));
- }
- for (int index = 0; index < vLibClassDefDxeDriver.size(); index++) {
- vLibClassDef.addElement(vLibClassDefDxeDriver.elementAt(index));
- }
- for (int index = 0; index < vLibClassDefDxeSmmDriver.size(); index++) {
- vLibClassDef.addElement(vLibClassDefDxeSmmDriver.elementAt(index));
- }
- for (int index = 0; index < vLibClassDefUefiDriver.size(); index++) {
- vLibClassDef.addElement(vLibClassDefUefiDriver.elementAt(index));
- }
- }
-
- private void initLibClassDefBase() {
- vLibClassDefBase.removeAllElements();
- vLibClassDefBase.addElement("BaseLib");
- vLibClassDefBase.addElement("BaseMemoryLib");
- vLibClassDefBase.addElement("CacheMaintenanceLib");
- vLibClassDefBase.addElement("DebugLib");
- vLibClassDefBase.addElement("IoLib");
- vLibClassDefBase.addElement("PcdLib");
- vLibClassDefBase.addElement("PciCf8Lib");
- vLibClassDefBase.addElement("PciExpressLib");
- vLibClassDefBase.addElement("PciLib");
- vLibClassDefBase.addElement("PeCoffGetEntryPointLib");
- vLibClassDefBase.addElement("PeCoffLib");
- vLibClassDefBase.addElement("PerformanceLib");
- vLibClassDefBase.addElement("PrintLib");
- vLibClassDefBase.addElement("SmbusLib");
- vLibClassDefBase.addElement("TimerLib");
- }
-
- private void initLibClassDefPei() {
- vLibClassDefPei.removeAllElements();
- vLibClassDefPei.addElement("PeiCoreEntryPoint");
- }
-
- private void initLibClassDefPeim() {
- vLibClassDefPeim.removeAllElements();
- vLibClassDefPeim.addElement("BaseMemoryLib");
- vLibClassDefPeim.addElement("DebugLib");
- vLibClassDefPeim.addElement("HobLib");
- vLibClassDefPeim.addElement("IoLib");
- vLibClassDefPeim.addElement("MemoryAllocationLib");
- vLibClassDefPeim.addElement("PcdLib");
- vLibClassDefPeim.addElement("PeiCoreLib");
- vLibClassDefPeim.addElement("PeiServicesTablePointerLib");
- vLibClassDefPeim.addElement("PeimEntryPoint");
- vLibClassDefPeim.addElement("ReportStatusCodeLib");
- vLibClassDefPeim.addElement("ResourcePublicationLib");
- vLibClassDefPeim.addElement("SmbusLib");
- }
-
- private void initLibClassDefDxeCore() {
- vLibClassDefDxeCore.removeAllElements();
- vLibClassDefDxeCore.addElement("DxeCoreEntryPoint");
- vLibClassDefDxeCore.addElement("HobLib");
- }
-
- private void initLibClassDefDxeDriver() {
- vLibClassDefDxeDriver.removeAllElements();
- vLibClassDefDxeDriver.addElement("DxeServicesTableLib");
- vLibClassDefDxeDriver.addElement("HiiLib");
- vLibClassDefDxeDriver.addElement("HobLib");
- vLibClassDefDxeDriver.addElement("IoLib");
- vLibClassDefDxeDriver.addElement("MemoryAllocationLib");
- vLibClassDefDxeDriver.addElement("PcdLib");
- vLibClassDefDxeDriver.addElement("ReportStatusCodeLib");
- vLibClassDefDxeDriver.addElement("SmbusLib");
- vLibClassDefDxeDriver.addElement("UefiBootServicesTableLib");
- vLibClassDefDxeDriver.addElement("UefiDecompressLib");
- vLibClassDefDxeDriver.addElement("UefiRuntimeServicesTableLib");
- }
-
- private void initLibClassDefDxeSmmDriver() {
- vLibClassDefDxeSmmDriver.removeAllElements();
- vLibClassDefDxeSmmDriver.addElement("DxeSmmDriverEntryPoint");
- }
-
- private void initLibClassDefUefiDriver() {
- vLibClassDefUefiDriver.removeAllElements();
- vLibClassDefUefiDriver.addElement("BaseMemoryLib");
- vLibClassDefUefiDriver.addElement("DebugLib");
- vLibClassDefUefiDriver.addElement("DevicePathLib");
- vLibClassDefUefiDriver.addElement("UefiDriverEntryPoint");
- vLibClassDefUefiDriver.addElement("UefiDriverModelLib");
- vLibClassDefUefiDriver.addElement("UefiLib");
- }
-
- private void initSourceFilesToolChainFamily() {
- vSourceFilesToolChainFamily.removeAllElements();
- vSourceFilesToolChainFamily.addElement("MSFT");
- vSourceFilesToolChainFamily.addElement("INTC");
- vSourceFilesToolChainFamily.addElement("GCC");
- }
-
- private void initSourceFilesFileType() {
- vSourceFilesFileType.removeAllElements();
- vSourceFilesFileType.addElement("CCODE");
- vSourceFilesFileType.addElement("CHEADER");
- vSourceFilesFileType.addElement("ASMHEADER");
- vSourceFilesFileType.addElement("ASM");
- vSourceFilesFileType.addElement("UNI");
- vSourceFilesFileType.addElement("TXT");
- vSourceFilesFileType.addElement("DXS");
- vSourceFilesFileType.addElement("BMP");
- vSourceFilesFileType.addElement("VFR");
- vSourceFilesFileType.addElement("BINARY");
- vSourceFilesFileType.addElement("FV");
- vSourceFilesFileType.addElement("FFS");
- vSourceFilesFileType.addElement("EFI");
- }
-
- private void initToolCode() {
- vToolCode.removeAllElements();
- vToolCode.addElement(DataType.EMPTY_SELECT_ITEM);
- // vToolCode.addElement("Build_CCode");
- // vToolCode.addElement("Build_AUTOGEN");
- // vToolCode.addElement("Build_DPX");
- // vToolCode.addElement("Build_ASM");
- // vToolCode.addElement("Build_Assembly");
- // vToolCode.addElement("Build_Gcc_Assembly");
- // vToolCode.addElement("Build_IPF_Assembly_Code");
- // vToolCode.addElement("Build_IPF_PP_Code");
- // vToolCode.addElement("Build_Library");
- // vToolCode.addElement("Build_UNI");
- // vToolCode.addElement("Build_Unicode_Database");
- // vToolCode.addElement("Build_VFR");
- // vToolCode.addElement("Build_DUMMY");
- vToolCode.addElement("CC");
- vToolCode.addElement("DLINK");
- vToolCode.addElement("SLINK");
- vToolCode.addElement("PP");
- vToolCode.addElement("ASM");
- vToolCode.addElement("ASMLINK");
- vToolCode.addElement("ASL");
- }
-
- private void initPackageUsage() {
- vPackageUsage.removeAllElements();
- vPackageUsage.addElement(DataType.USAGE_TYPE_ALWAYS_CONSUMED);
- vPackageUsage.addElement(DataType.USAGE_TYPE_ALWAYS_PRODUCED);
- }
-
- private void initProtocolUsage() {
- vProtocolUsage.removeAllElements();
- vProtocolUsage.addElement(DataType.USAGE_TYPE_ALWAYS_CONSUMED);
- vProtocolUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_CONSUMED);
- vProtocolUsage.addElement(DataType.USAGE_TYPE_ALWAYS_PRODUCED);
- vProtocolUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_PRODUCED);
- vProtocolUsage.addElement(DataType.USAGE_TYPE_TO_START);
- vProtocolUsage.addElement(DataType.USAGE_TYPE_BY_START);
- vProtocolUsage.addElement(DataType.USAGE_TYPE_PRIVATE);
- }
-
- private void initProtocolType() {
- vProtocolType.removeAllElements();
- vProtocolType.addElement(DataType.PROTOCOL_TYPE_PROTOCOL);
- vProtocolType.addElement(DataType.PROTOCOL_TYPE_PROTOCOL_NOTIFY);
- }
-
- private void initEventType() {
- vEventType.removeAllElements();
- vEventType.addElement("CreateEvents");
- vEventType.addElement("SignalEvents");
- }
-
- private void initEventUsage() {
- vEventUsage.removeAllElements();
- vEventUsage.addElement(DataType.USAGE_TYPE_ALWAYS_CONSUMED);
- vEventUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_CONSUMED);
- vEventUsage.addElement(DataType.USAGE_TYPE_ALWAYS_PRODUCED);
- vEventUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_PRODUCED);
- vEventUsage.addElement(DataType.USAGE_TYPE_PRIVATE);
- }
-
- private void initEventGroup() {
- vEventGroup.removeAllElements();
- vEventGroup.addElement("EVENT_GROUP_GUID");
- vEventGroup.addElement("EVENT_TYPE_PERIODIC_TIMER");
- vEventGroup.addElement("EVENT_TYPE_RELATIVE_TIMER");
- }
-
- private void initHobType() {
- vHobType.removeAllElements();
- vHobType.addElement("PHIT");
- vHobType.addElement("MEMORY_ALLOCATION");
- vHobType.addElement("RESOURCE_DESCRIPTOR");
- vHobType.addElement("GUID_EXTENSION");
- vHobType.addElement("FIRMWARE_VOLUME");
- vHobType.addElement("CPU");
- vHobType.addElement("POOL");
- vHobType.addElement("CAPSULE_VOLUME");
- }
-
- private void initHobUsage() {
- vHobUsage.removeAllElements();
- vHobUsage.addElement(DataType.USAGE_TYPE_ALWAYS_CONSUMED);
- vHobUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_CONSUMED);
- vHobUsage.addElement(DataType.USAGE_TYPE_ALWAYS_PRODUCED);
- vHobUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_PRODUCED);
- vHobUsage.addElement(DataType.USAGE_TYPE_PRIVATE);
- }
-
- private void initPpiType() {
- vPpiType.removeAllElements();
- vPpiType.addElement(DataType.PPI_TYPE_PPI);
- vPpiType.addElement(DataType.PPI_TYPE_PPI_NOTIFY);
- }
-
- private void initPpiUsage() {
- vPpiUsage.removeAllElements();
- vPpiUsage.addElement(DataType.USAGE_TYPE_ALWAYS_CONSUMED);
- vPpiUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_CONSUMED);
- vPpiUsage.addElement(DataType.USAGE_TYPE_ALWAYS_PRODUCED);
- vPpiUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_PRODUCED);
- vPpiUsage.addElement(DataType.USAGE_TYPE_PRIVATE);
- }
-
- private void initPpiNotifyUsage() {
- vPpiNotifyUsage.removeAllElements();
- vPpiNotifyUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_CONSUMED);
- }
-
- private void initProtocolNotifyUsage() {
- vProtocolNotifyUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_CONSUMED);
- }
-
- private void initVariableUsage() {
- vVariableUsage.removeAllElements();
- vVariableUsage.addElement(DataType.USAGE_TYPE_ALWAYS_CONSUMED);
- vVariableUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_CONSUMED);
- vVariableUsage.addElement(DataType.USAGE_TYPE_ALWAYS_PRODUCED);
- vVariableUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_PRODUCED);
- vVariableUsage.addElement(DataType.USAGE_TYPE_PRIVATE);
- }
-
- private void initBootModeNames() {
- vBootModeNames.removeAllElements();
- vBootModeNames.addElement("FULL");
- vBootModeNames.addElement("MINIMAL");
- vBootModeNames.addElement("NO_CHANGE");
- vBootModeNames.addElement("DIAGNOSTICS");
- vBootModeNames.addElement("DEFAULT");
- vBootModeNames.addElement("S2_RESUME");
- vBootModeNames.addElement("S3_RESUME");
- vBootModeNames.addElement("S4_RESUME");
- vBootModeNames.addElement("S5_RESUME");
- vBootModeNames.addElement("FLASH_UPDATE");
- vBootModeNames.addElement("RECOVERY_FULL");
- vBootModeNames.addElement("RECOVERY_MINIMAL");
- vBootModeNames.addElement("RECOVERY_NO_CHANGE");
- vBootModeNames.addElement("RECOVERY_DIAGNOSTICS");
- vBootModeNames.addElement("RECOVERY_DEFAULT");
- vBootModeNames.addElement("RECOVERY_S2_RESUME");
- vBootModeNames.addElement("RECOVERY_S3_RESUME");
- vBootModeNames.addElement("RECOVERY_S4_RESUME");
- vBootModeNames.addElement("RECOVERY_S5_RESUME");
- vBootModeNames.addElement("RECOVERY_FLASH_UPDATE");
- }
-
- private void initBootModeUsage() {
- vBootModeUsage.removeAllElements();
- vBootModeUsage.addElement(DataType.USAGE_TYPE_ALWAYS_CONSUMED);
- vBootModeUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_CONSUMED);
- vBootModeUsage.addElement(DataType.USAGE_TYPE_ALWAYS_PRODUCED);
- vBootModeUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_PRODUCED);
- }
-
- private void initSystemTableUsage() {
- vSystemTableUsage.removeAllElements();
- vSystemTableUsage.addElement(DataType.USAGE_TYPE_ALWAYS_CONSUMED);
- vSystemTableUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_CONSUMED);
- vSystemTableUsage.addElement(DataType.USAGE_TYPE_ALWAYS_PRODUCED);
- vSystemTableUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_PRODUCED);
- vSystemTableUsage.addElement(DataType.USAGE_TYPE_PRIVATE);
- }
-
- private void initDataHubUsage() {
- vDataHubUsage.removeAllElements();
- vDataHubUsage.addElement(DataType.USAGE_TYPE_ALWAYS_CONSUMED);
- vDataHubUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_CONSUMED);
- vDataHubUsage.addElement(DataType.USAGE_TYPE_ALWAYS_PRODUCED);
- vDataHubUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_PRODUCED);
- vDataHubUsage.addElement(DataType.USAGE_TYPE_PRIVATE);
- }
-
- private void initHiiPackages() {
- vHiiPackageUsage.removeAllElements();
- vHiiPackageUsage.addElement(DataType.USAGE_TYPE_ALWAYS_PRODUCED);
- vHiiPackageUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_PRODUCED);
- vHiiPackageUsage.addElement(DataType.USAGE_TYPE_PRIVATE);
- }
-
- private void initGuidUsage() {
- vGuidUsage.removeAllElements();
- vGuidUsage.addElement(DataType.USAGE_TYPE_ALWAYS_CONSUMED);
- vGuidUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_CONSUMED);
- vGuidUsage.addElement(DataType.USAGE_TYPE_ALWAYS_PRODUCED);
- vGuidUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_PRODUCED);
- vGuidUsage.addElement(DataType.USAGE_TYPE_PRIVATE);
- }
-
- private void initExternTypes() {
- vExternTypes.removeAllElements();
-
- vExternTypes.addElement(EnumerationData.EXTERNS_SPECIFICATION);
- vExternTypes.addElement(EnumerationData.EXTERNS_IMAGE);
- vExternTypes.addElement(EnumerationData.EXTERNS_DRIVER);
- vExternTypes.addElement(EnumerationData.EXTERNS_LIBRARY);
- vExternTypes.addElement(EnumerationData.EXTERNS_CALL_BACK);
- }
-
- private void initPcdDriverTypes() {
- vPcdDriverTypes.removeAllElements();
- vPcdDriverTypes.addElement("PEI_PCD_DRIVER");
- vPcdDriverTypes.addElement("DXE_PCD_DRIVER");
- }
-
- private void initPcdItemTypes() {
- vPcdItemTypes.removeAllElements();
- vPcdItemTypes.addElement(DataType.PCD_ITEM_TYPE_FEATURE_FLAG);
- vPcdItemTypes.addElement(DataType.PCD_ITEM_TYPE_FIXED_AT_BUILD);
- vPcdItemTypes.addElement(DataType.PCD_ITEM_TYPE_PATCHABLE_IN_MODULE);
- vPcdItemTypes.addElement(DataType.PCD_ITEM_TYPE_DYNAMIC);
- vPcdItemTypes.addElement(DataType.PCD_ITEM_TYPE_DYNAMIC_EX);
- }
-
- private void initPcdUsage() {
- vPcdUsage.removeAllElements();
- vPcdUsage.addElement(DataType.USAGE_TYPE_ALWAYS_CONSUMED);
- vPcdUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_CONSUMED);
- vPcdUsage.addElement(DataType.USAGE_TYPE_ALWAYS_PRODUCED);
- vPcdUsage.addElement(DataType.USAGE_TYPE_SOMETIMES_PRODUCED);
- }
-
- private void initBuildTargets() {
- vBuildTargets.removeAllElements();
- vBuildTargets.addElement(EnumerationData.BUILD_TARGET_DEBUG);
- vBuildTargets.addElement(EnumerationData.BUILD_TARGET_RELEASE);
- }
-
- public Vector<String> getvCompontentType() {
- return vCompontentType;
- }
-
- public void setvCompontentType(Vector<String> componentType) {
- vCompontentType = componentType;
- }
-
- public Vector<String> getVModuleType() {
- return vModuleType;
- }
-
- public void setVModuleType(Vector<String> moduleType) {
- vModuleType = moduleType;
- }
-
- public Vector<String> getVLibraryUsage() {
- return vLibraryUsage;
- }
-
- public void setVLibClassDefUsage(Vector<String> libClassDefUsage) {
- vLibraryUsage = libClassDefUsage;
- }
-
- public Vector<String> getVLibClassDef() {
- return vLibClassDef;
- }
-
- public void setVLibClassDef(Vector<String> libClassDef) {
- vLibClassDef = libClassDef;
- }
-
- public Vector<String> getVCompontentType() {
- return vCompontentType;
- }
-
- public void setVCompontentType(Vector<String> compontentType) {
- vCompontentType = compontentType;
- }
-
- public Vector<String> getVLibClassDefBase() {
- return vLibClassDefBase;
- }
-
- public void setVLibClassDefBase(Vector<String> libClassDefBase) {
- vLibClassDefBase = libClassDefBase;
- }
-
- public Vector<String> getVLibClassDefDxeCore() {
- return vLibClassDefDxeCore;
- }
-
- public void setVLibClassDefDxeCore(Vector<String> libClassDefDxeCore) {
- vLibClassDefDxeCore = libClassDefDxeCore;
- }
-
- public Vector<String> getVLibClassDefDxeDriver() {
- return vLibClassDefDxeDriver;
- }
-
- public void setVLibClassDefDxeDriver(Vector<String> libClassDefDxeDriver) {
- vLibClassDefDxeDriver = libClassDefDxeDriver;
- }
-
- public Vector<String> getVLibClassDefDxeSmmDriver() {
- return vLibClassDefDxeSmmDriver;
- }
-
- public void setVLibClassDefDxeSmmDriver(Vector<String> libClassDefDxeSmmDriver) {
- vLibClassDefDxeSmmDriver = libClassDefDxeSmmDriver;
- }
-
- public Vector<String> getVLibClassDefPei() {
- return vLibClassDefPei;
- }
-
- public void setVLibClassDefPei(Vector<String> libClassDefPei) {
- vLibClassDefPei = libClassDefPei;
- }
-
- public Vector<String> getVLibClassDefPeim() {
- return vLibClassDefPeim;
- }
-
- public void setVLibClassDefPeim(Vector<String> libClassDefPeim) {
- vLibClassDefPeim = libClassDefPeim;
- }
-
- public Vector<String> getVLibClassDefUefiDriver() {
- return vLibClassDefUefiDriver;
- }
-
- public void setVLibClassDefUefiDriver(Vector<String> libClassDefUefiDriver) {
- vLibClassDefUefiDriver = libClassDefUefiDriver;
- }
-
- public Vector<String> getVSourceFilesFileType() {
- return vSourceFilesFileType;
- }
-
- public void setVSourceFilesFileType(Vector<String> sourceFilesFileType) {
- vSourceFilesFileType = sourceFilesFileType;
- }
-
- public Vector<String> getVSourceFilesToolChainFamily() {
- return vSourceFilesToolChainFamily;
- }
-
- public void setVSourceFilesToolChainFamily(Vector<String> sourceFilesToolChainFamily) {
- vSourceFilesToolChainFamily = sourceFilesToolChainFamily;
- }
-
- public void setVLibraryUsage(Vector<String> libraryUsage) {
- vLibraryUsage = libraryUsage;
- }
-
- public Vector<String> getVProtocolNotifyUsage() {
- return vProtocolNotifyUsage;
- }
-
- public void setVProtocolNotifyUsage(Vector<String> protocolNotifyUsage) {
- vProtocolNotifyUsage = protocolNotifyUsage;
- }
-
- public Vector<String> getVProtocolUsage() {
- return vProtocolUsage;
- }
-
- public void setVProtocolUsage(Vector<String> protocolUsage) {
- vProtocolUsage = protocolUsage;
- }
-
- public Vector<String> getVSupportedArchitectures() {
- return vSupportedArchitectures;
- }
-
- public void setVSupportedArchitectures(Vector<String> supportedArchitectures) {
- vSupportedArchitectures = supportedArchitectures;
- }
-
- public Vector<String> getVProtocolType() {
- return vProtocolType;
- }
-
- public void setVProtocolType(Vector<String> protocolType) {
- vProtocolType = protocolType;
- }
-
- public Vector<String> getVEventGroup() {
- return vEventGroup;
- }
-
- public void setVEventGroup(Vector<String> eventGroup) {
- vEventGroup = eventGroup;
- }
-
- public Vector<String> getVEventType() {
- return vEventType;
- }
-
- public void setVEventType(Vector<String> eventType) {
- vEventType = eventType;
- }
-
- public Vector<String> getVEventUsage() {
- return vEventUsage;
- }
-
- public void setVEventUsage(Vector<String> eventUsage) {
- vEventUsage = eventUsage;
- }
-
- public Vector<String> getVEnabled() {
- return vEnabled;
- }
-
- public void setVEnabled(Vector<String> enabled) {
- vEnabled = enabled;
- }
-
- public Vector<String> getVHobType() {
- return vHobType;
- }
-
- public void setVHobType(Vector<String> hobType) {
- vHobType = hobType;
- }
-
- public Vector<String> getVHobUsage() {
- return vHobUsage;
- }
-
- public void setVHobUsage(Vector<String> hobUsage) {
- vHobUsage = hobUsage;
- }
-
- public Vector<String> getVPpiNotifyUsage() {
- return vPpiNotifyUsage;
- }
-
- public void setVPpiNotifyUsage(Vector<String> ppiNotifyUsage) {
- vPpiNotifyUsage = ppiNotifyUsage;
- }
-
- public Vector<String> getVPpiType() {
- return vPpiType;
- }
-
- public void setVPpiType(Vector<String> ppiType) {
- vPpiType = ppiType;
- }
-
- public Vector<String> getVPpiUsage() {
- return vPpiUsage;
- }
-
- public void setVPpiUsage(Vector<String> ppiUsage) {
- vPpiUsage = ppiUsage;
- }
-
- public Vector<String> getVVariableUsage() {
- return vVariableUsage;
- }
-
- public void setVVariableUsage(Vector<String> variableUsage) {
- vVariableUsage = variableUsage;
- }
-
- public Vector<String> getVBootModeNames() {
- return vBootModeNames;
- }
-
- public void setVBootModeNames(Vector<String> bootModeNames) {
- vBootModeNames = bootModeNames;
- }
-
- public Vector<String> getVBootModeUsage() {
- return vBootModeUsage;
- }
-
- public void setVBootModeUsage(Vector<String> bootModeUsage) {
- vBootModeUsage = bootModeUsage;
- }
-
- public Vector<String> getVSystemTableUsage() {
- return vSystemTableUsage;
- }
-
- public void setVSystemTableUsage(Vector<String> systemTableUsage) {
- vSystemTableUsage = systemTableUsage;
- }
-
- public Vector<String> getVDataHubUsage() {
- return vDataHubUsage;
- }
-
- public void setVDataHubUsage(Vector<String> dataHubUsage) {
- vDataHubUsage = dataHubUsage;
- }
-
- public Vector<String> getVGuidUsage() {
- return vGuidUsage;
- }
-
- public void setVGuidUsage(Vector<String> guidUsage) {
- vGuidUsage = guidUsage;
- }
-
- public Vector<String> getVHiiPackageUsage() {
- return vHiiPackageUsage;
- }
-
- public void setVHiiPackageUsage(Vector<String> hiiPackageUsage) {
- vHiiPackageUsage = hiiPackageUsage;
- }
-
- public Vector<String> getVPcdItemTypes() {
- return vPcdItemTypes;
- }
-
- public void setVPcdItemTypes(Vector<String> pcdItemTypes) {
- vPcdItemTypes = pcdItemTypes;
- }
-
- public Vector<String> getVExternTypes() {
- return vExternTypes;
- }
-
- public void setVExternTypes(Vector<String> externTypes) {
- vExternTypes = externTypes;
- }
-
- public Vector<String> getVPcdDriverTypes() {
- return vPcdDriverTypes;
- }
-
- public void setVPcdDriverTypes(Vector<String> pcdDriverTypes) {
- vPcdDriverTypes = pcdDriverTypes;
- }
-
- public Vector<String> getVBoolean() {
- return vBoolean;
- }
-
- public void setVBoolean(Vector<String> boolean1) {
- vBoolean = boolean1;
- }
-
- public Vector<String> getVFrameworkModuleTypes() {
- return vFrameworkModuleTypes;
- }
-
- public void setVFrameworkModuleTypes(Vector<String> frameworkModuleTypes) {
- vFrameworkModuleTypes = frameworkModuleTypes;
- }
-
- public Vector<String> getVPackageUsage() {
- return vPackageUsage;
- }
-
- public void setVPackageUsage(Vector<String> packageUsage) {
- vPackageUsage = packageUsage;
- }
-
- public Vector<String> getVToolCode() {
- return vToolCode;
- }
-
- public void setVToolCode(Vector<String> toolCode) {
- vToolCode = toolCode;
- }
-
- public Vector<String> getVPcdUsage() {
- return vPcdUsage;
- }
-
- public void setVPcdUsage(Vector<String> pcdUsage) {
- vPcdUsage = pcdUsage;
- }
-
- public Vector<String> getVBuildTargets() {
- return vBuildTargets;
- }
-
- public void setVBuildTargets(Vector<String> buildTargets) {
- vBuildTargets = buildTargets;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/FileOperation.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/FileOperation.java
deleted file mode 100644
index 7f15de8f89..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/FileOperation.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/** @file
-
- The file is used to provides interfaces for file operations
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-
-public class FileOperation {
-
- /**
-
- @param args
- * @throws Exception
-
- **/
- public static void main(String[] args) throws Exception {
- FileOperation.newFolder("C:\\aaa\\aaa\\aaa\\aaa\\aaa");
- }
-
- /**
- To new a folder
-
- @param folderPath The folder path to be created
- @throws Exception
-
- **/
- public static void newFolder(String folderPath) throws Exception {
- folderPath = Tools.convertPathToCurrentOsType(folderPath);
- File f = new File(folderPath);
- f.mkdirs();
- }
-
- /**
- Delete a file
-
- @param filePath The file path to be deleted
- @throws Exception
-
- **/
- public static void delFile(String filePath) throws Exception {
- File f = new File(filePath);
- if (f.exists()) {
- f.delete();
- }
- }
-
- /**
- Delete a folder and all its files
-
- @param filePath The name of the folder which need be deleted
- @throws Exception
-
- **/
- public static void delFolder(String filePath) throws Exception {
- File f = new File(filePath);
- if (!f.exists()) {
- return;
- }
- if (!f.isDirectory()) {
- return;
- }
- delFolder(f);
- }
-
- /**
- Delete a folder and all its files
-
- @param fleFolderName The name of the folder which need be deleted
-
- @retval true - Delete successfully
- @retval false - Delete successfully
-
- **/
- private static boolean delFolder(File fileName) throws Exception {
- boolean blnIsDeleted = true;
-
- File[] aryAllFiles = fileName.listFiles();
-
- for (int indexI = 0; indexI < aryAllFiles.length; indexI++) {
- if (blnIsDeleted) {
- if (aryAllFiles[indexI].isDirectory()) {
- //
- //If is a directory, recursively call this function to delete sub folders
- //
- blnIsDeleted = delFolder(aryAllFiles[indexI]);
- } else if (aryAllFiles[indexI].isFile()) {
- //
- //If is a file, delete it
- //
- if (!aryAllFiles[indexI].delete()) {
- blnIsDeleted = false;
- }
- }
- }
- }
- if (blnIsDeleted) {
- fileName.delete();
- }
- return blnIsDeleted;
- }
-
- /**
- Copy a file
-
- @param oldPath
- @param newPath
- @throws Exception
-
- **/
- public static void copyFile(String oldPath, String newPath) throws Exception {
- oldPath = Tools.convertPathToCurrentOsType(oldPath);
- newPath = Tools.convertPathToCurrentOsType(newPath);
-
- int byteCount = 0;
- File oldFile = new File(oldPath);
-
- File newFile = new File(Tools.getFilePathOnly(newPath));
- if (!newFile.exists()) {
- newFolder(Tools.getFilePathOnly(newPath));
- }
-
- if (oldFile.exists()) {
- InputStream is = new FileInputStream(oldPath);
- FileOutputStream fos = new FileOutputStream(newPath);
- byte[] buffer = new byte[1024];
-
- while ((byteCount = is.read(buffer)) != -1) {
- fos.write(buffer, 0, byteCount);
- }
-
- is.close();
- }
- }
-
- /**
- Copy a folder
-
- @param oldPath
- @param newPath
- @throws Exception
-
- **/
- public static void copyFolder(String oldPath, String newPath) throws Exception {
- File oldFile = new File(oldPath);
-
- //
- // Create new file path first
- //
- newFolder(newPath);
-
- String[] files = oldFile.list();
- File temp = null;
- for (int index = 0; index < files.length; index++) {
- if (oldPath.endsWith(DataType.FILE_SEPARATOR)) {
- temp = new File(oldPath + files[index]);
- } else {
- temp = new File(oldPath + DataType.FILE_SEPARATOR + files[index]);
- }
-
- if (temp.isFile()) {
- FileInputStream fis = new FileInputStream(temp);
- FileOutputStream fos = new FileOutputStream(newPath + DataType.FILE_SEPARATOR
- + (temp.getName()).toString());
- byte[] b = new byte[1024 * 5];
- int len;
- while ((len = fis.read(b)) != -1) {
- fos.write(b, 0, len);
- }
- fos.flush();
- fos.close();
- fis.close();
- }
- if (temp.isDirectory()) {
- copyFolder(oldPath + DataType.FILE_SEPARATOR + files[index], newPath + DataType.FILE_SEPARATOR
- + files[index]);
- }
- }
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/GlobalData.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/GlobalData.java
deleted file mode 100644
index ed175e5343..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/GlobalData.java
+++ /dev/null
@@ -1,300 +0,0 @@
-/** @file
- The file is used to provide initializing global data.
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- **/
-package org.tianocore.frameworkwizard.common;
-
-import java.io.IOException;
-import java.util.Vector;
-
-import org.apache.xmlbeans.XmlException;
-import org.tianocore.FrameworkDatabaseDocument.FrameworkDatabase;
-import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea;
-import org.tianocore.MsaFilesDocument.MsaFiles;
-import org.tianocore.PackageSurfaceAreaDocument.PackageSurfaceArea;
-import org.tianocore.PlatformSurfaceAreaDocument.PlatformSurfaceArea;
-import org.tianocore.frameworkwizard.common.Identifications.Identification;
-import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleList;
-import org.tianocore.frameworkwizard.common.Identifications.OpeningPackageList;
-import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformList;
-import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
-import org.tianocore.frameworkwizard.packaging.PackageIdentification;
-import org.tianocore.frameworkwizard.platform.PlatformIdentification;
-import org.tianocore.frameworkwizard.workspace.Workspace;
-
-public class GlobalData {
-
- public static FrameworkDatabase fdb = null;
-
- public static OpeningModuleList openingModuleList = new OpeningModuleList();
-
- public static OpeningPackageList openingPackageList = new OpeningPackageList();
-
- public static OpeningPlatformList openingPlatformList = new OpeningPlatformList();
-
- public static Vector<ModuleIdentification> vModuleList = new Vector<ModuleIdentification>();
-
- public static Vector<PackageIdentification> vPackageList = new Vector<PackageIdentification>();
-
- public static Vector<PlatformIdentification> vPlatformList = new Vector<PlatformIdentification>();
-
- public static void init() {
- initDatabase();
- initPackage();
- initPlatform();
- initModule();
- }
-
- public static void initDatabase() {
- String strFrameworkDbFilePath = Workspace.getCurrentWorkspace() + Workspace.getStrWorkspaceDatabaseFile();
- strFrameworkDbFilePath = Tools.convertPathToCurrentOsType(strFrameworkDbFilePath);
- try {
- fdb = OpenFile.openFrameworkDb(strFrameworkDbFilePath);
- } catch (XmlException e) {
- Log.err("Open Framework Database " + strFrameworkDbFilePath, e.getMessage());
- return;
- } catch (Exception e) {
- Log.err("Open Framework Database " + strFrameworkDbFilePath, "Invalid file type");
- return;
- }
- }
-
- public static void initModule() {
- vModuleList = new Vector<ModuleIdentification>();
- openingModuleList = new OpeningModuleList();
-
- ModuleSurfaceArea msa = null;
- Vector<String> modulePaths = new Vector<String>();
- Identification id = null;
- ModuleIdentification mid = null;
- String packagePath = null;
- String modulePath = null;
-
- //
- // For each package, get all modules list
- //
- if (vPackageList.size() > 0) {
- for (int indexI = 0; indexI < vPackageList.size(); indexI++) {
- packagePath = vPackageList.elementAt(indexI).getPath();
- modulePaths = getAllModulesOfPackage(packagePath);
-
- for (int indexJ = 0; indexJ < modulePaths.size(); indexJ++) {
- try {
- modulePath = modulePaths.get(indexJ);
- msa = OpenFile.openMsaFile(modulePath);
-
- } catch (IOException e) {
- Log.err("Open Module Surface Area " + modulePath, e.getMessage());
- continue;
- } catch (XmlException e) {
- Log.err("Open Module Surface Area " + modulePath, e.getMessage());
- continue;
- } catch (Exception e) {
- Log.err("Open Module Surface Area " + modulePath, "Invalid file type");
- continue;
- }
- id = Tools.getId(modulePath, msa);
- mid = new ModuleIdentification(id, vPackageList.elementAt(indexI));
- vModuleList.addElement(mid);
- openingModuleList.insertToOpeningModuleList(mid, msa);
- }
- }
- Sort.sortModules(vModuleList, DataType.SORT_TYPE_ASCENDING);
- }
- }
-
- public static void initPackage() {
- vPackageList = new Vector<PackageIdentification>();
- openingPackageList = new OpeningPackageList();
- if (fdb != null) {
- for (int index = 0; index < fdb.getPackageList().getFilenameList().size(); index++) {
- String path = Workspace.getCurrentWorkspace() + DataType.FILE_SEPARATOR
- + fdb.getPackageList().getFilenameArray(index).getStringValue();
- path = Tools.convertPathToCurrentOsType(path);
- PackageSurfaceArea spd = null;
- PackageIdentification id = null;
- try {
- spd = OpenFile.openSpdFile(path);
- } catch (IOException e) {
- Log.err("Open Package Surface Area " + path, e.getMessage());
- continue;
- } catch (XmlException e) {
- Log.err("Open Package Surface Area " + path, e.getMessage());
- continue;
- } catch (Exception e) {
- Log.err("Open Package Surface Area " + path, "Invalid file type");
- continue;
- }
- id = Tools.getId(path, spd);
- vPackageList.addElement(id);
- openingPackageList.insertToOpeningPackageList(id, spd);
- }
- Sort.sortPackages(vPackageList, DataType.SORT_TYPE_ASCENDING);
- }
- }
-
- public static void initPlatform() {
- vPlatformList = new Vector<PlatformIdentification>();
- openingPlatformList = new OpeningPlatformList();
-
- if (fdb != null) {
- for (int index = 0; index < fdb.getPlatformList().getFilenameList().size(); index++) {
- String path = Workspace.getCurrentWorkspace() + DataType.FILE_SEPARATOR
- + fdb.getPlatformList().getFilenameArray(index).getStringValue();
- path = Tools.convertPathToCurrentOsType(path);
- PlatformSurfaceArea fpd = null;
- PlatformIdentification id = null;
- try {
- fpd = OpenFile.openFpdFile(path);
- } catch (IOException e) {
- Log.err("Open Platform Surface Area " + path, e.getMessage());
- continue;
- } catch (XmlException e) {
- Log.err("Open Platform Surface Area " + path, e.getMessage());
- continue;
- } catch (Exception e) {
- Log.err("Open Platform Surface Area " + path, "Invalid file type");
- continue;
- }
- id = Tools.getId(path, fpd);
- vPlatformList.addElement(new PlatformIdentification(id));
- openingPlatformList.insertToOpeningPlatformList(id, fpd);
- }
- Sort.sortPlatforms(vPlatformList, DataType.SORT_TYPE_ASCENDING);
- }
- }
-
- /**
- Get all modules' paths from one package
-
- @return a Vector with all modules' path
-
- **/
- public static Vector<String> getAllModulesOfPackage(String path) {
- Vector<String> modulePath = new Vector<String>();
- try {
- MsaFiles files = OpenFile.openSpdFile(path).getMsaFiles();
- if (files != null) {
- for (int index = 0; index < files.getFilenameList().size(); index++) {
- String msaPath = files.getFilenameList().get(index);
- msaPath = Tools.addFileSeparator(Tools.getFilePathOnly(path)) + msaPath;
- msaPath = Tools.convertPathToCurrentOsType(msaPath);
- modulePath.addElement(msaPath);
- }
- }
- } catch (IOException e) {
- Log.err("Get all modules from a package " + path, e.getMessage());
- } catch (XmlException e) {
- Log.err("Get all modules from a package " + path, e.getMessage());
- } catch (Exception e) {
- Log.err("Get all modules from a package " + path, e.getMessage());
- }
- return modulePath;
- }
-
- /**
- Get a module id
-
- @param moduleGuid
- @param moduleVersion
- @param packageGuid
- @param packageVersion
- @return
-
- **/
- public static ModuleIdentification findModuleId(String moduleGuid, String moduleVersion, String packageGuid,
- String packageVersion) {
- ModuleIdentification mid = null;
- for (int index = 0; index < vModuleList.size(); index++) {
- if (vModuleList.elementAt(index).equals(moduleGuid, moduleVersion, packageGuid, packageVersion)) {
- mid = vModuleList.elementAt(index);
- break;
- }
- }
- return mid;
- }
-
- /**
- Get a package id
-
- @param packageGuid
- @param packageVersion
- @return
-
- **/
- public static PackageIdentification findPackageId(String packageGuid, String packageVersion) {
- PackageIdentification pid = null;
- for (int index = 0; index < vPackageList.size(); index++) {
- if (vPackageList.elementAt(index).equals(packageGuid, packageVersion)) {
- pid = vPackageList.elementAt(index);
- break;
- }
- }
- return pid;
- }
-
- /**
- Get a platform id
-
- @param platformGuid
- @param platformVersion
- @return
-
- **/
- public static PlatformIdentification findPlatformId(String platformGuid, String platformVersion) {
- PlatformIdentification pid = null;
- for (int index = 0; index < vPlatformList.size(); index++) {
- if (vPlatformList.elementAt(index).equals(platformGuid, platformVersion)) {
- pid = vPlatformList.elementAt(index);
- break;
- }
- }
- return pid;
- }
-
- /**
-
- @param relativePath
- @param mode
- @return
-
- **/
- public static boolean isDuplicateRelativePath(String relativePath, int mode) {
- if (mode == DataType.RETURN_TYPE_MODULE_SURFACE_AREA) {
- for (int index = 0; index < vModuleList.size(); index++) {
- String path = vModuleList.elementAt(index).getPath();
- if (Tools.getFilePathOnly(path).equals(relativePath)) {
- return true;
- }
- }
- }
-
- if (mode == DataType.RETURN_TYPE_PACKAGE_SURFACE_AREA) {
- for (int index = 0; index < vPackageList.size(); index++) {
- String path = vPackageList.elementAt(index).getPath();
- if (Tools.getFilePathOnly(path).equals(relativePath)) {
- return true;
- }
- }
- }
-
- if (mode == DataType.RETURN_TYPE_PLATFORM_SURFACE_AREA) {
- for (int index = 0; index < vPlatformList.size(); index++) {
- String path = vPlatformList.elementAt(index).getPath();
- if (Tools.getFilePathOnly(path).equals(relativePath)) {
- return true;
- }
- }
- }
-
- return false;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/IDefaultTableModel.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/IDefaultTableModel.java
deleted file mode 100644
index 57ba11b9af..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/IDefaultTableModel.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/** @file
-
- The file is used to override DefaultTableModel to provides customized interfaces
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common;
-
-import javax.swing.table.DefaultTableModel;
-
-public class IDefaultTableModel extends DefaultTableModel {
-
- ///
- ///
- ///
- private static final long serialVersionUID = -1782544418084080185L;
-
- public IDefaultTableModel() {
- super();
- }
-
- /* (non-Javadoc)
- * @see javax.swing.table.TableModel#isCellEditable(int, int)
- *
- */
- public boolean isCellEditable(int rowIndex, int columnIndex) {
- return false;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/IFileFilter.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/IFileFilter.java
deleted file mode 100644
index 8194a316c6..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/IFileFilter.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/** @file
-
- The file is used to override FileFilter to provides customized interfaces
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.frameworkwizard.common;
-
-import java.io.File;
-
-import javax.swing.filechooser.FileFilter;
-
-/**
- The class is used to override FileFilter to provides customized interfaces
-
- **/
-public class IFileFilter extends FileFilter {
-
- private String strExt;
-
- /**
- Reserved for test
-
- @param args
-
- **/
- public static void main(String[] args) {
- // TODO Auto-generated method stub
-
- }
-
- /**
- This is the default constructor
-
- @param ext
-
- **/
- public IFileFilter(String ext) {
- this.strExt = ext;
- }
-
- /* (non-Javadoc)
- * @see javax.swing.filechooser.FileFilter#accept(java.io.File)
- *
- * Override method "accept"
- *
- */
- public boolean accept(File file) {
- if (file.isDirectory()) {
- return true;
- }
- String strFileName = file.getName();
- int intIndex = strFileName.lastIndexOf('.');
- if (intIndex > 0 && intIndex < strFileName.length() - 1) {
- String strExtension = strFileName.substring(intIndex + 1).toLowerCase();
- if (strExtension.equals(strExt))
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see javax.swing.filechooser.FileFilter#getDescription()
- *
- * Override method "getDescription" to config description via different file type
- *
- */
- public String getDescription() {
- if (strExt.equals(DataType.MODULE_SURFACE_AREA_EXT))
- return DataType.MODULE_SURFACE_AREA_EXT_DESCRIPTION;
- if (strExt.equals(DataType.PACKAGE_SURFACE_AREA_EXT))
- return DataType.PACKAGE_SURFACE_AREA_EXT_DESCRIPTION;
- if (strExt.equals(DataType.PLATFORM_SURFACE_AREA_EXT))
- return DataType.PLATFORM_SURFACE_AREA_EXT_DESCRIPTION;
- if (strExt.equals(DataType.TEXT_FILE_EXT))
- return DataType.TEXT_FILE_EXT_DESCRIPTION;
- if (strExt.equals(DataType.FAR_SURFACE_AREA_EXT))
- return DataType.FAR_SURFACE_AREA_EXT_DESCRIPTION;
- return "";
- }
-
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/Identification.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/Identification.java
deleted file mode 100644
index 03717b560b..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/Identification.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/** @file
-
- The file is used to save basic information
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.frameworkwizard.common.Identifications;
-
-public class Identification {
-
- ///
- /// Define class members
- ///
- private String name;
-
- private String guid;
-
- private String version;
-
- private String path;
-
- public Identification(String name, String guid, String version) {
- this.name = name;
- this.guid = guid;
- this.version = version;
- }
-
- public Identification() {
-
- }
-
- public Identification(String name, String guid, String version, String path) {
- this.name = name;
- this.guid = guid;
- this.version = version;
- this.path = path;
- }
-
- public boolean equals(Object obj) {
- if (obj instanceof Identification) {
- Identification id = (Identification) obj;
- if (path.equals(id.path)) {
- return true;
- }
- return false;
- } else {
- return super.equals(obj);
- }
- }
-
- public boolean equalsWithGuid(Object obj) {
- if (obj instanceof Identification) {
- Identification id = (Identification) obj;
- if (guid.equalsIgnoreCase(id.guid)) {
- if (version == null || id.version == null) {
- return true;
- } else if (version.trim().equalsIgnoreCase("") || id.version.trim().equalsIgnoreCase("")) {
- return true;
- } else if (version.equalsIgnoreCase(id.version)) {
- return true;
- }
- }
- return false;
- } else {
- return super.equals(obj);
- }
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void setGuid(String guid) {
- this.guid = guid;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public void setPath(String path) {
- this.path = path;
- }
-
- public String getGuid() {
- return guid;
- }
-
- public String getName() {
- return name;
- }
-
- public String getVersion() {
- return version;
- }
-
- public String getPath() {
- return path;
- }
-
- public int hashCode() {
- return guid.toLowerCase().hashCode();
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningFileType.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningFileType.java
deleted file mode 100644
index 9811c19868..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningFileType.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/** @file
-
- The file is used to define common opening file type
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.frameworkwizard.common.Identifications;
-
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-import javax.swing.tree.TreePath;
-
-
-public class OpeningFileType {
- //
- // Define class members
- //
- private boolean isSaved = true;
-
- private boolean isNew = false;
-
- private boolean isOpen = false;
-
- private Set<TreePath> treePath = new LinkedHashSet<TreePath>();
-
- public OpeningFileType() {
-
- }
-
- public boolean isNew() {
- return isNew;
- }
-
- public void setNew(boolean isNew) {
- this.isNew = isNew;
- }
-
- public boolean isSaved() {
- return isSaved;
- }
-
- public void setSaved(boolean isSaved) {
- this.isSaved = isSaved;
- }
-
- public boolean isOpen() {
- return isOpen;
- }
-
- public void setOpen(boolean isOpen) {
- this.isOpen = isOpen;
- }
-
- public Set<TreePath> getTreePath() {
- return treePath;
- }
-
- public void setTreePath(Set<TreePath> treePath) {
- this.treePath = treePath;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleList.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleList.java
deleted file mode 100644
index c98d6f95b5..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleList.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/** @file
-
- The file is used to define opening module list
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.Identifications;
-
-import java.util.Set;
-import java.util.Vector;
-
-import javax.swing.tree.TreePath;
-
-import org.tianocore.ModuleSurfaceAreaDocument;
-import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
-
-public class OpeningModuleList {
- private Vector<OpeningModuleType> vOpeningModuleList = new Vector<OpeningModuleType>();
-
- public OpeningModuleList() {
-
- }
-
- public Vector<OpeningModuleType> getVOpeningModuleList() {
- return vOpeningModuleList;
- }
-
- public void setVOpeningModuleList(Vector<OpeningModuleType> openingModuleList) {
- vOpeningModuleList = openingModuleList;
- }
-
- public void insertToOpeningModuleList(ModuleIdentification id, ModuleSurfaceAreaDocument.ModuleSurfaceArea xmlMsa) {
- vOpeningModuleList.addElement(new OpeningModuleType(id, xmlMsa));
- }
-
- public OpeningModuleType getOpeningModuleByIndex(int index) {
- if (index > -1 && index < vOpeningModuleList.size()) {
- return vOpeningModuleList.elementAt(index);
- }
- return null;
- }
-
- public OpeningModuleType getOpeningModuleById(ModuleIdentification id) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- return vOpeningModuleList.elementAt(index);
- }
- return null;
- }
-
- public int findIndexOfListById(ModuleIdentification id) {
- for (int index = 0; index < vOpeningModuleList.size(); index++) {
- if (vOpeningModuleList.elementAt(index).getId().equals(id)) {
- return index;
- }
- }
- return -1;
- }
-
- public void removeFromOpeningModuleListByIndex(int index) {
- if (index > -1 && index < vOpeningModuleList.size()) {
- vOpeningModuleList.removeElementAt(index);
- }
- }
-
- public void removeFromOpeningModuleListById(ModuleIdentification id) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- vOpeningModuleList.removeElementAt(findIndexOfListById(id));
- }
- }
-
- public void removeAllFromOpeningModuleList() {
- vOpeningModuleList.removeAllElements();
- }
-
- public ModuleSurfaceAreaDocument.ModuleSurfaceArea getModuleSurfaceAreaFromId(ModuleIdentification id) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- return vOpeningModuleList.elementAt(index).getXmlMsa();
- }
- return null;
- }
-
- public boolean existsModule(ModuleIdentification id) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- return true;
- }
- return false;
- }
-
- public void setModuleSaved(ModuleIdentification id, boolean isSaved) {
- setModuleSaved(findIndexOfListById(id), isSaved);
- }
-
- public void setModuleSaved(int index, boolean isSaved) {
- if (index > -1) {
- vOpeningModuleList.elementAt(index).setSaved(isSaved);
- }
- }
-
- public boolean getModuleSaved(ModuleIdentification id) {
- return getModuleSaved(findIndexOfListById(id));
- }
-
- public boolean getModuleSaved(int index) {
- if (index > -1) {
- return vOpeningModuleList.elementAt(index).isSaved();
- }
- return true;
- }
-
- public void setModuleOpen(ModuleIdentification id, boolean isOpen) {
- setModuleOpen(findIndexOfListById(id), isOpen);
- }
-
- public void setModuleOpen(int index, boolean isOpen) {
- if (index > -1) {
- vOpeningModuleList.elementAt(index).setOpen(isOpen);
- }
- }
-
- public boolean getModuleOpen(ModuleIdentification id) {
- return getModuleOpen(findIndexOfListById(id));
- }
-
- public boolean getModuleOpen(int index) {
- if (index > -1) {
- return vOpeningModuleList.elementAt(index).isOpen();
- }
- return false;
- }
-
- public void setTreePathById(ModuleIdentification id, Set<TreePath> treePath) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- vOpeningModuleList.elementAt(index).setTreePath(treePath);
- }
- }
-
- public Set<TreePath> getTreePathById(ModuleIdentification id) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- return vOpeningModuleList.elementAt(index).getTreePath();
- }
- return null;
- }
-
- public Set<TreePath> getTreePathByIndex(int index) {
- if (index > -1) {
- return vOpeningModuleList.elementAt(index).getTreePath();
- }
- return null;
- }
-
- public ModuleIdentification getIdByPath(String path) {
- ModuleIdentification id = new ModuleIdentification(null, null, null, path);
- int index = findIndexOfListById(id);
- if (index > -1) {
- return vOpeningModuleList.elementAt(index).getId();
- }
- return null;
- }
-
- public ModuleIdentification getIdByGuidVersion(String guid, String version) {
- for (int index = 0; index < vOpeningModuleList.size(); index++) {
- ModuleIdentification id = vOpeningModuleList.elementAt(index).getId();
- if (version != null) {
- if (id.getGuid().equals(guid) && id.getVersion().equals(version)) {
- return id;
- }
- } else {
- if (id.getGuid().equals(guid)) {
- return id;
- }
- }
- }
- return null;
- }
-
- public void setNew(ModuleIdentification id, boolean isNew) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- vOpeningModuleList.elementAt(index).setNew(isNew);
- }
- }
-
- public void closeAll() {
- for (int index = 0; index < this.size(); index++) {
- this.setModuleOpen(index, false);
- this.setModuleSaved(index, true);
- }
- }
-
- public int size() {
- return vOpeningModuleList.size();
- }
-
- public boolean isSaved() {
- for (int index = 0; index < this.size(); index++) {
- if (!this.getModuleSaved(index)) {
- return false;
- }
- }
- return true;
- }
-
- public boolean isOpen() {
- for (int index = 0; index < this.size(); index++) {
- if (this.getModuleOpen(index)) {
- return true;
- }
- }
- return false;
- }
-
- public void reload(int index) {
- if (index > -1) {
- vOpeningModuleList.elementAt(index).reload();
- }
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleType.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleType.java
deleted file mode 100644
index 3ff29a94d3..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleType.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/** @file
-
- The file is used to define opening module type
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.frameworkwizard.common.Identifications;
-
-import java.io.IOException;
-
-import org.apache.xmlbeans.XmlException;
-import org.tianocore.ModuleSurfaceAreaDocument;
-import org.tianocore.frameworkwizard.common.Log;
-import org.tianocore.frameworkwizard.common.OpenFile;
-import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
-
-public class OpeningModuleType extends OpeningFileType{
- //
- // Define class members
- //
- private ModuleSurfaceAreaDocument.ModuleSurfaceArea xmlMsa = null;
-
- private ModuleIdentification id = null;
-
- public OpeningModuleType() {
-
- }
-
- public OpeningModuleType(ModuleIdentification identification, ModuleSurfaceAreaDocument.ModuleSurfaceArea msa) {
- this.id = identification;
- this.xmlMsa = msa;
- }
-
- public ModuleSurfaceAreaDocument.ModuleSurfaceArea getXmlMsa() {
- return xmlMsa;
- }
-
- public void setXmlMsa(ModuleSurfaceAreaDocument.ModuleSurfaceArea xmlMsa) {
- this.xmlMsa = xmlMsa;
- }
-
- public ModuleIdentification getId() {
- return id;
- }
-
- public void setId(ModuleIdentification id) {
- this.id = id;
- }
-
- public void reload() {
- if (this.id != null) {
- String path = id.getPath();
- if (path.length() > 0) {
- try {
- this.xmlMsa = OpenFile.openMsaFile(id.getPath());
- } catch (IOException e) {
- Log.err("Open Module Surface Area " + path, e.getMessage());
- } catch (XmlException e) {
- Log.err("Open Module Surface Area " + path, e.getMessage());
- } catch (Exception e) {
- Log.err("Open Module Surface Area " + path, "Invalid file type");
- }
- }
- }
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPackageList.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPackageList.java
deleted file mode 100644
index 0db75176ba..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPackageList.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/** @file
-
- The file is used to define opening package list
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.Identifications;
-
-import java.util.Set;
-import java.util.Vector;
-
-import javax.swing.tree.TreePath;
-
-import org.tianocore.PackageSurfaceAreaDocument;
-import org.tianocore.frameworkwizard.packaging.PackageIdentification;
-
-public class OpeningPackageList {
- private Vector<OpeningPackageType> vOpeningPackageList = new Vector<OpeningPackageType>();
-
- public OpeningPackageList() {
-
- }
-
- public Vector<OpeningPackageType> getVOpeningPackageList() {
- return vOpeningPackageList;
- }
-
- public void setVOpeningPackageList(Vector<OpeningPackageType> openingPackageList) {
- vOpeningPackageList = openingPackageList;
- }
-
- public void insertToOpeningPackageList(PackageIdentification id, PackageSurfaceAreaDocument.PackageSurfaceArea xmlMsa) {
- vOpeningPackageList.addElement(new OpeningPackageType(id, xmlMsa));
- }
-
- public OpeningPackageType getOpeningPackageByIndex(int index) {
- if (index > -1 && index < vOpeningPackageList.size()) {
- return vOpeningPackageList.elementAt(index);
- }
- return null;
- }
-
- public OpeningPackageType getOpeningPackageById(PackageIdentification id) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- return vOpeningPackageList.elementAt(index);
- }
- return null;
- }
-
- public int findIndexOfListById(PackageIdentification id) {
- for (int index = 0; index < vOpeningPackageList.size(); index++) {
- if (vOpeningPackageList.elementAt(index).getId().equals(id)) {
- return index;
- }
- }
- return -1;
- }
-
- public void removeFromOpeningPackageListByIndex(int index) {
- if (index > -1 && index < vOpeningPackageList.size()) {
- vOpeningPackageList.removeElementAt(index);
- }
- }
-
- public void removeFromOpeningPackageListById(PackageIdentification id) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- vOpeningPackageList.removeElementAt(findIndexOfListById(id));
- }
- }
-
- public void removeAllFromOpeningPackageList() {
- vOpeningPackageList.removeAllElements();
- }
-
- public PackageSurfaceAreaDocument.PackageSurfaceArea getPackageSurfaceAreaFromId(PackageIdentification id) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- return vOpeningPackageList.elementAt(index).getXmlSpd();
- }
- return null;
- }
-
- public boolean existsPackage(PackageIdentification id) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- return true;
- }
- return false;
- }
-
- public void setPackageSaved(PackageIdentification id, boolean isSaved) {
- setPackageSaved(findIndexOfListById(id), isSaved);
- }
-
- public void setPackageSaved(int index, boolean isSaved) {
- if (index > -1) {
- vOpeningPackageList.elementAt(index).setSaved(isSaved);
- }
- }
-
- public boolean getPackageSaved(PackageIdentification id) {
- return getPackageSaved(findIndexOfListById(id));
- }
-
- public boolean getPackageSaved(int index) {
- if (index > -1) {
- return vOpeningPackageList.elementAt(index).isSaved();
- }
- return true;
- }
-
- public void setPackageOpen(PackageIdentification id, boolean isOpem) {
- setPackageOpen(findIndexOfListById(id), isOpem);
- }
-
- public void setPackageOpen(int index, boolean isOpem) {
- if (index > -1) {
- vOpeningPackageList.elementAt(index).setOpen(isOpem);
- }
- }
-
- public boolean getPackageOpen(PackageIdentification id) {
- return getPackageOpen(findIndexOfListById(id));
- }
-
- public boolean getPackageOpen(int index) {
- if (index > -1) {
- return vOpeningPackageList.elementAt(index).isOpen();
- }
- return false;
- }
-
- public void setTreePathById(PackageIdentification id, Set<TreePath> treePath) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- vOpeningPackageList.elementAt(index).setTreePath(treePath);
- }
- }
-
- public Set<TreePath> getTreePathById(PackageIdentification id) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- return vOpeningPackageList.elementAt(index).getTreePath();
- }
- return null;
- }
-
- public Set<TreePath> getTreePathByIndex(int index) {
- if (index > -1) {
- return vOpeningPackageList.elementAt(index).getTreePath();
- }
- return null;
- }
-
- public PackageIdentification getIdByPath(String path) {
- PackageIdentification id = new PackageIdentification(null, null, null, path);
- int index = findIndexOfListById(id);
- if (index > -1) {
- return vOpeningPackageList.elementAt(index).getId();
- }
- return null;
- }
-
- public PackageIdentification getIdByGuidVersion(String guid, String version) {
- for (int index = 0; index < vOpeningPackageList.size(); index++) {
- PackageIdentification id = vOpeningPackageList.elementAt(index).getId();
- if (version != null) {
- if (id.getGuid().equals(guid) && id.getVersion().equals(version)) {
- return id;
- }
- } else {
- if (id.getGuid().equals(guid)) {
- return id;
- }
- }
- }
- return null;
- }
-
- public void setNew(PackageIdentification id, boolean isNew) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- vOpeningPackageList.elementAt(index).setNew(isNew);
- }
- }
-
- public void closeAll() {
- for (int index = 0; index < this.size(); index++) {
- this.setPackageOpen(index, false);
- this.setPackageSaved(index, true);
- }
- }
-
- public int size() {
- return vOpeningPackageList.size();
- }
-
- public boolean isSaved() {
- for (int index = 0; index < this.size(); index++) {
- if (!this.getPackageSaved(index)) {
- return false;
- }
- }
- return true;
- }
-
- public boolean isOpen() {
- for (int index = 0; index < this.size(); index++) {
- if (this.getPackageOpen(index)) {
- return true;
- }
- }
- return false;
- }
-
- public void reload(int index) {
- if (index > -1) {
- vOpeningPackageList.elementAt(index).reload();
- }
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPackageType.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPackageType.java
deleted file mode 100644
index 22f3ce311d..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPackageType.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/** @file
-
- The file is used to define opening package type
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.Identifications;
-
-import java.io.IOException;
-
-import org.apache.xmlbeans.XmlException;
-import org.tianocore.PackageSurfaceAreaDocument;
-import org.tianocore.frameworkwizard.common.Log;
-import org.tianocore.frameworkwizard.common.OpenFile;
-import org.tianocore.frameworkwizard.packaging.PackageIdentification;
-
-public class OpeningPackageType extends OpeningFileType {
- //
- // Define class members
- //
- private PackageSurfaceAreaDocument.PackageSurfaceArea xmlSpd = null;
-
- private PackageIdentification id = null;
-
- public OpeningPackageType() {
-
- }
-
- public OpeningPackageType(PackageIdentification identification, PackageSurfaceAreaDocument.PackageSurfaceArea spd) {
- this.id = identification;
- this.xmlSpd = spd;
- }
-
- public PackageSurfaceAreaDocument.PackageSurfaceArea getXmlSpd() {
- return xmlSpd;
- }
-
- public void setXmlSpd(PackageSurfaceAreaDocument.PackageSurfaceArea xmlSpd) {
- this.xmlSpd = xmlSpd;
- }
-
- public PackageIdentification getId() {
- return id;
- }
-
- public void setId(PackageIdentification id) {
- this.id = id;
- }
-
- public void reload() {
- if (this.id != null) {
- String path = id.getPath();
- if (path.length() > 0) {
- try {
- this.xmlSpd = OpenFile.openSpdFile(id.getPath());
- } catch (IOException e) {
- Log.err("Open Package Surface Area " + path, e.getMessage());
- } catch (XmlException e) {
- Log.err("Open Package Surface Area " + path, e.getMessage());
- } catch (Exception e) {
- Log.err("Open Package Surface Area " + path, "Invalid file type");
- }
- }
- }
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPlatformList.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPlatformList.java
deleted file mode 100644
index a2ce431c0b..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPlatformList.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/** @file
-
- The file is used to define opening package list
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.Identifications;
-
-import java.util.Set;
-import java.util.Vector;
-
-import javax.swing.tree.TreePath;
-
-import org.tianocore.PlatformSurfaceAreaDocument;
-import org.tianocore.frameworkwizard.platform.PlatformIdentification;
-
-public class OpeningPlatformList {
-
- private Vector<OpeningPlatformType> vOpeningPlatformList = new Vector<OpeningPlatformType>();
-
- public OpeningPlatformList() {
-
- }
-
- public Vector<OpeningPlatformType> getVOpeningPlatformList() {
- return vOpeningPlatformList;
- }
-
- public void setVOpeningPlatformList(Vector<OpeningPlatformType> openingPlatformList) {
- vOpeningPlatformList = openingPlatformList;
- }
-
- public void insertToOpeningPlatformList(PlatformIdentification id, PlatformSurfaceAreaDocument.PlatformSurfaceArea xmlFpd) {
- vOpeningPlatformList.addElement(new OpeningPlatformType(id, xmlFpd));
- }
-
- public OpeningPlatformType getOpeningPlatformByIndex(int index) {
- if (index > -1 && index < vOpeningPlatformList.size()) {
- return vOpeningPlatformList.elementAt(index);
- }
- return null;
- }
-
- public OpeningPlatformType getOpeningPlatformById(PlatformIdentification id) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- return vOpeningPlatformList.elementAt(index);
- }
- return null;
- }
-
- public int findIndexOfListById(PlatformIdentification id) {
- for (int index = 0; index < vOpeningPlatformList.size(); index++) {
- if (vOpeningPlatformList.elementAt(index).getId().equals(id)) {
- return index;
- }
- }
- return -1;
- }
-
- public void removeFromOpeningPlatformListByIndex(int index) {
- if (index > -1 && index < vOpeningPlatformList.size()) {
- vOpeningPlatformList.removeElementAt(index);
- }
- }
-
- public void removeFromOpeningPlatformListById(PlatformIdentification id) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- vOpeningPlatformList.removeElementAt(findIndexOfListById(id));
- }
- }
-
- public void removeAllFromOpeningPlatformList() {
- vOpeningPlatformList.removeAllElements();
- }
-
- public PlatformSurfaceAreaDocument.PlatformSurfaceArea getPlatformSurfaceAreaFromId(PlatformIdentification id) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- return vOpeningPlatformList.elementAt(index).getXmlFpd();
- }
- return null;
- }
-
- public boolean existsPlatform(PlatformIdentification id) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- return true;
- }
- return false;
- }
-
-
- public void setPlatformSaved(PlatformIdentification id, boolean isSaved) {
- setPlatformSaved(findIndexOfListById(id), isSaved);
- }
-
- public void setPlatformSaved(int index, boolean isSaved) {
- if (index > -1) {
- vOpeningPlatformList.elementAt(index).setSaved(isSaved);
- }
- }
-
- public boolean getPlatformSaved(PlatformIdentification id) {
- return getPlatformSaved(findIndexOfListById(id));
- }
-
- public boolean getPlatformSaved(int index) {
- if (index > -1) {
- return vOpeningPlatformList.elementAt(index).isSaved();
- }
- return true;
- }
-
- public void setPlatformOpen(PlatformIdentification id, boolean isOpen) {
- setPlatformOpen(findIndexOfListById(id), isOpen);
- }
-
- public void setPlatformOpen(int index, boolean isOpen) {
- if (index > -1) {
- vOpeningPlatformList.elementAt(index).setOpen(isOpen);
- }
- }
-
- public boolean getPlatformOpen(PlatformIdentification id) {
- return getPlatformOpen(findIndexOfListById(id));
- }
-
- public boolean getPlatformOpen(int index) {
- if (index > -1) {
- return vOpeningPlatformList.elementAt(index).isOpen();
- }
- return false;
- }
-
- public void setTreePathById(PlatformIdentification id, Set<TreePath> treePath) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- vOpeningPlatformList.elementAt(index).setTreePath(treePath);
- }
- }
-
- public Set<TreePath> getTreePathById(PlatformIdentification id) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- return vOpeningPlatformList.elementAt(index).getTreePath();
- }
- return null;
- }
-
- public Set<TreePath> getTreePathByIndex(int index) {
- if (index > -1) {
- return vOpeningPlatformList.elementAt(index).getTreePath();
- }
- return null;
- }
-
- public PlatformIdentification getIdByPath(String path) {
- PlatformIdentification id = new PlatformIdentification(null, null, null, path);
- int index = findIndexOfListById(id);
- if (index > -1) {
- return vOpeningPlatformList.elementAt(index).getId();
- }
- return null;
- }
-
- public void setNew(PlatformIdentification id, boolean isNew) {
- int index = findIndexOfListById(id);
- if (index > -1) {
- vOpeningPlatformList.elementAt(index).setNew(isNew);
- }
- }
-
- public void closeAll() {
- for (int index = 0; index < this.size(); index++) {
- this.setPlatformOpen(index, false);
- this.setPlatformSaved(index, true);
- }
- }
-
- public int size() {
- return vOpeningPlatformList.size();
- }
-
- public boolean isSaved() {
- for (int index = 0; index < this.size(); index++) {
- if (!this.getPlatformSaved(index)) {
- return false;
- }
- }
- return true;
- }
-
- public boolean isOpen() {
- for (int index = 0; index < this.size(); index++) {
- if (this.getPlatformOpen(index)) {
- return true;
- }
- }
- return false;
- }
-
- public void reload(int index) {
- if (index > -1) {
- vOpeningPlatformList.elementAt(index).reload();
- }
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPlatformType.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPlatformType.java
deleted file mode 100644
index 7a822c91c8..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPlatformType.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/** @file
-
- The file is used to define opening platform type
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.Identifications;
-
-import java.io.IOException;
-
-import org.apache.xmlbeans.XmlException;
-import org.tianocore.PlatformSurfaceAreaDocument;
-import org.tianocore.frameworkwizard.common.Log;
-import org.tianocore.frameworkwizard.common.OpenFile;
-import org.tianocore.frameworkwizard.platform.PlatformIdentification;
-
-public class OpeningPlatformType extends OpeningFileType {
- //
- // Define class members
- //
- private PlatformSurfaceAreaDocument.PlatformSurfaceArea xmlFpd = null;
-
- private PlatformIdentification id = null;
-
- public OpeningPlatformType() {
-
- }
-
- public OpeningPlatformType(PlatformIdentification identification, PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd) {
- this.id = identification;
- this.xmlFpd = fpd;
- }
-
- public PlatformSurfaceAreaDocument.PlatformSurfaceArea getXmlFpd() {
- return xmlFpd;
- }
-
- public void setXmlFpd(PlatformSurfaceAreaDocument.PlatformSurfaceArea xmlFpd) {
- this.xmlFpd = xmlFpd;
- }
-
- public PlatformIdentification getId() {
- return id;
- }
-
- public void setId(PlatformIdentification id) {
- this.id = id;
- }
-
- public void reload() {
- if (this.id != null) {
- String path = id.getPath();
- if (path.length() > 0) {
- try {
- this.xmlFpd = OpenFile.openFpdFile(id.getPath());
- } catch (IOException e) {
- Log.err("Open Platform Surface Area " + path, e.getMessage());
- } catch (XmlException e) {
- Log.err("Open Platform Surface Area " + path, e.getMessage());
- } catch (Exception e) {
- Log.err("Open Platform Surface Area " + path, "Invalid file type");
- }
- }
- }
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/ToolChainConfigId.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/ToolChainConfigId.java
deleted file mode 100644
index f446693004..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/ToolChainConfigId.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/** @file
-
- The file is used to define Tool Chain Configuration Identification
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.Identifications;
-
-public class ToolChainConfigId {
-
- public static final String COMMENTS = "#";
-
- public static final String EQUALS = "=";
-
- private String name = "";
-
- private String value = "";
-
- public ToolChainConfigId(String strName, String strValue) {
- this.name = strName;
- this.value = strValue;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-
- public boolean equals(ToolChainConfigId id) {
- if (this.name.equals(id.name)) {
- return true;
- } else {
- return false;
- }
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/ToolChainConfigVector.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/ToolChainConfigVector.java
deleted file mode 100644
index 49aac3d074..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/ToolChainConfigVector.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/** @file
-
- The file is used to define Tool Chain Configuration Vector
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.Identifications;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.Vector;
-
-public class ToolChainConfigVector {
-
- private Vector<ToolChainConfigId> vToolChainConfigs = new Vector<ToolChainConfigId>();
-
- public int findToolChainConfigs(ToolChainConfigId sfi) {
- for (int index = 0; index < vToolChainConfigs.size(); index++) {
- if (vToolChainConfigs.elementAt(index).equals(sfi)) {
- return index;
- }
- }
- return -1;
- }
-
- public int findToolChainConfigs(String name) {
- for (int index = 0; index < vToolChainConfigs.size(); index++) {
- if (vToolChainConfigs.elementAt(index).getName().equals(name)) {
- return index;
- }
- }
- return -1;
- }
-
- public ToolChainConfigId getToolChainConfigs(int index) {
- if (index > -1) {
- return vToolChainConfigs.elementAt(index);
- } else {
- return null;
- }
- }
-
- public Vector<String> toStringVector(int index) {
- Vector<String> v = new Vector<String>();
- v.addElement(getToolChainConfigs(index).getName());
- v.addElement(getToolChainConfigs(index).getValue());
- return v;
- }
-
- public void addToolChainConfigs(ToolChainConfigId arg0) {
- vToolChainConfigs.addElement(arg0);
- }
-
- public void updateToolChainConfigs(ToolChainConfigId arg0, int arg1) {
- vToolChainConfigs.setElementAt(arg0, arg1);
- }
-
- public void removeToolChainConfigs(ToolChainConfigId arg0) {
- int index = findToolChainConfigs(arg0);
- if (index > -1) {
- vToolChainConfigs.removeElementAt(index);
- }
- }
-
- public void removeToolChainConfigs(int index) {
- if (index > -1 && index < this.size()) {
- vToolChainConfigs.removeElementAt(index);
- }
- }
-
- public void removeAll() {
- vToolChainConfigs = new Vector<ToolChainConfigId>();
- }
-
- public Vector<String> getToolChainConfigsName() {
- Vector<String> v = new Vector<String>();
- for (int index = 0; index < this.vToolChainConfigs.size(); index++) {
- v.addElement(vToolChainConfigs.get(index).getName());
- }
- return v;
- }
-
- public Vector<String> getToolChainConfigsValue() {
- Vector<String> v = new Vector<String>();
- for (int index = 0; index < this.vToolChainConfigs.size(); index++) {
- v.addElement(vToolChainConfigs.get(index).getValue());
- }
- return v;
- }
-
- public int size() {
- return this.vToolChainConfigs.size();
- }
-
- public void saveFile(String file) throws IOException {
- if (size() > 0) {
- FileWriter fw = new FileWriter(file);
- BufferedWriter bw = new BufferedWriter(fw);
- for (int index = 0; index < size(); index++) {
- String line = this.getToolChainConfigs(index).getName() + " " + ToolChainConfigId.EQUALS + " "
- + this.getToolChainConfigs(index).getValue();
- bw.write(line);
- bw.newLine();
- }
- bw.flush();
- bw.close();
- fw.close();
- }
- }
-
- /**
-
- @param file
- @throws IOException
- @throws FileNotFoundException
-
- **/
- public void parseFile(String file) throws IOException {
- FileReader fr = new FileReader(file);
- BufferedReader br = new BufferedReader(fr);
- String line = br.readLine();
- while (line != null) {
- parseLine(line);
- line = br.readLine();
- }
- }
-
- /**
- Parse the input string and add name, value to vector
-
- @param line
-
- **/
- private void parseLine(String line) {
- String name = "";
- String value = "";
- if (line.indexOf(ToolChainConfigId.COMMENTS) != 0 && line.indexOf(ToolChainConfigId.EQUALS) > -1) {
- name = line.substring(0, line.indexOf(ToolChainConfigId.EQUALS)).trim();
- value = line.substring(line.indexOf(ToolChainConfigId.EQUALS) + 1).trim();
- this.addToolChainConfigs(new ToolChainConfigId(name, value));
- }
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Log.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Log.java
deleted file mode 100644
index 49a7a3615b..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Log.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/** @file
-
- The file is used to provides static interfaces to save log and error information
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.frameworkwizard.common;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-import javax.swing.JOptionPane;
-
-import org.tianocore.frameworkwizard.FrameworkWizardUI;
-import org.tianocore.frameworkwizard.workspace.Workspace;
-
-/**
- The class is used to provides static interfaces to save log and error information
-
- **/
-public class Log {
- //
- //Log file directory path
- //
- private static String strLogDir = Workspace.getCurrentWorkspace() + DataType.FILE_SEPARATOR + "Tools"
- + DataType.FILE_SEPARATOR + "Logs";
-
- //
- //Log file
- //
- private static File fleLogFile = null;
-
- //
- //Wrn file
- //
- private static File fleWrnFile = null;
-
- //
- //Err file
- //
- private static File fleErrFile = null;
-
- //
- //Log file name
- //
- private static String strLogFileName = strLogDir + DataType.FILE_SEPARATOR + "frameworkwizard.log";
-
- //
- //Wrn file name
- //
- private static String strWrnFileName = strLogDir + DataType.FILE_SEPARATOR + "frameworkwizard.wrn";
-
- //
- //Err file name
- //
- private static String strErrFileName = strLogDir + DataType.FILE_SEPARATOR + "frameworkwizard.err";
-
- //
- //Flag for create log or not
- //
- private static boolean isSaveLog = false;
-
- /**
- Main class, used for test
-
- @param args
-
- **/
- public static void main(String[] args) {
- try {
- //Log.log("Test", "test");
- //Log.err("Test1", "test1");
- Log
- .wrn("aaa bbbbbb cccccccccccc ddddddddddd eeeeeeeeee fffffffffff gggggggggggggggggg hhhhhhhhhhhhhhhhhhhhhhhhhhhhh iiiii jjjj kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk lll mmm nn poooooooooooooooooooooooooooooooooooooooooooop");
- Log.wrn("Incorrect data type for ModuleEntryPoint");
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- /**
- Call writeToLogFile to save log item and log information to log file
-
- @param strItem The log item
- @param strLog The log information
-
- **/
- public static void log(String strItem, String strLog) {
- try {
- writeToLogFile(strItem + ":" + strLog);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- /**
- Call writeToLogFile to save log information to log file
-
- @param strLog The log information
-
- **/
- public static void log(String strLog) {
- try {
- writeToLogFile(strLog);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- /**
- Call writeToWrnFile to save wrn item and wrn information to wrn file
-
- @param strItem The wrn item
- @param strLog The wrn information
-
- **/
- public static void wrn(String strItem, String strWrn) {
- try {
- writeToWrnFile("Warning when " + strItem + "::" + strWrn);
- showWrnMessage(strWrn);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- /**
- Call writeToWrnFile to save wrn information to wrn file
-
- @param strLog The wrn information
-
- **/
- public static void wrn(String strWrn) {
- try {
- writeToWrnFile("Warning::" + strWrn);
- showWrnMessage("Warning::" + strWrn);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- /**
- Call writeToErrFile to save err item and err information to err file
-
- @param strItem The err item
- @param strLog The err information
-
- **/
- public static void err(String strItem, String strErr) {
- try {
- writeToErrFile("Error when " + strItem + "::" + strErr);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- /**
- Call writeToErrFile to save err information to err file
-
- @param strLog The err information
-
- **/
- public static void err(String strErr) {
- try {
- writeToErrFile("Error::" + strErr);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- /**
- Brings up a dialog to show err message
- When the message's length > defined max length, wrap the text to the next line.
-
- @param strErr The input data of err message
-
- **/
- private static void showWrnMessage(String strErr) {
- String strReturn = Tools.wrapStringByWord(strErr);
- JOptionPane.showConfirmDialog(FrameworkWizardUI.getInstance(), strReturn, "Warning",
- JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);
- }
-
- /**
- Open log file and write log information
-
- @param strLog The log information
- @throws IOException
-
- **/
- private static void writeToLogFile(String strLog) throws Exception {
- if (isSaveLog) {
- try {
- createLogDir();
- if (fleLogFile == null) {
- fleLogFile = new File(strLogFileName);
- fleLogFile.delete();
- fleLogFile.createNewFile();
- }
- FileOutputStream fos = new FileOutputStream(fleLogFile, true);
- fos.write((Tools.getCurrentDateTime() + DataType.DOS_LINE_SEPARATOR).getBytes());
- fos.write((strLog + DataType.DOS_LINE_SEPARATOR).getBytes());
- fos.flush();
- fos.close();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- /**
- Open wrn file and write wrn information
-
- @param strLog The log information
- * @throws Exception
-
- **/
- private static void writeToWrnFile(String strLog) throws Exception {
- if (isSaveLog) {
- try {
- createLogDir();
- if (fleWrnFile == null) {
- fleWrnFile = new File(strWrnFileName);
- fleWrnFile.delete();
- fleWrnFile.createNewFile();
- }
- FileOutputStream fos = new FileOutputStream(fleWrnFile, true);
- fos.write((Tools.getCurrentDateTime() + DataType.DOS_LINE_SEPARATOR).getBytes());
- fos.write((strLog + DataType.DOS_LINE_SEPARATOR).getBytes());
- fos.flush();
- fos.close();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- /**
- Open err file and write err information
-
- @param strLog The log information
- @throws IOException
-
- **/
- private static void writeToErrFile(String strLog) throws Exception {
- if (isSaveLog) {
- try {
- createLogDir();
- if (fleErrFile == null) {
- fleErrFile = new File(strErrFileName);
- fleErrFile.delete();
- fleErrFile.createNewFile();
- }
- FileOutputStream fos = new FileOutputStream(fleErrFile, true);
- fos.write((Tools.getCurrentDateTime() + DataType.DOS_LINE_SEPARATOR).getBytes());
- fos.write((strLog + DataType.DOS_LINE_SEPARATOR).getBytes());
- fos.flush();
- fos.close();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- /**
- Check if directory for Logs exists or not
- Create the directory if it doesn't exist
- * @throws Exception
-
- **/
- private static void createLogDir() throws Exception {
- File f = new File(strLogDir);
- if (!f.exists()) {
- FileOperation.newFolder(strLogDir);
- }
- }
-
- public static boolean isSaveLog() {
- return isSaveLog;
- }
-
- public static void setSaveLog(boolean isSaveLog) {
- Log.isSaveLog = isSaveLog;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/OpenFile.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/OpenFile.java
deleted file mode 100644
index 32eec68258..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/OpenFile.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/** @file
-
- The file provides interface to open xml file.
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.xmlbeans.XmlException;
-import org.apache.xmlbeans.XmlObject;
-import org.tianocore.FrameworkDatabaseDocument;
-import org.tianocore.ModuleSurfaceAreaDocument;
-import org.tianocore.PackageSurfaceAreaDocument;
-import org.tianocore.PlatformSurfaceAreaDocument;
-import org.tianocore.FrameworkDatabaseDocument.FrameworkDatabase;
-import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea;
-import org.tianocore.PackageSurfaceAreaDocument.PackageSurfaceArea;
-import org.tianocore.PlatformSurfaceAreaDocument.PlatformSurfaceArea;
-
-public class OpenFile {
- /**
-
- @param args
-
- **/
- public static void main(String[] args) {
- // TODO Auto-generated method stub
-
- }
-
- /**
- Open specificed Msa file and read its content
-
- @param strMsaFilePath The input data of Msa File Path
-
- **/
- public static ModuleSurfaceArea openMsaFile(String strMsaFilePath) throws IOException, XmlException, Exception {
- Log.log("Open Msa", strMsaFilePath);
- File msaFile = new File(strMsaFilePath);
- ModuleSurfaceAreaDocument xmlMsaDoc = (ModuleSurfaceAreaDocument) XmlObject.Factory.parse(msaFile);
- return xmlMsaDoc.getModuleSurfaceArea();
- }
-
- /**
- Open specificed Spd file and read its content
-
- @param strSpdFilePath The input data of Spd File Path
-
- **/
- public static PackageSurfaceArea openSpdFile(String strSpdFilePath) throws IOException, XmlException, Exception {
- Log.log("Open Spd", strSpdFilePath);
- File spdFile = new File(strSpdFilePath);
- PackageSurfaceAreaDocument xmlSpdDoc = (PackageSurfaceAreaDocument) XmlObject.Factory.parse(spdFile);
- return xmlSpdDoc.getPackageSurfaceArea();
- }
-
- /**
- Open specificed Fpd file and read its content
-
- @param strFpdFilePath The input data of Fpd File Path
-
- **/
- public static PlatformSurfaceArea openFpdFile(String strFpdFilePath) throws IOException, XmlException,
- Exception {
- Log.log("Open Fpd", strFpdFilePath);
- File fpdFile = new File(strFpdFilePath);
- PlatformSurfaceAreaDocument xmlFpdDoc = null;
- xmlFpdDoc = (PlatformSurfaceAreaDocument) XmlObject.Factory.parse(fpdFile);
- return xmlFpdDoc.getPlatformSurfaceArea();
- }
-
- /**
-
- Open specificed Framework Database file and read its content
-
- */
- public static FrameworkDatabase openFrameworkDb(String strDbFilePath) throws IOException, XmlException, Exception {
- Log.log("Open Framework Database", strDbFilePath);
- File db = new File(strDbFilePath);
- FrameworkDatabaseDocument xmlDb = null;
- xmlDb = (FrameworkDatabaseDocument) XmlObject.Factory.parse(db);
- return xmlDb.getFrameworkDatabase();
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/SaveFile.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/SaveFile.java
deleted file mode 100644
index 13e6786ca7..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/SaveFile.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/** @file
-
- The file provides interface to save xml file.
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common;
-
-import java.io.File;
-
-import org.apache.xmlbeans.XmlCursor;
-import org.apache.xmlbeans.XmlObject;
-import org.apache.xmlbeans.XmlOptions;
-import org.tianocore.FrameworkDatabaseDocument;
-import org.tianocore.ModuleSurfaceAreaDocument;
-import org.tianocore.PackageSurfaceAreaDocument;
-import org.tianocore.PlatformSurfaceAreaDocument;
-import org.tianocore.FrameworkDatabaseDocument.FrameworkDatabase;
-import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea;
-import org.tianocore.PackageSurfaceAreaDocument.PackageSurfaceArea;
-import org.tianocore.PlatformSurfaceAreaDocument.PlatformSurfaceArea;
-
-public class SaveFile {
-
- /**
-
- @param args
-
- **/
- public static void main(String[] args) {
-
- }
-
- private static void createDirectory(String path) throws Exception {
- File f = new File(path);
- path = f.getParent();
- FileOperation.newFolder(path);
- }
-
- /**
- Save file as msa
-
- **/
- public static void saveMsaFile(String path, ModuleSurfaceArea msa) throws Exception {
- //
- // Create the file's directory first
- //
- createDirectory(path);
-
- //
- // Remove all empty top level elements
- //
- XmlObject o = msa.getLibraryClassDefinitions();
- if (o != null) {
- if (msa.getLibraryClassDefinitions().getLibraryClassList().size() <= 0) {
- XmlCursor xmlCursor = o.newCursor();
- xmlCursor.removeXml();
- xmlCursor.dispose();
- }
- }
-
- o = msa.getSourceFiles();
- if (o != null) {
- if (msa.getSourceFiles().getFilenameList().size() <= 0) {
- XmlCursor xmlCursor = o.newCursor();
- xmlCursor.removeXml();
- xmlCursor.dispose();
- }
- }
-
- o = msa.getPackageDependencies();
- if (o != null) {
- if (msa.getPackageDependencies().getPackageList().size() <= 0) {
- XmlCursor xmlCursor = o.newCursor();
- xmlCursor.removeXml();
- xmlCursor.dispose();
- }
- }
-
- o = msa.getProtocols();
- if (o != null) {
- if (msa.getProtocols().getProtocolList().size() <= 0
- && msa.getProtocols().getProtocolNotifyList().size() <= 0) {
- XmlCursor xmlCursor = o.newCursor();
- xmlCursor.removeXml();
- xmlCursor.dispose();
- }
- }
-
- o = msa.getEvents();
- if (o != null) {
- if (msa.getEvents().getCreateEvents() != null || msa.getEvents().getSignalEvents() != null) {
- if (msa.getEvents().getCreateEvents() != null && msa.getEvents().getCreateEvents().getEventTypesList().size() <= 0) {
- XmlCursor xmlCursor = o.newCursor();
- xmlCursor.removeXml();
- xmlCursor.dispose();
- }
- if (msa.getEvents().getSignalEvents() != null && msa.getEvents().getSignalEvents().getEventTypesList().size() <= 0) {
- XmlCursor xmlCursor = o.newCursor();
- xmlCursor.removeXml();
- xmlCursor.dispose();
- }
- } else {
- XmlCursor xmlCursor = o.newCursor();
- xmlCursor.removeXml();
- xmlCursor.dispose();
- }
- }
-
- o = msa.getHobs();
- if (o != null) {
- if (msa.getHobs().getHobTypesList().size() <= 0) {
- XmlCursor xmlCursor = o.newCursor();
- xmlCursor.removeXml();
- xmlCursor.dispose();
- }
- }
-
- o = msa.getPPIs();
- if (o != null) {
- if (msa.getPPIs().getPpiList().size() <= 0 && msa.getPPIs().getPpiNotifyList().size() <= 0) {
- XmlCursor xmlCursor = o.newCursor();
- xmlCursor.removeXml();
- xmlCursor.dispose();
- }
- }
-
- o = msa.getVariables();
- if (o != null) {
- if (msa.getVariables().getVariableList().size() <= 0) {
- XmlCursor xmlCursor = o.newCursor();
- xmlCursor.removeXml();
- xmlCursor.dispose();
- }
- }
-
- o = msa.getBootModes();
- if (o != null) {
- if (msa.getBootModes().getBootModeList().size() <= 0) {
- XmlCursor xmlCursor = o.newCursor();
- xmlCursor.removeXml();
- xmlCursor.dispose();
- }
- }
-
- o = msa.getSystemTables();
- if (o != null) {
- if (msa.getSystemTables().getSystemTableCNamesList().size() <= 0) {
- XmlCursor xmlCursor = o.newCursor();
- xmlCursor.removeXml();
- xmlCursor.dispose();
- }
- }
-
- o = msa.getDataHubs();
- if (o != null) {
- if (msa.getDataHubs().getDataHubRecordList().size() <= 0) {
- XmlCursor xmlCursor = o.newCursor();
- xmlCursor.removeXml();
- xmlCursor.dispose();
- }
- }
-
- o = msa.getHiiPackages();
- if (o != null) {
- if (msa.getHiiPackages().getHiiPackageList().size() <= 0) {
- XmlCursor xmlCursor = o.newCursor();
- xmlCursor.removeXml();
- xmlCursor.dispose();
- }
- }
-
- o = msa.getGuids();
- if (o != null) {
- if (msa.getGuids().getGuidCNamesList().size() <= 0) {
- XmlCursor xmlCursor = o.newCursor();
- xmlCursor.removeXml();
- xmlCursor.dispose();
- }
- }
-
- o = msa.getExterns();
- if (o != null) {
- if (msa.getExterns().getExternList().size() <= 0 && msa.getExterns().getSpecificationList().size() <= 0
- && msa.getExterns().getPcdIsDriver() == null) {
- XmlCursor xmlCursor = o.newCursor();
- xmlCursor.removeXml();
- xmlCursor.dispose();
- }
- }
-
- o = msa.getPcdCoded();
- if (o != null) {
- if (msa.getPcdCoded().getPcdEntryList().size() <= 0) {
- XmlCursor xmlCursor = o.newCursor();
- xmlCursor.removeXml();
- xmlCursor.dispose();
- }
- }
-
- ModuleSurfaceAreaDocument msaDoc = ModuleSurfaceAreaDocument.Factory.newInstance();
- File f = new File(path);
-
- //
- //Init namespace
- //
- XmlCursor cursor = XmlConfig.setupXmlCursor(msa.newCursor());
-
- //
- //Config file format
- //
- XmlOptions options = XmlConfig.setupXmlOptions();
-
- //
- //Create finial doc
- //
- msaDoc.addNewModuleSurfaceArea();
- msaDoc.setModuleSurfaceArea((ModuleSurfaceArea) cursor.getObject());
- //
- //Save the file
- //
- msaDoc.save(f, options);
- cursor.dispose();
- }
-
- /**
- Save file as spd
-
- **/
- public static void saveSpdFile(String path, PackageSurfaceArea spd) throws Exception {
- //
- // Create the file's directory first
- //
- createDirectory(path);
-
- PackageSurfaceAreaDocument spdDoc = PackageSurfaceAreaDocument.Factory.newInstance();
- File f = new File(path);
-
- //
- //Init namespace
- //
- XmlCursor cursor = XmlConfig.setupXmlCursor(spd.newCursor());
-
- //
- //Config file format
- //
- XmlOptions options = XmlConfig.setupXmlOptions();
-
- //
- //Create finial doc
- //
- spdDoc.addNewPackageSurfaceArea();
- spdDoc.setPackageSurfaceArea((PackageSurfaceArea) cursor.getObject());
- //
- //Save the file
- //
- spdDoc.save(f, options);
- cursor.dispose();
- }
-
- /**
- Save file as fpd
-
- **/
- public static void saveFpdFile(String path, PlatformSurfaceArea fpd) throws Exception {
- //
- // Create the file's directory first
- //
- createDirectory(path);
-
- PlatformSurfaceAreaDocument fpdDoc = PlatformSurfaceAreaDocument.Factory.newInstance();
- File f = new File(path);
-
- //
- //Init namespace
- //
- XmlCursor cursor = XmlConfig.setupXmlCursor(fpd.newCursor());
-
- //
- //Config file format
- //
- XmlOptions options = XmlConfig.setupXmlOptions();
-
- //
- //Create finial doc
- //
- fpdDoc.addNewPlatformSurfaceArea();
- fpdDoc.setPlatformSurfaceArea((PlatformSurfaceArea) cursor.getObject());
- //
- //Save the file
- //
- fpdDoc.save(f, options);
- cursor.dispose();
- }
-
- /**
- Save file as framework db
-
- **/
- public static void saveDbFile(String path, FrameworkDatabase db) throws Exception {
- FrameworkDatabaseDocument dbDoc = FrameworkDatabaseDocument.Factory.newInstance();
- File f = new File(path);
-
- //
- //Init namespace
- //
- XmlCursor cursor = XmlConfig.setupXmlCursor(db.newCursor());
-
- //
- //Config file format
- //
- XmlOptions options = XmlConfig.setupXmlOptions();
-
- //
- //Create finial doc
- //
- dbDoc.addNewFrameworkDatabase();
- dbDoc.setFrameworkDatabase((FrameworkDatabase) cursor.getObject());
-
- //
- //Save the file
- //
- dbDoc.save(f, options);
- cursor.dispose();
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Sort.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Sort.java
deleted file mode 100644
index 65a345ab5b..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Sort.java
+++ /dev/null
@@ -1,378 +0,0 @@
-/** @file
-
- The file is used to provide all kinds of sorting method
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.frameworkwizard.common;
-
-import java.util.Vector;
-
-import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
-import org.tianocore.frameworkwizard.module.Identifications.Guids.GuidsIdentification;
-import org.tianocore.frameworkwizard.module.Identifications.Guids.GuidsVector;
-import org.tianocore.frameworkwizard.module.Identifications.LibraryClass.LibraryClassIdentification;
-import org.tianocore.frameworkwizard.module.Identifications.LibraryClass.LibraryClassVector;
-import org.tianocore.frameworkwizard.module.Identifications.PcdCoded.PcdCodedIdentification;
-import org.tianocore.frameworkwizard.module.Identifications.PcdCoded.PcdCodedVector;
-import org.tianocore.frameworkwizard.module.Identifications.PcdCoded.PcdIdentification;
-import org.tianocore.frameworkwizard.module.Identifications.PcdCoded.PcdVector;
-import org.tianocore.frameworkwizard.module.Identifications.Ppis.PpisIdentification;
-import org.tianocore.frameworkwizard.module.Identifications.Ppis.PpisVector;
-import org.tianocore.frameworkwizard.module.Identifications.Protocols.ProtocolsIdentification;
-import org.tianocore.frameworkwizard.module.Identifications.Protocols.ProtocolsVector;
-import org.tianocore.frameworkwizard.packaging.PackageIdentification;
-import org.tianocore.frameworkwizard.platform.PlatformIdentification;
-
-public class Sort {
-
- /**
- Sort all elements in the vector as the specific sort type
-
- @param v The vector need to be sorted
- @param mode Sort type DataType.Sort_Type_Ascendin and DataType.Sort_Type_Descending
-
- **/
- public static void sortVectorString(Vector<String> v, int mode) {
- if (v != null) {
- for (int indexI = 0; indexI < v.size(); indexI++) {
- for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {
- if ((v.get(indexJ).compareTo(v.get(indexI)) < 0 && mode == DataType.SORT_TYPE_ASCENDING)
- || (v.get(indexI).compareTo(v.get(indexJ)) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {
- String temp = v.get(indexI);
- v.setElementAt(v.get(indexJ), indexI);
- v.setElementAt(temp, indexJ);
- }
- }
- }
- }
- }
-
- /**
- Sort all elements of vector and return sorted sequence
-
- @param v The vector need to be sorted
- @param mode Sort type DataType.Sort_Type_Ascendin and DataType.Sort_Type_Descending
- @return Vector<Integer> The sorted sequence
-
- **/
- public static Vector<Integer> getVectorSortSequence(Vector<String> v, int mode) {
- Vector<Integer> vSequence = new Vector<Integer>();
- //
- // Init sequence
- //
- if (v != null) {
- for (int index = 0; index < v.size(); index++) {
- vSequence.addElement(index);
- }
- }
-
- //
- // sort and get new sequence
- //
- for (int indexI = 0; indexI < v.size(); indexI++) {
- for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {
- if ((v.get(indexJ).compareTo(v.get(indexI)) < 0 && mode == DataType.SORT_TYPE_ASCENDING)
- || (v.get(indexI).compareTo(v.get(indexJ)) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {
- //
- // Swap strings
- //
- String tempStr = v.get(indexI);
- v.setElementAt(v.get(indexJ), indexI);
- v.setElementAt(tempStr, indexJ);
-
- //
- // Swap sequences
- //
- int tempInt = vSequence.get(indexI);
- vSequence.setElementAt(vSequence.get(indexJ), indexI);
- vSequence.setElementAt(tempInt, indexJ);
- }
- }
- }
-
- return vSequence;
- }
-
- /**
- Sort all elements of vector as input sequence
-
- @param v The vector need to be sorted
- @param vSequence The sort sequence should be followed
-
- **/
- public static void sortVectorString(Vector<String> v, Vector<Integer> vSequence) {
- if (v != null && vSequence != null && v.size() == vSequence.size()) {
- Vector<String> tempV = new Vector<String>();
- for (int index = 0; index < v.size(); index++) {
- tempV.addElement(v.get(index));
- }
- for (int index = 0; index < v.size(); index++) {
- v.setElementAt(tempV.get(vSequence.get(index)), index);
- }
- }
- }
-
- /**
- Sort all modules
-
- @param v
- @param mode
-
- **/
- public static void sortModules(Vector<ModuleIdentification> v, int mode) {
- if (v != null) {
- //
- // sort by name
- //
- for (int indexI = 0; indexI < v.size(); indexI++) {
- for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {
- if ((v.get(indexJ).getName().compareTo(v.get(indexI).getName()) < 0 && mode == DataType.SORT_TYPE_ASCENDING)
- || (v.get(indexI).getName().compareTo(v.get(indexJ).getName()) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {
- ModuleIdentification temp = v.get(indexI);
- v.setElementAt(v.get(indexJ), indexI);
- v.setElementAt(temp, indexJ);
- }
- }
- }
- }
- }
-
- /**
- Sort all packages
-
- @param v
- @param mode
-
- **/
- public static void sortPackages(Vector<PackageIdentification> v, int mode) {
- if (v != null) {
- //
- // sort by name
- //
- for (int indexI = 0; indexI < v.size(); indexI++) {
- for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {
- if ((v.get(indexJ).getName().compareTo(v.get(indexI).getName()) < 0 && mode == DataType.SORT_TYPE_ASCENDING)
- || (v.get(indexI).getName().compareTo(v.get(indexJ).getName()) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {
- PackageIdentification temp = v.get(indexI);
- v.setElementAt(v.get(indexJ), indexI);
- v.setElementAt(temp, indexJ);
- }
- }
- }
- }
- }
-
- /**
- Sort all platforms
-
- @param v
- @param mode
-
- **/
- public static void sortPlatforms(Vector<PlatformIdentification> v, int mode) {
- if (v != null) {
- //
- // sort by name
- //
- for (int indexI = 0; indexI < v.size(); indexI++) {
- for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {
- if ((v.get(indexJ).getName().compareTo(v.get(indexI).getName()) < 0 && mode == DataType.SORT_TYPE_ASCENDING)
- || (v.get(indexI).getName().compareTo(v.get(indexJ).getName()) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {
- PlatformIdentification temp = v.get(indexI);
- v.setElementAt(v.get(indexJ), indexI);
- v.setElementAt(temp, indexJ);
- }
- }
- }
- }
- }
-
- /**
- Sort all pcd entries
-
- @param v
- @param mode
-
- **/
- public static void sortPcds(PcdVector v, int mode) {
- if (v != null) {
- //
- // sort by name
- //
- for (int indexI = 0; indexI < v.size(); indexI++) {
- for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {
- if ((v.getPcd(indexJ).getName().compareTo(v.getPcd(indexI).getName()) < 0 && mode == DataType.SORT_TYPE_ASCENDING)
- || (v.getPcd(indexI).getName().compareTo(v.getPcd(indexJ).getName()) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {
- PcdIdentification temp = v.getPcd(indexI);
- v.setPcd(v.getPcd(indexJ), indexI);
- v.setPcd(temp, indexJ);
- }
- }
- }
- }
- }
-
- /**
- Sort all ppi entries
-
- @param v
- @param mode
-
- **/
- public static void sortPpis(PpisVector v, int mode) {
- if (v != null) {
- //
- // sort by name
- //
- for (int indexI = 0; indexI < v.size(); indexI++) {
- for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {
- if ((v.getPpis(indexJ).getName().compareTo(v.getPpis(indexI).getName()) < 0 && mode == DataType.SORT_TYPE_ASCENDING)
- || (v.getPpis(indexI).getName().compareTo(v.getPpis(indexJ).getName()) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {
- PpisIdentification temp = v.getPpis(indexI);
- v.setPpis(v.getPpis(indexJ), indexI);
- v.setPpis(temp, indexJ);
- }
- }
- }
- }
- }
-
- /**
- Sort all protocol entries
-
- @param v
- @param mode
-
- **/
- public static void sortProtocols(ProtocolsVector v, int mode) {
- if (v != null) {
- //
- // sort by name
- //
- for (int indexI = 0; indexI < v.size(); indexI++) {
- for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {
- if ((v.getProtocols(indexJ).getName().compareTo(v.getProtocols(indexI).getName()) < 0 && mode == DataType.SORT_TYPE_ASCENDING)
- || (v.getProtocols(indexI).getName().compareTo(v.getProtocols(indexJ).getName()) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {
- ProtocolsIdentification temp = v.getProtocols(indexI);
- v.setProtocols(v.getProtocols(indexJ), indexI);
- v.setProtocols(temp, indexJ);
- }
- }
- }
- }
- }
-
- /**
- Sort all guid entries
-
- @param v
- @param mode
-
- **/
- public static void sortGuids(GuidsVector v, int mode) {
- if (v != null) {
- //
- // sort by name
- //
- for (int indexI = 0; indexI < v.size(); indexI++) {
- for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {
- if ((v.getGuids(indexJ).getName().compareTo(v.getGuids(indexI).getName()) < 0 && mode == DataType.SORT_TYPE_ASCENDING)
- || (v.getGuids(indexI).getName().compareTo(v.getGuids(indexJ).getName()) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {
- GuidsIdentification temp = v.getGuids(indexI);
- v.setGuids(v.getGuids(indexJ), indexI);
- v.setGuids(temp, indexJ);
- }
- }
- }
- }
- }
-
- /**
- Sort all pcd coded entries
-
- @param v
- @param mode
-
- **/
- public static void sortPcdCodeds(PcdCodedVector v, int mode) {
- if (v != null) {
- //
- // sort by name
- //
- for (int indexI = 0; indexI < v.size(); indexI++) {
- for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {
- if ((v.getPcdCoded(indexJ).getName().compareTo(v.getPcdCoded(indexI).getName()) < 0 && mode == DataType.SORT_TYPE_ASCENDING)
- || (v.getPcdCoded(indexI).getName().compareTo(v.getPcdCoded(indexJ).getName()) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {
- PcdCodedIdentification temp = v.getPcdCoded(indexI);
- v.setPcdCoded(v.getPcdCoded(indexJ), indexI);
- v.setPcdCoded(temp, indexJ);
- }
- }
- }
- }
- }
-
- /**
- Sort all pcd coded entries
-
- @param v
- @param mode
-
- **/
- public static void sortLibraryClass(LibraryClassVector v, int mode) {
- if (v != null) {
- //
- // sort by name
- //
- for (int indexI = 0; indexI < v.size(); indexI++) {
- for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {
- if ((v.getLibraryClass(indexJ).getLibraryClassName().compareTo(
- v.getLibraryClass(indexI)
- .getLibraryClassName()) < 0 && mode == DataType.SORT_TYPE_ASCENDING)
- || (v.getLibraryClass(indexI).getLibraryClassName().compareTo(
- v.getLibraryClass(indexJ)
- .getLibraryClassName()) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {
- LibraryClassIdentification temp = v.getLibraryClass(indexI);
- v.setLibraryClass(v.getLibraryClass(indexJ), indexI);
- v.setLibraryClass(temp, indexJ);
- }
- }
- }
- }
- }
-
- /**
- Sort all objects of a vector based on the object's "toString"
-
- @param v
- @param mode
-
- **/
- public static void sortObjectVector(Vector<Object> v, int mode) {
- if (v != null) {
- //
- // sort by name
- //
- for (int indexI = 0; indexI < v.size(); indexI++) {
- for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {
- if ((v.get(indexJ).toString().compareTo(v.get(indexI).toString()) < 0 && mode == DataType.SORT_TYPE_ASCENDING)
- || (v.get(indexI).toString().compareTo(v.get(indexJ).toString()) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {
- Object temp = v.get(indexI);
- v.setElementAt(v.get(indexJ), indexI);
- v.setElementAt(temp, indexJ);
- }
- }
- }
- }
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Tools.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Tools.java
deleted file mode 100644
index 3eb9b85455..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Tools.java
+++ /dev/null
@@ -1,715 +0,0 @@
-/** @file
-
- The file is used to provides some useful interfaces
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.frameworkwizard.common;
-
-import java.awt.Component;
-import java.io.File;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-import java.util.UUID;
-import java.util.Vector;
-
-import javax.swing.DefaultListModel;
-import javax.swing.JComboBox;
-import javax.swing.JList;
-import javax.swing.JOptionPane;
-import javax.swing.JTable;
-
-import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea;
-import org.tianocore.MsaHeaderDocument.MsaHeader;
-import org.tianocore.PackageSurfaceAreaDocument.PackageSurfaceArea;
-import org.tianocore.PlatformHeaderDocument.PlatformHeader;
-import org.tianocore.PlatformSurfaceAreaDocument.PlatformSurfaceArea;
-import org.tianocore.SpdHeaderDocument.SpdHeader;
-import org.tianocore.frameworkwizard.FrameworkWizardUI;
-import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
-import org.tianocore.frameworkwizard.packaging.PackageIdentification;
-import org.tianocore.frameworkwizard.platform.PlatformIdentification;
-
-/**
- The class is used to provides some useful interfaces
-
- **/
-public class Tools {
-
- //
- // The dir user selected to create new package in
- //
- public static String dirForNewSpd = null;
-
- /**
- Get current date and time and format it as "yyyy-MM-dd HH:mm"
-
- @return formatted current date and time
-
- **/
- public static String getCurrentDateTime() {
- Date now = new Date(System.currentTimeMillis());
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
- return sdf.format(now);
- }
-
- /**
- Generate a UUID
-
- @return the created UUID
-
- **/
- public static String generateUuidString() {
- return UUID.randomUUID().toString();
- }
-
- /**
- Use current file separator in the path
-
- @param strPath
- @return
-
- **/
- public static String convertPathToCurrentOsType(String strPath) {
- strPath = strPath.replace(DataType.DOS_FILE_SEPARATOR, DataType.FILE_SEPARATOR);
- strPath = strPath.replace(DataType.UNIX_FILE_SEPARATOR, DataType.FILE_SEPARATOR);
- return strPath;
- }
-
- /**
- Use Unix file separator in the path
-
- @param strPath
- @return
-
- **/
- public static String convertPathToUnixType(String strPath) {
- strPath = strPath.replace(DataType.DOS_FILE_SEPARATOR, DataType.UNIX_FILE_SEPARATOR);
- return strPath;
- }
-
- /**
- Use Dos file separator in the path
-
- @param strPath
- @return
-
- **/
- public static String convertPathToDosType(String strPath) {
- strPath = strPath.replace(DataType.UNIX_FILE_SEPARATOR, DataType.DOS_FILE_SEPARATOR);
- return strPath;
- }
-
- /**
- Get all system properties and output to the console
-
- **/
- public static void getSystemProperties() {
- System.out.println(System.getProperty("java.class.version"));
- System.out.println(System.getProperty("java.class.path"));
- System.out.println(System.getProperty("java.ext.dirs"));
- System.out.println(System.getProperty("os.name"));
- System.out.println(System.getProperty("os.arch"));
- System.out.println(System.getProperty("os.version"));
- System.out.println(System.getProperty("file.separator"));
- System.out.println(System.getProperty("path.separator"));
- System.out.println(System.getProperty("line.separator"));
- System.out.println(System.getProperty("user.name"));
- System.out.println(System.getProperty("user.home"));
- System.out.println(System.getProperty("user.dir"));
- System.out.println(System.getProperty("PATH"));
-
- System.out.println(System.getenv("PROCESSOR_REVISION"));
- }
-
- /**
- Generate selection items for JComboBox by input vector
-
- **/
- public static void generateComboBoxByVector(JComboBox jcb, Vector<String> vector) {
- if (jcb != null) {
- jcb.removeAllItems();
- }
- if (vector != null) {
- for (int index = 0; index < vector.size(); index++) {
- jcb.addItem(vector.elementAt(index));
- }
- }
- }
-
- /**
- Generate selection items for JList by input vector
-
- **/
- public static void generateListByVector(JList jl, Vector<String> vector) {
- if (jl != null) {
- DefaultListModel listModel = (DefaultListModel) jl.getModel();
- listModel.removeAllElements();
-
- if (vector != null) {
- for (int index = 0; index < vector.size(); index++) {
- listModel.addElement(vector.get(index));
- }
- }
-
- if (listModel.size() > 0) {
- jl.setSelectedIndex(0);
- }
- }
- }
-
- /**
- Get path only from a path
-
- @param filePath
- @return
-
- **/
- public static String getFilePathOnly(String filePath) {
- String path = filePath.substring(0, filePath.length() - getFileNameOnly(filePath).length());
- if (path.endsWith(DataType.FILE_SEPARATOR)) {
- path = path.substring(0, path.length() - DataType.FILE_SEPARATOR.length());
- }
-
- return path;
- }
-
- /**
- Get file name from a path
-
- @param filePath
- @return
-
- **/
- public static String getFileNameOnly(String filePath) {
- File f = new File(filePath);
- return f.getAbsoluteFile().getName();
- }
-
- public static String getFileNameWithoutExt(String filePath) {
- filePath = getFileNameOnly(filePath);
- filePath = filePath.substring(0, filePath.lastIndexOf(DataType.FILE_EXT_SEPARATOR));
- return filePath;
- }
-
- /**
- Get relative path
-
- @param wholePath
- @param commonPath
- @return wholePath - commonPath
-
- **/
- public static String getRelativePath(String wholePath, String commonPath) {
- String path = "";
- int i = 0;
- i = wholePath.indexOf(commonPath);
- if (i > -1) {
- i = i + commonPath.length();
- } else {
- return "";
- }
- path = wholePath.substring(i);
- //
- // remove file separator of head
- //
- if (path.indexOf(DataType.DOS_FILE_SEPARATOR) == 0) {
- path = path.substring(0 + DataType.DOS_FILE_SEPARATOR.length());
- }
- if (path.indexOf(DataType.UNIX_FILE_SEPARATOR) == 0) {
- path = path.substring(0 + DataType.DOS_FILE_SEPARATOR.length());
- }
- //
- // remove file separator of rear
- //
- if (path.length() > 0
- && path.indexOf(DataType.DOS_FILE_SEPARATOR) == path.length() - DataType.DOS_FILE_SEPARATOR.length()) {
- path = path.substring(0, path.length() - DataType.DOS_FILE_SEPARATOR.length());
- }
- if (path.length() > 0
- && path.indexOf(DataType.UNIX_FILE_SEPARATOR) == path.length() - DataType.UNIX_FILE_SEPARATOR.length()) {
- path = path.substring(0, path.length() - DataType.DOS_FILE_SEPARATOR.length());
- }
- //
- // convert to UNIX format
- //
- path = Tools.convertPathToUnixType(path);
- return path;
- }
-
- /**
- Convert List ot Vector
-
- @param list
- @return
-
- **/
- public static Vector<String> convertListToVector(List list) {
- Vector<String> v = new Vector<String>();
- if (list != null && list.size() > 0) {
- for (int index = 0; index < list.size(); index++) {
- v.addElement(list.get(index).toString());
- }
- }
- return v;
- }
-
- /**
- Convert a Vector to a String, separator with ", "
-
- @param v
- @return
-
- **/
- public static String convertVectorToString(Vector<String> v) {
- String s = "";
- for (int index = 0; index < v.size(); index++) {
- s = s + v.elementAt(index).toString() + ", ";
- }
- if (s.length() > 0) {
- s = s.substring(0, s.length() - ", ".length());
- }
- return s;
- }
-
- /**
- Convert a List to a String
-
- @param list
- @return
-
- **/
- public static String convertListToString(List list) {
- return Tools.convertVectorToString(Tools.convertListToVector(list));
- }
-
- /**
- If the input path missing ext, append the ext to the path
-
- @param path
- @param type
- @return
-
- **/
- public static String addPathExt(String path, int type) {
- String match = "";
- if (type == DataType.RETURN_TYPE_MODULE_SURFACE_AREA) {
- match = DataType.FILE_EXT_SEPARATOR + DataType.MODULE_SURFACE_AREA_EXT;
- }
- if (type == DataType.RETURN_TYPE_PACKAGE_SURFACE_AREA) {
- match = DataType.FILE_EXT_SEPARATOR + DataType.PACKAGE_SURFACE_AREA_EXT;
- }
- if (type == DataType.RETURN_TYPE_PLATFORM_SURFACE_AREA) {
- match = DataType.FILE_EXT_SEPARATOR + DataType.PLATFORM_SURFACE_AREA_EXT;
- }
- if (type == DataType.RETURN_TYPE_TEXT) {
- match = DataType.FILE_EXT_SEPARATOR + DataType.TEXT_FILE_EXT;
- }
- if (type == DataType.RETURN_TYPE_FAR_SURFACE_AREA) {
- match = DataType.FILE_EXT_SEPARATOR + DataType.FAR_SURFACE_AREA_EXT;
- }
- if (path.length() <= match.length()) {
- path = path + match;
- return path;
- }
- if (!(path.substring(path.length() - match.length())).equals(match)) {
- path = path + match;
- }
- return path;
- }
-
- /**
- Show a message box
-
- @param arg0
-
- **/
- public static void showInformationMessage(String arg0) {
- JOptionPane.showConfirmDialog(FrameworkWizardUI.getInstance(), arg0, "Info", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE);
- }
-
- /**
- if the string doesn't end with a file separator, append it to the string
-
- @param arg0
- @return
-
- **/
- public static String addFileSeparator(String arg0) {
- if (!arg0.endsWith(DataType.FILE_SEPARATOR)) {
- arg0 = arg0 + DataType.FILE_SEPARATOR;
- }
- return arg0;
- }
-
- /**
- Wrap single line long input string to multiple short line string by word
-
- @param arg0 input string
- @return wraped string
-
- **/
- public static String wrapStringByWord(String arg0) {
- int intMaxLength = 40;
- String strReturn = "";
- String strTemp = "";
- boolean isCopied = true;
-
- if (arg0 == null) {
- return "";
- }
- if (arg0.length() <= 0) {
- return "";
- }
-
- //
- // Convert string to array by " "
- //
- String s[] = arg0.split(" ");
- if (arg0.indexOf(" ") == -1) {
- s[0] = arg0;
- }
-
- //
- // Add each string of array one by one
- //
- for (int index = 0; index < s.length; index++) {
- String ss = s[index];
- isCopied = false;
- //
- // The word length > defined line length
- //
- if (ss.length() > intMaxLength) {
- //
- // Finish previous line
- //
- if (!isCopied) {
- strReturn = strReturn + strTemp + DataType.LINE_SEPARATOR;
- strTemp = "";
- }
- //
- // Separater to short lines
- //
- while (ss.length() > 0) {
- if (ss.length() > intMaxLength) {
- strReturn = strReturn + s[index].substring(0, intMaxLength - 1) + DataType.UNIX_LINE_SEPARATOR;
- ss = ss.substring(intMaxLength);
- isCopied = true;
- } else {
- strTemp = ss;
- ss = "";
- isCopied = false;
- }
- }
- } else {
- if ((strTemp + " " + ss).length() <= intMaxLength) {
- strTemp = strTemp + " " + ss;
- continue;
- } else {
- strReturn = strReturn + strTemp + DataType.LINE_SEPARATOR;
- if ((index == s.length - 1) && (!ss.equals(""))) {
- strReturn = strReturn + ss;
- } else {
- strTemp = ss + " ";
- }
- isCopied = true;
- }
- }
- }
-
- if (!isCopied) {
- strReturn = strReturn + strTemp;
- }
-
- return strReturn;
- }
-
- public static String convertUnicodeHexStringToString(String str) {
- //
- // Handle if str is null or empty
- //
- if (str == null) {
- return "";
- }
- if (str.equals("")) {
- return "";
- }
-
- String returnString = "";
- String[] strArray = str.split(" ");
- for (int index = 0; index < strArray.length; index++) {
- String s = strArray[index];
- if (s.length() == 6 && s.indexOf(DataType.HEX_STRING_HEADER) == 0) {
- s = s.substring(DataType.HEX_STRING_HEADER.length());
- } else {
- Log.err("convertUnicodeHexStringToString", "Incorrect input string: " + str);
- continue;
- }
- //
- // Change hex to dec
- //
- int dec = Integer.parseInt(s, 16);
-
- returnString = returnString + (char) (dec);
- }
- return returnString;
- }
-
- /**
- Convert input string to unicode hex string
-
- @param str input string
- @return unicode hex string
-
- **/
- public static String convertStringToUnicodeHexString(String str) {
- //
- // Handle if str is null or empty
- //
- if (str == null) {
- return "";
- }
- if (str.equals("")) {
- return "";
- }
-
- //
- // convert string to hex string
- //
- String hexString = "";
- for (int index = 0; index < str.length(); index++) {
- int codePoint = str.codePointAt(index);
- String s = Integer.toHexString(codePoint);
- //
- // Make the string to four length
- //
- if (s.length() == 3) {
- s = "0" + s;
- } else if (s.length() == 2) {
- s = "00" + s;
- } else if (s.length() == 1) {
- s = "000" + s;
- }
-
- //
- // Add the string to return hex string
- //
- hexString = hexString + DataType.HEX_STRING_HEADER + s + " ";
- }
-
- //
- // return hex string
- //
- return hexString.trim();
- }
-
- public static ModuleIdentification getId(String path, ModuleSurfaceArea msa) {
- MsaHeader head = msa.getMsaHeader();
- String name = head.getModuleName();
- String guid = head.getGuidValue();
- String version = head.getVersion();
- ModuleIdentification id = new ModuleIdentification(name, guid, version, path);
- return id;
- }
-
- public static PackageIdentification getId(String path, PackageSurfaceArea spd) {
- SpdHeader head = spd.getSpdHeader();
- String name = head.getPackageName();
- String guid = head.getGuidValue();
- String version = head.getVersion();
- PackageIdentification id = new PackageIdentification(name, guid, version, path);
- return id;
- }
-
- public static PlatformIdentification getId(String path, PlatformSurfaceArea fpd) {
- PlatformHeader head = fpd.getPlatformHeader();
- String name = head.getPlatformName();
- String guid = head.getGuidValue();
- String version = head.getVersion();
- PlatformIdentification id = new PlatformIdentification(name, guid, version, path);
- return id;
- }
-
- /**
- * To reset the width of input component via container width
- *
- * @param c
- * @param containerWidth
- *
- */
- public static void resizeComponentWidth(Component c, int containerWidth, int preferredWidth) {
- int newWidth = c.getPreferredSize().width + (containerWidth - preferredWidth);
- if (newWidth < c.getPreferredSize().width) {
- newWidth = c.getPreferredSize().width;
- }
- c.setSize(new java.awt.Dimension(newWidth, c.getHeight()));
- c.validate();
- }
-
- /**
- * To reset the height of input component via container height
- *
- * @param c
- * @param containerHeight
- *
- */
- public static void resizeComponentHeight(Component c, int containerHeight, int preferredHeight) {
- int newHeight = c.getPreferredSize().height + (containerHeight - preferredHeight);
- if (newHeight < c.getPreferredSize().height) {
- newHeight = c.getPreferredSize().height;
- }
- c.setSize(new java.awt.Dimension(c.getWidth(), newHeight));
- c.validate();
- }
-
- /**
- * To reset the size of input component via container size
- *
- * @param c
- * @param containerWidth
- * @param containerHeight
- *
- */
- public static void resizeComponent(Component c, int containerWidth, int containerHeight, int preferredWidth,
- int preferredHeight) {
- resizeComponentWidth(c, containerWidth, preferredWidth);
- resizeComponentHeight(c, containerHeight, preferredHeight);
- }
-
- /**
- To adjust each column's width to meet the table's size
-
- @param t the table need to be adjusted
- @param width the new width of the table
-
- **/
- public static void resizeTableColumn(JTable t, int width) {
- if (t != null) {
- int columnCount = t.getColumnCount();
- for (int index = 0; index < columnCount; index++) {
- t.getColumn(t.getColumnName(index)).setPreferredWidth(width / columnCount);
- }
- }
- }
-
- /**
- * To relocate the input component
- *
- * @param c
- * @param containerWidth
- * @param spaceToRight
- *
- */
- public static void relocateComponentX(Component c, int containerWidth, int preferredWidth, int spaceToRight) {
- int intGapToRight = spaceToRight + c.getPreferredSize().width;
- int newLocationX = containerWidth - intGapToRight;
- if (newLocationX < preferredWidth - intGapToRight) {
- newLocationX = preferredWidth - intGapToRight;
- }
- c.setLocation(newLocationX, c.getLocation().y);
- c.validate();
- }
-
- /**
- * To relocate the input component
- *
- * @param c
- * @param containerHeight
- * @param spaceToBottom
- *
- */
- public static void relocateComponentY(Component c, int containerHeight, int preferredHeight, int spaceToBottom) {
- int intGapToBottom = spaceToBottom + c.getPreferredSize().height;
- int newLocationY = containerHeight - intGapToBottom;
- if (newLocationY < preferredHeight - spaceToBottom) {
- newLocationY = preferredHeight - spaceToBottom;
- }
- c.setLocation(c.getLocation().x, newLocationY);
- c.validate();
- }
-
- /**
- * To relocate the input component
- *
- * @param c
- * @param containerWidth
- * @param containerHeight
- * @param spaceToBottom
- * @param spaceToRight
- *
- */
- public static void relocateComponent(Component c, int containerWidth, int containerHeight, int preferredWidht,
- int preferredHeight, int spaceToRight, int spaceToBottom) {
- relocateComponentX(c, containerWidth, preferredWidht, spaceToRight);
- relocateComponentY(c, containerHeight, preferredHeight, spaceToBottom);
- }
-
- /**
- Move the component to the center of screen
-
- @param c
- @param width
-
- **/
- public static void centerComponent(Component c, int width) {
- c.setLocation(width / 2 - c.getWidth() / 2, c.getLocation().y);
- c.validate();
- }
-
- /**
- Move the component to the center of screen and adjust the y location
-
- @param c
- @param width
-
- **/
- public static void centerComponent(Component c, int width, int containerHeight, int preferredHeight,
- int spaceToBottom) {
- relocateComponentY(c, containerHeight, preferredHeight, spaceToBottom);
- centerComponent(c, width);
- }
-
- /**
- Find the count of searchString in wholeString
-
- @param wholeString
- @param searchString
- @return
-
- **/
- public static int getSpecificStringCount(String wholeString, String searchString) {
- int count = 0;
- count = wholeString.split(searchString).length;
- return count;
- }
-
- /**
- * Check the input data is empty or not
- *
- * @param strValue
- * The input data which need be checked
- *
- * @retval true - The input data is empty
- * @retval fals - The input data is not empty
- *
- */
- public static boolean isEmpty(String strValue) {
- if (strValue == null) {
- return true;
- }
- if (strValue.length() > 0) {
- return false;
- }
- return true;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/XmlConfig.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/XmlConfig.java
deleted file mode 100644
index db7b58d1d9..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/XmlConfig.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/** @file
-
- The file is used to config XML file format
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.frameworkwizard.common;
-
-import org.apache.xmlbeans.XmlCursor;
-import org.apache.xmlbeans.XmlOptions;
-
-public class XmlConfig {
- public static XmlCursor setupXmlCursor(XmlCursor cursor) {
- String uri = "http://www.TianoCore.org/2006/Edk2.0";
- cursor.push();
- cursor.toNextToken();
- cursor.insertNamespace("", uri);
- cursor.insertNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
- cursor.pop();
- return cursor;
- }
-
- public static XmlOptions setupXmlOptions() {
- XmlOptions options = new XmlOptions();
- options.setCharacterEncoding("UTF-8");
- options.setSavePrettyPrint();
- options.setSavePrettyPrintIndent(2);
- return options;
- }
-
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/Find.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/Find.java
deleted file mode 100644
index de67728dfc..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/Find.java
+++ /dev/null
@@ -1,1050 +0,0 @@
-/** @file
-
- The file is used to provide Find funtions in workspace
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.find;
-
-import java.util.Vector;
-
-import org.tianocore.GuidDeclarationsDocument.GuidDeclarations;
-import org.tianocore.LibraryClassDeclarationsDocument.LibraryClassDeclarations.LibraryClass;
-import org.tianocore.LibraryClassDefinitionsDocument.LibraryClassDefinitions;
-import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea;
-import org.tianocore.PackageSurfaceAreaDocument.PackageSurfaceArea;
-import org.tianocore.PcdDeclarationsDocument.PcdDeclarations.PcdEntry;
-import org.tianocore.PpiDeclarationsDocument.PpiDeclarations;
-import org.tianocore.ProtocolDeclarationsDocument.ProtocolDeclarations;
-import org.tianocore.frameworkwizard.common.DataType;
-import org.tianocore.frameworkwizard.common.GlobalData;
-import org.tianocore.frameworkwizard.common.Sort;
-import org.tianocore.frameworkwizard.common.Tools;
-import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
-import org.tianocore.frameworkwizard.module.Identifications.Guids.GuidsIdentification;
-import org.tianocore.frameworkwizard.module.Identifications.Guids.GuidsVector;
-import org.tianocore.frameworkwizard.module.Identifications.LibraryClass.LibraryClassIdentification;
-import org.tianocore.frameworkwizard.module.Identifications.LibraryClass.LibraryClassVector;
-import org.tianocore.frameworkwizard.module.Identifications.PcdCoded.PcdCodedIdentification;
-import org.tianocore.frameworkwizard.module.Identifications.PcdCoded.PcdCodedVector;
-import org.tianocore.frameworkwizard.module.Identifications.Ppis.PpisIdentification;
-import org.tianocore.frameworkwizard.module.Identifications.Ppis.PpisVector;
-import org.tianocore.frameworkwizard.module.Identifications.Protocols.ProtocolsIdentification;
-import org.tianocore.frameworkwizard.module.Identifications.Protocols.ProtocolsVector;
-import org.tianocore.frameworkwizard.packaging.PackageIdentification;
-
-public class Find {
-
- private final static String SEPERATOR = ".";
-
- /**
- Get all ppi entries from workspace
-
- @return
-
- **/
- public static PpisVector getAllPpisVector() {
- PpisVector pv = new PpisVector();
- ModuleSurfaceArea msa = null;
- ModuleIdentification mid = null;
- PpisIdentification pid = null;
-
- //
- // Go through each module one by one
- //
- if (GlobalData.openingModuleList.size() > 0) {
- for (int indexOfModule = 0; indexOfModule < GlobalData.openingModuleList.size(); indexOfModule++) {
- msa = GlobalData.openingModuleList.getOpeningModuleByIndex(indexOfModule).getXmlMsa();
- mid = GlobalData.openingModuleList.getOpeningModuleByIndex(indexOfModule).getId();
-
- if (msa.getPPIs() != null) {
- if (msa.getPPIs().getPpiList().size() > 0) {
- for (int index = 0; index < msa.getPPIs().getPpiList().size(); index++) {
- String arg0 = msa.getPPIs().getPpiList().get(index).getPpiCName();
- String arg1 = DataType.PPI_TYPE_PPI;
- String arg2 = null;
- if (msa.getPPIs().getPpiList().get(index).getUsage() != null) {
- arg2 = msa.getPPIs().getPpiList().get(index).getUsage().toString();
- }
-
- String arg3 = msa.getPPIs().getPpiList().get(index).getFeatureFlag();
- Vector<String> arg4 = Tools.convertListToVector(msa.getPPIs().getPpiList().get(index)
- .getSupArchList());
- String arg5 = msa.getPPIs().getPpiList().get(index).getHelpText();
-
- pid = new PpisIdentification(arg0, arg1, arg2, arg3, arg4, arg5);
- pid.setBelongModule(mid);
-
- //
- // Find which package declares it
- //
- for (int indexOfPackage = 0; indexOfPackage < GlobalData.openingPackageList.size(); indexOfPackage++) {
- PackageSurfaceArea spd = GlobalData.openingPackageList
- .getOpeningPackageByIndex(
- indexOfPackage)
- .getXmlSpd();
- PackageIdentification packageId = GlobalData.openingPackageList
- .getOpeningPackageByIndex(
- indexOfPackage)
- .getId();
- if (spd.getPpiDeclarations() != null) {
- for (int indexOfPpis = 0; indexOfPpis < spd.getPpiDeclarations().getEntryList()
- .size(); indexOfPpis++) {
- if (spd.getPpiDeclarations().getEntryList().get(indexOfPpis).getCName()
- .equals(arg0)) {
- pid.setDeclaredBy(packageId);
- break;
- }
- }
- }
- }
- if (pid.getDeclaredBy() == null) {
- pid.setDeclaredBy(new PackageIdentification("", "", "", ""));
- }
-
- pv.addPpis(pid);
- }
- }
- if (msa.getPPIs().getPpiNotifyList().size() > 0) {
- for (int index = 0; index < msa.getPPIs().getPpiNotifyList().size(); index++) {
- String arg0 = msa.getPPIs().getPpiNotifyList().get(index).getPpiNotifyCName();
- String arg1 = DataType.PPI_TYPE_PPI_NOTIFY;
- String arg2 = null;
- if (msa.getPPIs().getPpiNotifyList().get(index).getUsage() != null) {
- arg2 = msa.getPPIs().getPpiNotifyList().get(index).getUsage().toString();
- }
-
- String arg3 = msa.getPPIs().getPpiNotifyList().get(index).getFeatureFlag();
- Vector<String> arg4 = Tools.convertListToVector(msa.getPPIs().getPpiNotifyList().get(index)
- .getSupArchList());
- String arg5 = msa.getPPIs().getPpiNotifyList().get(index).getHelpText();
-
- pid = new PpisIdentification(arg0, arg1, arg2, arg3, arg4, arg5);
- pid.setBelongModule(mid);
-
- //
- // Find which package declares it
- //
- for (int indexOfPackage = 0; indexOfPackage < GlobalData.openingPackageList.size(); indexOfPackage++) {
- PackageSurfaceArea spd = GlobalData.openingPackageList
- .getOpeningPackageByIndex(
- indexOfPackage)
- .getXmlSpd();
- PackageIdentification packageId = GlobalData.openingPackageList
- .getOpeningPackageByIndex(
- indexOfPackage)
- .getId();
- if (spd.getPpiDeclarations() != null) {
- for (int indexOfPpis = 0; indexOfPpis < spd.getPpiDeclarations().getEntryList()
- .size(); indexOfPpis++) {
- if (spd.getPpiDeclarations().getEntryList().get(indexOfPpis).getCName()
- .equals(arg0)) {
- pid.setDeclaredBy(packageId);
- break;
- }
- }
- }
- }
- if (pid.getDeclaredBy() == null) {
- pid.setDeclaredBy(new PackageIdentification("", "", "", ""));
- }
-
- pv.addPpis(pid);
- }
- }
- }
- }
- }
- //
- // Go through all defined ppi to find which is not added yet.
- //
- for (int indexOfPackage = 0; indexOfPackage < GlobalData.openingPackageList.size(); indexOfPackage++) {
- PackageSurfaceArea spd = GlobalData.openingPackageList.getOpeningPackageByIndex(indexOfPackage).getXmlSpd();
- PackageIdentification packageId = GlobalData.openingPackageList.getOpeningPackageByIndex(indexOfPackage)
- .getId();
- if (spd.getPpiDeclarations() != null) {
- for (int indexOfPpis = 0; indexOfPpis < spd.getPpiDeclarations().getEntryList().size(); indexOfPpis++) {
- boolean isFound = false;
- PpiDeclarations.Entry e = spd.getPpiDeclarations().getEntryList().get(indexOfPpis);
- for (int indexOfPv = 0; indexOfPv < pv.size(); indexOfPv++) {
- if (e.getCName().equals(pv.getPpis(indexOfPv).getName())) {
- isFound = true;
- break;
- }
- }
- if (!isFound) {
- String arg0 = e.getCName();
- String arg1 = "";
- String arg2 = "";
- String arg3 = "";
- Vector<String> arg4 = Tools.convertListToVector(e.getSupArchList());
- String arg5 = e.getHelpText();
-
- pid = new PpisIdentification(arg0, arg1, arg2, arg3, arg4, arg5);
- pid.setBelongModule(null);
- pid.setDeclaredBy(packageId);
- pv.addPpis(pid);
- }
- }
- }
- }
- Sort.sortPpis(pv, DataType.SORT_TYPE_ASCENDING);
- return pv;
- }
-
- /**
- Re-org all ppi entries for find table
-
- @return
-
- **/
- public static Vector<PpiId> getAllPpisForFind() {
- Vector<PpiId> ppi = new Vector<PpiId>();
- PpisVector pv = Find.getAllPpisVector();
- boolean isAdded = false;
- boolean isProduced = false;
-
- //
- // Go through pv to add item as new format to ppi one by one
- //
- for (int indexOfPv = 0; indexOfPv < pv.size(); indexOfPv++) {
- isAdded = false;
- PpisIdentification pvId = pv.getPpis(indexOfPv);
-
- //
- // First check if produced or not
- //
- if (pvId.getUsage().equals(DataType.USAGE_TYPE_ALWAYS_PRODUCED)
- || pvId.getUsage().equals(DataType.USAGE_TYPE_SOMETIMES_PRODUCED)) {
- isProduced = true;
- } else if (pvId.getUsage().equals(DataType.USAGE_TYPE_ALWAYS_CONSUMED)
- || pvId.getUsage().equals(DataType.USAGE_TYPE_SOMETIMES_CONSUMED)) {
- isProduced = false;
- }
-
- //
- // Get the sting "PackageName.ModuleName"
- //
- String tmp = "";
- if (pvId.getBelongModule() != null) {
- tmp = pvId.getBelongModule().getPackageId().getName() + SEPERATOR + pvId.getBelongModule().getName();
- }
-
- //
- // Check if the item has been added in
- // If added, append package name and new module name
- // If not added, add a new one first
- //
- for (int indexOfPpi = 0; indexOfPpi < ppi.size(); indexOfPpi++) {
- PpiId ppiId = ppi.get(indexOfPpi);
-
- if (pvId.getName().equals(ppiId.getName())) {
- if (isProduced) {
- ppi.get(indexOfPpi).setProducedModules(ppiId.getProducedModules() + "<br>" + tmp);
- } else if (!isProduced) {
- ppi.get(indexOfPpi).setConsumedModules(ppiId.getConsumedModules() + "<br>" + tmp);
- }
- isAdded = true;
- continue;
- }
- }
-
- //
- // Add a new one
- //
- if (!isAdded) {
- if (isProduced) {
- ppi
- .addElement(new PpiId(pvId.getName(), pvId.getType(), tmp, null, pvId.getDeclaredBy().getName()));
- } else if (!isProduced) {
- ppi
- .addElement(new PpiId(pvId.getName(), pvId.getType(), null, tmp, pvId.getDeclaredBy().getName()));
- }
- }
- }
-
- return ppi;
- }
-
- /**
- Get all protocol entries from workspace
-
- @return
-
- **/
- public static ProtocolsVector getAllProtocolsVector() {
- ProtocolsVector pv = new ProtocolsVector();
- ModuleSurfaceArea msa = null;
- ModuleIdentification mid = null;
- ProtocolsIdentification pid = null;
-
- //
- // Go through each module one by one
- //
- if (GlobalData.openingModuleList.size() > 0) {
- for (int indexOfModule = 0; indexOfModule < GlobalData.openingModuleList.size(); indexOfModule++) {
- msa = GlobalData.openingModuleList.getOpeningModuleByIndex(indexOfModule).getXmlMsa();
- mid = GlobalData.openingModuleList.getOpeningModuleByIndex(indexOfModule).getId();
-
- if (msa.getProtocols() != null) {
- if (msa.getProtocols().getProtocolList().size() > 0) {
- for (int index = 0; index < msa.getProtocols().getProtocolList().size(); index++) {
- String arg0 = msa.getProtocols().getProtocolList().get(index).getProtocolCName();
- String arg1 = DataType.PROTOCOL_TYPE_PROTOCOL;
- String arg2 = null;
- if (msa.getProtocols().getProtocolList().get(index).getUsage() != null) {
- arg2 = msa.getProtocols().getProtocolList().get(index).getUsage().toString();
- }
-
- String arg3 = msa.getProtocols().getProtocolList().get(index).getFeatureFlag();
- Vector<String> arg4 = Tools.convertListToVector(msa.getProtocols().getProtocolList()
- .get(index).getSupArchList());
- String arg5 = msa.getProtocols().getProtocolList().get(index).getHelpText();
-
- pid = new ProtocolsIdentification(arg0, arg1, arg2, arg3, arg4, arg5);
- pid.setBelongModule(mid);
-
- //
- // Find which package declares it
- //
- for (int indexOfPackage = 0; indexOfPackage < GlobalData.openingPackageList.size(); indexOfPackage++) {
- PackageSurfaceArea spd = GlobalData.openingPackageList
- .getOpeningPackageByIndex(
- indexOfPackage)
- .getXmlSpd();
- PackageIdentification packageId = GlobalData.openingPackageList
- .getOpeningPackageByIndex(
- indexOfPackage)
- .getId();
- if (spd.getProtocolDeclarations() != null) {
- for (int indexOfProtocols = 0; indexOfProtocols < spd.getProtocolDeclarations()
- .getEntryList().size(); indexOfProtocols++) {
- if (spd.getProtocolDeclarations().getEntryList().get(indexOfProtocols)
- .getCName().equals(arg0)) {
- pid.setDeclaredBy(packageId);
- break;
- }
- }
- }
- }
- if (pid.getDeclaredBy() == null) {
- pid.setDeclaredBy(new PackageIdentification("", "", "", ""));
- }
- pv.addProtocols(pid);
- }
- }
- if (msa.getProtocols().getProtocolNotifyList().size() > 0) {
- for (int index = 0; index < msa.getProtocols().getProtocolNotifyList().size(); index++) {
- String arg0 = msa.getProtocols().getProtocolNotifyList().get(index)
- .getProtocolNotifyCName();
- String arg1 = DataType.PPI_TYPE_PPI_NOTIFY;
- String arg2 = null;
- if (msa.getProtocols().getProtocolNotifyList().get(index).getUsage() != null) {
- arg2 = msa.getProtocols().getProtocolNotifyList().get(index).getUsage().toString();
- }
-
- String arg3 = msa.getProtocols().getProtocolNotifyList().get(index).getFeatureFlag();
- Vector<String> arg4 = Tools.convertListToVector(msa.getProtocols().getProtocolNotifyList()
- .get(index).getSupArchList());
- String arg5 = msa.getProtocols().getProtocolNotifyList().get(index).getHelpText();
-
- pid = new ProtocolsIdentification(arg0, arg1, arg2, arg3, arg4, arg5);
- pid.setBelongModule(mid);
-
- //
- // Find which package declares it
- //
- for (int indexOfPackage = 0; indexOfPackage < GlobalData.openingPackageList.size(); indexOfPackage++) {
- PackageSurfaceArea spd = GlobalData.openingPackageList
- .getOpeningPackageByIndex(
- indexOfPackage)
- .getXmlSpd();
- PackageIdentification packageId = GlobalData.openingPackageList
- .getOpeningPackageByIndex(
- indexOfPackage)
- .getId();
- if (spd.getProtocolDeclarations() != null) {
- for (int indexOfProtocols = 0; indexOfProtocols < spd.getProtocolDeclarations()
- .getEntryList().size(); indexOfProtocols++) {
- if (spd.getProtocolDeclarations().getEntryList().get(indexOfProtocols)
- .getCName().equals(arg0)) {
- pid.setDeclaredBy(packageId);
- break;
- }
- }
- }
- }
- if (pid.getDeclaredBy() == null) {
- pid.setDeclaredBy(new PackageIdentification("", "", "", ""));
- }
-
- pv.addProtocols(pid);
- }
- }
- }
- }
- }
- //
- // Go through all defined protocols to find which is not added yet.
- //
- for (int indexOfPackage = 0; indexOfPackage < GlobalData.openingPackageList.size(); indexOfPackage++) {
- PackageSurfaceArea spd = GlobalData.openingPackageList.getOpeningPackageByIndex(indexOfPackage).getXmlSpd();
- PackageIdentification packageId = GlobalData.openingPackageList.getOpeningPackageByIndex(indexOfPackage)
- .getId();
- if (spd.getProtocolDeclarations() != null) {
- for (int indexOfProtocols = 0; indexOfProtocols < spd.getProtocolDeclarations().getEntryList().size(); indexOfProtocols++) {
- boolean isFound = false;
- ProtocolDeclarations.Entry e = spd.getProtocolDeclarations().getEntryList().get(indexOfProtocols);
- for (int indexOfPv = 0; indexOfPv < pv.size(); indexOfPv++) {
- if (e.getCName().equals(pv.getProtocols(indexOfPv).getName())) {
- isFound = true;
- break;
- }
- }
- if (!isFound) {
- String arg0 = e.getCName();
- String arg1 = "";
- String arg2 = "";
- String arg3 = "";
- Vector<String> arg4 = Tools.convertListToVector(e.getSupArchList());
- String arg5 = e.getHelpText();
-
- pid = new ProtocolsIdentification(arg0, arg1, arg2, arg3, arg4, arg5);
- pid.setBelongModule(null);
- pid.setDeclaredBy(packageId);
- pv.addProtocols(pid);
- }
- }
- }
- }
- Sort.sortProtocols(pv, DataType.SORT_TYPE_ASCENDING);
- return pv;
- }
-
- /**
- Re-org all protocol entries for find table
-
- @return
-
- **/
- public static Vector<ProtocolId> getAllProtocolsForFind() {
- Vector<ProtocolId> protocol = new Vector<ProtocolId>();
- ProtocolsVector pv = Find.getAllProtocolsVector();
- boolean isAdded = false;
- boolean isProduced = false;
-
- //
- // Go through pv to add item as new format to ppi one by one
- //
- for (int indexOfPv = 0; indexOfPv < pv.size(); indexOfPv++) {
- isAdded = false;
- ProtocolsIdentification pvId = pv.getProtocols(indexOfPv);
-
- //
- // First check if produced or not
- //
- if (pvId.getUsage().equals(DataType.USAGE_TYPE_ALWAYS_PRODUCED)
- || pvId.getUsage().equals(DataType.USAGE_TYPE_SOMETIMES_PRODUCED)) {
- isProduced = true;
- } else if (pvId.getUsage().equals(DataType.USAGE_TYPE_ALWAYS_CONSUMED)
- || pvId.getUsage().equals(DataType.USAGE_TYPE_SOMETIMES_CONSUMED)) {
- isProduced = false;
- }
-
- //
- // Get the sting "PackageName.ModuleName"
- //
- String tmp = "";
- if (pvId.getBelongModule() != null) {
- tmp = pvId.getBelongModule().getPackageId().getName() + SEPERATOR + pvId.getBelongModule().getName();
- }
-
- //
- // Check if the item has been added in
- // If added, append package name and new module name
- // If not added, add a new one first
- //
- for (int indexOfProtocol = 0; indexOfProtocol < protocol.size(); indexOfProtocol++) {
- ProtocolId protocolId = protocol.get(indexOfProtocol);
-
- if (pvId.getName().equals(protocolId.getName())) {
- if (isProduced) {
- protocol.get(indexOfProtocol)
- .setProducedModules(protocolId.getProducedModules() + "<br>" + tmp);
- } else if (!isProduced) {
- protocol.get(indexOfProtocol)
- .setConsumedModules(protocolId.getConsumedModules() + "<br>" + tmp);
- }
- isAdded = true;
- continue;
- }
- }
-
- //
- // Add a new one
- //
- if (!isAdded) {
- if (isProduced) {
- protocol.addElement(new ProtocolId(pvId.getName(), pvId.getType(), tmp, null, pvId.getDeclaredBy()
- .getName()));
- } else if (!isProduced) {
- protocol.addElement(new ProtocolId(pvId.getName(), pvId.getType(), null, tmp, pvId.getDeclaredBy()
- .getName()));
- }
- }
- }
-
- return protocol;
- }
-
- /**
- Get all protocol entries from workspace
-
- @return
-
- **/
- public static GuidsVector getAllGuidsVector() {
- GuidsVector gv = new GuidsVector();
- ModuleSurfaceArea msa = null;
- ModuleIdentification mid = null;
- GuidsIdentification gid = null;
-
- //
- // Go through each module one by one
- //
- if (GlobalData.openingModuleList.size() > 0) {
- for (int indexOfModule = 0; indexOfModule < GlobalData.openingModuleList.size(); indexOfModule++) {
- msa = GlobalData.openingModuleList.getOpeningModuleByIndex(indexOfModule).getXmlMsa();
- mid = GlobalData.openingModuleList.getOpeningModuleByIndex(indexOfModule).getId();
-
- if (msa.getGuids() != null) {
- if (msa.getGuids().getGuidCNamesList().size() > 0) {
- for (int index = 0; index < msa.getGuids().getGuidCNamesList().size(); index++) {
- String arg0 = msa.getGuids().getGuidCNamesList().get(index).getGuidCName();
- String arg1 = null;
- if (msa.getGuids().getGuidCNamesList().get(index).getUsage() != null) {
- arg1 = msa.getGuids().getGuidCNamesList().get(index).getUsage().toString();
- }
-
- String arg2 = msa.getGuids().getGuidCNamesList().get(index).getFeatureFlag();
- Vector<String> arg3 = Tools.convertListToVector(msa.getGuids().getGuidCNamesList()
- .get(index).getSupArchList());
- String arg4 = msa.getGuids().getGuidCNamesList().get(index).getHelpText();
-
- gid = new GuidsIdentification(arg0, arg1, arg2, arg3, arg4);
- gid.setBelongModule(mid);
-
- //
- // Find which package declares it
- //
- for (int indexOfPackage = 0; indexOfPackage < GlobalData.openingPackageList.size(); indexOfPackage++) {
- PackageSurfaceArea spd = GlobalData.openingPackageList
- .getOpeningPackageByIndex(
- indexOfPackage)
- .getXmlSpd();
- PackageIdentification packageId = GlobalData.openingPackageList
- .getOpeningPackageByIndex(
- indexOfPackage)
- .getId();
- if (spd.getGuidDeclarations() != null) {
- for (int indexOfGuids = 0; indexOfGuids < spd.getGuidDeclarations().getEntryList()
- .size(); indexOfGuids++) {
- if (spd.getGuidDeclarations().getEntryList().get(indexOfGuids).getCName()
- .equals(arg0)) {
- gid.setDeclaredBy(packageId);
- break;
- }
- }
- }
- }
- if (gid.getDeclaredBy() == null) {
- gid.setDeclaredBy(new PackageIdentification("", "", "", ""));
- }
-
- gv.addGuids(gid);
- }
- }
- }
- }
- }
- //
- // Go through all defined guids to find which is not added yet.
- //
- for (int indexOfPackage = 0; indexOfPackage < GlobalData.openingPackageList.size(); indexOfPackage++) {
- PackageSurfaceArea spd = GlobalData.openingPackageList.getOpeningPackageByIndex(indexOfPackage).getXmlSpd();
- PackageIdentification packageId = GlobalData.openingPackageList.getOpeningPackageByIndex(indexOfPackage)
- .getId();
- if (spd.getGuidDeclarations() != null) {
- for (int indexOfGuids = 0; indexOfGuids < spd.getGuidDeclarations().getEntryList().size(); indexOfGuids++) {
- boolean isFound = false;
- GuidDeclarations.Entry e = spd.getGuidDeclarations().getEntryList().get(indexOfGuids);
- for (int indexOfGv = 0; indexOfGv < gv.size(); indexOfGv++) {
- if (e.getCName().equals(gv.getGuids(indexOfGv).getName())) {
- isFound = true;
- break;
- }
- }
- if (!isFound) {
- String arg0 = e.getCName();
- String arg1 = "";
- String arg2 = "";
- Vector<String> arg3 = Tools.convertListToVector(e.getSupArchList());
- String arg4 = e.getHelpText();
-
- gid = new GuidsIdentification(arg0, arg1, arg2, arg3, arg4);
- gid.setBelongModule(null);
- gid.setDeclaredBy(packageId);
- gv.addGuids(gid);
- }
- }
- }
- }
- Sort.sortGuids(gv, DataType.SORT_TYPE_ASCENDING);
- return gv;
- }
-
- /**
- Re-org all guid entries for find table
-
- @return
-
- **/
- public static Vector<GuidId> getAllGuidsForFind() {
- Vector<GuidId> guid = new Vector<GuidId>();
- GuidsVector gv = Find.getAllGuidsVector();
- boolean isAdded = false;
- boolean isProduced = false;
-
- //
- // Go through pv to add item as new format to ppi one by one
- //
- for (int indexOfGv = 0; indexOfGv < gv.size(); indexOfGv++) {
- isAdded = false;
- GuidsIdentification gvId = gv.getGuids(indexOfGv);
-
- //
- // First check if produced or not
- //
- if (gvId.getUsage().equals(DataType.USAGE_TYPE_ALWAYS_PRODUCED)
- || gvId.getUsage().equals(DataType.USAGE_TYPE_SOMETIMES_PRODUCED)) {
- isProduced = true;
- } else if (gvId.getUsage().equals(DataType.USAGE_TYPE_ALWAYS_CONSUMED)
- || gvId.getUsage().equals(DataType.USAGE_TYPE_SOMETIMES_CONSUMED)) {
- isProduced = false;
- }
-
- //
- // Get the sting "PackageName.ModuleName"
- //
- String tmp = "";
- if (gvId.getBelongModule() != null) {
- tmp = gvId.getBelongModule().getPackageId().getName() + SEPERATOR + gvId.getBelongModule().getName();
- }
-
- //
- // Check if the item has been added in
- // If added, append package name and new module name
- // If not added, add a new one first
- //
- for (int indexOfGuid = 0; indexOfGuid < guid.size(); indexOfGuid++) {
- GuidId guidId = guid.get(indexOfGuid);
-
- if (gvId.getName().equals(guidId.getName())) {
- if (isProduced) {
- guid.get(indexOfGuid).setProducedModules(guidId.getProducedModules() + "<br>" + tmp);
- } else if (!isProduced) {
- guid.get(indexOfGuid).setConsumedModules(guidId.getConsumedModules() + "<br>" + tmp);
- }
- isAdded = true;
- continue;
- }
- }
-
- //
- // Add a new one
- //
- if (!isAdded) {
- if (isProduced) {
- guid.addElement(new GuidId(gvId.getName(), "GUID", tmp, null, gvId.getDeclaredBy().getName()));
- } else if (!isProduced) {
- guid.addElement(new GuidId(gvId.getName(), "GUID", null, tmp, gvId.getDeclaredBy().getName()));
- }
- }
- }
-
- return guid;
- }
-
- /**
- Get all pcd coded entries from workspace
-
- @return
-
- **/
- public static PcdCodedVector getAllPcdCodedVector() {
- PcdCodedVector pv = new PcdCodedVector();
- ModuleSurfaceArea msa = null;
- ModuleIdentification mid = null;
- PcdCodedIdentification pid = null;
-
- //
- // Go through each module one by one
- //
- if (GlobalData.openingModuleList.size() > 0) {
- for (int indexOfModule = 0; indexOfModule < GlobalData.openingModuleList.size(); indexOfModule++) {
- msa = GlobalData.openingModuleList.getOpeningModuleByIndex(indexOfModule).getXmlMsa();
- mid = GlobalData.openingModuleList.getOpeningModuleByIndex(indexOfModule).getId();
-
- if (msa.getPcdCoded() != null) {
- if (msa.getPcdCoded().getPcdEntryList().size() > 0) {
- for (int index = 0; index < msa.getPcdCoded().getPcdEntryList().size(); index++) {
-
- String arg0 = msa.getPcdCoded().getPcdEntryList().get(index).getCName();
- String arg1 = msa.getPcdCoded().getPcdEntryList().get(index).getTokenSpaceGuidCName();
-
- String arg2 = msa.getPcdCoded().getPcdEntryList().get(index).getFeatureFlag();
- Vector<String> arg3 = Tools.convertListToVector(msa.getPcdCoded().getPcdEntryList()
- .get(index).getSupArchList());
-
- String arg4 = msa.getPcdCoded().getPcdEntryList().get(index).getDefaultValue();
- String arg5 = msa.getPcdCoded().getPcdEntryList().get(index).getHelpText();
- String arg6 = null;
- if (msa.getPcdCoded().getPcdEntryList().get(index).getPcdItemType() != null) {
- arg6 = msa.getPcdCoded().getPcdEntryList().get(index).getPcdItemType().toString();
- }
- String arg7 = null;
- if (msa.getPcdCoded().getPcdEntryList().get(index).getUsage() != null) {
- arg7 = msa.getPcdCoded().getPcdEntryList().get(index).getUsage().toString();
- }
- pid = new PcdCodedIdentification(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
- pid.setBelongModule(mid);
-
- //
- // Find which package declares it
- //
- for (int indexOfPackage = 0; indexOfPackage < GlobalData.openingPackageList.size(); indexOfPackage++) {
- PackageSurfaceArea spd = GlobalData.openingPackageList
- .getOpeningPackageByIndex(
- indexOfPackage)
- .getXmlSpd();
- PackageIdentification packageId = GlobalData.openingPackageList
- .getOpeningPackageByIndex(
- indexOfPackage)
- .getId();
- if (spd.getPcdDeclarations() != null) {
- for (int indexOfPcds = 0; indexOfPcds < spd.getPcdDeclarations().getPcdEntryList()
- .size(); indexOfPcds++) {
- PcdEntry pcdEntry = spd.getPcdDeclarations().getPcdEntryList().get(indexOfPcds);
- if (pcdEntry.getCName().equals(arg0)) {
- pid.setTokenSpaceGuidCName(pcdEntry.getTokenSpaceGuidCName());
- pid.setToken(pcdEntry.getToken().toString());
- pid.setDatumType(pcdEntry.getDatumType().toString());
- pid.setValue(pcdEntry.getDefaultValue());
- pid.setUsage(Tools.convertListToString(pcdEntry.getValidUsage()));
- pid.setHelp(pcdEntry.getHelpText());
- pid.setDeclaredBy(packageId);
- break;
- }
- }
- }
- }
- if (pid.getDeclaredBy() == null) {
- pid.setDeclaredBy(new PackageIdentification("", "", "", ""));
- }
-
- pv.addPcdCoded(pid);
- }
- }
- }
- }
- }
- //
- // Go through all defined pcds to find which is not added yet.
- //
- for (int indexOfPackage = 0; indexOfPackage < GlobalData.openingPackageList.size(); indexOfPackage++) {
- PackageSurfaceArea spd = GlobalData.openingPackageList.getOpeningPackageByIndex(indexOfPackage).getXmlSpd();
- PackageIdentification packageId = GlobalData.openingPackageList.getOpeningPackageByIndex(indexOfPackage)
- .getId();
- if (spd.getPcdDeclarations() != null) {
- for (int indexOfPcds = 0; indexOfPcds < spd.getPcdDeclarations().getPcdEntryList().size(); indexOfPcds++) {
- boolean isFound = false;
- PcdEntry e = spd.getPcdDeclarations().getPcdEntryList().get(indexOfPcds);
- for (int indexOfPv = 0; indexOfPv < pv.size(); indexOfPv++) {
- if (e.getCName().equals(pv.getPcdCoded(indexOfPv).getName())) {
- isFound = true;
- break;
- }
- }
- if (!isFound) {
- pid = new PcdCodedIdentification("", "", "", null, "", "", null, null);
- pid.setName(e.getCName());
- pid.setTokenSpaceGuidCName(e.getTokenSpaceGuidCName());
- pid.setToken(e.getToken().toString());
- pid.setDatumType(e.getDatumType().toString());
- pid.setValue(e.getDefaultValue());
- pid.setUsage(Tools.convertListToString(e.getValidUsage()));
- pid.setHelp(e.getHelpText());
- pid.setDeclaredBy(packageId);
-
- pid.setBelongModule(null);
- pv.addPcdCoded(pid);
- }
- }
- }
- }
- Sort.sortPcdCodeds(pv, DataType.SORT_TYPE_ASCENDING);
- return pv;
- }
-
- /**
-
- @param pv
- @return
-
- **/
- public static Vector<PcdFindResultId> getAllPcdCodedForFind(PcdCodedVector pv) {
- Vector<PcdFindResultId> pcd = new Vector<PcdFindResultId>();
- boolean isAdded = false;
- boolean isProduced = false;
-
- //
- // Go through pv to add item as new format to ppi one by one
- //
- for (int indexOfPv = 0; indexOfPv < pv.size(); indexOfPv++) {
- isAdded = false;
- PcdCodedIdentification pvId = pv.getPcdCoded(indexOfPv);
-
- //
- // First check if produced or not
- //
- if (pvId.getUsage().equals(DataType.USAGE_TYPE_ALWAYS_PRODUCED)
- || pvId.getUsage().equals(DataType.USAGE_TYPE_SOMETIMES_PRODUCED)) {
- isProduced = true;
- } else if (pvId.getUsage().equals(DataType.USAGE_TYPE_ALWAYS_CONSUMED)
- || pvId.getUsage().equals(DataType.USAGE_TYPE_SOMETIMES_CONSUMED)) {
- isProduced = false;
- }
-
- //
- // Check if the item has been added in
- // If added, append package name and new module name
- // If not added, add a new one first
- //
- for (int indexOfGuid = 0; indexOfGuid < pcd.size(); indexOfGuid++) {
- PcdFindResultId pcdId = pcd.get(indexOfGuid);
-
- if (pvId.getName().equals(pcdId.getName())) {
- if (isProduced) {
- pcd.get(indexOfGuid).addProducedModules(pvId.getBelongModule());
- } else if (!isProduced) {
- pcd.get(indexOfGuid).addConsumedModules(pvId.getBelongModule());
- }
- isAdded = true;
- continue;
- }
- }
-
- //
- // Add a new one
- //
- if (!isAdded) {
- PcdFindResultId pcdId = new PcdFindResultId(pvId.getName(), "PCD", pvId.getSupArchList(),
- pvId.getHelp(), null, pvId.getDeclaredBy());
- pcdId.setTokenSpaceGuidCName(pvId.getTokenSpaceGuidCName());
- pcdId.setToken(pvId.getToken());
- pcdId.setDatumType(pvId.getDatumType());
- pcdId.setValue(pvId.getValue());
- pcdId.setUsage(pvId.getUsage());
-
- pcd.addElement(pcdId);
- }
- }
-
- return pcd;
- }
-
- /**
- Get all library class entries from workspace
-
- @return
-
- **/
- public static LibraryClassVector getAllLibraryClassVector() {
- LibraryClassVector lcv = new LibraryClassVector();
- ModuleSurfaceArea msa = null;
- ModuleIdentification mid = null;
- LibraryClassIdentification lcid = null;
-
- //
- // Go through each module one by one
- //
- if (GlobalData.openingModuleList.size() > 0) {
- for (int indexOfModule = 0; indexOfModule < GlobalData.openingModuleList.size(); indexOfModule++) {
- msa = GlobalData.openingModuleList.getOpeningModuleByIndex(indexOfModule).getXmlMsa();
- mid = GlobalData.openingModuleList.getOpeningModuleByIndex(indexOfModule).getId();
-
- if (msa.getLibraryClassDefinitions() != null) {
- LibraryClassDefinitions lcd = msa.getLibraryClassDefinitions();
- if (lcd.getLibraryClassList().size() > 0) {
- for (int index = 0; index < lcd.getLibraryClassList().size(); index++) {
- String name = lcd.getLibraryClassList().get(index).getKeyword();
- String usage = null;
- if (lcd.getLibraryClassList().get(index).getUsage() != null) {
- usage = lcd.getLibraryClassList().get(index).getUsage().toString();
- }
- String version = lcd.getLibraryClassList().get(index).getRecommendedInstanceVersion();
- String guid = lcd.getLibraryClassList().get(index).getRecommendedInstanceGuid();
- String featureFlag = lcd.getLibraryClassList().get(index).getFeatureFlag();
- Vector<String> arch = Tools.convertListToVector(lcd.getLibraryClassList().get(index)
- .getSupArchList());
- Vector<String> module = Tools.convertListToVector(lcd.getLibraryClassList().get(index)
- .getSupModuleList());
- String help = lcd.getLibraryClassList().get(index).getHelpText();
- lcid = new LibraryClassIdentification(name, usage, version, guid, arch, featureFlag,
- module, help);
- lcid.setBelongModule(mid);
-
- //
- // Find which package declares it
- //
- for (int indexOfPackage = 0; indexOfPackage < GlobalData.openingPackageList.size(); indexOfPackage++) {
- PackageSurfaceArea spd = GlobalData.openingPackageList
- .getOpeningPackageByIndex(
- indexOfPackage)
- .getXmlSpd();
- PackageIdentification packageId = GlobalData.openingPackageList
- .getOpeningPackageByIndex(
- indexOfPackage)
- .getId();
- if (spd.getLibraryClassDeclarations() != null) {
- for (int indexOfLibraryClass = 0; indexOfLibraryClass < spd
- .getLibraryClassDeclarations()
- .getLibraryClassList()
- .size(); indexOfLibraryClass++) {
- LibraryClass lc = spd.getLibraryClassDeclarations().getLibraryClassList()
- .get(indexOfLibraryClass);
- if (lc.getName().equals(name)) {
- lcid.setSupArchList(Tools.convertListToVector(lc.getSupArchList()));
- lcid.setSupModuleList(Tools.convertListToVector(lc.getSupModuleList()));
- lcid.setHelp(lc.getHelpText());
- lcid.setDeclaredBy(packageId);
- break;
- }
- }
- }
- }
- if (lcid.getDeclaredBy() == null) {
- lcid.setDeclaredBy(new PackageIdentification("", "", "", ""));
- }
-
- lcv.addLibraryClass(lcid);
- }
- }
- }
- }
- }
- //
- // Go through all defined pcds to find which is not added yet.
- //
- for (int indexOfPackage = 0; indexOfPackage < GlobalData.openingPackageList.size(); indexOfPackage++) {
- PackageSurfaceArea spd = GlobalData.openingPackageList.getOpeningPackageByIndex(indexOfPackage).getXmlSpd();
- PackageIdentification packageId = GlobalData.openingPackageList.getOpeningPackageByIndex(indexOfPackage)
- .getId();
- if (spd.getLibraryClassDeclarations() != null) {
- for (int indexOfLibraryClass = 0; indexOfLibraryClass < spd.getLibraryClassDeclarations()
- .getLibraryClassList().size(); indexOfLibraryClass++) {
- boolean isFound = false;
- LibraryClass lc = spd.getLibraryClassDeclarations().getLibraryClassList().get(indexOfLibraryClass);
- for (int indexOfLcv = 0; indexOfLcv < lcv.size(); indexOfLcv++) {
- if (lc.getName().equals(lcv.getLibraryClass(indexOfLcv).getLibraryClassName())) {
- isFound = true;
- break;
- }
- }
- if (!isFound) {
- lcid = new LibraryClassIdentification("", null, "", "", null, "", null, "");
- lcid.setLibraryClassName(lc.getName());
- lcid.setSupArchList(Tools.convertListToVector(lc.getSupArchList()));
- lcid.setSupModuleList(Tools.convertListToVector(lc.getSupModuleList()));
- lcid.setHelp(lc.getHelpText());
- lcid.setDeclaredBy(packageId);
-
- lcid.setBelongModule(null);
- lcv.addLibraryClass(lcid);
- }
- }
- }
- }
- Sort.sortLibraryClass(lcv, DataType.SORT_TYPE_ASCENDING);
- return lcv;
- }
-
- /**
- Re-org all guid entries for find table
-
- @return
-
- **/
- public static Vector<FindResultId> getAllLibraryClassForFind(LibraryClassVector lcv) {
- Vector<FindResultId> libraryClass = new Vector<FindResultId>();
- boolean isAdded = false;
- boolean isProduced = false;
-
- //
- // Go through pv to add item as new format to ppi one by one
- //
- for (int indexOfLcv = 0; indexOfLcv < lcv.size(); indexOfLcv++) {
- isAdded = false;
- LibraryClassIdentification lcvId = lcv.getLibraryClass(indexOfLcv);
-
- //
- // First check if produced or not
- //
- if (lcvId.getUsage().equals(DataType.USAGE_TYPE_ALWAYS_PRODUCED)
- || lcvId.getUsage().equals(DataType.USAGE_TYPE_SOMETIMES_PRODUCED)) {
- isProduced = true;
- } else if (lcvId.getUsage().equals(DataType.USAGE_TYPE_ALWAYS_CONSUMED)
- || lcvId.getUsage().equals(DataType.USAGE_TYPE_SOMETIMES_CONSUMED)) {
- isProduced = false;
- }
-
- //
- // Check if the item has been added in
- // If added, append package name and new module name
- // If not added, add a new one first
- //
- for (int indexOfGuid = 0; indexOfGuid < libraryClass.size(); indexOfGuid++) {
- FindResultId frId = libraryClass.get(indexOfGuid);
-
- if (lcvId.getLibraryClassName().equals(frId.getName())) {
- if (isProduced) {
- libraryClass.get(indexOfGuid).addProducedModules(lcvId.getBelongModule());
- } else if (!isProduced) {
- libraryClass.get(indexOfGuid).addConsumedModules(lcvId.getBelongModule());
- }
- isAdded = true;
- continue;
- }
- }
-
- //
- // Add a new one
- //
- if (!isAdded) {
- libraryClass.addElement(new FindResultId(lcvId.getLibraryClassName(), "Library Class",
- lcvId.getSupArchList(), lcvId.getHelp(),
- lcvId.getSupModuleList(), lcvId.getDeclaredBy()));
- }
- }
-
- return libraryClass;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/FindResult.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/FindResult.java
deleted file mode 100644
index de6526b10c..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/FindResult.java
+++ /dev/null
@@ -1,651 +0,0 @@
-/** @file
-
- The file is used to show a table with all defined PPIs
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.find;
-
-import java.awt.Dimension;
-import java.awt.event.ActionEvent;
-import java.awt.event.ComponentEvent;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
-import java.awt.event.WindowEvent;
-import java.util.Vector;
-
-import javax.swing.JButton;
-import javax.swing.JFrame;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTable;
-import javax.swing.ListSelectionModel;
-import javax.swing.SwingConstants;
-import javax.swing.event.ListSelectionEvent;
-import javax.swing.event.ListSelectionListener;
-import javax.swing.event.TableModelEvent;
-import javax.swing.event.TableModelListener;
-import javax.swing.table.DefaultTableCellRenderer;
-
-import org.tianocore.frameworkwizard.common.DataType;
-import org.tianocore.frameworkwizard.common.IDefaultTableModel;
-import org.tianocore.frameworkwizard.common.Log;
-import org.tianocore.frameworkwizard.common.Tools;
-import org.tianocore.frameworkwizard.common.ui.IFrame;
-import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
-import org.tianocore.frameworkwizard.module.Identifications.LibraryClass.LibraryClassVector;
-import org.tianocore.frameworkwizard.module.Identifications.PcdCoded.PcdCodedVector;
-
-public class FindResult extends IFrame implements TableModelListener, ListSelectionListener, MouseListener {
-
- ///
- /// Define class Serial Version UID
- ///
- private static final long serialVersionUID = -2448484533878401714L;
-
- //
- // Define class members
- //
- private JTable jTable = null;
-
- private JPanel jContentPane = null;
-
- private JScrollPane jScrollPane = null;
-
- private JScrollPane jScrollPaneTable = null;
-
- private JButton jButtonClose = null;
-
- //
- // Not used by UI
- //
- private IDefaultTableModel model = null;
-
- private String method = "";
-
- private static FindResult findPpisResult = null;
-
- private static FindResult findProtocolsResult = null;
-
- private static FindResult findGuidsResult = null;
-
- private static FindResult findPcdsResult = null;
-
- private static FindResult findLibraryClassResult = null;
-
- private int selectedRow = -1;
-
- private LibraryClassVector lcv = null;
-
- private Vector<FindResultId> vLibraryClassFindResult = null;
-
- private PcdCodedVector pv = null;
-
- private Vector<PcdFindResultId> vPcdFindResult = null;
-
- private JButton jButtonReload = null;
-
- private JPanel jPanelOperation = null;
-
- /**
- * This is the default constructor
- */
- public FindResult(String method) {
- super();
- init(method);
- }
-
- /**
- * This method initializes this
- *
- * @return void
- */
- private void init(String method) {
- this.setSize(600, 500);
- this.setContentPane(getJScrollPane());
- this.setTitle("Find Result");
- this.setResizable(true);
- this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
- this.centerWindow();
-
- //
- // max the window
- //
- //this.setExtendedState(JFrame.MAXIMIZED_BOTH);
- this.method = method;
- this.showTable();
- }
-
- /**
- * This method initializes jContentPane
- *
- * @return javax.swing.JPanel
- */
- private JPanel getJContentPane() {
- if (jContentPane == null) {
- jContentPane = new JPanel();
- jContentPane.setLayout(null);
- jContentPane.add(getJScrollPaneTable(), null);
- jContentPane.add(getJPanelOperation(), null);
- jContentPane.setPreferredSize(new java.awt.Dimension(585, 445));
- }
- return jContentPane;
- }
-
- /**
- This method initializes jScrollPane
-
- @return javax.swing.JScrollPane
- */
- private JScrollPane getJScrollPane() {
- if (jScrollPane == null) {
- jScrollPane = new JScrollPane();
- jScrollPane.setViewportView(getJContentPane());
- }
- return jScrollPane;
- }
-
- /**
- This method initializes jScrollPaneTable
-
- @return javax.swing.JScrollPane
- **/
- private JScrollPane getJScrollPaneTable() {
- if (jScrollPaneTable == null) {
- jScrollPaneTable = new JScrollPane();
- jScrollPaneTable.setBounds(new java.awt.Rectangle(0, 0, 585, 395));
- jScrollPaneTable.setPreferredSize(new Dimension(585, 395));
- jScrollPaneTable.setViewportView(getJTable());
- }
- return jScrollPaneTable;
- }
-
- /**
- This method initializes jTable
-
- @return javax.swing.JTable
- **/
- private JTable getJTable() {
- if (jTable == null) {
- model = new IDefaultTableModel();
- jTable = new JTable(model);
- jTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
- jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
-
- jTable.getSelectionModel().addListSelectionListener(this);
- jTable.getModel().addTableModelListener(this);
- jTable.addMouseListener(this);
-
- model.addColumn("Name");
- model.addColumn("Type");
- model.addColumn("Produced by");
- model.addColumn("Consumed by");
- model.addColumn("Declared by");
-
- jTable.getColumn("Name").setCellRenderer(new MyTableCellRenderer());
- jTable.getColumn("Type").setCellRenderer(new MyTableCellRenderer());
- jTable.getColumn("Produced by").setCellRenderer(new MyTableCellRenderer());
- jTable.getColumn("Consumed by").setCellRenderer(new MyTableCellRenderer());
- jTable.getColumn("Declared by").setCellRenderer(new MyTableCellRenderer());
-
- int columnWidth = (this.getSize().width - 28) / 5;
- jTable.getColumn("Name").setPreferredWidth(columnWidth);
- jTable.getColumn("Type").setPreferredWidth(columnWidth);
- jTable.getColumn("Produced by").setPreferredWidth(columnWidth);
- jTable.getColumn("Consumed by").setPreferredWidth(columnWidth);
- jTable.getColumn("Declared by").setPreferredWidth(columnWidth);
- }
- return jTable;
- }
-
- /**
- This method initializes jButtonAdd
-
- @return javax.swing.JButton jButtonAdd
-
- **/
- private JButton getJButtonClose() {
- if (jButtonClose == null) {
- jButtonClose = new JButton();
- jButtonClose.setText("Close");
- jButtonClose.addActionListener(this);
- jButtonClose.setPreferredSize(new java.awt.Dimension(80, 20));
- jButtonClose.setBounds(new java.awt.Rectangle(90, 0, 80, 20));
- }
- return jButtonClose;
- }
-
- public static FindResult getInstance(String method) {
- if (method.equals("PPI")) {
- if (findPpisResult == null) {
- findPpisResult = new FindResult(method);
- }
- findPpisResult.init(method);
- return findPpisResult;
- }
-
- if (method.equals("PROTOCOL")) {
- if (findProtocolsResult == null) {
- findProtocolsResult = new FindResult(method);
- }
- findProtocolsResult.init(method);
- return findProtocolsResult;
- }
-
- if (method.equals("GUID")) {
- if (findGuidsResult == null) {
- findGuidsResult = new FindResult(method);
- }
- findGuidsResult.init(method);
- return findGuidsResult;
- }
-
- if (method.equals("PCD")) {
- if (findPcdsResult == null) {
- findPcdsResult = new FindResult(method);
- }
- findPcdsResult.init(method);
- return findPcdsResult;
- }
-
- if (method.equals("LIBRARY_CLASS")) {
- if (findLibraryClassResult == null) {
- findLibraryClassResult = new FindResult(method);
- }
- findLibraryClassResult.init(method);
- return findLibraryClassResult;
- }
-
- return null;
- }
-
- /**
- Clear all table rows
-
- **/
- private void clearAll() {
- if (model != null) {
- for (int index = model.getRowCount() - 1; index >= 0; index--) {
- model.removeRow(index);
- }
- }
- }
-
- /**
- Read content of vector and put then into table
-
- **/
- private void showTable() {
- clearAll();
- this.jTable.repaint();
- this.jTable.updateUI();
-
- if (this.method.equals("PPI")) {
- Vector<PpiId> vPpi = Find.getAllPpisForFind();
-
- if (vPpi.size() > 0) {
-
- for (int index = 0; index < vPpi.size(); index++) {
- Vector<String> v = new Vector<String>();
- v.addElement(vPpi.elementAt(index).getName());
- v.addElement(vPpi.elementAt(index).getType());
- String strProducedModules = vPpi.elementAt(index).getProducedModules();
- if (strProducedModules.indexOf("<br>") == 0) {
- strProducedModules = strProducedModules.substring("<br>".length());
- }
- int line1 = Tools.getSpecificStringCount(strProducedModules, "<br>");
- v.addElement("<html>" + strProducedModules + "</html>");
-
- String strConsumedModules = vPpi.elementAt(index).getConsumedModules();
- if (strConsumedModules.indexOf("<br>") == 0) {
- strConsumedModules = strConsumedModules.substring("<br>".length());
- }
- int line2 = Tools.getSpecificStringCount(strConsumedModules, "<br>");
- v.addElement("<html>" + strConsumedModules + "</html>");
-
- v.addElement(vPpi.elementAt(index).getDeclaredBy());
-
- model.addRow(v);
- jTable.setRowHeight(index, (Math.max(line1, line2) > 1 ? Math.max(line1, line2) : 1) * 18);
- }
- } else {
- Log.wrn("Find PPIs", "No PPI found!!!");
- }
- }
-
- if (this.method.equals("PROTOCOL")) {
- Vector<ProtocolId> vProtocol = Find.getAllProtocolsForFind();
-
- if (vProtocol.size() > 0) {
-
- for (int index = 0; index < vProtocol.size(); index++) {
- Vector<String> v = new Vector<String>();
- v.addElement(vProtocol.elementAt(index).getName());
- v.addElement(vProtocol.elementAt(index).getType());
- String strProducedModules = vProtocol.elementAt(index).getProducedModules();
- if (strProducedModules.indexOf("<br>") == 0) {
- strProducedModules = strProducedModules.substring("<br>".length());
- }
- int line1 = Tools.getSpecificStringCount(strProducedModules, "<br>");
- v.addElement("<html>" + strProducedModules + "</html>");
-
- String strConsumedModules = vProtocol.elementAt(index).getConsumedModules();
- if (strConsumedModules.indexOf("<br>") == 0) {
- strConsumedModules = strConsumedModules.substring("<br>".length());
- }
- int line2 = Tools.getSpecificStringCount(strConsumedModules, "<br>");
- v.addElement("<html>" + strConsumedModules + "</html>");
-
- v.addElement(vProtocol.elementAt(index).getDeclaredBy());
-
- model.addRow(v);
- jTable.setRowHeight(index, (Math.max(line1, line2) > 1 ? Math.max(line1, line2) : 1) * 18);
- }
- } else {
- Log.wrn("Find PROTOCOLs", "No PROTOCOL found!!!");
- }
- }
-
- if (this.method.equals("GUID")) {
- Vector<GuidId> vGuid = Find.getAllGuidsForFind();
-
- if (vGuid.size() > 0) {
-
- for (int index = 0; index < vGuid.size(); index++) {
- Vector<String> v = new Vector<String>();
- v.addElement(vGuid.elementAt(index).getName());
- v.addElement("GUID");
- String strProducedModules = vGuid.elementAt(index).getProducedModules();
- if (strProducedModules.indexOf("<br>") == 0) {
- strProducedModules = strProducedModules.substring("<br>".length());
- }
- int line1 = Tools.getSpecificStringCount(strProducedModules, "<br>");
- v.addElement("<html>" + strProducedModules + "</html>");
-
- String strConsumedModules = vGuid.elementAt(index).getConsumedModules();
- if (strConsumedModules.indexOf("<br>") == 0) {
- strConsumedModules = strConsumedModules.substring("<br>".length());
- }
- int line2 = Tools.getSpecificStringCount(strConsumedModules, "<br>");
- v.addElement("<html>" + strConsumedModules + "</html>");
-
- v.addElement(vGuid.elementAt(index).getDeclaredBy());
-
- model.addRow(v);
- jTable.setRowHeight(index, (Math.max(line1, line2) > 1 ? Math.max(line1, line2) : 1) * 18);
- }
- } else {
- Log.wrn("Find GUIDs", "No GUID found!!!");
- }
- }
-
- if (this.method.equals("PCD")) {
- pv = Find.getAllPcdCodedVector();
- vPcdFindResult = Find.getAllPcdCodedForFind(pv);
-
- if (vPcdFindResult.size() > 0) {
-
- for (int index = 0; index < vPcdFindResult.size(); index++) {
- Vector<String> v = new Vector<String>();
- v.addElement(vPcdFindResult.elementAt(index).getName());
- v.addElement(vPcdFindResult.elementAt(index).getType());
-
- //
- // Generate Produced Modules List
- //
- String strProducedModules = "";
- Vector<ModuleIdentification> vModule = vPcdFindResult.elementAt(index).getProducedModules();
- for (int indexOfPM = 0; indexOfPM < vModule.size(); indexOfPM++) {
- strProducedModules = strProducedModules + "<br>"
- + vModule.get(indexOfPM).getPackageId().getName() + "."
- + vModule.get(indexOfPM).getName();
- }
- if (strProducedModules.indexOf("<br>") == 0) {
- strProducedModules = strProducedModules.substring("<br>".length());
- }
- int line1 = Tools.getSpecificStringCount(strProducedModules, "<br>");
- v.addElement("<html>" + strProducedModules + "</html>");
-
- //
- // Generate Consumed Modules List
- //
- String strConsumedModules = "";
- vModule = vPcdFindResult.elementAt(index).getConsumedModules();
- for (int indexOfCM = 0; indexOfCM < vModule.size(); indexOfCM++) {
- strConsumedModules = strConsumedModules + "<br>"
- + vModule.get(indexOfCM).getPackageId().getName() + "."
- + vModule.get(indexOfCM).getName();
- }
- if (strConsumedModules.indexOf("<br>") == 0) {
- strConsumedModules = strConsumedModules.substring("<br>".length());
- }
- int line2 = Tools.getSpecificStringCount(strConsumedModules, "<br>");
- v.addElement("<html>" + strConsumedModules + "</html>");
-
- //
- // Add declare package name
- //
- v.addElement(vPcdFindResult.elementAt(index).getDeclaredBy().getName());
-
- model.addRow(v);
- jTable.setRowHeight(index, (Math.max(line1, line2) > 1 ? Math.max(line1, line2) : 1) * 18);
- }
- } else {
- Log.wrn("Find PCDs", "No PCD found!!!");
- }
- }
-
- if (this.method.equals("LIBRARY_CLASS")) {
- lcv = Find.getAllLibraryClassVector();
- vLibraryClassFindResult = Find.getAllLibraryClassForFind(lcv);
-
- if (vLibraryClassFindResult.size() > 0) {
- for (int index = 0; index < vLibraryClassFindResult.size(); index++) {
- Vector<String> v = new Vector<String>();
- v.addElement(vLibraryClassFindResult.elementAt(index).getName());
- v.addElement(vLibraryClassFindResult.elementAt(index).getType());
-
- //
- // Generate Produced Modules List
- //
- String strProducedModules = "";
- Vector<ModuleIdentification> vModule = vLibraryClassFindResult.elementAt(index)
- .getProducedModules();
- for (int indexOfPM = 0; indexOfPM < vModule.size(); indexOfPM++) {
- strProducedModules = strProducedModules + "<br>"
- + vModule.get(indexOfPM).getPackageId().getName() + "."
- + vModule.get(indexOfPM).getName();
- }
- if (strProducedModules.indexOf("<br>") == 0) {
- strProducedModules = strProducedModules.substring("<br>".length());
- }
- int line1 = Tools.getSpecificStringCount(strProducedModules, "<br>");
- v.addElement("<html>" + strProducedModules + "</html>");
-
- //
- // Generate Consumed Modules List
- //
- String strConsumedModules = "";
- vModule = vLibraryClassFindResult.elementAt(index).getConsumedModules();
- for (int indexOfCM = 0; indexOfCM < vModule.size(); indexOfCM++) {
- strConsumedModules = strConsumedModules + "<br>"
- + vModule.get(indexOfCM).getPackageId().getName() + "."
- + vModule.get(indexOfCM).getName();
- }
- if (strConsumedModules.indexOf("<br>") == 0) {
- strConsumedModules = strConsumedModules.substring("<br>".length());
- }
- int line2 = Tools.getSpecificStringCount(strConsumedModules, "<br>");
- v.addElement("<html>" + strConsumedModules + "</html>");
-
- v.addElement(vLibraryClassFindResult.elementAt(index).getDeclaredBy().getName());
-
- model.addRow(v);
- jTable.setRowHeight(index, (Math.max(line1, line2) > 1 ? Math.max(line1, line2) : 1) * 18);
- }
- } else {
- Log.wrn("Find Library Classes", "No Library Class found!!!");
- }
- }
-
- this.jTable.repaint();
- this.jTable.updateUI();
- }
-
- public void tableChanged(TableModelEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
- *
- */
- public void actionPerformed(ActionEvent arg0) {
- if (arg0.getSource() == this.jButtonClose) {
- this.dispose();
- }
-
- if (arg0.getSource() == this.jButtonReload) {
- this.showTable();
- }
- }
-
- /* (non-Javadoc)
- * @see java.awt.event.ComponentListener#componentResized(java.awt.event.ComponentEvent)
- *
- * Override componentResized to resize all components when frame's size is changed
- */
- public void componentResized(ComponentEvent arg0) {
- int intCurrentWidth = this.getJContentPane().getWidth();
- int intCurrentHeight = this.getJContentPane().getHeight();
- int intPreferredWidth = this.getJContentPane().getPreferredSize().width;
- int intPreferredHeight = this.getJContentPane().getPreferredSize().height;
-
- Tools.resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth,
- intPreferredHeight);
- Tools.centerComponent(this.jPanelOperation, intCurrentWidth, intCurrentHeight, intPreferredHeight,
- DataType.SPACE_TO_BOTTOM_FOR_CLOSE_BUTTON);
- Tools.resizeTableColumn(this.jTable, this.getSize().width - 28);
- }
-
- /* (non-Javadoc)
- * @see javax.swing.event.ListSelectionListener#valueChanged(javax.swing.event.ListSelectionEvent)
- *
- */
- public void valueChanged(ListSelectionEvent arg0) {
- if (arg0.getValueIsAdjusting()) {
- return;
- }
- ListSelectionModel lsm = (ListSelectionModel) arg0.getSource();
- if (lsm.isSelectionEmpty()) {
- return;
- } else {
- selectedRow = lsm.getMinSelectionIndex();
- }
- }
-
- /* (non-Javadoc)
- * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
- *
- */
- public void mouseClicked(MouseEvent arg0) {
- if (arg0.getClickCount() == 2) {
- if (this.selectedRow < 0) {
- return;
- } else {
- if (this.method.equals("LIBRARY_CLASS")) {
- FindResultDetailInfo frdi = new FindResultDetailInfo(vLibraryClassFindResult.elementAt(selectedRow));
- frdi.setVisible(true);
- }
- if (this.method.equals("PCD")) {
- FindResultDetailInfo frdi = new FindResultDetailInfo(vPcdFindResult.elementAt(selectedRow));
- frdi.setVisible(true);
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see java.awt.event.WindowListener#windowClosing(java.awt.event.WindowEvent)
- *
- * Override windowClosing to popup warning message to confirm quit
- *
- */
- public void windowClosing(WindowEvent arg0) {
- this.dispose();
- }
-
- class MyTableCellRenderer extends DefaultTableCellRenderer {
- ///
- /// Define Class Serial Version UID
- ///
- private static final long serialVersionUID = -2082787479305255946L;
-
- public void setValue(Object value) {
- this.setVerticalAlignment(SwingConstants.TOP);
- super.setValue(value);
- }
- }
-
- public void mousePressed(MouseEvent e) {
- // TODO Auto-generated method stub
-
- }
-
- public void mouseReleased(MouseEvent e) {
- // TODO Auto-generated method stub
-
- }
-
- public void mouseEntered(MouseEvent e) {
- // TODO Auto-generated method stub
-
- }
-
- public void mouseExited(MouseEvent e) {
- // TODO Auto-generated method stub
-
- }
-
- /**
- * This method initializes jButtonReload
- *
- * @return javax.swing.JButton
- */
- private JButton getJButtonReload() {
- if (jButtonReload == null) {
- jButtonReload = new JButton();
- jButtonReload.setText("Reload");
- jButtonReload.addActionListener(this);
- jButtonReload.setBounds(new java.awt.Rectangle(0, 0, 80, 20));
- jButtonReload.setPreferredSize(new java.awt.Dimension(80, 20));
- }
- return jButtonReload;
- }
-
- /**
- * This method initializes jPanelOperation
- *
- * @return javax.swing.JPanel
- */
- private JPanel getJPanelOperation() {
- if (jPanelOperation == null) {
- jPanelOperation = new JPanel();
- jPanelOperation.setLayout(null);
- jPanelOperation.setBounds(new java.awt.Rectangle(300, 415, 170, 20));
- jPanelOperation.setPreferredSize(new java.awt.Dimension(170, 20));
- jPanelOperation.add(getJButtonClose(), null);
- jPanelOperation.add(getJButtonReload(), null);
- }
- return jPanelOperation;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/FindResultDetailInfo.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/FindResultDetailInfo.java
deleted file mode 100644
index 278ac1d964..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/FindResultDetailInfo.java
+++ /dev/null
@@ -1,657 +0,0 @@
-/** @file
-
- The file is used to show detailed information of one of find results
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.find;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.ComponentEvent;
-import java.awt.event.WindowEvent;
-import java.util.Vector;
-
-import javax.swing.JButton;
-import javax.swing.JFrame;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextArea;
-
-import org.tianocore.DynamicPcdBuildDefinitionsDocument.DynamicPcdBuildDefinitions;
-import org.tianocore.DynamicPcdBuildDefinitionsDocument.DynamicPcdBuildDefinitions.PcdBuildData.SkuInfo;
-import org.tianocore.DynamicPcdBuildDefinitionsDocument.DynamicPcdBuildDefinitions.PcdBuildData;
-import org.tianocore.FrameworkModulesDocument.FrameworkModules;
-import org.tianocore.LibrariesDocument.Libraries;
-import org.tianocore.LibrariesDocument.Libraries.Instance;
-import org.tianocore.LibraryClassDocument.LibraryClass;
-import org.tianocore.ModuleSADocument.ModuleSA;
-import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea;
-import org.tianocore.PackageSurfaceAreaDocument.PackageSurfaceArea;
-import org.tianocore.PcdBuildDefinitionDocument.PcdBuildDefinition;
-import org.tianocore.PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData;
-import org.tianocore.PcdCodedDocument.PcdCoded;
-import org.tianocore.PlatformSurfaceAreaDocument.PlatformSurfaceArea;
-import org.tianocore.frameworkwizard.common.DataType;
-import org.tianocore.frameworkwizard.common.GlobalData;
-import org.tianocore.frameworkwizard.common.Tools;
-import org.tianocore.frameworkwizard.common.ui.IFrame;
-import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
-import org.tianocore.frameworkwizard.platform.PlatformIdentification;
-import org.tianocore.frameworkwizard.workspace.Workspace;
-import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
-
-public class FindResultDetailInfo extends IFrame {
-
- ///
- /// Define class Serial Version UID
- ///
- private static final long serialVersionUID = -4888295869041881282L;
-
- private JPanel jContentPane = null;
-
- private JScrollPane jScrollPane = null;
-
- private JTextArea jTextArea = null;
-
- private JButton jButtonClose = null;
-
- //
- // Not for UI
- //
- private static String TAB = " ";
-
- private String reportContent = "";
-
- private WorkspaceTools wt = new WorkspaceTools();
-
- /**
- * This method initializes jScrollPane
- *
- * @return javax.swing.JScrollPane
- */
- private JScrollPane getJScrollPane() {
- if (jScrollPane == null) {
- jScrollPane = new JScrollPane();
- jScrollPane.setBounds(new java.awt.Rectangle(5, 5, 535, 280));
- jScrollPane.setPreferredSize(new java.awt.Dimension(535, 280));
- jScrollPane.setViewportView(getJTextArea());
- }
- return jScrollPane;
- }
-
- /**
- * This method initializes jTextArea
- *
- * @return javax.swing.JTextArea
- */
- private JTextArea getJTextArea() {
- if (jTextArea == null) {
- jTextArea = new JTextArea();
- jTextArea.setEditable(false);
- }
- return jTextArea;
- }
-
- /**
- * This method initializes jButtonClose
- *
- * @return javax.swing.JButton
- */
- private JButton getJButtonClose() {
- if (jButtonClose == null) {
- jButtonClose = new JButton();
- jButtonClose.setBounds(new java.awt.Rectangle(240, 290, 80, 20));
- jButtonClose.setPreferredSize(new java.awt.Dimension(80, 20));
- jButtonClose.addActionListener(this);
- jButtonClose.setText("Close");
- }
- return jButtonClose;
- }
-
- /**
-
- @param lci
-
- **/
- public FindResultDetailInfo(FindResultId frid) {
- super();
- init();
- this.setTitle(frid.getName());
- this.jTextArea.setText(createReport(frid));
- this.jTextArea.setSelectionStart(0);
- this.jTextArea.setSelectionEnd(0);
- }
-
- /**
-
- @param lci
-
- **/
- public FindResultDetailInfo(PcdFindResultId frid) {
- super();
- init();
- this.setTitle(frid.getName());
- this.jTextArea.setText(createReport(frid));
- this.jTextArea.setSelectionStart(0);
- this.jTextArea.setSelectionEnd(0);
- }
-
- /**
- Create detailed information report for pcd
-
- @param frid
- @return
-
- **/
- private String createReport(PcdFindResultId frid) {
- String name = frid.getName();
-
- //
- // Write Pcd Name
- //
- writeReportLn("PCD C Name: " + name);
-
- //
- // Wrtie Declared package
- //
- writeReportLn("Declared in Package: " + frid.getDeclaredBy().getName() + " ("
- + Tools.getRelativePath(frid.getDeclaredBy().getPath(), Workspace.getCurrentWorkspace()) + ")");
-
- //
- // Write Token Space
- //
- writeReportLn("Token Space: " + frid.getTokenSpaceGuidCName());
-
- //
- // Write Token
- //
- writeReportLn("Token: " + frid.getToken());
-
- //
- // Write Datum Type
- //
- writeReportLn("Datum Type: " + frid.getDatumType());
-
- //
- // Write Default Value
- //
- writeReportLn("Default Value: " + frid.getValue());
-
- //
- // Write Usages
- //
- writeReportLn("Valid Usages: " + frid.getUsage());
-
- //
- // Write Help Text
- //
- writeReportLn("Help Text: ");
- writeReportLn(TAB + frid.getHelp());
-
- //
- // Write an Empty Line
- //
- writeReportLn("");
-
- //
- // Wriet all modules which use this PCD:
- //
- writeReportLn("Modules Coded to Use This PCD: ");
-
- Vector<ModuleIdentification> vModules = frid.getConsumedModules();
- if (vModules != null) {
- for (int index = 0; index < vModules.size(); index++) {
- //
- // Write Module Name and Path
- //
- writeReportLn(TAB + vModules.get(index).getName() + " ("
- + Tools.getRelativePath(vModules.get(index).getPath(), Workspace.getCurrentWorkspace())
- + ")");
-
- //
- // Write Module Pcd Info
- //
- ModuleSurfaceArea msa = GlobalData.openingModuleList.getModuleSurfaceAreaFromId(vModules.get(index));
- if (msa != null) {
- PcdCoded pcdCoded = msa.getPcdCoded();
- if (pcdCoded != null) {
- for (int indexOfPcd = 0; indexOfPcd < pcdCoded.getPcdEntryList().size(); indexOfPcd++) {
- if (pcdCoded.getPcdEntryList().get(indexOfPcd).getCName().equals(name)) {
- //
- // Write Pcd Item Type
- //
- writeReportLn(TAB + TAB + "PcdItemType: "
- + pcdCoded.getPcdEntryList().get(indexOfPcd).getPcdItemType().toString());
-
- //
- // Write Help Text
- //
- writeReportLn(TAB + TAB + "Help Text: ");
- writeReportLn(TAB + TAB + TAB
- + pcdCoded.getPcdEntryList().get(indexOfPcd).getHelpText());
- }
- }
- }
- }
-
- //
- // Write an Empty Line
- //
- writeReportLn("");
- }
- }
-
- //
- // Write an Empty Line
- //
- writeReportLn("");
-
- //
- // Write All Platforms Specifing this PCD
- //
- writeReportLn("Platforms Specifing this PCD: ");
-
- for (int index = 0; index < GlobalData.openingPlatformList.size(); index++) {
- PlatformSurfaceArea fpd = GlobalData.openingPlatformList.getOpeningPlatformByIndex(index).getXmlFpd();
- PlatformIdentification pid = GlobalData.openingPlatformList.getOpeningPlatformByIndex(index).getId();
-
- String tmp = "";
- //
- // Get Non-Dynamic Pcd
- //
- FrameworkModules fm = fpd.getFrameworkModules();
- if (fm != null) {
- for (int indexOfModuleSa = 0; indexOfModuleSa < fm.getModuleSAList().size(); indexOfModuleSa++) {
- ModuleSA msa = fm.getModuleSAList().get(indexOfModuleSa);
- if (msa != null) {
- PcdBuildDefinition p = msa.getPcdBuildDefinition();
- if (p != null) {
- if (p.getPcdDataList() != null) {
-
- for (int indexOfPcd = 0; indexOfPcd < p.getPcdDataList().size(); indexOfPcd++) {
- PcdData pd = p.getPcdDataList().get(indexOfPcd);
- //
- // Find this PCD
- //
- if (pd.getCName().equals(name)) {
- //
- // Write Module Sa Info
- //
- ModuleIdentification moduleSaId = GlobalData
- .findModuleId(
- msa.getModuleGuid(),
- msa
- .getModuleVersion(),
- msa.getPackageGuid(),
- msa
- .getPackageVersion());
- tmp = tmp
- + TAB
- + TAB
- + "Module: "
- + moduleSaId.getName()
- + " ("
- + Tools.getRelativePath(moduleSaId.getPath(),
- Workspace.getCurrentWorkspace()) + ")"
- + DataType.UNIX_LINE_SEPARATOR;
- tmp = tmp + TAB + TAB + TAB + "Implementation: " + pd.getItemType().toString()
- + DataType.UNIX_LINE_SEPARATOR;
- tmp = tmp + TAB + TAB + TAB + "Specified / Implementation Value: "
- + pd.getValue() + DataType.UNIX_LINE_SEPARATOR;
- tmp = tmp + DataType.UNIX_LINE_SEPARATOR;
- }
- }
- }
- }
- }
- }
- }
-
- //
- // Get Dynamic Pcd
- //
- DynamicPcdBuildDefinitions dpbd = fpd.getDynamicPcdBuildDefinitions();
- if (dpbd != null) {
- for (int indexOfDpbd = 0; indexOfDpbd < dpbd.getPcdBuildDataList().size(); indexOfDpbd++) {
- PcdBuildData pbd = dpbd.getPcdBuildDataList().get(indexOfDpbd);
- if (pbd != null) {
- if (pbd.getCName().equals(name)) {
- //
- // Write Dynamic Pcd Build Definition
- //
- tmp = tmp + TAB + TAB + "Dynamic Pcd Build Definition: " + DataType.UNIX_LINE_SEPARATOR;
- if (pbd.getSkuInfoList() != null) {
- for (int indexOfPcd = 0; indexOfPcd < pbd.getSkuInfoList().size(); indexOfPcd++) {
- SkuInfo si = pbd.getSkuInfoList().get(indexOfPcd);
- if (si != null) {
- tmp = tmp + TAB + TAB + TAB + "Sku Id: " + si.getSkuId().toString()
- + DataType.UNIX_LINE_SEPARATOR;
- tmp = tmp + TAB + TAB + TAB + "Variable Name: " + si.getVariableName()
- + DataType.UNIX_LINE_SEPARATOR;
- tmp = tmp + TAB + TAB + TAB + "Variable GUID: " + si.getVariableGuid()
- + DataType.UNIX_LINE_SEPARATOR;
- tmp = tmp + TAB + TAB + TAB + "Variable Offset: " + si.getVariableOffset()
- + DataType.UNIX_LINE_SEPARATOR;
- tmp = tmp + TAB + TAB + TAB + "Hii Default Value: " + si.getHiiDefaultValue()
- + DataType.UNIX_LINE_SEPARATOR;
- }
- }
- }
- }
- }
- }
- }
-
- //
- // If not empty, write this platform info
- //
- if (!Tools.isEmpty(tmp)) {
- tmp = TAB + "Platform: " + pid.getName() + " ("
- + Tools.getRelativePath(pid.getPath(), Workspace.getCurrentWorkspace()) + ")"
- + DataType.UNIX_LINE_SEPARATOR + tmp;
- this.writeReportLn(tmp);
- }
- }
-
- return reportContent;
- }
-
- //
- // Create detailed information report for library
- //
- /**
-
- @param frid
- @return
-
- **/
- private String createReport(FindResultId frid) {
- String tmp = "";
- String name = frid.getName();
-
- //
- // Write Class Name
- //
- writeReportLn(name);
-
- //
- // Write Provided Package
- //
- writeReportLn(TAB + "Provided by: " + frid.getDeclaredBy().getName() + " ("
- + Tools.getRelativePath(frid.getDeclaredBy().getPath(), Workspace.getCurrentWorkspace()) + ")");
-
- //
- // Write Header File
- //
- PackageSurfaceArea spd = GlobalData.openingPackageList.getPackageSurfaceAreaFromId(frid.getDeclaredBy());
- tmp = Tools.getRelativePath(frid.getDeclaredBy().getPath(), Workspace.getCurrentWorkspace());
- writeReportLn(TAB + "Header File: " + Tools.getFilePathOnly(tmp)
- + wt.getHeaderFileFromPackageByLibraryClassName(spd, name));
-
- //
- // Write Supported Module Types
- //
- writeReportLn(TAB + "Supported Module Types: " + Tools.convertVectorToString(frid.getModuleType()));
-
- //
- // Write Supported Arch
- //
- writeReportLn(TAB + "Supported Architectures: " + Tools.convertVectorToString(frid.getArch()));
-
- //
- // Write Help Text
- //
- writeReportLn(TAB + "Help Text: ");
- writeReportLn(TAB + TAB + frid.getHelp());
-
- //
- // Write an empty line
- //
- writeReportLn("");
-
- //
- // Write Instances
- //
- writeReportLn("Library Instances:");
-
- //
- // Write Instances One by One
- //
- for (int index = 0; index < frid.getProducedModules().size(); index++) {
- ModuleIdentification mid = frid.getProducedModules().get(index);
- ModuleSurfaceArea msa = GlobalData.openingModuleList.getModuleSurfaceAreaFromId(mid);
- if (msa != null) {
- //
- // Write Instance Name
- //
- if (msa.getMsaHeader() != null) {
- writeReportLn(TAB + msa.getMsaHeader().getModuleName());
- }
-
- //
- // Write Msa File Name
- //
- writeReportLn(TAB + TAB + "Provided by: "
- + Tools.getRelativePath(mid.getPath(), Workspace.getCurrentWorkspace()));
-
- //
- // Find the produced library class
- //
- if (msa.getLibraryClassDefinitions() != null) {
- for (int indexL = 0; indexL < msa.getLibraryClassDefinitions().getLibraryClassList().size(); indexL++) {
- LibraryClass lc = msa.getLibraryClassDefinitions().getLibraryClassList().get(indexL);
- if (lc.getKeyword().equals(name)) {
- //
- // Write Supported Module Types
- //
- writeReportLn(TAB + TAB + "Supported Module Types: "
- + Tools.convertListToString(lc.getSupModuleList()));
-
- //
- // Write Supported Arch
- //
- writeReportLn(TAB + TAB + "Supported Architectures: "
- + Tools.convertListToString(lc.getSupArchList()));
-
- //
- // Write Help Text
- //
- writeReportLn(TAB + TAB + "Help Text: ");
- writeReportLn(TAB + TAB + (lc.getHelpText() == null ? "" : lc.getHelpText()));
- }
- }
- }
-
- }
- }
-
- //
- // Write an empty line
- //
- writeReportLn("");
-
- //
- // Write all modules which consumed this library
- //
- writeReportLn("Modules Requiring " + name + ":");
- for (int index = 0; index < frid.getConsumedModules().size(); index++) {
- //
- // Write
- //
- writeReportLn(TAB
- + frid.getConsumedModules().get(index).getName()
- + " ("
- + Tools.getRelativePath(frid.getConsumedModules().get(index).getPath(),
- Workspace.getCurrentWorkspace()) + ")");
- }
-
- //
- // Write an empty line
- //
- writeReportLn("");
-
- //
- // Write platforms using the library class instances
- //
- writeReportLn("Platforms Using " + name + ":");
-
- //
- // Write Instances One by One as Using Platforms
- //
- for (int index = 0; index < frid.getProducedModules().size(); index++) {
- ModuleIdentification mid = frid.getProducedModules().get(index);
-
- //
- // Write Instance Name
- //
- writeReportLn(TAB + mid.getName());
-
- //
- // Go through each platform one by one
- //
- for (int indexOfPlatform = 0; indexOfPlatform < GlobalData.openingPlatformList.size(); indexOfPlatform++) {
- PlatformSurfaceArea fpd = GlobalData.openingPlatformList.getOpeningPlatformByIndex(indexOfPlatform)
- .getXmlFpd();
- PlatformIdentification pid = GlobalData.openingPlatformList.getOpeningPlatformByIndex(indexOfPlatform)
- .getId();
- Vector<ModuleIdentification> vModuleSa = new Vector<ModuleIdentification>();
- if (fpd != null) {
- FrameworkModules fm = fpd.getFrameworkModules();
- if (fm != null) {
- for (int indexOfModule = 0; indexOfModule < fm.getModuleSAList().size(); indexOfModule++) {
- ModuleSA msa = fm.getModuleSAList().get(indexOfModule);
- if (msa != null) {
- Libraries l = msa.getLibraries();
- if (l != null) {
- if (l.getInstanceList() != null) {
- for (int indexOfInstance = 0; indexOfInstance < l.getInstanceList().size(); indexOfInstance++) {
- Instance i = l.getInstanceList().get(indexOfInstance);
- if (mid.equals(i.getModuleGuid(), i.getModuleVersion(), i.getPackageGuid(),
- i.getPackageVersion())) {
- ModuleIdentification moduleSaId = GlobalData
- .findModuleId(
- msa
- .getModuleGuid(),
- msa
- .getModuleVersion(),
- msa
- .getPackageGuid(),
- msa
- .getPackageVersion());
- if (moduleSaId != null) {
- vModuleSa.addElement(moduleSaId);
- }
- }
- }
- }
- }
- }
- }
-
- //
- // Get finded moduleSa in this spd
- //
- if (vModuleSa.size() > 0) {
- writeReportLn(TAB + TAB + pid.getName() + " ("
- + Tools.getRelativePath(pid.getPath(), Workspace.getCurrentWorkspace()) + ")");
- for (int indexOfModuleSa = 0; indexOfModuleSa < vModuleSa.size(); indexOfModuleSa++) {
- writeReportLn(TAB
- + TAB
- + TAB
- + vModuleSa.elementAt(indexOfModuleSa).getName()
- + " ("
- + Tools.getRelativePath(vModuleSa.elementAt(indexOfModuleSa).getPath(),
- Workspace.getCurrentWorkspace()) + ")");
- }
- }
- }
- }
- }
- writeReportLn("");
- }
-
- return this.reportContent;
- }
-
- /**
- * This method initializes this
- *
- * @return void
- */
- private void init() {
- this.setSize(550, 380);
- this.setContentPane(getJContentPane());
- this.setTitle("JFrame");
- this.setResizable(true);
- this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
- this.centerWindow();
-
- }
-
- /**
- * This method initializes jContentPane
- *
- * @return javax.swing.JPanel
- */
- private JPanel getJContentPane() {
- if (jContentPane == null) {
- jContentPane = new JPanel();
- jContentPane.setLayout(null);
- jContentPane.setSize(new java.awt.Dimension(550, 350));
- jContentPane.add(getJScrollPane(), null);
- jContentPane.add(getJButtonClose(), null);
-
- jContentPane.setPreferredSize(new java.awt.Dimension(550, 340));
- }
- return jContentPane;
- }
-
- /* (non-Javadoc)
- * @see java.awt.event.WindowListener#windowClosing(java.awt.event.WindowEvent)
- *
- * Override windowClosing to popup warning message to confirm quit
- *
- */
- public void windowClosing(WindowEvent arg0) {
- this.dispose();
- }
-
- /* (non-Javadoc)
- * @see java.awt.event.ComponentListener#componentResized(java.awt.event.ComponentEvent)
- *
- * Override componentResized to resize all components when frame's size is changed
- */
- public void componentResized(ComponentEvent arg0) {
- int intCurrentWidth = this.getJContentPane().getWidth();
- int intCurrentHeight = this.getJContentPane().getHeight();
- int intPreferredWidth = this.getJContentPane().getPreferredSize().width;
- int intPreferredHeight = this.getJContentPane().getPreferredSize().height;
-
- Tools.resizeComponent(this.jScrollPane, intCurrentWidth, intCurrentHeight, intPreferredWidth,
- intPreferredHeight);
- Tools.centerComponent(this.jButtonClose, intCurrentWidth, intCurrentHeight, intPreferredHeight,
- DataType.SPACE_TO_BOTTOM_FOR_CLOSE_BUTTON);
- }
-
- /* (non-Javadoc)
- * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
- *
- */
- public void actionPerformed(ActionEvent arg0) {
- if (arg0.getSource() == this.jButtonClose) {
- this.dispose();
- }
- }
-
- private void writeReportLn(String line) {
- this.reportContent = this.reportContent + line + DataType.LINE_SEPARATOR;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/FindResultId.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/FindResultId.java
deleted file mode 100644
index 3784fb3839..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/FindResultId.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/** @file
-
- The file is used to define GUID Identification used by find function
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.find;
-
-import java.util.Vector;
-
-import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
-import org.tianocore.frameworkwizard.packaging.PackageIdentification;
-
-public class FindResultId {
-
- private String name = "";
-
- private String type = "";
-
- private Vector<String> arch = new Vector<String>();
-
- private Vector<String> moduleType = new Vector<String>();
-
- private String help = "";
-
- private Vector<ModuleIdentification> producedModules = new Vector<ModuleIdentification>();
-
- private Vector<ModuleIdentification> consumedModules = new Vector<ModuleIdentification>();
-
- private PackageIdentification declaredBy = null;
-
- public FindResultId(String strName, String strType, Vector<String> vArch, String strHelp, Vector<String> vModuleType, PackageIdentification pDeclaredBy) {
- this.name = (strName == null ? "" : strName);
- this.type = (strType == null ? "" : strType);
- this.arch = (vArch == null ? this.arch : vArch);
- this.help = (strHelp == null ? "" : strHelp);
- this.moduleType = (vModuleType == null ? this.moduleType : vModuleType);
- this.declaredBy = pDeclaredBy;
- }
-
- public Vector<String> getArch() {
- return arch;
- }
-
- public void setArch(Vector<String> arch) {
- this.arch = arch;
- }
-
- public Vector<ModuleIdentification> getConsumedModules() {
- return consumedModules;
- }
-
- public void setConsumedModules(Vector<ModuleIdentification> consumedModules) {
- this.consumedModules = consumedModules;
- }
-
- public void addConsumedModules(ModuleIdentification consumedModule) {
- if (consumedModule != null) {
- this.consumedModules.addElement(consumedModule);
- }
- }
-
- public PackageIdentification getDeclaredBy() {
- return declaredBy;
- }
-
- public void setDeclaredBy(PackageIdentification declaredBy) {
- this.declaredBy = declaredBy;
- }
-
- public String getHelp() {
- return help;
- }
-
- public void setHelp(String help) {
- this.help = help;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public Vector<ModuleIdentification> getProducedModules() {
- return producedModules;
- }
-
- public void setProducedModules(Vector<ModuleIdentification> producedModules) {
- this.producedModules = producedModules;
- }
-
- public void addProducedModules(ModuleIdentification producedModule) {
- if (producedModule != null) {
- this.producedModules.addElement(producedModule);
- }
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public Vector<String> getModuleType() {
- return moduleType;
- }
-
- public void setModuleType(Vector<String> moduleType) {
- this.moduleType = moduleType;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/GuidId.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/GuidId.java
deleted file mode 100644
index 2533108e4a..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/GuidId.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/** @file
-
- The file is used to define GUID Identification used by find function
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.find;
-
-public class GuidId {
-
- private String name = null;
-
- private String type = null;
-
- private String producedModules = null;
-
- private String consumedModules = null;
-
- private String declaredBy = null;
-
- public GuidId(String arg0, String arg1, String arg2, String arg3, String arg4) {
- this.name = (arg0 == null ? "" : arg0);
- this.type = (arg1 == null ? "" : arg1);
- this.producedModules = (arg2 == null ? "" : arg2);
- this.consumedModules = (arg3 == null ? "" : arg3);
- this.declaredBy = (arg4 == null ? "" : arg4);
- }
-
- public String getConsumedModules() {
- return consumedModules;
- }
-
- public void setConsumedModules(String consumedModules) {
- this.consumedModules = consumedModules;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getProducedModules() {
- return producedModules;
- }
-
- public void setProducedModules(String producedModules) {
- this.producedModules = producedModules;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getDeclaredBy() {
- return declaredBy;
- }
-
- public void setDeclaredBy(String declaredBy) {
- this.declaredBy = declaredBy;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/LibraryClassId.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/LibraryClassId.java
deleted file mode 100644
index a31cb38ade..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/LibraryClassId.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/** @file
-
- The file is used to define Library Class Identification used by find function
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.find;
-
-public class LibraryClassId {
-
- private String name = null;
-
- private String type = null;
-
- private String producedModules = null;
-
- private String consumedModules = null;
-
- private String declaredBy = null;
-
- public LibraryClassId(String arg0, String arg1, String arg2, String arg3, String arg4) {
- this.name = (arg0 == null ? "" : arg0);
- this.type = (arg1 == null ? "" : arg1);
- this.producedModules = (arg2 == null ? "" : arg2);
- this.consumedModules = (arg3 == null ? "" : arg3);
- this.declaredBy = (arg4 == null ? "" : arg4);
- }
-
- public String getConsumedModules() {
- return consumedModules;
- }
-
- public void setConsumedModules(String consumedModules) {
- this.consumedModules = consumedModules;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getProducedModules() {
- return producedModules;
- }
-
- public void setProducedModules(String producedModules) {
- this.producedModules = producedModules;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getDeclaredBy() {
- return declaredBy;
- }
-
- public void setDeclaredBy(String declaredBy) {
- this.declaredBy = declaredBy;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/PcdFindResultId.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/PcdFindResultId.java
deleted file mode 100644
index 88e46c48cf..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/PcdFindResultId.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/** @file
-
- The file is used to define Pcd Identification used by find function
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.find;
-
-import java.util.Vector;
-
-import org.tianocore.frameworkwizard.packaging.PackageIdentification;
-
-public class PcdFindResultId extends FindResultId {
-
- private String tokenSpaceGuidCName = null;
-
- private String token = null;
-
- private String datumType = null;
-
- private String value = null;
-
- private String usage = null;
-
- public PcdFindResultId(String strName, String strType, Vector<String> vArch, String strHelp, Vector<String> vModuleType, PackageIdentification pDeclaredBy) {
- super(strName, strType, vArch, strHelp, vModuleType, pDeclaredBy);
- }
-
- public String getDatumType() {
- return datumType;
- }
-
- public void setDatumType(String datumType) {
- this.datumType = datumType;
- }
-
- public String getToken() {
- return token;
- }
-
- public void setToken(String token) {
- this.token = token;
- }
-
- public String getTokenSpaceGuidCName() {
- return tokenSpaceGuidCName;
- }
-
- public void setTokenSpaceGuidCName(String tokenSpaceGuidCName) {
- this.tokenSpaceGuidCName = tokenSpaceGuidCName;
- }
-
- public String getUsage() {
- return usage;
- }
-
- public void setUsage(String usage) {
- this.usage = usage;
- }
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/PcdId.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/PcdId.java
deleted file mode 100644
index 4982109068..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/PcdId.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/** @file
-
- The file is used to define GUID Identification used by find function
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.find;
-
-public class PcdId {
-
- private String name = null;
-
- private String type = null;
-
- private String producedModules = null;
-
- private String consumedModules = null;
-
- private String declaredBy = null;
-
- public PcdId(String arg0, String arg1, String arg2, String arg3, String arg4) {
- this.name = (arg0 == null ? "" : arg0);
- this.type = (arg1 == null ? "" : arg1);
- this.producedModules = (arg2 == null ? "" : arg2);
- this.consumedModules = (arg3 == null ? "" : arg3);
- this.declaredBy = (arg4 == null ? "" : arg4);
- }
-
- public String getConsumedModules() {
- return consumedModules;
- }
-
- public void setConsumedModules(String consumedModules) {
- this.consumedModules = consumedModules;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getProducedModules() {
- return producedModules;
- }
-
- public void setProducedModules(String producedModules) {
- this.producedModules = producedModules;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getDeclaredBy() {
- return declaredBy;
- }
-
- public void setDeclaredBy(String declaredBy) {
- this.declaredBy = declaredBy;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/PpiId.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/PpiId.java
deleted file mode 100644
index d4782c4012..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/PpiId.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/** @file
-
- The file is used to define PPI Identification used by find function
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.find;
-
-public class PpiId {
-
- private String name = null;
-
- private String type = null;
-
- private String producedModules = null;
-
- private String consumedModules = null;
-
- private String declaredBy = null;
-
- public PpiId(String arg0, String arg1, String arg2, String arg3, String arg4) {
- this.name = (arg0 == null ? "" : arg0);
- this.type = (arg1 == null ? "" : arg1);
- this.producedModules = (arg2 == null ? "" : arg2);
- this.consumedModules = (arg3 == null ? "" : arg3);
- this.declaredBy = (arg4 == null ? "" : arg4);
- }
-
- public String getConsumedModules() {
- return consumedModules;
- }
-
- public void setConsumedModules(String consumedModules) {
- this.consumedModules = consumedModules;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getProducedModules() {
- return producedModules;
- }
-
- public void setProducedModules(String producedModules) {
- this.producedModules = producedModules;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getDeclaredBy() {
- return declaredBy;
- }
-
- public void setDeclaredBy(String declaredBy) {
- this.declaredBy = declaredBy;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/ProtocolId.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/ProtocolId.java
deleted file mode 100644
index 69bcbec984..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/ProtocolId.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/** @file
-
- The file is used to define PROTOCOL Identification used by find function
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.find;
-
-public class ProtocolId {
-
- private String name = null;
-
- private String type = null;
-
- private String producedModules = null;
-
- private String consumedModules = null;
-
- private String declaredBy = null;
-
- public ProtocolId(String arg0, String arg1, String arg2, String arg3, String arg4) {
- this.name = (arg0 == null ? "" : arg0);
- this.type = (arg1 == null ? "" : arg1);
- this.producedModules = (arg2 == null ? "" : arg2);
- this.consumedModules = (arg3 == null ? "" : arg3);
- this.declaredBy = (arg4 == null ? "" : arg4);
- }
-
- public String getConsumedModules() {
- return consumedModules;
- }
-
- public void setConsumedModules(String consumedModules) {
- this.consumedModules = consumedModules;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getProducedModules() {
- return producedModules;
- }
-
- public void setProducedModules(String producedModules) {
- this.producedModules = producedModules;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getDeclaredBy() {
- return declaredBy;
- }
-
- public void setDeclaredBy(String declaredBy) {
- this.declaredBy = declaredBy;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ArchCheckBox.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ArchCheckBox.java
deleted file mode 100644
index d02c121433..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ArchCheckBox.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/** @file
-
- The file is used to provid 6 kinds of arch in one jpanel
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.frameworkwizard.common.ui;
-
-import java.util.Vector;
-
-import javax.swing.JCheckBox;
-import javax.swing.JPanel;
-
-import org.tianocore.frameworkwizard.common.DataType;
-
-public class ArchCheckBox extends JPanel {
-
- ///
- /// Define class members
- ///
- private static final long serialVersionUID = 4792669775676953990L;
-
- private JCheckBox jCheckBoxIa32 = null;
-
- private JCheckBox jCheckBoxX64 = null;
-
- private JCheckBox jCheckBoxIpf = null;
-
- private JCheckBox jCheckBoxEbc = null;
-
- private JCheckBox jCheckBoxArm = null;
-
- private JCheckBox jCheckBoxPpc = null;
-
- /**
- * This method initializes jCheckBoxIa32
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getJCheckBoxIa32() {
- if (jCheckBoxIa32 == null) {
- jCheckBoxIa32 = new JCheckBox();
- jCheckBoxIa32.setBounds(new java.awt.Rectangle(0, 0, 55, 20));
- jCheckBoxIa32.setText("IA32");
- jCheckBoxIa32.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);
- }
- return jCheckBoxIa32;
- }
-
- /**
- * This method initializes jCheckBoxX64
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getJCheckBoxX64() {
- if (jCheckBoxX64 == null) {
- jCheckBoxX64 = new JCheckBox();
- jCheckBoxX64.setBounds(new java.awt.Rectangle(55, 0, 53, 20));
- jCheckBoxX64.setText("X64");
- jCheckBoxX64.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);
- }
- return jCheckBoxX64;
- }
-
- /**
- * This method initializes jCheckBoxIpf
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getJCheckBoxIpf() {
- if (jCheckBoxIpf == null) {
- jCheckBoxIpf = new JCheckBox();
- jCheckBoxIpf.setBounds(new java.awt.Rectangle(108, 0, 52, 20));
- jCheckBoxIpf.setText("IPF");
- jCheckBoxIpf.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);
- }
- return jCheckBoxIpf;
- }
-
- /**
- * This method initializes jCheckBoxEbc
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getJCheckBoxEbc() {
- if (jCheckBoxEbc == null) {
- jCheckBoxEbc = new JCheckBox();
- jCheckBoxEbc.setBounds(new java.awt.Rectangle(160, 0, 53, 20));
- jCheckBoxEbc.setText("EBC");
- jCheckBoxEbc.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);
- }
- return jCheckBoxEbc;
- }
-
- /**
- * This method initializes jCheckBoxArm
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getJCheckBoxArm() {
- if (jCheckBoxArm == null) {
- jCheckBoxArm = new JCheckBox();
- jCheckBoxArm.setBounds(new java.awt.Rectangle(213, 0, 54, 20));
- jCheckBoxArm.setText("ARM");
- jCheckBoxArm.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);
- }
- return jCheckBoxArm;
- }
-
- /**
- * This method initializes jCheckBoxPpc
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getJCheckBoxPpc() {
- if (jCheckBoxPpc == null) {
- jCheckBoxPpc = new JCheckBox();
- jCheckBoxPpc.setBounds(new java.awt.Rectangle(267, 0, 53, 20));
- jCheckBoxPpc.setText("PPC");
- jCheckBoxPpc.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);
- }
- return jCheckBoxPpc;
- }
-
- /**
- * This is the default constructor
- */
- public ArchCheckBox() {
- super();
- initialize();
- }
-
- /**
- * This method initializes this
- *
- * @return void
- */
- private void initialize() {
- this.setSize(320, 20);
- this.setLayout(null);
- this.add(getJCheckBoxIa32(), null);
- this.add(getJCheckBoxX64(), null);
- this.add(getJCheckBoxIpf(), null);
- this.add(getJCheckBoxEbc(), null);
- this.add(getJCheckBoxArm(), null);
- this.add(getJCheckBoxPpc(), null);
- this.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);
- }
-
- public Vector<String> getSelectedItemsVector() {
- Vector<String> v = new Vector<String>();
- if (this.jCheckBoxIa32.isSelected() && this.jCheckBoxIa32.isEnabled()) {
- v.addElement(jCheckBoxIa32.getText());
- }
- if (this.jCheckBoxX64.isSelected() && this.jCheckBoxX64.isEnabled()) {
- v.addElement(jCheckBoxX64.getText());
- }
- if (this.jCheckBoxIpf.isSelected() && this.jCheckBoxIpf.isEnabled()) {
- v.addElement(jCheckBoxIpf.getText());
- }
- if (this.jCheckBoxEbc.isSelected() && this.jCheckBoxEbc.isEnabled()) {
- v.addElement(jCheckBoxEbc.getText());
- }
- if (this.jCheckBoxArm.isSelected() && this.jCheckBoxArm.isEnabled()) {
- v.addElement(jCheckBoxArm.getText());
- }
- if (this.jCheckBoxPpc.isSelected() && this.jCheckBoxPpc.isEnabled()) {
- v.addElement(jCheckBoxPpc.getText());
- }
- return v;
- }
-
- public String getSelectedItemsString() {
- String s = "";
- if (this.jCheckBoxIa32.isSelected() && this.jCheckBoxIa32.isEnabled()) {
- s = s + jCheckBoxIa32.getText() + " ";
- }
- if (this.jCheckBoxX64.isSelected() && this.jCheckBoxX64.isEnabled()) {
- s = s + jCheckBoxX64.getText() + " ";
- }
- if (this.jCheckBoxIpf.isSelected() && this.jCheckBoxIpf.isEnabled()) {
- s = s + jCheckBoxIpf.getText() + " ";
- }
- if (this.jCheckBoxEbc.isSelected() && this.jCheckBoxEbc.isEnabled()) {
- s = s + jCheckBoxEbc.getText() + " ";
- }
- if (this.jCheckBoxArm.isSelected() && this.jCheckBoxArm.isEnabled()) {
- s = s + jCheckBoxArm.getText() + " ";
- }
- if (this.jCheckBoxPpc.isSelected() && this.jCheckBoxPpc.isEnabled()) {
- s = s + jCheckBoxPpc.getText() + " ";
- }
- return s.trim();
- }
-
- public void setAllItemsSelected(boolean isSelected) {
- this.jCheckBoxIa32.setSelected(isSelected);
- this.jCheckBoxX64.setSelected(isSelected);
- this.jCheckBoxIpf.setSelected(isSelected);
- this.jCheckBoxEbc.setSelected(isSelected);
- this.jCheckBoxArm.setSelected(isSelected);
- this.jCheckBoxPpc.setSelected(isSelected);
- }
-
- public void setSelectedItems(Vector<String> v) {
- setAllItemsSelected(false);
- if (v != null) {
- for (int index = 0; index < v.size(); index++) {
- if (v.get(index).equals(this.jCheckBoxIa32.getText())) {
- this.jCheckBoxIa32.setSelected(true);
- continue;
- }
- if (v.get(index).equals(this.jCheckBoxIpf.getText())) {
- this.jCheckBoxIpf.setSelected(true);
- continue;
- }
- if (v.get(index).equals(this.jCheckBoxX64.getText())) {
- this.jCheckBoxX64.setSelected(true);
- continue;
- }
- if (v.get(index).equals(this.jCheckBoxEbc.getText())) {
- this.jCheckBoxEbc.setSelected(true);
- continue;
- }
- if (v.get(index).equals(this.jCheckBoxArm.getText())) {
- this.jCheckBoxArm.setSelected(true);
- continue;
- }
- if (v.get(index).equals(this.jCheckBoxPpc.getText())) {
- this.jCheckBoxPpc.setSelected(true);
- continue;
- }
- }
- }
- }
-
- public void setAllItemsEnabled(boolean isEnabled) {
- this.jCheckBoxIa32.setEnabled(isEnabled);
- this.jCheckBoxX64.setEnabled(isEnabled);
- this.jCheckBoxIpf.setEnabled(isEnabled);
- this.jCheckBoxEbc.setEnabled(isEnabled);
- this.jCheckBoxArm.setEnabled(isEnabled);
- this.jCheckBoxPpc.setEnabled(isEnabled);
- }
-
- public void setEnabledItems(Vector<String> v) {
- setAllItemsEnabled(false);
- if (v != null) {
- for (int index = 0; index < v.size(); index++) {
- if (v.get(index).equals(this.jCheckBoxIa32.getText())) {
- this.jCheckBoxIa32.setEnabled(true);
- continue;
- }
- if (v.get(index).equals(this.jCheckBoxIpf.getText())) {
- this.jCheckBoxIpf.setEnabled(true);
- continue;
- }
- if (v.get(index).equals(this.jCheckBoxX64.getText())) {
- this.jCheckBoxX64.setEnabled(true);
- continue;
- }
- if (v.get(index).equals(this.jCheckBoxEbc.getText())) {
- this.jCheckBoxEbc.setEnabled(true);
- continue;
- }
- if (v.get(index).equals(this.jCheckBoxArm.getText())) {
- this.jCheckBoxArm.setEnabled(true);
- continue;
- }
- if (v.get(index).equals(this.jCheckBoxPpc.getText())) {
- this.jCheckBoxPpc.setEnabled(true);
- continue;
- }
- }
- }
- }
-
- public void setDisabledItems(Vector<String> v) {
- setAllItemsEnabled(true);
- if (v != null) {
- for (int index = 0; index < v.size(); index++) {
- if (v.get(index).equals(this.jCheckBoxIa32.getText())) {
- this.jCheckBoxIa32.setEnabled(false);
- continue;
- }
- if (v.get(index).equals(this.jCheckBoxIpf.getText())) {
- this.jCheckBoxIpf.setEnabled(false);
- continue;
- }
- if (v.get(index).equals(this.jCheckBoxX64.getText())) {
- this.jCheckBoxX64.setEnabled(false);
- continue;
- }
- if (v.get(index).equals(this.jCheckBoxEbc.getText())) {
- this.jCheckBoxEbc.setEnabled(false);
- continue;
- }
- if (v.get(index).equals(this.jCheckBoxArm.getText())) {
- this.jCheckBoxArm.setEnabled(false);
- continue;
- }
- if (v.get(index).equals(this.jCheckBoxPpc.getText())) {
- this.jCheckBoxPpc.setEnabled(false);
- continue;
- }
- }
- }
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ExitConfirm.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ExitConfirm.java
deleted file mode 100644
index 836ed7b386..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ExitConfirm.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/** @file
-
- The file is used to popup a exit confirmation window when program exists
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.frameworkwizard.common.ui;
-
-import java.awt.Dimension;
-import java.awt.Toolkit;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.WindowEvent;
-import java.awt.event.WindowListener;
-
-import javax.swing.JButton;
-import javax.swing.JDialog;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-
-/**
- The class is used to popup a exit confirmation window when program exists
- It extends JDialog and implements ActionListener and WindowListener
-
- **/
-public class ExitConfirm extends JDialog implements ActionListener, WindowListener {
-
- ///
- /// Define class Serial Version UID
- ///
- private static final long serialVersionUID = -5875921789385911029L;
-
- private JPanel jContentPane = null;
-
- private JLabel jLabelMessage = null;
-
- private JLabel jLabelResume = null;
-
- private JLabel jLabelExit = null;
-
- private JButton jButtonResume = null;
-
- private JButton jButtonExit = null;
-
- public boolean isCancel = false;
-
- /**
- This method initializes jButtonResume
-
- @return javax.swing.JButton jButtonResume
-
- **/
- private JButton getJButtonResume() {
- if (jButtonResume == null) {
- jButtonResume = new JButton();
- jButtonResume.setText("Resume");
- jButtonResume.setSize(new java.awt.Dimension(90, 20));
- jButtonResume.setLocation(new java.awt.Point(150, 105));
- jButtonResume.setMnemonic('R');
- jButtonResume.addActionListener(this);
- }
- return jButtonResume;
- }
-
- /**
- This method initializes jButtonExit
-
- @return javax.swing.JButton jButtonExit
-
- **/
- private JButton getJButtonExit() {
- if (jButtonExit == null) {
- jButtonExit = new JButton();
- jButtonExit.setText("Exit");
- jButtonExit.setSize(new java.awt.Dimension(90, 20));
- jButtonExit.setLocation(new java.awt.Point(260, 105));
- jButtonExit.setMnemonic('x');
- jButtonExit.addActionListener(this);
- }
- return jButtonExit;
- }
-
- /**
- Main clasee, reserved for test
-
- @param args
-
- **/
- public static void main(String[] args) {
- // TODO Auto-generated method stub
-
- }
-
- /**
- This is the default constructor
-
- **/
- public ExitConfirm(IFrame parentFrame, boolean modal) {
- super(parentFrame, modal);
- initialize();
- }
-
- /**
- This method initializes this
-
- @return void
-
- **/
- private void initialize() {
- this.setSize(500, 170);
- this.setTitle("Exit");
- this.setResizable(false);
- this.setContentPane(getJContentPane());
- this.addWindowListener(this);
- //
- //Set DO_NOTHING_ON_CLOSE when click Close button on title bar
- //
- this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
- centerWindow();
- }
-
- /**
- This method initializes jContentPane
-
- @return javax.swing.JPanel jContentPane
-
- **/
- private JPanel getJContentPane() {
- if (jContentPane == null) {
- jLabelExit = new JLabel();
- jLabelExit.setSize(new java.awt.Dimension(450, 20));
- jLabelExit.setLocation(new java.awt.Point(25, 70));
- jLabelResume = new JLabel();
- jLabelResume.setSize(new java.awt.Dimension(450, 20));
- jLabelResume.setLocation(new java.awt.Point(25, 40));
- jLabelMessage = new JLabel();
- jLabelMessage.setSize(new java.awt.Dimension(450, 20));
- jLabelMessage.setLocation(new java.awt.Point(25, 10));
- jContentPane = new JPanel();
- jContentPane.setLayout(null);
- jContentPane.add(jLabelMessage, null);
- jContentPane.add(jLabelResume, null);
- jContentPane.add(jLabelExit, null);
- jContentPane.add(getJButtonResume(), null);
- jContentPane.add(getJButtonExit(), null);
- }
- return jContentPane;
- }
-
- /**
- Call setWarningMessage to set messages of frame when it is used for Setup
-
- **/
- public void setSetupMessage() {
- String strTitle = "Exit Setup";
- String strMessage = "Setup is not complete. If you quit now, the program will not be installed.";
- String strResume = "You may run the setup program at a later time to complete the installation.";
- String strExit = "To continue installing, click Resume. To quit the Setup program, click Exit.";
- setWarningMessage(strTitle, strMessage, strResume, strExit);
- }
-
- /**
- Call setWarningMessage to set messages of frame when it is used for Module Main GUI
-
- **/
- public void setModuleMessage() {
- String strTitle = "Exit";
- String strMessage = "Do you really want to quit now?";
- String strResume = "All unsaved module information will be lost.";
- String strExit = "To continue editing the module, click Resume. To quit the program, click Exit.";
- setWarningMessage(strTitle, strMessage, strResume, strExit);
- }
-
- /**
- Set message information via input data
-
- @param strTitle The title value
- @param strMessage The main message value
- @param strResume The resume message value
- @param strExit The exit message value
-
- **/
- private void setWarningMessage(String strTitle, String strMessage, String strResume, String strExit) {
- this.setTitle(strTitle);
- jLabelMessage.setText(strMessage);
- jLabelResume.setText(strResume);
- jLabelExit.setText(strExit);
- }
-
- /* (non-Javadoc)
- * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
- *
- * Override actionPerformed to listern all actions
- *
- */
- public void actionPerformed(ActionEvent arg0) {
- //
- //Set isCancel true when click button "Exit"
- //
- Object obj = arg0.getSource();
- if (obj == jButtonResume) {
- isCancel = false;
- }
- if (obj == jButtonExit) {
- isCancel = true;
- }
- this.setVisible(false);
- }
-
- /**
- Make the window in the center of the screen
-
- **/
- private void centerWindow() {
- Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
- this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2);
- }
-
- public void windowActivated(WindowEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void windowClosed(WindowEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void windowClosing(WindowEvent arg0) {
- isCancel = false;
- this.setVisible(false);
- }
-
- public void windowDeactivated(WindowEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void windowDeiconified(WindowEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void windowIconified(WindowEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void windowOpened(WindowEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IComboBox.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IComboBox.java
deleted file mode 100644
index c5a51fd3e6..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IComboBox.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/** @file
-
- The file is used to override JComboBox to provides customized interfaces
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.ui;
-
-import java.awt.event.FocusEvent;
-import java.awt.event.FocusListener;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
-
-import javax.swing.JComboBox;
-import javax.swing.JFrame;
-import javax.swing.JPanel;
-
-/**
- The class is used to override JComboBox to provides customized interfaces
- It extends JComboBox implements KeyListener, MouseListener and FocusListener
-
-
-
- **/
-public class IComboBox extends JComboBox implements KeyListener, MouseListener, FocusListener {
-
- ///
- /// Define class Serial Version UID
- ///
- private static final long serialVersionUID = -1940262568168458911L;
-
- public void focusGained(FocusEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see java.awt.event.FocusListener#focusLost(java.awt.event.FocusEvent)
- *
- * Override focusLost to exit edit mode
- *
- */
- public void focusLost(FocusEvent arg0) {
- this.closeEdit();
- }
-
- /**
- Main class, used for test
-
- @param args
-
- **/
- public static void main(String[] args) {
- JFrame jf = new JFrame();
- jf.setSize(500, 200);
- JPanel jp = new JPanel();
- jp.setLayout(null);
- IComboBox icb = new IComboBox();
- jp.add(icb, null);
- jf.setContentPane(jp);
- jf.setVisible(true);
- }
-
- /**
- This is the default constructor
-
- **/
- public IComboBox() {
- super();
- init();
- }
-
- /**
- This method initializes this
-
- **/
- private void init() {
- this.setSize(320, 20);
- this.setEditable(false);
- this.editor.addActionListener(this);
- this.addMouseListener(this);
- this.addKeyListener(this);
- this.getEditor().getEditorComponent().addKeyListener(this);
- this.getEditor().getEditorComponent().addFocusListener(this);
- this.setToolTipText("<html>Double Click to add an entry, then finish by press ENTER.<br>"
- + "Selecting DELETE will remove selected entry.</html>");
- }
-
- public void keyPressed(KeyEvent arg0) {
- // TODO Auto-generated method stub
- }
-
- /* (non-Javadoc)
- * @see java.awt.event.KeyListener#keyReleased(java.awt.event.KeyEvent)
- *
- * Override keyReleased to listen key action
- *
- */
- public void keyReleased(KeyEvent arg0) {
- //
- //Add new item to list when press ENTER
- //
- if (arg0.getSource() == this.getEditor().getEditorComponent()) {
- if (arg0.getKeyCode() == KeyEvent.VK_ENTER) {
- String strCurrentText = this.getEditor().getItem().toString().trim();
- if (strCurrentText.length() == 0) {
- if (this.getItemCount() > 0) {
- this.setSelectedIndex(0);
- }
- } else {
- this.addItem(strCurrentText);
- this.setSelectedItem(strCurrentText);
- }
- this.setEditable(false);
- }
-
- if (arg0.getKeyCode() == KeyEvent.VK_ESCAPE) {
- closeEdit();
- }
- }
-
- if (arg0.getSource() == this) {
- //
- //Remove item from the list when press DEL
- //
- if (arg0.getKeyCode() == KeyEvent.VK_DELETE) {
- int intSelected = this.getSelectedIndex();
- if (intSelected > -1) {
- this.removeItemAt(this.getSelectedIndex());
- if (this.getItemCount() > 0) {
- this.setSelectedIndex(0);
- } else {
- this.removeAllItems();
- }
- }
- }
- }
- }
-
- public void keyTyped(KeyEvent arg0) {
- // TODO Auto-generated method stub
- }
-
- /* (non-Javadoc)
- * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
- *
- * Override mouseClicked to enter edit mode when double click mouse
- *
- */
- public void mouseClicked(MouseEvent arg0) {
- if (arg0.getClickCount() == 2) {
- this.setEditable(true);
- this.getEditor().setItem("");
- }
- }
-
- public void mouseEntered(MouseEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void mouseExited(MouseEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void mousePressed(MouseEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void mouseReleased(MouseEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- /**
- Exit edit mode
-
- **/
- private void closeEdit() {
- this.setEditable(false);
- this.getEditor().setItem("");
- }
-
- /**
- Set the input item as selected
-
- @param item the item which is needed to be set selected
-
- **/
- public void setSelectedItem(Object item) {
- boolean isFind = false;
- //
- // If the input value is not in the default list, add it to the list
- //
- if (item != null) {
- for (int index = 0; index < this.getItemCount(); index++) {
- if (this.getItemAt(index).equals(item)) {
- isFind = true;
- break;
- }
- }
- //
- // Add this item to IComboBox if not found
- //
- if (!isFind && !item.toString().equals("")) {
- super.addItem(item);
- }
- }
-
- //
- // Call super function to set the item selected.
- //
- super.setSelectedItem(item);
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDefaultMutableTreeNode.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDefaultMutableTreeNode.java
deleted file mode 100644
index 4708191ac9..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDefaultMutableTreeNode.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/** @file
-
-
- The file is used to override DefaultMutableTreeNode to provides customized interfaces
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.frameworkwizard.common.ui;
-
-import javax.swing.tree.DefaultMutableTreeNode;
-
-import org.tianocore.frameworkwizard.common.Identifications.Identification;
-
-/**
- The class is used to override DefaultMutableTreeNode to provides customized interfaces
- It extends DefaultMutableTreeNode
-
-
-
- **/
-public class IDefaultMutableTreeNode extends DefaultMutableTreeNode {
- ///
- /// Define class Serial Version UID
- ///
- private static final long serialVersionUID = -1947340717458069548L;
-
- //
- // Static final definitions for all kinds of node
- //
- public static final int MSA_HEADER = 100;
-
- public static final int MSA_LIBRARYCLASSDEFINITIONS = 101;
-
- public static final int MSA_PACKAGEDEPENDENCIES = 102;
-
- public static final int MSA_SOURCEFILES = 103;
-
- public static final int MSA_PROTOCOLS = 104;
-
- public static final int MSA_EVENTS = 105;
-
- public static final int MSA_HOBS = 106;
-
- public static final int MSA_PPIS = 107;
-
- public static final int MSA_VARIABLES = 108;
-
- public static final int MSA_BOOTMODES = 109;
-
- public static final int MSA_SYSTEMTABLES = 110;
-
- public static final int MSA_DATAHUBS = 111;
-
- public static final int MSA_HIIPACKAGES = 112;
-
- public static final int MSA_GUIDS = 113;
-
- public static final int MSA_EXTERNS = 114;
-
- public static final int MSA_PCDS = 115;
-
- public static final int MSA_BUILDOPTIONS = 117;
-
- public static final int MSA_USEREXTENSIONS = 118;
-
- public static final int MSA_MODULEDEFINITIONS = 119;
-
- public static final int SPD_HEADER = 200;
-
- public static final int SPD_LIBRARYCLASSDECLARATIONS = 201;
-
- public static final int SPD_MSAFILES = 202;
-
- public static final int SPD_PACKAGEHEADERS = 203;
-
- public static final int SPD_GUIDDECLARATIONS = 204;
-
- public static final int SPD_PROTOCOLDECLARATIONS = 205;
-
- public static final int SPD_PPIDECLARATIONS = 206;
-
- public static final int SPD_PCDDECLARATIONS = 207;
-
- public static final int SPD_PACKAGEDEFINITIONS = 208;
-
- public static final int SPD_INDUSTRYSTDINCLUDES = 209;
-
- public static final int FPD_PLATFORMHEADER = 300;
-
- public static final int FPD_FLASH = 301;
-
- public static final int FPD_FRAMEWORKMODULES = 302;
-
- public static final int FPD_PCDDYNAMICBUILDDECLARATIONS = 303;
-
- public static final int FPD_BUILDOPTIONS = 304;
-
- public static final int FPD_PLATFORMDEFINITIONS = 305;
-
- public static final int WORKSPACE = 0;
-
- public static final int MODULE_DESCRIPTION = 1;
-
- public static final int PACKAGE_DESCRIPTION = 2;
-
- public static final int PLATFORM_DESCRIPTION = 3;
-
- public static final int MODULE = 4;
-
- public static final int PACKAGE = 5;
-
- public static final int PLATFORM = 6;
-
- public static final int MODULE_PACKAGE = 7;
-
- public static final int MODULE_PACKAGE_LIBRARY = 8;
-
- public static final int MODULE_PACKAGE_MODULE = 9;
-
- //
- //Static final definitions for operation
- //
- public static final int OPERATION_NULL = 0;
-
- public static final int OPERATION_ADD = 1;
-
- public static final int OPERATION_UPDATE = 2;
-
- public static final int OPERATION_DELETE = 4;
-
- public static final int OPERATION_ADD_UPDATE = 3;
-
- public static final int OPERATION_ADD_DELETE = 5;
-
- public static final int OPERATION_UPDATE_DELETE = 6;
-
- public static final int OPERATION_ADD_UPDATE_DELETE = 7;
-
- //
- //Define 4 node attributes
- //
- private int category = 0;
-
- private String nodeName = "";
-
- private boolean isOpening = false;
-
- private Identification id = null;
-
- private IDefaultMutableTreeNode belongNode = null;
-
- /**
- This is the default constructor
-
- **/
- public IDefaultMutableTreeNode() {
- super();
- }
-
- /**
- This is the overrided constructor
- Init clase members with input data
-
- @param strNodeName The name of node
- @param intCategory The category of node
- @param bolIsOpened to identify if the node is opening or not
- @param identification The Identification of node
-
- **/
- public IDefaultMutableTreeNode(String strNodeName, int intCategory, boolean bolIsOpening,
- Identification identification, IDefaultMutableTreeNode idmtBelongNode) {
- super(strNodeName);
- this.nodeName = strNodeName;
- this.category = intCategory;
- this.isOpening = bolIsOpening;
- this.id = identification;
- this.belongNode = idmtBelongNode;
- }
-
- /**
- Get category of node
-
- @return The category of node
-
- **/
- public int getCategory() {
- return category;
- }
-
- /**
- Set category of node
-
- @param category The input data of node category
-
- **/
- public void setCategory(int category) {
- this.category = category;
- }
-
- /**
- Get name of node
-
- @return The name of node
-
- **/
- public String getNodeName() {
- return nodeName;
- }
-
- /**
- Set name of node
-
- @param nodeName The input data of node name
-
- **/
- public void setNodeName(String nodeName) {
- this.nodeName = nodeName;
- }
-
- /**
- Get identification of node
-
- @return
-
- **/
- public Identification getId() {
- return id;
- }
-
- /**
- Set identification of node
-
- @param id
-
- **/
- public void setId(Identification id) {
- this.id = id;
- }
-
- /**
- get isOpening of node
-
- @return
-
- **/
- public boolean isOpening() {
- return isOpening;
- }
-
- /**
- Set isOpening of node
-
- @param isOpening
-
- **/
- public void setOpening(boolean isOpening) {
- this.isOpening = isOpening;
- }
-
- public String toString() {
- return this.nodeName;
- }
-
- public IDefaultMutableTreeNode getBelongNode() {
- return belongNode;
- }
-
- public void setBelongNode(IDefaultMutableTreeNode belongNode) {
- this.belongNode = belongNode;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDesktopManager.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDesktopManager.java
deleted file mode 100644
index dc668e7ed3..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDesktopManager.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/** @file
-
- The file is used to override DefaultDesktopManager to provides customized interfaces
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.frameworkwizard.common.ui;
-
-import javax.swing.DefaultDesktopManager;
-import javax.swing.JComponent;
-
-/**
- The class is used to override DefaultDesktopManager to provides customized interfaces
- It extends DefaultDesktopManager
-
-
-
- **/
-public class IDesktopManager extends DefaultDesktopManager {
-
- ///
- /// Define class Serial Version UID
- ///
- private static final long serialVersionUID = -4596986878722011062L;
-
- /**
- Main class, reserved for test
-
- @param args
-
- **/
- public static void main(String[] args) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see javax.swing.DesktopManager#dragFrame(javax.swing.JComponent, int, int)
- *
- * Override dragFrame to do nothing to forbid internalframe to be draged
- *
- */
- public void dragFrame(JComponent f, int newX, int newY) {
-
- }
-
- /* (non-Javadoc)
- * @see javax.swing.DesktopManager#endDraggingFrame(javax.swing.JComponent)
- *
- * Override endDraggingFrame to do nothing to forbid internalframe to be draged
- *
- */
- public void endDraggingFrame(JComponent f) {
-
- }
-
- /* (non-Javadoc)
- * @see javax.swing.DesktopManager#beginResizingFrame(javax.swing.JComponent, int)
- *
- * Override beginResizingFrame to do nothing to forbid internalframe to be draged
- *
- */
- public void beginResizingFrame(JComponent f, int direction) {
-
- }
-
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDialog.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDialog.java
deleted file mode 100644
index 1fc7c4c156..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDialog.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/** @file
-
- The file is used to override Dialog to provides customized interfaces
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.frameworkwizard.common.ui;
-
-import java.awt.Dimension;
-import java.awt.Toolkit;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-import javax.swing.JDialog;
-
-import org.tianocore.frameworkwizard.common.DataType;
-import org.tianocore.frameworkwizard.common.Tools;
-
-/**
- The class is used to override Dialog to provides customized interfaces
- It extends JDialog implements ActionListener
-
-
-
- **/
-public class IDialog extends JDialog implements ActionListener {
- ///
- /// Define class Serial Version UID
- ///
- private static final long serialVersionUID = -7692623863358631984L;
- //
- //Define class members
- //
- private boolean isEdited = false;
-
- public int returnType = DataType.RETURN_TYPE_CANCEL;
-
- public void actionPerformed(ActionEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- /**
- Main class, used for test
-
- @param args
-
- **/
- public static void main(String[] args) {
- IDialog id = new IDialog();
- id.setVisible(true);
- }
-
- /**
- This is the default constructor
- **/
- public IDialog() {
- super();
- initialize();
- }
-
- /**
- This is the override constructor
-
- @param parentFrame The parent frame which open the dialog
- @param modal true means the dialog is modal dialog; false means the dialog is not modal dialog
- **/
- public IDialog(IFrame parentFrame, boolean modal) {
- super(parentFrame, modal);
- initialize();
- }
-
- /**
- This is the override constructor
-
- @param parentFrame The parent frame which open the dialog
- @param modal true means the dialog is modal dialog; false means the dialog is not modal dialog
- **/
- public IDialog(IDialog parentFrame, boolean modal) {
- super(parentFrame, modal);
- initialize();
- }
-
- /**
- This method initializes this
-
- **/
- private void initialize() {
- this.setResizable(false);
- }
-
- /**
- Start the dialog at the center of screen
-
- @param intWidth The width of the dialog
- @param intHeight The height of the dialog
-
- **/
- protected void centerWindow(int intWidth, int intHeight) {
- Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
- this.setLocation((d.width - intWidth) / 2, (d.height - intHeight) / 2);
- }
-
- /**
- Start the dialog at the center of screen
-
- **/
- protected void centerWindow() {
- centerWindow(this.getSize().width, this.getSize().height);
- }
-
- /**
- Get if the dialog has been edited
-
- @retval true - The dialog has been edited
- @retval false - The dialog hasn't been edited
-
- **/
- public boolean isEdited() {
- return isEdited;
- }
-
- /**
- Set if the dialog has been edited
-
- @param isEdited The input data which identify if the dialog has been edited
-
- **/
- public void setEdited(boolean isEdited) {
- this.isEdited = isEdited;
- }
-
- /**
- Check the input data is empty or not
-
- @param strValue The input data which need be checked
-
- @retval true - The input data is empty
- @retval fals - The input data is not empty
-
- **/
- public boolean isEmpty(String strValue) {
- return Tools.isEmpty(strValue);
- }
-
- /**
- Display the dialog
-
- **/
- public int showDialog() {
- this.setVisible(true);
- return returnType;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IFrame.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IFrame.java
deleted file mode 100644
index 5f3341f696..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IFrame.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/** @file
-
- The file is used to override Frame to provides customized interfaces
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.frameworkwizard.common.ui;
-
-import java.awt.Dimension;
-import java.awt.Toolkit;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.ComponentEvent;
-import java.awt.event.ComponentListener;
-import java.awt.event.WindowEvent;
-import java.awt.event.WindowListener;
-
-import javax.swing.JFrame;
-import javax.swing.JOptionPane;
-
-import org.tianocore.frameworkwizard.common.Tools;
-
-/**
- The class is used to override Frame to provides customized interfaces
- It extends JFrame implements ActionListener and WindowListener
-
- **/
-public class IFrame extends JFrame implements ActionListener, WindowListener, ComponentListener {
-
- ///
- /// Define class Serial Version UID
- ///
- private static final long serialVersionUID = -3324138961029300427L;
-
- //
- //Define class members
- //
- private ExitConfirm ec = null;
-
- //
- // To indicate the status while quit
- // 0 - When setup (Default)
- // 1 - Whne editing module
- //
- private int intExitType = 0;
-
- /**
- Main class, used for test
-
- @param args
-
- **/
- public static void main(String[] args) {
- IFrame i = new IFrame();
- i.setVisible(true);
- }
-
- /**
- This is the default constructor
-
- **/
- public IFrame() {
- super();
- initialize();
- }
-
- /**
- This method initializes this
-
- **/
- public void initialize() {
- this.setResizable(false);
- this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
- this.addWindowListener(this);
- this.addComponentListener(this);
- }
-
- /**
- Start the dialog at the center of screen
-
- @param intWidth The width of the dialog
- @param intHeight The height of the dialog
-
- **/
- protected void centerWindow(int intWidth, int intHeight) {
- Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
- this.setLocation((d.width - intWidth) / 2, (d.height - intHeight) / 2);
- }
-
- /**
- Start the window full of the screen
-
- **/
- protected void maxWindow() {
- Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
- this.setLocation(0, 0);
- this.setSize(d);
- }
-
- /**
- Start the dialog at the center of screen
-
- **/
- protected void centerWindow() {
- centerWindow(this.getSize().width, this.getSize().height);
- }
-
- /**
- Set the exit window type
-
- @param ExitType The input data of ExitType
-
- **/
- protected void setExitType(int ExitType) {
- this.intExitType = ExitType;
- }
-
- /* (non-Javadoc)
- * @see java.awt.event.WindowListener#windowClosing(java.awt.event.WindowEvent)
- *
- * Override windowClosing to call this.onDisvisible()
- *
- */
- public void windowClosing(WindowEvent arg0) {
- //this.onDisvisible();
- }
-
- public void windowOpened(WindowEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void windowClosed(WindowEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void windowIconified(WindowEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void windowDeiconified(WindowEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void windowActivated(WindowEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void windowDeactivated(WindowEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void actionPerformed(ActionEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- /**
- Define the actions when exit
-
- **/
- public void onExit() {
- ec = new ExitConfirm(this, true);
- //
- //Show different warning message via different ExitType
- //
- switch (intExitType) {
- case 0:
- ec.setSetupMessage();
- break;
- case 1:
- ec.setModuleMessage();
- break;
- }
- ec.setVisible(true);
- if (ec.isCancel) {
- this.dispose();
- System.exit(0);
- }
- }
-
- /**
- Define the actions when disvisible
-
- **/
- public void onDisvisible() {
- ec = new ExitConfirm(this, true);
- //
- //Show different warning message via different ExitType
- //
- switch (intExitType) {
- case 0:
- ec.setSetupMessage();
- break;
- case 1:
- ec.setModuleMessage();
- break;
- }
- ec.setVisible(true);
- if (ec.isCancel) {
- this.dispose();
- }
- }
-
- public int showSaveDialog() {
- return JOptionPane.showConfirmDialog(this, "Save all changed files?", "Save", JOptionPane.YES_NO_CANCEL_OPTION,
- JOptionPane.WARNING_MESSAGE);
- }
-
- /**
- Check the input data is empty or not
-
- @param strValue The input data which need be checked
-
- @retval true - The input data is empty
- @retval fals - The input data is not empty
-
- **/
- public boolean isEmpty(String strValue) {
- return Tools.isEmpty(strValue);
- }
-
- /**
- Display the dialog
-
- **/
- public void showDialog() {
- this.setVisible(true);
- }
-
- public void componentResized(ComponentEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void componentMoved(ComponentEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void componentShown(ComponentEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void componentHidden(ComponentEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IInternalFrame.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IInternalFrame.java
deleted file mode 100644
index f0d018605d..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IInternalFrame.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/** @file
-
- The file is used to override JInternalFrame to provides customized interfaces
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.frameworkwizard.common.ui;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.ComponentEvent;
-import java.awt.event.ComponentListener;
-import java.awt.event.FocusEvent;
-import java.awt.event.FocusListener;
-import java.awt.event.ItemEvent;
-import java.awt.event.ItemListener;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
-
-import javax.swing.JDesktopPane;
-import javax.swing.JFrame;
-import javax.swing.JInternalFrame;
-import javax.swing.JPanel;
-import javax.swing.event.ListSelectionEvent;
-import javax.swing.event.ListSelectionListener;
-import javax.swing.event.TableModelEvent;
-import javax.swing.event.TableModelListener;
-
-import org.tianocore.frameworkwizard.common.Tools;
-
-/**
- * The class is used to override JInternalFrame to provides customized
- * interfaces It extends JInternalFrame implements ActionListener
- *
- *
- *
- */
-public class IInternalFrame extends JInternalFrame implements ActionListener, ComponentListener, ItemListener,
- FocusListener, ListSelectionListener, TableModelListener, MouseListener {
-
- // /
- // / Define class Serial Version UID
- // /
- private static final long serialVersionUID = -609841772384875886L;
-
- //
- // Define class members
- //
- private boolean isEdited = false;
-
- /**
- * Main class, used for test
- *
- * @param args
- *
- */
- public static void main(String[] args) {
- JFrame jf = new JFrame();
- JPanel jp = new JPanel();
- JDesktopPane jdp = new JDesktopPane();
- IInternalFrame itf = new IInternalFrame();
- jdp.add(itf, 1);
- jf.setContentPane(jp);
- jf.setVisible(true);
- }
-
- /**
- * This is the default constructor
- *
- */
- public IInternalFrame() {
- super();
- initialize();
- }
-
- /**
- * This method initializes this
- *
- */
- private void initialize() {
- this.setBounds(new java.awt.Rectangle(0, 0, 520, 545));
- this.setMinimumSize(new java.awt.Dimension(520, 545));
- this.addComponentListener(this);
- }
-
- /**
- * Get if the InternalFrame has been edited
- *
- * @retval true - The InternalFrame has been edited
- * @retval false - The InternalFrame hasn't been edited
- *
- */
- public boolean isEdited() {
- return isEdited;
- }
-
- /**
- * Set if the InternalFrame has been edited
- *
- * @param isEdited
- * The input data which identify if the InternalFrame has been
- * edited
- *
- */
- public void setEdited(boolean isEdited) {
- this.isEdited = isEdited;
- }
-
- /**
- * Check the input data is empty or not
- *
- * @param strValue
- * The input data which need be checked
- *
- * @retval true - The input data is empty
- * @retval fals - The input data is not empty
- *
- */
- public boolean isEmpty(String strValue) {
- return Tools.isEmpty(strValue);
- }
-
- public void actionPerformed(ActionEvent arg0) {
- // TODO Auto-generated method stub
- }
-
- public void componentHidden(ComponentEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void componentMoved(ComponentEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void componentResized(ComponentEvent arg0) {
- // TODO Auto-generated method stub
- }
-
- public void componentShown(ComponentEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void showStandard() {
-
- }
-
- public void showAdvanced() {
-
- }
-
- public void showXML() {
-
- }
-
- public void itemStateChanged(ItemEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void focusGained(FocusEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void focusLost(FocusEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void valueChanged(ListSelectionEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void tableChanged(TableModelEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void mouseClicked(MouseEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void mouseEntered(MouseEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void mouseExited(MouseEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void mousePressed(MouseEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void mouseReleased(MouseEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ITree.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ITree.java
deleted file mode 100644
index 252c34ff72..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ITree.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/** @file
-
- The file is used to override JTree to provides customized interfaces
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.frameworkwizard.common.ui;
-
-import javax.swing.JTree;
-import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.TreeNode;
-import javax.swing.tree.TreePath;
-
-import org.tianocore.frameworkwizard.common.Identifications.Identification;
-
-/**
- The class is used to override JTree to provides customized interfaces
- It extends JTree
-
- **/
-public class ITree extends JTree {
- ///
- /// Define class Serial Version UID
- ///
- private static final long serialVersionUID = -7907086164518295327L;
-
- //
- // Define class members
- //
- DefaultTreeModel treeModel = null;
-
- /**
- This is the default constructor
-
- **/
- public ITree() {
- super();
- }
-
- /**
- This is the overrided constructor
- Init class members with input data
-
- @param iDmtRoot The root node of the tree
-
- **/
- public ITree(IDefaultMutableTreeNode iDmtRoot) {
- super(iDmtRoot);
- treeModel = (DefaultTreeModel) this.getModel();
- }
-
- /**
- Get category of selected node
-
- @return The category of selected node
-
- **/
- public int getSelectCategory() {
- int intCategory = 0;
- TreePath path = this.getSelectionPath();
- IDefaultMutableTreeNode node = (IDefaultMutableTreeNode) path.getLastPathComponent();
- intCategory = node.getCategory();
- return intCategory;
- }
-
- /**
- Add input node as child node for current selected node
-
- @param strNewNode The name of the node which need be added
-
- **/
- public void addNode(String strNewNode) {
- DefaultMutableTreeNode parentNode = null;
- DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(strNewNode);
- newNode.setAllowsChildren(true);
- TreePath parentPath = this.getSelectionPath();
-
- /**
- * Get parent node of new node
- */
- parentNode = (DefaultMutableTreeNode) (parentPath.getLastPathComponent());
-
- /**
- * Insert new node
- */
- treeModel.insertNodeInto(newNode, parentNode, parentNode.getChildCount());
- this.scrollPathToVisible(new TreePath(newNode.getPath()));
- }
-
- /**
- Add input node as child node for current selected node
-
- @param newNode The node need be added
-
- **/
- public void addNode(IDefaultMutableTreeNode newNode) {
- IDefaultMutableTreeNode parentNode = null;
- newNode.setAllowsChildren(true);
- TreePath parentPath = this.getSelectionPath();
- parentNode = (IDefaultMutableTreeNode) (parentPath.getLastPathComponent());
- treeModel.insertNodeInto(newNode, parentNode, parentNode.getChildCount());
- this.scrollPathToVisible(new TreePath(newNode.getPath()));
- }
-
- /**
- Add input node as child node for current selected node
-
- @param newNode The node need be added
-
- **/
- public void addNode(IDefaultMutableTreeNode parentNode, IDefaultMutableTreeNode newNode) {
- treeModel.insertNodeInto(newNode, parentNode, parentNode.getChildCount());
- this.scrollPathToVisible(new TreePath(newNode.getPath()));
- }
-
- /**
- Remove the selected node
-
- @param strRemovedNode
-
- **/
- public void removeSelectedNode() {
- TreePath treePath = this.getSelectionPath();
- removeNodeByPath(treePath);
- }
-
- /**
- Remove the node by tree path
-
- @param strRemovedNode
-
- **/
- public void removeNodeByPath(TreePath treePath) {
- if (treePath != null) {
- DefaultMutableTreeNode selectionNode = (DefaultMutableTreeNode) treePath.getLastPathComponent();
- TreeNode parent = (TreeNode) selectionNode.getParent();
- if (parent != null) {
- treeModel.removeNodeFromParent(selectionNode);
- }
- }
- }
-
- /**
- Return a node by input tree path
-
- @param treePath
- @return
-
- **/
- public IDefaultMutableTreeNode getNodeByPath(TreePath treePath) {
- if (treePath != null) {
- IDefaultMutableTreeNode selectionNode = (IDefaultMutableTreeNode) treePath.getLastPathComponent();
- return selectionNode;
- }
- return null;
- }
-
- /**
- Remove all child nodes under current node
-
- **/
- public void removeNodeChildrenByPath(TreePath treePath) {
- if (treePath != null) {
- DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode) treePath.getLastPathComponent();
- for (int index = currentNode.getChildCount() - 1; index > -1; index--) {
- treeModel.removeNodeFromParent((DefaultMutableTreeNode) currentNode.getChildAt(index));
- }
- }
- }
-
- /**
- Remove all nodes of the tree
-
- **/
- public void removeAllNode() {
- DefaultMutableTreeNode rootNode = (DefaultMutableTreeNode) treeModel.getRoot();
- rootNode.removeAllChildren();
- treeModel.reload();
- }
-
- public IDefaultMutableTreeNode getSelectNode() {
- TreePath treepath = this.getSelectionPath();
- IDefaultMutableTreeNode selectionNode = null;
- if (treepath != null) {
- selectionNode = (IDefaultMutableTreeNode) treepath.getLastPathComponent();
- }
- return selectionNode;
- }
-
- public IDefaultMutableTreeNode getNodeById(IDefaultMutableTreeNode node, Identification id) {
- for (int index = 0; index < node.getChildCount(); index++) {
- IDefaultMutableTreeNode iNode = (IDefaultMutableTreeNode) node.getChildAt(index);
- if (iNode.getId().equals(id)) {
- return iNode;
- }
- }
- return null;
- }
-
- public IDefaultMutableTreeNode getNodeById(IDefaultMutableTreeNode node, Identification id, int category) {
- for (int index = 0; index < node.getChildCount(); index++) {
- IDefaultMutableTreeNode iNode = (IDefaultMutableTreeNode) node.getChildAt(index);
- if (iNode.getId().equals(id) && iNode.getCategory() == category) {
- return iNode;
- }
- IDefaultMutableTreeNode childNode = getNodeById(iNode, id, category);
- if (childNode != null) {
- return childNode;
- }
- }
- return null;
- }
-
- public TreePath getPathOfNode(IDefaultMutableTreeNode node) {
- if (node != null) {
- TreePath treePath = new TreePath(treeModel.getPathToRoot(node));
- return treePath;
- }
- return null;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/StarLabel.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/StarLabel.java
deleted file mode 100644
index 3641df0373..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/StarLabel.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/** @file
-
- The file is used to override JLabel to provides customized interfaces
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.frameworkwizard.common.ui;
-
-import javax.swing.JLabel;
-
-/**
- The class is used to override JLabel to provides customized interfaces
-
-
-
- **/
-public class StarLabel extends JLabel {
-
- ///
- /// Define class Serial Version UID
- ///
- private static final long serialVersionUID = -6702981027831543919L;
-
- /**
- Main class, reserved for test
-
- @param args
-
- **/
- public static void main(String[] args) {
- // TODO Auto-generated method stub
-
- }
-
- /**
- This is the default constructor
-
- **/
- public StarLabel() {
- super();
- init();
- }
-
- /**
- To create a RED, BOLD and 14 size "*"
-
- **/
- private void init() {
- this.setText("*");
- this.setSize(new java.awt.Dimension(10, 20));
- this.setForeground(java.awt.Color.red);
- this.setFont(new java.awt.Font("DialogInput", java.awt.Font.BOLD, 14));
- this.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxList.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxList.java
deleted file mode 100644
index 6fbdf03ddd..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxList.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/** @file
-
- The file is used to override JList to create a List with CheckBox item
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.ui.iCheckBoxList;
-
-import java.util.Vector;
-
-import javax.swing.JList;
-
-public class ICheckBoxList extends JList {
- ///
- /// Define class Serial Version UID
- ///
- private static final long serialVersionUID = -2843059688070447632L;
-
- protected ICheckBoxListCellRenderer cellrenderer = new ICheckBoxListCellRenderer();
-
- protected ICheckBoxListener listener = new ICheckBoxListener(this);
-
- protected ICheckBoxListModel model = new ICheckBoxListModel();
-
- /**
- This the default Constructor
-
- **/
- public ICheckBoxList() {
- this(null);
- }
-
- /**
- This the override constructor to create checkbox item with input vector
-
- @param options
-
- **/
- public ICheckBoxList(Vector<ICheckBoxListItem> items) {
- if (items != null) {
- for (int index = 0; index < items.size(); index++) {
- model.addElement(items.elementAt(index));
- }
- }
-
- //
- // If there exists at least one item, set first item selected.
- //
- if (model.size() > 0) {
- ICheckBoxListItem listItem = (ICheckBoxListItem) model.get(0);
- listItem.setSelected(true);
- }
- this.setCellRenderer(cellrenderer);
- this.setModel(model);
- this.addMouseListener(listener);
- this.addKeyListener(listener);
- }
-
- /**
- Set all items of the CheckBoxList component.
-
- @param items
-
- **/
- public void setAllItems(Vector<String> items) {
- if (items != null) {
- model.removeAllElements();
- for (int index = 0; index < items.size(); index++) {
- model.addElement(new ICheckBoxListItem(items.elementAt(index)));
- }
- }
-
- //
- // If there exists at least one item, set first item selected.
- //
- if (model.size() > 0) {
- ICheckBoxListItem listItem = (ICheckBoxListItem) model.get(0);
- listItem.setSelected(true);
- }
- }
-
- /**
- Get All Checked Items of the CheckBoxList component.
-
- @return All Checked Items
- **/
- public Vector<ICheckBoxListItem> getAllCheckedItems() {
- Vector<ICheckBoxListItem> result = new Vector<ICheckBoxListItem>();
-
- for (int i = 0; i < this.getModel().getSize(); i++) {
- if (((ICheckBoxListItem) this.getModel().getElementAt(i)).isChecked()) {
- result.addElement((ICheckBoxListItem) this.getModel().getElementAt(i));
- }
- }
- return result;
- }
-
- /**
- Get All Checked Items index of the CheckBoxList component.
-
- @return All Checked Items index
- **/
- public Vector<Integer> getAllCheckedItemsIndex() {
- Vector<Integer> result = new Vector<Integer>();
-
- for (int i = 0; i < this.getModel().getSize(); i++) {
- if (((ICheckBoxListItem) this.getModel().getElementAt(i)).isChecked()) {
- result.addElement(i);
- }
- }
- return result;
- }
-
- /**
- Get All Checked Items String of the CheckBoxList component.
-
- @return Vector
- **/
- public Vector<String> getAllCheckedItemsString() {
- Vector<String> result = new Vector<String>();
-
- for (int i = 0; i < this.getModel().getSize(); i++) {
- if (((ICheckBoxListItem) this.getModel().getElementAt(i)).isChecked()) {
- result.addElement(((ICheckBoxListItem) this.getModel().getElementAt(i)).text);
- }
- }
- return result;
- }
-
- /**
- Get All Items String of the CheckBoxList component.
-
- @return Vector
- **/
- public Vector<String> getAllItemsString() {
- Vector<String> result = new Vector<String>();
-
- for (int i = 0; i < this.getModel().getSize(); i++) {
- result.addElement(((ICheckBoxListItem) this.getModel().getElementAt(i)).text);
- }
- return result;
- }
-
- /**
- Set Checked status for all input items.
-
- **/
- public void initCheckedItem(boolean bool, Vector<String> items) {
- if (items != null && items.size() != 0) {
- for (int indexI = 0; indexI < items.size(); indexI++) {
- for (int indexJ = 0; indexJ < model.size(); indexJ++) {
- if (items.elementAt(indexI).equals(model.getAllElements().elementAt(indexJ).getText())) {
- ICheckBoxListItem listItem = (ICheckBoxListItem) model.get(indexJ);
- listItem.setChecked(bool);
- break;
- }
- }
- }
- }
-
- //
- // If there exists at least one item, set first item selected.
- //
- if (model.size() > 0) {
- ICheckBoxListItem listItem = (ICheckBoxListItem) model.get(0);
- listItem.setSelected(true);
- }
-
- this.validate();
- }
-
- /**
- Set all items of the compontent checked
-
- **/
- public void setAllItemsChecked() {
- initCheckedItem(true, this.getAllItemsString());
- }
-
- /**
- Set all items of the compontent unchecked
-
- **/
- public void setAllItemsUnchecked() {
- initCheckedItem(false, this.getAllItemsString());
- }
-
- /**
- Remove all items of list
-
- **/
- public void removeAllItem() {
- model.removeAllElements();
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxListCellRenderer.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxListCellRenderer.java
deleted file mode 100644
index 1b022fc908..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxListCellRenderer.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/** @file
-
- The file is used to create cell renderer for CheckBoxList Item
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.ui.iCheckBoxList;
-
-import java.awt.*;
-import javax.swing.*;
-import javax.swing.border.*;
-
-class ICheckBoxListCellRenderer extends JCheckBox implements ListCellRenderer {
- ///
- /// Define class Serial Version UID
- ///
- private static final long serialVersionUID = -1718072217181674870L;
-
- protected static Border noFocusBorder = new EmptyBorder(1, 1, 1, 1);
-
- /**
- This is the default Constructor
-
- **/
- public ICheckBoxListCellRenderer() {
- super();
- setOpaque(true);
- setBorder(noFocusBorder);
- }
-
- /* (non-Javadoc)
- * @see javax.swing.ListCellRenderer#getListCellRendererComponent(javax.swing.JList, java.lang.Object, int, boolean, boolean)
- * Override to get attribute of the ICheckListCellRenderer
- *
- */
- public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
- boolean cellHasFocus) {
- ICheckBoxListItem item = (ICheckBoxListItem) value;
-
- setComponentOrientation(list.getComponentOrientation());
-
- if (item.isChecked()) {
- setBackground(list.getSelectionBackground());
- setForeground(list.getSelectionForeground());
- } else {
- if (isSelected) {
- setBackground(Color.LIGHT_GRAY);
- setForeground(list.getForeground());
- } else {
- setBackground(list.getBackground());
- setForeground(list.getForeground());
- }
- }
-
- if (value instanceof ICheckBoxListItem) {
- setText(item.getText());
- setSelected(item.isChecked());
- } else {
- setIcon(null);
- setText((value == null) ? "" : value.toString());
- }
-
- setEnabled(list.isEnabled());
- setFont(list.getFont());
-
- return this;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxListItem.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxListItem.java
deleted file mode 100644
index a087887e2f..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxListItem.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/** @file
-
- The file is used to create list item for CheckBox list
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.ui.iCheckBoxList;
-
-public class ICheckBoxListItem {
-
- //
- // Define Class Members
- //
- protected String text;
-
- protected boolean checked;
-
- protected boolean selected;
-
- /**
- This is the default constructor to set check box item string
-
- @param text
-
- **/
- public ICheckBoxListItem(String text) {
- this.text = text;
- }
-
- /**
- This is the override constructor to set check box item string and checked status
-
- @param text
- @param checked
-
- **/
- public ICheckBoxListItem(String text, boolean checked) {
- this.text = text;
- this.checked = checked;
- }
-
- /**
- set the checked status
- if true, set false
- if false, set true
-
- **/
- public void invertChecked() {
- checked = !checked;
- }
-
- public boolean isChecked() {
- return checked;
- }
-
- public void setChecked(boolean checked) {
- this.checked = checked;
- }
-
- public String getText() {
- return text;
- }
-
- public void setText(String text) {
- this.text = text;
- }
-
- public boolean isSelected() {
- return selected;
- }
-
- public void setSelected(boolean selected) {
- this.selected = selected;
- }
-
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxListModel.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxListModel.java
deleted file mode 100644
index f3bbe8a3a0..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxListModel.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/** @file
-
- The file is used to override DefaultListModel to create ICheckBoxListModel
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.ui.iCheckBoxList;
-
-import javax.swing.*;
-import java.util.Vector;
-
-public class ICheckBoxListModel extends DefaultListModel {
- ///
- /// Define class Serial Version UID
- ///
- private static final long serialVersionUID = -8617800969723991017L;
-
- /**
- This is the default Constructor for the CheckBoxListModel object
-
- **/
- public ICheckBoxListModel() {
- }
-
- /**
- override DefaultListModel's add method
-
- @param index
- @param item
-
- **/
- public void add(int index, ICheckBoxListItem item) {
- super.add(index, item);
- }
-
- /**
- Add one item at tail
-
- @param item
-
- **/
- public void addElement(ICheckBoxListItem item) {
- super.addElement(item);
- }
-
- /**
- Get all elements of the list
-
- **/
- public Vector<ICheckBoxListItem> getAllElements() {
- Vector<ICheckBoxListItem> items = new Vector<ICheckBoxListItem>();
- ICheckBoxListItem[] objs = new ICheckBoxListItem[this.size()];
- this.copyInto(objs);
- for (int i = 0; i < size(); i++) {
- items.addElement(objs[i]);
- }
- return items;
- }
-}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxListener.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxListener.java
deleted file mode 100644
index e95d279e59..0000000000
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxListener.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/** @file
-
- The file is used to create listener for Checkbox List
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.ui.iCheckBoxList;
-
-import java.awt.event.*;
-
-class ICheckBoxListener implements MouseListener, KeyListener {
-
- protected ICheckBoxList iCheckboxlist;
-
- /**
- This is the default constructor
-
- @param parent
-
- **/
- public ICheckBoxListener(ICheckBoxList parent) {
- iCheckboxlist = parent;
- }
-
- /* (non-Javadoc)
- * @see java.awt.event.KeyListener#keyReleased(java.awt.event.KeyEvent)
- * Override to deal with keyReleased event
- *
- *
- */
- public void keyReleased(KeyEvent e) {
- Object[] selectedValues = iCheckboxlist.getSelectedValues();
- int[] selectedIndices = iCheckboxlist.getSelectedIndices();
-
- for (int index = 0; index < selectedValues.length; index++) {
- ICheckBoxListItem item = (ICheckBoxListItem) selectedValues[index];
-
- if (iCheckboxlist.isEnabled()) {
- if (e.getKeyCode() == KeyEvent.VK_SPACE) {
- //
- //if press space key, then reverse all selected item.
- //
- item.invertChecked();
- }
- ((ICheckBoxListModel) iCheckboxlist.getModel()).setElementAt(item, selectedIndices[index]);
- }
- }
- }
-
-
- /* (non-Javadoc)
- * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
- * Override to deal with mouse clicked event
- *
- */
- public void mouseClicked(MouseEvent e) {
- int index = iCheckboxlist.locationToIndex(e.getPoint());
- ICheckBoxListItem item = null;
- item = (ICheckBoxListItem) iCheckboxlist.getModel().getElementAt(index);
-
- if (item != null && iCheckboxlist.isEnabled()) {
- item.invertChecked();
- ((ICheckBoxListModel) iCheckboxlist.getModel()).setElementAt(item, index);
- }
- }
-
- public void mousePressed(MouseEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void mouseReleased(MouseEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void mouseEntered(MouseEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void mouseExited(MouseEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void keyPressed(KeyEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- public void keyTyped(KeyEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-}