getJDesktopPanePackage().add(frmSpdHeader, 1);\r
break;\r
case IDefaultMutableTreeNode.SPD_LIBRARYCLASSDECLARATIONS:\r
- SpdLibClassDecls frmSlcd = new SpdLibClassDecls(spd);\r
+ SpdLibClassDecls frmSlcd = new SpdLibClassDecls(spd, this);\r
getJDesktopPanePackage().add(frmSlcd, 1);\r
break;\r
case IDefaultMutableTreeNode.SPD_MSAFILES:\r
- SpdMsaFiles frmSmf = new SpdMsaFiles(spd);\r
+ SpdMsaFiles frmSmf = new SpdMsaFiles(spd, this);\r
getJDesktopPanePackage().add(frmSmf, 1);\r
break;\r
case IDefaultMutableTreeNode.SPD_PACKAGEHEADERS:\r
- SpdPackageHeaders frmSph = new SpdPackageHeaders(spd);\r
+ SpdPackageHeaders frmSph = new SpdPackageHeaders(spd, this);\r
getJDesktopPanePackage().add(frmSph, 1);\r
break;\r
case IDefaultMutableTreeNode.SPD_GUIDDECLARATIONS:\r
- SpdGuidDecls frmSgd = new SpdGuidDecls(spd);\r
+ SpdGuidDecls frmSgd = new SpdGuidDecls(spd, this);\r
getJDesktopPanePackage().add(frmSgd, 1);\r
break;\r
case IDefaultMutableTreeNode.SPD_PROTOCOLDECLARATIONS:\r
- SpdProtocolDecls frmSprod = new SpdProtocolDecls(spd);\r
+ SpdProtocolDecls frmSprod = new SpdProtocolDecls(spd, this);\r
getJDesktopPanePackage().add(frmSprod, 1);\r
break;\r
case IDefaultMutableTreeNode.SPD_PPIDECLARATIONS:\r
- SpdPpiDecls frmSppid = new SpdPpiDecls(spd);\r
+ SpdPpiDecls frmSppid = new SpdPpiDecls(spd, this);\r
getJDesktopPanePackage().add(frmSppid, 1);\r
break;\r
case IDefaultMutableTreeNode.SPD_PCDDECLARATIONS:\r
- SpdPcdDefs frmSpcdd = new SpdPcdDefs(spd);\r
+ SpdPcdDefs frmSpcdd = new SpdPcdDefs(spd, this);\r
getJDesktopPanePackage().add(frmSpcdd, 1);\r
break;\r
}\r
int result = cso.showDialog();\r
if (result == DataType.RETURN_TYPE_OK) {\r
String strReturn = "Far Creation Completed!";\r
- JOptionPane.showConfirmDialog(null, strReturn, "Done", JOptionPane.DEFAULT_OPTION,\r
+ JOptionPane.showConfirmDialog(this, strReturn, "Done", JOptionPane.DEFAULT_OPTION,\r
JOptionPane.INFORMATION_MESSAGE);\r
}\r
cso.dispose();\r
int result = iso.showDialog();\r
if (result == DataType.RETURN_TYPE_OK) {\r
String strReturn = "<html>Far Installalation completed!<br>Refreshing the WORKSPACE!</html>";\r
- JOptionPane.showConfirmDialog(null, strReturn, "Done", JOptionPane.DEFAULT_OPTION,\r
+ JOptionPane.showConfirmDialog(this, strReturn, "Done", JOptionPane.DEFAULT_OPTION,\r
JOptionPane.INFORMATION_MESSAGE);\r
this.closeAll();\r
this.refresh();\r
int result = dso.showDialog();\r
if (result == DataType.RETURN_TYPE_OK) {\r
String strReturn = "<html>Far Deletion completed!<br>Refreshing the WORKSPACE!</html>";\r
- JOptionPane.showConfirmDialog(null, strReturn, "Done", JOptionPane.DEFAULT_OPTION,\r
+ JOptionPane.showConfirmDialog(this, strReturn, "Done", JOptionPane.DEFAULT_OPTION,\r
JOptionPane.INFORMATION_MESSAGE);\r
this.closeAll();\r
this.refresh();\r
int result = uso.showDialog();\r
if (result == DataType.RETURN_TYPE_OK) {\r
String strReturn = "<html>Far Update completed!<br>Refreshing the WORKSPACE!</html>";\r
- JOptionPane.showConfirmDialog(null, strReturn, "Done", JOptionPane.DEFAULT_OPTION,\r
+ JOptionPane.showConfirmDialog(this, strReturn, "Done", JOptionPane.DEFAULT_OPTION,\r
JOptionPane.INFORMATION_MESSAGE);\r
this.closeAll();\r
this.refresh();\r
return;\r
}\r
\r
- JOptionPane.showConfirmDialog(null, "File is created", "Generate guids.xref", JOptionPane.DEFAULT_OPTION,\r
+ JOptionPane.showConfirmDialog(this, "File is created", "Generate guids.xref", JOptionPane.DEFAULT_OPTION,\r
JOptionPane.INFORMATION_MESSAGE);\r
}\r
}\r
case Workspace.WORKSPACE_NOT_DEFINED:\r
JOptionPane\r
.showConfirmDialog(\r
- null,\r
+ this,\r
"WORKSPACE Environment Variable Is Not Defined, Please select a valid WORKSPACE directory. "\r
+ DataType.LINE_SEPARATOR\r
+ DataType.LINE_SEPARATOR\r
break;\r
}\r
case Workspace.WORKSPACE_NOT_EXIST:\r
- JOptionPane.showConfirmDialog(null, "Defined WORKSPACE Is Not Existed", "Error",\r
+ JOptionPane.showConfirmDialog(this, "Defined WORKSPACE Is Not Existed", "Error",\r
JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);\r
this.dispose();\r
System.exit(0);\r
case Workspace.WORKSPACE_NOT_DIRECTORY:\r
- JOptionPane.showConfirmDialog(null, "Defined WORKSPACE Is Not A Directory", "Error",\r
+ JOptionPane.showConfirmDialog(this, "Defined WORKSPACE Is Not A Directory", "Error",\r
JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);\r
this.dispose();\r
System.exit(0);\r
case Workspace.WORKSPACE_NOT_VALID:\r
- JOptionPane.showConfirmDialog(null, "WORKSPACE Environment Variable Is Not Valid", "Error",\r
+ JOptionPane.showConfirmDialog(this, "WORKSPACE Environment Variable Is Not Valid", "Error",\r
JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);\r
this.dispose();\r
System.exit(0);\r
case Workspace.WORKSPACE_NO_TARGET_FILE:\r
- JOptionPane.showConfirmDialog(null, "Target.txt File Is Not Existed", "Error", JOptionPane.DEFAULT_OPTION,\r
+ JOptionPane.showConfirmDialog(this, "Target.txt File Is Not Existed", "Error", JOptionPane.DEFAULT_OPTION,\r
JOptionPane.ERROR_MESSAGE);\r
this.dispose();\r
System.exit(0);\r
\r
import javax.swing.JOptionPane;\r
\r
+import org.tianocore.frameworkwizard.FrameworkWizardUI;\r
+\r
/**\r
The class is used to provides static interfaces to save log and error information\r
\r
private static void showWrnMessage(String strErr) {\r
String strReturn = Tools.wrapStringByWord(strErr);\r
JOptionPane\r
- .showConfirmDialog(null, strReturn, "Warning", JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);\r
+ .showConfirmDialog(FrameworkWizardUI.getInstance(), strReturn, "Warning", JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);\r
}\r
\r
/**\r
import org.tianocore.PlatformHeaderDocument.PlatformHeader;\r
import org.tianocore.PlatformSurfaceAreaDocument.PlatformSurfaceArea;\r
import org.tianocore.SpdHeaderDocument.SpdHeader;\r
+import org.tianocore.frameworkwizard.FrameworkWizardUI;\r
import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r
import org.tianocore.frameworkwizard.platform.PlatformIdentification;\r
\r
**/\r
public static void showInformationMessage(String arg0) {\r
- JOptionPane.showConfirmDialog(null, arg0, "Info", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE);\r
+ JOptionPane.showConfirmDialog(FrameworkWizardUI.getInstance(), arg0, "Info", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE);\r
}\r
\r
/**\r
}\r
\r
public int showSaveDialog() {\r
- return JOptionPane.showConfirmDialog(null, "Save all changed files?", "Save", JOptionPane.YES_NO_CANCEL_OPTION,\r
+ return JOptionPane.showConfirmDialog(this, "Save all changed files?", "Save", JOptionPane.YES_NO_CANCEL_OPTION,\r
JOptionPane.WARNING_MESSAGE);\r
}\r
\r
msg += "is un-Repackagable. Do you want to continue? ";\r
\r
if (unRepackablePackages.size() > 0) {\r
- if(JOptionPane.showConfirmDialog(null, msg, "Warning", JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) {\r
+ if(JOptionPane.showConfirmDialog(this, msg, "Warning", JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) {\r
return ;\r
}\r
}\r
return jButtonOk;\r
}\r
\r
- /**\r
- \r
- @param args\r
- **/\r
- public static void main(String[] args) {\r
- // TODO Auto-generated method stub\r
- new GenGuidDialog().setVisible(true);\r
- }\r
-\r
public String getGuid(){\r
return jTextField.getText();\r
}\r
initialize();\r
}\r
\r
- public GenGuidDialog(ActionListener i){\r
- super();\r
+ public GenGuidDialog(ActionListener i, JFrame frame){\r
+ super(frame);\r
outerListener = i;\r
initialize();\r
jButtonOk.addActionListener(i);\r
\r
import javax.swing.AbstractCellEditor;\r
import javax.swing.JButton;\r
-//import javax.swing.JComponent;\r
import javax.swing.JFrame;\r
+//import javax.swing.JComponent;\r
import javax.swing.JTable;\r
//import javax.swing.KeyStroke;\r
import javax.swing.table.TableCellEditor;\r
private static final long serialVersionUID = 1L;\r
String currentGuid;\r
JButton button;\r
- static JFrame frame;\r
GenGuidDialog dialog;\r
protected static final String EDIT = "edit";\r
\r
- public GuidEditor() {\r
+ public GuidEditor(JFrame frame) {\r
\r
button = new JButton();\r
button.setActionCommand(EDIT);\r
button.setBorderPainted(false);\r
\r
\r
- dialog = new GenGuidDialog(this);\r
+ dialog = new GenGuidDialog(this, frame);\r
\r
}\r
\r
import java.awt.event.ComponentEvent;\r
import java.util.Vector;\r
\r
+import javax.swing.JFrame;\r
import javax.swing.JOptionPane;\r
import javax.swing.JPanel;\r
import javax.swing.JTable;\r
import javax.swing.JLabel;\r
import javax.swing.JScrollPane;\r
import javax.swing.JButton;\r
-import javax.swing.JFrame;\r
import javax.swing.ListSelectionModel;\r
import javax.swing.event.InternalFrameAdapter;\r
import javax.swing.event.InternalFrameEvent;\r
* \r
*/\r
private static final long serialVersionUID = 1L;\r
-\r
- static JFrame frame;\r
+ \r
+ private JFrame topFrame = null;\r
\r
private SpdFileContents sfc = null;\r
\r
column = jTable.getColumnModel().getColumn(6);\r
column.setMinWidth(this.guidTypeMinWidth);\r
\r
- jTable.getColumnModel().getColumn(2).setCellEditor(new GuidEditor());\r
- jTable.getColumnModel().getColumn(3).setCellEditor(new LongTextEditor());\r
+ jTable.getColumnModel().getColumn(2).setCellEditor(new GuidEditor(topFrame));\r
+ jTable.getColumnModel().getColumn(3).setCellEditor(new LongTextEditor(topFrame));\r
\r
Vector<String> vArch = new Vector<String>();\r
vArch.add("IA32");\r
vArch.add("EBC");\r
vArch.add("ARM");\r
vArch.add("PPC");\r
- jTable.getColumnModel().getColumn(4).setCellEditor(new ListEditor(vArch));\r
+ jTable.getColumnModel().getColumn(4).setCellEditor(new ListEditor(vArch, topFrame));\r
\r
Vector<String> vModule = new Vector<String>();\r
vModule.add("BASE");\r
vModule.add("UEFI_DRIVER");\r
vModule.add("UEFI_APPLICATION");\r
vModule.add("USER_DEFINED");\r
- jTable.getColumnModel().getColumn(5).setCellEditor(new ListEditor(vModule));\r
+ jTable.getColumnModel().getColumn(5).setCellEditor(new ListEditor(vModule, topFrame));\r
\r
Vector<String> vGuid = new Vector<String>();\r
vGuid.add("DATA_HUB_RECORD");\r
vGuid.add("HII_PACKAGE_LIST");\r
vGuid.add("HOB");\r
vGuid.add("TOKEN_SPACE_GUID");\r
- ListEditor le = new ListEditor(vGuid);\r
+ ListEditor le = new ListEditor(vGuid, topFrame);\r
le.setCanNotBeEmpty(true);\r
jTable.getColumnModel().getColumn(6).setCellEditor(le);\r
\r
/**\r
This is the default constructor\r
**/\r
- public SpdGuidDecls() {\r
+ public SpdGuidDecls(JFrame frame) {\r
super();\r
+ topFrame = frame;\r
initialize();\r
init();\r
\r
}\r
\r
- public SpdGuidDecls(PackageSurfaceAreaDocument.PackageSurfaceArea inPsa){\r
- this();\r
+ public SpdGuidDecls(PackageSurfaceAreaDocument.PackageSurfaceArea inPsa, JFrame frame){\r
+ this(frame);\r
sfc = new SpdFileContents(inPsa);\r
init(sfc);\r
}\r
\r
- public SpdGuidDecls(OpeningPackageType opt) {\r
- this(opt.getXmlSpd());\r
+ public SpdGuidDecls(OpeningPackageType opt, JFrame frame) {\r
+ this(opt.getXmlSpd(), frame);\r
docConsole = opt;\r
if (sfc.getSpdPkgDefsRdOnly().equals("true")) {\r
- JOptionPane.showMessageDialog(frame, "This is a read-only package. You will not be able to edit contents in table.");\r
+ JOptionPane.showMessageDialog(this, "This is a read-only package. You will not be able to edit contents in table.");\r
}\r
initFrame();\r
}\r
return iCheckBoxListMod;\r
}\r
\r
- public static void main(String[] args){\r
- new SpdGuidDecls().setVisible(true);\r
- }\r
-\r
protected DefaultTableModel getModel() {\r
return model;\r
}\r
import java.awt.event.FocusEvent;\r
\r
import javax.swing.JButton;\r
-import javax.swing.JFrame;\r
import javax.swing.JLabel;\r
import javax.swing.JOptionPane;\r
import javax.swing.JPanel;\r
//\r
//Define class members\r
//\r
- static JFrame frame;\r
+ private IInternalFrame topFrame;\r
\r
private JPanel jContentPane = null;\r
\r
jPackageNameTextField.addFocusListener(new FocusAdapter() {\r
public void focusLost(FocusEvent e) {\r
if (!DataValidation.isUiNameType(jPackageNameTextField.getText())) {\r
- JOptionPane.showMessageDialog(frame, "Package Name must start with a letter.");\r
+ JOptionPane.showMessageDialog(topFrame, "Package Name must start with a letter.");\r
return;\r
}\r
if (jPackageNameTextField.getText().equals(sfc.getSpdHdrPkgName())) {\r
jGuidTextField.addFocusListener(new FocusAdapter() {\r
public void focusLost(FocusEvent e) {\r
if (!DataValidation.isGuid(jGuidTextField.getText())) {\r
- JOptionPane.showMessageDialog(frame, "Guid must be in registry (8-4-4-4-12) format.");\r
+ JOptionPane.showMessageDialog(topFrame, "Guid must be in registry (8-4-4-4-12) format.");\r
return;\r
}\r
if (jGuidTextField.getText().equals(sfc.getSpdHdrGuidValue())) {\r
jVersionTextField.addFocusListener(new FocusAdapter() {\r
public void focusLost(FocusEvent e) {\r
if (!DataValidation.isVersion(jVersionTextField.getText())) {\r
- JOptionPane.showMessageDialog(frame, "Version must start with a number.");\r
+ JOptionPane.showMessageDialog(topFrame, "Version must start with a number.");\r
return;\r
}\r
if (jVersionTextField.getText().equals(sfc.getSpdHdrVer())) {\r
jLicenseTextArea.addFocusListener(new FocusAdapter() {\r
public void focusLost(FocusEvent e) {\r
if (jLicenseTextArea.getText().length() == 0) {\r
- JOptionPane.showMessageDialog(frame, "License is a required field.");\r
+ JOptionPane.showMessageDialog(topFrame, "License is a required field.");\r
return;\r
}\r
if (jLicenseTextArea.getText().equals(sfc.getSpdHdrLicense())) {\r
public void focusLost(FocusEvent e) {\r
if (jDescriptionTextArea.getText().length() == 0) {\r
JOptionPane\r
- .showMessageDialog(frame,\r
+ .showMessageDialog(topFrame,\r
"Description is a required field, and should reflect the contents of the package.");\r
return;\r
}\r
jAbstractTextField.addFocusListener(new FocusAdapter() {\r
public void focusLost(FocusEvent e) {\r
if (!DataValidation.isAbstract(jAbstractTextField.getText())) {\r
- JOptionPane.showMessageDialog(frame, "Abstract could NOT be empty.");\r
+ JOptionPane.showMessageDialog(topFrame, "Abstract could NOT be empty.");\r
return;\r
}\r
if (jAbstractTextField.getText().equals(sfc.getSpdHdrAbs())) {\r
jCopyrightTextArea.addFocusListener(new FocusAdapter() {\r
public void focusLost(FocusEvent e) {\r
if (!DataValidation.isCopyright(jCopyrightTextArea.getText())) {\r
- JOptionPane.showMessageDialog(frame, "Copyright must be entered.");\r
+ JOptionPane.showMessageDialog(topFrame, "Copyright must be entered.");\r
return;\r
}\r
if (jCopyrightTextArea.getText().equals(sfc.getSpdHdrCopyright())) {\r
this(opt.getXmlSpd());\r
docConsole = opt;\r
initFrame();\r
+ topFrame = this;\r
}\r
\r
/**\r
*/\r
private static final long serialVersionUID = 1L;\r
\r
- static JFrame frame;\r
+ private JFrame topFrame;\r
\r
private JTable jTable = null;\r
\r
model.addColumn("Supported Architectures");\r
model.addColumn("Supported Module Types");\r
\r
- jTable.getColumnModel().getColumn(cnHelpText).setCellEditor(new LongTextEditor());\r
+ jTable.getColumnModel().getColumn(cnHelpText).setCellEditor(new LongTextEditor(topFrame));\r
\r
jTable.removeColumn(jTable.getColumnModel().getColumn(3));\r
jTable.removeColumn(jTable.getColumnModel().getColumn(3));\r
vArch.add("EBC");\r
vArch.add("ARM");\r
vArch.add("PPC");\r
- jTable.getColumnModel().getColumn(cnSupArch - 2).setCellEditor(new ListEditor(vArch));\r
+ jTable.getColumnModel().getColumn(cnSupArch - 2).setCellEditor(new ListEditor(vArch, topFrame));\r
\r
Vector<String> vModule = new Vector<String>();\r
vModule.add("BASE");\r
vModule.add("UEFI_APPLICATION");\r
vModule.add("USER_DEFINED");\r
\r
- jTable.getColumnModel().getColumn(cnSupMod - 2).setCellEditor(new ListEditor(vModule));\r
+ jTable.getColumnModel().getColumn(cnSupMod - 2).setCellEditor(new ListEditor(vModule, topFrame));\r
\r
TableColumn column = jTable.getColumnModel().getColumn(this.cnClassName);\r
column.setMinWidth(this.classNameMinWidth);\r
/**\r
This is the default constructor\r
**/\r
- public SpdLibClassDecls() {\r
+ public SpdLibClassDecls(JFrame frame) {\r
super();\r
+ topFrame = frame;\r
initialize();\r
init();\r
\r
}\r
\r
- public SpdLibClassDecls(PackageSurfaceAreaDocument.PackageSurfaceArea inPsa){\r
- this();\r
+ public SpdLibClassDecls(PackageSurfaceAreaDocument.PackageSurfaceArea inPsa, JFrame frame){\r
+ this(frame);\r
sfc = new SpdFileContents(inPsa);\r
init(sfc);\r
}\r
\r
- public SpdLibClassDecls(OpeningPackageType opt) {\r
- this(opt.getXmlSpd());\r
+ public SpdLibClassDecls(OpeningPackageType opt, JFrame frame) {\r
+ this(opt.getXmlSpd(), frame);\r
docConsole = opt;\r
}\r
/**\r
private void init(SpdFileContents sfc) {\r
\r
if (sfc.getSpdPkgDefsRdOnly().equals("true")) {\r
- JOptionPane.showMessageDialog(frame, "This is a read-only package. You will not be able to edit contents in table.");\r
+ JOptionPane.showMessageDialog(topFrame, "This is a read-only package. You will not be able to edit contents in table.");\r
}\r
initFrame();\r
\r
\r
private boolean dataValidation(String[] row) {\r
if (!DataValidation.isKeywordType(row[cnClassName])) {\r
- JOptionPane.showMessageDialog(frame, "Library Class name entered does not match KeyWord datatype.");\r
+ JOptionPane.showMessageDialog(this, "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 does not match the PathAndFilename datatype.");\r
+ JOptionPane.showMessageDialog(this, "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 be entered!");\r
+ JOptionPane.showMessageDialog(this, "Help Text must be entered!");\r
return false;\r
}\r
// if (row[cnRecInstVer] != null && row[cnRecInstVer].length() > 0) {\r
\r
chooser.setMultiSelectionEnabled(false);\r
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\r
- int retval = chooser.showOpenDialog(frame);\r
+ int retval = chooser.showOpenDialog(topFrame);\r
if (retval == JFileChooser.APPROVE_OPTION) {\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 directory structure!");\r
+ JOptionPane.showMessageDialog(topFrame, "You can only select files in current package directory structure!");\r
return;\r
}\r
\r
*/\r
private static final long serialVersionUID = 1L;\r
\r
- static JFrame frame;\r
+ private JFrame topFrame;\r
\r
private JScrollPane jScrollPane = null; // @jve:decl-index=0:visual-constraint="10,95"\r
\r
/**\r
This is the default constructor\r
**/\r
- public SpdMsaFiles() {\r
+ public SpdMsaFiles(JFrame frame) {\r
super();\r
initialize();\r
init();\r
- \r
+ topFrame = frame;\r
}\r
\r
- public SpdMsaFiles(PackageSurfaceAreaDocument.PackageSurfaceArea inPsa){\r
- this();\r
+ public SpdMsaFiles(PackageSurfaceAreaDocument.PackageSurfaceArea inPsa, JFrame frame){\r
+ this(frame);\r
sfc = new SpdFileContents(inPsa);\r
init(sfc);\r
}\r
\r
- public SpdMsaFiles(OpeningPackageType opt){\r
- this(opt.getXmlSpd());\r
+ public SpdMsaFiles(OpeningPackageType opt, JFrame frame){\r
+ this(opt.getXmlSpd(), frame);\r
docConsole = opt;\r
}\r
/**\r
private void init(SpdFileContents sfc){\r
\r
if (sfc.getSpdPkgDefsRdOnly().equals("true")) {\r
- JOptionPane.showMessageDialog(frame, "This is a read-only package. You will not be able to edit contents in table.");\r
+ JOptionPane.showMessageDialog(topFrame, "This is a read-only package. You will not be able to edit contents in table.");\r
}\r
initFrame();\r
\r
\r
chooser.setMultiSelectionEnabled(false);\r
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\r
- int retval = chooser.showOpenDialog(frame);\r
+ int retval = chooser.showOpenDialog(SpdMsaFiles.this);\r
if (retval == JFileChooser.APPROVE_OPTION) {\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(SpdMsaFiles.this, "You can only select files in current package!");\r
return;\r
}\r
\r
Tools.relocateComponentX(this.jButtonBrowse, this.getWidth(), this.getPreferredSize().width, 25);\r
}\r
\r
- public static void main(String[] args){\r
- new SpdMsaFiles().setVisible(true);\r
- }\r
}\r
\r
\r
*/\r
private static final long serialVersionUID = 1L;\r
\r
- static JFrame frame;\r
+ private JFrame topFrame;\r
\r
private SpdFileContents sfc = null;\r
\r
/**\r
This is the default constructor\r
**/\r
- public SpdPackageHeaders() {\r
+ public SpdPackageHeaders(JFrame frame) {\r
super();\r
initialize();\r
init();\r
- \r
+ topFrame = frame;\r
}\r
\r
- public SpdPackageHeaders(PackageSurfaceAreaDocument.PackageSurfaceArea inPsa){\r
- this();\r
+ public SpdPackageHeaders(PackageSurfaceAreaDocument.PackageSurfaceArea inPsa, JFrame frame){\r
+ this(frame);\r
sfc = new SpdFileContents(inPsa);\r
init(sfc);\r
}\r
\r
- public SpdPackageHeaders(OpeningPackageType opt) {\r
- this(opt.getXmlSpd());\r
+ public SpdPackageHeaders(OpeningPackageType opt, JFrame frame) {\r
+ this(opt.getXmlSpd(), frame);\r
docConsole = opt;\r
}\r
/**\r
private void init(SpdFileContents sfc){\r
\r
if (sfc.getSpdPkgDefsRdOnly().equals("true")) {\r
- JOptionPane.showMessageDialog(frame, "This is a read-only package. You will not be able to edit contents in table.");\r
+ JOptionPane.showMessageDialog(topFrame, "This is a read-only package. You will not be able to edit contents in table.");\r
}\r
initFrame();\r
\r
\r
chooser.setMultiSelectionEnabled(false);\r
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\r
- int retval = chooser.showOpenDialog(frame);\r
+ int retval = chooser.showOpenDialog(SpdPackageHeaders.this);\r
if (retval == JFileChooser.APPROVE_OPTION) {\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(SpdPackageHeaders.this, "You can only select files in current package!");\r
return;\r
}\r
\r
Tools.resizeComponentWidth(this.jScrollPanePkgHdr, this.getWidth(), intPreferredWidth);\r
Tools.relocateComponentX(this.jButtonBrowse, this.getWidth(), this.getPreferredSize().width, 30);\r
}\r
- \r
- public static void main(String[] args){\r
- new SpdPackageHeaders().setVisible(true);\r
- }\r
+\r
}\r
\r
\r
*/\r
private static final long serialVersionUID = 1L;\r
\r
- static JFrame frame;\r
+ private JFrame topFrame;\r
\r
private JPanel jContentPane = null; \r
\r
private final int usageMinWidth = 60;\r
private final int supArchMinWidth = 200;\r
private final int supModMinWidth = 200;\r
-\r
+ \r
// private Object boolModifyLock = new Object();\r
// private boolean exclusiveUsage = false;\r
\r
/**\r
This is the default constructor\r
**/\r
- public SpdPcdDefs() {\r
+ public SpdPcdDefs(JFrame frame) {\r
super();\r
init();\r
initialize();\r
- \r
+ topFrame = frame;\r
}\r
\r
- public SpdPcdDefs(PackageSurfaceAreaDocument.PackageSurfaceArea inPsa) {\r
- this();\r
+ public SpdPcdDefs(PackageSurfaceAreaDocument.PackageSurfaceArea inPsa, JFrame frame) {\r
+ this(frame);\r
sfc = new SpdFileContents(inPsa);\r
init(sfc);\r
}\r
\r
- public SpdPcdDefs(OpeningPackageType opt) {\r
- this(opt.getXmlSpd());\r
+ public SpdPcdDefs(OpeningPackageType opt, JFrame frame) {\r
+ this(opt.getXmlSpd(), frame);\r
docConsole = opt;\r
}\r
/**\r
private void init(SpdFileContents sfc){\r
\r
if (sfc.getSpdPkgDefsRdOnly().equals("true")) {\r
- JOptionPane.showMessageDialog(frame, "This is a read-only package. You will not be able to edit contents in table.");\r
+ JOptionPane.showMessageDialog(topFrame, "This is a read-only package. You will not be able to edit contents in table.");\r
}\r
initFrame();\r
\r
jCheckBoxPatchInMod.isSelected(), jCheckBoxDyn.isSelected(), jCheckBoxDynEx.isSelected(),\r
archList, modTypeList};\r
try {\r
- if (!dataValidation(row)) {\r
- return;\r
- }\r
-\r
- if (tokenCNameExisted(jTextFieldToken.getText(),jTextFieldC_Name.getText())) {\r
- return;\r
- }\r
+ if (!dataValidation(row)) {\r
+ return;\r
+ }\r
+ \r
+ if (tokenCNameExisted(jTextFieldToken.getText(), jTextFieldC_Name.getText())) {\r
+ return;\r
+ }\r
} catch (Exception e) {\r
- JOptionPane.showMessageDialog(frame, "Illegal Token:"+ e.getCause());\r
+ JOptionPane.showMessageDialog(this, "Illegal Token:"+ e.getCause());\r
return;\r
}\r
\r
TableColumn dataTypeColumn = jTable.getColumnModel().getColumn(3);\r
dataTypeColumn.setCellEditor(new DefaultCellEditor(jComboBoxDataType));\r
\r
- jTable.getColumnModel().getColumn(5).setCellEditor(new LongTextEditor());\r
+ jTable.getColumnModel().getColumn(5).setCellEditor(new LongTextEditor(topFrame));\r
\r
Vector<String> vArch = new Vector<String>();\r
vArch.add("IA32");\r
vArch.add("EBC");\r
vArch.add("ARM");\r
vArch.add("PPC");\r
- jTable.getColumnModel().getColumn(11).setCellEditor(new ListEditor(vArch));\r
+ jTable.getColumnModel().getColumn(11).setCellEditor(new ListEditor(vArch, topFrame));\r
\r
Vector<String> vModule = new Vector<String>();\r
vModule.add("BASE");\r
vModule.add("UEFI_DRIVER");\r
vModule.add("UEFI_APPLICATION");\r
vModule.add("USER_DEFINED");\r
- jTable.getColumnModel().getColumn(12).setCellEditor(new ListEditor(vModule));\r
+ jTable.getColumnModel().getColumn(12).setCellEditor(new ListEditor(vModule, topFrame));\r
\r
jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
jTable.getSelectionModel().addListSelectionListener(new ListSelectionListener(){\r
\r
String usage = getValidUsage(new Boolean(m.getValueAt(row, 6)+""), new Boolean(m.getValueAt(row, 7)+""), new Boolean(m.getValueAt(row, 8)+""), new Boolean(m.getValueAt(row, 9)+""), new Boolean(m.getValueAt(row, 10)+""));\r
if (usage.length() == 0) {\r
- JOptionPane.showMessageDialog(frame, "You must choose at least one usage for PCD entry.");\r
+ JOptionPane.showMessageDialog(this, "You must choose at least one usage for PCD entry.");\r
return;\r
}\r
\r
}\r
if (v.contains("FEATURE_FLAG")/* && v.size() > 1 && !exclusiveUsage*/) {\r
if (v.size() > 1) {\r
- JOptionPane.showMessageDialog(frame, "Usage Feature Flag can NOT co-exist with others.");\r
- return;\r
- }\r
+ JOptionPane.showMessageDialog(this, "Usage Feature Flag can NOT co-exist with others.");\r
+ return;\r
+ }\r
// synchronized (boolModifyLock){\r
// exclusiveUsage = true;\r
// }\r
\r
Object[] o = {cName, token, ts, dataType, defaultVal, help};\r
try {\r
- if (!dataValidation(o)){\r
- return;\r
- }\r
+ if (!dataValidation(o)){\r
+ return;\r
+ }\r
}\r
catch (Exception e) {\r
- JOptionPane.showMessageDialog(frame, "Illegal Token:" + e.getCause());\r
+ JOptionPane.showMessageDialog(this, "Illegal Token:" + e.getCause());\r
return;\r
}\r
docConsole.setSaved(false);\r
\r
for (int i = 0; i < model.getRowCount(); ++i) {\r
if (model.getValueAt(i, 0).equals(cName)) {\r
- JOptionPane.showMessageDialog(frame, "C_Name already existed in table.");\r
+ JOptionPane.showMessageDialog(this, "C_Name already existed in table.");\r
return true;\r
}\r
if (model.getValueAt(i, 1).equals(token)) {\r
- JOptionPane.showMessageDialog(frame, "Token already existed in table.");\r
+ JOptionPane.showMessageDialog(this, "Token already existed in table.");\r
return true;\r
}\r
Long tokenValue = Long.decode(model.getValueAt(i, 1)+"");\r
if (tokenValue.equals(inputToken)) {\r
- JOptionPane.showMessageDialog(frame, "Same token value already existed in table.");\r
+ JOptionPane.showMessageDialog(this, "Same token value already existed in table.");\r
return true;\r
}\r
\r
\r
private boolean checkValidUsage(boolean[] b) {\r
if (!(b[0] || b[1] || b[2] || b[3] || b[4])){\r
- JOptionPane.showMessageDialog(frame, "You must specify at least one usage.");\r
+ JOptionPane.showMessageDialog(this, "You must specify at least one usage.");\r
return false;\r
}\r
return true;\r
private boolean dataValidation(Object[] row) throws Exception{\r
\r
if (!DataValidation.isC_NameType(row[0].toString())) {\r
- JOptionPane.showMessageDialog(frame, "C_Name is NOT C_NameType.");\r
+ JOptionPane.showMessageDialog(this, "C_Name is NOT C_NameType.");\r
return false;\r
}\r
if (!DataValidation.isHexDoubleWordDataType(row[1].toString()) && \r
!DataValidation.isLongInt(row[1].toString(), 1, Long.MAX_VALUE)) {\r
- JOptionPane.showMessageDialog(frame, "Token is NOT correct.");\r
+ JOptionPane.showMessageDialog(this, "Token is NOT correct.");\r
return false;\r
}\r
if (!DataValidation.isC_NameType(row[2].toString())) {\r
- JOptionPane.showMessageDialog(frame, "Token Space is NOT C_NameType");\r
+ JOptionPane.showMessageDialog(this, "Token Space is NOT C_NameType");\r
return false;\r
}\r
if (row[5].toString().length() == 0) {\r
- JOptionPane.showMessageDialog(frame, "HelpText could NOT be empty.");\r
+ JOptionPane.showMessageDialog(this, "HelpText could NOT be empty.");\r
return false;\r
}\r
return true;\r
**/\r
package org.tianocore.frameworkwizard.packaging.ui;\r
\r
+import javax.swing.JFrame;\r
import javax.swing.JOptionPane;\r
import javax.swing.table.DefaultTableModel;\r
import javax.swing.table.TableModel;\r
*/\r
private static final long serialVersionUID = 1L;\r
private SpdFileContents sfc = null;\r
- private OpeningPackageType docConsole = null; \r
+ private OpeningPackageType docConsole = null;\r
+// private JFrame topFrame = null;\r
\r
- public SpdPpiDecls() {\r
- super();\r
+ public SpdPpiDecls(JFrame frame) {\r
+ super(frame);\r
// TODO Auto-generated constructor stub\r
}\r
\r
- public SpdPpiDecls(PackageSurfaceAreaDocument.PackageSurfaceArea inPsa) {\r
- this();\r
+ public SpdPpiDecls(PackageSurfaceAreaDocument.PackageSurfaceArea inPsa, JFrame frame) {\r
+ this(frame);\r
sfc = new SpdFileContents(inPsa);\r
init(sfc);\r
}\r
\r
- public SpdPpiDecls(OpeningPackageType opt) {\r
- this(opt.getXmlSpd());\r
+ public SpdPpiDecls(OpeningPackageType opt, JFrame frame) {\r
+ this(opt.getXmlSpd(), frame);\r
docConsole = opt;\r
if (sfc.getSpdPkgDefsRdOnly().equals("true")) {\r
- JOptionPane.showMessageDialog(frame, "This is a read-only package. You will not be able to edit contents in table.");\r
+ JOptionPane.showMessageDialog(this, "This is a read-only package. You will not be able to edit contents in table.");\r
}\r
initFrame();\r
}\r
**/\r
package org.tianocore.frameworkwizard.packaging.ui;\r
\r
+import javax.swing.JFrame;\r
import javax.swing.JOptionPane;\r
import javax.swing.table.DefaultTableModel;\r
import javax.swing.table.TableModel;\r
private SpdFileContents sfc = null;\r
private OpeningPackageType docConsole = null;\r
\r
- public SpdProtocolDecls() {\r
- super();\r
+ public SpdProtocolDecls(JFrame frame) {\r
+ super(frame);\r
// TODO Auto-generated constructor stub\r
}\r
\r
- public SpdProtocolDecls(PackageSurfaceAreaDocument.PackageSurfaceArea inPsa) {\r
- this();\r
+ public SpdProtocolDecls(PackageSurfaceAreaDocument.PackageSurfaceArea inPsa, JFrame frame) {\r
+ this(frame);\r
sfc = new SpdFileContents(inPsa);\r
init(sfc);\r
}\r
\r
- public SpdProtocolDecls(OpeningPackageType opt) {\r
- this(opt.getXmlSpd());\r
+ public SpdProtocolDecls(OpeningPackageType opt, JFrame frame) {\r
+ this(opt.getXmlSpd(), frame);\r
docConsole = opt;\r
if (sfc.getSpdPkgDefsRdOnly().equals("true")) {\r
- JOptionPane.showMessageDialog(frame, "This is a read-only package. You will not be able to edit contents in table.");\r
+ JOptionPane.showMessageDialog(this, "This is a read-only package. You will not be able to edit contents in table.");\r
}\r
initFrame();\r
}\r
\r
import javax.swing.DefaultCellEditor;\r
import javax.swing.JFileChooser;\r
-import javax.swing.JFrame;\r
import javax.swing.JOptionPane;\r
import javax.swing.JTextField;\r
import javax.swing.JButton;\r
import javax.swing.table.TableModel;\r
\r
import org.tianocore.PlatformSurfaceAreaDocument;\r
+import org.tianocore.frameworkwizard.FrameworkWizardUI;\r
import org.tianocore.frameworkwizard.common.DataValidation;\r
import org.tianocore.frameworkwizard.common.Tools;\r
import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformType;\r
\r
private static final long serialVersionUID = 1L;\r
\r
- static JFrame frame;\r
-\r
private JPanel jContentPane = null;\r
\r
// private JPanel jPanelContentSouth = null;\r
String[] row = { "Compress" };\r
sectionsTableModel.addRow(row);\r
ffc.genBuildOptionsFfsSectionsSections(jTableFfs.getSelectedRow(), "");\r
- JOptionPane.showMessageDialog(frame, "Add Default Section Type EFI_SECTION_PE32 into the New Sections Entry.");\r
+ JOptionPane.showMessageDialog(FpdBuildOptions.this, "Add Default Section Type EFI_SECTION_PE32 into the New Sections Entry.");\r
jTableFfsSections.changeSelection(sectionsTableModel.getRowCount()-1, 0, false, false);\r
}\r
});\r
vArch.add("EBC");\r
vArch.add("ARM");\r
vArch.add("PPC");\r
- jTableOptions.getColumnModel().getColumn(2).setCellEditor(new ListEditor(vArch));\r
+ jTableOptions.getColumnModel().getColumn(2).setCellEditor(new ListEditor(vArch, FrameworkWizardUI.getInstance()));\r
\r
- jTableOptions.getColumnModel().getColumn(5).setCellEditor(new LongTextEditor());\r
+ jTableOptions.getColumnModel().getColumn(5).setCellEditor(new LongTextEditor(FrameworkWizardUI.getInstance()));\r
\r
jTableOptions.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
jTableOptions.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);\r
\r
chooser.setMultiSelectionEnabled(false);\r
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\r
- int retval = chooser.showOpenDialog(frame);\r
+ int retval = chooser.showOpenDialog(FpdBuildOptions.this);\r
if (retval == JFileChooser.APPROVE_OPTION) {\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(FpdBuildOptions.this, "You can only select files in current package!");\r
return;\r
}\r
} else {\r
public void actionPerformed(ActionEvent e) {\r
if (!DataValidation.isInt(jTextFieldAntTaskId.getText())\r
|| jTextFieldAntTaskId.getText().length() != 8) {\r
- JOptionPane.showMessageDialog(frame, "ID must be an 8-digit integer.");\r
+ JOptionPane.showMessageDialog(FpdBuildOptions.this, "ID must be an 8-digit integer.");\r
return;\r
}\r
Object[] o = { jTextFieldAntTaskId.getText(), null, null };\r
\r
import javax.swing.AbstractAction;\r
import javax.swing.JFileChooser;\r
-import javax.swing.JFrame;\r
import javax.swing.JOptionPane;\r
import javax.swing.JTabbedPane;\r
import javax.swing.JButton;\r
import javax.swing.ListSelectionModel;\r
\r
import org.tianocore.PlatformSurfaceAreaDocument;\r
+import org.tianocore.frameworkwizard.FrameworkWizardUI;\r
import org.tianocore.frameworkwizard.common.DataValidation;\r
import org.tianocore.frameworkwizard.common.IDefaultTableModel;\r
import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformType;\r
*/\r
private static final long serialVersionUID = 1L;\r
private final int startIndexOfDynamicTab = 2;\r
- static JFrame frame;\r
private JPanel jContentPane = null;\r
private JPanel jPanelContentEast = null;\r
private JPanel jPanelContentSouth = null;\r
docConsole = opt;\r
if (memModified) {\r
docConsole.setSaved(false);\r
- JOptionPane.showMessageDialog(frame, "Platform Synced with FDF file.");\r
+ JOptionPane.showMessageDialog(FrameworkWizardUI.getInstance(), "Platform Synced with FDF file.");\r
memModified = false;\r
}\r
}\r
JFileChooser chooser = new JFileChooser(wsDir);\r
chooser.setMultiSelectionEnabled(false);\r
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\r
- int retval = chooser.showOpenDialog(frame);\r
+ int retval = chooser.showOpenDialog(FpdFlash.this);\r
if (retval == JFileChooser.APPROVE_OPTION) {\r
\r
File theFile = chooser.getSelectedFile();\r
String filePath = theFile.getPath();\r
if (!filePath.startsWith(wsDir)) {\r
- JOptionPane.showMessageDialog(frame, "You can only select files in current WORKSPACE.");\r
+ JOptionPane.showMessageDialog(FpdFlash.this, "You can only select files in current WORKSPACE.");\r
return;\r
}\r
jTextFieldFdf.setText(filePath.substring(wsDir.length() + 1).replace('\\', '/'));\r
getFvInfoFromFdf(fdfPath, vFvInfo);\r
getFlashInfoFromFdf (fdfPath);\r
if (!erasePolarity.equals("1") && !erasePolarity.equals("0")) {\r
- JOptionPane.showMessageDialog(frame, "FDF file does NOT contain valid Erase Polarity.");\r
+ JOptionPane.showMessageDialog(FrameworkWizardUI.getInstance(), "FDF file does NOT contain valid Erase Polarity.");\r
}\r
else {\r
ffc.setTypedFvImageNameValue("Attributes", "EFI_ERASE_POLARITY", erasePolarity);\r
if (vBlockSize.size() > 0) {\r
blkSize = vBlockSize.get(0);\r
if (!DataValidation.isInt(blkSize) && !DataValidation.isHexDoubleWordDataType(blkSize)) {\r
- JOptionPane.showMessageDialog(frame, "FDF file does NOT contain valid FV block size. Default size 0x10000 will be used.");\r
+ JOptionPane.showMessageDialog(FpdFlash.this, "FDF file does NOT contain valid FV block size. Default size 0x10000 will be used.");\r
blkSize = defaultBlkSize;\r
}\r
}\r
}\r
}\r
catch (NumberFormatException e){\r
- JOptionPane.showMessageDialog(frame, e.getMessage());\r
+ JOptionPane.showMessageDialog(FpdFlash.this, e.getMessage());\r
}\r
}\r
\r
return;\r
}\r
if (fvNameExists(newFvName)) {\r
- JOptionPane.showMessageDialog(frame, "This FV already exists. Please choose another FV name.");\r
+ JOptionPane.showMessageDialog(FpdFlash.this, "This FV already exists. Please choose another FV name.");\r
m.setValueAt(oldFvName, row, 0);\r
return;\r
}\r
if (col == 1 && !sizeFromOptionDlg) {\r
String fvSize = m.getValueAt(row, col) + "";\r
if (!DataValidation.isInt(fvSize) && !DataValidation.isHexDoubleWordDataType(fvSize)) {\r
- JOptionPane.showMessageDialog(frame, "FV size should be Integer or Hex format.");\r
+ JOptionPane.showMessageDialog(FpdFlash.this, "FV size should be Integer or Hex format.");\r
return;\r
}\r
HashMap<String, String> mFvOpts = new HashMap<String, String>();\r
}\r
else {\r
if (!DataValidation.isInt(blkSize) && !DataValidation.isHexDoubleWordDataType(blkSize)) {\r
- int retVal = JOptionPane.showConfirmDialog(frame, "Confirm", "FPD file contains error block size format. Would you like to replace it with a default value?", JOptionPane.YES_NO_OPTION);\r
+ int retVal = JOptionPane.showConfirmDialog(FpdFlash.this, "Confirm", "FPD file contains error block size format. Would you like to replace it with a default value?", JOptionPane.YES_NO_OPTION);\r
if (retVal == JOptionPane.YES_OPTION) {\r
ffc.setTypedNamedFvImageNameValue(oldFvName, "Options", "EFI_BLOCK_SIZE", defaultBlkSize, null);\r
int fs = Integer.decode(fvSize);\r
boolean numOfBlockWellFormat = true;\r
if (!DataValidation.isHexDoubleWordDataType(bSize) && !DataValidation.isInt(bSize)) {\r
blockSizeWellFormat = false;\r
- JOptionPane.showMessageDialog(frame, fvName + " block size bad format.");\r
+ JOptionPane.showMessageDialog(FpdFlash.this, fvName + " block size bad format.");\r
} \r
if (!DataValidation.isHexDoubleWordDataType(numBlks) && !DataValidation.isInt(numBlks)) {\r
numOfBlockWellFormat = false;\r
- JOptionPane.showMessageDialog(frame, fvName + " number of blocks bad format.");\r
+ JOptionPane.showMessageDialog(FpdFlash.this, fvName + " number of blocks bad format.");\r
}\r
if (blockSizeWellFormat && numOfBlockWellFormat) {\r
int size = Integer.decode(bSize);\r
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
import javax.swing.table.TableModel;\r
import javax.swing.JButton;\r
\r
+import org.tianocore.frameworkwizard.FrameworkWizardUI;\r
import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformType;\r
\r
/**\r
* This is the default constructor\r
*/\r
public FpdFvOptions(String name, DefaultTableModel tm, FpdFileContents ffc, OpeningPlatformType dc) {\r
- super();\r
+ super(FrameworkWizardUI.getInstance());\r
fvName = name;\r
this.ffc = ffc;\r
this.docConsole = dc;\r
import java.util.Vector;\r
\r
import javax.swing.JButton;\r
-import javax.swing.JFrame;\r
import javax.swing.JLabel;\r
import javax.swing.JOptionPane;\r
import javax.swing.JPanel;\r
///\r
private static final long serialVersionUID = -8152099582923006900L;\r
\r
- static JFrame frame;\r
//\r
//Define class members\r
//\r
jTextFieldBaseName.addFocusListener(new FocusAdapter(){\r
public void focusLost(FocusEvent e) {\r
if (!DataValidation.isUiNameType(jTextFieldBaseName.getText())) {\r
- JOptionPane.showMessageDialog(frame, "Package Name does not match the UiNameType datatype.");\r
+ JOptionPane.showMessageDialog(FpdHeader.this, "Package Name does not match the UiNameType datatype.");\r
return;\r
}\r
if (jTextFieldBaseName.getText().equals(ffc.getFpdHdrPlatformName())) {\r
jTextFieldGuid.addFocusListener(new FocusAdapter(){\r
public void focusLost(FocusEvent e) {\r
if (!DataValidation.isGuid(jTextFieldGuid.getText())) {\r
- JOptionPane.showMessageDialog(frame, "Guid must be in registry (8-4-4-4-12) format.");\r
+ JOptionPane.showMessageDialog(FpdHeader.this, "Guid must be in registry (8-4-4-4-12) format.");\r
return;\r
}\r
if (jTextFieldGuid.getText().equals(ffc.getFpdHdrGuidValue())) {\r
jTextFieldVersion.addFocusListener(new FocusAdapter(){\r
public void focusLost(FocusEvent e) {\r
if (!DataValidation.isVersion(jTextFieldVersion.getText())) {\r
- JOptionPane.showMessageDialog(frame, "Version does not match the Version datatype.");\r
+ JOptionPane.showMessageDialog(FpdHeader.this, "Version does not match the Version datatype.");\r
return;\r
}\r
if (jTextFieldVersion.getText().equals(ffc.getFpdHdrVer())) {\r
jTextAreaLicense.addFocusListener(new FocusAdapter(){\r
public void focusLost(FocusEvent e) {\r
if (jTextAreaLicense.getText().length() == 0) {\r
- JOptionPane.showMessageDialog(frame, "License must be entered!");\r
+ JOptionPane.showMessageDialog(FpdHeader.this, "License must be entered!");\r
return;\r
}\r
if (jTextAreaLicense.getText().equals(ffc.getFpdHdrLicense())) {\r
jTextAreaDescription.addFocusListener(new FocusAdapter(){\r
public void focusLost(FocusEvent e) {\r
if (jTextAreaDescription.getText().length() == 0) {\r
- JOptionPane.showMessageDialog(frame, "Description must be entered.");\r
+ JOptionPane.showMessageDialog(FpdHeader.this, "Description must be entered.");\r
return;\r
}\r
if (jTextAreaDescription.getText().equals(ffc.getFpdHdrDescription())) {\r
jTextFieldAbstract.addFocusListener(new FocusAdapter(){\r
public void focusLost(FocusEvent e) {\r
if (!DataValidation.isAbstract(jTextFieldAbstract.getText())) {\r
- JOptionPane.showMessageDialog(frame, "Abstract must be entered.");\r
+ JOptionPane.showMessageDialog(FpdHeader.this, "Abstract must be entered.");\r
return;\r
}\r
if (jTextFieldAbstract.getText().equals(ffc.getFpdHdrAbs())) {\r
jCopyrightTextArea.addFocusListener(new FocusAdapter(){\r
public void focusLost(FocusEvent e) {\r
if (!DataValidation.isCopyright(jCopyrightTextArea.getText())) {\r
- JOptionPane.showMessageDialog(frame, "Copyright must be entered.");\r
+ JOptionPane.showMessageDialog(FpdHeader.this, "Copyright must be entered.");\r
return;\r
}\r
if (jCopyrightTextArea.getText().equals(ffc.getFpdHdrCopyright())) {\r
import java.awt.Dimension;\r
import java.awt.Toolkit;\r
\r
-import javax.swing.JFrame;\r
import javax.swing.JOptionPane;\r
import javax.swing.JPanel;\r
import javax.swing.JDialog;\r
import javax.swing.table.TableColumn;\r
import javax.swing.table.TableModel;\r
\r
+import org.tianocore.frameworkwizard.FrameworkWizardUI;\r
import org.tianocore.frameworkwizard.common.DataValidation;\r
import org.tianocore.frameworkwizard.common.GlobalData;\r
import org.tianocore.frameworkwizard.common.IDefaultTableModel;\r
* \r
*/\r
private static final long serialVersionUID = 1L;\r
- static JFrame frame;\r
private JPanel jContentPane = null;\r
private JTabbedPane jTabbedPane = null;\r
private JPanel jPanelPcd = null;\r
* This is the default constructor\r
*/\r
public FpdModuleSA() {\r
- super();\r
+ super(FrameworkWizardUI.getInstance());\r
initialize();\r
}\r
public FpdModuleSA(FpdFileContents ffc) {\r
} catch (Exception e) {\r
String exceptionMsg = e.getCause() + " " + e.getMessage();\r
errorMsg.add(exceptionMsg);\r
- JOptionPane.showMessageDialog(frame, exceptionMsg);\r
+ JOptionPane.showMessageDialog(FrameworkWizardUI.getInstance(), exceptionMsg);\r
}\r
//\r
// display lib instances already selected for key\r
} catch (Exception e) {\r
String exceptionMsg = e.getCause() + " " + e.getMessage();\r
if (!errorMsg.contains(exceptionMsg)) {\r
- JOptionPane.showMessageDialog(frame, e.getCause() + " " + e.getMessage());\r
+ JOptionPane.showMessageDialog(FrameworkWizardUI.getInstance(), e.getCause() + " " + e.getMessage());\r
}\r
}\r
selectedInstancesTableModel.addRow(saa[i]);\r
for (int i = 0; i < errorMsg.size(); ++i) {\r
errors += " " + errorMsg.get(i) + "\n";\r
}\r
- JOptionPane.showMessageDialog(frame, errors);\r
+ JOptionPane.showMessageDialog(FrameworkWizardUI.getInstance(), errors);\r
}\r
showClassToResolved();\r
}\r
jTextFieldMaxDatumSize.setText(ffc.setMaxSizeForPointer(model.getValueAt(selectedRow, 6)+"")+"");\r
}\r
catch(Exception except){\r
- JOptionPane.showMessageDialog(frame, "Unacceptable PCD Value: " + except.getMessage());\r
+ JOptionPane.showMessageDialog(FpdModuleSA.this, "Unacceptable PCD Value: " + except.getMessage());\r
}\r
}\r
else{\r
addLibInstance (libMi);\r
}\r
catch (Exception exception) {\r
- JOptionPane.showMessageDialog(frame, "Adding Instance " + libMi.getName() + " : \n"+ exception.getMessage());\r
+ JOptionPane.showMessageDialog(FpdModuleSA.this, "Adding Instance " + libMi.getName() + " : \n"+ exception.getMessage());\r
return;\r
}\r
docConsole.setSaved(false);\r
resolveLibraryInstances(instanceValue, errorMsg);\r
}\r
catch (Exception exp) {\r
- JOptionPane.showMessageDialog(frame, exp.getMessage());\r
+ JOptionPane.showMessageDialog(FpdModuleSA.this, exp.getMessage());\r
}\r
\r
if (errorMsg.size() > 0) {\r
for (int i = 0; i < errorMsg.size(); ++i) {\r
errors += " " + errorMsg.get(i) + "\n";\r
}\r
- JOptionPane.showMessageDialog(frame, errors);\r
+ JOptionPane.showMessageDialog(FpdModuleSA.this, errors);\r
}\r
showClassToResolved();\r
}\r
}\r
if (newFileGuid.length() > 0) {\r
if (!DataValidation.isGuid(newFileGuid)) {\r
- JOptionPane.showMessageDialog(frame, "FFS File Guid is NOT GUID Type.");\r
+ JOptionPane.showMessageDialog(FpdModuleSA.this, "FFS File Guid is NOT GUID Type.");\r
return;\r
}\r
}\r
vArch.add("EBC");\r
vArch.add("ARM");\r
vArch.add("PPC");\r
- jTableModuleSaOptions.getColumnModel().getColumn(4).setCellEditor(new ListEditor(vArch));\r
+ jTableModuleSaOptions.getColumnModel().getColumn(4).setCellEditor(new ListEditor(vArch, FrameworkWizardUI.getInstance()));\r
\r
- jTableModuleSaOptions.getColumnModel().getColumn(5).setCellEditor(new LongTextEditor());\r
+ jTableModuleSaOptions.getColumnModel().getColumn(5).setCellEditor(new LongTextEditor(FrameworkWizardUI.getInstance()));\r
\r
jTableModuleSaOptions.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
jTableModuleSaOptions.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);\r
ffc.addDynamicPcdBuildData(cName, model.getValueAt(jTablePcd.getSelectedRow(), 3), tsGuid, "DYNAMIC", model.getValueAt(jTablePcd.getSelectedRow(), 5)+"", jTextFieldPcdDefault.isVisible() ? jTextFieldPcdDefault.getText() : jComboBoxFeatureFlagValue.getSelectedItem()+"");\r
}\r
catch(Exception e){\r
- JOptionPane.showMessageDialog(frame, "PCD value format: " + e.getMessage());\r
+ JOptionPane.showMessageDialog(FpdModuleSA.this, "PCD value format: " + e.getMessage());\r
}\r
}\r
\r
jTextFieldMaxDatumSize.setText(ffc.setMaxSizeForPointer(newValue)+"");\r
}\r
catch (Exception exp) {\r
- JOptionPane.showMessageDialog(frame, "PCD Value MalFormed: " + exp.getMessage());\r
+ JOptionPane.showMessageDialog(FpdModuleSA.this, "PCD Value MalFormed: " + exp.getMessage());\r
return;\r
}\r
}\r
try {\r
boolean changable = itemTypeCouldBeChanged (cName, tsGuid, newItemType, moduleInfo);\r
if (!changable) {\r
- JOptionPane.showMessageDialog(frame, "Can NOT Change Pcd Type in: " + moduleInfo.get(0).getName() + " contained in package " + moduleInfo.get(0).getPackageId().getName());\r
+ JOptionPane.showMessageDialog(FpdModuleSA.this, "Can NOT Change Pcd Type in: " + moduleInfo.get(0).getName() + " contained in package " + moduleInfo.get(0).getPackageId().getName());\r
return;\r
}\r
}\r
catch (Exception exp) {\r
- JOptionPane.showMessageDialog(frame, "Can NOT Change Pcd Type in: " + moduleInfo.get(0).getName() + " contained in package " + moduleInfo.get(0).getPackageId().getName() + " " + exp.getMessage());\r
+ JOptionPane.showMessageDialog(FpdModuleSA.this, "Can NOT Change Pcd Type in: " + moduleInfo.get(0).getName() + " contained in package " + moduleInfo.get(0).getPackageId().getName() + " " + exp.getMessage());\r
return;\r
}\r
\r
import java.awt.BorderLayout;\r
import javax.swing.JPanel;\r
\r
-import javax.swing.JFrame;\r
import javax.swing.JTabbedPane;\r
import javax.swing.JButton;\r
import javax.swing.ListSelectionModel;\r
\r
private final int tableWidth = valueWidth;\r
\r
- static JFrame frame;\r
-\r
private JPanel jContentPane = null;\r
\r
private JTabbedPane jTabbedPane = null;\r
Vector<Object> v = new Vector<Object>();\r
getSupportedArchitectures(v);\r
if (v.size() == 0) {\r
- JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");\r
+ JOptionPane.showMessageDialog(FpdPlatformDefs.this, "Platform must support at least ONE Architecture.");\r
jCheckBoxIa32.setSelected(true);\r
return;\r
}\r
Vector<Object> v = new Vector<Object>();\r
getSupportedArchitectures(v);\r
if (v.size() == 0) {\r
- JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");\r
+ JOptionPane.showMessageDialog(FpdPlatformDefs.this, "Platform must support at least ONE Architecture.");\r
jCheckBoxX64.setSelected(true);\r
return;\r
}\r
Vector<Object> v = new Vector<Object>();\r
getSupportedArchitectures(v);\r
if (v.size() == 0) {\r
- JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");\r
+ JOptionPane.showMessageDialog(FpdPlatformDefs.this, "Platform must support at least ONE Architecture.");\r
jCheckBoxIpf.setSelected(true);\r
return;\r
}\r
Vector<Object> v = new Vector<Object>();\r
getSupportedArchitectures(v);\r
if (v.size() == 0) {\r
- JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");\r
+ JOptionPane.showMessageDialog(FpdPlatformDefs.this, "Platform must support at least ONE Architecture.");\r
jCheckBoxEbc.setSelected(true);\r
return;\r
}\r
Vector<Object> v = new Vector<Object>();\r
getSupportedArchitectures(v);\r
if (v.size() == 0) {\r
- JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");\r
+ JOptionPane.showMessageDialog(FpdPlatformDefs.this, "Platform must support at least ONE Architecture.");\r
jCheckBoxArm.setSelected(true);\r
return;\r
}\r
Vector<Object> v = new Vector<Object>();\r
getSupportedArchitectures(v);\r
if (v.size() == 0) {\r
- JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");\r
+ JOptionPane.showMessageDialog(FpdPlatformDefs.this, "Platform must support at least ONE Architecture.");\r
jCheckBoxPpc.setSelected(true);\r
return;\r
}\r
return;\r
}\r
if (jTableBuildTargets.getRowCount() == 1) {\r
- JOptionPane.showMessageDialog(frame, "At least one build target should be set for this platform.");\r
+ JOptionPane.showMessageDialog(FpdPlatformDefs.this, "At least one build target should be set for this platform.");\r
return;\r
}\r
buildTargetTableModel.removeRow(jTableBuildTargets.getSelectedRow());\r
import java.awt.Toolkit;\r
\r
import javax.swing.JComponent;\r
+import javax.swing.JFrame;\r
import javax.swing.JPanel;\r
import javax.swing.JDialog;\r
import javax.swing.KeyStroke;\r
/**\r
* This is the default constructor\r
*/\r
- public GenListDialog() {\r
- super();\r
+ public GenListDialog(JFrame frame) {\r
+ super(frame);\r
initialize();\r
}\r
\r
- public GenListDialog(ActionListener i){\r
- this();\r
+ public GenListDialog(ActionListener i, JFrame frame){\r
+ this(frame);\r
jButtonOk.addActionListener(i);\r
jButtonOk.registerKeyboardAction(i, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false), JComponent.WHEN_FOCUSED);\r
}\r
import java.awt.Toolkit;\r
\r
import javax.swing.JComponent;\r
+import javax.swing.JFrame;\r
import javax.swing.JPanel;\r
import javax.swing.JDialog;\r
import javax.swing.JTextArea;\r
/**\r
* This is the default constructor\r
*/\r
- public GenLongTextDialog() {\r
- super();\r
+ public GenLongTextDialog(JFrame frame) {\r
+ super(frame);\r
initialize();\r
}\r
\r
- public GenLongTextDialog(ActionListener i){\r
- this();\r
+ public GenLongTextDialog(ActionListener i, JFrame frame){\r
+ this(frame);\r
jButtonOk.addActionListener(i);\r
jButtonOk.registerKeyboardAction(i, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false), JComponent.WHEN_FOCUSED);\r
}\r
*/\r
private static final long serialVersionUID = 1L;\r
private boolean canNotBeEmpty = false;\r
+ private JFrame topFrame = null;\r
String archs;\r
JButton button;\r
- static JFrame frame;\r
GenListDialog dialog;\r
protected static final String EDIT = "edit";\r
\r
- public ListEditor() {\r
- \r
+ public ListEditor(JFrame frame) {\r
+ topFrame = frame;\r
button = new JButton();\r
button.setActionCommand(EDIT);\r
button.addActionListener(this);\r
button.setBorderPainted(false);\r
\r
\r
- dialog = new GenListDialog(this);\r
+ dialog = new GenListDialog(this, frame);\r
\r
}\r
\r
- public ListEditor(Vector<String> v) {\r
- this();\r
+ public ListEditor(Vector<String> v, JFrame frame) {\r
+ this(frame);\r
dialog.initList(v);\r
}\r
\r
else { //User pressed dialog's "OK" button.\r
Vector<String> v = dialog.getList();\r
if (canNotBeEmpty && v.size() == 0) {\r
- JOptionPane.showMessageDialog(frame, "You must select at least one item.");\r
+ JOptionPane.showMessageDialog(topFrame, "You must select at least one item.");\r
return;\r
}\r
String s = " ";\r
private static final long serialVersionUID = 1L;\r
String text;\r
JButton button;\r
- static JFrame frame;\r
GenLongTextDialog dialog;\r
protected static final String EDIT = "editLongText";\r
\r
- public LongTextEditor() {\r
+ public LongTextEditor(JFrame frame) {\r
\r
button = new JButton();\r
button.setActionCommand(EDIT);\r
button.addActionListener(this);\r
button.setBorderPainted(false);\r
\r
- dialog = new GenLongTextDialog(this);\r
+ dialog = new GenLongTextDialog(this, frame);\r
\r
}\r
\r
import javax.swing.*;\r
import javax.swing.JScrollPane;\r
import javax.swing.JTextField;\r
-import javax.swing.JFrame;\r
\r
import org.tianocore.frameworkwizard.common.GlobalData;\r
import org.tianocore.frameworkwizard.common.Tools;\r
\r
private WorkspaceTools wt = new WorkspaceTools();\r
\r
- private JFrame frame;\r
-\r
private final int activePlatformId = 0;\r
\r
private final int buildTargetId = 1;\r
\r
chooser.setMultiSelectionEnabled(false);\r
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\r
- int retval = chooser.showOpenDialog(frame);\r
+ int retval = chooser.showOpenDialog(Preferences.this);\r
if (retval == JFileChooser.APPROVE_OPTION) {\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 the Tools"\r
+ JOptionPane.showMessageDialog(Preferences.this, "You can only select files in the Tools"\r
+ System.getProperty("file.separator")\r
+ "Conf directory!");\r
\r
import javax.swing.JOptionPane;
+import org.tianocore.frameworkwizard.FrameworkWizardUI;
import org.tianocore.frameworkwizard.common.DataType;
import org.tianocore.frameworkwizard.common.Tools;
import org.tianocore.frameworkwizard.common.Log;
e.printStackTrace();
}
} else {
- JOptionPane.showMessageDialog(null, "<html>" + "Tool Preferences file: <br>" + strTargetFile
+ JOptionPane.showMessageDialog(FrameworkWizardUI.getInstance(), "<html>" + "Tool Preferences file: <br>" + strTargetFile
+ "<br>does not exist!</html>");
}
}
toolsConfFile = Workspace.getCurrentWorkspace() + System.getProperty("file.separator") + resString.trim();
File toolsDefFile = new File(toolsConfFile);
if (!toolsDefFile.exists()) {
- JOptionPane.showMessageDialog(null, "<html>" + "Tool Definition file, " + toolDefinitionFile
+ JOptionPane.showMessageDialog(FrameworkWizardUI.getInstance(), "<html>" + "Tool Definition file, " + toolDefinitionFile
+ "<br>specified in the target.txt file does not exist!"
+ "<br>Using the default Tool Definition File:<br>"
+ defaultToolsConf);