]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdLibClassDecls.java
Adapt to new Main UI interface.
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / packaging / ui / SpdLibClassDecls.java
index 32596fe639091c9ee9142e0a50f8b813a49e2ea5..61d69b191690c452b2cb0a7328d987ddba3c0a0e 100644 (file)
@@ -43,6 +43,7 @@ import javax.swing.table.TableModel;
 import org.tianocore.PackageSurfaceAreaDocument;\r
 import org.tianocore.frameworkwizard.common.DataValidation;\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
@@ -98,6 +99,8 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
     private StarLabel jStarLabel2 = null;\r
     \r
     private SpdFileContents sfc = null;\r
+    \r
+    private OpeningPackageType docConsole = null;\r
 \r
     private JLabel jLabel1 = null;\r
     \r
@@ -317,6 +320,7 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
             if (!dataValidation(rowData)) {\r
                 return;\r
             }\r
+            docConsole.setSaved(false);\r
             sfc.updateSpdLibClass(row, lib, hdr, hlp, guid, ver, arch, module);\r
         }\r
     }\r
@@ -401,6 +405,11 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
         sfc = new SpdFileContents(inPsa);\r
         init(sfc);\r
     }\r
+    \r
+    public SpdLibClassDecls(OpeningPackageType opt) {\r
+        this(opt.getXmlSpd());\r
+        docConsole = opt;\r
+    }\r
     /**\r
       This method initializes this\r
       \r
@@ -574,6 +583,8 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
      * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
      */\r
     public void actionPerformed(ActionEvent arg0) {\r
+        \r
+        docConsole.setSaved(false);\r
         if (arg0.getSource() == jButtonOk) {\r
             this.save();\r
             this.dispose();\r
@@ -733,7 +744,6 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
                     \r
                     headerDest = theFile.getPath();\r
                     int fileIndex = headerDest.indexOf(System.getProperty("file.separator"), dirPrefix.length());\r
-                    \r
                     jTextField.setText(headerDest.substring(fileIndex + 1).replace('\\', '/'));\r
                \r
                 }\r