From: jlin16 Date: Fri, 29 Sep 2006 06:21:27 +0000 (+0000) Subject: Remove empty attributes for build option. X-Git-Tag: edk2-stable201903~24234 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=9babb67e6845c6a0722858b6059471a096f47a33 Remove empty attributes for build option. Fix keyboard tying search wrong-focus in FrameworkModules table. Make FvBinding text field editable. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1640 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdBuildOptions.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdBuildOptions.java index 12058aa7cc..39f65c7ef2 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdBuildOptions.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdBuildOptions.java @@ -1864,7 +1864,7 @@ public class FpdBuildOptions extends IInternalFrame { if (bool[5]) { s += "PPC "; } - if (s == " ") { + if (s.equals(" ")) { s += "IA32"; } return s.trim(); diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java index 26d3d694c9..1e0a5cdc44 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java @@ -2135,11 +2135,42 @@ public class FpdFileContents { private void setBuildOptionsOpt(Vector buildTargets, String toolChain, String tagName, String toolCmd, Vector archList, String contents, OptionDocument.Option opt){ opt.setStringValue(contents); + if (buildTargets != null) { + opt.setBuildTargets(buildTargets); + } + else { + if (opt.isSetBuildTargets()) { + opt.unsetBuildTargets(); + } + } + + if (toolChain != null && toolChain.length() > 0) { + opt.setToolChainFamily(toolChain); + } + else { + if (opt.isSetToolChainFamily()) { + opt.unsetToolChainFamily(); + } + } + + if (tagName != null && tagName.length() > 0) { + opt.setTagName(tagName); + } + else { + if (opt.isSetTagName()) { + opt.unsetTagName(); + } + } + + if (toolCmd != null && toolCmd.length() > 0) { + opt.setToolCode(toolCmd); + } + else { + if (opt.isSetToolCode()) { + opt.unsetToolCode(); + } + } - opt.setBuildTargets(buildTargets); - opt.setToolChainFamily(toolChain); - opt.setTagName(tagName); - opt.setToolCode(toolCmd); if (archList != null) { opt.setSupArchList(archList); diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java index cd9d0dd825..214c56b1e6 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java @@ -53,7 +53,7 @@ public class FpdFrameworkModules extends IInternalFrame { */ private static final long serialVersionUID = 1L; - private static final int timeToWait = 3000; + private static final int timeToWait = 2000; private long savedMs = 0; @@ -340,7 +340,7 @@ public class FpdFrameworkModules extends IInternalFrame { searchField = "" + e.getKeyChar(); } - int viewIndex = gotoFoundRow (searchField, (TableSorter) jTableAllModules.getModel()); + int viewIndex = gotoFoundRow (searchField, jTableAllModules); if (viewIndex >= 0){ jTableAllModules.changeSelection(viewIndex, 0, false, false); } @@ -353,10 +353,10 @@ public class FpdFrameworkModules extends IInternalFrame { return jTableAllModules; } - private int gotoFoundRow (String s, TableSorter model) { + private int gotoFoundRow (String s, JTable model) { for (int i = 0; i < model.getRowCount(); ++i) { if (model.getValueAt(i, 0) != null && model.getValueAt(i, 0).toString().regionMatches(true, 0, s, 0, s.length())) { - return model.getViewIndexArray()[i]; + return i; } } return -1; @@ -631,7 +631,7 @@ public class FpdFrameworkModules extends IInternalFrame { searchField = "" + e.getKeyChar(); } - int viewIndex = gotoFoundRow (searchField, (TableSorter) jTableFpdModules.getModel()); + int viewIndex = gotoFoundRow (searchField, jTableFpdModules); if (viewIndex >= 0){ jTableFpdModules.changeSelection(viewIndex, 0, false, false); } diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java index dea31877f5..45e5893fb7 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java @@ -1126,7 +1126,7 @@ public class FpdModuleSA extends JDialog implements ActionListener { if (jTextFieldFvBinding == null) { jTextFieldFvBinding = new JTextField(); jTextFieldFvBinding.setPreferredSize(new java.awt.Dimension(400,20)); - jTextFieldFvBinding.setEditable(false); + jTextFieldFvBinding.setEditable(true); jTextFieldFvBinding.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent e) { String originalFvBinding = ffc.getFvBinding(moduleKey);