X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Tools%2FJava%2FSource%2FFrameworkWizard%2Fsrc%2Forg%2Ftianocore%2Fframeworkwizard%2FFrameworkWizardUI.java;h=c3452d7b4c86741226cc0ce4dc464dd3c2205e57;hp=651222d8537d851d06762b2dd4d488f131e52ad9;hb=82484861b558513f1333518d9e4f740d1c1526a6;hpb=cc95b47b5ed21a30bb54d81b4a8cd43f62c1d4cd diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java index 651222d853..c3452d7b4c 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java @@ -44,6 +44,7 @@ import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JSplitPane; import javax.swing.JTabbedPane; +import javax.swing.ToolTipManager; import javax.swing.event.MenuEvent; import javax.swing.event.MenuListener; import javax.swing.event.TreeSelectionEvent; @@ -73,6 +74,7 @@ import org.tianocore.frameworkwizard.far.installui.InstallStepOne; import org.tianocore.frameworkwizard.far.updateui.UpdateStepOne; import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification; import org.tianocore.frameworkwizard.module.ui.ModuleBootModes; +import org.tianocore.frameworkwizard.module.ui.ModuleBuildOptions; import org.tianocore.frameworkwizard.module.ui.ModuleDataHubs; import org.tianocore.frameworkwizard.module.ui.ModuleEvents; import org.tianocore.frameworkwizard.module.ui.ModuleExterns; @@ -120,6 +122,11 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe /// Define class Serial Version UID /// private static final long serialVersionUID = -7103240960573031772L; + + // + // Set ToolTipText Show Time + // + static { ToolTipManager.sharedInstance().setDismissDelay(18000); } /// /// Used to record current operation target @@ -1829,7 +1836,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe // Close splash screen // ss.dispose(); - + // // Init the frame // @@ -1887,6 +1894,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe if (arg0.getSource() == this.jMenuItemFileCloseAll) { this.closeAll(); + this.refresh(); this.makeEmptyTree(); } @@ -2534,6 +2542,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe iTree.addNode(new IDefaultMutableTreeNode("External Defintions", IDefaultMutableTreeNode.MSA_EXTERNS, true, id, belongNode)); iTree.addNode(new IDefaultMutableTreeNode("Pcd Coded", IDefaultMutableTreeNode.MSA_PCDS, true, id, belongNode)); + iTree.addNode(new IDefaultMutableTreeNode("Build Options", IDefaultMutableTreeNode.MSA_BUILDOPTIONS, true, id, belongNode)); } private void insertPackageTreeNode(Identification id) { @@ -2775,31 +2784,31 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe getJDesktopPanePackage().add(frmSpdHeader, 1); break; case IDefaultMutableTreeNode.SPD_LIBRARYCLASSDECLARATIONS: - SpdLibClassDecls frmSlcd = new SpdLibClassDecls(spd); + SpdLibClassDecls frmSlcd = new SpdLibClassDecls(spd, this); getJDesktopPanePackage().add(frmSlcd, 1); break; case IDefaultMutableTreeNode.SPD_MSAFILES: - SpdMsaFiles frmSmf = new SpdMsaFiles(spd); + SpdMsaFiles frmSmf = new SpdMsaFiles(spd, this); getJDesktopPanePackage().add(frmSmf, 1); break; case IDefaultMutableTreeNode.SPD_PACKAGEHEADERS: - SpdPackageHeaders frmSph = new SpdPackageHeaders(spd); + SpdPackageHeaders frmSph = new SpdPackageHeaders(spd, this); getJDesktopPanePackage().add(frmSph, 1); break; case IDefaultMutableTreeNode.SPD_GUIDDECLARATIONS: - SpdGuidDecls frmSgd = new SpdGuidDecls(spd); + SpdGuidDecls frmSgd = new SpdGuidDecls(spd, this); getJDesktopPanePackage().add(frmSgd, 1); break; case IDefaultMutableTreeNode.SPD_PROTOCOLDECLARATIONS: - SpdProtocolDecls frmSprod = new SpdProtocolDecls(spd); + SpdProtocolDecls frmSprod = new SpdProtocolDecls(spd, this); getJDesktopPanePackage().add(frmSprod, 1); break; case IDefaultMutableTreeNode.SPD_PPIDECLARATIONS: - SpdPpiDecls frmSppid = new SpdPpiDecls(spd); + SpdPpiDecls frmSppid = new SpdPpiDecls(spd, this); getJDesktopPanePackage().add(frmSppid, 1); break; case IDefaultMutableTreeNode.SPD_PCDDECLARATIONS: - SpdPcdDefs frmSpcdd = new SpdPcdDefs(spd); + SpdPcdDefs frmSpcdd = new SpdPcdDefs(spd, this); getJDesktopPanePackage().add(frmSpcdd, 1); break; } @@ -2822,65 +2831,69 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe getJDesktopPaneModule().add(frmMsaHeader, 1); break; case IDefaultMutableTreeNode.MSA_LIBRARYCLASSDEFINITIONS: - ModuleLibraryClassDefinitions frmMlcd = new ModuleLibraryClassDefinitions(msa); + ModuleLibraryClassDefinitions frmMlcd = new ModuleLibraryClassDefinitions(msa, this); getJDesktopPaneModule().add(frmMlcd, 1); break; case IDefaultMutableTreeNode.MSA_PACKAGEDEPENDENCIES: - ModulePackageDependencies frmMpd = new ModulePackageDependencies(msa); + ModulePackageDependencies frmMpd = new ModulePackageDependencies(msa, this); getJDesktopPaneModule().add(frmMpd, 1); break; case IDefaultMutableTreeNode.MSA_SOURCEFILES: - ModuleSourceFiles frmMsf = new ModuleSourceFiles(msa); + ModuleSourceFiles frmMsf = new ModuleSourceFiles(msa, this); getJDesktopPaneModule().add(frmMsf, 1); break; case IDefaultMutableTreeNode.MSA_PROTOCOLS: - ModuleProtocols frmMp = new ModuleProtocols(msa); + ModuleProtocols frmMp = new ModuleProtocols(msa, this); getJDesktopPaneModule().add(frmMp, 1); break; case IDefaultMutableTreeNode.MSA_EVENTS: - ModuleEvents frmMe = new ModuleEvents(msa); + ModuleEvents frmMe = new ModuleEvents(msa, this); getJDesktopPaneModule().add(frmMe, 1); break; case IDefaultMutableTreeNode.MSA_HOBS: - ModuleHobs frmMh = new ModuleHobs(msa); + ModuleHobs frmMh = new ModuleHobs(msa, this); getJDesktopPaneModule().add(frmMh, 1); break; case IDefaultMutableTreeNode.MSA_PPIS: - ModulePpis frmMpp = new ModulePpis(msa); + ModulePpis frmMpp = new ModulePpis(msa, this); getJDesktopPaneModule().add(frmMpp, 1); break; case IDefaultMutableTreeNode.MSA_VARIABLES: - ModuleVariables frmMv = new ModuleVariables(msa); + ModuleVariables frmMv = new ModuleVariables(msa, this); getJDesktopPaneModule().add(frmMv, 1); break; case IDefaultMutableTreeNode.MSA_BOOTMODES: - ModuleBootModes frmMbm = new ModuleBootModes(msa); + ModuleBootModes frmMbm = new ModuleBootModes(msa, this); getJDesktopPaneModule().add(frmMbm, 1); break; case IDefaultMutableTreeNode.MSA_SYSTEMTABLES: - ModuleSystemTables frmMst = new ModuleSystemTables(msa); + ModuleSystemTables frmMst = new ModuleSystemTables(msa, this); getJDesktopPaneModule().add(frmMst, 1); break; case IDefaultMutableTreeNode.MSA_DATAHUBS: - ModuleDataHubs frmMdh = new ModuleDataHubs(msa); + ModuleDataHubs frmMdh = new ModuleDataHubs(msa, this); getJDesktopPaneModule().add(frmMdh, 1); break; case IDefaultMutableTreeNode.MSA_HIIPACKAGES: - ModuleHiiPackages frmMf = new ModuleHiiPackages(msa); + ModuleHiiPackages frmMf = new ModuleHiiPackages(msa, this); getJDesktopPaneModule().add(frmMf, 1); break; case IDefaultMutableTreeNode.MSA_GUIDS: - ModuleGuids frmGuid = new ModuleGuids(msa); + ModuleGuids frmGuid = new ModuleGuids(msa, this); getJDesktopPaneModule().add(frmGuid, 1); break; case IDefaultMutableTreeNode.MSA_EXTERNS: - ModuleExterns frmMex = new ModuleExterns(msa); + ModuleExterns frmMex = new ModuleExterns(msa, this); getJDesktopPaneModule().add(frmMex, 1); break; case IDefaultMutableTreeNode.MSA_PCDS: - ModulePCDs frmPcd = new ModulePCDs(msa); + ModulePCDs frmPcd = new ModulePCDs(msa, this); getJDesktopPaneModule().add(frmPcd, 1); break; + case IDefaultMutableTreeNode.MSA_BUILDOPTIONS: + ModuleBuildOptions frmMbo = new ModuleBuildOptions(msa, this); + getJDesktopPaneModule().add(frmMbo, 1); + break; } this.jTabbedPaneEditor.setSelectedIndex(0); resizeDesktopPanel(); @@ -3108,8 +3121,10 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe iTree.removeNodeChildrenByPath(item); } + GlobalData.openingModuleList.reload(this.currentOpeningModuleIndex); GlobalData.openingModuleList.setModuleOpen(this.currentOpeningModuleIndex, false); GlobalData.openingModuleList.setModuleSaved(this.currentOpeningModuleIndex, true); + this.cleanDesktopPaneModule(); this.currentOpeningModuleIndex = -1; } @@ -3144,6 +3159,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe iTree.removeNodeChildrenByPath(item); } + GlobalData.openingPackageList.reload(this.currentOpeningPackageIndex); GlobalData.openingPackageList.setPackageOpen(this.currentOpeningPackageIndex, false); GlobalData.openingPackageList.setPackageSaved(this.currentOpeningPackageIndex, true); this.cleanDesktopPanePackage(); @@ -3180,6 +3196,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe iTree.removeNodeChildrenByPath(item); } + GlobalData.openingPlatformList.reload(this.currentOpeningPlatformIndex); GlobalData.openingPlatformList.setPlatformOpen(this.currentOpeningPlatformIndex, false); GlobalData.openingPlatformList.setPlatformSaved(this.currentOpeningPlatformIndex, true); this.cleanDesktopPanePlatform(); @@ -3392,7 +3409,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe int result = cso.showDialog(); if (result == DataType.RETURN_TYPE_OK) { String strReturn = "Far Creation Completed!"; - JOptionPane.showConfirmDialog(null, strReturn, "Done", JOptionPane.DEFAULT_OPTION, + JOptionPane.showConfirmDialog(this, strReturn, "Done", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE); } cso.dispose(); @@ -3407,7 +3424,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe int result = iso.showDialog(); if (result == DataType.RETURN_TYPE_OK) { String strReturn = "Far Installalation completed!
Refreshing the WORKSPACE!"; - JOptionPane.showConfirmDialog(null, strReturn, "Done", JOptionPane.DEFAULT_OPTION, + JOptionPane.showConfirmDialog(this, strReturn, "Done", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE); this.closeAll(); this.refresh(); @@ -3425,7 +3442,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe int result = dso.showDialog(); if (result == DataType.RETURN_TYPE_OK) { String strReturn = "Far Deletion completed!
Refreshing the WORKSPACE!"; - JOptionPane.showConfirmDialog(null, strReturn, "Done", JOptionPane.DEFAULT_OPTION, + JOptionPane.showConfirmDialog(this, strReturn, "Done", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE); this.closeAll(); this.refresh(); @@ -3443,7 +3460,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe int result = uso.showDialog(); if (result == DataType.RETURN_TYPE_OK) { String strReturn = "Far Update completed!
Refreshing the WORKSPACE!"; - JOptionPane.showConfirmDialog(null, strReturn, "Done", JOptionPane.DEFAULT_OPTION, + JOptionPane.showConfirmDialog(this, strReturn, "Done", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE); this.closeAll(); this.refresh(); @@ -3690,7 +3707,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe return; } - JOptionPane.showConfirmDialog(null, "File is created", "Generate guids.xref", JOptionPane.DEFAULT_OPTION, + JOptionPane.showConfirmDialog(this, "File is created", "Generate guids.xref", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE); } } @@ -3706,7 +3723,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe case Workspace.WORKSPACE_NOT_DEFINED: JOptionPane .showConfirmDialog( - null, + this, "WORKSPACE Environment Variable Is Not Defined, Please select a valid WORKSPACE directory. " + DataType.LINE_SEPARATOR + DataType.LINE_SEPARATOR @@ -3726,22 +3743,22 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe break; } case Workspace.WORKSPACE_NOT_EXIST: - JOptionPane.showConfirmDialog(null, "Defined WORKSPACE Is Not Existed", "Error", + JOptionPane.showConfirmDialog(this, "Defined WORKSPACE Is Not Existed", "Error", JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE); this.dispose(); System.exit(0); case Workspace.WORKSPACE_NOT_DIRECTORY: - JOptionPane.showConfirmDialog(null, "Defined WORKSPACE Is Not A Directory", "Error", + JOptionPane.showConfirmDialog(this, "Defined WORKSPACE Is Not A Directory", "Error", JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE); this.dispose(); System.exit(0); case Workspace.WORKSPACE_NOT_VALID: - JOptionPane.showConfirmDialog(null, "WORKSPACE Environment Variable Is Not Valid", "Error", + JOptionPane.showConfirmDialog(this, "WORKSPACE Environment Variable Is Not Valid", "Error", JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE); this.dispose(); System.exit(0); case Workspace.WORKSPACE_NO_TARGET_FILE: - JOptionPane.showConfirmDialog(null, "Target.txt File Is Not Existed", "Error", JOptionPane.DEFAULT_OPTION, + JOptionPane.showConfirmDialog(this, "Target.txt File Is Not Existed", "Error", JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE); this.dispose(); System.exit(0);