diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdPlatformDefs.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdPlatformDefs.java
index 2881045d61..64201b5aa5 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdPlatformDefs.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdPlatformDefs.java
@@ -23,6 +23,7 @@ import javax.swing.ListSelectionModel;
import org.tianocore.PlatformSurfaceAreaDocument;
import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformType;
import org.tianocore.frameworkwizard.common.ui.IInternalFrame;
+import org.tianocore.frameworkwizard.toolchain.ToolChainId;
import javax.swing.JCheckBox;
import javax.swing.JOptionPane;
@@ -44,31 +45,33 @@ import java.util.Vector;
public class FpdPlatformDefs extends IInternalFrame {
+ private static boolean Debug = false;
+
private final int dialogWidth = 600;
private final int oneRowHeight = 20;
private final int twoRowHeight = 40;
-// private final int threeRowHeight = 60;
+ // private final int threeRowHeight = 60;
private final int fourRowHeight = 80;
private final int sepHeight = 6;
-// private final int sepWidth = 10;
+ // private final int sepWidth = 10;
private final int buttonWidth = 90;
private final int rowOne = 12;
- private final int rowTwo = rowOne + oneRowHeight + sepHeight;
+ private final int rowTwo = rowOne + oneRowHeight + sepHeight * 3;
private final int rowThree = rowTwo + oneRowHeight + sepHeight;
private final int rowFour = rowThree + oneRowHeight + sepHeight;
- private final int rowFive = rowFour + fourRowHeight + sepHeight;
+ private final int rowFive = rowFour + fourRowHeight + sepHeight * 3;
private final int rowSix = rowFive + oneRowHeight + sepHeight;
@@ -78,7 +81,7 @@ public class FpdPlatformDefs extends IInternalFrame {
private final int rowNine = rowEight + oneRowHeight + sepHeight;
- private final int rowTen = rowNine + fourRowHeight + sepHeight + sepHeight;
+ private final int rowTen = rowNine + fourRowHeight + sepHeight + sepHeight * 3;
private final int rowEleven = rowTen + oneRowHeight + sepHeight;
@@ -100,11 +103,6 @@ public class FpdPlatformDefs extends IInternalFrame {
private final int tableWidth = valueWidth;
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
static JFrame frame;
private JPanel jContentPane = null;
@@ -133,13 +131,15 @@ public class FpdPlatformDefs extends IInternalFrame {
private JComboBox jComboBoxInterDir = null;
+ private JComboBox jBuildTargetComboBox = null;
+
private JTable jTableBuildTargets = null;
private JPanel jArchitectureSelections = null;
private JLabel jLabelBuildTargets = null;
- private JTextField jTextFieldBuildTarget = null;
+ // private JTextField jTextFieldBuildTarget = null;
private JButton jButtonAddBuildTarget = null;
@@ -181,6 +181,13 @@ public class FpdPlatformDefs extends IInternalFrame {
private int selectedRow = -1;
+ /**
+ * The following are not used by the UI
+ */
+ private static final long serialVersionUID = 1L;
+
+ private ToolChainId tid = new ToolChainId();
+
public FpdPlatformDefs() {
super();
initialize();
@@ -399,7 +406,9 @@ public class FpdPlatformDefs extends IInternalFrame {
jPanelGeneralContainer.add(getArchitectureSelections(), null);
jPanelGeneralContainer.add(jLabelBuildTargets, null);
- jPanelGeneralContainer.add(getJTextFieldBuildTarget(), null);
+ // jPanelGeneralContainer.add(getJTextFieldBuildTarget(), null);
+ jPanelGeneralContainer.add(getJBuildTargetComboBox(), null);
+
jPanelGeneralContainer.add(getJButtonAddBuildTarget(), null);
jPanelGeneralContainer.add(getJButtonDelBuildTarget(), null);
jPanelGeneralContainer.add(getJScrollPaneBuildTargets(), null);
@@ -441,6 +450,8 @@ public class FpdPlatformDefs extends IInternalFrame {
jArchitectureSelections.setBounds(new java.awt.Rectangle(valueColumn, rowOne, valueWidth, oneRowHeight));
jArchitectureSelections.setPreferredSize(new java.awt.Dimension(valueWidth, oneRowHeight));
jArchitectureSelections.setLocation(new java.awt.Point(valueColumn, rowOne));
+ jArchitectureSelections.setToolTipText("A Platform may support one or more architectures,"
+ + "
at least one architecture must be selected!");
}
return jArchitectureSelections;
}
@@ -601,21 +612,59 @@ public class FpdPlatformDefs extends IInternalFrame {
return jCheckBoxPpc;
}
+ /**
+ * Use a ComboBox for BuildTargets
+ *
+ * @return javax.swing.JComboBox jBuildTargetComboBox
+ */
+ private JComboBox getJBuildTargetComboBox() {
+ if (jBuildTargetComboBox == null) {
+ String toolBt = null;
+ if (tid.getToolsDefTargetNames() == null)
+ toolBt = "DEBUG RELEASE";
+ else
+ toolBt = tid.getToolsDefTargetNames().trim();
+
+ if ((toolBt.contains("*")) || (toolBt.length() < 1)) {
+ toolBt = "DEBUG RELEASE";
+ }
+ if (Debug)
+ System.out.println("Using Build Targets: " + toolBt.trim());
+
+ toolBt = toolBt.replaceAll(" ", ":");
+ toolBt = " :" + toolBt;
+ if (Debug)
+ System.out.println("Using Build Targets: " + toolBt.trim());
+ String[] buildTargets = toolBt.trim().split(":");
+
+ jBuildTargetComboBox = new JComboBox(buildTargets);
+ jBuildTargetComboBox.setEditable(true);
+ jBuildTargetComboBox.setPreferredSize(new Dimension(valueWidth, oneRowHeight));
+ jBuildTargetComboBox.setBounds(new java.awt.Rectangle(valueColumn, rowTwo, valueWidth, oneRowHeight));
+ jBuildTargetComboBox.setLocation(new java.awt.Point(valueColumn, rowTwo));
+ jBuildTargetComboBox.setToolTipText("Select a defined Target and then click Add,
"
+ + "or enter a new, one word TargetName and then click Add.
"
+ + "Remember to define the Targetname in the tool defintion file."
+ + "");
+
+ }
+ return jBuildTargetComboBox;
+ }
+
/**
* This method initializes jTextField1
*
* @return javax.swing.JTextField
*/
- private JTextField getJTextFieldBuildTarget() {
- if (jTextFieldBuildTarget == null) {
- jTextFieldBuildTarget = new JTextField();
- jTextFieldBuildTarget.setPreferredSize(new Dimension(valueWidth, oneRowHeight));
- jTextFieldBuildTarget.setBounds(new java.awt.Rectangle(valueColumn, rowTwo, valueWidth, oneRowHeight));
- jTextFieldBuildTarget.setLocation(new java.awt.Point(valueColumn, rowTwo));
- }
- return jTextFieldBuildTarget;
- }
-
+ // private JTextField getJTextFieldBuildTarget() {
+ // if (jTextFieldBuildTarget == null) {
+ // jTextFieldBuildTarget = new JTextField();
+ // jTextFieldBuildTarget.setPreferredSize(new Dimension(valueWidth, oneRowHeight));
+ // jTextFieldBuildTarget.setBounds(new java.awt.Rectangle(valueColumn, rowTwo, valueWidth, oneRowHeight));
+ // jTextFieldBuildTarget.setLocation(new java.awt.Point(valueColumn, rowTwo));
+ // }
+ // return jTextFieldBuildTarget;
+ // }
/**
* This method initializes jButton2
*
@@ -633,16 +682,26 @@ public class FpdPlatformDefs extends IInternalFrame {
jButtonAddBuildTarget.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
- if (jTextFieldBuildTarget.getText().length() > 0) {
- String[] row = { jTextFieldBuildTarget.getText() };
- jTextFieldBuildTarget.setText("");
+ // Used with Text Field
+ // if (jTextFieldBuildTarget.getText().length() > 0) {
+ // String[] row = { jTextFieldBuildTarget.getText() };
+ // jTextFieldBuildTarget.setText("");
+ // buildTargetTableModel.addRow(row);
+ // Vector