mirror of https://github.com/acidanthera/audk.git
1. Add scroll bars to Package Library Class Declarations editor.
2. Add GuidType UI support to protocol and ppi declarations according to latest schema. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1081 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
a8bcbf3d11
commit
1be13d3fdd
|
@ -436,7 +436,7 @@ public class SpdFileContents {
|
|||
}
|
||||
|
||||
public void updateSpdPpiDecl(int i, String name, String cName, String guid, String hlp, String archList,
|
||||
String modTypeList){
|
||||
String modTypeList, String guidTypeList){
|
||||
XmlObject o = psaRoot.getPpiDeclarations();
|
||||
if (o == null){
|
||||
return;
|
||||
|
@ -452,6 +452,14 @@ public class SpdFileContents {
|
|||
e.setCName(cName);
|
||||
e.setGuidValue(guid);
|
||||
e.setHelpText(hlp);
|
||||
if (stringToList(guidTypeList) != null) {
|
||||
e.setGuidTypeList(stringToList(guidTypeList));
|
||||
}
|
||||
else{
|
||||
if (e.isSetGuidTypeList()) {
|
||||
e.unsetGuidTypeList();
|
||||
}
|
||||
}
|
||||
if (stringToList(archList) != null){
|
||||
e.setSupArchList(stringToList(archList));
|
||||
}
|
||||
|
@ -473,7 +481,7 @@ public class SpdFileContents {
|
|||
}
|
||||
|
||||
public void updateSpdProtocolDecl(int i, String name, String cName, String guid, String hlp, String archList,
|
||||
String modTypeList){
|
||||
String modTypeList, String guidTypeList){
|
||||
XmlObject o = psaRoot.getProtocolDeclarations();
|
||||
if (o == null){
|
||||
return;
|
||||
|
@ -489,6 +497,14 @@ public class SpdFileContents {
|
|||
e.setCName(cName);
|
||||
e.setGuidValue(guid);
|
||||
e.setHelpText(hlp);
|
||||
if (stringToList(guidTypeList) != null) {
|
||||
e.setGuidTypeList(stringToList(guidTypeList));
|
||||
}
|
||||
else{
|
||||
if (e.isSetGuidTypeList()) {
|
||||
e.unsetGuidTypeList();
|
||||
}
|
||||
}
|
||||
if (stringToList(archList) != null){
|
||||
e.setSupArchList(stringToList(archList));
|
||||
}
|
||||
|
@ -792,6 +808,7 @@ public class SpdFileContents {
|
|||
protocol[i][3] = e.getHelpText();
|
||||
protocol[i][4] = listToString(e.getSupArchList());
|
||||
protocol[i][5] = listToString(e.getSupModuleList());
|
||||
protocol[i][6] = listToString(e.getGuidTypeList());
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
@ -831,7 +848,7 @@ public class SpdFileContents {
|
|||
ppi[i][3] = e.getHelpText();
|
||||
ppi[i][4] = listToString(e.getSupArchList());
|
||||
ppi[i][5] = listToString(e.getSupModuleList());
|
||||
|
||||
ppi[i][6] = listToString(e.getGuidTypeList());
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
@ -1171,13 +1188,13 @@ public class SpdFileContents {
|
|||
**/
|
||||
public void genSpdProtocolDeclarations(String protocolDeclEntryName, String protocolDeclCName,
|
||||
String protocolDeclGuid, String protocolDeclFeatureFlag,
|
||||
Vector<String> archList, Vector<String> modTypeList) {
|
||||
Vector<String> archList, Vector<String> modTypeList, Vector<String> guidTypeList) {
|
||||
if (getSpdProtocolDeclarations() == null) {
|
||||
spdProtocolDeclarations = psaRoot.addNewProtocolDeclarations();
|
||||
}
|
||||
|
||||
setSpdEntry(protocolDeclEntryName, protocolDeclCName, protocolDeclGuid, protocolDeclFeatureFlag,
|
||||
archList, modTypeList, null, spdProtocolDeclarations);
|
||||
archList, modTypeList, guidTypeList, spdProtocolDeclarations);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1189,12 +1206,12 @@ public class SpdFileContents {
|
|||
@param ppiDeclFeatureFlag Reserved
|
||||
**/
|
||||
public void genSpdPpiDeclarations(String ppiDeclEntryName, String ppiDeclCName, String ppiDeclGuid,
|
||||
String ppiDeclFeatureFlag, Vector<String> archList, Vector<String> modTypeList) {
|
||||
String ppiDeclFeatureFlag, Vector<String> archList, Vector<String> modTypeList, Vector<String> guidTypeList) {
|
||||
if (getSpdPpiDeclarations() == null) {
|
||||
spdPpiDeclarations = psaRoot.addNewPpiDeclarations();
|
||||
}
|
||||
|
||||
setSpdEntry(ppiDeclEntryName, ppiDeclCName, ppiDeclGuid, ppiDeclFeatureFlag, archList, modTypeList, null, spdPpiDeclarations);
|
||||
setSpdEntry(ppiDeclEntryName, ppiDeclCName, ppiDeclGuid, ppiDeclFeatureFlag, archList, modTypeList, guidTypeList, spdPpiDeclarations);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1250,6 +1267,14 @@ public class SpdFileContents {
|
|||
pe.setCName(cName);
|
||||
pe.setGuidValue(guid);
|
||||
pe.setHelpText(help);
|
||||
if (guidTypeList != null) {
|
||||
pe.setGuidTypeList(guidTypeList);
|
||||
}
|
||||
else{
|
||||
if (pe.isSetGuidTypeList()) {
|
||||
pe.unsetGuidTypeList();
|
||||
}
|
||||
}
|
||||
if (archList != null) {
|
||||
pe.setSupArchList(archList);
|
||||
}
|
||||
|
@ -1276,6 +1301,14 @@ public class SpdFileContents {
|
|||
ppe.setCName(cName);
|
||||
ppe.setGuidValue(guid);
|
||||
ppe.setHelpText(help);
|
||||
if (guidTypeList != null) {
|
||||
ppe.setGuidTypeList(guidTypeList);
|
||||
}
|
||||
else{
|
||||
if (ppe.isSetGuidTypeList()) {
|
||||
ppe.unsetGuidTypeList();
|
||||
}
|
||||
}
|
||||
if (archList != null) {
|
||||
ppe.setSupArchList(archList);
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
|
|||
if (jScrollPane == null) {
|
||||
jScrollPane = new JScrollPane();
|
||||
jScrollPane.setBounds(new java.awt.Rectangle(12,351,608,253));
|
||||
jScrollPane.setPreferredSize(new java.awt.Dimension(390,150));
|
||||
jScrollPane.setPreferredSize(new java.awt.Dimension(500,419));
|
||||
jScrollPane.setViewportView(getJTable());
|
||||
}
|
||||
return jScrollPane;
|
||||
|
@ -316,7 +316,7 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
|
|||
jButtonAdd = new JButton();
|
||||
jButtonAdd.setText("Add");
|
||||
jButtonAdd.setSize(new java.awt.Dimension(99,20));
|
||||
jButtonAdd.setLocation(new java.awt.Point(321,326));
|
||||
jButtonAdd.setBounds(new java.awt.Rectangle(321,326,99,20));
|
||||
jButtonAdd.addActionListener(this);
|
||||
}
|
||||
return jButtonAdd;
|
||||
|
@ -332,7 +332,7 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
|
|||
jButtonRemove = new JButton();
|
||||
jButtonRemove.setText("Remove");
|
||||
jButtonRemove.setSize(new java.awt.Dimension(99,20));
|
||||
jButtonRemove.setLocation(new java.awt.Point(424,326));
|
||||
jButtonRemove.setBounds(new java.awt.Rectangle(424,326,99,20));
|
||||
jButtonRemove.addActionListener(this);
|
||||
}
|
||||
return jButtonRemove;
|
||||
|
@ -348,7 +348,7 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
|
|||
jButtonRemoveAll = new JButton();
|
||||
jButtonRemoveAll.setText("Remove All");
|
||||
jButtonRemoveAll.setSize(new java.awt.Dimension(99,20));
|
||||
jButtonRemoveAll.setLocation(new java.awt.Point(527,326));
|
||||
jButtonRemoveAll.setBounds(new java.awt.Rectangle(527,326,99,20));
|
||||
jButtonRemoveAll.addActionListener(this);
|
||||
}
|
||||
return jButtonRemoveAll;
|
||||
|
@ -418,7 +418,7 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
|
|||
private JScrollPane getJContentPane(){
|
||||
if (topScrollPane == null){
|
||||
topScrollPane = new JScrollPane();
|
||||
topScrollPane.setSize(new java.awt.Dimension(634,590));
|
||||
// topScrollPane.setSize(new java.awt.Dimension(634,590));
|
||||
topScrollPane.setViewportView(getJContentPane1());
|
||||
}
|
||||
return topScrollPane;
|
||||
|
@ -470,7 +470,7 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
|
|||
jLabel3RecInstName.setText("Recommended Instance Name");
|
||||
|
||||
jContentPane = new JPanel();
|
||||
jContentPane.setPreferredSize(new Dimension(480, 400));
|
||||
jContentPane.setPreferredSize(new Dimension(680, 600));
|
||||
jContentPane.setLayout(null);
|
||||
jContentPane.add(jLabelHdr, null);
|
||||
jContentPane.add(jStarLabel1, null);
|
||||
|
|
|
@ -51,12 +51,7 @@ public class SpdPpiDecls extends SpdGuidDecls {
|
|||
protected void initFrame() {
|
||||
|
||||
this.setTitle("PPI Declarations");
|
||||
getJScrollPaneGuid().setVisible(false);
|
||||
getJLabel3().setVisible(false);
|
||||
|
||||
getJTable().getColumn("GuidTypes").setPreferredWidth(0);
|
||||
getJTable().getColumn("GuidTypes").setWidth(0);
|
||||
getJTable().getColumn("GuidTypes").setHeaderValue(" ");
|
||||
}
|
||||
|
||||
protected void init(SpdFileContents sfc){
|
||||
|
@ -67,7 +62,7 @@ public class SpdPpiDecls extends SpdGuidDecls {
|
|||
if (sfc.getSpdPpiDeclarationCount() == 0) {
|
||||
return ;
|
||||
}
|
||||
String[][] saa = new String[sfc.getSpdPpiDeclarationCount()][6];
|
||||
String[][] saa = new String[sfc.getSpdPpiDeclarationCount()][7];
|
||||
sfc.getSpdPpiDeclarations(saa);
|
||||
int i = 0;
|
||||
while (i < saa.length) {
|
||||
|
@ -89,12 +84,16 @@ public class SpdPpiDecls extends SpdGuidDecls {
|
|||
if (m.getValueAt(row, 5) != null) {
|
||||
modTypeList = m.getValueAt(row, 5).toString();
|
||||
}
|
||||
String guidTypeList = null;
|
||||
if (m.getValueAt(row, 6) != null) {
|
||||
guidTypeList = m.getValueAt(row, 6).toString();
|
||||
}
|
||||
String[] rowData = {name, cName, guid, help};
|
||||
if (!dataValidation(rowData)){
|
||||
return;
|
||||
}
|
||||
docConsole.setSaved(false);
|
||||
sfc.updateSpdPpiDecl(row, name, cName, guid, help, archList, modTypeList);
|
||||
sfc.updateSpdPpiDecl(row, name, cName, guid, help, archList, modTypeList, guidTypeList);
|
||||
}
|
||||
|
||||
protected void addRow(String[] row) {
|
||||
|
@ -103,7 +102,7 @@ public class SpdPpiDecls extends SpdGuidDecls {
|
|||
return;
|
||||
}
|
||||
docConsole.setSaved(false);
|
||||
sfc.genSpdPpiDeclarations(row[0], row[1], row[2], row[3], stringToVector(row[4]), stringToVector(row[5]));
|
||||
sfc.genSpdPpiDeclarations(row[0], row[1], row[2], row[3], stringToVector(row[4]), stringToVector(row[5]), stringToVector(row[6]));
|
||||
}
|
||||
|
||||
protected void removeRow(int i){
|
||||
|
|
|
@ -51,12 +51,7 @@ public class SpdProtocolDecls extends SpdGuidDecls {
|
|||
protected void initFrame() {
|
||||
|
||||
this.setTitle("Protocol Declarations");
|
||||
getJScrollPaneGuid().setVisible(false);
|
||||
getJLabel3().setVisible(false);
|
||||
|
||||
getJTable().getColumn("GuidTypes").setPreferredWidth(0);
|
||||
getJTable().getColumn("GuidTypes").setWidth(0);
|
||||
getJTable().getColumn("GuidTypes").setHeaderValue(" ");
|
||||
}
|
||||
|
||||
protected void init(SpdFileContents sfc){
|
||||
|
@ -67,7 +62,7 @@ public class SpdProtocolDecls extends SpdGuidDecls {
|
|||
if (sfc.getSpdProtocolDeclarationCount() == 0) {
|
||||
return ;
|
||||
}
|
||||
String[][] saa = new String[sfc.getSpdProtocolDeclarationCount()][6];
|
||||
String[][] saa = new String[sfc.getSpdProtocolDeclarationCount()][7];
|
||||
sfc.getSpdProtocolDeclarations(saa);
|
||||
int i = 0;
|
||||
while (i < saa.length) {
|
||||
|
@ -90,12 +85,16 @@ public class SpdProtocolDecls extends SpdGuidDecls {
|
|||
if (m.getValueAt(row, 5) != null) {
|
||||
modTypeList = m.getValueAt(row, 5).toString();
|
||||
}
|
||||
String guidTypeList = null;
|
||||
if (m.getValueAt(row, 6) != null) {
|
||||
guidTypeList = m.getValueAt(row, 6).toString();
|
||||
}
|
||||
String[] rowData = {name, cName, guid, help};
|
||||
if (!dataValidation(rowData)){
|
||||
return;
|
||||
}
|
||||
docConsole.setSaved(false);
|
||||
sfc.updateSpdProtocolDecl(row, name, cName, guid, help, archList, modTypeList);
|
||||
sfc.updateSpdProtocolDecl(row, name, cName, guid, help, archList, modTypeList, guidTypeList);
|
||||
}
|
||||
|
||||
protected void addRow(String[] row) {
|
||||
|
@ -103,7 +102,7 @@ public class SpdProtocolDecls extends SpdGuidDecls {
|
|||
return;
|
||||
}
|
||||
docConsole.setSaved(false);
|
||||
sfc.genSpdProtocolDeclarations(row[0], row[1], row[2], row[3], stringToVector(row[4]), stringToVector(row[5]));
|
||||
sfc.genSpdProtocolDeclarations(row[0], row[1], row[2], row[3], stringToVector(row[4]), stringToVector(row[5]), stringToVector(row[6]));
|
||||
}
|
||||
|
||||
protected void removeRow(int i){
|
||||
|
|
Loading…
Reference in New Issue