import java.io.File;\r
import java.util.HashMap;\r
import java.util.Iterator;\r
-import java.util.Map;\r
import java.util.Set;\r
import java.util.Vector;\r
\r
import javax.swing.event.TableModelListener;\r
import javax.swing.table.DefaultTableModel;\r
import javax.swing.table.TableModel;\r
-\r
-import org.apache.xmlbeans.XmlObject;\r
import org.tianocore.PackageSurfaceAreaDocument;\r
import org.tianocore.frameworkwizard.common.DataValidation;\r
+import org.tianocore.frameworkwizard.common.GlobalData;\r
import org.tianocore.frameworkwizard.common.Tools;\r
import org.tianocore.frameworkwizard.common.Identifications.OpeningPackageType;\r
import org.tianocore.frameworkwizard.common.ui.IInternalFrame;\r
import org.tianocore.frameworkwizard.common.ui.StarLabel;\r
import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList;\r
import org.tianocore.frameworkwizard.platform.ui.ListEditor;\r
-import org.tianocore.frameworkwizard.platform.ui.global.GlobalData;\r
import org.tianocore.frameworkwizard.platform.ui.global.SurfaceAreaQuery;\r
-import org.tianocore.frameworkwizard.platform.ui.id.ModuleIdentification;\r
-import org.tianocore.frameworkwizard.platform.ui.id.PackageIdentification;\r
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
\r
\r
/**\r
private JScrollPane getJScrollPane() {\r
if (jScrollPane == null) {\r
jScrollPane = new JScrollPane();\r
- jScrollPane.setBounds(new java.awt.Rectangle(12,351,608,253));\r
- jScrollPane.setPreferredSize(new java.awt.Dimension(500,419));\r
+ jScrollPane.setBounds(new java.awt.Rectangle(12,351,400,253));\r
jScrollPane.setViewportView(getJTable());\r
}\r
return jScrollPane;\r
model.addColumn("Help Text");\r
model.addColumn("Recommended Instance");\r
model.addColumn("Version");\r
- model.addColumn("Sup. Arch");\r
- model.addColumn("Mod. Types");\r
+ model.addColumn("Supported Architectures");\r
+ model.addColumn("Supported Module Types");\r
\r
Vector<String> vArch = new Vector<String>();\r
vArch.add("IA32");\r
getLibInstances(lib);\r
guid = nameToGuid(name);\r
if (guid == null){\r
- JOptionPane.showMessageDialog(frame, "Recommended Instance NOT exists.");\r
+ JOptionPane.showMessageDialog(frame, "Recommended Instance does not exist.");\r
return;\r
}\r
}\r
}\r
else{\r
if (recommendGuid == null) {\r
- JOptionPane.showMessageDialog(frame, "Recommended Instance NOT exists.");\r
+ JOptionPane.showMessageDialog(frame, "Recommended Instance does not exist.");\r
return;\r
}\r
}\r
\r
private boolean dataValidation(String[] row) {\r
if (!DataValidation.isKeywordType(row[cnClassName])) {\r
- JOptionPane.showMessageDialog(frame, "Library Class is NOT KeyWord Type.");\r
+ JOptionPane.showMessageDialog(frame, "Library Class name entered does not match KeyWord datatype.");\r
return false;\r
}\r
if (!DataValidation.isPathAndFilename(row[cnHdrFile])) {\r
- JOptionPane.showMessageDialog(frame, "Include Header is NOT PathAndFilename Type.");\r
+ JOptionPane.showMessageDialog(frame, "Include Header does not match the PathAndFilename datatype.");\r
return false;\r
}\r
if (row[cnHelpText].length() == 0) {\r
- JOptionPane.showMessageDialog(frame, "Help Text Must NOT be empty.");\r
+ JOptionPane.showMessageDialog(frame, "Help Text must be entered!");\r
return false;\r
}\r
if (row[cnRecInstVer] != null && row[cnRecInstVer].length() > 0) {\r
if (row[cnRecInstName] == null || row[cnRecInstName].length() == 0) {\r
- JOptionPane.showMessageDialog(frame, "Recommended Instance Version must associate with Instance Name.");\r
+ JOptionPane.showMessageDialog(frame, "Recommended Instance Version must associate with the Instance Name.");\r
return false;\r
}\r
\r
if (!DataValidation.isVersionDataType(row[cnRecInstVer])) {\r
- JOptionPane.showMessageDialog(frame, "Recommended Instance Version is NOT VersionDataType.");\r
+ JOptionPane.showMessageDialog(frame, "Recommended Instance Version does not match Version datatype.");\r
return false;\r
}\r
}\r
theFile = chooser.getSelectedFile();\r
String file = theFile.getPath();\r
if (!file.startsWith(dirPrefix)) {\r
- JOptionPane.showMessageDialog(frame, "You can only select files in current package!");\r
+ JOptionPane.showMessageDialog(frame, "You can only select files in current package directory structure!");\r
return;\r
}\r
\r
public void componentResized(ComponentEvent arg0) {\r
int intPreferredWidth = 500;\r
\r
- resizeComponentWidth(this.jTextFieldClass, this.getWidth(), intPreferredWidth);\r
- resizeComponentWidth(this.jTextFieldHelp, this.getWidth(), intPreferredWidth);\r
- resizeComponentWidth(this.jScrollPane, this.getWidth(), intPreferredWidth-10);\r
+ Tools.resizeComponentWidth(this.jTextFieldClass, this.getWidth(), intPreferredWidth);\r
+ Tools.resizeComponentWidth(this.jTextFieldHelp, this.getWidth(), intPreferredWidth);\r
+ Tools.resizeComponentWidth(this.jScrollPane, this.getWidth(), intPreferredWidth-10);\r
\r
}\r
/**\r
private void getLibInstances(String libClass){\r
libNameGuidMap.clear();\r
try {\r
- GlobalData.initInfo("Tools" + File.separator + "Conf" + File.separator + "FrameworkDatabase.db", System.getenv("WORKSPACE"));\r
- \r
- Set<PackageIdentification> spi = GlobalData.getPackageList();\r
- Iterator ispi = spi.iterator();\r
- \r
- while (ispi.hasNext()) {\r
- PackageIdentification pi = (PackageIdentification) ispi.next();\r
-\r
- Set<ModuleIdentification> smi = GlobalData.getModules(pi);\r
- Iterator ismi = smi.iterator();\r
+ Iterator ismi = GlobalData.vModuleList.iterator();\r
while (ismi.hasNext()) {\r
ModuleIdentification mi = (ModuleIdentification) ismi.next();\r
- Map<String, XmlObject> m = GlobalData.getNativeMsa(mi);\r
- SurfaceAreaQuery.setDoc(m);\r
+ \r
Vector<String> classProduced = SurfaceAreaQuery.getLibraryClasses("ALWAYS_PRODUCED", mi);\r
for (int i = 0; i < classProduced.size(); ++i) {\r
if (classProduced.get(i).equals(libClass)) {\r
}\r
}\r
}\r
- }\r
+ \r
}\r
catch(Exception e){\r
- JOptionPane.showMessageDialog(frame, "Search Instances Fail.");\r
+ JOptionPane.showMessageDialog(frame, "Search Instances Failed.");\r
}\r
\r
}\r