diff options
author | jlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-08-29 06:01:11 +0000 |
---|---|---|
committer | jlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-08-29 06:01:11 +0000 |
commit | 04a13d6c501bd4b70331a11a88d480bb254a3693 (patch) | |
tree | 422e44a0e66c63a90d0034f6cddf146949028522 /Tools | |
parent | a3222f6a718e983f319e327841cdcfbe624c27e9 (diff) | |
download | edk2-04a13d6c501bd4b70331a11a88d480bb254a3693.zip edk2-04a13d6c501bd4b70331a11a88d480bb254a3693.tar.gz edk2-04a13d6c501bd4b70331a11a88d480bb254a3693.tar.bz2 |
Add check before adding msa file to spd file.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1400 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdMsaFiles.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdMsaFiles.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdMsaFiles.java index b4ed73a..efaf0ef 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdMsaFiles.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdMsaFiles.java @@ -333,7 +333,6 @@ public class SpdMsaFiles extends IInternalFrame implements TableModelListener{ */
public void actionPerformed(ActionEvent arg0) {
- docConsole.setSaved(false);
if (arg0.getSource() == jButtonOk) {
this.save();
this.dispose();
@@ -350,9 +349,16 @@ public class SpdMsaFiles extends IInternalFrame implements TableModelListener{ JOptionPane.showMessageDialog(this, "Msa File is NOT PathAndFilename type.");
return;
}
+
+ String dirPrefix = Tools.dirForNewSpd.substring(0, Tools.dirForNewSpd.lastIndexOf(File.separator));
+ if (!new File(dirPrefix + File.separator + jTextField.getText()).exists()) {
+ JOptionPane.showMessageDialog(this, "File NOT Exists in Current Package.");
+ return;
+ }
model.addRow(row);
jTable.changeSelection(model.getRowCount()-1, 0, false, false);
sfc.genSpdMsaFiles(row[0], null, null, null);
+ docConsole.setSaved(false);
}
//
// remove selected line
@@ -365,6 +371,7 @@ public class SpdMsaFiles extends IInternalFrame implements TableModelListener{ if (rowSelected >= 0) {
model.removeRow(rowSelected);
sfc.removeSpdMsaFile(rowSelected);
+ docConsole.setSaved(false);
}
}
@@ -374,6 +381,7 @@ public class SpdMsaFiles extends IInternalFrame implements TableModelListener{ }
model.setRowCount(0);
sfc.removeSpdMsaFile();
+ docConsole.setSaved(false);
}
}
|