import java.awt.Dimension;\r
import java.awt.FontMetrics;\r
\r
-import javax.swing.JFrame;\r
import javax.swing.JOptionPane;\r
import javax.swing.JPanel;\r
import javax.swing.JSplitPane;\r
import javax.swing.table.TableModel;\r
\r
import org.tianocore.PlatformSurfaceAreaDocument;\r
+import org.tianocore.frameworkwizard.FrameworkWizardUI;\r
import org.tianocore.frameworkwizard.common.GlobalData;\r
import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformType;\r
import org.tianocore.frameworkwizard.common.ui.IInternalFrame;\r
\r
public static final int forceDbgColForFpdModTable = 7;\r
\r
- static JFrame frame;\r
-\r
private JSplitPane jSplitPane = null;\r
\r
private JPanel jPanelTop = null;\r
vArchs = WorkspaceProfile.getModuleSupArchs(mi);\r
\r
if (vArchs == null) {\r
- JOptionPane.showMessageDialog(frame, "No Supported Architectures specified in MSA file.");\r
+ JOptionPane.showMessageDialog(this, "No Supported Architectures specified in MSA file.");\r
return;\r
}\r
\r
ffc.getPlatformDefsSupportedArchs(platformSupArch);\r
platformSupArch.retainAll(vArchs);\r
if (platformSupArch.size() == 0) {\r
- JOptionPane.showMessageDialog(frame, "This Module does not support this platform architectures.");\r
+ JOptionPane.showMessageDialog(this, "This Module does not support this platform architectures.");\r
return;\r
}\r
\r
// Archs this Module supported have already been added.\r
//\r
if (vArchs.size() == 0) {\r
- JOptionPane.showMessageDialog(frame, "This Module has already been added.");\r
+ JOptionPane.showMessageDialog(this, "This Module has already been added.");\r
return;\r
}\r
//ToDo put Arch instead of null\r
//ToDo : specify archs need to add.\r
ffc.addFrameworkModulesPcdBuildDefs(mi, arch, null);\r
} catch (Exception exception) {\r
- JOptionPane.showMessageDialog(frame, "Adding " + row[modNameColForFpdModTable] + " with Supporting Architectures: " + arch\r
+ JOptionPane.showMessageDialog(this, "Adding " + row[modNameColForFpdModTable] + " with Supporting Architectures: " + arch\r
+ ": " + exception.getMessage());\r
errorOccurred = true;\r
}\r
} else {\r
s += " was added Successfully.";\r
}\r
- JOptionPane.showMessageDialog(frame, s);\r
+ JOptionPane.showMessageDialog(this, s);\r
TableSorter sorterFpdModules = (TableSorter)jTableFpdModules.getModel();\r
int viewIndex = sorterFpdModules.getViewIndexArray()[modelFpdModules.getRowCount() - 1];\r
jTableFpdModules.changeSelection(viewIndex, 0, false, false);\r
ffc.removeModuleSA(selectedRow); \r
}\r
catch (Exception exp) {\r
- JOptionPane.showMessageDialog(frame, exp.getMessage());\r
+ JOptionPane.showMessageDialog(FpdFrameworkModules.this, exp.getMessage());\r
return;\r
}\r
\r
docConsole = opt;\r
Vector<String> vExceptions = new Vector<String>();\r
if (pcdSync(vExceptions)) {\r
- JOptionPane.showMessageDialog(frame, "PCD in this platform are synchronized with those in MSA files."); \r
+ JOptionPane.showMessageDialog(FrameworkWizardUI.getInstance(), "PCD in this platform are synchronized with those in MSA files."); \r
docConsole.setSaved(false);\r
}\r
if (vExceptions.size() > 0) {\r
for (int i = 0; i < vExceptions.size(); ++i) {\r
errorMsg += " " + vExceptions.get(i) + "\n";\r
}\r
- JOptionPane.showMessageDialog(frame, "Error occurred during synchronization:\n" + errorMsg);\r
+ JOptionPane.showMessageDialog(FrameworkWizardUI.getInstance(), "Error occurred during synchronization:\n" + errorMsg);\r
}\r
}\r
\r
try {\r
row[pathColForFpdModTable] = mi.getPath().substring(Workspace.getCurrentWorkspace().length() + 1);\r
} catch (Exception e) {\r
- JOptionPane.showMessageDialog(frame, "Show FPD Modules:" + e.getMessage());\r
+ JOptionPane.showMessageDialog(FrameworkWizardUI.getInstance(), "Show FPD Modules:" + e.getMessage());\r
}\r
\r
String fpdMsaKey = saa[i][ffcModGuid] + row[modVerColForFpdModTable]\r
try {\r
s[pathColForAllModTable] = mi.getPath().substring(Workspace.getCurrentWorkspace().length() + 1);\r
} catch (Exception e) {\r
- JOptionPane.showMessageDialog(frame, "Show All Modules:" + e.getMessage());\r
+ JOptionPane.showMessageDialog(FrameworkWizardUI.getInstance(), "Show All Modules:" + e.getMessage());\r
}\r
modelAllModules.addRow(s);\r
miList.add(mi);\r